!function(){functiont(e){returnt="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},t(e)}functione(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){returnr};varr={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeofSymbol?Symbol:{},a=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";functionl(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(N){l=function(t,e,r){returnt[e]=r}}functions(t,e,r,n){varo=e&&e.prototypeinstanceofy?e:y,c=Object.create(o.prototype),a=new_(n||[]);returni(c,"_invoke",{value:j(t,r,a)}),c}functionh(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}r.wrap=s;varp={};functiony(){}functionv(){}functiond(){}varm={};l(m,a,(function(){returnthis}));varg=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==n&&o.call(b,a)&&(m=b);varw=d.prototype=y.prototype=Object.create(m);functionx(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){returnthis._invoke(e,t)}))}))}functionO(e,r){functionn(i,c,a,u){varf=h(e[i],e,c);if("throw"!==f.type){varl=f.arg,s=l.value;returns&&"object"==t(s)&&o.call(s,"__await")?r.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):r.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){returnn("throw",t,a,u)}))}u(f.arg)}varc;i(this,"_invoke",{value:function(t,e){functiono(){returnnewr((function(r,o){n(t,e,r,o)}))}returnc=c?c.then(o,o):o()}})}functionj(t,e,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnS()}for(r.method=o,r.arg=i;;){varc=r.delegate;if(c){vara=L(c,r);if(a){if(a===p)continue;returna}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varu=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}functionL(t,e){varr=e.method,n=t.iterator[r];if(void0===n)returne.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=newTypeError("The iterator does not provide a '"+r+"' method")),p;varo=h(n,t.iterator,e.arg);if("throw"===o.type)returne.method="throw",e.arg=o.arg,e.delegate=null,p;vari=o.arg;returni?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,p):i:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,p)}functionE(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionP(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}function_(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}functionk(t){if(t){vare=t[a];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varr=-1,n=functione(){for(;++r<t.length;)if(o.call(t,r))returne.value=t[r],e.done=!1,e;returne.value=void0,e.done=!0,e};returnn.next=n}}return{next:S}}functionS(){return{value:void0,done:!0}}returnv.prototype=d,i(w,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:v,configurable:!0}),v.displayName=l(d,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,f,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},x(O.prototype),l(O.prototype,u,(function(){returnthis})),r.AsyncIterator=O,r.async=function(t,e,n,o,i){void0===i&&(i=Promise);varc=newO(s(t,e,n,o),i);returnr.isGeneratorFunction(e)?c:c.next().then((function(t){returnt.done?t.value:c.next()}))},x(w),l(w,f,"Generator"),l(w,a,(function(){returnthis})),l(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},r.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(P),!t)for(vareinthis)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionr(r,n){returnc.type="throw",c.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varn=this.tryEntries.length-1;n>=0;--n){vari=this.tryEntries[n],c=i.completion;if("root"===i.tryLoc)returnr("end");if(i.tryLoc<=this.prev){vara=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}elseif(a){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){varn=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){vari=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);varc=i?i.completion:{};returnc.type=t,c.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(c)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),P(r),p}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){varo=n.arg;P(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),p}},r}functionr(t,e,r,n,o,i,c){try{vara=t[i](c),u=a.value}catch(f){returnvoidr(f)}a.done?e(u):Promise.resolve(u).then(n,o)}functionn(t){returnfunction(){vare=this,n=arguments;returnnewPromise((function(o,i){varc=t.apply(e,n);functiona(t){r(c,o,i,a,u,"next",t)}functionu(t){r(c,o,i,a,u,"throw",t)}a(void0)}))}}functiono(){returno="undefined"!=typeofReflect&&Reflect.get?Reflect.get.bind():function(t,e,r){varn=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););returnt}(t,e);if(n){varo=Object.getOwnPropertyDescriptor(n,e);returno.get?o.get.call(arguments.length<3?t:r):o.value}},o.apply(this,arguments)}functioni(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}functionc(t,e,r){returne&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functiona(e){varr=function(e,r){if("object"!==t(e)||null===e)returne;varn=e[Symbol.toPrimitive];if(void0!==n){varo=n.call(e,r||"default");if("object"!==t(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}functionu(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionf(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}functionl(t,e){returnl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){returnt.__proto__=e,t},l(t,e)}functions(e){varr=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();returnfunction(){varn,o=p(e);if(r){vari=p(this).constructor;n=Reflect.construct(o,arguments,i)}elsen=o.apply(this,arguments);returnfunction(e,r){if(r&&("object"===t(r)||"function"==typeofr))returnr;if(void0!==r)thrownewTypeError("Derived constructors may only return object or undefined");returnh(e)}(this,n)}}functionh(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}functionp(t){returnp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){returnt.__proto__||Object.getPrototypeOf(t)},p(t)}System.register(["vue","@ibiz-template/vue-util","@ibiz-template/controller"],(function(t,r){"use strict";vari,l,y,v,d,m;return{setters:[function(t){i=t.defineComponent,l=t.getCurrentInstance},function(t){y=t.useViewController},function(t){v=t.Neuron,d=t.ViewNerve,m=t.ViewController}],execute:function(){varr=function(t){f(r,t);vare=s(r);functionr(){returnu(this,r),e.apply(this,arguments)}returnc(r)}(v),g=function(t){f(n,t);vare=s(n);functionn(){vart,r,o,i;u(this,n);for(varc=arguments.length,f=newArray(c),l=0;l<c;l++)f[l]=arguments[l];returnt=e.call.apply(e,[this].concat(f)),r=h(t),i=void0,(o=a(o="chart"))inr?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,t}returnc(n,[{key:"createNeuron",value:function(){returnnewr(this.bindAbility())}},{key:"inclusive",value:function(t){return"chart"===t||o(p(n.prototype),"inclusive",this).call(this,t)}},{key:"connect",value:function(t,e){varr=this;o(p(n.prototype),"connect",this).call(this,t,e),"chart"===t&&(this.chart=e,this.chart.evt.on("destroyed",(function(){r.chart=void0})))}},{key:"destroy",value:function(){o(p(n.prototype),"destroy",this).call(this),this.chart=void0}}]),n}(d),b=function(t){f(h,t);varr,i,a,l=s(h);functionh(){returnu(this,h),l.apply(this,arguments)}returnc(h,[{key:"createNerve",value:function(){returnnewg(this)}},{key:"onInit",value:(a=n(e().mark((functiont(){varr,n=this;returne().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.next=2,o(p(h.prototype),"onInit",this).call(this);case2:if(!(r=this.model.chart)){t.next=7;break}returnt.next=6,ibiz.register.control.get(r);case6:this.providers[r.name]=t.sent;case7:this.nerve.self.evt.on("mounted",(function(){n.model.source.loadDefault&&n.load()}));case8:case"end":returnt.stop()}}),t,this)}))),function(){returna.apply(this,arguments)})},{key:"load",value:(i=n(e().mark((functiont(){varr;returne().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnr=this.nerve.chart,t.abrupt("return",r.call.load());case2:case"end":returnt.stop()}}),t,this)}))),function(){returni.apply(this,arguments)})},{key:"refresh",value:(r=n(e().mark((functiont(){returne().wrap((function(t){for(;;)switch(t.prev=t.next){case0:this.load();case1:case"end":returnt.stop()}}),t,this)}))),function(){returnr.apply(this,arguments)})}]),h}(m);t("default",i({props:{context:Object,params:{type:Object,default:function(){return{}}},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(t){vare,r,n=l().proxy;return{c:(e=n,r=t.modelPath,y(e,(function(t,e){returnnewb(r,t,e)})))}},render:function(t){vare=null;if(this.c.complete){varr=this.c.model.chart;this.c.providers[r.name]&&(e=t(this.c.providers[r.name].component,{props:{modelData:r,context:this.c.context,params:this.c.params},on:{neuronInit:this.c.nerve.onNeuronInit(r.name)}}))}returnt("view-base",{attrs:{controller:this.c}},[e])}}))}}}))}();
!function(){functiont(e){returnt="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},t(e)}functione(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){returnr};varr={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeofSymbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";functions(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(C){s=function(t,e,r){returnt[e]=r}}functionf(t,e,r,n){vari=e&&e.prototypeinstanceofd?e:d,a=Object.create(i.prototype),c=newO(n||[]);returno(a,"_invoke",{value:A(t,r,c)}),a}functionv(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(C){return{type:"throw",arg:C}}}r.wrap=f;varh={};functiond(){}functionp(){}functionm(){}vary={};s(y,c,(function(){returnthis}));varg=Object.getPrototypeOf,b=g&&g(g(P([])));b&&b!==n&&i.call(b,c)&&(y=b);varw=m.prototype=d.prototype=Object.create(y);functionx(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){returnthis._invoke(e,t)}))}))}functionL(e,r){functionn(o,a,c,u){varl=v(e[o],e,a);if("throw"!==l.type){vars=l.arg,f=s.value;returnf&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){returnn("throw",t,c,u)}))}u(l.arg)}vara;o(this,"_invoke",{value:function(t,e){functioni(){returnnewr((function(r,i){n(t,e,r,i)}))}returna=a?a.then(i,i):i()}})}functionA(t,e,r){varn="suspendedStart";returnfunction(i,o){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===i)throwo;returnT()}for(r.method=i,r.arg=o;;){vara=r.delegate;if(a){varc=E(a,r);if(c){if(c===h)continue;returnc}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varu=v(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}functionE(t,e){varr=e.method,n=t.iterator[r];if(void0===n)returne.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=newTypeError("The iterator does not provide a '"+r+"' method")),h;vari=v(n,t.iterator,e.arg);if("throw"===i.type)returne.method="throw",e.arg=i.arg,e.delegate=null,h;varo=i.arg;returno?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,h):o:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,h)}functionj(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionS(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}functionO(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}functionP(t){if(t){vare=t[c];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varr=-1,n=functione(){for(;++r<t.length;)if(i.call(t,r))returne.value=t[r],e.done=!1,e;returne.value=void0,e.done=!0,e};returnn.next=n}}return{next:T}}functionT(){return{value:void0,done:!0}}returnp.prototype=m,o(w,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:p,configurable:!0}),p.displayName=s(m,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,s(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},x(L.prototype),s(L.prototype,u,(function(){returnthis})),r.AsyncIterator=L,r.async=function(t,e,n,i,o){void0===o&&(o=Promise);vara=newL(f(t,e,n,i),o);returnr.isGeneratorFunction(e)?a:a.next().then((function(t){returnt.done?t.value:a.next()}))},x(w),s(w,l,"Generator"),s(w,c,(function(){returnthis})),s(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},r.values=P,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(S),!t)for(vareinthis)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionr(r,n){returna.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varn=this.tryEntries.length-1;n>=0;--n){varo=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)returnr("end");if(o.tryLoc<=this.prev){varc=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)returnr(o.catchLoc,!0);if(this.prev<o.finallyLoc)returnr(o.finallyLoc)}elseif(c){if(this.prev<o.catchLoc)returnr(o.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<o.finallyLoc)returnr(o.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){varn=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){varo=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);vara=o?o.completion:{};returna.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){vari=n.arg;S(r)}returni}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),h}},r}functionr(t){returnfunction(t){if(Array.isArray(t))returnn(t)}(t)||function(t){if("undefined"!=typeofSymbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])returnArray.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeoft)returnn(t,e);varr=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)returnArray.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))returnn(t,e)}(t)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionn(t,e){(null==e||e>t.length)&&(e=t.length);for(varr=0,n=newArray(e);r<e;r++)n[r]=t[r];returnn}functioni(t,e,r,n,i,o,a){try{varc=t[o](a),u=c.value}catch(l){returnvoidr(l)}c.done?e(u):Promise.resolve(u).then(n,i)}functiono(e,r,n){return(r=function(e){varr=function(e,r){if("object"!==t(e)||null===e)returne;varn=e[Symbol.toPrimitive];if(void0!==n){vari=n.call(e,r||"default");if("object"!==t(i))returni;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"===t(r)?r:String(r)}(r))ine?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}System.register(["vue","@ibiz-template/vue-util","@ibiz-template/model","ramda","./use-chart-controller.legacy.js","@ibiz-template/controller","qx-util","echarts","@ibiz-template/service"],(function(t,n){"use strict";vara,c,u,l,s,f,v,h,d;return{setters:[function(t){a=t.defineComponent,c=t.ref,u=t.h,l=t.getCurrentInstance,s=t.default},function(t){f=t.useNamespace},function(t){v=t.ChartModel},function(t){h=t.mergeDeepRight},function(t){d=t.u},null,null,null,null],execute:function(){varn=a({name:"ChartTooltip",props:{params:{type:[Object,Array],required:!0},c:{type:Object,required:!0},codeListMap:{type:Array,required:!0}},setup:function(t){vare,r=f("chart-tooltip"),n=c([]),i=c(""),o=c(),a=(null===(e=t.c.model.source.getPSControlParam())||void0===e?void0:e.ctrlParams)||{},u=a.LABEL,l=a.TEXT,s=a.LEFT,v=a.CENTER,h=a.RIGHT,d=a.PERCENTAGE,p=a.RATE,m=JSON.parse(a.LIST||"[]"),y=function(t){if(null==t)return"";try{returnibiz.util.text.format("".concat(t),"#,##0")}catch(e){returnibiz.log.error("".concat(t," 值格式化错误")),"".concat(t)}};returnfunction(){vare=t.params;if(Array.isArray(e))n.value=e.map((function(e){if(!o.value&&Array.isArray(t.c.items)&&t.c.items.length){varr,n,a=e.seriesIndex||0,c=t.c.service.seriesList[a],u=null==c||null===(r=c.catalogField)||void0===r?void0:r.toLowerCase(),l=e.name||"",s=null===(n=t.codeListMap[a])||void0===n?void0:n.catalog;u&&l&&(o.value=t.c.items.find((function(t){returns&&s.get(t[u])?s.get(t[u])===l:t[u]===l})))}i.value=e.name||"";varf=Array.isArray(e.value)?e.value[1]:e.value;return{text:e.seriesName,value:y(f),color:e.color}})),Array.isArray(m)&&m.length&&(n.value=m.map((function(t){vare,r,n=null===(e=o.value)||void0===e?void0:e[t.value];return{color:t.color,text:t.text,value:y(n),rate:null===(r=o.value)||void0===r?void0:r[t.rate]}})));elseif(e){varr,a,c,u,f,g=e;if(Array.isArray(t.c.items)&&t.c.items.length){varb,w,x,L=g.seriesIndex||0,A=t.c.service.seriesList[L],E=null==A||null===(b=A.catalogField)||void0===b?void0:b.toLowerCase(),j=null==A||null===(w=A.valueField)||void0===w?void0:w.toLowerCase();if("radar"===g.seriesType)returnn.value=t.c.items.map((function(t){return{text:t[E],value:y(t[j]),color:g.color,left:s,center:t[v],right:h}})),void(o.value={});varS=g.name||"",O=null===(x=t.codeListMap[L])||void0===x?void0:x.catalog;E&&S&&(o.value=t.c.items.find((function(t){returnO&&O.get(t[E])?O.get(t[E])===S:t[E]===S})))}varP=Array.isArray(g.value)?null===(r=g.value)||void0===r?void0:r[1]:g.value;n.value=[{text:(null===(a=o.value)||void0===a?void0:a[l])||e.name,value:y(P),color:g.color,left:s,center:null===(c=o.value)||void0===c?void0:c[v],right:h,percentage:null===(u=o.value)||void0===u?void0:u[d],rate:null===(f=o.value)||void0===f?void0:f[p]}]}}(),{ns:r,title:i,items:n,curData:o,label:u}},render:function(){vart=this;if(this.curData)returnu("div",{class:this.ns.b()},[this.label&&this.curData[this.label]&&u("div",{class:this.ns.b("header")},[this.curData[this.label]]),!(this.label&&this.curData[this.label])&&this.title&&u("div",{class:this.ns.b("header")},[this.title]),u("div",{class:this.ns.b("content")},[u("div",{class:this.ns.b("item-icon")},[this.items.map((function(e){returnu("div",{class:t.ns.b("item")},[e.color&&u("div",{class:t.ns.be("item","icon"),style:{background:e.color}})])}))]),u("div",{class:this.ns.b("item-text")},[this.items.map((function(e){returnu("div",{class:t.ns.b("item")},[e.text&&u("div",{class:t.ns.be("item","text")},[e.text])])}))]),u("div",{class:this.ns.b("item-value")},[this.items.map((function(e){returnu("div",{class:t.ns.b("item")},[null!=e.value&&u("div",{class:t.ns.be("item","value")},[e.value])])}))]),u("div",{class:this.ns.b("item-center")},[this.items.map((function(e){returnu("div",{class:t.ns.b("item")},[e.left&&u("div",{class:t.ns.be("item","left")},[e.left]),null!=e.center&&u("div",{class:t.ns.be("item","center")},[e.center]),e.right&&u("div",{class:t.ns.be("item","right")},[e.right])])}))]),u("div",{class:this.ns.b("item-percentage")},[this.items.map((function(e){returnu("div",{class:t.ns.b("item")},[e.percentage&&u("div",{class:t.ns.be("item","percentage")},[e.percentage])])}))]),u("div",{class:this.ns.b("item-rate")},[this.items.map((function(e){returnu("div",{class:t.ns.b("item")},[e.rate&&u("div",{class:t.ns.be("item","rate")},[u("rate-span",{attrs:{value:e.rate}})])])}))])])])}});t("default",a({name:"GwxnChartControl",props:{modelData:{type:v,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}}},setup:function(t){vara,c=l().proxy,u=f("chart"),v=d(c,t.modelData,t.context,t.params),p=(null===(a=v.model.source.getPSControlParam())||void0===a?void0:a.ctrlParams)||{},m=p.TYPE,y=p.TOTAL,g=!0;v.registerLoadHook((function(t){returnArray.isArray(t)&&y&&0===t.length&&(t.push(o({},y,100)),g=!1),t}));varb=function(){vart,o=(t=e().mark((functiont(i){varo,a,c,u,l,f,d,b,w,x,L,A,E,j,S;returne().wrap((function(t){for(;;)switch(t.prev=t.next){case0:if(!(o=i.tooltip)){t.next=6;break}returnt.next=4,v.service.getAllCodeListMap(v.context,v.params);case4:a=t.sent,o.formatter=function(t){vare=document.createElement("div"),r=news({el:e,render:function(e){returne(n,{props:{params:t,ctrlParams:p,c:v,codeListMap:a}})}});returnr.$el};case6:if("line"===m&&(c=i.xAxis,Array.isArray(c)&&c.length&&c.forEach((function(t){t.max=function(t){returnt.max+1}}))),u=i.series,Array.isArray(u)){t.next=10;break}returnt.abrupt("return",i);case10:return"custom"===m&&(-1!==(l=u.findIndex((function(t){return"pie"===t.type})))&&(b=!0,w=v.service.seriesList,(x=null===(f=w[l])||void0===f||null===(d=f.valueField)||void0===d?void0:d.toLowerCase())&&v.items.every((function(t){return!t[x]}))&&(u.splice(l,1),b=!1),b&&(u[l]=h(u[l],{emphasis:{label:{formatter:function(t){vare,r=null===(e=t.value[0])||void0===e?void0:e.replace("~","-"),n=t.value[1];return"{value|".concat(n,"}\n{key|").concat(r,"}")}}}}))),-1!==(L=u.findIndex((function(t){return"gauge"===t.type})))&&(u[L]=h(u[L],{axisLabel:{formatter:function(t){return24===t||t%2==1?"":"".concat(t)}}}))),"radar"===m&&(A=i.radar,E=u.find((function(t){return"radar"===t.type})),A&&!Array.isArray(A)&&Array.isArray(A.indicator)&&E&&Array.isArray(E.data)&&E.data.length&&(A.indicator=[].concat(r(A.indicator.slice(0,1)),r(A.indicator.slice(1).reverse())),E.data[0]=[].concat(r(E.data[0].slice(0,1)),r(E.data[0].slice(1).reverse())))),y&&(j=i.graphic,Array.isArray(j)&&j.length&&g&&(S=v.items.reduce((function(t,e){returnt+e[y]}),0),j[0]=h(j[0],{style:{text:S}})),g||i.tooltip&&Object.assign(i.tooltip,{show:!1})),t.abrupt("return",i);case14:case"end":returnt.stop()}}),t)})),function(){vare=this,r=arguments;returnnewPromise((function(n,o){vara=t.apply(e,r);functionc(t){i(a,n,o,c,u,"next",t)}functionu(t){i(a,n,o,c,u,"throw",t)}c(void0)}))});returnfunction(t){returno.apply(this,arguments)}}();returnv.registerHook(b),{c:v,ns:u}},render:function(){if(this.c.complete)returnu("control-layout",{attrs:{modelData:this.c.model}},[u("div",{class:this.ns.b(),style:{width:this.c.width,height:this.c.height}},[u("div",{attrs:{id:this.c.chartId},class:this.ns.b("content")}),this.c.items.length?null:u("div",{class:this.ns.b("empty-content")},["暂无数据"])])])}}))}}}))}();
!function(){functiont(r){returnt="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},t(r)}functionr(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){returne};vare={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeofSymbol?Symbol:{},a=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";functionf(t,r,e){returnObject.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(k){f=function(t,r,e){returnt[r]=e}}functions(t,r,e,n){varo=r&&r.prototypeinstanceofy?r:y,c=Object.create(o.prototype),a=new_(n||[]);returni(c,"_invoke",{value:j(t,e,a)}),c}functionh(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(k){return{type:"throw",arg:k}}}e.wrap=s;varp={};functiony(){}functionv(){}functiond(){}varm={};f(m,a,(function(){returnthis}));varg=Object.getPrototypeOf,w=g&&g(g(C([])));w&&w!==n&&o.call(w,a)&&(m=w);varb=d.prototype=y.prototype=Object.create(m);functionx(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){returnthis._invoke(r,t)}))}))}functionO(r,e){functionn(i,c,a,u){varl=h(r[i],r,c);if("throw"!==l.type){varf=l.arg,s=f.value;returns&&"object"==t(s)&&o.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){returnn("throw",t,a,u)}))}u(l.arg)}varc;i(this,"_invoke",{value:function(t,r){functiono(){returnnewe((function(e,o){n(t,r,e,o)}))}returnc=c?c.then(o,o):o()}})}functionj(t,r,e){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnS()}for(e.method=o,e.arg=i;;){varc=e.delegate;if(c){vara=P(c,e);if(a){if(a===p)continue;returna}}if("next"===e.method)e.sent=e._sent=e.arg;elseif("throw"===e.method){if("suspendedStart"===n)thrown="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";varu=h(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}functionP(t,r){vare=r.method,n=t.iterator[e];if(void0===n)returnr.delegate=null,"throw"===e&&t.iterator.return&&(r.method="return",r.arg=void0,P(t,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=newTypeError("The iterator does not provide a '"+e+"' method")),p;varo=h(n,t.iterator,r.arg);if("throw"===o.type)returnr.method="throw",r.arg=o.arg,r.delegate=null,p;vari=o.arg;returni?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void0),r.delegate=null,p):i:(r.method="throw",r.arg=newTypeError("iterator result is not an object"),r.delegate=null,p)}functionE(t){varr={tryLoc:t[0]};1int&&(r.catchLoc=t[1]),2int&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}functionL(t){varr=t.completion||{};r.type="normal",deleter.arg,t.completion=r}function_(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}functionC(t){if(t){varr=t[a];if(r)returnr.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){vare=-1,n=functionr(){for(;++e<t.length;)if(o.call(t,e))returnr.value=t[e],r.done=!1,r;returnr.value=void0,r.done=!0,r};returnn.next=n}}return{next:S}}functionS(){return{value:void0,done:!0}}returnv.prototype=d,i(b,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:v,configurable:!0}),v.displayName=f(d,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){varr="function"==typeoft&&t.constructor;return!!r&&(r===v||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,f(t,l,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},x(O.prototype),f(O.prototype,u,(function(){returnthis})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void0===i&&(i=Promise);varc=newO(s(t,r,n,o),i);returne.isGeneratorFunction(r)?c:c.next().then((function(t){returnt.done?t.value:c.next()}))},x(b),f(b,l,"Generator"),f(b,a,(function(){returnthis})),f(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){varr=Object(t),e=[];for(varninr)e.push(n);returne.reverse(),functiont(){for(;e.length;){varn=e.pop();if(ninr)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},e.values=C,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(L),!t)for(varrinthis)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;varr=this;functione(e,n){returnc.type="throw",c.arg=t,r.next=e,n&&(r.method="next",r.arg=void0),!!n}for(varn=this.tryEntries.length-1;n>=0;--n){vari=this.tryEntries[n],c=i.completion;if("root"===i.tryLoc)returne("end");if(i.tryLoc<=this.prev){vara=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)returne(i.catchLoc,!0);if(this.prev<i.finallyLoc)returne(i.finallyLoc)}elseif(a){if(this.prev<i.catchLoc)returne(i.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returne(i.finallyLoc)}}}},abrupt:function(t,r){for(vare=this.tryEntries.length-1;e>=0;--e){varn=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){vari=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);varc=i?i.completion:{};returnc.type=t,c.arg=r,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(c)},complete:function(t,r){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),p},finish:function(t){for(varr=this.tryEntries.length-1;r>=0;--r){vare=this.tryEntries[r];if(e.finallyLoc===t)returnthis.complete(e.completion,e.afterLoc),L(e),p}},catch:function(t){for(varr=this.tryEntries.length-1;r>=0;--r){vare=this.tryEntries[r];if(e.tryLoc===t){varn=e.completion;if("throw"===n.type){varo=n.arg;L(e)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,r,e){returnthis.delegate={iterator:C(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void0),p}},e}functione(t,r,e,n,o,i,c){try{vara=t[i](c),u=a.value}catch(l){returnvoide(l)}a.done?r(u):Promise.resolve(u).then(n,o)}functionn(t){returnfunction(){varr=this,n=arguments;returnnewPromise((function(o,i){varc=t.apply(r,n);functiona(t){e(c,o,i,a,u,"next",t)}functionu(t){e(c,o,i,a,u,"throw",t)}a(void0)}))}}functiono(){returno="undefined"!=typeofReflect&&Reflect.get?Reflect.get.bind():function(t,r,e){varn=function(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=u(t)););returnt}(t,r);if(n){varo=Object.getOwnPropertyDescriptor(n,r);returno.get?o.get.call(arguments.length<3?t:e):o.value}},o.apply(this,arguments)}functioni(t,r){returni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){returnt.__proto__=r,t},i(t,r)}functionc(r){vare=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();returnfunction(){varn,o=u(r);if(e){vari=u(this).constructor;n=Reflect.construct(o,arguments,i)}elsen=o.apply(this,arguments);returnfunction(r,e){if(e&&("object"===t(e)||"function"==typeofe))returne;if(void0!==e)thrownewTypeError("Derived constructors may only return object or undefined");returna(r)}(this,n)}}functiona(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}functionu(t){returnu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){returnt.__proto__||Object.getPrototypeOf(t)},u(t)}functionl(t,r){for(vare=0;e<r.length;e++){varn=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}functionf(t,r,e){returnr&&l(t.prototype,r),e&&l(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}functions(t,r){if(!(tinstanceofr))thrownewTypeError("Cannot call a class as a function")}functionh(t,r,e){return(r=p(r))int?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}functionp(r){vare=function(r,e){if("object"!==t(r)||null===r)returnr;varn=r[Symbol.toPrimitive];if(void0!==n){varo=n.call(r,e||"default");if("object"!==t(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===t(e)?e:String(e)}System.register(["@ibiz-template/model","@ibiz-template/runtime","@ibiz-template/controller"],(function(t,e){"use strict";varl,p,y,v;return{setters:[function(t){l=t.ControlType,p=t.ViewType},function(t){y=t.PluginStaticResource},function(t){v=t.PortletPartController}],execute:function(){vard=newy(e.meta.url),m=f((functiont(){s(this,t),h(this,"component","ChartControl")})),g=f((functiont(){s(this,t),h(this,"component","ChartView")})),w=function(t){!function(t,r){if("function"!=typeofr&&null!==r)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&i(t,r)}(p,t);vare,l=c(p);functionp(){vart;s(this,p);for(varr=arguments.length,e=newArray(r),n=0;n<r;n++)e[n]=arguments[n];returnh(a(t=l.call.apply(l,[this].concat(e))),"chart",void0),h(a(t),"chartProvider",void0),t}returnf(p,[{key:"onInit",value:(e=n(r().mark((functiont(){vare;returnr().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.next=2,o(u(p.prototype),"onInit",this).call(this);case2:if(!(e=this.model.chart)){t.next=7;break}returnt.next=6,ibiz.register.control.get(e);case6:this.chartProvider=t.sent;case7:case"end":returnt.stop()}}),t,this)}))),function(){returne.apply(this,arguments)})},{key:"setChartNeuron",value:function(t){varr=this;this.chart=t,this.chart.evt.on("mounted",(function(){vart;null===(t=r.chart)||void0===t||t.call.load()})),this.chart.evt.on("destroyed",(function(){r.chart=void0}))}}]),p}(v);t("C",w);varb=function(){functiont(){s(this,t),h(this,"component","ChartPortlet")}vare;returnf(t,[{key:"createController",value:(e=n(r().mark((functiont(e,n,o){vari;returnr().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returni=neww(e,n,o),t.next=3,i.init();case3:returnt.abrupt("return",i);case4:case"end":returnt.stop()}}),t)}))),function(t,r,n){returne.apply(this,arguments)})}]),t}(),x=f((functiont(){s(this,t),h(this,"component","GwxnChartControl")}));t("i",{mateUrl:e.meta.url,install:function(t){d.loadStyle(["/style.css"]),t.component("ChartControl",(function(){returne.import("./chart-control.legacy.js")})),ibiz.register.control.register(l.CHART,newm),t.component("ChartView",(function(){returne.import("./chart-view.legacy.js")})),ibiz.register.view.register(p.DE_CHART_VIEW,newg),t.component("ChartPortlet",(function(){returne.import("./chart-portlet.legacy.js")})),ibiz.register.portletPart.register("CHART",newb),t.component("GwxnChartControl",(function(){returne.import("./gwxn-chart-control.legacy.js")})),ibiz.register.control.register("CUSTOM_GwxnChart",newx)}})}}}))}();
!function(){functione(t){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(t)}functiont(e){returnfunction(e){if(Array.isArray(e))returnr(e)}(e)||function(e){if("undefined"!=typeofSymbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])returnArray.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeofe)returnr(e,t);varn=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)returnArray.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))returnr(e,t)}(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionr(e,t){(null==t||t>e.length)&&(t=e.length);for(varr=0,n=newArray(t);r<t;r++)n[r]=e[r];returnn}functionn(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n=function(){returnt};vart={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeofSymbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";functionl(e,t,r){returnObject.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(j){l=function(e,t,r){returne[t]=r}}functionh(e,t,r,n){varo=t&&t.prototypeinstanceofd?t:d,a=Object.create(o.prototype),s=newP(n||[]);returni(a,"_invoke",{value:S(e,r,s)}),a}functionf(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(j){return{type:"throw",arg:j}}}t.wrap=h;varp={};functiond(){}functionv(){}functiony(){}varm={};l(m,s,(function(){returnthis}));varg=Object.getPrototypeOf,w=g&&g(g(k([])));w&&w!==r&&o.call(w,s)&&(m=w);varb=y.prototype=d.prototype=Object.create(m);functionx(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){returnthis._invoke(t,e)}))}))}functionC(t,r){functionn(i,a,s,c){varu=f(t[i],t,a);if("throw"!==u.type){varl=u.arg,h=l.value;returnh&&"object"==e(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(e){n("next",e,s,c)}),(function(e){n("throw",e,s,c)})):r.resolve(h).then((function(e){l.value=e,s(l)}),(function(e){returnn("throw",e,s,c)}))}c(u.arg)}vara;i(this,"_invoke",{value:function(e,t){functiono(){returnnewr((function(r,o){n(e,t,r,o)}))}returna=a?a.then(o,o):o()}})}functionS(e,t,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnA()}for(r.method=o,r.arg=i;;){vara=r.delegate;if(a){vars=O(a,r);if(s){if(s===p)continue;returns}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varc=f(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}functionO(e,t){varr=t.method,n=e.iterator[r];if(void0===n)returnt.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void0,O(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=newTypeError("The iterator does not provide a '"+r+"' method")),p;varo=f(n,e.iterator,t.arg);if("throw"===o.type)returnt.method="throw",t.arg=o.arg,t.delegate=null,p;vari=o.arg;returni?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void0),t.delegate=null,p):i:(t.method="throw",t.arg=newTypeError("iterator result is not an object"),t.delegate=null,p)}functionL(e){vart={tryLoc:e[0]};1ine&&(t.catchLoc=e[1]),2ine&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}functionE(e){vart=e.completion||{};t.type="normal",deletet.arg,e.completion=t}functionP(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}functionk(e){if(e){vart=e[s];if(t)returnt.call(e);if("function"==typeofe.next)returne;if(!isNaN(e.length)){varr=-1,n=functiont(){for(;++r<e.length;)if(o.call(e,r))returnt.value=e[r],t.done=!1,t;returnt.value=void0,t.done=!0,t};returnn.next=n}}return{next:A}}functionA(){return{value:void0,done:!0}}returnv.prototype=y,i(b,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=l(y,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){vart="function"==typeofe&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){returnObject.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,l(e,u,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},x(C.prototype),l(C.prototype,c,(function(){returnthis})),t.AsyncIterator=C,t.async=function(e,r,n,o,i){void0===i&&(i=Promise);vara=newC(h(e,r,n,o),i);returnt.isGeneratorFunction(r)?a:a.next().then((function(e){returne.done?e.value:a.next()}))},x(b),l(b,u,"Generator"),l(b,s,(function(){returnthis})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){vart=Object(e),r=[];for(varnint)r.push(n);returnr.reverse(),functione(){for(;r.length;){varn=r.pop();if(nint)returne.value=n,e.done=!1,e}returne.done=!0,e}},t.values=k,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(E),!e)for(vartinthis)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void0)},stop:function(){this.done=!0;vare=this.tryEntries[0].completion;if("throw"===e.type)throwe.arg;returnthis.rval},dispatchException:function(e){if(this.done)throwe;vart=this;functionr(r,n){returna.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void0),!!n}for(varn=this.tryEntries.length-1;n>=0;--n){vari=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)returnr("end");if(i.tryLoc<=this.prev){vars=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}elseif(s){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0)}else{if(!c)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}}}},abrupt:function(e,t){for(varr=this.tryEntries.length-1;r>=0;--r){varn=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){vari=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(e,t){if("throw"===e.type)throwe.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(vart=this.tryEntries.length-1;t>=0;--t){varr=this.tryEntries[t];if(r.finallyLoc===e)returnthis.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(vart=this.tryEntries.length-1;t>=0;--t){varr=this.tryEntries[t];if(r.tryLoc===e){varn=r.completion;if("throw"===n.type){varo=n.arg;E(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(e,t,r){returnthis.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void0),p}},t}functiono(e,t,r,n,o,i,a){try{vars=e[i](a),c=s.value}catch(u){returnvoidr(u)}s.done?t(c):Promise.resolve(c).then(n,o)}functioni(e){returnfunction(){vart=this,r=arguments;returnnewPromise((function(n,i){vara=e.apply(t,r);functions(e){o(a,n,i,s,c,"next",e)}functionc(e){o(a,n,i,s,c,"throw",e)}s(void0)}))}}functiona(e,t){varr=Object.keys(e);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}returnr}functions(e){for(vart=1;t<arguments.length;t++){varr=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}returne}functionc(e,t,r){return(t=f(t))ine?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}functionu(){returnu="undefined"!=typeofReflect&&Reflect.get?Reflect.get.bind():function(e,t,r){varn=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););returne}(e,t);if(n){varo=Object.getOwnPropertyDescriptor(n,t);returno.get?o.get.call(arguments.length<3?e:r):o.value}},u.apply(this,arguments)}functionl(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}functionh(e,t,r){returnt&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}functionf(t){varr=function(t,r){if("object"!==e(t)||null===t)returnt;varn=t[Symbol.toPrimitive];if(void0!==n){varo=n.call(t,r||"default");if("object"!==e(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}functionp(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functiond(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}functionv(e,t){returnv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){returne.__proto__=t,e},v(e,t)}functiony(t){varr=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();returnfunction(){varn,o=g(t);if(r){vari=g(this).constructor;n=Reflect.construct(o,arguments,i)}elsen=o.apply(this,arguments);returnfunction(t,r){if(r&&("object"===e(r)||"function"==typeofr))returnr;if(void0!==r)thrownewTypeError("Derived constructors may only return object or undefined");returnm(t)}(this,n)}}functionm(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functiong(e){returng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){returne.__proto__||Object.getPrototypeOf(e)},g(e)}System.register(["@ibiz-template/vue-util","@ibiz-template/controller","qx-util","echarts","ramda","@ibiz-template/service"],(function(e,r){"use strict";varo,a,l,f,v,w,b,x;return{setters:[function(e){o=e.useControlController},function(e){a=e.Neuron,l=e.ControlNerve,f=e.ControlController},function(e){v=e.createUUID},function(e){w=e.init},function(e){b=e.mergeDeepRight},function(e){x=e.ControlService}],execute:function(){e("u",(function(e,t,r){varn=arguments.length>3&&void0!==arguments[3]?arguments[3]:{};returno(e,(function(){returnnewE(t,r,n)}))}));varr=function(e){d(r,e);vart=y(r);functionr(){returnp(this,r),t.apply(this,arguments)}returnh(r)}(a),C=function(e){d(n,e);vart=y(n);functionn(){returnp(this,n),t.apply(this,arguments)}returnh(n,[{key:"createNeuron",value:function(){returnnewr(this.bindAbility())}},{key:"bindAbility",value:function(){returns(s({},u(g(n.prototype),"bindAbility",this).call(this)),{},{load:this.controller.load.bind(this.controller)})}}]),n}(l);functionS(e){vart={};returne&&Object.keys(e).forEach((function(r){varn=r.indexOf(".");if(-1!==n){varo=r.slice(n+1);if(o&&void0!==e[r])try{t[o]=JSON.parse(e[r])}catch(i){ibiz.log.error("".concat(o," 解析错误"))}}})),t}functionO(e){return{axisLabel:{formatter:function(t){return1===e?t.length>4?"".concat(t.slice(0,4).split("").join("\n"),"\n..."):t.split("").join("\n"):2===e&&t.length>4?"".concat(t.slice(0,4),"..."):t},rotate:2===e?45:0}}}varL=function(e){d(l,e);varr,o,a,u=y(l);functionl(e){vart;p(this,l),c(m(t=u.call(this,e)),"seriesList",[]);varr=e.source.getPSDEChartSerieses();if(!r||!r.length)thrownewError("图表序列集合不能为空");returnt.seriesList=r,t}returnh(l,[{key:"fetch",value:(a=i(n().mark((functione(t){varr,o,i=arguments;returnn().wrap((function(e){for(;;)switch(e.prev=e.next){case0:returnr=i.length>1&&void0!==i[1]?i[1]:{},e.next=3,this.exec(this.model.fetchAction,t,r);case3:returno=e.sent,e.abrupt("return",o);case5:case"end":returne.stop()}}),e,this)}))),function(e){returna.apply(this,arguments)})},{key:"getAllCodeListMap",value:(o=i(n().mark((functione(t,r){varo;returnn().wrap((function(e){for(;;)switch(e.prev=e.next){case0:returno=[],e.next=3,Promise.all(this.seriesList.map(function(){vare=i(n().mark((functione(i,a){vars,c,u,l,h,f,p,d,v,y,m;returnn().wrap((function(e){for(;;)switch(e.prev=e.next){case0:if(h={},f=null===(s=i.getCatalogPSCodeList)||void0===s||null===(c=s.call(i))||void0===c?void0:c.codeName,p=null===(u=i.getSeriesPSCodeList)||void0===u||null===(l=u.call(i))||void0===l?void0:l.codeName,!f){e.next=8;break}returne.next=6,ibiz.codeListService.get(f,t,r);case6:(d=e.sent)&&(v=newMap,d.forEach((function(e){v.set(e.value,e.text)})),h.catalog=v);case8:if(!p){e.next=13;break}returne.next=11,ibiz.codeListService.get(p,t,r);case11:(y=e.sent)&&(m=newMap,y.forEach((function(e){m.set(e.value,e.text)})),h.series=m);case13:o[a]=h;case14:case"end":returne.stop()}}),e)})));returnfunction(t,r){returne.apply(this,arguments)}}()));case3:returne.abrupt("return",o);case4:case"end":returne.stop()}}),e,this)}))),function(e,t){returno.apply(this,arguments)})},{key:"generateDatasetOption",value:function(e,r,n){varo,i={},a=[];i.source=a;vars=e.catalogField.toLowerCase(),c=e.valueField.toLowerCase(),u=null===(o=e.seriesField)||void0===o?void0:o.toLowerCase();if(u){varl=newSet;r.forEach((function(e){l.add(e[u])})),a.push([s].concat(t(l)))}elsea.push([s,c]);a.push.apply(a,t(r.map((function(e){returna[0].map((function(t,r){return0===r?(n&&n.catalog?n.catalog.get(e[t]):e[t])||"未定义":u?t===e[u]&&e[c]||0:e[c]||0}))})))),n&&n.series&&(a[0]=a[0].map((function(e,t){varr;return0===t?e:(null===(r=n.series)||void0===r?void0:r.get(e))||e})));for(varh=function(e){for(vart=e+1;t<a.length;t++)a[t][0]===a[e][0]&&(a[t].forEach((function(t,r){0!==r&&(a[e][r]+=t)})),a.splice(t,1),t-=1)},f=1;f<a.length;f++)h(f);returni}},{key:"generateChartOption",value:(r=i(n().mark((functione(r,o,i){vara,s,c=this;returnn().wrap((function(e){for(;;)switch(e.prev=e.next){case0:return(a={}).dataset=[],a.series=[],e.next=5,this.getAllCodeListMap(o,i);case5:returns=e.sent,this.seriesList.forEach((function(e,n){if("radar"!==e.eChartsType){varo=c.generateDatasetOption(e,r,s[n]);if(Array.isArray(a.dataset)&&a.dataset.push(o),"bar"===e.eChartsType){vari,u=c.generateBarSeriesOption(e,r,s[n],n);Array.isArray(a.series)&&(i=a.series).push.apply(i,t(u))}elseif("line"===e.eChartsType){varl,h=c.generateLineSeriesOption(e,r,s[n],n);Array.isArray(a.series)&&(l=a.series).push.apply(l,t(h))}elseif("pie"===e.eChartsType){varf,p=c.generatePieSeriesOption(e,r,s[n],n);Array.isArray(a.series)&&(f=a.series).push.apply(f,t(p))}elseif("funnel"===e.eChartsType){vard,v=c.generateFunnelSeriesOption(e,r,s[n],n);Array.isArray(a.series)&&(d=a.series).push.apply(d,t(v))}else{if("scatter"!==e.eChartsType)thrownewError("".concat(e.eChartsType,"类型的图表暂未实现"));vary,m=c.generateScatterSeriesOption(e,r,s[n],n);Array.isArray(a.series)&&(y=a.series).push.apply(y,t(m))}}else{varg,w=c.generateRadarSeriesOption(e,r,s[n]),b=w.series,x=w.radar;Array.isArray(a.series)&&(g=a.series).push.apply(g,t(b)),a.radar=x}})),e.abrupt("return",a);case8:case"end":returne.stop()}}),e,this)}))),function(e,t,n){returnr.apply(this,arguments)})},{key:"generateBarSeriesOption",value:function(e,r,n,o){vari,a,c,u,l,h,f,p=[],d=e.eChartsType,v=e.catalogField.toLowerCase(),y=e.valueField.toLowerCase(),m=null===(i=e.seriesField)||void0===i?void0:i.toLowerCase(),g=+(null===(a=e.M)||void0===a||null===(c=a.getPSChartSeriesEncode)||void0===c||null===(u=c.getPSChartXAxis)||void0===u?void0:u.id)||0,w=+(null===(l=e.M)||void0===l||null===(h=l.getPSChartSeriesEncode)||void0===h||null===(f=h.getPSChartYAxis)||void0===f?void0:f.id)||0,x={};if(m){varC=newSet;r.forEach((function(e){vart=e[m];C.add(n&&n.series&&n.series.get(t)||t)})),p.push.apply(p,t(t(C).map((function(t){returns({type:d,xAxisIndex:g,yAxisIndex:w,name:t,datasetIndex:o,encode:{x:v,y:t}},b(x,S(e.userParams)))}))))}elsep.push(s({type:d,xAxisIndex:g,yAxisIndex:w,name:e.caption||e.id,datasetIndex:o,encode:{x:v,y:y}},b(x,S(e.userParams))));returnp}},{key:"generateLineSeriesOption",value:function(e,r,n,o){vari,a,c,u,l,h,f,p=[],d=e.eChartsType,v=e.catalogField.toLowerCase(),y=e.valueField.toLowerCase(),m=null===(i=e.seriesField)||void0===i?void0:i.toLowerCase(),g=+(null===(a=e.M)||void0===a||null===(c=a.getPSChartSeriesEncode)||void0===c||null===(u=c.getPSChartXAxis)||void0===u?void0:u.id)||0,w=+(null===(l=e.M)||void0===l||null===(h=l.getPSChartSeriesEncode)||void0===h||null===(f=h.getPSChartYAxis)||void0===f?void0:f.id)||0,x={emphasis:{label:{fontSize:20,show:!0}},label:{position:"top",show:!0}};if(m){varC=newSet;r.forEach((function(e){vart=e[m];C.add(n&&n.series&&n.series.get(t)||t)})),p.push.apply(p,t(t(C).map((function(t){returns({type:d,xAxisIndex:g,yAxisIndex:w,name:t,datasetIndex:o,encode:{x:v,y:t},stack:e.M.stack?e.id:void0,step:!!e.M.step&&"middle"},b(x,S(e.userParams)))}))))}elsep.push(s({type:d,xAxisIndex:g,yAxisIndex:w,name:e.caption||e.id,datasetIndex:o,encode:{x:v,y:y}},b(x,S(e.userParams))));returnp}},{key:"generatePieSeriesOption",value:function(e,r,n,o){vari,a=[],c=e.eChartsType,u=e.catalogField.toLowerCase(),l=e.valueField.toLowerCase(),h=null===(i=e.seriesField)||void0===i?void0:i.toLowerCase(),f={emphasis:{label:{fontSize:20,show:!0}},label:{formatter:"{b}: {d}%({@age})",position:"outside",show:!0}};if(h){varp=newSet;r.forEach((function(e){vart=e[h];p.add(n&&n.series&&n.series.get(t)||t)})),a.push.apply(a,t(t(p).map((function(t){returns({type:c,name:t,datasetIndex:o,encode:{itemName:u,value:t}},b(f,S(e.userParams)))}))))}elsea.push(s({type:c,name:e.caption||e.id,datasetIndex:o,encode:{itemName:u,value:l}},b(f,S(e.userParams))));returna}},{key:"generateFunnelSeriesOption",value:function(e,r,n,o){vari,a=[],c=e.eChartsType,u=e.catalogField.toLowerCase(),l=e.valueField.toLowerCase(),h=null===(i=e.seriesField)||void0===i?void0:i.toLowerCase(),f={emphasis:{label:{fontSize:20,show:!0}},label:{formatter:"{b}: {d}%({@age})",position:"outside",show:!0}};if(h){varp=newSet;r.forEach((function(e){vart=e[h];p.add(n&&n.series&&n.series.get(t)||t)})),a.push.apply(a,t(t(p).map((function(t){returns({type:c,name:t,datasetIndex:o,encode:{itemName:u,value:t}},b(f,S(e.userParams)))}))))}elsea.push(s({type:c,name:e.caption||e.id,datasetIndex:o,encode:{itemName:u,value:l}},b(f,S(e.userParams))));returna}},{key:"generateScatterSeriesOption",value:function(e,r,n,o){vari,a=[],c=e.eChartsType,u=e.catalogField.toLowerCase(),l=e.valueField.toLowerCase(),h=null===(i=e.seriesField)||void0===i?void0:i.toLowerCase(),f={emphasis:{label:{fontSize:20,show:!0}},label:{position:"top",show:!0}};if(h){varp=newSet;r.forEach((function(e){vart=e[h];p.add(n&&n.series&&n.series.get(t)||t)})),a.push.apply(a,t(t(p).map((function(t){returns({type:c,name:t,datasetIndex:o,encode:{x:u,y:t}},b(f,S(e.userParams)))}))))}elsea.push(s({type:c,name:e.caption||e.id,datasetIndex:o,encode:{x:u,y:l}},b(f,S(e.userParams))));returna}},{key:"generateRadarSeriesOption",value:function(e,r,n){varo,i=[],a=[],c=e.eChartsType,u=e.catalogField.toLowerCase(),l=e.valueField.toLowerCase(),h=null===(o=e.seriesField)||void0===o?void0:o.toLowerCase();if(h){varf=newSet;r.forEach((function(e){f.add(e[h])})),a.push([u].concat(t(f)))}elsea.push([u,l]);a.push.apply(a,t(r.map((function(e){returna[0].map((function(t,r){return0===r?(n&&n.catalog?n.catalog.get(e[t]):e[t])||"未定义":h?t===e[h]?e[l]:0:e[l]}))})))),n&&n.series&&(a[0]=a[0].map((function(e,t){varr;return0===t?e:(null===(r=n.series)||void0===r?void0:r.get(e))||e})));for(varp=function(e){for(vart=e+1;t<a.length;t++)a[t][0]===a[e][0]&&(a[t].forEach((function(t,r){0!==r&&(a[e][r]+=t)})),a.splice(t,1),t-=1)},d=1;d<a.length;d++)p(d);varv=a[0].slice(1).map((function(e,t){returna.slice(1).map((function(e){returne[t+1]}))}));i.push(s({type:c,name:e.caption||e.id,data:v},b({emphasis:{label:{fontSize:20,show:!0}},label:{position:"top",show:!0}},S(e.userParams))));vary=-1/0;returnv.forEach((function(e){e.forEach((function(e){+e>y&&(y=+e)}))})),{series:i,radar:{indicator:a.slice(1).map((function(e){return{name:e[0],max:y}}))}}}}]),l}(x),E=function(e){d(a,e);vart,r,o=y(a);functiona(){vare;p(this,a);for(vart=arguments.length,r=newArray(t),n=0;n<t;n++)r[n]=arguments[n];returnc(m(e=o.call.apply(o,[this].concat(r))),"chart",null),c(m(e),"chartId","chart_".concat(v())),c(m(e),"chartStaticOption",{}),c(m(e),"hook",void0),c(m(e),"loadHook",void0),c(m(e),"items",[]),c(m(e),"queryParams",{page:0,size:1e3,query:""}),c(m(e),"width","100%"),c(m(e),"height","100%"),e}returnh(a,[{key:"createNerve",value:function(){returnnewC(this)}},{key:"onInit",value:(r=i(n().mark((functione(){vart,r,o;returnn().wrap((function(e){for(;;)switch(e.prev=e.next){case0:returne.next=2,u(g(a.prototype),"onInit",this).call(this);case2:returnthis.service=newL(this.model),e.next=5,this.service.init(this.context);case5:this.initChartStaticOption(),this.resizeChart=this.resizeChart.bind(this),window.addEventListener("resize",this.resizeChart),t=this.model.source,r=t.width,o=t.height,r&&(this.width="".concat(r,"px")),o&&(this.height="".concat(o,"px"));case11:case"end":returne.stop()}}),e,this)}))),function(){returnr.apply(this,arguments)})},{key:"resizeChart",value:function(){vare;null===(e=this.chart)||void0===e||e.resize()}},{key:"initChartStaticOption",value:function(){vare={},t=this.model.source.getPSDEChartTitle();e.title=t?function(e){vart={};if(e){varr;t.show=e.showTitle,t.text=e.title,t.subtext=e.subTitle;varn=null===(r=e.titlePos)||void0===r?void0:r.toLowerCase();"left"===n||"right"===n?t.left=n:"bottom"!==n&&"top"!==n||(t.left="center",t.top=n)}returnt}(t):{},e.tooltip={show:!0};varr=this.model.source.getPSDEChartSerieses();r&&r.length&&"bar"===r[0].eChartsType&&(e.tooltip={show:!0,padding:0,backgroundColor:"rgba(255, 255, 255, 0)",borderWidth:0,className:"chart-tooltip",borderRadius:6,extraCssText:"box-shadow: none;",trigger:"axis",axisPointer:{type:"shadow"},appendToBody:!0,formatter:function(e){vart=e,r=document.createElement("div");if(r.classList.add("chart-tooltip-container"),Array.isArray(e)){varn=[],o=newMap;t.forEach((function(e){vart=e.seriesName,r=e.dimensionNames;r.slice(1).forEach((function(i,a){vars=2===r.length?t:i,c=e.value[a+1];o.has(s)||(n.push({x:s,y:c}),o.set(s,c))}))}));vari=document.createElement("div");returni.classList.add("chart-tooltip-title"),i.textContent=t[0].value[0],r.appendChild(i),n.forEach((function(e){vart=document.createElement("div");t.classList.add("chart-tooltip-item");varn=document.createElement("div");n.classList.add("chart-tooltip-item-name"),n.textContent=e.x,t.appendChild(n);varo=document.createElement("div");o.classList.add("chart-tooltip-item-number"),o.textContent=e.y,t.appendChild(o),r.appendChild(t)})),r}returnr}});varn=this.model.source.getPSDEChartLegend();e.legend=n?function(e){vart={};if(e){varr;t.show=e.showLegend;varn=null===(r=e.legendPos)||void0===r?void0:r.toLowerCase();"left"===n||"right"===n?(t.left=n,t.top="middle",t.orient="vertical"):"bottom"===n&&(t.top=n)}returnt}(n):{};varo=this.model.source.getPSChartXAxises();e.xAxis=o?function(e){vart=[];returne&&e.length&&e.forEach((function(e){varr=e.caption,n=e.minValue,o=e.maxValue,i=e.eChartsType,a=e.position,c={name:r,min:n,max:o};Object.assign(c,s({type:i,position:a},b(O(e.dataShowMode),S(e.userParams)))),t.push(c)})),t}(o):[];vari=this.model.source.getPSChartYAxises();e.yAxis=i?function(e){vart=[];returne&&e.length&&e.forEach((function(e){varr=e.caption,n=e.minValue,o=e.maxValue,i=e.eChartsType,a=e.position,c={name:r,min:n,max:o};Object.assign(c,s({type:i,position:a},b(O(e.dataShowMode),S(e.userParams)))),t.push(c)})),t}(i):[],Object.assign(this.chartStaticOption,b(e,S(this.model.source.userParams)))}},{key:"registerHook",value:function(e){this.hook=e}},{key:"registerLoadHook",value:function(e){this.loadHook=e}},{key:"load",value:(t=i(n().mark((functione(){vart,r,o,i,a,c,u;returnn().wrap((function(e){for(;;)switch(e.prev=e.next){case0:returne.next=2,this.startLoading();case2:returne.prev=2,e.next=5,this.service.fetch(this.context,s(s({},this.params),this.queryParams));case5:if(t=e.sent,r=t.data,r=this.loadHook?this.loadHook(r):r,!Array.isArray(r)||!r.length){e.next=27;break}if(this.items=r,this.chart){e.next=15;break}if(o=document.querySelector("#".concat(this.chartId))){e.next=14;break}thrownewError("未找到ECharts绘制容器元素");case14:this.chart=w(o);case15:returne.next=17,this.service.generateChartOption(r,this.context,this.params);case17:if(i=e.sent,a=b(this.chartStaticOption,i),c=a,!this.hook){e.next=24;break}returne.next=23,this.hook(a);case23:c=e.sent;case24:this.chart.setOption(c),e.next=29;break;case27:this.items=[],null===(u=this.chart)||void0===u||u.clear();case29:returne.prev=29,e.next=32,this.endLoading();case32:returne.finish(29);case33:case"end":returne.stop()}}),e,this,[[2,,29,33]])}))),function(){returnt.apply(this,arguments)})},{key:"destroy",value:function(){vare;u(g(a.prototype),"destroy",this).call(this),null===(e=this.chart)||void0===e||e.dispose(),window.removeEventListener("resize",this.resizeChart)}}]),a}(f)}}}))}();