@ecan-bi/tools 1.0.84 → 1.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.es.js CHANGED
@@ -1 +1 @@
1
- function e(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}function t(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((n=n.apply(e,t||[])).next())}))}function o(e,t){const o=Object.create(null),n=e.split(",");for(let e=0;e<n.length;e++)o[n[e]]=!0;return e=>!!o[e]}const n=()=>{},i=Object.assign,r=Object.prototype.hasOwnProperty,a=(e,t)=>r.call(e,t),l=Array.isArray,s=e=>"[object Map]"===p(e),c=e=>"function"==typeof e,u=e=>"string"==typeof e,d=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,f=Object.prototype.toString,p=e=>f.call(e),m=e=>p(e).slice(8,-1),y=e=>u(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,g=(e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))})((e=>e.charAt(0).toUpperCase()+e.slice(1))),b=(e,t)=>!Object.is(e,t);let v;const x=()=>v||(v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function w(e,...t){console.warn(`[Vue warn] ${e}`,...t)}const S=e=>{const t=new Set(e);return t.w=0,t.n=0,t},A=e=>(e.w&C)>0,_=e=>(e.n&C)>0,L=new WeakMap;let O=0,C=1;let j;const N=Symbol("production"!==process.env.NODE_ENV?"iterate":""),T=Symbol("production"!==process.env.NODE_ENV?"Map key iterate":"");class M{constructor(e,t=null,o){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,function(e,t){t&&t.active&&t.effects.push(e)}(this,o)}run(){if(!this.active)return this.fn();let e=j,t=F;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=j,j=this,F=!0,C=1<<++O,O<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=C})(this):k(this),this.fn()}finally{O<=30&&(e=>{const{deps:t}=e;if(t.length){let o=0;for(let n=0;n<t.length;n++){const i=t[n];A(i)&&!_(i)?i.delete(e):t[o++]=i,i.w&=~C,i.n&=~C}t.length=o}})(this),C=1<<--O,j=this.parent,F=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(k(this),this.onStop&&this.onStop(),this.active=!1)}}function k(e){const{deps:t}=e;if(t.length){for(let o=0;o<t.length;o++)t[o].delete(e);t.length=0}}let F=!0;const $=[];function I(){$.push(F),F=!1}function E(){const e=$.pop();F=void 0===e||e}function D(e,t,o){if(F&&j){let n=L.get(e);n||L.set(e,n=new Map);let i=n.get(o);i||n.set(o,i=S());z(i,"production"!==process.env.NODE_ENV?{effect:j,target:e,type:t,key:o}:void 0)}}function z(e,t){let o=!1;O<=30?_(e)||(e.n|=C,o=!A(e)):o=!e.has(j),o&&(e.add(j),j.deps.push(e),"production"!==process.env.NODE_ENV&&j.onTrack&&j.onTrack(i({effect:j},t)))}function V(e,t,o,n,i,r){const a=L.get(e);if(!a)return;let c=[];if("clear"===t)c=[...a.values()];else if("length"===o&&l(e)){const e=Number(n);a.forEach(((t,o)=>{("length"===o||!d(o)&&o>=e)&&c.push(t)}))}else switch(void 0!==o&&c.push(a.get(o)),t){case"add":l(e)?y(o)&&c.push(a.get("length")):(c.push(a.get(N)),s(e)&&c.push(a.get(T)));break;case"delete":l(e)||(c.push(a.get(N)),s(e)&&c.push(a.get(T)));break;case"set":s(e)&&c.push(a.get(N))}const u="production"!==process.env.NODE_ENV?{target:e,type:t,key:o,newValue:n,oldValue:i,oldTarget:r}:void 0;if(1===c.length)c[0]&&("production"!==process.env.NODE_ENV?R(c[0],u):R(c[0]));else{const e=[];for(const t of c)t&&e.push(...t);"production"!==process.env.NODE_ENV?R(S(e),u):R(S(e))}}function R(e,t){const o=l(e)?e:[...e];for(const e of o)e.computed&&P(e,t);for(const e of o)e.computed||P(e,t)}function P(e,t){(e!==j||e.allowRecurse)&&("production"!==process.env.NODE_ENV&&e.onTrigger&&e.onTrigger(i({effect:e},t)),e.scheduler?e.scheduler():e.run())}const W=o("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(d)),G=U();function U(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const o=je(this);for(let e=0,t=this.length;e<t;e++)D(o,"get",e+"");const n=o[t](...e);return-1===n||!1===n?o[t](...e.map(je)):n}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){I();const o=je(this)[t].apply(this,e);return E(),o}})),e}function Y(e){const t=je(this);return D(t,"has",e),t.hasOwnProperty(e)}class K{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,o){const n=this._isReadonly,i=this._shallow;if("__v_isReactive"===t)return!n;if("__v_isReadonly"===t)return n;if("__v_isShallow"===t)return i;if("__v_raw"===t&&o===(n?i?Se:we:i?xe:ve).get(e))return e;const r=l(e);if(!n){if(r&&a(G,t))return Reflect.get(G,t,o);if("hasOwnProperty"===t)return Y}const s=Reflect.get(e,t,o);return(d(t)?H.has(t):W(t))?s:(n||D(e,"get",t),i?s:Fe(s)?r&&y(t)?s:s.value:h(s)?n?_e(s):Ae(s):s)}}class B extends K{constructor(e=!1){super(!1,e)}set(e,t,o,n){let i=e[t];if(Oe(i)&&Fe(i)&&!Fe(o))return!1;if(!this._shallow&&(Ce(o)||Oe(o)||(i=je(i),o=je(o)),!l(e)&&Fe(i)&&!Fe(o)))return i.value=o,!0;const r=l(e)&&y(t)?Number(t)<e.length:a(e,t),s=Reflect.set(e,t,o,n);return e===je(n)&&(r?b(o,i)&&V(e,"set",t,o,i):V(e,"add",t,o)),s}deleteProperty(e,t){const o=a(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&o&&V(e,"delete",t,void 0,n),i}has(e,t){const o=Reflect.has(e,t);return d(t)&&H.has(t)||D(e,"has",t),o}ownKeys(e){return D(e,"iterate",l(e)?"length":N),Reflect.ownKeys(e)}}class q extends K{constructor(e=!1){super(!0,e)}set(e,t){return"production"!==process.env.NODE_ENV&&w(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return"production"!==process.env.NODE_ENV&&w(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}}const Q=new B,Z=new q,X=e=>e,J=e=>Reflect.getPrototypeOf(e);function ee(e,t,o=!1,n=!1){const i=je(e=e.__v_raw),r=je(t);o||(b(t,r)&&D(i,"get",t),D(i,"get",r));const{has:a}=J(i),l=n?X:o?Te:Ne;return a.call(i,t)?l(e.get(t)):a.call(i,r)?l(e.get(r)):void(e!==i&&e.get(t))}function te(e,t=!1){const o=this.__v_raw,n=je(o),i=je(e);return t||(b(e,i)&&D(n,"has",e),D(n,"has",i)),e===i?o.has(e):o.has(e)||o.has(i)}function oe(e,t=!1){return e=e.__v_raw,!t&&D(je(e),"iterate",N),Reflect.get(e,"size",e)}function ne(e){e=je(e);const t=je(this);return J(t).has.call(t,e)||(t.add(e),V(t,"add",e,e)),this}function ie(e,t){t=je(t);const o=je(this),{has:n,get:i}=J(o);let r=n.call(o,e);r?"production"!==process.env.NODE_ENV&&be(o,n,e):(e=je(e),r=n.call(o,e));const a=i.call(o,e);return o.set(e,t),r?b(t,a)&&V(o,"set",e,t,a):V(o,"add",e,t),this}function re(e){const t=je(this),{has:o,get:n}=J(t);let i=o.call(t,e);i?"production"!==process.env.NODE_ENV&&be(t,o,e):(e=je(e),i=o.call(t,e));const r=n?n.call(t,e):void 0,a=t.delete(e);return i&&V(t,"delete",e,void 0,r),a}function ae(){const e=je(this),t=0!==e.size,o="production"!==process.env.NODE_ENV?s(e)?new Map(e):new Set(e):void 0,n=e.clear();return t&&V(e,"clear",void 0,void 0,o),n}function le(e,t){return function(o,n){const i=this,r=i.__v_raw,a=je(r),l=t?X:e?Te:Ne;return!e&&D(a,"iterate",N),r.forEach(((e,t)=>o.call(n,l(e),l(t),i)))}}function se(e,t,o){return function(...n){const i=this.__v_raw,r=je(i),a=s(r),l="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,u=i[e](...n),d=o?X:t?Te:Ne;return!t&&D(r,"iterate",c?T:N),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:l?[d(e[0]),d(e[1])]:d(e),done:t}},[Symbol.iterator](){return this}}}}function ce(e){return function(...t){if("production"!==process.env.NODE_ENV){const o=t[0]?`on key "${t[0]}" `:"";console.warn(`${g(e)} operation ${o}failed: target is readonly.`,je(this))}return"delete"!==e&&this}}function ue(){const e={get(e){return ee(this,e)},get size(){return oe(this)},has:te,add:ne,set:ie,delete:re,clear:ae,forEach:le(!1,!1)},t={get(e){return ee(this,e,!1,!0)},get size(){return oe(this)},has:te,add:ne,set:ie,delete:re,clear:ae,forEach:le(!1,!0)},o={get(e){return ee(this,e,!0)},get size(){return oe(this,!0)},has(e){return te.call(this,e,!0)},add:ce("add"),set:ce("set"),delete:ce("delete"),clear:ce("clear"),forEach:le(!0,!1)},n={get(e){return ee(this,e,!0,!0)},get size(){return oe(this,!0)},has(e){return te.call(this,e,!0)},add:ce("add"),set:ce("set"),delete:ce("delete"),clear:ce("clear"),forEach:le(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=se(i,!1,!1),o[i]=se(i,!0,!1),t[i]=se(i,!1,!0),n[i]=se(i,!0,!0)})),[e,o,t,n]}const[de,he,fe,pe]=ue();function me(e,t){const o=t?e?pe:fe:e?he:de;return(t,n,i)=>"__v_isReactive"===n?!e:"__v_isReadonly"===n?e:"__v_raw"===n?t:Reflect.get(a(o,n)&&n in t?o:t,n,i)}const ye={get:me(!1,!1)},ge={get:me(!0,!1)};function be(e,t,o){const n=je(o);if(n!==o&&t.call(e,n)){const t=m(e);console.warn(`Reactive ${t} contains both the raw and reactive versions of the same object${"Map"===t?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ve=new WeakMap,xe=new WeakMap,we=new WeakMap,Se=new WeakMap;function Ae(e){return Oe(e)?e:Le(e,!1,Q,ye,ve)}function _e(e){return Le(e,!0,Z,ge,we)}function Le(e,t,o,n,i){if(!h(e))return"production"!==process.env.NODE_ENV&&console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const a=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(m(l));var l;if(0===a)return e;const s=new Proxy(e,2===a?n:o);return i.set(e,s),s}function Oe(e){return!(!e||!e.__v_isReadonly)}function Ce(e){return!(!e||!e.__v_isShallow)}function je(e){const t=e&&e.__v_raw;return t?je(t):e}const Ne=e=>h(e)?Ae(e):e,Te=e=>h(e)?_e(e):e;function Me(e){F&&j&&(e=je(e),"production"!==process.env.NODE_ENV?z(e.dep||(e.dep=S()),{target:e,type:"get",key:"value"}):z(e.dep||(e.dep=S())))}function ke(e,t){const o=(e=je(e)).dep;o&&("production"!==process.env.NODE_ENV?R(o,{target:e,type:"set",key:"value",newValue:t}):R(o))}function Fe(e){return!(!e||!0!==e.__v_isRef)}function $e(e){return function(e,t){if(Fe(e))return e;return new Ie(e,t)}(e,!1)}class Ie{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:je(e),this._value=t?e:Ne(e)}get value(){return Me(this),this._value}set value(e){const t=this.__v_isShallow||Ce(e)||Oe(e);e=t?e:je(e),b(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ne(e),ke(this,e))}}function Ee(e){return Fe(e)?e.value:e}class De{constructor(e,t,o,n){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new M(e,(()=>{this._dirty||(this._dirty=!0,ke(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=o}get value(){const e=je(this);return Me(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const ze=[];function Ve(e,...t){if("production"===process.env.NODE_ENV)return;I();const o=ze.length?ze[ze.length-1].component:null,n=o&&o.appContext.config.warnHandler,i=function(){let e=ze[ze.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}();if(n)He(n,o,11,[e+t.join(""),o&&o.proxy,i.map((({vnode:e})=>`at <${mt(o,e.type)}>`)).join("\n"),i]);else{const o=[`[Vue warn]: ${e}`,...t];i.length&&o.push("\n",...function(e){const t=[];return e.forEach(((e,o)=>{t.push(...0===o?[]:["\n"],...function({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",n=!!e.component&&null==e.component.parent,i=` at <${mt(e.component,e.type,n)}`,r=">"+o;return e.props?[i,...Re(e.props),r]:[i+r]}(e))})),t}(i)),console.warn(...o)}E()}function Re(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach((o=>{t.push(...Pe(o,e[o]))})),o.length>3&&t.push(" ..."),t}function Pe(e,t,o){return u(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?o?t:[`${e}=${t}`]:Fe(t)?(t=Pe(e,je(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):c(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=je(t),o?t:[`${e}=`,t])}const We={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function He(e,t,o,n){let i;try{i=n?e(...n):e()}catch(e){!function(e,t,o,n=!0){const i=t?t.vnode:null;if(t){let n=t.parent;const i=t.proxy,r="production"!==process.env.NODE_ENV?We[o]:o;for(;n;){const t=n.ec;if(t)for(let o=0;o<t.length;o++)if(!1===t[o](e,i,r))return;n=n.parent}const a=t.appContext.config.errorHandler;if(a)return void He(a,null,10,[e,i,r])}!function(e,t,o,n=!0){if("production"!==process.env.NODE_ENV){const r=We[t];if(o&&(i=o,ze.push(i)),Ve("Unhandled error"+(r?` during execution of ${r}`:"")),o&&ze.pop(),n)throw e;console.error(e)}else console.error(e);var i}(e,o,i,n)}(e,t,o)}return i}let Ge=!1,Ue=!1;const Ye=[];let Ke=0;const Be=[];let qe=null,Qe=0;const Ze=Promise.resolve();function Xe(e){Ye.length&&Ye.includes(e,Ge&&e.allowRecurse?Ke+1:Ke)||(null==e.id?Ye.push(e):Ye.splice(function(e){let t=Ke+1,o=Ye.length;for(;t<o;){const n=t+o>>>1,i=Ye[n],r=et(i);r<e||r===e&&i.pre?t=n+1:o=n}return t}(e.id),0,e),Je())}function Je(){Ge||Ue||(Ue=!0,Ze.then(ot))}const et=e=>null==e.id?1/0:e.id,tt=(e,t)=>{const o=et(e)-et(t);if(0===o){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function ot(e){Ue=!1,Ge=!0,"production"!==process.env.NODE_ENV&&(e=e||new Map),Ye.sort(tt);const t="production"!==process.env.NODE_ENV?t=>nt(e,t):n;try{for(Ke=0;Ke<Ye.length;Ke++){const e=Ye[Ke];if(e&&!1!==e.active){if("production"!==process.env.NODE_ENV&&t(e))continue;He(e,null,14)}}}finally{Ke=0,Ye.length=0,function(e){if(Be.length){const t=[...new Set(Be)];if(Be.length=0,qe)return void qe.push(...t);for(qe=t,"production"!==process.env.NODE_ENV&&(e=e||new Map),qe.sort(((e,t)=>et(e)-et(t))),Qe=0;Qe<qe.length;Qe++)"production"!==process.env.NODE_ENV&&nt(e,qe[Qe])||qe[Qe]();qe=null,Qe=0}}(e),Ge=!1,(Ye.length||Be.length)&&ot(e)}}function nt(e,t){if(e.has(t)){const o=e.get(t);if(o>100){const e=t.ownerInstance,o=e&&pt(e.type);return Ve(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}e.set(t,o+1)}else e.set(t,1)}const it=new Set;"production"!==process.env.NODE_ENV&&(x().__VUE_HMR_RUNTIME__={createRecord:st((function(e,t){if(rt.has(e))return!1;return rt.set(e,{initialDef:at(t),instances:new Set}),!0})),rerender:st((function(e,t){const o=rt.get(e);if(!o)return;o.initialDef.render=t,[...o.instances].forEach((e=>{t&&(e.render=t,at(e.type).render=t),e.renderCache=[],e.update()}))})),reload:st((function(e,t){const o=rt.get(e);if(!o)return;t=at(t),lt(o.initialDef,t);const n=[...o.instances];for(const e of n){const n=at(e.type);it.has(n)||(n!==o.initialDef&&lt(n,t),it.add(n)),e.appContext.propsCache.delete(e.type),e.appContext.emitsCache.delete(e.type),e.appContext.optionsCache.delete(e.type),e.ceReload?(it.add(n),e.ceReload(t.styles),it.delete(n)):e.parent?Xe(e.parent.update):e.appContext.reload?e.appContext.reload():"undefined"!=typeof window?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}i=()=>{for(const e of n)it.delete(at(e.type))},l(i)?Be.push(...i):qe&&qe.includes(i,i.allowRecurse?Qe+1:Qe)||Be.push(i),Je();var i}))});const rt=new Map;function at(e){return c(t=e)&&"__vccOpts"in t?e.__vccOpts:e;var t}function lt(e,t){i(e,t);for(const o in e)"__file"===o||o in t||delete e[o]}function st(e){return(t,o)=>{try{return e(t,o)}catch(e){console.error(e),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}const ct={};let ut;"production"!==process.env.NODE_ENV&&(ct.ownKeys=e=>(Ve("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));let dt="__VUE_INSTANCE_SETTERS__";(ut=x()[dt])||(ut=x()[dt]=[]),ut.push((e=>e));const ht=/(?:^|[-_])(\w)/g,ft=e=>e.replace(ht,(e=>e.toUpperCase())).replace(/[-_]/g,"");function pt(e,t=!0){return c(e)?e.displayName||e.name:e.name||t&&e.__name}function mt(e,t,o=!1){let n=pt(t);if(!n&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(n=e[1])}if(!n&&e&&e.parent){const o=e=>{for(const o in e)if(e[o]===t)return o};n=o(e.components||e.parent.type.components)||o(e.appContext.components)}return n?ft(n):o?"App":"Anonymous"}const yt=(e,t)=>function(e,t,o=!1){let i,r;const a=c(e);return a?(i=e,r="production"!==process.env.NODE_ENV?()=>{console.warn("Write operation failed: computed value is readonly")}:n):(i=e.get,r=e.set),new De(i,r,a||!r,o)}(e,0,false);function gt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bt,vt={exports:{}};function xt(){return bt||(bt=1,vt.exports=function(){var e=1e3,t=6e4,o=36e5,n="millisecond",i="second",r="minute",a="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],o=e%100;return"["+e+(t[(o-20)%10]||t[o]||t[0])+"]"}},g=function(e,t,o){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(o)+e},b={s:g,z:function(e){var t=-e.utcOffset(),o=Math.abs(t),n=Math.floor(o/60),i=o%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(i,2,"0")},m:function e(t,o){if(t.date()<o.date())return-e(o,t);var n=12*(o.year()-t.year())+(o.month()-t.month()),i=t.clone().add(n,c),r=o-i<0,a=t.clone().add(n+(r?-1:1),c);return+(-(n+(o-i)/(r?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:s,d:l,D:h,h:a,m:r,s:i,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",x={};x[v]=y;var w="$isDayjsObject",S=function(e){return e instanceof O||!(!e||!e[w])},A=function e(t,o,n){var i;if(!t)return v;if("string"==typeof t){var r=t.toLowerCase();x[r]&&(i=r),o&&(x[r]=o,i=r);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var l=t.name;x[l]=t,i=l}return!n&&i&&(v=i),i||!n&&v},_=function(e,t){if(S(e))return e.clone();var o="object"==typeof t?t:{};return o.date=e,o.args=arguments,new O(o)},L=b;L.l=A,L.i=S,L.w=function(e,t){return _(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function y(e){this.$L=A(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=y.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,o=e.utc;if(null===t)return new Date(NaN);if(L.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,r=(n[7]||"0").substring(0,3);return o?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return L},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(e,t){var o=_(e);return this.startOf(t)<=o&&o<=this.endOf(t)},g.isAfter=function(e,t){return _(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<_(e)},g.$g=function(e,t,o){return L.u(e)?this[t]:this.set(o,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var o=this,n=!!L.u(t)||t,u=L.p(e),f=function(e,t){var i=L.w(o.$u?Date.UTC(o.$y,t,e):new Date(o.$y,t,e),o);return n?i:i.endOf(l)},p=function(e,t){return L.w(o.toDate()[e].apply(o.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),o)},m=this.$W,y=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case d:return n?f(1,0):f(31,11);case c:return n?f(1,y):f(0,y+1);case s:var v=this.$locale().weekStart||0,x=(m<v?m+7:m)-v;return f(n?g-x:g+(6-x),y);case l:case h:return p(b+"Hours",0);case a:return p(b+"Minutes",1);case r:return p(b+"Seconds",2);case i:return p(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var o,s=L.p(e),u="set"+(this.$u?"UTC":""),f=(o={},o[l]=u+"Date",o[h]=u+"Date",o[c]=u+"Month",o[d]=u+"FullYear",o[a]=u+"Hours",o[r]=u+"Minutes",o[i]=u+"Seconds",o[n]=u+"Milliseconds",o)[s],p=s===l?this.$D+(t-this.$W):t;if(s===c||s===d){var m=this.clone().set(h,1);m.$d[f](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[L.p(e)]()},g.add=function(n,u){var h,f=this;n=Number(n);var p=L.p(u),m=function(e){var t=_(f);return L.w(t.date(t.date()+Math.round(e*n)),f)};if(p===c)return this.set(c,this.$M+n);if(p===d)return this.set(d,this.$y+n);if(p===l)return m(1);if(p===s)return m(7);var y=(h={},h[r]=t,h[a]=o,h[i]=e,h)[p]||1,g=this.$d.getTime()+n*y;return L.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,o=this.$locale();if(!this.isValid())return o.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=L.z(this),r=this.$H,a=this.$m,l=this.$M,s=o.weekdays,c=o.months,u=o.meridiem,d=function(e,o,i,r){return e&&(e[o]||e(t,n))||i[o].slice(0,r)},h=function(e){return L.s(r%12||12,e,"0")},p=u||function(e,t,o){var n=e<12?"AM":"PM";return o?n.toLowerCase():n};return n.replace(m,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return L.s(t.$y,4,"0");case"M":return l+1;case"MM":return L.s(l+1,2,"0");case"MMM":return d(o.monthsShort,l,c,3);case"MMMM":return d(c,l);case"D":return t.$D;case"DD":return L.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(o.weekdaysMin,t.$W,s,2);case"ddd":return d(o.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(r);case"HH":return L.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return p(r,a,!0);case"A":return p(r,a,!1);case"m":return String(a);case"mm":return L.s(a,2,"0");case"s":return String(t.$s);case"ss":return L.s(t.$s,2,"0");case"SSS":return L.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,h,f){var p,m=this,y=L.p(h),g=_(n),b=(g.utcOffset()-this.utcOffset())*t,v=this-g,x=function(){return L.m(m,g)};switch(y){case d:p=x()/12;break;case c:p=x();break;case u:p=x()/3;break;case s:p=(v-b)/6048e5;break;case l:p=(v-b)/864e5;break;case a:p=v/o;break;case r:p=v/t;break;case i:p=v/e;break;default:p=v}return f?p:L.a(p)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return x[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var o=this.clone(),n=A(e,t,!0);return n&&(o.$L=n),o},g.clone=function(){return L.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},y}(),C=O.prototype;return _.prototype=C,[["$ms",n],["$s",i],["$m",r],["$H",a],["$W",l],["$M",c],["$y",d],["$D",h]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),_.extend=function(e,t){return e.$i||(e(t,O,_),e.$i=!0),_},_.locale=A,_.isDayjs=S,_.unix=function(e){return _(1e3*e)},_.en=x[v],_.Ls=x,_.p={},_}()),vt.exports}var wt=gt(xt()),St="object"==typeof global&&global&&global.Object===Object&&global,At="object"==typeof self&&self&&self.Object===Object&&self,_t=St||At||Function("return this")(),Lt=_t.Symbol,Ot=Object.prototype,Ct=Ot.hasOwnProperty,jt=Ot.toString,Nt=Lt?Lt.toStringTag:void 0;var Tt=Object.prototype.toString;var Mt=Lt?Lt.toStringTag:void 0;function kt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Mt&&Mt in Object(e)?function(e){var t=Ct.call(e,Nt),o=e[Nt];try{e[Nt]=void 0;var n=!0}catch(e){}var i=jt.call(e);return n&&(t?e[Nt]=o:delete e[Nt]),i}(e):function(e){return Tt.call(e)}(e)}function Ft(e){return null!=e&&"object"==typeof e}var $t=Array.isArray;function It(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Et(e){if(!It(e))return!1;var t=kt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Dt,zt=_t["__core-js_shared__"],Vt=(Dt=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+Dt:"";var Rt=Function.prototype.toString;function Pt(e){if(null!=e){try{return Rt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Wt=/^\[object .+?Constructor\]$/,Ht=Function.prototype,Gt=Object.prototype,Ut=Ht.toString,Yt=Gt.hasOwnProperty,Kt=RegExp("^"+Ut.call(Yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bt(e){return!(!It(e)||(t=e,Vt&&Vt in t))&&(Et(e)?Kt:Wt).test(Pt(e));var t}function qt(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return Bt(o)?o:void 0}var Qt=qt(_t,"WeakMap"),Zt=Object.create,Xt=function(){function e(){}return function(t){if(!It(t))return{};if(Zt)return Zt(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}(),Jt=function(){try{var e=qt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var eo=/^(?:0|[1-9]\d*)$/;function to(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&eo.test(e))&&e>-1&&e%1==0&&e<t}function oo(e,t){return e===t||e!=e&&t!=t}var no=Object.prototype.hasOwnProperty;function io(e,t,o){var n=e[t];no.call(e,t)&&oo(n,o)&&(void 0!==o||t in e)||function(e,t,o){"__proto__"==t&&Jt?Jt(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}(e,t,o)}function ro(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ao=Object.prototype;function lo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ao)}function so(e){return Ft(e)&&"[object Arguments]"==kt(e)}var co=Object.prototype,uo=co.hasOwnProperty,ho=co.propertyIsEnumerable,fo=so(function(){return arguments}())?so:function(e){return Ft(e)&&uo.call(e,"callee")&&!ho.call(e,"callee")};var po="object"==typeof exports&&exports&&!exports.nodeType&&exports,mo=po&&"object"==typeof module&&module&&!module.nodeType&&module,yo=mo&&mo.exports===po?_t.Buffer:void 0,go=(yo?yo.isBuffer:void 0)||function(){return!1},bo={};function vo(e){return function(t){return e(t)}}bo["[object Float32Array]"]=bo["[object Float64Array]"]=bo["[object Int8Array]"]=bo["[object Int16Array]"]=bo["[object Int32Array]"]=bo["[object Uint8Array]"]=bo["[object Uint8ClampedArray]"]=bo["[object Uint16Array]"]=bo["[object Uint32Array]"]=!0,bo["[object Arguments]"]=bo["[object Array]"]=bo["[object ArrayBuffer]"]=bo["[object Boolean]"]=bo["[object DataView]"]=bo["[object Date]"]=bo["[object Error]"]=bo["[object Function]"]=bo["[object Map]"]=bo["[object Number]"]=bo["[object Object]"]=bo["[object RegExp]"]=bo["[object Set]"]=bo["[object String]"]=bo["[object WeakMap]"]=!1;var xo="object"==typeof exports&&exports&&!exports.nodeType&&exports,wo=xo&&"object"==typeof module&&module&&!module.nodeType&&module,So=wo&&wo.exports===xo&&St.process,Ao=function(){try{var e=wo&&wo.require&&wo.require("util").types;return e||So&&So.binding&&So.binding("util")}catch(e){}}(),_o=Ao&&Ao.isTypedArray,Lo=_o?vo(_o):function(e){return Ft(e)&&ro(e.length)&&!!bo[kt(e)]},Oo=Object.prototype.hasOwnProperty;function Co(e,t){var o=$t(e),n=!o&&fo(e),i=!o&&!n&&go(e),r=!o&&!n&&!i&&Lo(e),a=o||n||i||r,l=a?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],s=l.length;for(var c in e)!Oo.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||to(c,s))||l.push(c);return l}function jo(e,t){return function(o){return e(t(o))}}var No=jo(Object.keys,Object),To=Object.prototype.hasOwnProperty;function Mo(e){return null!=(t=e)&&ro(t.length)&&!Et(t)?Co(e):function(e){if(!lo(e))return No(e);var t=[];for(var o in Object(e))To.call(e,o)&&"constructor"!=o&&t.push(o);return t}(e);var t}var ko=qt(Object,"create");var Fo=Object.prototype.hasOwnProperty;var $o=Object.prototype.hasOwnProperty;function Io(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Eo(e,t){for(var o=e.length;o--;)if(oo(e[o][0],t))return o;return-1}Io.prototype.clear=function(){this.__data__=ko?ko(null):{},this.size=0},Io.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Io.prototype.get=function(e){var t=this.__data__;if(ko){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return Fo.call(t,e)?t[e]:void 0},Io.prototype.has=function(e){var t=this.__data__;return ko?void 0!==t[e]:$o.call(t,e)},Io.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ko&&void 0===t?"__lodash_hash_undefined__":t,this};var Do=Array.prototype.splice;function zo(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}zo.prototype.clear=function(){this.__data__=[],this.size=0},zo.prototype.delete=function(e){var t=this.__data__,o=Eo(t,e);return!(o<0)&&(o==t.length-1?t.pop():Do.call(t,o,1),--this.size,!0)},zo.prototype.get=function(e){var t=this.__data__,o=Eo(t,e);return o<0?void 0:t[o][1]},zo.prototype.has=function(e){return Eo(this.__data__,e)>-1},zo.prototype.set=function(e,t){var o=this.__data__,n=Eo(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};var Vo=qt(_t,"Map");function Ro(e,t){var o,n,i=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?i["string"==typeof t?"string":"hash"]:i.map}function Po(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}Po.prototype.clear=function(){this.size=0,this.__data__={hash:new Io,map:new(Vo||zo),string:new Io}},Po.prototype.delete=function(e){var t=Ro(this,e).delete(e);return this.size-=t?1:0,t},Po.prototype.get=function(e){return Ro(this,e).get(e)},Po.prototype.has=function(e){return Ro(this,e).has(e)},Po.prototype.set=function(e,t){var o=Ro(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this};var Wo=jo(Object.getPrototypeOf,Object);function Ho(e){var t=this.__data__=new zo(e);this.size=t.size}Ho.prototype.clear=function(){this.__data__=new zo,this.size=0},Ho.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},Ho.prototype.get=function(e){return this.__data__.get(e)},Ho.prototype.has=function(e){return this.__data__.has(e)},Ho.prototype.set=function(e,t){var o=this.__data__;if(o instanceof zo){var n=o.__data__;if(!Vo||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new Po(n)}return o.set(e,t),this.size=o.size,this};var Go=Object.prototype.propertyIsEnumerable,Uo=Object.getOwnPropertySymbols,Yo=Uo?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var o=-1,n=null==e?0:e.length,i=0,r=[];++o<n;){var a=e[o];t(a,o,e)&&(r[i++]=a)}return r}(Uo(e),(function(t){return Go.call(e,t)})))}:function(){return[]};function Ko(e){return function(e,t,o){var n=t(e);return $t(e)?n:function(e,t){for(var o=-1,n=t.length,i=e.length;++o<n;)e[i+o]=t[o];return e}(n,o(e))}(e,Mo,Yo)}var Bo=qt(_t,"DataView"),qo=qt(_t,"Promise"),Qo=qt(_t,"Set"),Zo="[object Map]",Xo="[object Promise]",Jo="[object Set]",en="[object WeakMap]",tn="[object DataView]",on=Pt(Bo),nn=Pt(Vo),rn=Pt(qo),an=Pt(Qo),ln=Pt(Qt),sn=kt;(Bo&&sn(new Bo(new ArrayBuffer(1)))!=tn||Vo&&sn(new Vo)!=Zo||qo&&sn(qo.resolve())!=Xo||Qo&&sn(new Qo)!=Jo||Qt&&sn(new Qt)!=en)&&(sn=function(e){var t=kt(e),o="[object Object]"==t?e.constructor:void 0,n=o?Pt(o):"";if(n)switch(n){case on:return tn;case nn:return Zo;case rn:return Xo;case an:return Jo;case ln:return en}return t});var cn=Object.prototype.hasOwnProperty;var un=_t.Uint8Array;function dn(e){var t=new e.constructor(e.byteLength);return new un(t).set(new un(e)),t}var hn=/\w*$/;var fn=Lt?Lt.prototype:void 0,pn=fn?fn.valueOf:void 0;function mn(e,t,o){var n,i,r,a,l,s=e.constructor;switch(t){case"[object ArrayBuffer]":return dn(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return l=dn((a=e).buffer),new a.constructor(l,a.byteOffset,a.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e){var t=dn(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(e);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(r=new(i=e).constructor(i.source,hn.exec(i))).lastIndex=i.lastIndex,r;case"[object Symbol]":return n=e,pn?Object(pn.call(n)):{}}}var yn=Ao&&Ao.isMap,gn=yn?vo(yn):function(e){return Ft(e)&&"[object Map]"==sn(e)};var bn=Ao&&Ao.isSet,vn=bn?vo(bn):function(e){return Ft(e)&&"[object Set]"==sn(e)},xn="[object Arguments]",wn="[object Function]",Sn="[object Object]",An={};function _n(e,t,o,n,i,r){var a;if(void 0!==a)return a;if(!It(e))return e;var l=$t(e);if(l)a=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&cn.call(e,"index")&&(o.index=e.index,o.input=e.input),o}(e);else{var s=sn(e),c=s==wn||"[object GeneratorFunction]"==s;if(go(e))return e.slice();if(s==Sn||s==xn||c&&!i)a=c?{}:function(e){return"function"!=typeof e.constructor||lo(e)?{}:Xt(Wo(e))}(e);else{if(!An[s])return i?e:{};a=mn(e,s)}}r||(r=new Ho);var u=r.get(e);if(u)return u;r.set(e,a),vn(e)?e.forEach((function(n){a.add(_n(n,t,o,n,e,r))})):gn(e)&&e.forEach((function(n,i){a.set(i,_n(n,t,o,i,e,r))}));var d=l?void 0:Ko(e);return function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!1!==t(e[o],o,e););}(d||e,(function(n,i){d&&(n=e[i=n]),io(a,i,_n(n,t,o,i,e,r))})),a}An[xn]=An["[object Array]"]=An["[object ArrayBuffer]"]=An["[object DataView]"]=An["[object Boolean]"]=An["[object Date]"]=An["[object Float32Array]"]=An["[object Float64Array]"]=An["[object Int8Array]"]=An["[object Int16Array]"]=An["[object Int32Array]"]=An["[object Map]"]=An["[object Number]"]=An[Sn]=An["[object RegExp]"]=An["[object Set]"]=An["[object String]"]=An["[object Symbol]"]=An["[object Uint8Array]"]=An["[object Uint8ClampedArray]"]=An["[object Uint16Array]"]=An["[object Uint32Array]"]=!0,An["[object Error]"]=An[wn]=An["[object WeakMap]"]=!1;function Ln(e){return _n(e,5)}let On=(e,t)=>()=>{let o="",n=t;for(;n--;)o+=e[Math.random()*e.length|0];return o};const Cn=(e,t)=>{let o=e;const n=/[.*+?^${}()()\-|[\]\\]/,i=Object.assign({dayjs:wt},t);let r="";const a=[];for(const e in i){let t=e;n.test(e)&&(t=On("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",6)(),o=o.split(e).join(t)),r+=`${t},`,a.push(i[e])}r=r.replace(/,$/,"");const l=`function (${r}){return ${o}}`;let s;try{s=Function(`"use strict";return (${l})`)()(...a)}catch(t){return e}return s},jn=(e="",{textData:t,codeData:o}={},{useNewline:n=!1,useSpace:i=!1}={})=>{const r=In,a=$n,l=window.config||{},s=Object.assign(Object.assign({},l),t),c=String(e||"").match(/\{(.+?)\}/g);if(null==c||0===c.length)return e;for(let t=0;t<c.length;t++){const n=c[t];let i=n.slice(1,-1).trim();const r=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,a=i.match(r);for(let e=0;e<a.length;e++){const t=a[e],o=s[t];null!=o&&"function"!=typeof o&&(i=i.replace(t,o))}(/\(.*\)/g.test(i)||/[+/\\*]/g.test(i))&&(i=Cn(i,o)),e=e.replace(n,i)}return n&&(e=null==e?void 0:e.replace(/\n|\\n/g,"<br/>")),i&&(e=null==e?void 0:e.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),e=(e=e.replace(/Qfw\((.*?)\)/g,((e,t)=>r(t)))).replace(/QwfFixed\((.*?)\)/g,((e,t)=>a(t)))},Nn=(e,t)=>{if("string"==typeof e&&"string"==typeof t)return e.toLocaleLowerCase().includes(t.toLocaleLowerCase());if("string"==typeof e&&Array.isArray(t)){const o=t.length;for(let n=0;n<o;n++){const o=t[n];if("string"==typeof o&&e.toLocaleLowerCase().includes(o.toLocaleLowerCase()))return!0}}return!1},Tn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Mn=e=>{const t=[];for(const o of e)o.conditions?t.push(...Mn(o.conditions)):"component"===(null==o?void 0:o.dataType)&&t.push(o);return t};const kn=(e="",t)=>{var o;const n=e.match(/\{(.+?)\}/g),i=(null===(o=e.split("\n"))||void 0===o?void 0:o.length)-1;let r="";if(i)for(let e=0;e<i;e++)r+="\n";let a=e;if(null==n?void 0:n.length){for(const e of n){const o=jn(e,{textData:t},{useNewline:!1,useSpace:!1});o&&(a=a.replace(e,o))}return`${r}{text|${a}}`}return e};function Fn(e){return t(this,arguments,void 0,(function*({graphicConfig:e,request:t,INDICATOR_URL:o="",PAGE_ID:n,dataSourceId:i}){var r;try{const{leftAxisList:a=[],rightAxisList:l=[],queryColumnList:s=[],indicators:c=[]}=Ee(e),u=[...a,...l,...s,...c],d={};for(const e of u){const{indexCode:t="",parentId:o=""}=e;!o||Tn(e,"calcType")||d[o]||(d[o]=t)}if(null===(r=Object.keys(d))||void 0===r?void 0:r.length){const e=[];for(const r in d)e.push(new Promise(((e,a)=>{t.post(`${o}/diagram/hrpIndexWithComplex`,{pageId:n,indexGuid:r,indexCode:d[r],dataSourceId:i}).then((t=>{var o;const{success:n,data:i=[]}=t.data;n&&(null===(o=null==i?void 0:i.dataViewColumns)||void 0===o?void 0:o.length)?e(i.dataViewColumns):a(i)})).catch((e=>{console.error(e),a(e)}))})));const r=yield Promise.all(e);return r.reduce(((e,t)=>e.filter((e=>t.find((t=>t.typeGuid===e.typeGuid)))))).filter((e=>e.typeGuid))}}catch(e){console.error(e)}return[]}))}function $n(e){return Number(e).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}function In(e){return Number(e).toLocaleString()}const En=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];let Dn=new Map,zn=[];const Vn=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"],Rn=e=>Dn.get(e),Pn=(e,t)=>{if(t)Tn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),Tn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),Tn(e,"dataType")&&delete e.dataType,e.fieldValue||delete e.fieldValue;else{const{calcWays:t=[],dateCalcTypes:o=[],activeKey:n,componentId:i=""}=e;if(5===n&&(null==t?void 0:t.length)&&(null==o?void 0:o.length)&&i){const n=t[0].split("-");(null==n?void 0:n.length)>1&&"rangeValue"===n[0]&&(e.calcWays=((e,t={})=>{const{around:o,unit:n,id:i}=e;let r="";const{pageMode:a="",componentList:l=[]}=(null==t?void 0:t.graphicConfig)||{};let s=null,c=null;if("design"===a){const e=null==l?void 0:l.find((e=>e.id===i));if(!e)return[];const{interval:t,intervalUnit:o,startTime:n,endTime:r,operate:a,useCurrentTime:u}=e||{};if(u&&(s=wt().subtract(t,o),c=wt()),n&&(s=wt(n)),r&&(c=wt(r)),a){const{type:e,value:t,mode:o}=a;switch(e){case"add":s=s?s.add(t,o):s,c=c?c.add(t,o):c;break;case"minus":s=s?s.subtract(t,o):s,c=c?c.subtract(t,o):c}}}else{const e=Rn(i)||{};Ee(e.startTime)&&(s=wt(Ee(e.startTime))),Ee(e.endTime)&&(c=wt(Ee(e.endTime)))}s&&c&&(r=`${"before"===o?"-":""}${c.diff(s,n.toLowerCase())+1}`);return r?[r]:[]})({around:n[1],unit:o[0],id:i})),delete e.radioValue}if(Tn(e,"dataType")){if("DATE"===e.fieldType&&(e.label=e.fieldName),"component"===e.dataType)if("PARENT"===e.fieldValue){let t=e.modelKey;t&&e.prop&&(t+=`-${e.prop}`),e.fieldValue="${"+t+"}"}else e.fieldValue="${"+Gn(e.componentId,e.fieldValue)+"}";delete e.dataType}Tn(e,"activeKey")&&delete e.activeKey,Tn(e,"radioValue")&&delete e.radioValue,Tn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),Tn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),"component"!==e.dataType&&e.useCurrentTime&&(e.fieldValue=wt().format(e.dateFormat)),Tn(e,"modelKey")&&delete e.modelKey,Tn(e,"prop")&&delete e.prop,delete e.useCurrentTime}},Wn=(e,t)=>{const o=[];return(null==e?void 0:e.length)&&Ln(e).forEach((e=>{if(e.join&&e.conditions){const n=!e.conditions.some((e=>e.join&&e.conditions));e.conditions.forEach(((i,r)=>{Pn(i,t);const a={};if(r<e.conditions.length-1&&(a.join=e.join),n)o.push(Object.assign(Object.assign({},a),i));else if(i.join&&i.conditions){const e=t?"sqlConditions":"conditions";o.push(Object.assign({[e]:Wn([i],t)},a))}else o.push(Object.assign(Object.assign({},a),i))}))}else Pn(e,t),o.push(e)})),o},Hn=(e={},t)=>{if((null==e?void 0:e.sortCpnts)&&t){const o=Qn(e);o&&(t.sort=o)}const{label:o,name:n,location:i,show:r,indexCode:a,indexCodeNum:l,calcType:s="COLUMN",builtInFormula:c,builtInValueSource:u,builtInCalcWay:d,formula:h,conditions:f,aggregate:p,distinct:m,dimByCount:y,dataTo:g,sort:b}=e;let v;if(f&&(v=Wn(f)),"COMPONENT"===s){const e={};return Bn(e,u),{label:o.trim(),columnName:n,show:r,calcType:s,componentAlias:d,componentValue:e.fieldValue||null}}const x={label:o.trim(),columnName:n,location:i,show:r,calcType:"1"===g?"VIEW":s,hrpIndexCode:a,hrpIndexCodeNum:l,aggregate:p,builtInFormula:c,builtInValueSource:u,formula:h,conditions:v};if(b&&(x.sort={columnName:n,label:x.label,order:b,type:"NORMAL"}),"DATE_OFFSET"!==c)return"the_count"===n&&(x.calcType="AGGREGATE",x.distinct=!!m,x.typeGuid=y),Object.assign(Object.assign({},x),{builtInCalcWay:d});{const e=d.split("-");if(3===(null==e?void 0:e.length)){let t=e[0];return"before"===e[2]&&"0"!==e[0]&&(t=`-${e[0]}`),Object.assign(Object.assign({},x),{calcWays:[t],dateCalcTypes:[e[1]]})}}},Gn=(e,t)=>{const o=zn.find((t=>t.id===e)),{keyName:n}=o||{};if(n){const e=/-(startTime|endTime)/g,o=t.match(e);return(null==o?void 0:o.length)?`${n}${o[0]}`:n}return t||""},Un=e=>{if(!e)return[];const t=Ln((null==e?void 0:e.controlList)||[]).filter((e=>"parentCode"!==e.conditionKey)),{classificationList:o=[],rowHeaderList:n=[],dimensionList:i=[],seriesList:r=[],leftAxisList:a=[],rightAxisList:l=[],queryColumnList:s=[],indexLibColumns:c=[],indicators:u=[],specialIndicators:d=[]}=e;Kn(t);const h=[...o,...n,...i,...r,...a,...l,...s,...c,...u,...d],f=[];for(const e of h){const t=Mn((null==e?void 0:e.conditions)||[]);if(null==t?void 0:t.length){const e=t.filter((e=>"component"===(null==e?void 0:e.dataType))).map((e=>{const t={};return(null==e?void 0:e.dateFormat)&&(t.format=e.dateFormat),"PARENT"===e.fieldValue&&(t.id="PARENT",t.keyName=e.modelKey,t.modelKey=e.modelKey,t.prop=e.prop),Object.assign({conditionKey:e.fieldName,conditionLabel:e.fieldName,conditionName:e.fieldName,conditionValueType:e.fieldType,id:e.componentId,keyName:e.fieldValue,rule:e.rule,notGlobal:!0,indexCode:e.indexCode,typeGuid:e.typeGuid,indexCodeNum:e.indexCodeNum},t)}));if(null==e?void 0:e.length)for(const t of e)f.find((e=>e.keyName===t.keyName))||f.push(t)}}const p=f.length,m=t;for(let e=0;e<p;e++){const t=f[e];if("parentCode"===(null==t?void 0:t.conditionKey))continue;const{id:o,keyName:n,prop:i,format:r,modelKey:a,dataType:l="component",customValue:s}=t,c=Gn(o,n),u=Yn(t);Bn(u,o,{prop:i,dateFormat:r,modelKey:a,keyName:c}),""===l&&(u.fieldValue=s||""),m.push(u)}for(let e=m.length-1;e>=0;e--){const t=m[e];if(!t.globalCondition){Mn(m).find((e=>e.alias===t.alias&&e.globalCondition))&&m.splice(e,1)}}return m};function Yn(e){const{id:t,keyName:o,conditionLabel:n,conditionKey:i,conditionValueType:r,prop:a,rule:l="NONE",notGlobal:s=!1,indexCode:c,typeGuid:u,indexCodeNum:d,dataType:h="component",isExtProperty:f}=e,p=Gn(t,o);let m=p||t;m&&a&&(m+=`-${a}`);let y=l;return"NONE"===y&&(y=["startTime","endTime"].includes(a)?"startTime"===a?"GREATER_EQUAL":"LESS_EQUAL":(null==p?void 0:p.includes("startTime"))?"GREATER_EQUAL"===a:(null==p?void 0:p.includes("endTime"))?"LESS_EQUAL"===a:"EQUAL"),"PARENT"===t&&(m=e.modelKey,m&&a&&(m+=`-${a}`),y=l),{rule:y,label:n,fieldName:i,fieldValue:"",valueType:r,alias:m,globalCondition:!s,indexCode:c,typeGuid:u,indexCodeNum:d,dataType:h,isExtProperty:f}}function Kn(e){if(null==e?void 0:e.length)for(const t of e)if(null==t?void 0:t.conditions)Kn(t.conditions);else{const{id:e,keyName:o,prop:n,modelKey:i,format:r,dataType:a="component",customValue:l}=t,s=Gn(e,o),c=Yn(t);Bn(c,e,{prop:n,dateFormat:r,modelKey:i,keyName:s}),""===a&&(c.fieldValue=l||"");for(const e in c)t[e]=c[e];for(const e of Vn)delete t[e]}}function Bn(e,t,o){const{prop:n="",dateFormat:i="",modelKey:r="",keyName:a="",operateValue:l,operateMode:s,operateType:c}=o||{},u=r||a;if("PARENT"===t&&u&&n){const t=window.config.record;let o=n,r=i;const a=n.match(/\{(.+?)\}/g);if(null==a?void 0:a.length){const t=a[0].slice(1,-1).trim();o=n.replace(a[0],""),r=t,e.dateFormat=r}if(t&&t[u]){const n=Ee(t[u][o]);wt.isDayjs(n)?e.fieldValue=n.format(r||"YYYY-MM-DD"):e.fieldValue=n}return}const d=Rn(t)||{},{value:h,format:f="YYYY-MM-DD",type:p="",useCurrentTime:m,RECORD:y}=d||{},g=i||f;if(Nn(p,"date")){let t;if(t=m?h?Ee(h):wt():Ee(h),"string"==typeof t&&(t=wt(t)),l&&s&&c)switch(c){case"add":t=t.add(l,s);break;case"minus":t=t.subtract(l,s)}e.fieldValue=null==t?void 0:t.format(g),e.dateFormat=g}else if(Nn(p,"rangepicker")){let t=n;if(!n){const e=a&&a.split("-");(null==e?void 0:e.length)&&(t=e[e.length-1])}if(!t)return;let o=null;if(Ee(d[t])&&(o=wt(Ee(d[t]))),l&&s&&c)if("rangeValue"===l){if(d.startTime&&d.endTime){const e=Ee(d.endTime).diff(Ee(d.startTime),s)+1;switch(c){case"add":o=o?o.add(e,s):o;break;case"minus":o=o?o.subtract(e,s):o}}}else if(!isNaN(+l))switch(c){case"add":o=o?o.add(l,s):o;break;case"minus":o=o?o.subtract(l,s):o}if(o&&(e.fieldValue=null==o?void 0:o.format(g)),"rangeValue"===t&&d.startTime&&d.endTime){const t=function(e){const t=e.split("-");let o="";if(null==t?void 0:t.length)switch(t[t.length-1]){case"YYYY":o="year";break;case"MM":o="month";break;case"DD":o="day"}return o}(g);t&&(e.fieldValue=Ee(d.endTime).diff(Ee(d.startTime),t)+1)}e.dateFormat=g}else Nn(p,En)?e.fieldValue=r&&y?y[r]:!r&&y?y.value:Ee(h):Nn(p,"select")&&Array.isArray(Ee(h))?e.fieldValue=Ee(h).join(","):e.fieldValue=Ee(h)}const qn=e=>{if(e){const t=Array.isArray(e)?Ln(e):[Ln(e)];let o="",n=[];const i=[],r=[],a=[];for(const e of t){let t=e.label,l=e.columnName;if(e.defaultCode&&(t=e.columnName,delete e.defaultCode),"component-value"===l&&e.componentId){const o=Rn(e.componentId)||{},{value:n}=o;Ee(n)&&(t=l=Ee(n))}o=e.type,"CUSTOM"===o&&(n=e.customOrderColumns),i.push(t),r.push(l),a.push(e.order)}return"CUSTOM"!==o&&(null==i?void 0:i.length)>1&&(o="COMBINATION"),"CUSTOM"===o?{label:i.join(","),columnName:r.join(","),type:o,customOrderColumns:n}:{label:i.join(","),columnName:r.join(","),order:a.join(","),type:o}}return e},Qn=e=>{const{sortCpnts:t=[]}=e;let o,n="";for(const e of t){const t=Rn(e)||{},{type:o,RECORD:i}=t;if(Nn(o,"image")&&Nn(null==i?void 0:i.value,["asc","desc"])){n=i.value.toUpperCase();break}}return n&&(o={label:e.label,columnName:e.name,order:n,type:"NORMAL"}),o},Zn=(t,o={})=>{var n,i,r,a,l,s,c,u;const{graphicConfig:d,type:h,globalModel:f,isGroupTable:p=!1,allComponentList:m}=t;f&&(Dn=f),(null==m?void 0:m.length)&&(zn=m);const y=Nn(h,"pivottable");let g,{source:b,dataViewId:v,plugin:x="1",layer:w,chartType:S,classificationList:A=[],rowHeaderList:_=[],dimensionList:L=[],seriesList:O=[],leftAxisList:C=[],rightAxisList:j=[],queryColumnList:N=[],indexLibColumns:T=[],indicators:M=[],specialIndicators:k=[],controlList:F=[],formFields:$={},variableList:I=[],variableConditions:E=[],dataSourceId:D="",idxLibMode:z,preview:V=!1,edvDataSetId:R,compositeIndicator:P}=d||{},W=[];if("design"===(null==d?void 0:d.pageMode)?(W=(null!==(n=d.sqlConditions)&&void 0!==n?n:[]).map((e=>{const t={};if(Tn(e,"globalCondition")||e.join||(t.globalCondition=!0),!e.join){const o=e.rule||"EQUAL";t.rule="NONE"===o?"EQUAL":o}return Object.assign(Object.assign({},e),t)})),(null==E?void 0:E.length)&&(W=W.concat(E))):(W=Un(d),(null==I?void 0:I.length)&&(W=W.concat(function(e){const t=[];if(null==e?void 0:e.length)for(const o of e)if(o.variableName){const e=Gn(o.id,o.keyName),n={variateName:o.variableName,globalCondition:o.globalCondition||!1,valueType:o.variableType,alias:e||""};Bn(n,o.id,{dateFormat:o.format,prop:o.dateTypeValue,keyName:e,operateType:o.operateType,operateMode:o.operateMode,operateValue:o.operateValue}),""===o.dataType&&(n.fieldValue=o.variableValue),o.format&&(n.dateFormat=o.format),o.label&&(n.label=o.label),t.push(n)}return t}(I)))),null==W?void 0:W.length){const e=W.filter((e=>e.globalCondition)),t=W.filter((e=>!e.globalCondition));(null==e?void 0:e.length)>1&&(W=[{join:"&&",conditions:e},...t])}(null==W?void 0:W.length)&&(W=Wn(W,"1")),null==w&&(w=Nn(h,["table","card"])||Nn(h,["list","circulate"])&&(null==A?void 0:A.length)>1?"1":Nn(h,["select","checkbox","radio","treeSelect"])?"3":Nn(h,["indexPanel"])?"4":"2"),Nn(h,["indexPanel"])&&(x="3");const H=[];let G,U="";if(Array.isArray(A)&&A.length>0&&(!["ecanList","ecanCirculate"].includes(h)||1===(null==A?void 0:A.length))){const e=A.length;for(let t=0;t<e;t++){const o=A[t]||{},{label:n="",name:r="",show:a=!1,sort:l,customGroup:s,conditions:c,dateFormat:u,typeGuid:d="",truncations:f=[],isExtProperty:p}=o;if(a||1===e){U=d,g={label:n.trim(),columnName:r,show:a,sort:Qn(o)||qn(l)||l,customGroup:s,conditions:Wn(c),typeGuid:d},u&&(g.dateFormat=u),"the_date"!==r||g.dateFormat||(g.dateFormat="YYYY-MM-DD"),p&&(g.isExtProperty=p);const e={};if(Array.isArray(f)&&f.length>0){const t=f.length;for(let o=0;o<t;o++){const t=f[o]||{},{rule:n="",num:i=0,name:r=""}=t;n&&i&&(e.num=i,e.rule=n,r&&(e.otherGroupName=r))}}if((null===(i=Object.keys(e))||void 0===i?void 0:i.length)&&(g.truncation=e),!Nn(h,["scatter","valueline"]))break;H.push(g)}}}if(Array.isArray(O)&&O.length>0){const e=O.length;for(let t=0;t<e;t++){const o=O[t]||{},{label:n="",name:i="",show:r=!1,sort:a,customGroup:l,conditions:s,typeGuid:c,dateFormat:u=""}=o;if(r||1===e){G={label:n.trim(),columnName:i,show:r,sort:qn(a),customGroup:l,conditions:Wn(s),typeGuid:c},u?G.dateFormat=u:"the_date"===i&&(G.dateFormat="YYYY-MM-DD");break}}}const Y=[];null==C||C.forEach((e=>{e.location="LEFT",Y.push(Hn(e,g))})),null==j||j.forEach((e=>{e.location="RIGHT",Y.push(Hn(e,g))}));let K=M;(null==o?void 0:o.pivotTableCal)&&(K=(null===(r=o.pivotTableCal)||void 0===r?void 0:r.indicators)||[]),null==K||K.forEach((e=>{e.location="LEFT",Y.push(Hn(e,g))}));const B=[];null==k||k.forEach((e=>{e.location="LEFT",B.push(Hn(e,g))}));const q=[];["ecanList","ecanCirculate"].includes(h)&&(null==A?void 0:A.length)>1&&(N=A),(null==o?void 0:o.pivotTableCal)&&(N=(null===(a=o.pivotTableCal)||void 0===a?void 0:a.dimensions)||[]),null==N||N.forEach((e=>{const{label:t,name:n,location:i,show:r,indexCode:a,sort:l,typeGuid:s,indexCodeNum:c,dateFormat:u,conditions:d,isExtProperty:h,aggregate:f,customGroup:p}=e;let m=qn(l);if(o.sort){const{field:n,order:i}=o.sort;let r=Y.find((e=>e.label===n));r||t!==n||(r=e),r&&(m={columnName:r.columnName,label:o.sort.field,order:i.toUpperCase(),type:"NORMAL"})}const y={label:t,columnName:n,location:i,show:r,sort:m,calcType:"COLUMN",hrpIndexCode:a,hrpIndexCodeNum:c,conditions:Wn(d),typeGuid:s,customGroup:p};u&&(y.dateFormat=u),"the_date"!==n||y.dateFormat||(y.dateFormat="YYYY-MM-DD"),h&&(y.isExtProperty=h),f&&(y.aggregate=f),q.push(y)}));const Q=[];["ecanTable"].includes(h)&&d.isIndexSet&&T.forEach((e=>{const t={label:e.label,calcType:e.calcType,show:e.show};e.formula&&(t.formula=e.formula),Q.push(t)}));let Z=[],X=[];if(Array.isArray(_)&&_.length>0?X=_:Array.isArray(L)&&L.length>0&&(X=L),null==X?void 0:X.length){const e=X.length;for(let t=0;t<e;t++){const e=X[t]||{},{label:n="",name:i="",show:r=!1,sort:a,customGroup:s,conditions:c,truncations:u,typeGuid:d="",dateFormat:h,isExtProperty:f}=e;let p=qn(a);if(o.sort){const{field:t,order:n}=o.sort;let i=Y.find((e=>e.label===t));i||e.label!==t||(i=e),i&&(p={columnName:i.columnName,label:o.sort.field,order:n.toUpperCase(),type:"NORMAL"})}const m={label:n.trim(),columnName:i,show:r,sort:p,customGroup:s,conditions:Wn(c),typeGuid:d};h&&(m.dateFormat=h),"the_date"!==i||m.dateFormat||(m.dateFormat="YYYY-MM-DD"),f&&(m.isExtProperty=f);const y={};if(Array.isArray(u)&&u.length>0){const e=u.length;for(let t=0;t<e;t++){const e=u[t]||{},{rule:o="",num:n=0,name:i=""}=e;o&&n&&(y.num=n,y.rule=o,i&&(y.otherGroupName=i))}}(null===(l=Object.keys(y))||void 0===l?void 0:l.length)&&(m.truncation=y),Z.push(m)}}let J,ee=[];const te=[];if(null==o?void 0:o.pivotTableCal){let t=[];const{calc:n=[],filter:i=[],truncations:r=[],sorts:a=[],aggregateMethod:l=[],rowDimensionKeys:u=[],colDimensionKeys:d=[]}=o.pivotTableCal;if(Y.push(...n),null==i?void 0:i.length){const o=function e(t){const o=[];for(const n of t)n.conditions?o.push(...e(n.conditions)):"the_date"===n.conditionKey&&o.push(n);return o}(F);for(const n of i){const{type:i}=n,r=e(n,["type"]);"indicators"===i?t=Y:"dimension"===i&&(t=q);const a=t.find((e=>e.columnName===n.fieldName&&e.label===n.label));if(a)if("indicators"===i)a.filter={rule:r.rule,fieldValue:r.fieldValue};else if("dimension"===i){let e=!0;"the_date"===r.fieldName&&2===(null==o?void 0:o.length)&&(e=!1,te.push(r)),e&&(a.conditions||(a.conditions=[]),a.conditions.push(r))}}}if(null==r?void 0:r.length)for(const e of r){const t=q.find((t=>t.label===e.key));t&&(t.truncation={num:e.num,rule:e.rule})}if(null==a?void 0:a.length)for(const o of a){const{fieldType:n,columnData:i}=o,r=e(o,["fieldType","columnData"]);"indicators"===n?(t=Y,J=i):"dimension"===n&&(t=q);const a=t.find((e=>e.label===r.label));a&&(a.sort=Object.assign(Object.assign({},r),{columnName:a.columnName}))}if(null===(s=Object.keys(l))||void 0===s?void 0:s.length)for(const e in l){const t=q.find((t=>t.label===e));t&&(null===(c=l[e])||void 0===c?void 0:c.length)&&(t.aggregateMethod=l[e])}Z=[],ee=[];for(const e of q)u.includes(e.columnName)?Z.push(e):d.includes(e.columnName)&&ee.push(e)}if(Nn(h,["text","proportion","counter","gauge"])?S="zb":Nn(h,["valueline"])?S="valueline":Nn(h,["indexPanel"])?S="indexPanel":Nn(h,["boxplot"])?S="boxplot":Nn(h,["budget"])&&(S="budget"),p||"card"===h){if(0===Z.length||0===Y.length)return;S="grouptable"}else{if("1"===w&&!q.length&&!Q.length)return;if(["2","4"].includes(w)&&0===Y.length)return;if(!("3"!==w||(U||"EDV_DATA_SET"===b)&&$.labelField&&$.valueField))return;if("3"===w&&"ecanDataSelect"===h&&0===Y.length)return}let oe;if((null==L?void 0:L.length)&&(w="1",S="grouptable"),y||Nn(h,["scatter","valueline"])||!(null===(u=Object.keys($))||void 0===u?void 0:u.length)){let e={};e=Nn(h,["scatter","valueline"])?{classifications:H}:{classification:g},(null==Q?void 0:Q.length)&&(e.indexLibColumns=Q,e.isIndexSet=!0),(null==B?void 0:B.length)&&(e.specialIndicatorList=B),Nn(h,"table")&&d.isIndexSet&&(e.compositeIndicator=P),d.isIndexQuery&&(e.isIndexQuery=d.isIndexQuery);const o=W.map((e=>{const{fieldValue:t}=e,o={};return t&&Array.isArray(t)&&(o.fieldValue=JSON.stringify(t)),Object.assign(Object.assign({},e),o)}));(null==te?void 0:te.length)&&function e(t){for(const o of t)if(o.sqlConditions)e(o.sqlConditions);else if("the_date"===o.fieldName){const e=te.find((e=>e.prop===o.prop));e&&(o.fieldValue=e.fieldValue)}}(o),oe=Object.assign({url:"/diagram",source:b,dataViewId:v,plugin:y?"5":x,layer:w,chartType:y?"pivot-table":S,series:G,indicatorList:Y,queryColumns:p?[]:q,pageFlag:!0,edvDataSetId:R||"",sqlConditions:o,idxLibMode:z,dataSourceId:D,preview:V,rowHeaders:Z,keyName:t.keyName,columnData:J,columnHeaders:ee},e)}else{const e=Mn(F).find((e=>"parentCode"===e.conditionKey)),o={};if(e){const t=Rn(e.id)||{};(null==t?void 0:t.itemCodes)?o.parentItemCodes=t.itemCodes:o.parentItemCodes=null}"ecanDataSelect"===h&&(o.indicatorList=Y.filter((e=>e.show))),"EDV_DATA_SET"===b&&(o.edvDataSetId=R),(null==g?void 0:g.sort)&&(o.sort=g.sort);let n="normalSelect";"ecanDataSelect"===h?n="normalSelectData":"ecanTreeSelect"===h&&(n="treeSelect"),oe=Object.assign({url:"/diagram/formData",source:b,dataViewId:v,plugin:"4",layer:w,chartType:"ecanTreeSelect"===h?"treeSelect":"normalSelect",rangeIndexTypeGuid:U,type:n,labelField:$.labelField,valueField:$.valueField,parentField:$.parentField,sqlConditions:W,idxLibMode:"WITH_DATE_DIM_TABLE",dataSourceId:D,keyName:t.keyName},o)}return oe},Xn=(e=[],t,o=!1)=>{let{name:n="name",types:i=[]}=t||{};n=(null==n?void 0:n.trim())||n;const r=new Set,a=new Map,l=e.length,s=i.length;if(1!==l||o)for(let t=0;t<l;t++){const o=e[t],l=o[n];r.add(l);for(let e=0;e<s;e++){const t=i[e],{label:n,value:r}=t,l=Object.assign(Object.assign({},o),{value:o[r]});if(a.has(n)){const e=a.get(n);e.push(l),a.set(n,e)}else a.set(n,[l])}}else{const t=[];for(let o=0;o<s;o++){const n=i[o],{label:a,value:l}=n,s=Object.assign(Object.assign({},e[0]),{value:e[0][l]});r.add(a),t.push(s)}const o=e[0][n]||"";a.set(o,t)}const c=Array.from(r),u=[];for(const[e,t]of a)u.push({name:e,data:t});return{dimensions:c,dataset:u}},Jn=(e,t)=>{let{name:o="name",value:n="value",type:i="type"}=t||{};o=null==o?void 0:o.trim(),n=null==n?void 0:n.trim(),i=null==i?void 0:i.trim();const r=new Map,a=e.length;for(let t=0;t<a;t++){const a=e[t],l=a[o]||"",s=a[n]||"",c=a[i]||"";if(r.has(c)){const e=r.get(c);e.push(Object.assign({name:l,value:s},a)),r.set(c,e)}else r.set(c,[Object.assign({name:l,value:s},a)])}const l=[],s=[];for(const[e,t]of r)if(s.push({name:e,data:t}),null==t?void 0:t.length)if(l.length)for(const e of t)l.includes(e.name)||l.push(e.name);else l.push(...t.map((e=>e.name)));return{dimensions:l,dataset:s}},ei=(e,t)=>{var o;if(null==e)return t;const n=e.match(/\{.*\}/g);if(null==n||0===n.length)return t;const i=n.length;for(let r=0;r<i;r++){const i=n[r];if(null==i||""===i)break;let a=null===(o=i.slice(1,-1))||void 0===o?void 0:o.trim();a=null==a?void 0:a.replace(/value/g,t);try{let t=a;(/\(.*\)/g.test(a)||/[+/\\*]/g.test(a))&&(t=Cn(a)),e=e.replace(i,t)}catch(t){e=e.replace(i,a)}}return e},ti=(e,t,o)=>{let n=e.dataFieldNames;if("indicator"===e.dataType&&"design"!==(null==o?void 0:o.pageMode)&&t){const{formFields:e={}}=t;(null==e?void 0:e.labelField)&&(null==e?void 0:e.valueField)&&(n={name:e.labelField,value:e.valueField})}return n},oi=e=>{const t=null==e?void 0:e.chart.getModel().getComponent("yAxis").axis.scale._extent,o=null==e?void 0:e.chart.getModel().getComponent("xAxis").axis.scale._extent;let n={};return o&&t&&(n={xAxisMinValue:o[0],xAxisMaxValue:o[1],yAxisMinValue:t[0],yAxisMaxValue:t[1]}),n};function ni(e,t,o){switch(t){case"startX":e[0].coord[0]=+o;break;case"startY":e[0].coord[1]=+o;break;case"endX":e[1].coord[0]=+o;break;case"endY":e[1].coord[1]=+o}}const ii=(e,t,o)=>{let n=0,i=[];switch(t.x?i=Ee(o).map((e=>e.value[0])):t.y&&(i=Ee(o).map((e=>e.value[1]))),e){case"max":n=Math.max(...i);break;case"min":n=Math.min(...i);break;case"average":r=i,n=Array.isArray(r)&&0!==r.length?r.reduce(((e,t)=>e+t),0)/r.length:0;break;case"median":n=function(e){if(!Array.isArray(e)||0===e.length)return 0;const t=[...e].sort(((e,t)=>e-t)),o=t.length,n=Math.floor(o/2);return o%2!=0?t[n]:(t[n-1]+t[n])/2}(i)}var r;return n},ri={"最大值":"{max}","最小值":"{min}","平均值":"{average}","中位数":"{median}"};function ai(e,t,o,n,i,r,a){const l=ti(e,n,a),s=e.xAxisLabelFormatter,c=e.yAxisLabelFormatter,u=i?((e,t,o,n)=>{const{xAxisMarkLineValue:i=[],yAxisMarkLineValue:r=[]}=e,{xAxisMinValue:a,xAxisMaxValue:l,yAxisMinValue:s,yAxisMaxValue:c}=t,u=i.map((e=>Object.assign(Object.assign({},e),{x:!0}))),d=r.map((e=>Object.assign(Object.assign({},e),{y:!0}))),h=u.concat(d);if(null==h?void 0:h.length){const e=[];for(const t of h){const i={label:{show:!0,formatter:"",rich:{ft:{}}}},r={};let u=t.value;const d=null==u?void 0:u.match(/\{(.+?)\}/g);let h="";if(i.label.formatter=t.label?`{ft|${t.label}}`:"",(t.offsetHorizontal||t.offsetVertical)&&(t.x?i.label.rich.ft.padding=[0,t.offsetHorizontal||0,t.offsetVertical||0,0]:t.y&&(i.label.rich.ft.padding=[t.offsetVertical||0,0,0,t.offsetHorizontal||0])),t.labelColor&&(i.label.rich.ft.color=t.labelColor),t.lineColor&&(r.color=t.lineColor),t.lineType&&(r.type=t.lineType),t.x?h="xAxis":t.y&&(h="yAxis"),null==d?void 0:d.length){for(const e of d)u=u.replace(e,e.slice(1,-1));if(u){let d;d=n&&n.value[u]?Ee(n)[u]:Cn(u,{axisMax:t.x?Ee(l):t.y?Ee(c):0,axisMin:t.x?Ee(a):t.y?Ee(s):0,max:ii("max",t,o),min:ii("min",t,o),average:ii("average",t,o),median:ii("median",t,o)}),isNaN(+d)||e.push(Object.assign({[h]:+d,lineStyle:r},i))}}else isNaN(+t.value)||e.push(Object.assign({[h]:t.value,lineStyle:r},i))}return{symbol:["none","none"],data:e}}return{data:[]}})(e,i,t,r):void 0,d=i?((e,t,o)=>{const{axisMarkArea:n=[]}=e,{xAxisMinValue:i,xAxisMaxValue:r,yAxisMinValue:a,yAxisMaxValue:l}=t;if(null==n?void 0:n.length){const e=[];for(const t of n){const n=[{name:t.label||"",coord:[],itemStyle:{color:t.color||"transparent"},label:{show:!!t.label,position:"inside",fontSize:16,color:"#000"}},{coord:[]}];for(const e in t)if(["startX","startY","endX","endY"].includes(e)){let s=ri[t[e]]||t[e];const c=null==s?void 0:s.match(/\{(.+?)\}/g);if(null==c?void 0:c.length){for(const e of c)s=s.replace(e,e.slice(1,-1));if(s){const t={x:e.includes("X"),y:e.includes("Y")},c=Cn(s,{xMax:Ee(r),xMin:Ee(i),yMax:Ee(l),yMin:Ee(a),max:ii("max",t,o),min:ii("min",t,o),average:ii("average",t,o),median:ii("median",t,o)});isNaN(+c)||ni(n,e,c)}}else isNaN(+t[e])||ni(n,e,t[e])}n.every((e=>{var t;return null===(t=e.coord)||void 0===t?void 0:t.length}))&&e.push(n)}return{data:e}}return{data:[]}})(e,i,t):void 0,{visualColorKey:h,visualColorCondition:f,visualSizeKey:p,visualSizeCondition:m}=e;let y;h&&(y=function(e,t,o){const n=e=>{if(e.name)return e.name;const t=!!(null==e?void 0:e.value1),o=!!(null==e?void 0:e.value2);return t&&!o?`${e.rule1}${e.value1}`:!t&&o?`${e.rule2}${e.value2}`:`${e.value1}-${e.value2}`},i={};return o.forEach((e=>{(e.value1||e.value2)&&(i[n(e)]={data:[],color:e.color})})),i["其他"]={data:[]},e.forEach((e=>{const r=Number(e.record[t]);let a=!1;for(const t of o){if(!t.value1&&!t.value2)continue;const o=t.value1?Number(t.value1):-1/0,l=t.value2?Number(t.value2):1/0;let s=!0,c=!0;if(">="===t.rule1?s=r>=o:">"===t.rule1?s=r>o:"<="===t.rule1?s=r<=o:"<"===t.rule1?s=r<o:"=="===t.rule1&&(s=r===o),""!==t.value2&&(">="===t.rule2?c=r>=l:">"===t.rule2?c=r>l:"<="===t.rule2?c=r<=l:"<"===t.rule2?c=r<l:"=="===t.rule2&&(c=r===l)),s&&c){i[n(t)].data.push(e),a=!0;break}}a||i["其他"].data.push(e)})),i}(t,h,Ln(f).reverse()));const g=t=>{var o;let n="",i=e.labelFormatter;""===i&&(i="{c}");const{seriesName:r,data:a}=t||{},s=null!==(o=null==a?void 0:a.record)&&void 0!==o?o:{},c=s[l.name],u=s[l.value];return n+=jn(i,{textData:Object.assign({name:c,value:u,a:r,b:c,c:u||0},s)},{useNewline:!0,useSpace:!0}),n},b=function(e){const t=[];for(const o of e){let e="";o.value1&&(e+=`value ${o.rule1} ${o.value1}`),o.value2&&(e+=`${o.value1?"&&":""} value ${o.rule2} ${o.value2}`),e&&t.push({rule:e,size:o.size})}return t.reverse()}(m),v=(t,o)=>{if(p){const{record:e={}}=o.data||{},t=e[p],n=b.find((e=>Cn(e.rule,{value:t})));if(n)return n.size}return e.symbolSize},x={type:"scatter",data:Ee(t),symbolSize:v,itemStyle:{color:e.symbolColor},label:{show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:g},markLine:u,markArea:d},w=[],S=[];if(y)for(const t in y){const o=y[t],n=Ln(x);n.symbolSize=v,n.label.formatter=g,n.itemStyle.color=o.color||e.symbolColor,n.data=o.data,n.name=t,S.push(n),w.push(t)}else S.push(x);return{xAxis:{z:5,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,formatter:e=>("string"!=typeof e||"0"!==e[0]||isNaN(+e)||(e=(+e).toString()),ei(s,e))},axisLine:{lineStyle:{color:e.xAxisLineStyleColor},symbol:["none",e.showXAxisLineArrow?"arrow":"none"],symbolSize:[8,12],onZero:!1},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameLocation:e.xAxisLineInverse?"start":"end",nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},inverse:e.xAxisLineInverse,max:e.xAxisMax,min:e.xAxisMin},yAxis:{z:5,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},axisTick:{show:e.yAxisTickShow},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,formatter:e=>ei(c,e)},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor},symbol:["none",e.showYAxisLineArrow?"arrow":"none"],symbolSize:[8,12],onZero:!1},name:e.yAxisName,nameLocation:e.yAxisLineInverse?"start":"end",nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},inverse:e.yAxisLineInverse,max:e.yAxisMax,min:e.yAxisMin},tooltip:{show:e.tooltipShow,trigger:e.tooltipTrigger,formatter(t){var o,n;const{marker:i,seriesName:r,componentType:a}=t,s=null!==(n=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.record)&&void 0!==n?n:{},c=s[l.name],u=s[l.value];return["markLine","markArea"].includes(a)?"":jn(e.tooltipFormatter,{textData:Object.assign({marker:i,seriesName:r,a:r,b:c,c:u},s)},{useNewline:!0,useSpace:!0})},axisPointer:{type:e.crossShow||void 0===e.crossShow?"cross":""},textStyle:{fontSize:Ee(o)},position:e.tooltipPosition||void 0},legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{color:e.legendTextStyleColor,fontSize:o},data:w},series:S}}function li(e){let t="";switch(e){case 1:t="万";break;case 3:t="百万";break;case 4:t="千万"}return t}const si=(e,t,o,n,i,r,a)=>{switch(((e,t)=>{if(!e)return e||"";if(e.toLowerCase().startsWith(t.toLowerCase())){const o=e.slice(t.length);return o?o.charAt(0).toLowerCase()+o.slice(1):""}return e})(e.type,"ecan")){case"bar":return function(e,t,o,n){const i=e.yAxisLabelFormatter,r=e.xAxisLabelFormatter,a=$e(t.dataset),l=$e(t.dimensions),s=yt((()=>{const{gradientShow:t,gradientColors:o,gradientOffset:n,barBorderRadius:i}=e,r=Ee(a),l=r.length,s=[];for(let a=0;a<l;a++){const c=Object.assign(Object.assign({},r[a]),{type:"bar",barWidth:e.barWidth.value+e.barWidth.suffix,showBackground:e.showBarBackground});if(e.isStack&&(c.stack="stack"),c.label={show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:t=>{let o="",n=e.labelFormatter;""===n&&(n="{c}");const{seriesName:i,name:r,value:a,data:l}=t||{};return o+=jn(n,{textData:Object.assign({name:r,value:a,a:i,b:r,c:a||0},l)},{useNewline:!0,useSpace:!0}),o}},c.itemStyle={},t){let t=e.colors[a];if(!t&&e.colors.length){const o=(a+1)%e.colors.length-1;t=o>0?e.colors[o]:e.colors[0]}t||(t="#5470C6"),c.itemStyle={color:{x:e.isUseHorizontalAxis?1:0,y:0,x2:0,y2:e.isUseHorizontalAxis?0:1,colorStops:[{offset:0,color:t},{offset:n,color:o[a]},{offset:1,color:o[a]}]}}}if(i&&(!e.isStack||a===l-1)){const e=i.split(",");if(null==e?void 0:e.length){const t=[];for(const o of e){const e=parseFloat(o);isNaN(e)||t.push(e)}c.itemStyle.borderRadius=t}}e.isShowMarkLine&&(c.markLine={data:[{type:e.markLineType}]}),s.push(c)}return s})),c=yt((()=>Ee(l).map((e=>{let t={};return t=e&&"object"==typeof e?Object.assign(Object.assign({},e),{textStyle:{fontSize:o}}):{value:e,textStyle:{fontSize:o}},t}))));return{tooltip:{trigger:"axis",show:e.tooltipShow,formatter:t=>{var i;const a=t.length;let l="",s=e.tooltipFormatter;(null==n?void 0:n.getCurrentData)&&n.getCurrentData(null===(i=t[0])||void 0===i?void 0:i.data),""===s&&(s="{marker} {a} {c}");for(let e=0;e<a;e++){const{color:n,seriesName:i,name:a,value:c,data:u}=t[e]||{};if(0===e){let e=a;"undefined"===a&&(e=""),"string"!=typeof a||"0"!==a[0]||isNaN(+a)||(e=(+a).toString()),l+=`${ei(r,e)}${e?"<br/>":""}`}const d=o>10?o-4:10;l+=jn(s,{textData:Object.assign({marker:`<span style="display:inline-block;margin-right:4px;border-radius:${d}px;width:${d}px;height:${d}px;background-color:${n};"></span>`,name:a,value:c,a:i,b:a,c:u.sourceValue||c||0},u)},{useNewline:!0,useSpace:!0}),l+="<br/>"}return l},textStyle:{color:e.tooltipTextStyleColor,fontSize:o},position:e.tooltipPosition||void 0},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:Ee(a).map(((t,o)=>({name:t.name,itemStyle:{color:e.colors[o]},icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},xAxis:{type:e.isUseHorizontalAxis?"value":"category",data:e.isUseHorizontalAxis?null:Ee(c),inverse:e.isUseHorizontalAxis?e.xAxisInverse:e.axisInverse,minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor,type:e.xAxisSplitLineType},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter:e=>("string"!=typeof e||"0"!==e[0]||isNaN(+e)||(e=(+e).toString()),ei(r,e))},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:{type:e.isUseHorizontalAxis?"category":"value",data:e.isUseHorizontalAxis?Ee(l):null,inverse:e.isUseHorizontalAxis?e.axisInverse:e.yAxisInverse,minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisTick:{show:e.yAxisTickShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,rotate:e.yAxisLabelRotate,width:e.yAxisLabelWidth,overflow:e.yAxisLabelOverflow,formatter:e=>ei(i,e)},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:e.yAxisName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},max:e.yAxisMaxValue||null},series:Ee(s)}}(e,t,o,a);case"line":return function(e,t,o,n){const i=e.yAxisLabelFormatter,r=e.xAxisLabelFormatter,a=$e(t.dataset),l=$e(t.dimensions),s=t.dataset,c=yt((()=>{const t=[],o=s.length;for(let i=0;i<o;i++){const o={};e.shadowColor&&(o.shadowColor=e.shadowColor,o.shadowBlur=e.shadowBlur,o.shadowOffsetY=e.shadowOffsetY,o.shadowOffsetX=e.shadowOffsetX);let r=e.colors[i];if(!r&&e.colors.length){const t=(i+1)%e.colors.length-1;r=t>0?e.colors[t]:e.colors[0]}r||(r="#5470C6"),t.push(Object.assign(Object.assign(Object.assign({type:"line"},s[i]),{symbolSize:e.symbolSize,smooth:e.smooth,areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:r},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:r,opacity:e.areaStyleOpacity},lineStyle:Object.assign({width:e.lineStyleWidth},o)}),(n=e).isShowMarkLine?{markLine:{data:[{type:n.markLineType}]}}:{}))}var n;return t}));return{tooltip:{trigger:"axis",textStyle:{fontSize:o,color:e.tooltipTextStyleColor},show:e.tooltipShow,formatter:t=>{var i;const a=t.length;let l="",s=e.tooltipFormatter;(null==n?void 0:n.getCurrentData)&&n.getCurrentData(null===(i=t[0])||void 0===i?void 0:i.data),""===s&&(s="{marker} {a} {c}");for(let e=0;e<a;e++){const{color:n,seriesName:i,name:a,value:c,data:u}=t[e]||{};if(0===e){let e=a;"string"!=typeof a||"0"!==a[0]||isNaN(+a)||(e=(+a).toString()),l+=`${ei(r,e)}<br/>`}const d=o>10?o-4:10;l+=jn(s,{textData:Object.assign({marker:`<span style="display:inline-block;margin-right:4px;border-radius:${d}px;width:${d}px;height:${d}px;background-color:${n};"></span>`,name:a,value:c,a:i,b:a,c:c||0},u)},{useNewline:!0,useSpace:!0}),l+="<br/>"}return l},position:e.tooltipPosition||void 0},xAxis:{type:"category",boundaryGap:e.isBoundaryGap,data:Ee(l).map((e=>{let t={};return t=e&&"object"==typeof e?Object.assign({},e):{value:e},t})),minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter:e=>("string"!=typeof e||"0"!==e[0]||isNaN(+e)||(e=(+e).toString()),ei(r,e))},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:{type:"value",minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,formatter:e=>ei(i,e)},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:e.yAxisName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},max:e.yAxisMaxValue||null},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:Ee(a).map((t=>({name:t.name,icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},series:Ee(c)}}(e,t,o,a);case"pie":return function(e,t,o){var n,i;const r=$e(t.dataset);let{data:a=[]}=Ee(r)[0]||{};if(Array.isArray(e.colors)){const t=e.isUseLabelColors,o=e.colors;a=a.map(((e,n)=>Object.assign({label:t?{color:o[n]}:{}},e)))}return{tooltip:{show:e.tooltipShow,trigger:e.tooltipTrigger,formatter:t=>{const{marker:o,seriesName:n,name:i,value:r,percent:a,data:l}=t||{};return jn(e.tooltipFormatter,{textData:Object.assign({marker:o,name:i,value:r,percent:a,a:n,b:i,c:r,d:a},l)},{useNewline:!0,useSpace:!0})},textStyle:{color:e.tooltipTextStyleColor},position:e.tooltipPosition||void 0},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,align:"left",textStyle:{lineHeight:o+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:o}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:null===(i=null===(n=Ee(r)[0])||void 0===n?void 0:n.data)||void 0===i?void 0:i.map((t=>({name:t.name,icon:e.legendType}))),formatter:t=>{const{data:o}=r.value[0]||{};let n,i=0,a="0%";if(o)for(const e of o)e.name===t&&(n=+e.value),i+=+e.value;return i&&(a=`${(n/i*100).toFixed(2)}%`),kn(e.legendFormatter,{name:t,value:n,percent:a})}},series:[{data:a,type:"pie",radius:[e.innerRadius,e.outerRadius],center:[e.centerLeft,e.centerTop],roseType:e.roseType,avoidLabelOverlap:!0,minAngle:e.minAngle,label:{show:"center"!==e.labelPosition&&e.labelShow,color:e.labelColor,fontSize:e.labelFontSize,position:e.labelPosition,formatter:t=>{let o="",n=e.labelFormatter;""===n&&(n="{b}\n{d}%"),n=n.replace(/\\n/g,"\n");const{name:i,value:r,data:a,percent:l}=t||{};return o+=jn(n,{textData:Object.assign({name:i,value:r,b:i,d:r||0,percent:l},a)},{useNewline:!1,useSpace:!1}),o},width:e.labelWidth,overflow:e.labelOverflow},labelLine:{show:e.labelLineShow,length:e.labelLineLength,length2:e.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}}(e,t,o);case"radar":return function(e,t,o){const n=$e(t.dimensions),i=$e(t.dataset),r=yt((()=>{var e;const t=[],o=[],r=Ee(i),a=r.length;for(let e=0;e<a;e++){const{data:t=[]}=r[e];for(let e=0;e<t.length;e++)o.push(t[e].value)}if(null===(e=n.value)||void 0===e?void 0:e.length){const e=(null==o?void 0:o.length)?1.2*Math.max(...o):0;for(const o of n.value)t.push({name:o,max:e})}return t})),a=yt((()=>{const t=Ee(i),o=t.length,n=[];for(let i=0;i<o;i++){const{name:o,data:r=[]}=t[i],a=[{name:o,value:r.map((e=>e.value))}];let l=e.colors[i];if(!l&&e.colors.length){const t=(i+1)%e.colors.length-1;l=t>0?e.colors[t]:e.colors[0]}l||(l="#5470C6");let s=l;if(e.gradientShow){const{gradientOffset:t,gradientColors:o}=e;s={x:.7,y:0,x2:0,y2:0,colorStops:[{offset:0,color:l},{offset:t,color:o[i]},{offset:1,color:o[i]}]}}const c={type:"radar",name:o,data:a,areaStyle:{color:s,opacity:e.areaStyleOpacity},tooltip:{trigger:"item"},symbolSize:e.symbolSize,lineStyle:{width:e.lineStyleWidth},label:{show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:t=>{const{data:o,value:n}=t;let i=0,r="0%";if(o)for(const e of o.value)i+=+e;return i&&(r=`${(n/i*100).toFixed(2)}%`),jn(e.labelFormatter,{textData:{value:n,percent:r}},{useNewline:!1,useSpace:!1})}}};n.push(c)}return n})),l=yt((()=>({tooltip:{trigger:"axis",textStyle:{fontSize:o.value},show:e.tooltipShow,formatter:t=>{let o="",n=e.tooltipFormatter;""===n&&(n="{marker} {a} {c}");for(let e=0;e<Ee(r).length;e++){const i=Ee(r)[e],{marker:a,seriesName:l,value:s}=t||{};0===e&&l&&(o+=`${l}<br/>`),o+=jn(n,{textData:{marker:a,name:i.name,value:s[e],a:i.name,b:i.name,c:s[e]||0,type:l}},{useNewline:!0,useSpace:!0}),o+="<br/>"}return o},position:e.tooltipPosition||void 0},radar:{indicator:Ee(r),axisName:{color:e.axisNameColor}},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:Ee(i).map((t=>({name:t.name,icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},series:Ee(a)})));return Ee(l)}(e,t,o);case"scatter":return ai(e,t,o,n,i,r,a);case"comboGraph":return function(e,t,o,n){const i=$e(t.dimensions),r=$e(t.dataset),a=t.dataset,l=t=>{const o=[];let n=0;return e.seriesTypes.forEach(((e,n)=>{var i,a;e.axisIndex===t&&(null===(a=null===(i=Ee(r)[n])||void 0===i?void 0:i.data)||void 0===a?void 0:a.length)&&o.push(...Ee(r)[n].data.map((e=>+e.value)))})),o.some((e=>e>=1e7))?n=4:o.some((e=>e>=1e6))?n=3:o.some((e=>e>=1e4))&&(n=1),n},s=$e([0,0]),c=yt((()=>{const t=e.yAxis;return null==t?void 0:t.map(((t,o)=>{const n=s.value[o];let i;return n&&(i=1e4*Math.pow(10,n-1)),{type:"value",minInterval:e.yAxisMinInterval,splitLine:{show:0===o?e.yAxisLeftSplitLineShow:e.yAxisRightSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:0===o?e.yAxisLeftSplitLineType:e.yAxisRightSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,formatter(e){let o=e;return i&&(o=(+e/i).toString()),ei(t.axisLabelFormatter,o)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:li(n)+(0===o?e.yAxisLeftName:e.yAxisRightName),nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:0===o?"right":"left"},max:e.yAxisMaxValue||null}}))}));s.value[0]=e.yAxisLeftUnitAdapt?l(0):0,s.value[1]=e.yAxisRightUnitAdapt?l(1):0;const u={legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:Ee(r).map(((t,o)=>({name:t.name,itemStyle:{color:e.colors[o]},icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},tooltip:{trigger:"axis",show:e.tooltipShow,formatter:t=>{var i;const r=t.length;let a="",l=e.tooltipFormatter;(null==n?void 0:n.getCurrentData)&&n.getCurrentData(null===(i=t[0])||void 0===i?void 0:i.data),""===l&&(l="{marker} {a} {c}");const s=e.seriesTypes;for(let n=0;n<r;n++){const i=s[n],{tooltipFormatter:r}=i||{},{color:c,seriesName:u,name:d,value:h,data:f}=t[n]||{};if(0===n){let t=d;"string"!=typeof d||"0"!==d[0]||isNaN(+d)||(t=(+d).toString()),a+=`${ei(e.xAxisLabelFormatter,t)}<br/>`}const p=o>10?o-4:10;a+=jn(r||l,{textData:Object.assign({marker:`<span style="display:inline-block;margin-right:4px;border-radius:${p}px;width:${p}px;height:${p}px;background-color:${c};"></span>`,name:d,value:h,seriesName:u,a:u,b:d,c:h||0},f)},{useNewline:!0,useSpace:!0}),a+="<br/>"}return a},textStyle:{color:e.tooltipTextStyleColor,fontSize:o},position:e.tooltipPosition||void 0},xAxis:{minInterval:e.xAxisMinInterval,type:"category",data:Ee(i).map((e=>{let t={};return t=e&&"object"==typeof e?Object.assign({},e):{value:e},t})),splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter:t=>("string"!=typeof t||"0"!==t[0]||isNaN(+t)||(t=(+t).toString()),ei(e.xAxisLabelFormatter,t))},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:Ee(c),series:function(t){const o=[],n=t.length,i=e.seriesTypes;for(let r=0;r<n;r++){const n=i[r],{type:a,axisIndex:l}=n||{};let s=Object.assign({type:a,yAxisIndex:l},t[r]),c=e.colors[r];if(!c&&e.colors.length){const t=(r+1)%e.colors.length-1;c=t>0?e.colors[t]:e.colors[0]}if(c||(c="#5470C6"),"line"===a){const t={};e.shadowColor&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetY=e.shadowOffsetY,t.shadowOffsetX=e.shadowOffsetX),s=Object.assign(Object.assign({},s),{symbolSize:e.symbolSize,smooth:e.smooth,itemStyle:{color:c},areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:c},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:c,opacity:e.areaStyleOpacity},lineStyle:Object.assign({width:e.lineStyleWidth},t)})}if("bar"===a){const{gradientShow:t,gradientColors:o,gradientOffset:n}=e,i={color:c};if(e.barBorderRadius){const t=e.barBorderRadius.split(",");if(null==t?void 0:t.length){const e=[];for(const o of t){const t=parseFloat(o);isNaN(t)||e.push(t)}i.borderRadius=e}}t&&(i.color={x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:c},{offset:n,color:o[r]},{offset:1,color:o[r]}]}),s=Object.assign(Object.assign({},s),{barWidth:e.barWidth.value+e.barWidth.suffix,itemStyle:i,label:{show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:t=>{let o="",n=e.labelFormatter;""===n&&(n="{c}");const{seriesName:i,name:r,value:a,data:l}=t||{};return o+=jn(n,{textData:Object.assign({name:r,value:a,a:i,b:r,c:a||0},l)},{useNewline:!0,useSpace:!0}),o}}})}e.isShowMarkLine&&(s.markLine={data:[{type:e.markLineType}]}),o.push(s)}return o}(a)};return u}(e,t,o,a);default:return{}}},ci=(e,t,{fontSize:o=12,graphicConfig:n={},maxValueObj:i={},fontFamily:r=null,componentValues:a=null,callBackMethodMap:l={}})=>Object.assign(Object.assign({},function(e,t,o){return{textStyle:{fontFamily:Ee(t)},toolbox:{show:e.toolboxShow,left:e.toolboxLeft,top:e.toolboxTop,itemSize:e.toolboxItemSize,itemGap:e.toolboxItemGap,feature:{myLocation:{show:!!e.toolboxLocation,title:"快速定位",icon:"path://M512 512m-80 0a80 80 0 1 0 160 0 80 80 0 1 0-160 0Z, M960 480h-33.632C910.752 276.16 747.84 113.248 544 97.632V64a32 32 0 1 0-64 0v33.632C276.16 113.248 113.248 276.16 97.632 480H64a32 32 0 0 0 0 64h33.632C113.248 747.84 276.16 910.752 480 926.368V960a32 32 0 1 0 64 0v-33.632C747.84 910.752 910.752 747.84 926.368 544H960a32 32 0 1 0 0-64zM544 862.368V800a32 32 0 1 0-64 0v62.368C311.424 847.104 176.896 712.576 161.632 544H224a32 32 0 1 0 0-64H161.632C176.896 311.424 311.424 176.896 480 161.632V224a32 32 0 0 0 64 0V161.632c168.576 15.296 303.104 149.792 318.368 318.368H800a32 32 0 1 0 0 64h62.368c-15.264 168.576-149.792 303.104-318.368 318.368z",onclick(){o.toolboxLocationFun&&o.toolboxLocationFun(e)}},myDownload:{show:e.toolboxDownloadUrl&&e.toolboxDownloadShow,title:"数据下载",icon:"path://M502.010485 765.939573c3.773953 3.719718 8.686846 5.573949 13.596669 5.573949 0.075725 0 0.151449-0.010233 0.227174-0.011256 0.329505 0.016373 0.654916 0.050142 0.988514 0.050142 0.706081 0 1.400906-0.042979 2.087545-0.116657 4.352121-0.366344 8.607028-2.190899 11.961426-5.496178l335.053985-330.166675c7.619538-7.509021 7.709589-19.773346 0.200568-27.393907s-19.774369-7.711636-27.39493-0.201591L536.193005 706.304358 536.193005 50.019207c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 657.032164-306.881342-302.44838c-7.618515-7.509021-19.883863-7.419993-27.393907 0.199545-7.509021 7.619538-7.419993 19.884886 0.199545 27.393907L502.010485 765.939573z, M867.170139 711.020776c-10.698666 0-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 13.054317-10.620895 23.675212-23.676236 23.675212L205.182103 919.486668c-13.054317 0-23.676236-10.620895-23.676236-23.675212L181.505867 730.391962c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 34.416857 28.000728 62.416562 62.417585 62.416562l618.941638 0c34.417881 0 62.417585-27.999704 62.417585-62.416562L886.540302 730.391962C886.541325 719.693296 877.868805 711.020776 867.170139 711.020776z",onclick(){o.toolboxDownloadShowFun&&o.toolboxDownloadShowFun(e)}},myDataZoom:{show:e.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){o.toolboxDataZoomShowFun&&o.toolboxDataZoomShowFun(e)}},myInfo:{show:e.toolboxInfoShow,title:"详情",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){o.toolboxInfoShowFun&&o.toolboxInfoShowFun(e)}},mySource:{show:e.toolboxInfoSource,title:"指标来源",icon:"path://M473 71a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8v77.161C722.848 166.622 857.812 301.289 876.729 471H952a8 8 0 0 1 8 8v64a8 8 0 0 1-8 8h-75.053C858.871 721.652 723.515 857.305 553 875.839V951a8 8 0 0 1-8 8h-64a8 8 0 0 1-8-8v-75.161C302.818 857.341 167.659 722.182 149.161 552H72a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h77.161C167.659 301.818 302.818 166.659 473 148.161V71z m326 441c0-157.953-128.047-286-286-286S227 354.047 227 512s128.047 286 286 286 286-128.047 286-286z m-286 60c33.137 0 60-26.863 60-60s-26.863-60-60-60-60 26.863-60 60 26.863 60 60 60z",onclick(){o.toolboxSourceShowFun&&o.toolboxSourceShowFun(e)}}}},title:{text:e.titleText,subtext:e.titleSubtext,textStyle:{fontSize:e.titleFontSize,fontWeight:e.fontWeight,color:e.titleColor},left:e.textAlign},grid:{top:e.gridTop,bottom:e.gridBottom,left:e.gridLeft,right:e.gridRight,containLabel:e.gridContainLabel},color:e.colors}}(e,r,l)),si(e,t,o,n,i,a,l)),ui=(e,t,o)=>{let n;if("string"!=typeof e){const{selectedCanvasId:i,pageConfig:r,usedComponentList:a}=o;if("px"===(null==e?void 0:e.suffix))n=e.value;else if("%"===(null==e?void 0:e.suffix))if("PAGE"===i)n=+e.value/100*parseFloat(r[t]);else{const o=a.find((e=>e.id===i));n=(null==o?void 0:o.value)?+e.value/100*parseFloat(o[t]):+e.value}}else"string"==typeof e&&(n=e);return n},di=(e,t,o=3)=>Math.abs(e-t)<=o;function hi(e,t){return"string"==typeof e?parseFloat(e):"px"===(null==e?void 0:e.suffix)?+e.value:"%"===(null==e?void 0:e.suffix)?parseFloat(t)*(e.value/100):0}const fi=(e,t,o)=>{const{isLimitMoveArea:n,parentId:i,width:r,height:a}=e,l=[];if(n&&i){const e=t.find((e=>e.id===i));e&&(l[0]=parseFloat(e.left),l[1]=parseFloat(e.top),l[2]=parseFloat(e.left)+hi(e.width,null==o?void 0:o.width)-hi(r,null==o?void 0:o.width),l[3]=parseFloat(e.top)+hi(e.height,null==o?void 0:o.height)-hi(a,null==o?void 0:o.height))}return l},pi=(e,t)=>{let o=null;if(null==e?void 0:e.length){const n=[],i=[],r=[],a=[];for(const o of e){const e=parseFloat(o.left);n.push(e),i.push(parseFloat(o.top)),r.push(e+hi(o.width,null==t?void 0:t.width)),a.push(parseFloat(o.top)+hi(o.height,null==t?void 0:t.height))}const l=Math.min(...n),s=Math.min(...i);o={left:l,top:s,width:Math.max(...r)-l,height:Math.max(...a)-s}}return o},mi=(e,t,o)=>{var n,i;const r=[],a=[];let l=!1,s=!1,c=[];e.forEach((e=>{const t=o.find((t=>t.id===e.id));t&&c.push(t.parentId)})),(null==c?void 0:c.length)===(null==e?void 0:e.length)&&1===(null===(n=Array.from(new Set(c)))||void 0===n?void 0:n.length)&&(l=!0),c=e.map((e=>e.parentId)).filter((e=>e)),(null==c?void 0:c.length)===(null==e?void 0:e.length)&&1===(null===(i=Array.from(new Set(c)))||void 0===i?void 0:i.length)&&(s=!0);for(const t of e)!l&&o.find((e=>e.id===t.id))||!s&&t.isForbidContain||(t.combinationId?a.find((e=>e.id===t.combinationId))||a.push({id:t.combinationId,type:"combinate"}):a.push({data:t,type:"normal"}));if(null==a?void 0:a.length)for(const o of a)if("combinate"===o.type){const{combinationMap:n={}}=t,i=n[o.id]||[],a=e.filter((e=>i.includes(e.id))),l=pi(a,t);l&&r.push(Object.assign({id:o.id,type:o.type},l))}else{const{data:e}=o;r.push({id:e.id,type:o.type,width:hi(e.width,null==t?void 0:t.width),height:hi(e.height,null==t?void 0:t.height),left:parseFloat(e.left),top:parseFloat(e.top)})}return r},yi=(e,t)=>{const o=e.map((e=>Object.assign({},e)));if(!o.length)return o;const n=[],i=[],r=[],a=[];for(const e of o)n.push(e.left),i.push(e.top),r.push(e.left+e.width),a.push(e.top+e.height);switch(t){case"left-align":{const e=Math.min(...n);o.forEach((t=>{t.left=e}));break}case"horizontal-center":{const e=+((Math.min(...n)+Math.max(...r))/2).toFixed(2);o.forEach((t=>{t.left=e-+(t.width/2).toFixed(2)}));break}case"right-align":{const e=Math.max(...r);o.forEach((t=>{t.left=e-t.width}));break}case"top-align":{const e=Math.min(...i);o.forEach((t=>{t.top=e}));break}case"vertical-center":{const e=+((Math.min(...i)+Math.max(...a))/2).toFixed(2);o.forEach((t=>{t.top=e-+(t.height/2).toFixed(2)}));break}case"bottom-align":{const e=Math.max(...a);o.forEach((t=>{t.top=e-t.height}));break}case"horizontal-avg":{const e=Math.min(...n),t=Math.max(...r)-e;let i=0;if(o.sort(((e,t)=>e.left-t.left)),o.forEach((e=>{i+=e.width})),o.length>1){const e=+((t-i)/(o.length-1)).toFixed(2);let n=0;o.forEach(((t,o)=>{o>0&&(t.left=n+e),n=t.left+t.width}))}break}case"vertical-avg":{const e=Math.min(...i),t=Math.max(...a)-e;let n=0;if(o.sort(((e,t)=>e.top-t.top)),o.forEach((e=>{n+=e.height})),o.length>1){const e=+((t-n)/(o.length-1)).toFixed(2);let i=0;o.forEach(((t,o)=>{o>0&&(t.top=i+e),i=t.top+t.height}))}break}}return o},gi=(e,t,o,n,i,r,a=5)=>{let l=e,s=t;const c=e+o,u=(e+c)/2,d=t+n,h=(t+d)/2;return r.forEach((r=>{const{left:f,top:p,width:m,height:y,id:g}=r;if(i!==g){const i=f+m,r=(f+i)/2,g=p+y,b=(p+g)/2,v=[f,i],x=[p,g];for(let t=0;t<v.length;t++){const o=v[t];di(e,o,a)&&(l=o)}for(let e=0;e<v.length;e++){const t=v[e];di(c,t,a)&&(l=t-o)}for(let e=0;e<x.length;e++){const o=x[e];di(t,o,a)&&(s=o)}for(let e=0;e<x.length;e++){const t=x[e];di(d,t,a)&&(s=t-n)}di(u,r)&&(l=r-o/2),di(h,b)&&(s=b-n/2)}})),{x:l,y:s}},bi=e=>{const{source:t,components:o,excludeIds:n=[],pageWidth:i,pageHeight:r,scale:a,canvasPositionLeft:l,canvasPositionTop:s}=e,c=parseFloat(t.left),u=c+parseFloat(t.width),d=(c+u)/2,h=parseFloat(t.top),f=h+parseFloat(t.height),p=[c,u,d],m=[h,f,(h+f)/2],y=[],g=[];return o.forEach((e=>{const{left:o,top:c,width:u,height:d,id:h}=e,f=parseFloat(o),b=f+parseFloat(u),v=(f+b)/2,x=parseFloat(c),w=x+parseFloat(d),S=[f,b,v],A=[x,w,(x+w)/2];let _=!1;if(t.id!==h&&!n.includes(h)){for(let e=0;e<p.length;e++)for(let t=0;t<S.length;t++)di(p[e],S[t])&&(y.push({left:`${S[t]*a+l}px`,top:`${s}px`,height:r*a+"px",width:"1px",background:"#3f8ce8"}),_=!0);for(let e=0;e<m.length;e++)for(let t=0;t<A.length;t++)di(m[e],A[t])&&(y.push({left:`${l}px`,top:`${A[t]*a+s}px`,width:i*a+"px",height:"1px",background:"#3f8ce8"}),_=!0);_&&g.push(h)}})),{lines:y,highlightedIds:g}},vi=e=>{const{rect:t,clientX:o,clientY:n,container:i,canvasPosition:r,scale:a,pointType:l,minWidth:s=12,minHeight:c=12}=e,u=e=>Number((e/a).toFixed(0)),{top:d,bottom:h,left:f,right:p}=t,{scrollTop:m,scrollLeft:y,offsetTop:g,offsetLeft:b}=i;let v=o-f;s>=v&&(v=s);const x=`${u(v)}px`;let w=p-o;s>=w&&(w=s);const S=`${u(w)}px`;let A=m+n-d-m;c>=A&&(A=c);const _=`${u(A)}px`;let L=h-n;c>=L&&(L=c);const O=`${u(L)}px`,C=`${u(m+n-g-r.top)}px`,j=`${u(y+o-b-r.left)}px`;let N={};switch(l){case"top-center":L>c&&(N={height:O,top:C});break;case"top-left":w>s&&L>c?N={width:S,left:j,height:O,top:C}:w<=s&&L>c?N={height:O,top:C}:w>s&&L<=c&&(N={width:S,left:j});break;case"top-right":v>=s&&L>=c?N={width:x,height:O,top:C}:v<s&&L>=c?N={height:O,top:C}:v>=s&&L<c&&(N={width:x});break;case"bottom-left":w>=s&&A>=c?N={width:S,left:j,height:_}:w<s&&A>=c?N={height:_}:w>s&&A<=c&&(N={width:S,left:j});break;case"bottom-right":N={width:x,height:_};break;case"bottom-center":N={height:_};break;case"left-center":w>s&&(N={width:S,left:j});break;case"right-center":N={width:x}}return N},xi=(e,t={})=>{const o=[];for(const n of e)n.combinationId&&t[n.combinationId]?o.push(...t[n.combinationId]):o.push(n.id);return Array.from(new Set(o))},wi=(e,t,o)=>{const{scale:n,offsetLeft:i,offsetTop:r,pageWidth:a,pageHeight:l,combinationMap:s={}}=o,c=[];for(const o of e){const e=parseFloat(o.left)*n+i,u=parseFloat(o.top)*n+r,d=hi(o.width,a)*n,h=hi(o.height,l)*n;!(t.left+t.width<=e||e+d<=t.left||t.top+t.height<=u||u+h<=t.top)&&(o.combinationId&&s[o.combinationId]?c.push(...s[o.combinationId]):c.push(o.id))}return Array.from(new Set(c))};class Si{constructor(e,t=4,o=0,n=8,i=1){this.boundary=e,this.capacity=t,this.depth=o,this.maxDepth=n,this.elements=[],this.isDivided=!1,this.nodes=[],this.scale=i}isLargeElement(e){const t=300*this.scale;return(e.width>=t||e.height>=t)&&(e.large=!0,!0)}insert(e){if(!this.containsElement(e))return!1;if(this.isLargeElement(e)||this.elements.length<this.capacity||this.depth>=this.maxDepth)return this.elements.push(e),!0;this.isDivided||this.subdivide();for(const t of this.nodes)if(t.insert(e))return!0;return this.elements.push(e),!0}subdivide(){const{x:e,y:t,width:o,height:n}=this.boundary,i=o/2,r=n/2,a=this.depth+1;this.nodes=[new Si({x:e,y:t,width:i,height:r},this.capacity,a,this.maxDepth),new Si({x:e+i,y:t,width:i,height:r},this.capacity,a,this.maxDepth),new Si({x:e,y:t+r,width:i,height:r},this.capacity,a,this.maxDepth),new Si({x:e+i,y:t+r,width:i,height:r},this.capacity,a,this.maxDepth)],this.isDivided=!0;for(const e of this.elements)if(!e.large)for(const t of this.nodes)if(t.insert(e))break;this.elements=this.elements.filter((e=>e.large))}query(e,t=[]){if(!this.intersects(e))return t;for(const o of this.elements)this.elementIntersectsRange(o,e)&&t.push({id:o.id,combinationId:o.combinationId});if(this.isDivided)for(const o of this.nodes)o.query(e,t);return t}containsElement(e){let t=!1;if(e.x>=this.boundary.x&&e.y>=this.boundary.y&&e.x+e.width<=this.boundary.x+this.boundary.width&&e.y+e.height<=this.boundary.y+this.boundary.height)t=!0;else if(this.intersects(e)){const o=Math.max(e.x,this.boundary.x),n=Math.min(e.x+e.width,this.boundary.x+this.boundary.width),i=Math.max(e.y,this.boundary.y);(n-o)*(Math.min(e.y+e.height,this.boundary.y+this.boundary.height)-i)>=e.width*e.height/4&&(t=!0)}return t}intersects(e){return!(e.x>this.boundary.x+this.boundary.width||e.x+e.width<this.boundary.x||e.y>this.boundary.y+this.boundary.height||e.y+e.height<this.boundary.y)}elementIntersectsRange(e,t){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)}clear(){this.elements=[],this.nodes=[],this.isDivided=!1}}const Ai=(e,t)=>{const o=new Set(t),n=new Map;e.forEach(((e,t)=>n.set(e.id,t)));for(const i of e)if(!o.has(i.id))for(const o of t){const t=e.find((e=>e.id===o));if(!t)continue;const r=n.get(i.id),a=n.get(t.id);if((i.zIndex||0)>(t.zIndex||0)||i.zIndex===t.zIndex&&r>a)return!1}return!0},_i=(e,t,o)=>{var n;const i=new Set(t),r=t.map((t=>{const n=e.find((e=>e.id===t));return n?{id:t,zIndex:Math.max(1,(n.zIndex||0)+("up"===o?1:-1))}:null})).filter((e=>e)),a=new Map(r.map((e=>[e.id,e.zIndex]))),l=e.map((e=>a.has(e.id)?Object.assign(Object.assign({},e),{zIndex:a.get(e.id)}):e)),s=new Map;for(const e of l){const t=e.zIndex;s.has(t)||s.set(t,[]),null===(n=s.get(t))||void 0===n||n.push(e)}for(const[e,t]of s){const n=t.filter((e=>i.has(e.id))),r=t.filter((e=>!i.has(e.id)));s.set(e,"up"===o?[...r,...n]:[...n,...r])}const c=new Map,u=[];for(const e of l){const t=e.zIndex,o=s.get(t)||[],n=c.get(t)||0;u.push(o[n].id),c.set(t,n+1)}return{updates:r,orderedIds:u}},Li=(e,t)=>{const o=e.filter((e=>e.zIndex)).map((e=>e.zIndex)),n=(null==o?void 0:o.length)?Math.max(...o):0;return{updates:t.map((e=>({id:e,zIndex:n+1})))}},Oi=(e,t)=>{const o=t.slice().sort(((t,o)=>e.findIndex((e=>e.id===t))-e.findIndex((e=>e.id===o)))),n=new Set(o),i=[...e.filter((e=>n.has(e.id))).map((e=>e.id)),...e.filter((e=>!n.has(e.id))).map((e=>e.id))];return{updates:o.map((e=>({id:e,zIndex:1}))),orderedIds:i}};export{Si as QuadTree,xi as expandSelectionIds,Zn as formatIndicatorParams,ui as formatWidthHeight,gi as getAdsorptionPosition,mi as getAlignItems,yi as getAlignedItems,pi as getComponentsArea,ti as getFieldConfig,hi as getFormatWh,Fn as getIndicatorParams,Oi as getLayerBottomResult,_i as getLayerOneStepResult,Li as getLayerTopResult,fi as getLimitMoveArea,bi as getMarkerLines,vi as getResizeRect,wi as getSelectedIdsByRect,Tn as hasOwn,Ai as isLayerSelectedAtTop,di as isNearby,Nn as lowerCaseIncludes,Cn as runCode,oi as setAxisExtremum,ci as transformProps,Xn as useTransformChartDataByAttrKey,Jn as useTransformChartDataByAttrValue,ei as useValueFormatter,jn as useVariablesInText};
1
+ function e(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(o[n[i]]=e[n[i]])}return o}function t(e,t,o,n){return new(o||(o=Promise))((function(i,r){function a(e){try{s(n.next(e))}catch(e){r(e)}}function l(e){try{s(n.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,l)}s((n=n.apply(e,t||[])).next())}))}function o(e,t){const o=Object.create(null),n=e.split(",");for(let e=0;e<n.length;e++)o[n[e]]=!0;return e=>!!o[e]}const n=()=>{},i=Object.assign,r=Object.prototype.hasOwnProperty,a=(e,t)=>r.call(e,t),l=Array.isArray,s=e=>"[object Map]"===p(e),c=e=>"function"==typeof e,u=e=>"string"==typeof e,d=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,f=Object.prototype.toString,p=e=>f.call(e),m=e=>p(e).slice(8,-1),y=e=>u(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,g=(e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))})((e=>e.charAt(0).toUpperCase()+e.slice(1))),b=(e,t)=>!Object.is(e,t);let v;const x=()=>v||(v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function w(e,...t){console.warn(`[Vue warn] ${e}`,...t)}const S=e=>{const t=new Set(e);return t.w=0,t.n=0,t},A=e=>(e.w&C)>0,_=e=>(e.n&C)>0,L=new WeakMap;let O=0,C=1;let j;const N=Symbol("production"!==process.env.NODE_ENV?"iterate":""),M=Symbol("production"!==process.env.NODE_ENV?"Map key iterate":"");class T{constructor(e,t=null,o){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,function(e,t){t&&t.active&&t.effects.push(e)}(this,o)}run(){if(!this.active)return this.fn();let e=j,t=F;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=j,j=this,F=!0,C=1<<++O,O<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=C})(this):k(this),this.fn()}finally{O<=30&&(e=>{const{deps:t}=e;if(t.length){let o=0;for(let n=0;n<t.length;n++){const i=t[n];A(i)&&!_(i)?i.delete(e):t[o++]=i,i.w&=~C,i.n&=~C}t.length=o}})(this),C=1<<--O,j=this.parent,F=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(k(this),this.onStop&&this.onStop(),this.active=!1)}}function k(e){const{deps:t}=e;if(t.length){for(let o=0;o<t.length;o++)t[o].delete(e);t.length=0}}let F=!0;const $=[];function I(){$.push(F),F=!1}function z(){const e=$.pop();F=void 0===e||e}function E(e,t,o){if(F&&j){let n=L.get(e);n||L.set(e,n=new Map);let i=n.get(o);i||n.set(o,i=S());D(i,"production"!==process.env.NODE_ENV?{effect:j,target:e,type:t,key:o}:void 0)}}function D(e,t){let o=!1;O<=30?_(e)||(e.n|=C,o=!A(e)):o=!e.has(j),o&&(e.add(j),j.deps.push(e),"production"!==process.env.NODE_ENV&&j.onTrack&&j.onTrack(i({effect:j},t)))}function V(e,t,o,n,i,r){const a=L.get(e);if(!a)return;let c=[];if("clear"===t)c=[...a.values()];else if("length"===o&&l(e)){const e=Number(n);a.forEach(((t,o)=>{("length"===o||!d(o)&&o>=e)&&c.push(t)}))}else switch(void 0!==o&&c.push(a.get(o)),t){case"add":l(e)?y(o)&&c.push(a.get("length")):(c.push(a.get(N)),s(e)&&c.push(a.get(M)));break;case"delete":l(e)||(c.push(a.get(N)),s(e)&&c.push(a.get(M)));break;case"set":s(e)&&c.push(a.get(N))}const u="production"!==process.env.NODE_ENV?{target:e,type:t,key:o,newValue:n,oldValue:i,oldTarget:r}:void 0;if(1===c.length)c[0]&&("production"!==process.env.NODE_ENV?R(c[0],u):R(c[0]));else{const e=[];for(const t of c)t&&e.push(...t);"production"!==process.env.NODE_ENV?R(S(e),u):R(S(e))}}function R(e,t){const o=l(e)?e:[...e];for(const e of o)e.computed&&P(e,t);for(const e of o)e.computed||P(e,t)}function P(e,t){(e!==j||e.allowRecurse)&&("production"!==process.env.NODE_ENV&&e.onTrigger&&e.onTrigger(i({effect:e},t)),e.scheduler?e.scheduler():e.run())}const W=o("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(d)),G=U();function U(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const o=je(this);for(let e=0,t=this.length;e<t;e++)E(o,"get",e+"");const n=o[t](...e);return-1===n||!1===n?o[t](...e.map(je)):n}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){I();const o=je(this)[t].apply(this,e);return z(),o}})),e}function Y(e){const t=je(this);return E(t,"has",e),t.hasOwnProperty(e)}class B{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,o){const n=this._isReadonly,i=this._shallow;if("__v_isReactive"===t)return!n;if("__v_isReadonly"===t)return n;if("__v_isShallow"===t)return i;if("__v_raw"===t&&o===(n?i?Se:we:i?xe:ve).get(e))return e;const r=l(e);if(!n){if(r&&a(G,t))return Reflect.get(G,t,o);if("hasOwnProperty"===t)return Y}const s=Reflect.get(e,t,o);return(d(t)?H.has(t):W(t))?s:(n||E(e,"get",t),i?s:Fe(s)?r&&y(t)?s:s.value:h(s)?n?_e(s):Ae(s):s)}}class K extends B{constructor(e=!1){super(!1,e)}set(e,t,o,n){let i=e[t];if(Oe(i)&&Fe(i)&&!Fe(o))return!1;if(!this._shallow&&(Ce(o)||Oe(o)||(i=je(i),o=je(o)),!l(e)&&Fe(i)&&!Fe(o)))return i.value=o,!0;const r=l(e)&&y(t)?Number(t)<e.length:a(e,t),s=Reflect.set(e,t,o,n);return e===je(n)&&(r?b(o,i)&&V(e,"set",t,o,i):V(e,"add",t,o)),s}deleteProperty(e,t){const o=a(e,t),n=e[t],i=Reflect.deleteProperty(e,t);return i&&o&&V(e,"delete",t,void 0,n),i}has(e,t){const o=Reflect.has(e,t);return d(t)&&H.has(t)||E(e,"has",t),o}ownKeys(e){return E(e,"iterate",l(e)?"length":N),Reflect.ownKeys(e)}}class q extends B{constructor(e=!1){super(!0,e)}set(e,t){return"production"!==process.env.NODE_ENV&&w(`Set operation on key "${String(t)}" failed: target is readonly.`,e),!0}deleteProperty(e,t){return"production"!==process.env.NODE_ENV&&w(`Delete operation on key "${String(t)}" failed: target is readonly.`,e),!0}}const Q=new K,Z=new q,X=e=>e,J=e=>Reflect.getPrototypeOf(e);function ee(e,t,o=!1,n=!1){const i=je(e=e.__v_raw),r=je(t);o||(b(t,r)&&E(i,"get",t),E(i,"get",r));const{has:a}=J(i),l=n?X:o?Me:Ne;return a.call(i,t)?l(e.get(t)):a.call(i,r)?l(e.get(r)):void(e!==i&&e.get(t))}function te(e,t=!1){const o=this.__v_raw,n=je(o),i=je(e);return t||(b(e,i)&&E(n,"has",e),E(n,"has",i)),e===i?o.has(e):o.has(e)||o.has(i)}function oe(e,t=!1){return e=e.__v_raw,!t&&E(je(e),"iterate",N),Reflect.get(e,"size",e)}function ne(e){e=je(e);const t=je(this);return J(t).has.call(t,e)||(t.add(e),V(t,"add",e,e)),this}function ie(e,t){t=je(t);const o=je(this),{has:n,get:i}=J(o);let r=n.call(o,e);r?"production"!==process.env.NODE_ENV&&be(o,n,e):(e=je(e),r=n.call(o,e));const a=i.call(o,e);return o.set(e,t),r?b(t,a)&&V(o,"set",e,t,a):V(o,"add",e,t),this}function re(e){const t=je(this),{has:o,get:n}=J(t);let i=o.call(t,e);i?"production"!==process.env.NODE_ENV&&be(t,o,e):(e=je(e),i=o.call(t,e));const r=n?n.call(t,e):void 0,a=t.delete(e);return i&&V(t,"delete",e,void 0,r),a}function ae(){const e=je(this),t=0!==e.size,o="production"!==process.env.NODE_ENV?s(e)?new Map(e):new Set(e):void 0,n=e.clear();return t&&V(e,"clear",void 0,void 0,o),n}function le(e,t){return function(o,n){const i=this,r=i.__v_raw,a=je(r),l=t?X:e?Me:Ne;return!e&&E(a,"iterate",N),r.forEach(((e,t)=>o.call(n,l(e),l(t),i)))}}function se(e,t,o){return function(...n){const i=this.__v_raw,r=je(i),a=s(r),l="entries"===e||e===Symbol.iterator&&a,c="keys"===e&&a,u=i[e](...n),d=o?X:t?Me:Ne;return!t&&E(r,"iterate",c?M:N),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:l?[d(e[0]),d(e[1])]:d(e),done:t}},[Symbol.iterator](){return this}}}}function ce(e){return function(...t){if("production"!==process.env.NODE_ENV){const o=t[0]?`on key "${t[0]}" `:"";console.warn(`${g(e)} operation ${o}failed: target is readonly.`,je(this))}return"delete"!==e&&this}}function ue(){const e={get(e){return ee(this,e)},get size(){return oe(this)},has:te,add:ne,set:ie,delete:re,clear:ae,forEach:le(!1,!1)},t={get(e){return ee(this,e,!1,!0)},get size(){return oe(this)},has:te,add:ne,set:ie,delete:re,clear:ae,forEach:le(!1,!0)},o={get(e){return ee(this,e,!0)},get size(){return oe(this,!0)},has(e){return te.call(this,e,!0)},add:ce("add"),set:ce("set"),delete:ce("delete"),clear:ce("clear"),forEach:le(!0,!1)},n={get(e){return ee(this,e,!0,!0)},get size(){return oe(this,!0)},has(e){return te.call(this,e,!0)},add:ce("add"),set:ce("set"),delete:ce("delete"),clear:ce("clear"),forEach:le(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{e[i]=se(i,!1,!1),o[i]=se(i,!0,!1),t[i]=se(i,!1,!0),n[i]=se(i,!0,!0)})),[e,o,t,n]}const[de,he,fe,pe]=ue();function me(e,t){const o=t?e?pe:fe:e?he:de;return(t,n,i)=>"__v_isReactive"===n?!e:"__v_isReadonly"===n?e:"__v_raw"===n?t:Reflect.get(a(o,n)&&n in t?o:t,n,i)}const ye={get:me(!1,!1)},ge={get:me(!0,!1)};function be(e,t,o){const n=je(o);if(n!==o&&t.call(e,n)){const t=m(e);console.warn(`Reactive ${t} contains both the raw and reactive versions of the same object${"Map"===t?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const ve=new WeakMap,xe=new WeakMap,we=new WeakMap,Se=new WeakMap;function Ae(e){return Oe(e)?e:Le(e,!1,Q,ye,ve)}function _e(e){return Le(e,!0,Z,ge,we)}function Le(e,t,o,n,i){if(!h(e))return"production"!==process.env.NODE_ENV&&console.warn(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=i.get(e);if(r)return r;const a=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(m(l));var l;if(0===a)return e;const s=new Proxy(e,2===a?n:o);return i.set(e,s),s}function Oe(e){return!(!e||!e.__v_isReadonly)}function Ce(e){return!(!e||!e.__v_isShallow)}function je(e){const t=e&&e.__v_raw;return t?je(t):e}const Ne=e=>h(e)?Ae(e):e,Me=e=>h(e)?_e(e):e;function Te(e){F&&j&&(e=je(e),"production"!==process.env.NODE_ENV?D(e.dep||(e.dep=S()),{target:e,type:"get",key:"value"}):D(e.dep||(e.dep=S())))}function ke(e,t){const o=(e=je(e)).dep;o&&("production"!==process.env.NODE_ENV?R(o,{target:e,type:"set",key:"value",newValue:t}):R(o))}function Fe(e){return!(!e||!0!==e.__v_isRef)}function $e(e){return function(e,t){if(Fe(e))return e;return new Ie(e,t)}(e,!1)}class Ie{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:je(e),this._value=t?e:Ne(e)}get value(){return Te(this),this._value}set value(e){const t=this.__v_isShallow||Ce(e)||Oe(e);e=t?e:je(e),b(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ne(e),ke(this,e))}}function ze(e){return Fe(e)?e.value:e}class Ee{constructor(e,t,o,n){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new T(e,(()=>{this._dirty||(this._dirty=!0,ke(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=o}get value(){const e=je(this);return Te(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const De=[];function Ve(e,...t){if("production"===process.env.NODE_ENV)return;I();const o=De.length?De[De.length-1].component:null,n=o&&o.appContext.config.warnHandler,i=function(){let e=De[De.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}();if(n)He(n,o,11,[e+t.join(""),o&&o.proxy,i.map((({vnode:e})=>`at <${mt(o,e.type)}>`)).join("\n"),i]);else{const o=[`[Vue warn]: ${e}`,...t];i.length&&o.push("\n",...function(e){const t=[];return e.forEach(((e,o)=>{t.push(...0===o?[]:["\n"],...function({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",n=!!e.component&&null==e.component.parent,i=` at <${mt(e.component,e.type,n)}`,r=">"+o;return e.props?[i,...Re(e.props),r]:[i+r]}(e))})),t}(i)),console.warn(...o)}z()}function Re(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach((o=>{t.push(...Pe(o,e[o]))})),o.length>3&&t.push(" ..."),t}function Pe(e,t,o){return u(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?o?t:[`${e}=${t}`]:Fe(t)?(t=Pe(e,je(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):c(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=je(t),o?t:[`${e}=`,t])}const We={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"};function He(e,t,o,n){let i;try{i=n?e(...n):e()}catch(e){!function(e,t,o,n=!0){const i=t?t.vnode:null;if(t){let n=t.parent;const i=t.proxy,r="production"!==process.env.NODE_ENV?We[o]:o;for(;n;){const t=n.ec;if(t)for(let o=0;o<t.length;o++)if(!1===t[o](e,i,r))return;n=n.parent}const a=t.appContext.config.errorHandler;if(a)return void He(a,null,10,[e,i,r])}!function(e,t,o,n=!0){if("production"!==process.env.NODE_ENV){const r=We[t];if(o&&(i=o,De.push(i)),Ve("Unhandled error"+(r?` during execution of ${r}`:"")),o&&De.pop(),n)throw e;console.error(e)}else console.error(e);var i}(e,o,i,n)}(e,t,o)}return i}let Ge=!1,Ue=!1;const Ye=[];let Be=0;const Ke=[];let qe=null,Qe=0;const Ze=Promise.resolve();function Xe(e){Ye.length&&Ye.includes(e,Ge&&e.allowRecurse?Be+1:Be)||(null==e.id?Ye.push(e):Ye.splice(function(e){let t=Be+1,o=Ye.length;for(;t<o;){const n=t+o>>>1,i=Ye[n],r=et(i);r<e||r===e&&i.pre?t=n+1:o=n}return t}(e.id),0,e),Je())}function Je(){Ge||Ue||(Ue=!0,Ze.then(ot))}const et=e=>null==e.id?1/0:e.id,tt=(e,t)=>{const o=et(e)-et(t);if(0===o){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function ot(e){Ue=!1,Ge=!0,"production"!==process.env.NODE_ENV&&(e=e||new Map),Ye.sort(tt);const t="production"!==process.env.NODE_ENV?t=>nt(e,t):n;try{for(Be=0;Be<Ye.length;Be++){const e=Ye[Be];if(e&&!1!==e.active){if("production"!==process.env.NODE_ENV&&t(e))continue;He(e,null,14)}}}finally{Be=0,Ye.length=0,function(e){if(Ke.length){const t=[...new Set(Ke)];if(Ke.length=0,qe)return void qe.push(...t);for(qe=t,"production"!==process.env.NODE_ENV&&(e=e||new Map),qe.sort(((e,t)=>et(e)-et(t))),Qe=0;Qe<qe.length;Qe++)"production"!==process.env.NODE_ENV&&nt(e,qe[Qe])||qe[Qe]();qe=null,Qe=0}}(e),Ge=!1,(Ye.length||Ke.length)&&ot(e)}}function nt(e,t){if(e.has(t)){const o=e.get(t);if(o>100){const e=t.ownerInstance,o=e&&pt(e.type);return Ve(`Maximum recursive updates exceeded${o?` in component <${o}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`),!0}e.set(t,o+1)}else e.set(t,1)}const it=new Set;"production"!==process.env.NODE_ENV&&(x().__VUE_HMR_RUNTIME__={createRecord:st((function(e,t){if(rt.has(e))return!1;return rt.set(e,{initialDef:at(t),instances:new Set}),!0})),rerender:st((function(e,t){const o=rt.get(e);if(!o)return;o.initialDef.render=t,[...o.instances].forEach((e=>{t&&(e.render=t,at(e.type).render=t),e.renderCache=[],e.update()}))})),reload:st((function(e,t){const o=rt.get(e);if(!o)return;t=at(t),lt(o.initialDef,t);const n=[...o.instances];for(const e of n){const n=at(e.type);it.has(n)||(n!==o.initialDef&&lt(n,t),it.add(n)),e.appContext.propsCache.delete(e.type),e.appContext.emitsCache.delete(e.type),e.appContext.optionsCache.delete(e.type),e.ceReload?(it.add(n),e.ceReload(t.styles),it.delete(n)):e.parent?Xe(e.parent.update):e.appContext.reload?e.appContext.reload():"undefined"!=typeof window?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}i=()=>{for(const e of n)it.delete(at(e.type))},l(i)?Ke.push(...i):qe&&qe.includes(i,i.allowRecurse?Qe+1:Qe)||Ke.push(i),Je();var i}))});const rt=new Map;function at(e){return c(t=e)&&"__vccOpts"in t?e.__vccOpts:e;var t}function lt(e,t){i(e,t);for(const o in e)"__file"===o||o in t||delete e[o]}function st(e){return(t,o)=>{try{return e(t,o)}catch(e){console.error(e),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}const ct={};let ut;"production"!==process.env.NODE_ENV&&(ct.ownKeys=e=>(Ve("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(e)));let dt="__VUE_INSTANCE_SETTERS__";(ut=x()[dt])||(ut=x()[dt]=[]),ut.push((e=>e));const ht=/(?:^|[-_])(\w)/g,ft=e=>e.replace(ht,(e=>e.toUpperCase())).replace(/[-_]/g,"");function pt(e,t=!0){return c(e)?e.displayName||e.name:e.name||t&&e.__name}function mt(e,t,o=!1){let n=pt(t);if(!n&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(n=e[1])}if(!n&&e&&e.parent){const o=e=>{for(const o in e)if(e[o]===t)return o};n=o(e.components||e.parent.type.components)||o(e.appContext.components)}return n?ft(n):o?"App":"Anonymous"}const yt=(e,t)=>function(e,t,o=!1){let i,r;const a=c(e);return a?(i=e,r="production"!==process.env.NODE_ENV?()=>{console.warn("Write operation failed: computed value is readonly")}:n):(i=e.get,r=e.set),new Ee(i,r,a||!r,o)}(e,0,false);function gt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bt,vt={exports:{}};function xt(){return bt||(bt=1,vt.exports=function(){var e=1e3,t=6e4,o=36e5,n="millisecond",i="second",r="minute",a="hour",l="day",s="week",c="month",u="quarter",d="year",h="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],o=e%100;return"["+e+(t[(o-20)%10]||t[o]||t[0])+"]"}},g=function(e,t,o){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(o)+e},b={s:g,z:function(e){var t=-e.utcOffset(),o=Math.abs(t),n=Math.floor(o/60),i=o%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(i,2,"0")},m:function e(t,o){if(t.date()<o.date())return-e(o,t);var n=12*(o.year()-t.year())+(o.month()-t.month()),i=t.clone().add(n,c),r=o-i<0,a=t.clone().add(n+(r?-1:1),c);return+(-(n+(o-i)/(r?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:s,d:l,D:h,h:a,m:r,s:i,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",x={};x[v]=y;var w="$isDayjsObject",S=function(e){return e instanceof O||!(!e||!e[w])},A=function e(t,o,n){var i;if(!t)return v;if("string"==typeof t){var r=t.toLowerCase();x[r]&&(i=r),o&&(x[r]=o,i=r);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var l=t.name;x[l]=t,i=l}return!n&&i&&(v=i),i||!n&&v},_=function(e,t){if(S(e))return e.clone();var o="object"==typeof t?t:{};return o.date=e,o.args=arguments,new O(o)},L=b;L.l=A,L.i=S,L.w=function(e,t){return _(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function y(e){this.$L=A(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var g=y.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,o=e.utc;if(null===t)return new Date(NaN);if(L.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(p);if(n){var i=n[2]-1||0,r=(n[7]||"0").substring(0,3);return o?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,r)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return L},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(e,t){var o=_(e);return this.startOf(t)<=o&&o<=this.endOf(t)},g.isAfter=function(e,t){return _(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<_(e)},g.$g=function(e,t,o){return L.u(e)?this[t]:this.set(o,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var o=this,n=!!L.u(t)||t,u=L.p(e),f=function(e,t){var i=L.w(o.$u?Date.UTC(o.$y,t,e):new Date(o.$y,t,e),o);return n?i:i.endOf(l)},p=function(e,t){return L.w(o.toDate()[e].apply(o.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),o)},m=this.$W,y=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case d:return n?f(1,0):f(31,11);case c:return n?f(1,y):f(0,y+1);case s:var v=this.$locale().weekStart||0,x=(m<v?m+7:m)-v;return f(n?g-x:g+(6-x),y);case l:case h:return p(b+"Hours",0);case a:return p(b+"Minutes",1);case r:return p(b+"Seconds",2);case i:return p(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var o,s=L.p(e),u="set"+(this.$u?"UTC":""),f=(o={},o[l]=u+"Date",o[h]=u+"Date",o[c]=u+"Month",o[d]=u+"FullYear",o[a]=u+"Hours",o[r]=u+"Minutes",o[i]=u+"Seconds",o[n]=u+"Milliseconds",o)[s],p=s===l?this.$D+(t-this.$W):t;if(s===c||s===d){var m=this.clone().set(h,1);m.$d[f](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[L.p(e)]()},g.add=function(n,u){var h,f=this;n=Number(n);var p=L.p(u),m=function(e){var t=_(f);return L.w(t.date(t.date()+Math.round(e*n)),f)};if(p===c)return this.set(c,this.$M+n);if(p===d)return this.set(d,this.$y+n);if(p===l)return m(1);if(p===s)return m(7);var y=(h={},h[r]=t,h[a]=o,h[i]=e,h)[p]||1,g=this.$d.getTime()+n*y;return L.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,o=this.$locale();if(!this.isValid())return o.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=L.z(this),r=this.$H,a=this.$m,l=this.$M,s=o.weekdays,c=o.months,u=o.meridiem,d=function(e,o,i,r){return e&&(e[o]||e(t,n))||i[o].slice(0,r)},h=function(e){return L.s(r%12||12,e,"0")},p=u||function(e,t,o){var n=e<12?"AM":"PM";return o?n.toLowerCase():n};return n.replace(m,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return L.s(t.$y,4,"0");case"M":return l+1;case"MM":return L.s(l+1,2,"0");case"MMM":return d(o.monthsShort,l,c,3);case"MMMM":return d(c,l);case"D":return t.$D;case"DD":return L.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(o.weekdaysMin,t.$W,s,2);case"ddd":return d(o.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(r);case"HH":return L.s(r,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return p(r,a,!0);case"A":return p(r,a,!1);case"m":return String(a);case"mm":return L.s(a,2,"0");case"s":return String(t.$s);case"ss":return L.s(t.$s,2,"0");case"SSS":return L.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(n,h,f){var p,m=this,y=L.p(h),g=_(n),b=(g.utcOffset()-this.utcOffset())*t,v=this-g,x=function(){return L.m(m,g)};switch(y){case d:p=x()/12;break;case c:p=x();break;case u:p=x()/3;break;case s:p=(v-b)/6048e5;break;case l:p=(v-b)/864e5;break;case a:p=v/o;break;case r:p=v/t;break;case i:p=v/e;break;default:p=v}return f?p:L.a(p)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return x[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var o=this.clone(),n=A(e,t,!0);return n&&(o.$L=n),o},g.clone=function(){return L.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},y}(),C=O.prototype;return _.prototype=C,[["$ms",n],["$s",i],["$m",r],["$H",a],["$W",l],["$M",c],["$y",d],["$D",h]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),_.extend=function(e,t){return e.$i||(e(t,O,_),e.$i=!0),_},_.locale=A,_.isDayjs=S,_.unix=function(e){return _(1e3*e)},_.en=x[v],_.Ls=x,_.p={},_}()),vt.exports}var wt=gt(xt()),St="object"==typeof global&&global&&global.Object===Object&&global,At="object"==typeof self&&self&&self.Object===Object&&self,_t=St||At||Function("return this")(),Lt=_t.Symbol,Ot=Object.prototype,Ct=Ot.hasOwnProperty,jt=Ot.toString,Nt=Lt?Lt.toStringTag:void 0;var Mt=Object.prototype.toString;var Tt=Lt?Lt.toStringTag:void 0;function kt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Tt&&Tt in Object(e)?function(e){var t=Ct.call(e,Nt),o=e[Nt];try{e[Nt]=void 0;var n=!0}catch(e){}var i=jt.call(e);return n&&(t?e[Nt]=o:delete e[Nt]),i}(e):function(e){return Mt.call(e)}(e)}function Ft(e){return null!=e&&"object"==typeof e}var $t=Array.isArray;function It(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function zt(e){if(!It(e))return!1;var t=kt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Et,Dt=_t["__core-js_shared__"],Vt=(Et=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+Et:"";var Rt=Function.prototype.toString;function Pt(e){if(null!=e){try{return Rt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Wt=/^\[object .+?Constructor\]$/,Ht=Function.prototype,Gt=Object.prototype,Ut=Ht.toString,Yt=Gt.hasOwnProperty,Bt=RegExp("^"+Ut.call(Yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kt(e){return!(!It(e)||(t=e,Vt&&Vt in t))&&(zt(e)?Bt:Wt).test(Pt(e));var t}function qt(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return Kt(o)?o:void 0}var Qt=qt(_t,"WeakMap"),Zt=Object.create,Xt=function(){function e(){}return function(t){if(!It(t))return{};if(Zt)return Zt(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}(),Jt=function(){try{var e=qt(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var eo=/^(?:0|[1-9]\d*)$/;function to(e,t){var o=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==o||"symbol"!=o&&eo.test(e))&&e>-1&&e%1==0&&e<t}function oo(e,t){return e===t||e!=e&&t!=t}var no=Object.prototype.hasOwnProperty;function io(e,t,o){var n=e[t];no.call(e,t)&&oo(n,o)&&(void 0!==o||t in e)||function(e,t,o){"__proto__"==t&&Jt?Jt(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}(e,t,o)}function ro(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ao=Object.prototype;function lo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ao)}function so(e){return Ft(e)&&"[object Arguments]"==kt(e)}var co=Object.prototype,uo=co.hasOwnProperty,ho=co.propertyIsEnumerable,fo=so(function(){return arguments}())?so:function(e){return Ft(e)&&uo.call(e,"callee")&&!ho.call(e,"callee")};var po="object"==typeof exports&&exports&&!exports.nodeType&&exports,mo=po&&"object"==typeof module&&module&&!module.nodeType&&module,yo=mo&&mo.exports===po?_t.Buffer:void 0,go=(yo?yo.isBuffer:void 0)||function(){return!1},bo={};function vo(e){return function(t){return e(t)}}bo["[object Float32Array]"]=bo["[object Float64Array]"]=bo["[object Int8Array]"]=bo["[object Int16Array]"]=bo["[object Int32Array]"]=bo["[object Uint8Array]"]=bo["[object Uint8ClampedArray]"]=bo["[object Uint16Array]"]=bo["[object Uint32Array]"]=!0,bo["[object Arguments]"]=bo["[object Array]"]=bo["[object ArrayBuffer]"]=bo["[object Boolean]"]=bo["[object DataView]"]=bo["[object Date]"]=bo["[object Error]"]=bo["[object Function]"]=bo["[object Map]"]=bo["[object Number]"]=bo["[object Object]"]=bo["[object RegExp]"]=bo["[object Set]"]=bo["[object String]"]=bo["[object WeakMap]"]=!1;var xo="object"==typeof exports&&exports&&!exports.nodeType&&exports,wo=xo&&"object"==typeof module&&module&&!module.nodeType&&module,So=wo&&wo.exports===xo&&St.process,Ao=function(){try{var e=wo&&wo.require&&wo.require("util").types;return e||So&&So.binding&&So.binding("util")}catch(e){}}(),_o=Ao&&Ao.isTypedArray,Lo=_o?vo(_o):function(e){return Ft(e)&&ro(e.length)&&!!bo[kt(e)]},Oo=Object.prototype.hasOwnProperty;function Co(e,t){var o=$t(e),n=!o&&fo(e),i=!o&&!n&&go(e),r=!o&&!n&&!i&&Lo(e),a=o||n||i||r,l=a?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],s=l.length;for(var c in e)!Oo.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||to(c,s))||l.push(c);return l}function jo(e,t){return function(o){return e(t(o))}}var No=jo(Object.keys,Object),Mo=Object.prototype.hasOwnProperty;function To(e){return null!=(t=e)&&ro(t.length)&&!zt(t)?Co(e):function(e){if(!lo(e))return No(e);var t=[];for(var o in Object(e))Mo.call(e,o)&&"constructor"!=o&&t.push(o);return t}(e);var t}var ko=qt(Object,"create");var Fo=Object.prototype.hasOwnProperty;var $o=Object.prototype.hasOwnProperty;function Io(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function zo(e,t){for(var o=e.length;o--;)if(oo(e[o][0],t))return o;return-1}Io.prototype.clear=function(){this.__data__=ko?ko(null):{},this.size=0},Io.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Io.prototype.get=function(e){var t=this.__data__;if(ko){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return Fo.call(t,e)?t[e]:void 0},Io.prototype.has=function(e){var t=this.__data__;return ko?void 0!==t[e]:$o.call(t,e)},Io.prototype.set=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=ko&&void 0===t?"__lodash_hash_undefined__":t,this};var Eo=Array.prototype.splice;function Do(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}Do.prototype.clear=function(){this.__data__=[],this.size=0},Do.prototype.delete=function(e){var t=this.__data__,o=zo(t,e);return!(o<0)&&(o==t.length-1?t.pop():Eo.call(t,o,1),--this.size,!0)},Do.prototype.get=function(e){var t=this.__data__,o=zo(t,e);return o<0?void 0:t[o][1]},Do.prototype.has=function(e){return zo(this.__data__,e)>-1},Do.prototype.set=function(e,t){var o=this.__data__,n=zo(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};var Vo=qt(_t,"Map");function Ro(e,t){var o,n,i=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?i["string"==typeof t?"string":"hash"]:i.map}function Po(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}Po.prototype.clear=function(){this.size=0,this.__data__={hash:new Io,map:new(Vo||Do),string:new Io}},Po.prototype.delete=function(e){var t=Ro(this,e).delete(e);return this.size-=t?1:0,t},Po.prototype.get=function(e){return Ro(this,e).get(e)},Po.prototype.has=function(e){return Ro(this,e).has(e)},Po.prototype.set=function(e,t){var o=Ro(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this};var Wo=jo(Object.getPrototypeOf,Object);function Ho(e){var t=this.__data__=new Do(e);this.size=t.size}Ho.prototype.clear=function(){this.__data__=new Do,this.size=0},Ho.prototype.delete=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o},Ho.prototype.get=function(e){return this.__data__.get(e)},Ho.prototype.has=function(e){return this.__data__.has(e)},Ho.prototype.set=function(e,t){var o=this.__data__;if(o instanceof Do){var n=o.__data__;if(!Vo||n.length<199)return n.push([e,t]),this.size=++o.size,this;o=this.__data__=new Po(n)}return o.set(e,t),this.size=o.size,this};var Go=Object.prototype.propertyIsEnumerable,Uo=Object.getOwnPropertySymbols,Yo=Uo?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var o=-1,n=null==e?0:e.length,i=0,r=[];++o<n;){var a=e[o];t(a,o,e)&&(r[i++]=a)}return r}(Uo(e),(function(t){return Go.call(e,t)})))}:function(){return[]};function Bo(e){return function(e,t,o){var n=t(e);return $t(e)?n:function(e,t){for(var o=-1,n=t.length,i=e.length;++o<n;)e[i+o]=t[o];return e}(n,o(e))}(e,To,Yo)}var Ko=qt(_t,"DataView"),qo=qt(_t,"Promise"),Qo=qt(_t,"Set"),Zo="[object Map]",Xo="[object Promise]",Jo="[object Set]",en="[object WeakMap]",tn="[object DataView]",on=Pt(Ko),nn=Pt(Vo),rn=Pt(qo),an=Pt(Qo),ln=Pt(Qt),sn=kt;(Ko&&sn(new Ko(new ArrayBuffer(1)))!=tn||Vo&&sn(new Vo)!=Zo||qo&&sn(qo.resolve())!=Xo||Qo&&sn(new Qo)!=Jo||Qt&&sn(new Qt)!=en)&&(sn=function(e){var t=kt(e),o="[object Object]"==t?e.constructor:void 0,n=o?Pt(o):"";if(n)switch(n){case on:return tn;case nn:return Zo;case rn:return Xo;case an:return Jo;case ln:return en}return t});var cn=Object.prototype.hasOwnProperty;var un=_t.Uint8Array;function dn(e){var t=new e.constructor(e.byteLength);return new un(t).set(new un(e)),t}var hn=/\w*$/;var fn=Lt?Lt.prototype:void 0,pn=fn?fn.valueOf:void 0;function mn(e,t,o){var n,i,r,a,l,s=e.constructor;switch(t){case"[object ArrayBuffer]":return dn(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return l=dn((a=e).buffer),new a.constructor(l,a.byteOffset,a.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(e){var t=dn(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(e);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(r=new(i=e).constructor(i.source,hn.exec(i))).lastIndex=i.lastIndex,r;case"[object Symbol]":return n=e,pn?Object(pn.call(n)):{}}}var yn=Ao&&Ao.isMap,gn=yn?vo(yn):function(e){return Ft(e)&&"[object Map]"==sn(e)};var bn=Ao&&Ao.isSet,vn=bn?vo(bn):function(e){return Ft(e)&&"[object Set]"==sn(e)},xn="[object Arguments]",wn="[object Function]",Sn="[object Object]",An={};function _n(e,t,o,n,i,r){var a;if(void 0!==a)return a;if(!It(e))return e;var l=$t(e);if(l)a=function(e){var t=e.length,o=new e.constructor(t);return t&&"string"==typeof e[0]&&cn.call(e,"index")&&(o.index=e.index,o.input=e.input),o}(e);else{var s=sn(e),c=s==wn||"[object GeneratorFunction]"==s;if(go(e))return e.slice();if(s==Sn||s==xn||c&&!i)a=c?{}:function(e){return"function"!=typeof e.constructor||lo(e)?{}:Xt(Wo(e))}(e);else{if(!An[s])return i?e:{};a=mn(e,s)}}r||(r=new Ho);var u=r.get(e);if(u)return u;r.set(e,a),vn(e)?e.forEach((function(n){a.add(_n(n,t,o,n,e,r))})):gn(e)&&e.forEach((function(n,i){a.set(i,_n(n,t,o,i,e,r))}));var d=l?void 0:Bo(e);return function(e,t){for(var o=-1,n=null==e?0:e.length;++o<n&&!1!==t(e[o],o,e););}(d||e,(function(n,i){d&&(n=e[i=n]),io(a,i,_n(n,t,o,i,e,r))})),a}An[xn]=An["[object Array]"]=An["[object ArrayBuffer]"]=An["[object DataView]"]=An["[object Boolean]"]=An["[object Date]"]=An["[object Float32Array]"]=An["[object Float64Array]"]=An["[object Int8Array]"]=An["[object Int16Array]"]=An["[object Int32Array]"]=An["[object Map]"]=An["[object Number]"]=An[Sn]=An["[object RegExp]"]=An["[object Set]"]=An["[object String]"]=An["[object Symbol]"]=An["[object Uint8Array]"]=An["[object Uint8ClampedArray]"]=An["[object Uint16Array]"]=An["[object Uint32Array]"]=!0,An["[object Error]"]=An[wn]=An["[object WeakMap]"]=!1;function Ln(e){return _n(e,5)}let On=(e,t)=>()=>{let o="",n=t;for(;n--;)o+=e[Math.random()*e.length|0];return o};const Cn=(e,t)=>{let o=e;const n=/[.*+?^${}()()\-|[\]\\]/,i=Object.assign({dayjs:wt},t);let r="";const a=[];for(const e in i){let t=e;n.test(e)&&(t=On("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",6)(),o=o.split(e).join(t)),r+=`${t},`,a.push(i[e])}r=r.replace(/,$/,"");const l=`function (${r}){return ${o}}`;let s;try{s=Function(`"use strict";return (${l})`)()(...a)}catch(t){return e}return s},jn=(e="",{textData:t,codeData:o}={},{useNewline:n=!1,useSpace:i=!1}={})=>{const r=In,a=$n,l=window.config||{},s=Object.assign(Object.assign({},l),t),c=String(e||"").match(/\{(.+?)\}/g);if(null==c||0===c.length)return e;for(let t=0;t<c.length;t++){const n=c[t];let i=n.slice(1,-1).trim();const r=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,a=i.match(r);for(let e=0;e<a.length;e++){const t=a[e],o=s[t];null!=o&&"function"!=typeof o&&(i=i.replace(t,o))}(/\(.*\)/g.test(i)||/[+/\\*]/g.test(i))&&(i=Cn(i,o)),e=e.replace(n,i)}return n&&(e=null==e?void 0:e.replace(/\n|\\n/g,"<br/>")),i&&(e=null==e?void 0:e.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),e=(e=e.replace(/Qfw\((.*?)\)/g,((e,t)=>r(t)))).replace(/QwfFixed\((.*?)\)/g,((e,t)=>a(t)))},Nn=(e,t)=>{if("string"==typeof e&&"string"==typeof t)return e.toLocaleLowerCase().includes(t.toLocaleLowerCase());if("string"==typeof e&&Array.isArray(t)){const o=t.length;for(let n=0;n<o;n++){const o=t[n];if("string"==typeof o&&e.toLocaleLowerCase().includes(o.toLocaleLowerCase()))return!0}}return!1},Mn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Tn=e=>{const t=[];for(const o of e)o.conditions?t.push(...Tn(o.conditions)):"component"===(null==o?void 0:o.dataType)&&t.push(o);return t};const kn=(e="",t)=>{var o;const n=e.match(/\{(.+?)\}/g),i=(null===(o=e.split("\n"))||void 0===o?void 0:o.length)-1;let r="";if(i)for(let e=0;e<i;e++)r+="\n";let a=e;if(null==n?void 0:n.length){for(const e of n){const o=jn(e,{textData:t},{useNewline:!1,useSpace:!1});o&&(a=a.replace(e,o))}return`${r}{text|${a}}`}return e};function Fn(e){return t(this,arguments,void 0,(function*({graphicConfig:e,request:t,INDICATOR_URL:o="",PAGE_ID:n,dataSourceId:i}){var r;try{const{leftAxisList:a=[],rightAxisList:l=[],queryColumnList:s=[],indicators:c=[]}=ze(e),u=[...a,...l,...s,...c],d={};for(const e of u){const{indexCode:t="",parentId:o=""}=e;!o||Mn(e,"calcType")||d[o]||(d[o]=t)}if(null===(r=Object.keys(d))||void 0===r?void 0:r.length){const e=[];for(const r in d)e.push(new Promise(((e,a)=>{t.post(`${o}/diagram/hrpIndexWithComplex`,{pageId:n,indexGuid:r,indexCode:d[r],dataSourceId:i}).then((t=>{var o;const{success:n,data:i=[]}=t.data;n&&(null===(o=null==i?void 0:i.dataViewColumns)||void 0===o?void 0:o.length)?e(i.dataViewColumns):a(i)})).catch((e=>{console.error(e),a(e)}))})));const r=yield Promise.all(e);return r.reduce(((e,t)=>e.filter((e=>t.find((t=>t.typeGuid===e.typeGuid)))))).filter((e=>e.typeGuid))}}catch(e){console.error(e)}return[]}))}function $n(e){return Number(e).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}function In(e){return Number(e).toLocaleString()}function zn(e,t){return t?e.replace("px",""):e}const En=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];let Dn=new Map,Vn=[];const Rn=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"],Pn=e=>Dn.get(e),Wn=(e,t)=>{if(t)Mn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),Mn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),Mn(e,"dataType")&&delete e.dataType,e.fieldValue||delete e.fieldValue;else{const{calcWays:t=[],dateCalcTypes:o=[],activeKey:n,componentId:i=""}=e;if(5===n&&(null==t?void 0:t.length)&&(null==o?void 0:o.length)&&i){const n=t[0].split("-");(null==n?void 0:n.length)>1&&"rangeValue"===n[0]&&(e.calcWays=((e,t={})=>{const{around:o,unit:n,id:i}=e;let r="";const{pageMode:a="",componentList:l=[]}=(null==t?void 0:t.graphicConfig)||{};let s=null,c=null;if("design"===a){const e=null==l?void 0:l.find((e=>e.id===i));if(!e)return[];const{interval:t,intervalUnit:o,startTime:n,endTime:r,operate:a,useCurrentTime:u}=e||{};if(u&&(s=wt().subtract(t,o),c=wt()),n&&(s=wt(n)),r&&(c=wt(r)),a){const{type:e,value:t,mode:o}=a;switch(e){case"add":s=s?s.add(t,o):s,c=c?c.add(t,o):c;break;case"minus":s=s?s.subtract(t,o):s,c=c?c.subtract(t,o):c}}}else{const e=Pn(i)||{};ze(e.startTime)&&(s=wt(ze(e.startTime))),ze(e.endTime)&&(c=wt(ze(e.endTime)))}s&&c&&(r=`${"before"===o?"-":""}${c.diff(s,n.toLowerCase())+1}`);return r?[r]:[]})({around:n[1],unit:o[0],id:i})),delete e.radioValue}if(Mn(e,"dataType")){if("DATE"===e.fieldType&&(e.label=e.fieldName),"component"===e.dataType)if("PARENT"===e.fieldValue){let t=e.modelKey;t&&e.prop&&(t+=`-${e.prop}`),e.fieldValue="${"+t+"}"}else e.fieldValue="${"+Un(e.componentId,e.fieldValue)+"}";delete e.dataType}Mn(e,"activeKey")&&delete e.activeKey,Mn(e,"radioValue")&&delete e.radioValue,Mn(e,"indexCode")&&(e.hrpIndexCode=e.indexCode,delete e.indexCode),Mn(e,"indexCodeNum")&&(e.hrpIndexCodeNum=e.indexCodeNum,delete e.indexCodeNum),"component"!==e.dataType&&e.useCurrentTime&&(e.fieldValue=wt().format(e.dateFormat)),Mn(e,"modelKey")&&delete e.modelKey,Mn(e,"prop")&&delete e.prop,delete e.useCurrentTime}},Hn=(e,t)=>{const o=[];return(null==e?void 0:e.length)&&Ln(e).forEach((e=>{if(e.join&&e.conditions){const n=!e.conditions.some((e=>e.join&&e.conditions));e.conditions.forEach(((i,r)=>{Wn(i,t);const a={};if(r<e.conditions.length-1&&(a.join=e.join),n)o.push(Object.assign(Object.assign({},a),i));else if(i.join&&i.conditions){const e=t?"sqlConditions":"conditions";o.push(Object.assign({[e]:Hn([i],t)},a))}else o.push(Object.assign(Object.assign({},a),i))}))}else Wn(e,t),o.push(e)})),o},Gn=(e={},t)=>{if((null==e?void 0:e.sortCpnts)&&t){const o=Zn(e);o&&(t.sort=o)}const{label:o,name:n,location:i,show:r,indexCode:a,indexCodeNum:l,calcType:s="COLUMN",builtInFormula:c,builtInValueSource:u,builtInCalcWay:d,formula:h,conditions:f,aggregate:p,distinct:m,dimByCount:y,dataTo:g,sort:b,caliber:v}=e;let x;if(f&&(x=Hn(f)),"COMPONENT"===s){const e={};return qn(e,u),{label:o.trim(),columnName:n,show:r,calcType:s,componentAlias:d,componentValue:e.fieldValue||null}}const w={label:o.trim(),columnName:n,location:i,show:r,calcType:"1"===g?"VIEW":s,hrpIndexCode:a,hrpIndexCodeNum:l,aggregate:p,builtInFormula:c,builtInValueSource:u,formula:h,conditions:x};if(b&&(w.sort={columnName:n,label:w.label,order:b,type:"NORMAL"}),v&&(w.indexCalmethod=v),"DATE_OFFSET"!==c)return"the_count"===n&&(w.calcType="AGGREGATE",w.distinct=!!m,w.typeGuid=y),Object.assign(Object.assign({},w),{builtInCalcWay:d});{const e=d.split("-");if(3===(null==e?void 0:e.length)){let t=e[0];return"before"===e[2]&&"0"!==e[0]&&(t=`-${e[0]}`),Object.assign(Object.assign({},w),{calcWays:[t],dateCalcTypes:[e[1]]})}}},Un=(e,t)=>{const o=Vn.find((t=>t.id===e)),{keyName:n}=o||{};if(n){const e=/-(startTime|endTime)/g,o=t.match(e);return(null==o?void 0:o.length)?`${n}${o[0]}`:n}return t||""},Yn=e=>{if(!e)return[];const t=Ln((null==e?void 0:e.controlList)||[]).filter((e=>"parentCode"!==e.conditionKey)),{classificationList:o=[],rowHeaderList:n=[],dimensionList:i=[],seriesList:r=[],leftAxisList:a=[],rightAxisList:l=[],queryColumnList:s=[],indexLibColumns:c=[],indicators:u=[],specialIndicators:d=[]}=e;Kn(t);const h=[...o,...n,...i,...r,...a,...l,...s,...c,...u,...d],f=[];for(const e of h){const t=Tn((null==e?void 0:e.conditions)||[]);if(null==t?void 0:t.length){const e=t.filter((e=>"component"===(null==e?void 0:e.dataType))).map((e=>{const t={};return(null==e?void 0:e.dateFormat)&&(t.format=e.dateFormat),"PARENT"===e.fieldValue&&(t.id="PARENT",t.keyName=e.modelKey,t.modelKey=e.modelKey,t.prop=e.prop),Object.assign({conditionKey:e.fieldName,conditionLabel:e.fieldName,conditionName:e.fieldName,conditionValueType:e.fieldType,id:e.componentId,keyName:e.fieldValue,rule:e.rule,notGlobal:!0,indexCode:e.indexCode,typeGuid:e.typeGuid,indexCodeNum:e.indexCodeNum},t)}));if(null==e?void 0:e.length)for(const t of e)f.find((e=>e.keyName===t.keyName))||f.push(t)}}const p=f.length,m=t;for(let e=0;e<p;e++){const t=f[e];if("parentCode"===(null==t?void 0:t.conditionKey))continue;const{id:o,keyName:n,prop:i,format:r,modelKey:a,dataType:l="component",customValue:s}=t,c=Un(o,n),u=Bn(t);qn(u,o,{prop:i,dateFormat:r,modelKey:a,keyName:c}),""===l&&(u.fieldValue=s||""),m.push(u)}for(let e=m.length-1;e>=0;e--){const t=m[e];if(!t.globalCondition){Tn(m).find((e=>e.alias===t.alias&&e.globalCondition))&&m.splice(e,1)}}return m};function Bn(e){const{id:t,keyName:o,conditionLabel:n,conditionKey:i,conditionValueType:r,prop:a,rule:l="NONE",notGlobal:s=!1,indexCode:c,typeGuid:u,indexCodeNum:d,dataType:h="component",isExtProperty:f}=e,p=Un(t,o);let m=p||t;m&&a&&(m+=`-${a}`);let y=l;return"NONE"===y&&(y=["startTime","endTime"].includes(a)?"startTime"===a?"GREATER_EQUAL":"LESS_EQUAL":(null==p?void 0:p.includes("startTime"))?"GREATER_EQUAL"===a:(null==p?void 0:p.includes("endTime"))?"LESS_EQUAL"===a:"EQUAL"),"PARENT"===t&&(m=e.modelKey,m&&a&&(m+=`-${a}`),y=l),{rule:y,label:n,fieldName:i,fieldValue:"",valueType:r,alias:m,globalCondition:!s,indexCode:c,typeGuid:u,indexCodeNum:d,dataType:h,isExtProperty:f}}function Kn(e){if(null==e?void 0:e.length)for(const t of e)if(null==t?void 0:t.conditions)Kn(t.conditions);else{const{id:e,keyName:o,prop:n,modelKey:i,format:r,dataType:a="component",customValue:l}=t,s=Un(e,o),c=Bn(t);qn(c,e,{prop:n,dateFormat:r,modelKey:i,keyName:s}),""===a&&(c.fieldValue=l||"");for(const e in c)t[e]=c[e];for(const e of Rn)delete t[e]}}function qn(e,t,o){const{prop:n="",dateFormat:i="",modelKey:r="",keyName:a="",operateValue:l,operateMode:s,operateType:c}=o||{},u=r||a;if("PARENT"===t&&u&&n){const t=window.config.record;let o=n,r=i;const a=n.match(/\{(.+?)\}/g);if(null==a?void 0:a.length){const t=a[0].slice(1,-1).trim();o=n.replace(a[0],""),r=t,e.dateFormat=r}if(t&&t[u]){const n=ze(t[u][o]);wt.isDayjs(n)?e.fieldValue=n.format(r||"YYYY-MM-DD"):e.fieldValue=n}return}const d=Pn(t)||{},{value:h,format:f="YYYY-MM-DD",type:p="",useCurrentTime:m,RECORD:y}=d||{},g=i||f;if(Nn(p,"date")){let t;if(t=m?h?ze(h):wt():ze(h),"string"==typeof t&&(t=wt(t)),l&&s&&c)switch(c){case"add":t=t.add(l,s);break;case"minus":t=t.subtract(l,s)}e.fieldValue=null==t?void 0:t.format(g),e.dateFormat=g}else if(Nn(p,"rangepicker")){let t=n;if(!n){const e=a&&a.split("-");(null==e?void 0:e.length)&&(t=e[e.length-1])}if(!t)return;let o=null;if(ze(d[t])&&(o=wt(ze(d[t]))),l&&s&&c)if("rangeValue"===l){if(d.startTime&&d.endTime){const e=ze(d.endTime).diff(ze(d.startTime),s)+1;switch(c){case"add":o=o?o.add(e,s):o;break;case"minus":o=o?o.subtract(e,s):o}}}else if(!isNaN(+l))switch(c){case"add":o=o?o.add(l,s):o;break;case"minus":o=o?o.subtract(l,s):o}if(o&&(e.fieldValue=null==o?void 0:o.format(g)),"rangeValue"===t&&d.startTime&&d.endTime){const t=function(e){const t=e.split("-");let o="";if(null==t?void 0:t.length)switch(t[t.length-1]){case"YYYY":o="year";break;case"MM":o="month";break;case"DD":o="day"}return o}(g);t&&(e.fieldValue=ze(d.endTime).diff(ze(d.startTime),t)+1)}e.dateFormat=g}else Nn(p,En)?e.fieldValue=r&&y?y[r]:!r&&y?y.value:ze(h):Nn(p,"select")&&Array.isArray(ze(h))?e.fieldValue=ze(h).join(","):e.fieldValue=ze(h)}const Qn=e=>{if(e){const t=Array.isArray(e)?Ln(e):[Ln(e)];let o="",n=[];const i=[],r=[],a=[];for(const e of t){let t=e.label,l=e.columnName;if(e.defaultCode&&(t=e.columnName,delete e.defaultCode),"component-value"===l&&e.componentId){const o=Pn(e.componentId)||{},{value:n}=o;ze(n)&&(t=l=ze(n))}o=e.type,"CUSTOM"===o&&(n=e.customOrderColumns),i.push(t),r.push(l),a.push(e.order)}return"CUSTOM"!==o&&(null==i?void 0:i.length)>1&&(o="COMBINATION"),"CUSTOM"===o?{label:i.join(","),columnName:r.join(","),type:o,customOrderColumns:n}:{label:i.join(","),columnName:r.join(","),order:a.join(","),type:o}}return e},Zn=e=>{const{sortCpnts:t=[]}=e;let o,n="";for(const e of t){const t=Pn(e)||{},{type:o,RECORD:i}=t;if(Nn(o,"image")&&Nn(null==i?void 0:i.value,["asc","desc"])){n=i.value.toUpperCase();break}}return n&&(o={label:e.label,columnName:e.name,order:n,type:"NORMAL"}),o},Xn=(t,o={})=>{var n,i,r,a,l,s,c,u;const{graphicConfig:d,type:h,globalModel:f,isGroupTable:p=!1,allComponentList:m}=t;f&&(Dn=f),(null==m?void 0:m.length)&&(Vn=m);const y=Nn(h,"pivottable");let g,{source:b,dataViewId:v,plugin:x="1",layer:w,chartType:S,classificationList:A=[],rowHeaderList:_=[],dimensionList:L=[],seriesList:O=[],leftAxisList:C=[],rightAxisList:j=[],queryColumnList:N=[],indexLibColumns:M=[],indicators:T=[],specialIndicators:k=[],controlList:F=[],formFields:$={},variableList:I=[],variableConditions:z=[],dataSourceId:E="",idxLibMode:D,preview:V=!1,edvDataSetId:R,compositeIndicator:P}=d||{},W=[];if("design"===(null==d?void 0:d.pageMode)?(W=(null!==(n=d.sqlConditions)&&void 0!==n?n:[]).map((e=>{const t={};if(Mn(e,"globalCondition")||e.join||(t.globalCondition=!0),!e.join){const o=e.rule||"EQUAL";t.rule="NONE"===o?"EQUAL":o}return Object.assign(Object.assign({},e),t)})),(null==z?void 0:z.length)&&(W=W.concat(z))):(W=Yn(d),(null==I?void 0:I.length)&&(W=W.concat(function(e){const t=[];if(null==e?void 0:e.length)for(const o of e)if(o.variableName){const e=Un(o.id,o.keyName),n={variateName:o.variableName,globalCondition:o.globalCondition||!1,valueType:o.variableType,alias:e||""};qn(n,o.id,{dateFormat:o.format,prop:o.dateTypeValue,keyName:e,operateType:o.operateType,operateMode:o.operateMode,operateValue:o.operateValue}),""===o.dataType&&(n.fieldValue=o.variableValue),o.format&&(n.dateFormat=o.format),o.label&&(n.label=o.label),t.push(n)}return t}(I)))),null==W?void 0:W.length){const e=W.filter((e=>e.globalCondition)),t=W.filter((e=>!e.globalCondition));(null==e?void 0:e.length)>1&&(W=[{join:"&&",conditions:e},...t])}(null==W?void 0:W.length)&&(W=Hn(W,"1")),null==w&&(w=Nn(h,["table","card"])||Nn(h,["list","circulate"])&&(null==A?void 0:A.length)>1?"1":Nn(h,["select","checkbox","radio","treeSelect"])?"3":Nn(h,["indexPanel"])?"4":"2"),Nn(h,["indexPanel"])&&(x="3");const H=[];let G,U="";if(Array.isArray(A)&&A.length>0&&(!["ecanList","ecanCirculate"].includes(h)||1===(null==A?void 0:A.length))){const e=A.length;for(let t=0;t<e;t++){const o=A[t]||{},{label:n="",name:r="",show:a=!1,sort:l,customGroup:s,conditions:c,dateFormat:u,typeGuid:d="",truncations:f=[],isExtProperty:p}=o;if(a||1===e){U=d,g={label:n.trim(),columnName:r,show:a,sort:Zn(o)||Qn(l)||l,customGroup:s,conditions:Hn(c),typeGuid:d},u&&(g.dateFormat=u),"the_date"!==r||g.dateFormat||(g.dateFormat="YYYY-MM-DD"),p&&(g.isExtProperty=p);const e={};if(Array.isArray(f)&&f.length>0){const t=f.length;for(let o=0;o<t;o++){const t=f[o]||{},{rule:n="",num:i=0,name:r=""}=t;n&&i&&(e.num=i,e.rule=n,r&&(e.otherGroupName=r))}}if((null===(i=Object.keys(e))||void 0===i?void 0:i.length)&&(g.truncation=e),!Nn(h,["scatter","valueline"]))break;H.push(g)}}}if(Array.isArray(O)&&O.length>0){const e=O.length;for(let t=0;t<e;t++){const o=O[t]||{},{label:n="",name:i="",show:r=!1,sort:a,customGroup:l,conditions:s,typeGuid:c,dateFormat:u=""}=o;if(r||1===e){G={label:n.trim(),columnName:i,show:r,sort:Qn(a),customGroup:l,conditions:Hn(s),typeGuid:c},u?G.dateFormat=u:"the_date"===i&&(G.dateFormat="YYYY-MM-DD");break}}}const Y=[];null==C||C.forEach((e=>{e.location="LEFT",Y.push(Gn(e,g))})),null==j||j.forEach((e=>{e.location="RIGHT",Y.push(Gn(e,g))}));let B=T;(null==o?void 0:o.pivotTableCal)&&(B=(null===(r=o.pivotTableCal)||void 0===r?void 0:r.indicators)||[]),null==B||B.forEach((e=>{e.location="LEFT",Y.push(Gn(e,g))}));const K=[];null==k||k.forEach((e=>{e.location="LEFT",K.push(Gn(e,g))}));const q=[];["ecanList","ecanCirculate"].includes(h)&&(null==A?void 0:A.length)>1&&(N=A),(null==o?void 0:o.pivotTableCal)&&(N=(null===(a=o.pivotTableCal)||void 0===a?void 0:a.dimensions)||[]),null==N||N.forEach((e=>{const{label:t,name:n,location:i,show:r,indexCode:a,sort:l,typeGuid:s,indexCodeNum:c,dateFormat:u,conditions:d,isExtProperty:h,aggregate:f,customGroup:p}=e;let m=Qn(l);if(o.sort){const{field:n,order:i}=o.sort;let r=Y.find((e=>e.label===n));r||t!==n||(r=e),r&&(m={columnName:r.columnName,label:o.sort.field,order:i.toUpperCase(),type:"NORMAL"})}const y={label:t,columnName:n,location:i,show:r,sort:m,calcType:"COLUMN",hrpIndexCode:a,hrpIndexCodeNum:c,conditions:Hn(d),typeGuid:s,customGroup:p};u&&(y.dateFormat=u),"the_date"!==n||y.dateFormat||(y.dateFormat="YYYY-MM-DD"),h&&(y.isExtProperty=h),f&&(y.aggregate=f),q.push(y)}));const Q=[];["ecanTable"].includes(h)&&d.isIndexSet&&M.forEach((e=>{const t={label:e.label,calcType:e.calcType,show:e.show};e.formula&&(t.formula=e.formula),Q.push(t)}));let Z=[],X=[];if(Array.isArray(_)&&_.length>0?X=_:Array.isArray(L)&&L.length>0&&(X=L),null==X?void 0:X.length){const e=X.length;for(let t=0;t<e;t++){const e=X[t]||{},{label:n="",name:i="",show:r=!1,sort:a,customGroup:s,conditions:c,truncations:u,typeGuid:d="",dateFormat:h,isExtProperty:f}=e;let p=Qn(a);if(o.sort){const{field:t,order:n}=o.sort;let i=Y.find((e=>e.label===t));i||e.label!==t||(i=e),i&&(p={columnName:i.columnName,label:o.sort.field,order:n.toUpperCase(),type:"NORMAL"})}const m={label:n.trim(),columnName:i,show:r,sort:p,customGroup:s,conditions:Hn(c),typeGuid:d};h&&(m.dateFormat=h),"the_date"!==i||m.dateFormat||(m.dateFormat="YYYY-MM-DD"),f&&(m.isExtProperty=f);const y={};if(Array.isArray(u)&&u.length>0){const e=u.length;for(let t=0;t<e;t++){const e=u[t]||{},{rule:o="",num:n=0,name:i=""}=e;o&&n&&(y.num=n,y.rule=o,i&&(y.otherGroupName=i))}}(null===(l=Object.keys(y))||void 0===l?void 0:l.length)&&(m.truncation=y),Z.push(m)}}let J,ee=[];const te=[];if(null==o?void 0:o.pivotTableCal){let t=[];const{calc:n=[],filter:i=[],truncations:r=[],sorts:a=[],aggregateMethod:l=[],rowDimensionKeys:u=[],colDimensionKeys:d=[]}=o.pivotTableCal;if(Y.push(...n),null==i?void 0:i.length){const o=function e(t){const o=[];for(const n of t)n.conditions?o.push(...e(n.conditions)):"the_date"===n.conditionKey&&o.push(n);return o}(F);for(const n of i){const{type:i}=n,r=e(n,["type"]);"indicators"===i?t=Y:"dimension"===i&&(t=q);const a=t.find((e=>e.columnName===n.fieldName&&e.label===n.label));if(a)if("indicators"===i)a.filter={rule:r.rule,fieldValue:r.fieldValue};else if("dimension"===i){let e=!0;"the_date"===r.fieldName&&2===(null==o?void 0:o.length)&&(e=!1,te.push(r)),e&&(a.conditions||(a.conditions=[]),a.conditions.push(r))}}}if(null==r?void 0:r.length)for(const e of r){const t=q.find((t=>t.label===e.key));t&&(t.truncation={num:e.num,rule:e.rule})}if(null==a?void 0:a.length)for(const o of a){const{fieldType:n,columnData:i}=o,r=e(o,["fieldType","columnData"]);"indicators"===n?(t=Y,J=i):"dimension"===n&&(t=q);const a=t.find((e=>e.label===r.label));a&&(a.sort=Object.assign(Object.assign({},r),{columnName:a.columnName}))}if(null===(s=Object.keys(l))||void 0===s?void 0:s.length)for(const e in l){const t=q.find((t=>t.label===e));t&&(null===(c=l[e])||void 0===c?void 0:c.length)&&(t.aggregateMethod=l[e])}Z=[],ee=[];for(const e of q)u.includes(e.columnName)?Z.push(e):d.includes(e.columnName)&&ee.push(e)}if(Nn(h,["text","proportion","counter","gauge"])?S="zb":Nn(h,["valueline"])?S="valueline":Nn(h,["indexPanel"])?S="indexPanel":Nn(h,["boxplot"])?S="boxplot":Nn(h,["budget"])&&(S="budget"),p||"card"===h){if(0===Z.length||0===Y.length)return;S="grouptable"}else{if("1"===w&&!q.length&&!Q.length)return;if(["2","4"].includes(w)&&0===Y.length)return;if(!("3"!==w||(U||"EDV_DATA_SET"===b)&&$.labelField&&$.valueField))return;if("3"===w&&"ecanDataSelect"===h&&0===Y.length)return}let oe;if((null==L?void 0:L.length)&&(w="1",S="grouptable"),y||Nn(h,["scatter","valueline"])||!(null===(u=Object.keys($))||void 0===u?void 0:u.length)){let e={};e=Nn(h,["scatter","valueline"])?{classifications:H}:{classification:g},(null==Q?void 0:Q.length)&&(e.indexLibColumns=Q,e.isIndexSet=!0),(null==K?void 0:K.length)&&(e.specialIndicatorList=K),Nn(h,"table")&&d.isIndexSet&&(e.compositeIndicator=P),d.isIndexQuery&&(e.isIndexQuery=d.isIndexQuery);const o=W.map((e=>{const{fieldValue:t}=e,o={};return t&&Array.isArray(t)&&(o.fieldValue=JSON.stringify(t)),Object.assign(Object.assign({},e),o)}));(null==te?void 0:te.length)&&function e(t){for(const o of t)if(o.sqlConditions)e(o.sqlConditions);else if("the_date"===o.fieldName){const e=te.find((e=>e.prop===o.prop));e&&(o.fieldValue=e.fieldValue)}}(o),oe=Object.assign({url:"/diagram",source:b,dataViewId:v,plugin:y?"5":x,layer:w,chartType:y?"pivot-table":S,series:G,indicatorList:Y,queryColumns:p?[]:q,pageFlag:!0,edvDataSetId:R||"",sqlConditions:o,idxLibMode:D,dataSourceId:E,preview:V,rowHeaders:Z,keyName:t.keyName,columnData:J,columnHeaders:y?ee:void 0},e)}else{const e=Tn(F).find((e=>"parentCode"===e.conditionKey)),o={};if(e){const t=Pn(e.id)||{};(null==t?void 0:t.itemCodes)?o.parentItemCodes=t.itemCodes:o.parentItemCodes=null}"ecanDataSelect"===h&&(o.indicatorList=Y.filter((e=>e.show))),"EDV_DATA_SET"===b&&(o.edvDataSetId=R),(null==g?void 0:g.sort)&&(o.sort=g.sort);let n="normalSelect";"ecanDataSelect"===h?n="normalSelectData":"ecanTreeSelect"===h&&(n="treeSelect"),oe=Object.assign({url:"/diagram/formData",source:b,dataViewId:v,plugin:"4",layer:w,chartType:"ecanTreeSelect"===h?"treeSelect":"normalSelect",rangeIndexTypeGuid:U,type:n,labelField:$.labelField,valueField:$.valueField,parentField:$.parentField,sqlConditions:W,idxLibMode:"WITH_DATE_DIM_TABLE",dataSourceId:E,keyName:t.keyName},o)}return oe},Jn=(e=[],t,o=!1)=>{let{name:n="name",types:i=[]}=t||{};n=(null==n?void 0:n.trim())||n;const r=new Set,a=new Map,l=e.length,s=i.length;if(1!==l||o)for(let t=0;t<l;t++){const o=e[t],l=o[n];r.add(l);for(let e=0;e<s;e++){const t=i[e],{label:n,value:r}=t,l=Object.assign(Object.assign({},o),{value:o[r]});if(a.has(n)){const e=a.get(n);e.push(l),a.set(n,e)}else a.set(n,[l])}}else{const t=[];for(let o=0;o<s;o++){const n=i[o],{label:a,value:l}=n,s=Object.assign(Object.assign({},e[0]),{value:e[0][l]});r.add(a),t.push(s)}const o=e[0][n]||"";a.set(o,t)}const c=Array.from(r),u=[];for(const[e,t]of a)u.push({name:e,data:t});return{dimensions:c,dataset:u}},ei=(e,t)=>{let{name:o="name",value:n="value",type:i="type"}=t||{};o=null==o?void 0:o.trim(),n=null==n?void 0:n.trim(),i=null==i?void 0:i.trim();const r=new Map,a=e.length;for(let t=0;t<a;t++){const a=e[t],l=a[o]||"",s=a[n]||"",c=a[i]||"";if(r.has(c)){const e=r.get(c);e.push(Object.assign({name:l,value:s},a)),r.set(c,e)}else r.set(c,[Object.assign({name:l,value:s},a)])}const l=[],s=[];for(const[e,t]of r)if(s.push({name:e,data:t}),null==t?void 0:t.length)if(l.length)for(const e of t)l.includes(e.name)||l.push(e.name);else l.push(...t.map((e=>e.name)));return{dimensions:l,dataset:s}},ti=(e,t)=>{var o;if(null==e)return t;const n=e.match(/\{.*\}/g);if(null==n||0===n.length)return t;const i=n.length;for(let r=0;r<i;r++){const i=n[r];if(null==i||""===i)break;let a=null===(o=i.slice(1,-1))||void 0===o?void 0:o.trim();a=null==a?void 0:a.replace(/value/g,t);try{let t=a;(/\(.*\)/g.test(a)||/[+/\\*]/g.test(a))&&(t=Cn(a)),e=e.replace(i,t)}catch(t){e=e.replace(i,a)}}return e},oi=(e,t,o)=>{let n=e.dataFieldNames;if("indicator"===e.dataType&&"design"!==(null==o?void 0:o.pageMode)&&t){const{formFields:e={}}=t;(null==e?void 0:e.labelField)&&(null==e?void 0:e.valueField)&&(n={name:e.labelField,value:e.valueField})}return n},ni=e=>{var t,o;const n=null===(t=null==e?void 0:e.chart.getModel())||void 0===t?void 0:t.getComponent("yAxis").axis.scale._extent,i=null===(o=null==e?void 0:e.chart.getModel())||void 0===o?void 0:o.getComponent("xAxis").axis.scale._extent;let r={};return i&&n&&(r={xAxisMinValue:i[0],xAxisMaxValue:i[1],yAxisMinValue:n[0],yAxisMaxValue:n[1]}),r};function ii(e,t,o){switch(t){case"startX":e[0].coord[0]=+o;break;case"startY":e[0].coord[1]=+o;break;case"endX":e[1].coord[0]=+o;break;case"endY":e[1].coord[1]=+o}}const ri=(e,t,o)=>{let n=0,i=[];switch(t.x?i=ze(o).map((e=>e.value[0])):t.y&&(i=ze(o).map((e=>e.value[1]))),e){case"max":n=Math.max(...i);break;case"min":n=Math.min(...i);break;case"average":r=i,n=Array.isArray(r)&&0!==r.length?r.reduce(((e,t)=>e+t),0)/r.length:0;break;case"median":n=function(e){if(!Array.isArray(e)||0===e.length)return 0;const t=[...e].sort(((e,t)=>e-t)),o=t.length,n=Math.floor(o/2);return o%2!=0?t[n]:(t[n-1]+t[n])/2}(i)}var r;return n},ai={"最大值":"{max}","最小值":"{min}","平均值":"{average}","中位数":"{median}"};function li(e,t,{fontSize:o,graphicConfig:n,maxValueObj:i,componentValues:r,callBackMethodMap:a}){const l=oi(e,n,a),s=e.xAxisLabelFormatter,c=e.yAxisLabelFormatter,u=i?((e,t,o,n)=>{const{xAxisMarkLineValue:i=[],yAxisMarkLineValue:r=[]}=e,{xAxisMinValue:a,xAxisMaxValue:l,yAxisMinValue:s,yAxisMaxValue:c}=t,u=i.map((e=>Object.assign(Object.assign({},e),{x:!0}))),d=r.map((e=>Object.assign(Object.assign({},e),{y:!0}))),h=u.concat(d);if(null==h?void 0:h.length){const e=[];for(const t of h){const i={label:{show:!0,formatter:"",rich:{ft:{}}}},r={};let u=t.value;const d=null==u?void 0:u.match(/\{(.+?)\}/g);let h="";if(i.label.formatter=t.label?`{ft|${t.label}}`:"",(t.offsetHorizontal||t.offsetVertical)&&(t.x?i.label.rich.ft.padding=[0,t.offsetHorizontal||0,t.offsetVertical||0,0]:t.y&&(i.label.rich.ft.padding=[t.offsetVertical||0,0,0,t.offsetHorizontal||0])),t.labelColor&&(i.label.rich.ft.color=t.labelColor),t.lineColor&&(r.color=t.lineColor),t.lineType&&(r.type=t.lineType),t.x?h="xAxis":t.y&&(h="yAxis"),null==d?void 0:d.length){for(const e of d)u=u.replace(e,e.slice(1,-1));if(u){let d;d=n&&n.value[u]?ze(n)[u]:Cn(u,{axisMax:t.x?ze(l):t.y?ze(c):0,axisMin:t.x?ze(a):t.y?ze(s):0,max:ri("max",t,o),min:ri("min",t,o),average:ri("average",t,o),median:ri("median",t,o)}),isNaN(+d)||e.push(Object.assign({[h]:+d,lineStyle:r},i))}}else isNaN(+t.value)||e.push(Object.assign({[h]:t.value,lineStyle:r},i))}return{symbol:["none","none"],data:e}}return{data:[]}})(e,i,t,r):void 0,d=i?((e,t,o)=>{const{axisMarkArea:n=[]}=e,{xAxisMinValue:i,xAxisMaxValue:r,yAxisMinValue:a,yAxisMaxValue:l}=t;if(null==n?void 0:n.length){const e=[];for(const t of n){const n=[{name:t.label||"",coord:[],itemStyle:{color:t.color||"transparent"},label:{show:!!t.label,position:"inside",fontSize:16,color:"#000"}},{coord:[]}];for(const e in t)if(["startX","startY","endX","endY"].includes(e)){let s=ai[t[e]]||t[e];const c=null==s?void 0:s.match(/\{(.+?)\}/g);if(null==c?void 0:c.length){for(const e of c)s=s.replace(e,e.slice(1,-1));if(s){const t={x:e.includes("X"),y:e.includes("Y")},c=Cn(s,{xMax:ze(r),xMin:ze(i),yMax:ze(l),yMin:ze(a),max:ri("max",t,o),min:ri("min",t,o),average:ri("average",t,o),median:ri("median",t,o)});isNaN(+c)||ii(n,e,c)}}else isNaN(+t[e])||ii(n,e,t[e])}n.every((e=>{var t;return null===(t=e.coord)||void 0===t?void 0:t.length}))&&e.push(n)}return{data:e}}return{data:[]}})(e,i,t):void 0,{visualColorKey:h,visualColorCondition:f,visualSizeKey:p,visualSizeCondition:m}=e;let y;h&&(y=function(e,t,o){const n=e=>{if(e.name)return e.name;const t=!!(null==e?void 0:e.value1),o=!!(null==e?void 0:e.value2);return t&&!o?`${e.rule1}${e.value1}`:!t&&o?`${e.rule2}${e.value2}`:`${e.value1}-${e.value2}`},i={};return o.forEach((e=>{(e.value1||e.value2)&&(i[n(e)]={data:[],color:e.color})})),i["其他"]={data:[]},e.forEach((e=>{const r=Number(e.record[t]);let a=!1;for(const t of o){if(!t.value1&&!t.value2)continue;const o=t.value1?Number(t.value1):-1/0,l=t.value2?Number(t.value2):1/0;let s=!0,c=!0;if(">="===t.rule1?s=r>=o:">"===t.rule1?s=r>o:"<="===t.rule1?s=r<=o:"<"===t.rule1?s=r<o:"=="===t.rule1&&(s=r===o),""!==t.value2&&(">="===t.rule2?c=r>=l:">"===t.rule2?c=r>l:"<="===t.rule2?c=r<=l:"<"===t.rule2?c=r<l:"=="===t.rule2&&(c=r===l)),s&&c){i[n(t)].data.push(e),a=!0;break}}a||i["其他"].data.push(e)})),i}(t,h,Ln(f).reverse()));const g=t=>{var o;let n="",i=e.labelFormatter;""===i&&(i="{c}");const{seriesName:r,data:a}=t||{},s=null!==(o=null==a?void 0:a.record)&&void 0!==o?o:{},c=s[l.name],u=s[l.value];return n+=jn(i,{textData:Object.assign({name:c,value:u,a:r,b:c,c:u||0},s)},{useNewline:!0,useSpace:!0}),n},b=function(e=[]){const t=[];for(const o of e){let e="";o.value1&&(e+=`value ${o.rule1} ${o.value1}`),o.value2&&(e+=`${o.value1?"&&":""} value ${o.rule2} ${o.value2}`),e&&t.push({rule:e,size:o.size})}return t.reverse()}(m),v=(t,o)=>{if(p){const{record:e={}}=o.data||{},t=e[p],n=b.find((e=>Cn(e.rule,{value:t})));if(n)return n.size}return e.symbolSize},x={type:"scatter",data:ze(t),symbolSize:v,itemStyle:{color:e.symbolColor},label:{show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:g},markLine:u,markArea:d},w=[],S=[];if(y)for(const t in y){const o=y[t],n=Ln(x);n.symbolSize=v,n.label.formatter=g,n.itemStyle.color=o.color||e.symbolColor,n.data=o.data,n.name=t,S.push(n),w.push(t)}else S.push(x);return{xAxis:{z:5,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,formatter:e=>("string"!=typeof e||"0"!==e[0]||isNaN(+e)||(e=(+e).toString()),ti(s,e))},axisLine:{lineStyle:{color:e.xAxisLineStyleColor},symbol:["none",e.showXAxisLineArrow?"arrow":"none"],symbolSize:[8,12],onZero:!1},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameLocation:e.xAxisLineInverse?"start":"end",nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},inverse:e.xAxisLineInverse,max:e.xAxisMax,min:e.xAxisMin},yAxis:{z:5,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},axisTick:{show:e.yAxisTickShow},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,formatter:e=>ti(c,e)},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor},symbol:["none",e.showYAxisLineArrow?"arrow":"none"],symbolSize:[8,12],onZero:!1},name:e.yAxisName,nameLocation:e.yAxisLineInverse?"start":"end",nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},inverse:e.yAxisLineInverse,max:e.yAxisMax,min:e.yAxisMin},tooltip:{show:e.tooltipShow,trigger:e.tooltipTrigger,formatter(t){var o,n;const{marker:i,seriesName:r,componentType:a}=t,s=null!==(n=null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.record)&&void 0!==n?n:{},c=s[l.name],u=s[l.value];return["markLine","markArea"].includes(a)?"":jn(e.tooltipFormatter,{textData:Object.assign({marker:i,seriesName:r,a:r,b:c,c:u},s)},{useNewline:!0,useSpace:!0})},axisPointer:{type:e.crossShow||void 0===e.crossShow?"cross":""},textStyle:{fontSize:ze(o)},position:e.tooltipPosition||void 0},legend:{show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{color:e.legendTextStyleColor,fontSize:o},data:w},series:S}}function si(e){let t="";switch(e){case 1:t="万";break;case 3:t="百万";break;case 4:t="千万"}return t}const ci=(e,t,o)=>{switch(((e,t)=>{if(!e)return e||"";if(e.toLowerCase().startsWith(t.toLowerCase())){const o=e.slice(t.length);return o?o.charAt(0).toLowerCase()+o.slice(1):""}return e})(e.type,"ecan")){case"bar":return function(e,t,{fontSize:o,callBackMethodMap:n,lowVersion:i}){console.log("");const r=e.yAxisLabelFormatter,a=e.xAxisLabelFormatter,l=$e(t.dataset),s=$e(t.dimensions),c=yt((()=>{const{gradientShow:t,gradientColors:o,gradientOffset:n,barBorderRadius:r}=e,a=ze(l),s=a.length,c=[];for(let l=0;l<s;l++){const u=Object.assign(Object.assign({},a[l]),{type:"bar",barWidth:e.barWidth.value+e.barWidth.suffix,showBackground:e.showBarBackground,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)"}});if(e.isStack&&(u.stack="stack"),u.label={show:e.labelShow,fontSize:zn(e.labelFontSize,i),position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:t=>{let o="",n=e.labelFormatter;""===n&&(n="{c}");const{seriesName:i,name:r,value:a,data:l}=t||{};return o+=jn(n,{textData:Object.assign({name:r,value:a,a:i,b:r,c:a||0},l)},{useNewline:!0,useSpace:!0}),o}},u.itemStyle={},t){let t=e.colors[l];if(!t&&e.colors.length){const o=(l+1)%e.colors.length-1;t=o>0?e.colors[o]:e.colors[0]}t||(t="#5470C6"),u.itemStyle={color:{x:e.isUseHorizontalAxis?1:0,y:0,x2:0,y2:e.isUseHorizontalAxis?0:1,colorStops:[{offset:0,color:t},{offset:n,color:o[l]},{offset:1,color:o[l]}]}}}if(r&&(!e.isStack||l===s-1)){const e=r.split(",");if(null==e?void 0:e.length){const t=[];for(const o of e){const e=parseFloat(o);isNaN(e)||t.push(e)}u.itemStyle.borderRadius=t,u.itemStyle.barBorderRadius=t}}e.isShowMarkLine&&(u.markLine={data:[{type:e.markLineType}]}),c.push(u)}return c})),u=yt((()=>ze(s).map((e=>{let t={};return t=e&&"object"==typeof e?Object.assign(Object.assign({},e),{textStyle:{fontSize:o}}):{value:e,textStyle:{fontSize:o}},t}))));return{tooltip:{trigger:"axis",show:e.tooltipShow,formatter:t=>{var i;const r=t.length;let l="",s=e.tooltipFormatter;(null==n?void 0:n.getCurrentData)&&n.getCurrentData(null===(i=t[0])||void 0===i?void 0:i.data),""===s&&(s="{marker} {a} {c}");for(let e=0;e<r;e++){const{color:n,seriesName:i,name:r,value:c,data:u}=t[e]||{};if(0===e){let e=r;"undefined"===r&&(e=""),"string"!=typeof r||"0"!==r[0]||isNaN(+r)||(e=(+r).toString()),l+=`${ti(a,e)}${e?"<br/>":""}`}const d=o>10?o-4:10;l+=jn(s,{textData:Object.assign({marker:`<span style="display:inline-block;margin-right:4px;border-radius:${d}px;width:${d}px;height:${d}px;background-color:${n};"></span>`,name:r,value:c,a:i,b:r,c:u.sourceValue||c||0},u)},{useNewline:!0,useSpace:!0}),l+="<br/>"}return l},textStyle:{color:e.tooltipTextStyleColor,fontSize:o},position:e.tooltipPosition||void 0},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:zn(e.legendFontSize,i)}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:ze(l).map(((t,o)=>({name:t.name,itemStyle:{color:e.colors[o]},icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},xAxis:{type:e.isUseHorizontalAxis?"value":"category",data:e.isUseHorizontalAxis?null:ze(u),inverse:e.isUseHorizontalAxis?e.xAxisInverse:e.axisInverse,minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor,type:e.xAxisSplitLineType},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter:e=>("string"!=typeof e||"0"!==e[0]||isNaN(+e)||(e=(+e).toString()),ti(a,e))},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:{type:e.isUseHorizontalAxis?"category":"value",data:e.isUseHorizontalAxis?ze(s):null,inverse:e.isUseHorizontalAxis?e.axisInverse:e.yAxisInverse,minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisTick:{show:e.yAxisTickShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,rotate:e.yAxisLabelRotate,width:e.yAxisLabelWidth,overflow:e.yAxisLabelOverflow,formatter:e=>ti(r,e)},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:e.yAxisName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},max:e.yAxisMaxValue||null},series:ze(c)}}(e,t,o);case"line":return function(e,t,{fontSize:o,callBackMethodMap:n}){const i=e.yAxisLabelFormatter,r=e.xAxisLabelFormatter,a=$e(t.dataset),l=$e(t.dimensions),s=t.dataset,c=yt((()=>{const t=[],o=s.length;for(let i=0;i<o;i++){const o={};e.shadowColor&&(o.shadowColor=e.shadowColor,o.shadowBlur=e.shadowBlur,o.shadowOffsetY=e.shadowOffsetY,o.shadowOffsetX=e.shadowOffsetX);let r=e.colors[i];if(!r&&e.colors.length){const t=(i+1)%e.colors.length-1;r=t>0?e.colors[t]:e.colors[0]}r||(r="#5470C6"),t.push(Object.assign(Object.assign(Object.assign({type:"line"},s[i]),{symbolSize:e.symbolSize,smooth:e.smooth,areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:r},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:r,opacity:e.areaStyleOpacity},lineStyle:Object.assign({width:e.lineStyleWidth},o)}),(n=e).isShowMarkLine?{markLine:{data:[{type:n.markLineType}]}}:{}))}var n;return t}));return{tooltip:{trigger:"axis",textStyle:{fontSize:o,color:e.tooltipTextStyleColor},show:e.tooltipShow,formatter:t=>{var i;const a=t.length;let l="",s=e.tooltipFormatter;(null==n?void 0:n.getCurrentData)&&n.getCurrentData(null===(i=t[0])||void 0===i?void 0:i.data),""===s&&(s="{marker} {a} {c}");for(let e=0;e<a;e++){const{color:n,seriesName:i,name:a,value:c,data:u}=t[e]||{};if(0===e){let e=a;"string"!=typeof a||"0"!==a[0]||isNaN(+a)||(e=(+a).toString()),l+=`${ti(r,e)}<br/>`}const d=o>10?o-4:10;l+=jn(s,{textData:Object.assign({marker:`<span style="display:inline-block;margin-right:4px;border-radius:${d}px;width:${d}px;height:${d}px;background-color:${n};"></span>`,name:a,value:c,a:i,b:a,c:c||0},u)},{useNewline:!0,useSpace:!0}),l+="<br/>"}return l},position:e.tooltipPosition||void 0},xAxis:{type:"category",boundaryGap:e.isBoundaryGap,data:ze(l).map((e=>{let t={};return t=e&&"object"==typeof e?Object.assign({},e):{value:e},t})),minInterval:e.xAxisMinInterval,splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter:e=>("string"!=typeof e||"0"!==e[0]||isNaN(+e)||(e=(+e).toString()),ti(r,e))},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:{type:"value",minInterval:e.yAxisMinInterval,splitLine:{show:e.yAxisSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:e.yAxisSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,formatter:e=>ti(i,e)},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:e.yAxisName,nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:"right"},max:e.yAxisMaxValue||null},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:ze(a).map((t=>({name:t.name,icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},series:ze(c)}}(e,t,o);case"pie":return function(e,t,{fontSize:o,lowVersion:n}){var i,r;const a=$e(t.dataset);let{data:l=[]}=ze(a)[0]||{};if(Array.isArray(e.colors)){const t=e.isUseLabelColors,o=e.colors;l=l.map(((e,n)=>Object.assign({label:t?{color:o[n]}:{}},e)))}return{tooltip:{show:e.tooltipShow,trigger:e.tooltipTrigger,formatter:t=>{const{marker:o,seriesName:n,name:i,value:r,percent:a,data:l}=t||{};return jn(e.tooltipFormatter,{textData:Object.assign({marker:o,name:i,value:r,percent:a,a:n,b:i,c:r,d:a},l)},{useNewline:!0,useSpace:!0})},textStyle:{color:e.tooltipTextStyleColor},position:e.tooltipPosition||void 0},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,align:"left",textStyle:{lineHeight:o+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:o}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:null===(r=null===(i=ze(a)[0])||void 0===i?void 0:i.data)||void 0===r?void 0:r.map((t=>({name:t.name,icon:e.legendType}))),formatter:t=>{const{data:o}=a.value[0]||{};let n,i=0,r="0%";if(o)for(const e of o)e.name===t&&(n=+e.value),i+=+e.value;return i&&(r=`${(n/i*100).toFixed(2)}%`),kn(e.legendFormatter,{name:t,value:n,percent:r})}},series:[{data:l,type:"pie",radius:[e.innerRadius,e.outerRadius],center:[e.centerLeft,e.centerTop],roseType:e.roseType,avoidLabelOverlap:!0,minAngle:e.minAngle,label:{show:"center"!==e.labelPosition&&e.labelShow,color:e.labelColor,fontSize:zn(e.labelFontSize,n),position:e.labelPosition,formatter:t=>{let o="",n=e.labelFormatter;""===n&&(n="{b}\n{d}%"),n=n.replace(/\\n/g,"\n");const{name:i,value:r,data:a,percent:l}=t||{};return o+=jn(n,{textData:Object.assign({name:i,value:r,b:i,d:r||0,percent:l},a)},{useNewline:!1,useSpace:!1}),o},width:e.labelWidth,overflow:e.labelOverflow},labelLine:{show:e.labelLineShow,length:e.labelLineLength,length2:e.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}}(e,t,o);case"radar":return function(e,t,o){const n=$e(t.dimensions),i=$e(t.dataset),r=yt((()=>{var e;const t=[],o=[],r=ze(i),a=r.length;for(let e=0;e<a;e++){const{data:t=[]}=r[e];for(let e=0;e<t.length;e++)o.push(t[e].value)}if(null===(e=n.value)||void 0===e?void 0:e.length){const e=(null==o?void 0:o.length)?1.2*Math.max(...o):0;for(const o of n.value)t.push({name:o,max:e})}return t})),a=yt((()=>{const t=ze(i),o=t.length,n=[];for(let i=0;i<o;i++){const{name:o,data:r=[]}=t[i],a=[{name:o,value:r.map((e=>e.value))}];let l=e.colors[i];if(!l&&e.colors.length){const t=(i+1)%e.colors.length-1;l=t>0?e.colors[t]:e.colors[0]}l||(l="#5470C6");let s=l;if(e.gradientShow){const{gradientOffset:t,gradientColors:o}=e;s={x:.7,y:0,x2:0,y2:0,colorStops:[{offset:0,color:l},{offset:t,color:o[i]},{offset:1,color:o[i]}]}}const c={type:"radar",name:o,data:a,areaStyle:{color:s,opacity:e.areaStyleOpacity},tooltip:{trigger:"item"},symbolSize:e.symbolSize,lineStyle:{width:e.lineStyleWidth},label:{show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:t=>{const{data:o,value:n}=t;let i=0,r="0%";if(o)for(const e of o.value)i+=+e;return i&&(r=`${(n/i*100).toFixed(2)}%`),jn(e.labelFormatter,{textData:{value:n,percent:r}},{useNewline:!1,useSpace:!1})}}};n.push(c)}return n})),l=yt((()=>({tooltip:{trigger:"axis",textStyle:{fontSize:o.value},show:e.tooltipShow,formatter:t=>{let o="",n=e.tooltipFormatter;""===n&&(n="{marker} {a} {c}");for(let e=0;e<ze(r).length;e++){const i=ze(r)[e],{marker:a,seriesName:l,value:s}=t||{};0===e&&l&&(o+=`${l}<br/>`),o+=jn(n,{textData:{marker:a,name:i.name,value:s[e],a:i.name,b:i.name,c:s[e]||0,type:l}},{useNewline:!0,useSpace:!0}),o+="<br/>"}return o},position:e.tooltipPosition||void 0},radar:{indicator:ze(r),axisName:{color:e.axisNameColor}},legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:ze(i).map((t=>({name:t.name,icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},series:ze(a)})));return ze(l)}(e,t,o);case"scatter":return li(e,t,o);case"comboGraph":return function(e,t,{fontSize:o,callBackMethodMap:n}){const i=$e(t.dimensions),r=$e(t.dataset),a=t.dataset,l=t=>{const o=[];let n=0;return e.seriesTypes.forEach(((e,n)=>{var i,a;e.axisIndex===t&&(null===(a=null===(i=ze(r)[n])||void 0===i?void 0:i.data)||void 0===a?void 0:a.length)&&o.push(...ze(r)[n].data.map((e=>+e.value)))})),o.some((e=>e>=1e7))?n=4:o.some((e=>e>=1e6))?n=3:o.some((e=>e>=1e4))&&(n=1),n},s=$e([0,0]),c=yt((()=>{const t=e.yAxis;return null==t?void 0:t.map(((t,o)=>{const n=s.value[o];let i;return n&&(i=1e4*Math.pow(10,n-1)),{type:"value",minInterval:e.yAxisMinInterval,splitLine:{show:0===o?e.yAxisLeftSplitLineShow:e.yAxisRightSplitLineShow,lineStyle:{color:e.yAxisSplitLineStyleColor,type:0===o?e.yAxisLeftSplitLineType:e.yAxisRightSplitLineType}},splitArea:{show:e.yAxisSplitAreaShow},axisLabel:{show:e.yAxisLabelShow,fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,formatter(e){let o=e;return i&&(o=(+e/i).toString()),ti(t.axisLabelFormatter,o)}},axisLine:{show:e.yAxisLineAlwaysDisplay,lineStyle:{color:e.yAxisLineStyleColor}},name:si(n)+(0===o?e.yAxisLeftName:e.yAxisRightName),nameTextStyle:{fontSize:e.yAxisLabelFontSize,color:e.yAxisLabelColor,align:0===o?"right":"left"},max:e.yAxisMaxValue||null}}))}));s.value[0]=e.yAxisLeftUnitAdapt?l(0):0,s.value[1]=e.yAxisRightUnitAdapt?l(1):0;const u={legend:{type:e.legendScroll?"scroll":"plain",width:e.legendWidth,height:e.legendHeight,show:e.legendShow,orient:e.legendOrient,top:e.legendTop,left:e.legendLeft,textStyle:{lineHeight:parseFloat(e.legendFontSize)+8,rich:{text:{width:e.legendTextWidth,color:e.legendTextStyleColor,fontSize:e.legendFontSize}}},itemHeight:e.legendItemHeight,itemWidth:e.legendItemWidth,itemGap:e.legendItemGap,data:ze(r).map(((t,o)=>({name:t.name,itemStyle:{color:e.colors[o]},icon:e.legendType}))),formatter:t=>kn(e.legendFormatter,{name:t})},tooltip:{trigger:"axis",show:e.tooltipShow,formatter:t=>{var i;const r=t.length;let a="",l=e.tooltipFormatter;(null==n?void 0:n.getCurrentData)&&n.getCurrentData(null===(i=t[0])||void 0===i?void 0:i.data),""===l&&(l="{marker} {a} {c}");const s=e.seriesTypes;for(let n=0;n<r;n++){const i=s[n],{tooltipFormatter:r}=i||{},{color:c,seriesName:u,name:d,value:h,data:f}=t[n]||{};if(0===n){let t=d;"string"!=typeof d||"0"!==d[0]||isNaN(+d)||(t=(+d).toString()),a+=`${ti(e.xAxisLabelFormatter,t)}<br/>`}const p=o>10?o-4:10;a+=jn(r||l,{textData:Object.assign({marker:`<span style="display:inline-block;margin-right:4px;border-radius:${p}px;width:${p}px;height:${p}px;background-color:${c};"></span>`,name:d,value:h,seriesName:u,a:u,b:d,c:h||0},f)},{useNewline:!0,useSpace:!0}),a+="<br/>"}return a},textStyle:{color:e.tooltipTextStyleColor,fontSize:o},position:e.tooltipPosition||void 0},xAxis:{minInterval:e.xAxisMinInterval,type:"category",data:ze(i).map((e=>{let t={};return t=e&&"object"==typeof e?Object.assign({},e):{value:e},t})),splitLine:{show:e.xAxisSplitLineShow,lineStyle:{color:e.xAxisSplitLineStyleColor},interval:e.xAxisSplitLineInterval},splitArea:{show:e.xAxisSplitAreaShow},axisLabel:{show:e.xAxisLabelShow,color:e.xAxisLabelColor,interval:e.xAxisLabelInterval||0,rotate:e.xAxisLabelRotate,width:e.xAxisLabelWidth,overflow:e.xAxisLabelOverflow,fontSize:e.xAxisLabelFontSize,formatter:t=>("string"!=typeof t||"0"!==t[0]||isNaN(+t)||(t=(+t).toString()),ti(e.xAxisLabelFormatter,t))},axisLine:{show:e.xAxisLineShow,lineStyle:{color:e.xAxisLineStyleColor}},axisTick:{show:e.xAxisTickShow},name:e.xAxisName,nameTextStyle:{fontSize:e.xAxisLabelFontSize,color:e.xAxisLabelColor,align:"left"},max:e.xAxisMaxValue||null},yAxis:ze(c),series:function(t){const o=[],n=t.length,i=e.seriesTypes;for(let r=0;r<n;r++){const n=i[r],{type:a,axisIndex:l}=n||{};let s=Object.assign({type:a,yAxisIndex:l},t[r]),c=e.colors[r];if(!c&&e.colors.length){const t=(r+1)%e.colors.length-1;c=t>0?e.colors[t]:e.colors[0]}if(c||(c="#5470C6"),"line"===a){const t={};e.shadowColor&&(t.shadowColor=e.shadowColor,t.shadowBlur=e.shadowBlur,t.shadowOffsetY=e.shadowOffsetY,t.shadowOffsetX=e.shadowOffsetX),s=Object.assign(Object.assign({},s),{symbolSize:e.symbolSize,smooth:e.smooth,itemStyle:{color:c},areaStyle:{color:e.areaGradientShow?{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:c},{offset:1,color:e.areaGradientColor||"transparent"}],global:!1}:c,opacity:e.areaStyleOpacity},lineStyle:Object.assign({width:e.lineStyleWidth},t)})}if("bar"===a){const{gradientShow:t,gradientColors:o,gradientOffset:n}=e,i={color:c};if(e.barBorderRadius){const t=e.barBorderRadius.split(",");if(null==t?void 0:t.length){const e=[];for(const o of t){const t=parseFloat(o);isNaN(t)||e.push(t)}i.borderRadius=e}}t&&(i.color={x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:c},{offset:n,color:o[r]},{offset:1,color:o[r]}]}),s=Object.assign(Object.assign({},s),{barWidth:e.barWidth.value+e.barWidth.suffix,itemStyle:i,label:{show:e.labelShow,fontSize:e.labelFontSize,position:e.labelPosition,color:e.labelColor,width:e.labelWidth,overflow:e.labelOverflow,formatter:t=>{let o="",n=e.labelFormatter;""===n&&(n="{c}");const{seriesName:i,name:r,value:a,data:l}=t||{};return o+=jn(n,{textData:Object.assign({name:r,value:a,a:i,b:r,c:a||0},l)},{useNewline:!0,useSpace:!0}),o}}})}e.isShowMarkLine&&(s.markLine={data:[{type:e.markLineType}]}),o.push(s)}return o}(a)};return u}(e,t,o);default:return{}}},ui=(e,t,{fontSize:o=12,graphicConfig:n={},maxValueObj:i={},fontFamily:r=null,componentValues:a=null,callBackMethodMap:l={},lowVersion:s=!1})=>{const c={fontSize:o,graphicConfig:n,maxValueObj:i,fontFamily:r,componentValues:a,callBackMethodMap:l,lowVersion:s};return Object.assign(Object.assign({},function(e,{fontFamily:t,callBackMethodMap:o,lowVersion:n}){return{textStyle:{fontFamily:ze(t)},toolbox:{show:e.toolboxShow,left:e.toolboxLeft,top:e.toolboxTop,itemSize:e.toolboxItemSize,itemGap:e.toolboxItemGap,feature:{myLocation:{show:!!e.toolboxLocation,title:"快速定位",icon:"path://M512 512m-80 0a80 80 0 1 0 160 0 80 80 0 1 0-160 0Z, M960 480h-33.632C910.752 276.16 747.84 113.248 544 97.632V64a32 32 0 1 0-64 0v33.632C276.16 113.248 113.248 276.16 97.632 480H64a32 32 0 0 0 0 64h33.632C113.248 747.84 276.16 910.752 480 926.368V960a32 32 0 1 0 64 0v-33.632C747.84 910.752 910.752 747.84 926.368 544H960a32 32 0 1 0 0-64zM544 862.368V800a32 32 0 1 0-64 0v62.368C311.424 847.104 176.896 712.576 161.632 544H224a32 32 0 1 0 0-64H161.632C176.896 311.424 311.424 176.896 480 161.632V224a32 32 0 0 0 64 0V161.632c168.576 15.296 303.104 149.792 318.368 318.368H800a32 32 0 1 0 0 64h62.368c-15.264 168.576-149.792 303.104-318.368 318.368z",onclick(){o.toolboxLocationFun&&o.toolboxLocationFun(e)}},myDownload:{show:e.toolboxDownloadUrl&&e.toolboxDownloadShow,title:"数据下载",icon:"path://M502.010485 765.939573c3.773953 3.719718 8.686846 5.573949 13.596669 5.573949 0.075725 0 0.151449-0.010233 0.227174-0.011256 0.329505 0.016373 0.654916 0.050142 0.988514 0.050142 0.706081 0 1.400906-0.042979 2.087545-0.116657 4.352121-0.366344 8.607028-2.190899 11.961426-5.496178l335.053985-330.166675c7.619538-7.509021 7.709589-19.773346 0.200568-27.393907s-19.774369-7.711636-27.39493-0.201591L536.193005 706.304358 536.193005 50.019207c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 657.032164-306.881342-302.44838c-7.618515-7.509021-19.883863-7.419993-27.393907 0.199545-7.509021 7.619538-7.419993 19.884886 0.199545 27.393907L502.010485 765.939573z, M867.170139 711.020776c-10.698666 0-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 13.054317-10.620895 23.675212-23.676236 23.675212L205.182103 919.486668c-13.054317 0-23.676236-10.620895-23.676236-23.675212L181.505867 730.391962c0-10.698666-8.67252-19.371186-19.371186-19.371186s-19.371186 8.67252-19.371186 19.371186l0 165.419494c0 34.416857 28.000728 62.416562 62.417585 62.416562l618.941638 0c34.417881 0 62.417585-27.999704 62.417585-62.416562L886.540302 730.391962C886.541325 719.693296 877.868805 711.020776 867.170139 711.020776z",onclick(){o.toolboxDownloadShowFun&&o.toolboxDownloadShowFun(e)}},myDataZoom:{show:e.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){o.toolboxDataZoomShowFun&&o.toolboxDataZoomShowFun(e)}},myInfo:{show:e.toolboxInfoShow,title:"详情",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){o.toolboxInfoShowFun&&o.toolboxInfoShowFun(e)}},mySource:{show:e.toolboxInfoSource,title:"指标来源",icon:"path://M473 71a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8v77.161C722.848 166.622 857.812 301.289 876.729 471H952a8 8 0 0 1 8 8v64a8 8 0 0 1-8 8h-75.053C858.871 721.652 723.515 857.305 553 875.839V951a8 8 0 0 1-8 8h-64a8 8 0 0 1-8-8v-75.161C302.818 857.341 167.659 722.182 149.161 552H72a8 8 0 0 1-8-8v-64a8 8 0 0 1 8-8h77.161C167.659 301.818 302.818 166.659 473 148.161V71z m326 441c0-157.953-128.047-286-286-286S227 354.047 227 512s128.047 286 286 286 286-128.047 286-286z m-286 60c33.137 0 60-26.863 60-60s-26.863-60-60-60-60 26.863-60 60 26.863 60 60 60z",onclick(){o.toolboxSourceShowFun&&o.toolboxSourceShowFun(e)}}}},title:{text:e.titleText,subtext:e.titleSubtext,textStyle:{fontSize:n?e.titleFontSize.replace("px",""):e.titleFontSize,fontWeight:e.fontWeight,color:e.titleColor},left:e.textAlign},grid:{top:e.gridTop,bottom:e.gridBottom,left:e.gridLeft,right:e.gridRight,containLabel:e.gridContainLabel},color:e.colors}}(e,c)),ci(e,t,c))},di=(e,t,o)=>{let n;if("string"!=typeof e){const{selectedCanvasId:i,pageConfig:r,usedComponentList:a}=o;if("px"===(null==e?void 0:e.suffix))n=e.value;else if("%"===(null==e?void 0:e.suffix))if("PAGE"===i)n=+e.value/100*parseFloat(r[t]);else{const o=a.find((e=>e.id===i));n=(null==o?void 0:o.value)?+e.value/100*parseFloat(o[t]):+e.value}}else"string"==typeof e&&(n=e);return n},hi=(e,t,o=3)=>Math.abs(e-t)<=o;function fi(e,t){return"string"==typeof e?parseFloat(e):"px"===(null==e?void 0:e.suffix)?+e.value:"%"===(null==e?void 0:e.suffix)?parseFloat(t)*(e.value/100):0}const pi=(e,t,o)=>{const{isLimitMoveArea:n,parentId:i,width:r,height:a}=e,l=[];if(n&&i){const e=t.find((e=>e.id===i));e&&(l[0]=parseFloat(e.left),l[1]=parseFloat(e.top),l[2]=parseFloat(e.left)+fi(e.width,null==o?void 0:o.width)-fi(r,null==o?void 0:o.width),l[3]=parseFloat(e.top)+fi(e.height,null==o?void 0:o.height)-fi(a,null==o?void 0:o.height))}return l},mi=(e,t)=>{let o=null;if(null==e?void 0:e.length){const n=[],i=[],r=[],a=[];for(const o of e){const e=parseFloat(o.left);n.push(e),i.push(parseFloat(o.top)),r.push(e+fi(o.width,null==t?void 0:t.width)),a.push(parseFloat(o.top)+fi(o.height,null==t?void 0:t.height))}const l=Math.min(...n),s=Math.min(...i);o={left:l,top:s,width:Math.max(...r)-l,height:Math.max(...a)-s}}return o},yi=(e,t,o)=>{var n,i;const r=[],a=[];let l=!1,s=!1,c=[];e.forEach((e=>{const t=o.find((t=>t.id===e.id));t&&c.push(t.parentId)})),(null==c?void 0:c.length)===(null==e?void 0:e.length)&&1===(null===(n=Array.from(new Set(c)))||void 0===n?void 0:n.length)&&(l=!0),c=e.map((e=>e.parentId)).filter((e=>e)),(null==c?void 0:c.length)===(null==e?void 0:e.length)&&1===(null===(i=Array.from(new Set(c)))||void 0===i?void 0:i.length)&&(s=!0);for(const t of e)!l&&o.find((e=>e.id===t.id))||!s&&t.isForbidContain||(t.combinationId?a.find((e=>e.id===t.combinationId))||a.push({id:t.combinationId,type:"combinate"}):a.push({data:t,type:"normal"}));if(null==a?void 0:a.length)for(const o of a)if("combinate"===o.type){const{combinationMap:n={}}=t,i=n[o.id]||[],a=e.filter((e=>i.includes(e.id))),l=mi(a,t);l&&r.push(Object.assign({id:o.id,type:o.type},l))}else{const{data:e}=o;r.push({id:e.id,type:o.type,width:fi(e.width,null==t?void 0:t.width),height:fi(e.height,null==t?void 0:t.height),left:parseFloat(e.left),top:parseFloat(e.top)})}return r},gi=(e,t)=>{const o=e.map((e=>Object.assign({},e)));if(!o.length)return o;const n=[],i=[],r=[],a=[];for(const e of o)n.push(e.left),i.push(e.top),r.push(e.left+e.width),a.push(e.top+e.height);switch(t){case"left-align":{const e=Math.min(...n);o.forEach((t=>{t.left=e}));break}case"horizontal-center":{const e=+((Math.min(...n)+Math.max(...r))/2).toFixed(2);o.forEach((t=>{t.left=e-+(t.width/2).toFixed(2)}));break}case"right-align":{const e=Math.max(...r);o.forEach((t=>{t.left=e-t.width}));break}case"top-align":{const e=Math.min(...i);o.forEach((t=>{t.top=e}));break}case"vertical-center":{const e=+((Math.min(...i)+Math.max(...a))/2).toFixed(2);o.forEach((t=>{t.top=e-+(t.height/2).toFixed(2)}));break}case"bottom-align":{const e=Math.max(...a);o.forEach((t=>{t.top=e-t.height}));break}case"horizontal-avg":{const e=Math.min(...n),t=Math.max(...r)-e;let i=0;if(o.sort(((e,t)=>e.left-t.left)),o.forEach((e=>{i+=e.width})),o.length>1){const e=+((t-i)/(o.length-1)).toFixed(2);let n=0;o.forEach(((t,o)=>{o>0&&(t.left=n+e),n=t.left+t.width}))}break}case"vertical-avg":{const e=Math.min(...i),t=Math.max(...a)-e;let n=0;if(o.sort(((e,t)=>e.top-t.top)),o.forEach((e=>{n+=e.height})),o.length>1){const e=+((t-n)/(o.length-1)).toFixed(2);let i=0;o.forEach(((t,o)=>{o>0&&(t.top=i+e),i=t.top+t.height}))}break}}return o},bi=(e,t,o,n,i,r,a=5)=>{let l=e,s=t;const c=e+o,u=(e+c)/2,d=t+n,h=(t+d)/2;return r.forEach((r=>{const{left:f,top:p,width:m,height:y,id:g}=r;if(i!==g){const i=f+m,r=(f+i)/2,g=p+y,b=(p+g)/2,v=[f,i],x=[p,g];for(let t=0;t<v.length;t++){const o=v[t];hi(e,o,a)&&(l=o)}for(let e=0;e<v.length;e++){const t=v[e];hi(c,t,a)&&(l=t-o)}for(let e=0;e<x.length;e++){const o=x[e];hi(t,o,a)&&(s=o)}for(let e=0;e<x.length;e++){const t=x[e];hi(d,t,a)&&(s=t-n)}hi(u,r)&&(l=r-o/2),hi(h,b)&&(s=b-n/2)}})),{x:l,y:s}},vi=e=>{const{source:t,components:o,excludeIds:n=[],pageWidth:i,pageHeight:r,scale:a,canvasPositionLeft:l,canvasPositionTop:s}=e,c=parseFloat(t.left),u=c+parseFloat(t.width),d=(c+u)/2,h=parseFloat(t.top),f=h+parseFloat(t.height),p=[c,u,d],m=[h,f,(h+f)/2],y=[],g=[];return o.forEach((e=>{const{left:o,top:c,width:u,height:d,id:h}=e,f=parseFloat(o),b=f+parseFloat(u),v=(f+b)/2,x=parseFloat(c),w=x+parseFloat(d),S=[f,b,v],A=[x,w,(x+w)/2];let _=!1;if(t.id!==h&&!n.includes(h)){for(let e=0;e<p.length;e++)for(let t=0;t<S.length;t++)hi(p[e],S[t])&&(y.push({left:`${S[t]*a+l}px`,top:`${s}px`,height:r*a+"px",width:"1px",background:"#3f8ce8"}),_=!0);for(let e=0;e<m.length;e++)for(let t=0;t<A.length;t++)hi(m[e],A[t])&&(y.push({left:`${l}px`,top:`${A[t]*a+s}px`,width:i*a+"px",height:"1px",background:"#3f8ce8"}),_=!0);_&&g.push(h)}})),{lines:y,highlightedIds:g}},xi=e=>{const{rect:t,clientX:o,clientY:n,container:i,canvasPosition:r,scale:a,pointType:l,minWidth:s=12,minHeight:c=12}=e,u=e=>Number((e/a).toFixed(0)),{top:d,bottom:h,left:f,right:p}=t,{scrollTop:m,scrollLeft:y,offsetTop:g,offsetLeft:b}=i;let v=o-f;s>=v&&(v=s);const x=`${u(v)}px`;let w=p-o;s>=w&&(w=s);const S=`${u(w)}px`;let A=m+n-d-m;c>=A&&(A=c);const _=`${u(A)}px`;let L=h-n;c>=L&&(L=c);const O=`${u(L)}px`,C=`${u(m+n-g-r.top)}px`,j=`${u(y+o-b-r.left)}px`;let N={};switch(l){case"top-center":L>c&&(N={height:O,top:C});break;case"top-left":w>s&&L>c?N={width:S,left:j,height:O,top:C}:w<=s&&L>c?N={height:O,top:C}:w>s&&L<=c&&(N={width:S,left:j});break;case"top-right":v>=s&&L>=c?N={width:x,height:O,top:C}:v<s&&L>=c?N={height:O,top:C}:v>=s&&L<c&&(N={width:x});break;case"bottom-left":w>=s&&A>=c?N={width:S,left:j,height:_}:w<s&&A>=c?N={height:_}:w>s&&A<=c&&(N={width:S,left:j});break;case"bottom-right":N={width:x,height:_};break;case"bottom-center":N={height:_};break;case"left-center":w>s&&(N={width:S,left:j});break;case"right-center":N={width:x}}return N},wi=(e,t={})=>{const o=[];for(const n of e)n.combinationId&&t[n.combinationId]?o.push(...t[n.combinationId]):o.push(n.id);return Array.from(new Set(o))},Si=(e,t,o)=>{const{scale:n,offsetLeft:i,offsetTop:r,pageWidth:a,pageHeight:l,combinationMap:s={}}=o,c=[];for(const o of e){const e=parseFloat(o.left)*n+i,u=parseFloat(o.top)*n+r,d=fi(o.width,a)*n,h=fi(o.height,l)*n;!(t.left+t.width<=e||e+d<=t.left||t.top+t.height<=u||u+h<=t.top)&&(o.combinationId&&s[o.combinationId]?c.push(...s[o.combinationId]):c.push(o.id))}return Array.from(new Set(c))};class Ai{constructor(e,t=4,o=0,n=8,i=1){this.boundary=e,this.capacity=t,this.depth=o,this.maxDepth=n,this.elements=[],this.isDivided=!1,this.nodes=[],this.scale=i}isLargeElement(e){const t=300*this.scale;return(e.width>=t||e.height>=t)&&(e.large=!0,!0)}insert(e){if(!this.containsElement(e))return!1;if(this.isLargeElement(e)||this.elements.length<this.capacity||this.depth>=this.maxDepth)return this.elements.push(e),!0;this.isDivided||this.subdivide();for(const t of this.nodes)if(t.insert(e))return!0;return this.elements.push(e),!0}subdivide(){const{x:e,y:t,width:o,height:n}=this.boundary,i=o/2,r=n/2,a=this.depth+1;this.nodes=[new Ai({x:e,y:t,width:i,height:r},this.capacity,a,this.maxDepth),new Ai({x:e+i,y:t,width:i,height:r},this.capacity,a,this.maxDepth),new Ai({x:e,y:t+r,width:i,height:r},this.capacity,a,this.maxDepth),new Ai({x:e+i,y:t+r,width:i,height:r},this.capacity,a,this.maxDepth)],this.isDivided=!0;for(const e of this.elements)if(!e.large)for(const t of this.nodes)if(t.insert(e))break;this.elements=this.elements.filter((e=>e.large))}query(e,t=[]){if(!this.intersects(e))return t;for(const o of this.elements)this.elementIntersectsRange(o,e)&&t.push({id:o.id,combinationId:o.combinationId});if(this.isDivided)for(const o of this.nodes)o.query(e,t);return t}containsElement(e){let t=!1;if(e.x>=this.boundary.x&&e.y>=this.boundary.y&&e.x+e.width<=this.boundary.x+this.boundary.width&&e.y+e.height<=this.boundary.y+this.boundary.height)t=!0;else if(this.intersects(e)){const o=Math.max(e.x,this.boundary.x),n=Math.min(e.x+e.width,this.boundary.x+this.boundary.width),i=Math.max(e.y,this.boundary.y);(n-o)*(Math.min(e.y+e.height,this.boundary.y+this.boundary.height)-i)>=e.width*e.height/4&&(t=!0)}return t}intersects(e){return!(e.x>this.boundary.x+this.boundary.width||e.x+e.width<this.boundary.x||e.y>this.boundary.y+this.boundary.height||e.y+e.height<this.boundary.y)}elementIntersectsRange(e,t){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)}clear(){this.elements=[],this.nodes=[],this.isDivided=!1}}const _i=(e,t)=>{const o=new Set(t),n=new Map;e.forEach(((e,t)=>n.set(e.id,t)));for(const i of e)if(!o.has(i.id))for(const o of t){const t=e.find((e=>e.id===o));if(!t)continue;const r=n.get(i.id),a=n.get(t.id);if((i.zIndex||0)>(t.zIndex||0)||i.zIndex===t.zIndex&&r>a)return!1}return!0},Li=(e,t,o)=>{var n;const i=new Set(t),r=t.map((t=>{const n=e.find((e=>e.id===t));return n?{id:t,zIndex:Math.max(1,(n.zIndex||0)+("up"===o?1:-1))}:null})).filter((e=>e)),a=new Map(r.map((e=>[e.id,e.zIndex]))),l=e.map((e=>a.has(e.id)?Object.assign(Object.assign({},e),{zIndex:a.get(e.id)}):e)),s=new Map;for(const e of l){const t=e.zIndex;s.has(t)||s.set(t,[]),null===(n=s.get(t))||void 0===n||n.push(e)}for(const[e,t]of s){const n=t.filter((e=>i.has(e.id))),r=t.filter((e=>!i.has(e.id)));s.set(e,"up"===o?[...r,...n]:[...n,...r])}const c=new Map,u=[];for(const e of l){const t=e.zIndex,o=s.get(t)||[],n=c.get(t)||0;u.push(o[n].id),c.set(t,n+1)}return{updates:r,orderedIds:u}},Oi=(e,t)=>{const o=e.filter((e=>e.zIndex)).map((e=>e.zIndex)),n=(null==o?void 0:o.length)?Math.max(...o):0;return{updates:t.map((e=>({id:e,zIndex:n+1})))}},Ci=(e,t)=>{const o=t.slice().sort(((t,o)=>e.findIndex((e=>e.id===t))-e.findIndex((e=>e.id===o)))),n=new Set(o),i=[...e.filter((e=>n.has(e.id))).map((e=>e.id)),...e.filter((e=>!n.has(e.id))).map((e=>e.id))];return{updates:o.map((e=>({id:e,zIndex:1}))),orderedIds:i}};export{Ai as QuadTree,wi as expandSelectionIds,Xn as formatIndicatorParams,di as formatWidthHeight,bi as getAdsorptionPosition,yi as getAlignItems,gi as getAlignedItems,mi as getComponentsArea,oi as getFieldConfig,fi as getFormatWh,Fn as getIndicatorParams,Ci as getLayerBottomResult,Li as getLayerOneStepResult,Oi as getLayerTopResult,pi as getLimitMoveArea,vi as getMarkerLines,xi as getResizeRect,Si as getSelectedIdsByRect,Mn as hasOwn,_i as isLayerSelectedAtTop,hi as isNearby,Nn as lowerCaseIncludes,Cn as runCode,ni as setAxisExtremum,ui as transformProps,Jn as useTransformChartDataByAttrKey,ei as useTransformChartDataByAttrValue,ti as useValueFormatter,jn as useVariablesInText};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecan-bi/tools",
3
- "version": "1.0.84",
3
+ "version": "1.0.86",
4
4
  "description": "General tools",
5
5
  "main": "lib/index.es.js",
6
6
  "module": "lib/index.es.js",
package/src/indicator.ts CHANGED
@@ -216,7 +216,8 @@ const handleIndicator = (indicator: { [key:string]: any } = {}, classification:
216
216
  distinct,
217
217
  dimByCount,
218
218
  dataTo,
219
- sort
219
+ sort,
220
+ caliber
220
221
  } = indicator
221
222
  let conditionData
222
223
  if (conditions) {
@@ -256,6 +257,9 @@ const handleIndicator = (indicator: { [key:string]: any } = {}, classification:
256
257
  type: 'NORMAL'
257
258
  }
258
259
  }
260
+ if (caliber) {
261
+ itemObj.indexCalmethod = caliber
262
+ }
259
263
  if (builtInFormula === 'DATE_OFFSET') {
260
264
  const list = builtInCalcWay.split('-')
261
265
  if (list?.length === 3) {
@@ -1397,7 +1401,7 @@ export const formatIndicatorParams = (props: any, otherParams: any = {}) => {
1397
1401
  keyName: props.keyName,
1398
1402
  // 透视表指标排序相关入参
1399
1403
  columnData: pivotColumnData,
1400
- columnHeaders: pivotColumnHeader,
1404
+ columnHeaders: isPivotTable ? pivotColumnHeader : undefined,
1401
1405
  ...classParams,
1402
1406
  }
1403
1407
  }
@@ -1,8 +1,9 @@
1
1
  import { computed, unref, ref } from 'vue'
2
2
  import useVariablesInText from '../../hooks/useVariablesInText'
3
3
  import useValueFormatter from '../../hooks/useValueFormatter'
4
- import { getLegendFormat } from '../util'
5
- export default function getBarTransformProps(props, chartData, fontSize, callBackMethodMap) {
4
+ import { getLegendFormat, formatFontSize } from '../util'
5
+ export default function getBarTransformProps(props, chartData, { fontSize, callBackMethodMap, lowVersion }) {
6
+ console.log('')
6
7
  const yAxisLabelFormatter = props.yAxisLabelFormatter
7
8
  const xAxisLabelFormatter = props.xAxisLabelFormatter
8
9
  const dataSource = ref(chartData.dataset)
@@ -17,14 +18,17 @@ export default function getBarTransformProps(props, chartData, fontSize, callBac
17
18
  ...ds[i],
18
19
  type: 'bar',
19
20
  barWidth: props.barWidth.value + props.barWidth.suffix,
20
- showBackground: props.showBarBackground
21
+ showBackground: props.showBarBackground,
22
+ backgroundStyle: {
23
+ color: 'rgba(180, 180, 180, 0.2)', // 必须显式设置
24
+ },
21
25
  } as { [key: string]: any }
22
26
  if (props.isStack) {
23
27
  item.stack = 'stack'
24
28
  }
25
29
  item.label = {
26
30
  show: props.labelShow,
27
- fontSize: props.labelFontSize,
31
+ fontSize: formatFontSize(props.labelFontSize, lowVersion),
28
32
  position: props.labelPosition,
29
33
  color: props.labelColor,
30
34
  width: props.labelWidth,
@@ -100,6 +104,7 @@ export default function getBarTransformProps(props, chartData, fontSize, callBac
100
104
  }
101
105
  }
102
106
  item.itemStyle.borderRadius = radiusItems
107
+ item.itemStyle.barBorderRadius = radiusItems
103
108
  }
104
109
  }
105
110
  if (props.isShowMarkLine) {
@@ -200,12 +205,12 @@ export default function getBarTransformProps(props, chartData, fontSize, callBac
200
205
  top: props.legendTop,
201
206
  left: props.legendLeft,
202
207
  textStyle: {
203
- // lineHeight: (visible.value ? ZOOM_FONT_SIZE : parseFloat(props.legendFontSize)) + 8,
208
+ lineHeight: parseFloat(props.legendFontSize) + 8,
204
209
  rich: {
205
210
  text: {
206
211
  width: props.legendTextWidth,
207
- color: props.legendTextStyleColor
208
- // fontSize: visible.value ? ZOOM_FONT_SIZE : props.legendFontSize
212
+ color: props.legendTextStyleColor,
213
+ fontSize: formatFontSize(props.legendFontSize, lowVersion)
209
214
  }
210
215
  }
211
216
  },
@@ -20,7 +20,7 @@ function getUnitName(type: number) {
20
20
  return result
21
21
  }
22
22
 
23
- export default function getComboGraphTransformProps(props, chartData, fontSize, callBackMethodMap) {
23
+ export default function getComboGraphTransformProps(props, chartData, { fontSize, callBackMethodMap }) {
24
24
  const dimensions = ref(chartData.dimensions)
25
25
  const dataSource = ref(chartData.dataset)
26
26
  const dataset = chartData.dataset
@@ -1,5 +1,5 @@
1
1
  import { unref} from 'vue'
2
- export default function getCommonTransformProps(props, fontFamily, callBackMethodMap) {
2
+ export default function getCommonTransformProps(props, { fontFamily, callBackMethodMap, lowVersion }) {
3
3
  const options = {
4
4
  textStyle: {
5
5
  fontFamily: unref(fontFamily)
@@ -57,7 +57,7 @@ export default function getCommonTransformProps(props, fontFamily, callBackMetho
57
57
  text: props.titleText,
58
58
  subtext: props.titleSubtext,
59
59
  textStyle: {
60
- fontSize: props.titleFontSize,
60
+ fontSize: lowVersion ? props.titleFontSize.replace('px','') : props.titleFontSize,
61
61
  fontWeight: props.fontWeight,
62
62
  color: props.titleColor
63
63
  },
@@ -13,7 +13,7 @@ function getMarkLineData(chartsOptions: any) {
13
13
  return {}
14
14
  }
15
15
  }
16
- export default function getLineTransformProps (props, chartData, fontSize, callBackMethodMap){
16
+ export default function getLineTransformProps(props, chartData, { fontSize, callBackMethodMap }){
17
17
  const yAxisLabelFormatter = props.yAxisLabelFormatter
18
18
  const xAxisLabelFormatter = props.xAxisLabelFormatter
19
19
  const dataSource = ref(chartData.dataset)
@@ -1,7 +1,7 @@
1
1
  import { unref, ref } from 'vue'
2
- import { getLegendFormat } from '../util'
2
+ import { getLegendFormat, formatFontSize } from '../util'
3
3
  import useVariablesInText from '../../hooks/useVariablesInText'
4
- export default function getPieTransformProps(props, chartData, fontSize) {
4
+ export default function getPieTransformProps(props, chartData, { fontSize, lowVersion }) {
5
5
  const dataset = ref(chartData.dataset)
6
6
  let { data = [] } = unref(dataset)[0] || {}
7
7
  if (Array.isArray(props.colors)) {
@@ -111,7 +111,7 @@ export default function getPieTransformProps(props, chartData, fontSize) {
111
111
  label: {
112
112
  show: props.labelPosition !== 'center' && props.labelShow,
113
113
  color: props.labelColor,
114
- fontSize: props.labelFontSize,
114
+ fontSize: formatFontSize(props.labelFontSize, lowVersion),
115
115
  position: props.labelPosition,
116
116
  formatter: (params: any) => {
117
117
  let formatter = ''
@@ -18,8 +18,8 @@ export const getFieldConfig = (props, graphicConfig, callBackMethodMap) => {
18
18
  }
19
19
  // 设置坐标轴最大最小值
20
20
  export const setAxisExtremum = (echartRef) => {
21
- const _yExtent = echartRef?.chart.getModel().getComponent('yAxis').axis.scale._extent
22
- const _xExtent = echartRef?.chart.getModel().getComponent('xAxis').axis.scale._extent
21
+ const _yExtent = echartRef?.chart.getModel()?.getComponent('yAxis').axis.scale._extent
22
+ const _xExtent = echartRef?.chart.getModel()?.getComponent('xAxis').axis.scale._extent
23
23
  let obj = {}
24
24
  if (_xExtent && _yExtent) {
25
25
  obj = {
@@ -347,7 +347,7 @@ function groupDataByRules (rawData: any, dimension: string, rules: any) {
347
347
  return groups
348
348
  }
349
349
 
350
- function getVisualSizeCondition (conditionList: any[]) {
350
+ function getVisualSizeCondition (conditionList: any[] = []) {
351
351
  const result = []
352
352
  for (const item of conditionList) {
353
353
  let rule = ''
@@ -368,7 +368,7 @@ function getVisualSizeCondition (conditionList: any[]) {
368
368
  return result.reverse()
369
369
  }
370
370
 
371
- export default function getScatterTransformProps(props, dataset, fontSize, graphicConfig, maxValueObj, componentValues, callBackMethodMap) {
371
+ export default function getScatterTransformProps(props, dataset, { fontSize, graphicConfig, maxValueObj, componentValues, callBackMethodMap }) {
372
372
  // console.log(fontFamily)
373
373
  const fieldConfig = getFieldConfig(props, graphicConfig, callBackMethodMap)
374
374
  // 这样写为了触发响应式
@@ -6,29 +6,30 @@ import getBarTransformProps from './chartTransProps/bar'
6
6
  import getLineTransformProps from './chartTransProps/line'
7
7
  import getPieTransformProps from './chartTransProps/pie'
8
8
  import getCommonTransformProps from './chartTransProps/common'
9
- const getTransformProps = (chartsOptions, chartData, fontSize, graphicConfig, maxValueObj, componentValues, callBackMethodMap) => {
9
+ const getTransformProps = (chartsOptions, chartData, params) => {
10
10
  const type = lowerCaseReplace(chartsOptions.type, 'ecan')
11
11
  switch (type) {
12
12
  case 'bar':
13
- return getBarTransformProps(chartsOptions, chartData, fontSize, callBackMethodMap)
13
+ return getBarTransformProps(chartsOptions, chartData, params)
14
14
  case 'line':
15
- return getLineTransformProps(chartsOptions, chartData, fontSize, callBackMethodMap)
15
+ return getLineTransformProps(chartsOptions, chartData, params)
16
16
  case 'pie':
17
- return getPieTransformProps(chartsOptions, chartData, fontSize)
17
+ return getPieTransformProps(chartsOptions, chartData, params)
18
18
  case 'radar':
19
- return getRadarTransformProps(chartsOptions, chartData, fontSize)
19
+ return getRadarTransformProps(chartsOptions, chartData, params)
20
20
  case 'scatter':
21
- return getScatterTransformProps(chartsOptions, chartData, fontSize, graphicConfig, maxValueObj, componentValues, callBackMethodMap)
21
+ return getScatterTransformProps(chartsOptions, chartData, params)
22
22
  case 'comboGraph':
23
- return getComboGraphTransformProps(chartsOptions, chartData, fontSize, callBackMethodMap)
23
+ return getComboGraphTransformProps(chartsOptions, chartData, params)
24
24
  default:
25
25
  return {}
26
26
  }
27
27
  }
28
- const transformProps = (chartsOptions, chartData, { fontSize = 12, graphicConfig = {}, maxValueObj = {}, fontFamily = null, componentValues = null, callBackMethodMap = {} } ) => {
28
+ const transformProps = (chartsOptions, chartData, { fontSize = 12, graphicConfig = {}, maxValueObj = {}, fontFamily = null, componentValues = null, callBackMethodMap = {}, lowVersion = false } ) => {
29
+ const params = { fontSize, graphicConfig, maxValueObj, fontFamily, componentValues, callBackMethodMap, lowVersion }
29
30
  return {
30
- ...getCommonTransformProps(chartsOptions, fontFamily, callBackMethodMap),
31
- ...getTransformProps(chartsOptions, chartData, fontSize, graphicConfig, maxValueObj, componentValues, callBackMethodMap)
31
+ ...getCommonTransformProps(chartsOptions, params),
32
+ ...getTransformProps(chartsOptions, chartData, params)
32
33
  }
33
34
  }
34
35
  export default transformProps
package/src/utils/util.ts CHANGED
@@ -234,3 +234,7 @@ export function handleQfwAndFixed (str: string | number) {
234
234
  export function handleQfw (str: string | number) {
235
235
  return Number(str).toLocaleString()
236
236
  }
237
+
238
+ export function formatFontSize(fontSize, noUnit) {
239
+ return noUnit ? fontSize.replace('px','') : fontSize
240
+ }