@ecan-bi/datav 1.3.56 → 1.3.57

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/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.3.56 */
1
+ /*! @ecan-bi/datav@1.3.57 */
2
2
  (function(G,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("echarts/core"),require("resize-detector"),require("ant-design-vue"),require("ant-design-vue/es/spin/style"),require("ant-design-vue/es/skeleton/style"),require("lodash-es"),require("dayjs"),require("axios"),require("mitt"),require("ant-design-vue/es/progress/style"),require("ant-design-vue/es/input/style"),require("ant-design-vue/es/date-picker/style"),require("ant-design-vue/es/date-picker/locale/zh_CN"),require("ant-design-vue/es/button/style"),require("ant-design-vue/es/checkbox/style"),require("ant-design-vue/es/select/style"),require("ant-design-vue/es/tree-select/style"),require("echarts/renderers"),require("echarts/charts"),require("echarts/components"),require("ant-design-vue/es/modal/style"),require("echarts"),require("ant-design-vue/es/table/style"),require("ant-design-vue/es/notification/style"),require("xlsx"),require("big.js")):typeof define=="function"&&define.amd?define(["exports","vue","echarts/core","resize-detector","ant-design-vue","ant-design-vue/es/spin/style","ant-design-vue/es/skeleton/style","lodash-es","dayjs","axios","mitt","ant-design-vue/es/progress/style","ant-design-vue/es/input/style","ant-design-vue/es/date-picker/style","ant-design-vue/es/date-picker/locale/zh_CN","ant-design-vue/es/button/style","ant-design-vue/es/checkbox/style","ant-design-vue/es/select/style","ant-design-vue/es/tree-select/style","echarts/renderers","echarts/charts","echarts/components","ant-design-vue/es/modal/style","echarts","ant-design-vue/es/table/style","ant-design-vue/es/notification/style","xlsx","big.js"],t):(G=typeof globalThis<"u"?globalThis:G||self,t(G["@ecan/bi-datav"]={},G.Vue,G["echarts/core"],G.ResizeDetector,G.AntDesignVue,null,null,G.LodashEs,G.Dayjs,G.Axios,G.Mitt,null,null,null,G["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,G["echarts/renderers"],G["echarts/charts"],G["echarts/components"],null,G.Echarts,null,null,G.Xlsx,G.big.js))})(this,function(G,t,tt,Qa,me,$u,Ku,_e,ve,rs,ls,Yu,Zu,Qu,Ja,Ju,Xu,eh,th,Lt,bt,Be,nh,ss,oh,ah,en,cs){var ns,os,as,is;"use strict";function ds(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const fs=ds(ss),us=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function hs(e,o){function n(i){return(...r)=>{if(e.value||o(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[i].apply(e.value,r)}}function a(){const i=Object.create(null);return us.forEach(r=>{i[r]=n(r)}),i}return a()}function gs(e,o,n){let a=null;t.watch([n,e,o],([i,r,s],l,d)=>{i&&r&&s&&(a=tt.throttle(()=>{r.resize()},100),Qa.addListener(i,a)),d(()=>{a&&i&&Qa.removeListener(i,a)})})}const ms={autoresize:Boolean},ys="ecLoadingOptions";function xs(e,o,n){const a=t.inject(ys,{}),i=t.computed(()=>({...t.unref(a),...n==null?void 0:n.value}));t.watchEffect(()=>{const r=e.value;r&&(o.value?r.showLoading(i.value):r.hideLoading())})}const ps={loading:Boolean,loadingOptions:Object},ih="",bs=/^on[^a-z]/,vs=e=>bs.test(e);function Ss(e){const o={};for(const n in e)vs(n)||(o[n]=e[n]);return o}const Cs="x-vue-echarts",ws="ecTheme",As="ecInitOptions",ks="ecUpdateOptions",wt=t.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...ms,...ps},inheritAttrs:!1,setup(e,{attrs:o,listeners:n}){const a=t.shallowRef(),i=t.shallowRef(),r=t.shallowRef(),s=t.inject(ws,null),l=t.inject(As,null),d=t.inject(ks,null),{autoresize:c,manualUpdate:u,loading:y,loadingOptions:f}=t.toRefs(e),g=t.computed(()=>r.value||e.option||Object.create(null)),m=t.computed(()=>e.theme||t.unref(s)||{}),h=t.computed(()=>e.initOptions||t.unref(l)||{}),C=t.computed(()=>e.updateOptions||t.unref(d)||{}),v=t.computed(()=>Ss(o));function x(L){if(i.value||!a.value)return;const A=i.value=tt.init(a.value,m.value,h.value);e.group&&(A.group=e.group);let O=n;O||(O={},Object.keys(o).filter(N=>N.indexOf("on")===0&&N.length>2).forEach(N=>{const D=N.charAt(2).toLowerCase()+N.slice(3);O[D]=o[N]})),Object.keys(O).forEach(N=>{const D=O[N];D&&(N.indexOf("zr:")===0?A.getZr().on(N.slice(3).toLowerCase(),D):A.on(N.toLowerCase(),D))});function w(){if(A&&!A.isDisposed())try{A.resize()}catch(N){if(N.message==="Cannot read property 'get' of undefined")return;throw N}}function I(){A.setOption(L||g.value,C.value)}c.value?t.nextTick(()=>{w(),I()}):I()}function p(L,A){e.manualUpdate&&(r.value=L),i.value?i.value.setOption(L,A||{}):x(L)}function b(){i.value&&(i.value.dispose(),i.value=void 0)}let k=null;t.watch(u,L=>{typeof k=="function"&&(k(),k=null),L||(k=t.watch(()=>e.option,A=>{A&&(i.value?i.value.setOption(A,C.value):x())},{deep:!0}))},{immediate:!0}),t.watch([m,h],()=>{b(),x()},{deep:!0}),t.watchEffect(()=>{e.group&&i.value&&(i.value.group=e.group)});const T=hs(i,x);return xs(i,y,f),gs(i,c,a),t.onMounted(()=>{e.option&&x()}),t.onUnmounted(b),{chart:i,root:a,setOption:p,nonEventAttrs:v,...T}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",t.h(Cs,e)}});function lt(e,o){Ts(e)&&(e="100%");var n=Bs(e);return e=o===360?e:Math.min(o,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*o),10)/100),Math.abs(e-o)<1e-6?1:(o===360?e=(e<0?e%o+o:e%o)/parseFloat(String(o)):e=e%o/parseFloat(String(o)),e)}function Ts(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Bs(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Es(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Dn(e){return e.length===1?"0"+e:String(e)}function Ds(e,o,n){return{r:lt(e,255)*255,g:lt(o,255)*255,b:lt(n,255)*255}}function In(e,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(o-e)*(6*n):n<1/2?o:n<2/3?e+(o-e)*(2/3-n)*6:e}function Is(e,o,n){var a,i,r;if(e=lt(e,360),o=lt(o,100),n=lt(n,100),o===0)i=n,r=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,l=2*n-s;a=In(l,s,e+1/3),i=In(l,s,e),r=In(l,s,e-1/3)}return{r:a*255,g:i*255,b:r*255}}function Rs(e,o,n){e=lt(e,255),o=lt(o,255),n=lt(n,255);var a=Math.max(e,o,n),i=Math.min(e,o,n),r=0,s=a,l=a-i,d=a===0?0:l/a;if(a===i)r=0;else{switch(a){case e:r=(o-n)/l+(o<n?6:0);break;case o:r=(n-e)/l+2;break;case n:r=(e-o)/l+4;break}r/=6}return{h:r,s:d,v:s}}function Ls(e,o,n){e=lt(e,360)*6,o=lt(o,100),n=lt(n,100);var a=Math.floor(e),i=e-a,r=n*(1-o),s=n*(1-i*o),l=n*(1-(1-i)*o),d=a%6,c=[n,s,r,r,l,n][d],u=[l,n,n,s,r,r][d],y=[r,r,l,n,n,s][d];return{r:c*255,g:u*255,b:y*255}}function _s(e,o,n,a){var i=[Dn(Math.round(e).toString(16)),Dn(Math.round(o).toString(16)),Dn(Math.round(n).toString(16))];return a&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Xa(e){return nt(e)/255}function nt(e){return parseInt(e,16)}var ei={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tn(e){var o={r:0,g:0,b:0},n=1,a=null,i=null,r=null,s=!1,l=!1;return typeof e=="string"&&(e=Fs(e)),typeof e=="object"&&(vt(e.r)&&vt(e.g)&&vt(e.b)?(o=Ds(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):vt(e.h)&&vt(e.s)&&vt(e.v)?(a=hn(e.s),i=hn(e.v),o=Ls(e.h,a,i),s=!0,l="hsv"):vt(e.h)&&vt(e.s)&&vt(e.l)&&(a=hn(e.s),r=hn(e.l),o=Is(e.h,a,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Es(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Ns="[-\\+]?\\d+%?",Os="[-\\+]?\\d*\\.\\d+%?",At="(?:".concat(Os,")|(?:").concat(Ns,")"),Rn="[\\s|\\(]+(".concat(At,")[,|\\s]+(").concat(At,")[,|\\s]+(").concat(At,")\\s*\\)?"),Ln="[\\s|\\(]+(".concat(At,")[,|\\s]+(").concat(At,")[,|\\s]+(").concat(At,")[,|\\s]+(").concat(At,")\\s*\\)?"),ht={CSS_UNIT:new RegExp(At),rgb:new RegExp("rgb"+Rn),rgba:new RegExp("rgba"+Ln),hsl:new RegExp("hsl"+Rn),hsla:new RegExp("hsla"+Ln),hsv:new RegExp("hsv"+Rn),hsva:new RegExp("hsva"+Ln),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Fs(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var o=!1;if(ei[e])e=ei[e],o=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ht.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ht.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ht.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ht.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ht.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ht.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ht.hex8.exec(e),n?{r:nt(n[1]),g:nt(n[2]),b:nt(n[3]),a:Xa(n[4]),format:o?"name":"hex8"}:(n=ht.hex6.exec(e),n?{r:nt(n[1]),g:nt(n[2]),b:nt(n[3]),format:o?"name":"hex"}:(n=ht.hex4.exec(e),n?{r:nt(n[1]+n[1]),g:nt(n[2]+n[2]),b:nt(n[3]+n[3]),a:Xa(n[4]+n[4]),format:o?"name":"hex8"}:(n=ht.hex3.exec(e),n?{r:nt(n[1]+n[1]),g:nt(n[2]+n[2]),b:nt(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function vt(e){return!!ht.CSS_UNIT.exec(String(e))}var gn=2,ti=.16,Ms=.05,zs=.05,Ps=.15,ni=5,oi=4,qs=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ai(e){var o=e.r,n=e.g,a=e.b,i=Rs(o,n,a);return{h:i.h*360,s:i.s,v:i.v}}function mn(e){var o=e.r,n=e.g,a=e.b;return"#".concat(_s(o,n,a,!1))}function Vs(e,o,n){var a=n/100,i={r:(o.r-e.r)*a+e.r,g:(o.g-e.g)*a+e.g,b:(o.b-e.b)*a+e.b};return i}function ii(e,o,n){var a;return Math.round(e.h)>=60&&Math.round(e.h)<=240?a=n?Math.round(e.h)-gn*o:Math.round(e.h)+gn*o:a=n?Math.round(e.h)+gn*o:Math.round(e.h)-gn*o,a<0?a+=360:a>=360&&(a-=360),a}function ri(e,o,n){if(e.h===0&&e.s===0)return e.s;var a;return n?a=e.s-ti*o:o===oi?a=e.s+ti:a=e.s+Ms*o,a>1&&(a=1),n&&o===ni&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function li(e,o,n){var a;return n?a=e.v+zs*o:a=e.v-Ps*o,a>1&&(a=1),Number(a.toFixed(2))}function _n(e){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=tn(e),i=ni;i>0;i-=1){var r=ai(a),s=mn(tn({h:ii(r,i,!0),s:ri(r,i,!0),v:li(r,i,!0)}));n.push(s)}n.push(mn(a));for(var l=1;l<=oi;l+=1){var d=ai(a),c=mn(tn({h:ii(d,l),s:ri(d,l),v:li(d,l)}));n.push(c)}return o.theme==="dark"?qs.map(function(u){var y=u.index,f=u.opacity,g=mn(Vs(tn(o.backgroundColor||"#141414"),tn(n[y]),f*100));return g}):n}var Nn={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},On={},Fn={};Object.keys(Nn).forEach(function(e){On[e]=_n(Nn[e]),On[e].primary=On[e][5],Fn[e]=_n(Nn[e],{theme:"dark",backgroundColor:"#141414"}),Fn[e].primary=Fn[e][5]});var si=[],nn=[],Hs="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function js(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function Ws(e,o){if(o=o||{},e===void 0)throw new Error(Hs);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),i=si.indexOf(a);i===-1&&(i=si.push(a)-1,nn[i]={});var r;return nn[i]!==void 0&&nn[i][n]!==void 0?r=nn[i][n]:(r=nn[i][n]=js(),n==="prepend"?a.insertBefore(r,a.childNodes[0]):a.appendChild(r)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),r.styleSheet?r.styleSheet.cssText+=e:r.textContent+=e,r}function ci(e){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),a.forEach(function(i){Gs(e,i,n[i])})}return e}function Gs(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}function Us(e,o){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(o))}function $s(e,o){Us(e,"[@ant-design/icons-vue] ".concat(o))}function di(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function Mn(e,o,n){return n?t.h(e.tag,ci({key:o},n,e.attrs),(e.children||[]).map(function(a,i){return Mn(a,"".concat(o,"-").concat(e.tag,"-").concat(i))})):t.h(e.tag,ci({key:o},e.attrs),(e.children||[]).map(function(a,i){return Mn(a,"".concat(o,"-").concat(e.tag,"-").concat(i))}))}function fi(e){return _n(e)[0]}function ui(e){return e?Array.isArray(e)?e:[e]:[]}var Ks=`
3
3
  .anticon {
4
4
  display: inline-block;
@@ -96,7 +96,7 @@ version: 2.9.0
96
96
  `,n+="-----END PUBLIC KEY-----",n},o.hasPublicKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")},o.hasPrivateKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")&&n.hasOwnProperty("d")&&n.hasOwnProperty("p")&&n.hasOwnProperty("q")&&n.hasOwnProperty("dmp1")&&n.hasOwnProperty("dmq1")&&n.hasOwnProperty("coeff")},o.prototype.parsePropertiesFrom=function(n){this.n=n.n,this.e=n.e,n.hasOwnProperty("d")&&(this.d=n.d,this.p=n.p,this.q=n.q,this.dmp1=n.dmp1,this.dmq1=n.dmq1,this.coeff=n.coeff)},o}(Nc),No,Pc=typeof process<"u"?(No=process.env)===null||No===void 0?void 0:No.npm_package_version:void 0,qc=function(){function e(o){o===void 0&&(o={}),o=o||{},this.default_key_size=o.default_key_size?parseInt(o.default_key_size,10):1024,this.default_public_exponent=o.default_public_exponent||"010001",this.log=o.log||!1,this.key=null}return e.prototype.setKey=function(o){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new Tr(o)},e.prototype.setPrivateKey=function(o){this.setKey(o)},e.prototype.setPublicKey=function(o){this.setKey(o)},e.prototype.decrypt=function(o){try{return this.getKey().decrypt(xr(o))}catch{return!1}},e.prototype.encrypt=function(o){try{return bn(this.getKey().encrypt(o))}catch{return!1}},e.prototype.sign=function(o,n,a){try{return bn(this.getKey().sign(o,n,a))}catch{return!1}},e.prototype.verify=function(o,n,a){try{return this.getKey().verify(o,xr(n),a)}catch{return!1}},e.prototype.getKey=function(o){if(!this.key){if(this.key=new Tr,o&&{}.toString.call(o)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,o);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=Pc,e}();const Br=new qc,Zt=Vc();function Vc(){let o=Math.random().toString(36).substr(2);for(;o.length<16;)o+=Math.random().toString(36).substr(2);return o=o.substr(0,16),o}const Er=ot.enc.Utf8.parse("ABCDEF1234123412");function Hc(e,o){o=o||Zt;const n=ot.enc.Utf8.parse(o);let a="";switch(typeof e){case"string":a=ot.enc.Utf8.parse(e);break;case"object":a=ot.enc.Utf8.parse(JSON.stringify(e));break;default:a=ot.enc.Utf8.parse(e.toString())}return ot.AES.encrypt(a,n,{iv:Er,mode:ot.mode.CBC,padding:ot.pad.ZeroPadding}).toString()}function Dr(e,o){o=o||Zt;const n=ot.enc.Utf8.parse(o),a=ot.AES.decrypt(e,n,{iv:Er,mode:ot.mode.CBC,padding:ot.pad.ZeroPadding});return ot.enc.Utf8.stringify(a).toString()}function jc(e){Br.setPublicKey(e)}function Wc(e){return Br.encrypt(e)}function Ir(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const n=["/diagram","/dataview"].map(a=>`^(.*?)${a}(/|$)`);for(const a of n)if(new RegExp(a).test(e))return!0;return!1}function Gc(e){const{paramType:o,data:n,params:a,method:i}=e;o==="form"?["get","delete"].includes(i)?e.params=Qt(a,"string"):e.data=Qt(n,"string"):["get","delete"].includes(i)?e.params=Qt(a,"string"):e.data=Qt(n)}function Qt(e,o){let n=e||{};if(o==="string"){n="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const d=e[l];n+=`${l}=${encodeURIComponent(d)}&`}}jc("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const i=Wc(Zt);return{c:Hc(n,Zt),p:i}}window.getEncryptParam=Qt;function Uc(e,o){var n;(n=window==null?void 0:window.config)!=null&&n.encryptFlag&&Ir(e.url)&&(e.data instanceof FormData?e.data=$c(e.data):Gc(e))}function $c(e){const o=e.entries(),n=new FormData,a={};for(const r of o){const s=r[0],l=r[1];l instanceof Blob?n.append(s,l):a[s]=l}const i=Qt(a,"json");return typeof i=="object"&&(n.append("c",i.c),n.append("p",i.p)),n}window.xhaesKey=Zt,window.xhaesDecrypt=Dr;function Rr(e,o){var n;if((n=window==null?void 0:window.config)!=null&&n.encryptFlag&&Ir(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const a=Dr(e.data.data.content,Zt);e.data=JSON.parse(a)}}const Lr=window.config.requestErrorTip,xt=rs.create({timeout:1e3*180});xt.interceptors.request.use(e=>{const{requestParams:o={}}=window.config;return o!=null&&o.pltToken&&(e.headers["Plt-Token"]=o.pltToken),Uc(e),e},e=>Promise.reject(e)),xt.interceptors.response.use(e=>{var o,n,a;return Lr&&+((o=e==null?void 0:e.data)==null?void 0:o.code)==500&&me.message.error({content:((n=e==null?void 0:e.data)==null?void 0:n.msg)||((a=e==null?void 0:e.data)==null?void 0:a.message)||"服务器异常",key:"SERVER_ERROR",duration:2}),Rr(e),e},e=>{if(Rr(e==null?void 0:e.response),Lr)if(e.message.includes("timeout"))me.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT",duration:2});else{const{status:o}=(e==null?void 0:e.response)||{};o>=400&&o<500&&me.message.error({content:"请求异常",key:"REQUEST_ERROR",duration:2}),o>=500&&me.message.error({content:"服务器异常",key:"REQUEST_ERROR",duration:2})}return Promise.reject(e)});const Kc=e=>e.replace(/\\n/g,`
97
97
  `),Oo=(e,o=2)=>{const n=parseFloat(e+"");return isNaN(n)?e:n.toFixed(o).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},Yc=e=>{const o=parseFloat(e+"");return isNaN(o)?e:(o+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},Bn=(e,o=2)=>{const n=e+"";if(n.includes("%"))return e;const a=parseFloat(n);return isNaN(a)?e:`${(a*100).toFixed(o)}%`},Zc=(e,o=2)=>{const n=e+"",a=parseFloat(n);return isNaN(a)?e:a.toFixed(o)},_r=(e,o)=>dt(o,e),at=(e,o)=>{if(typeof e=="string"&&typeof o=="string")return e.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const i=o[a];if(typeof i=="string"&&e.toLocaleLowerCase().includes(i.toLocaleLowerCase()))return!0}}return!1},Jt=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),ln=e=>{const{leftAxisList:o=[],rightAxisList:n=[],queryColumnList:a=[],indicators:i=[]}=e;return[...o,...n,...a,...i].filter(r=>(r==null?void 0:r.calcType)==="COMPONENT").map(r=>({keyName:r.builtInCalcWay,id:r.builtInValueSource}))},ct=(e,o)=>{let n=!0;const a=ln(e);return a!=null&&a.length&&(n=a.map(i=>o[i.id]).every(i=>i)),n},sn=(e,o)=>{var s;const n=e.match(/\{(.+?)\}/g),a=((s=e.split(`
98
98
  `))==null?void 0:s.length)-1;let i="";if(a)for(let l=0;l<a;l++)i+=`
99
- `;let r=e;if(n!=null&&n.length){for(const l of n){const d=Le(l,{textData:o},{useNewline:!1,useSpace:!1});d&&(r=r.replace(l,d))}return`${i}{text|${r}}`}else return e},Nr=(e,o)=>{const{props:n,componentList:a,getGlobalModel:i}=e,{graphicConfig:r={},startValue:s,endValue:l}=n,d=Qc({graphicConfig:r,startValue:s,endValue:l,componentList:a,getGlobalModel:i}),{dimensions:c,dataset:u}=o,{classificationList:y=[]}=r,g=y.find(m=>m.show).label||"";for(const m of d)c.includes(m)||c.push(m);c.sort((m,h)=>ve(m).isBefore(ve(h))?-1:1);for(const m of u){const{data:h}=m;if(h!=null&&h.length){const C=[];for(const v of d)if(h.find(x=>x[g]!==v)){const x=_e.cloneDeep(h[0]);for(const p in x)p===g?x[p]=v:x[p]=0;C.push(x)}m.data.push(...C),m.data.sort((v,x)=>ve(v[g]).isBefore(ve(x[g]))?-1:1)}}},cn=e=>{const o=[];for(const n of e)n.conditions?o.push(...cn(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o};function Qc(e){const{startValue:o,endValue:n,componentList:a,graphicConfig:i,getGlobalModel:r}=e,s=Or(o),l=Or(n),d=[];if(s&&l){const c=a.find(y=>y.keyName===s.keyName),u=a.find(y=>y.keyName===l.keyName);if(c&&u){const y=r(c.id),f=r(u.id),{classificationList:g=[]}=i,m=g.find(h=>h.show);if(m){let h="YYYY-MM";switch(m.name){case"the_year":h="YYYY";break;case"the_month":h="MM";break;case"the_day":h="DD";break;case"the_date":h=(m==null?void 0:m.dateFormat)||h;break}const C=Fr(h);if(h){const v=t.unref(y[s.field]),x=t.unref(f[l.field]);let p=ve(v);const b=ve(x);for(d.push(b.format(h));p.isBefore(b);)d.push(p.format(h)),p=p.add(1,C)}}}}return d}function Or(e){let o=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let a=n[0].slice(1,-1).trim();const i=a.match(/\[(.+?)\]/g);let r="";i!=null&&i.length&&(a=a.replace(i[0],""),r=i[0].slice(1,-1).trim()),o={keyName:a,field:r}}}return o}function Fr(e){const o=e.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const dn=(e,o)=>{const n={dayjs:ve,...o};let a="";const i=[];for(const l in n)a+=`${l},`,i.push(n[l]);a=a.replace(/,$/,"");const r=`function (${a}){return ${e}}`;let s;try{s=Function(`"use strict";return (${r})`)()(...i)}catch{return e}return s},Le=(e="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:i=!1}={})=>{const s={...window.config||{},...o},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let d=0;d<l.length;d++){const c=l[d];let u=c.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=u.match(y);for(let g=0;g<f.length;g++){const m=f[g],h=s[m];h!=null&&typeof h!="function"&&(u=u.replace(m,h))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=dn(u,n)),e=e.replace(c,u)}return a&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),i&&(e=e==null?void 0:e.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),e},Ve=(e,o=()=>{})=>{const{requestUrl:n,requestMethod:a,requestHeaders:i,requestParams:r,requestInterval:s,isOpenRequestTimer:l,openCustomRequestData:d,projectRequestUrl:c="",getModel:u}=e,{contextRequestUrl:y,touchEventId:f}=t.inject(He,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:g}=t.inject(Ie,{getGlobalModel:x=>{}})||{},m=u||g,h=Le(n),C=async(x={})=>{if(!h||!a||!i)return;let p={};r.forEach(A=>{const{key:O,value:w}=A;if(typeof w=="object"&&w!=null&&w.id){let I={};const{id:N,prop:D,propKey:R,operate:B}=w;N==="THIS"?I=m(t.unref(f))||{}:I=m(N)||{};const S=t.unref(I[D]);let E=null;if(["date","range"].some(M=>at(I==null?void 0:I.type,M))){const{value:M,type:j,mode:F}=B||{};if(M&&j&&F)switch(j){case"add":E=t.unref(S).add(M,F);break;case"minus":E=t.unref(S).subtract(M,F);break}E==null&&(E=t.unref(S)),E=(E==null?void 0:E.format((R==null?void 0:R.trim())||I.format))||""}else Object.prototype.toString.call(S)==="[object Object]"?R?E=S[R]:E=D?S[D]:S:at(I==null?void 0:I.type,"select")&&t.unref(S)&&D&&Array.isArray(t.unref(S))?E=t.unref(S).map(M=>Object.prototype.hasOwnProperty.call(M,D)?M[D]:M):E=S;p[O]=E}else typeof w=="string"&&(p[O]=Le(w))}),p={...window.config.requestParams,...x,...p};let b="";const k=Object.keys(p),T=k.length-1,L=k.length;k.forEach((A,O)=>{let w=p[A];Object.prototype.toString.call(w)==="[object Object]"&&(w=JSON.stringify(w)),O===0?L!==1?b+=`?${A}=${w}&`:b+=`?${A}=${w}`:O===T?b+=`${A}=${w}`:b+=`${A}=${w}&`});try{const A=["get","head"].includes(a),O={};let w=A?h+b:h;p.dataSqlId&&!w.includes("dataSqlId")&&(w+=`${w.includes("?")?"&":"?"}dataSqlId=${p.dataSqlId}`),Object.prototype.hasOwnProperty.call(p,"signal")&&(O.signal=p.signal);const I=await xt({baseURL:t.unref(y)||c||"",url:w,method:a,headers:i,data:A?{}:p,...O});return o(I),I}catch(A){console.error(A)}},v=l&&d&&setInterval(C,s*1e3);return t.onUnmounted(()=>{clearInterval(v)}),C},Dt=(e=[],o,n=!1)=>{let{name:a="name",types:i=[]}=o||{};a=(a==null?void 0:a.trim())||a;const r=new Set,s=new Map,l=e.length,d=i.length;if(l===1&&!n){const y=[];for(let g=0;g<d;g++){const m=i[g],{label:h,value:C}=m,v={...e[0],value:e[0][C]};r.add(h),y.push(v)}const f=e[0][a]||"";s.set(f,y)}else for(let y=0;y<l;y++){const f=e[y],g=f[a];r.add(g);for(let m=0;m<d;m++){const h=i[m],{label:C,value:v}=h,x={...f,value:f[v]||0};if(s.has(C)){const p=s.get(C);p.push(x),s.set(C,p)}else s.set(C,[x])}}const c=Array.from(r),u=[];for(const[y,f]of s)u.push({name:y,data:f});return{dimensions:c,dataset:u}},mt=(e,o=!1)=>{var a;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((a=window==null?void 0:window.config)==null?void 0:a.uploadPath)+e,o&&(n=`url(${n})`),n},Fo=(e,o)=>{const n=`${Ei}/preview?pageId=${o}`,a=`${Ei}/${o}`;return e==="preview"?n:a},dt=(e,o)=>{var i;if(e==null)return o;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let r=0;r<a;r++){const s=n[r];if(s==null||s==="")break;let l=(i=s.slice(1,-1))==null?void 0:i.trim();l=l==null?void 0:l.replace(/value/g,o);try{let d=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(d=dn(l)),e=e.replace(s,d)}catch{e=e.replace(s,l)}}return e},Ze=(e={})=>{const{requestToken:o}=t.inject(Ai,{requestToken:()=>{}}),{setLoadedData:n}=t.inject(kt,{setLoadedData:(v,x)=>{}}),{getGlobalModel:a}=t.inject(Ie,{getGlobalModel:v=>{}});e.dataType==="indicator"&&o();const i=v=>{const{around:x,unit:p,id:b}=v;let k="";const{pageMode:T="",componentList:L=[]}=(e==null?void 0:e.graphicConfig)||{};let A=null,O=null;if(T==="design"){const w=L==null?void 0:L.find(E=>E.id===b);if(!w)return[];const{interval:I,intervalUnit:N,startTime:D,endTime:R,operate:B,useCurrentTime:S}=w||{};if(S&&(A=ve().subtract(I,N),O=ve()),D&&(A=ve(D)),R&&(O=ve(R)),B){const{type:E,value:_,mode:M}=B;switch(E){case"add":A=A&&A.add(_,M),O=O&&O.add(_,M);break;case"minus":A=A&&A.subtract(_,M),O=O&&O.subtract(_,M)}}}else{const w=a(b)||{};t.unref(w.startTime)&&(A=ve(t.unref(w.startTime))),t.unref(w.endTime)&&(O=ve(t.unref(w.endTime)))}if(A&&O){const w=O.diff(A,p.toLowerCase());k=`${x==="before"?"-":""}${w+1}`}return k?[k]:[]},r=(v,x)=>Object.prototype.hasOwnProperty.call(v,x),s=(v,x)=>{if(x)r(v,"indexCode")&&(v.hrpIndexCode=v.indexCode,delete v.indexCode),r(v,"indexCodeNum")&&(v.hrpIndexCodeNum=v.indexCodeNum,delete v.indexCodeNum),r(v,"dataType")&&delete v.dataType;else{const{calcWays:p=[],dateCalcTypes:b=[],activeKey:k,componentId:T=""}=v;if(k===5&&(p!=null&&p.length)&&(b!=null&&b.length)&&T){const L=p[0].split("-");(L==null?void 0:L.length)>1&&L[0]==="rangeValue"&&(v.calcWays=i({around:L[1],unit:b[0],id:T})),delete v.radioValue}r(v,"dataType")&&(v.fieldType==="DATE"&&(v.label=v.fieldName),v.dataType==="component"&&(v.fieldValue="${"+v.fieldValue+"}"),delete v.dataType),r(v,"activeKey")&&delete v.activeKey,r(v,"radioValue")&&delete v.radioValue,r(v,"indexCode")&&(v.hrpIndexCode=v.indexCode,delete v.indexCode),r(v,"indexCodeNum")&&(v.hrpIndexCodeNum=v.indexCodeNum,delete v.indexCodeNum),v.dataType!=="component"&&v.useCurrentTime&&(v.fieldValue=ve().format(v.dateFormat)),delete v.useCurrentTime}},l=(v,x)=>{const p=[];return v!=null&&v.length&&_e.cloneDeep(v).forEach(b=>{if(b.join&&b.conditions){const k=!b.conditions.some(T=>T.join&&T.conditions);b.conditions.forEach((T,L)=>{s(T,x);const A={};if(L<b.conditions.length-1&&(A.join=b.join),k)p.push({...A,...T});else if(T.join&&T.conditions){const O=x?"sqlConditions":"conditions";p.push({[O]:l([T],x),...A})}else p.push({...A,...T})})}else s(b,x),p.push(b)}),p},d=(v={},x)=>{if(v!=null&&v.sortCpnts&&x){const F=C(v);F&&(x.sort=F)}const{label:p,name:b,location:k,show:T,indexCode:L,indexCodeNum:A,calcType:O="COLUMN",builtInFormula:w,builtInValueSource:I,builtInCalcWay:N,formula:D,conditions:R,aggregate:B,distinct:S,dimByCount:E,dataTo:_}=v;let M;if(R&&(M=l(R)),O==="COMPONENT"){const F={};return m(F,I),{label:p.trim(),columnName:b,show:T,calcType:O,componentAlias:N,componentValue:F.fieldValue||null}}const j={label:p.trim(),columnName:b,location:k,show:T,calcType:_==="1"?"VIEW":O,hrpIndexCode:L,hrpIndexCodeNum:A,aggregate:B,builtInFormula:w,builtInValueSource:I,formula:D,conditions:M};if(w==="DATE_OFFSET"){const F=N.split("-");if((F==null?void 0:F.length)===3){let z=F[0];return F[2]==="before"&&F[0]!=="0"&&(z=`-${F[0]}`),{...j,calcWays:[z],dateCalcTypes:[F[1]]}}}else return b==="the_count"&&(j.calcType="AGGREGATE",j.distinct=!!S,j.typeGuid=E),{...j,builtInCalcWay:N}},c=v=>{if(!v)return[];const x=_e.cloneDeep((v==null?void 0:v.controlList)||[]),{classificationList:p=[],rowHeaderList:b=[],dimensionList:k=[],seriesList:T=[],leftAxisList:L=[],rightAxisList:A=[],queryColumnList:O=[],indicators:w=[]}=v;f(x);const I=[...p,...b,...k,...T,...L,...A,...O,...w],N=[];for(const B of I){const S=cn((B==null?void 0:B.conditions)||[]);if(S!=null&&S.length){const E=S.filter(_=>(_==null?void 0:_.dataType)==="component").map(_=>{const M={};return _!=null&&_.dateFormat&&(M.format=_.dateFormat),{conditionKey:_.fieldName,conditionLabel:_.fieldName,conditionName:_.fieldName,conditionValueType:_.fieldType,id:_.componentId,keyName:_.fieldValue,rule:_.rule,notGlobal:!0,indexCode:_.indexCode,typeGuid:_.typeGuid,indexCodeNum:_.indexCodeNum,...M}});if(E!=null&&E.length)for(const _ of E)N.find(M=>M.keyName===_.keyName)||N.push(_)}}const D=N.length,R=x;for(let B=0;B<D;B++){const S=N[B];if((S==null?void 0:S.conditionKey)==="parentCode")continue;const{id:E,keyName:_,prop:M,format:j,modelKey:F,dataType:z="component",customValue:q}=S,P=u(S);m(P,E,{prop:M,dateFormat:j,modelKey:F,keyName:_}),z===""&&(P.fieldValue=q||""),R.push(P)}for(let B=R.length-1;B>=0;B--){const S=R[B];S.globalCondition||cn(R).find(_=>_.alias===S.alias&&_.globalCondition)&&R.splice(B,1)}return R};function u(v){const{id:x,keyName:p,conditionLabel:b,conditionKey:k,conditionValueType:T,prop:L,rule:A="NONE",notGlobal:O=!1,indexCode:w,typeGuid:I,indexCodeNum:N,dataType:D="component"}=v;let R=p||x;R&&L&&(R+=`-${L}`);let B=A;return B==="NONE"&&(["startTime","endTime"].includes(L)?B=L==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":p!=null&&p.includes("startTime")?B=L==="GREATER_EQUAL":p!=null&&p.includes("endTime")?B=L==="LESS_EQUAL":B="EQUAL"),{rule:B,label:b,fieldName:k,fieldValue:"",valueType:T,alias:R,globalCondition:!O,indexCode:w,typeGuid:I,indexCodeNum:N,dataType:D}}const y=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function f(v){if(v!=null&&v.length)for(const x of v)if(x!=null&&x.conditions)f(x.conditions);else{const{id:p,keyName:b,prop:k,modelKey:T,format:L,dataType:A="component",customValue:O}=x,w=u(x);m(w,p,{prop:k,dateFormat:L,modelKey:T,keyName:b}),A===""&&(w.fieldValue=O||"");for(const I in w)x[I]=w[I];for(const I of y)delete x[I]}}function g(v){const x=[];if(v!=null&&v.length){for(const p of v)if(p.variableName){const b={variateName:p.variableName,globalCondition:!1,valueType:p.variableType,alias:p.keyName||""};m(b,p.id,{dateFormat:p.format,prop:p.dateTypeValue,keyName:p.keyName}),p.dataType===""&&(b.fieldValue=p.variableValue),p.format&&(b.dateFormat=p.format),p.label&&(b.label=p.label),x.push(b)}}return x}function m(v,x,p){var B,S;const b=a(x)||{},{prop:k="",dateFormat:T="",modelKey:L="",keyName:A=""}=p||{},{value:O,format:w="YYYY-MM-DD",type:I="",useCurrentTime:N,RECORD:D}=b||{},R=T||w;if(at(b.type,"date"))N?O?v.fieldValue=(B=t.unref(O))==null?void 0:B.format(R):v.fieldValue=ve().format(R):v.fieldValue=(S=t.unref(O))==null?void 0:S.format(R),v.dateFormat=R;else if(I==="ecanRangePicker"){let E=k;if(!k){const M=A&&A.split("-");M!=null&&M.length&&(E=M[M.length-1])}if(!E)return;let _=null;if(t.unref(b[E])&&(_=ve(t.unref(b[E]))),_&&(v.fieldValue=_==null?void 0:_.format(R)),E==="rangeValue"&&b.startTime&&b.endTime){const M=Fr(R);M&&(v.fieldValue=t.unref(b.endTime).diff(t.unref(b.startTime),M)+1)}v.dateFormat=R}else at(I,Di)?L&&D?v.fieldValue=D[L]:!L&&D?v.fieldValue=D.value:v.fieldValue=t.unref(O):v.fieldValue=t.unref(O)}const h=v=>{if(v){const x=_e.cloneDeep(v);return v.defaultCode&&(x.label=x.columnName,delete x.defaultCode),x}else return v},C=v=>{const{sortCpnts:x=[]}=v;let p,b="";for(const k of x){const T=a(k)||{},{type:L,RECORD:A}=T;if(at(L,"image")&&at(A==null?void 0:A.value,["asc","desc"])){b=A.value.toUpperCase();break}}return b&&(p={label:v.label,columnName:v.name,order:b,type:"NORMAL"}),p};return async(v={})=>{var U,Q,X,ae,oe,se;n(e.id,!1);const{graphicConfig:x,type:p,isGroupTable:b=!1}=e;let{source:k,dataViewId:T,plugin:L="1",layer:A,chartType:O,classificationList:w=[],rowHeaderList:I=[],dimensionList:N=[],seriesList:D=[],leftAxisList:R=[],rightAxisList:B=[],queryColumnList:S=[],indicators:E=[],controlList:_=[],formFields:M={},variableList:j=[],variableConditions:F=[],idxLibMode:z,preview:q=!1}=x||{},P=[];if((x==null?void 0:x.pageMode)==="design"?(P=(x.sqlConditions??[]).map(ne=>{const ce={};if(!r(ne,"globalCondition")&&!ne.join&&(ce.globalCondition=!0),!ne.join){const fe=ne.rule||"EQUAL";ce.rule=fe==="NONE"?"EQUAL":fe}return{...ne,...ce}}),F!=null&&F.length&&(P=P.concat(F))):(P=c(x),j!=null&&j.length&&(P=P.concat(g(j)))),P!=null&&P.length){const ne=P.filter(fe=>fe.globalCondition),ce=P.filter(fe=>!fe.globalCondition);(ne==null?void 0:ne.length)>1&&(P=[{join:"&&",conditions:ne},...ce])}P!=null&&P.length&&(P=l(P,"1")),A==null&&(at(p,["table"])||at(p,"list")&&(w==null?void 0:w.length)>1?A="1":at(p,["select","checkbox","radio"])?A="3":A="2");let Z,V="";if(Array.isArray(w)&&w.length>0&&(p!=="ecanList"||(w==null?void 0:w.length)===1)){const ne=w.length;for(let ce=0;ce<ne;ce++){const fe=w[ce]||{},{label:Te="",name:Oe="",show:We=!1,sort:it,customGroup:Ue,conditions:Qe,dateFormat:Je,typeGuid:ft="",truncations:Xe=[]}=fe;if(We||ne===1){V=ft,Z={label:Te.trim(),columnName:Oe,show:We,sort:C(fe)||h(it)||it,customGroup:Ue,conditions:l(Qe),typeGuid:ft},Je&&(Z.dateFormat=Je),Oe==="the_date"&&!Z.dateFormat&&(Z.dateFormat="YYYY-MM");const Fe={};if(Array.isArray(Xe)&&Xe.length>0){const $e=Xe.length;for(let ut=0;ut<$e;ut++){const pt=Xe[ut]||{},{rule:W="",num:K=0,name:J=""}=pt;W&&K&&(Fe.num=K,Fe.rule=W,J&&(Fe.otherGroupName=J))}}(U=Object.keys(Fe))!=null&&U.length&&(Z.truncation=Fe);break}}}let H;if(Array.isArray(D)&&D.length>0){const ne=D.length;for(let ce=0;ce<ne;ce++){const fe=D[ce]||{},{label:Te="",name:Oe="",show:We=!1,sort:it,customGroup:Ue,conditions:Qe}=fe;if(We||ne===1){H={label:Te.trim(),columnName:Oe,show:We,sort:it,customGroup:Ue,conditions:l(Qe)};break}}}const $=[];R==null||R.forEach(ne=>{ne.location="LEFT",$.push(d(ne,Z))}),B==null||B.forEach(ne=>{ne.location="RIGHT",$.push(d(ne,Z))}),E==null||E.forEach(ne=>{ne.location="LEFT",$.push(d(ne,Z))});const ee=[];p==="ecanList"&&(w==null?void 0:w.length)>1&&(S=w),S==null||S.forEach(ne=>{const{label:ce,name:fe,location:Te,show:Oe,indexCode:We,sort:it,typeGuid:Ue,indexCodeNum:Qe}=ne;let Je=it;if(v.sort){const{field:ft,order:Xe}=v.sort;let Fe=$.find($e=>$e.label===ft);!Fe&&ce===ft&&(Fe=ne),Fe&&(Je={columnName:Fe.columnName,label:v.sort.field,order:Xe.toUpperCase(),type:"NORMAL"})}ee.push({label:ce,columnName:fe,location:Te,show:Oe,sort:Je,calcType:"COLUMN",hrpIndexCode:We,hrpIndexCodeNum:Qe,typeGuid:Ue})});const ie=[];let he=[];if(Array.isArray(I)&&I.length>0?he=I:Array.isArray(N)&&N.length>0&&(he=N),he!=null&&he.length){const ne=he.length;for(let ce=0;ce<ne;ce++){const fe=he[ce]||{},{label:Te="",name:Oe="",show:We=!1,sort:it,customGroup:Ue,conditions:Qe,truncations:Je,typeGuid:ft="",dateFormat:Xe}=fe;let Fe=it;if(v.sort){const{field:pt,order:W}=v.sort;let K=$.find(J=>J.label===pt);!K&&fe.label===pt&&(K=fe),K&&(Fe={columnName:K.columnName,label:v.sort.field,order:W.toUpperCase(),type:"NORMAL"})}const $e={label:Te.trim(),columnName:Oe,show:We,sort:Fe,customGroup:Ue,conditions:l(Qe),typeGuid:ft};Xe&&($e.dateFormat=Xe),Oe==="the_date"&&!$e.dateFormat&&($e.dateFormat="YYYY-MM");const ut={};if(Array.isArray(Je)&&Je.length>0){const pt=Je.length;for(let W=0;W<pt;W++){const K=Je[W]||{},{rule:J="",num:re=0,name:de=""}=K;J&&re&&(ut.num=re,ut.rule=J,de&&(ut.otherGroupName=de))}}(Q=Object.keys(ut))!=null&&Q.length&&($e.truncation=ut),ie.push($e)}}if(at(p,["text","proportion","counter"])&&(O="zb"),b){if(ie.length===0||$.length===0)return;O="grouptable"}else{if(A==="1"&&ee.length===0)return;if(A==="2"&&$.length===0)return;if(A==="3"&&(!V||!M.labelField||!M.valueField))return;if(A==="3"&&p==="ecanDataSelect"&&$.length===0)return}N!=null&&N.length&&(A="1",O="grouptable");let ue=(X=window==null?void 0:window.config)==null?void 0:X.pageId;if(!ue){const{pathname:ne}=window==null?void 0:window.location;if(ne){const ce=ne.split("/");ce!=null&&ce.length&&(ue=ce[ce.length-1])}}if((ae=Object.keys(M))!=null&&ae.length){const ne=cn(_).find(fe=>fe.conditionKey==="parentCode"),ce={};if(ne){const fe=a(ne.id)||{};if(fe!=null&&fe.itemCodes)ce.parentItemCodes=fe.itemCodes;else return}p==="ecanDataSelect"&&(ce.indicatorList=$.filter(fe=>fe.show));try{return await xt.post(`${Bi}/diagram/formData`,{source:k,dataViewId:T,plugin:"4",layer:A,chartType:"normalSelect",rangeIndexTypeGuid:V,type:p==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:M.labelField,valueField:M.valueField,pageId:ue,sqlConditions:P,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...ce},{headers:{Authentication:(oe=window==null?void 0:window.config)==null?void 0:oe.indicatorToken,operateContext:Ti}})}catch(fe){console.error(fe)}finally{}}else try{return await xt.post(`${Bi}/diagram`,{source:k,dataViewId:T,plugin:L,layer:A,chartType:O,classification:Z,series:H,indicatorList:$,queryColumns:b?[]:ee,pageFlag:!0,pageId:ue,sqlConditions:P.map(ce=>{const{fieldValue:fe}=ce,Te={};return fe&&Array.isArray(fe)&&(Te.fieldValue=JSON.stringify(fe)),{...ce,...Te}}),idxLibMode:z,preview:q,rowHeaders:ie,keyName:e.keyName},{headers:{Authentication:(se=window==null?void 0:window.config)==null?void 0:se.indicatorToken,operateContext:Ti}})}catch(ne){console.error(ne)}finally{}}},Jc=()=>{const o=window.location.search.slice(1).split("&"),n=o.length,a={};for(let i=0;i<n;i++){const r=o[i];if(r==null||r==="")continue;const s=r.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(a[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...a},window.config={...window.config,...a}},Xc=t.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...Wn},setup(e){const{width:o,height:n}=t.inject(He,{width:null,height:null}),a=t.inject("setPageHeight",b=>{}),i=t.inject("isMobile",!1),r=t.computed(()=>{const b={};return i||(b.width=o.value,b.height=n.value),{...b,backgroundColor:e.backgroundColor,backgroundImage:mt(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=t.ref(0),l=t.ref(0),d=t.ref(0),c=t.ref(0),u=t.ref(!1),y=t.ref();let f;const g=()=>new Promise(b=>{t.nextTick(()=>{o.value&&n.value?(s.value=parseFloat(o.value),l.value=parseFloat(n.value)):(s.value=y.value.clientWidth,l.value=y.value.clientHeight),(!d.value||!c.value)&&(d.value=window.screen.width,c.value=window.screen.height),b()})}),m=()=>{s.value&&l.value?(y.value.style.width=`${s.value}px`,y.value.style.height=`${l.value}px`):(y.value.style.width=`${d.value}px`,y.value.style.height=`${c.value}px`)};t.watch([o,n],async()=>{await g(),m(),C(),window.addEventListener("resize",v),x(),u.value=!0},{immediate:!0});const h=t.ref({});t.provide("scaleValue",h);const C=()=>{if(i){y.value.style.width="100%",y.value.style.height="auto",a("auto");return}const b=document.body.clientWidth,k=document.body.clientHeight,T=s.value||d.value,L=l.value||c.value,A=b/T;let O=k/L;(s.value!==1920||l.value!==1080)&&(O=l.value/s.value*b/L),h.value={widthScale:A,heightScale:O},y.value&&(y.value.style.transform=`scale(${A}, ${O})`),a(O)},v=_e.debounce(async()=>{await g(),C()},100),x=()=>{const b=window.MutationObserver;f=new b(v),f.observe(y.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},p=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return t.onMounted(()=>{u.value=!1}),t.onUnmounted(()=>{window.removeEventListener("resize",v),p()}),{style:r,container:y,ready:u}}}),dh="",ed={id:"container",ref:"container"};function td(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",ed,[e.ready?(t.openBlock(),t.createElementBlock("div",{key:0,class:"page-config",style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],512)}const Mr=Ae(Se(Xc,[["render",td],["__scopeId","data-v-b496b36e"]])),Mo={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[]},zo=ke(Mo),nd=t.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...zo},setup(e,{expose:o}){Jc();const n=t.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),a=t.ref(),i=()=>{a.value.setAttribute("datav-theme",e.theme)},r=t.inject("usedComponentList",[]),s=t.inject("componentList",[]),l=t.computed(()=>{const U=[];for(const Q of t.unref(r))Q.type==="ecanModal"?U.push(...Q.componentList):U.push(Q);return U});t.watch(()=>e.theme,()=>{i()}),t.onMounted(()=>{i()});const d=t.computed(()=>Le(e.contextRequestUrl)),c=t.computed(()=>e.pageMode),u=t.computed(()=>e.theme),y=t.computed(()=>e.width),f=t.computed(()=>e.height),g=t.computed(()=>e.pageFontFamily),m=t.computed(()=>{const U=[],Q=t.unref(s).filter(X=>X.type==="ecanModal");for(const X of Q)X!=null&&X.requestList&&U.push(...X.requestList);return[...U,...e.requestList]}),h=t.ref("");t.provide(He,{contextRequestUrl:d,pageMode:c,theme:u,touchEventId:h,width:y,height:f,fontFamily:g,requestList:m});const C=t.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});t.provide("setPageHeight",U=>{let Q=U;n.value||(Q=parseFloat(f.value)*U+"px"),C.value.height=Q}),t.provide("isMobile",n.value),t.provide("getContainerMap",()=>e.containerMap),t.provide("getCombinationMap",()=>e.combinationMap);const v=t.ref(),x=new Map;console.log("globalModel",x);const p=U=>x.get(U),b=(U,Q)=>{v.value=Q,x.set(U,Q)},k=()=>{v.value=null},T=U=>{let Q=U;if(Q){const X=U.match(/\{(.+?)\}/g);if(X!=null&&X.length){let ae=X[0].slice(1,-1).trim();const oe=ae.match(/\[(.+?)\]/g);let se="";oe!=null&&oe.length&&(ae=ae.replace(oe[0],""),se=oe[0].slice(1,-1).trim());const ne=t.unref(r).find(ce=>ce.keyName===ae);if(ne){const ce=p(ne.id),{type:fe,value:Te,RECORD:Oe,recordData:We}=ce||{};at(fe,Di)?Q=Oe[se]:at(fe,"select")?Q=We[se]:at(fe,"rangePicker")?ve.isDayjs(t.unref(ce[se]))?Q=t.unref(ce[se]).format(ce.format):Q=t.unref(ce[se]):Q=Te}else Q=""}}return Q},L=new Map,A={},O=async(U,Q)=>{var ne;const{requestName:X}=U,ae=await Ve({...U,projectRequestUrl:t.unref(d),getModel:p})(),oe=((ne=ae==null?void 0:ae.data)==null?void 0:ne.data)||{},se=L.get(X);if(se!=null&&se.length&&(!Q||A[X])){for(const ce of se)ce(oe);Q||L.delete(X)}},w=(U,Q)=>{A[U]&&(clearInterval(A[U]),delete A[U],L.delete(U));const X=t.unref(l).filter(oe=>oe.customRequestName===U),ae=L.get(U)||[];if((X==null?void 0:X.length)>ae.length&&(ae.push(Q),L.set(U,ae),(X==null?void 0:X.length)===ae.length)){const oe=t.unref(m).find(se=>se.requestName===U);oe&&(oe!=null&&oe.isOpenRequestTimer&&(oe!=null&&oe.requestInterval)?(O(oe,!0),A[U]=setInterval(()=>{O(oe,!0)},oe.requestInterval*1e3)):O(oe))}};t.provide(Ie,{getGlobalModel:p,setGlobalModel:b,clearInteractiveData:k,getRecordValueByKeyName:T,hanldePageRequestData:w,interactiveData:v});const I=t.ref({}),N=(U,Q)=>{I.value[U]=Q};t.provide(kt,{loadedData:I,setLoadedData:N});const D=[],R=()=>{D.pop()},B=U=>{D.push(U)},S=new Map,E=U=>S.get(U),_=(U,Q)=>{S.set(U,Q)};t.provide(ki,{popUseModalIds:R,pushUseModalIds:B,getModalModel:E,setModalModel:_});const M=ls(),j=new Set,F=(U,Q)=>{j.add(U),M.on(U,X=>{const{eventName:ae,params:oe}=X;return typeof Q[ae]=="function"&&Q[ae](oe)}),t.onBeforeUnmount(()=>{z(U)})},z=U=>{j.delete(U),M.off(U)},q=(U,Q,X={})=>{if(U==="PAGE"){const ae=D.length;let oe=[];if(ae===0)oe=[...j];else{const se=D[ae-1];oe=[...E(se)]}oe.forEach(se=>{M.emit(se,{eventName:Q,params:X})})}else M.emit(U,{eventName:Q,params:X})};t.provide(Gn,{onEvent:F,offEvent:z,emitEvent:q});const P=t.ref(0),Z=()=>{P.value=t.unref(P)+1};t.provide(Ai,{requestToken:Z});const V=new Map,H=new Map,$=({requestFn:U=()=>{},sortNum:Q=0,id:X=""})=>{if(V.has(Q)){const ae=V.get(Q);ae==null||ae.push(U)}else V.set(Q,[U]);H.set(X,U)},ee=U=>new Promise((Q,X)=>{const ae=U.map(oe=>oe());Promise.all(ae).then(oe=>{Q(oe)}).catch(oe=>{X(oe)})}),ie=U=>new Promise(async(Q,X)=>{if(U){if(typeof U=="string"){const ae=H.get(U);if(typeof ae=="function"){const oe=xt.interceptors.response.use(se=>(Q(se),se),se=>(X(se),Promise.reject(se)));ae(),xt.interceptors.response.eject(oe)}}}else{const ae=Array.from(V);ae.sort((se,ne)=>ne[0]-se[0]);const oe=ae.length;try{e.pageMode!=="design"&&t.unref(P)>0;for(let se=0;se<oe;se++){const ne=ae[se][1];await ee(ne)}}catch(se){console.error(se)}finally{V.clear(),Q(null)}}});t.provide(qe,{setRequest:$,touchRequest:ie});const he=()=>{M.emit(an)};t.provide(an,{emitRefreshPage:he});const ue=U=>{M.on(an,()=>U()),t.onMounted(()=>{M.off(an)})};return t.watchEffect(()=>{var U;if((U=t.unref(r))!=null&&U.length&&t.unref(c)!=="design"){const{jumpType:Q,jumpTime:X,jumpPage:ae,jumpLink:oe}=e;if(X!=null&&X.value){let se=0;switch(X==null?void 0:X.suffix){case"hours":se=X.value*60*60*1e3;break;case"minute":se=X.value*60*1e3;break;case"seconds":se=X.value*1e3;break}setTimeout(()=>{let ne="";Q==="page"&&ae?ne=Fo(t.unref(c),ae):Q==="link"&&oe&&(ne=oe),ne=Le(ne),window.open(ne,"_self")},se)}}}),t.onBeforeUnmount(()=>{V==null||V.clear(),H==null||H.clear()}),o({touchRequest:ie,getGlobalModel:p,onRefreshPage:ue}),{providerConfig:a,configStyle:C}}}),uh="";function od(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:t.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const zr=Ae(Se(nd,[["render",od],["__scopeId","data-v-5a0f9b95"]])),Po={...De,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[]},qo=ke(Po),Pr=["refreshData","click","valueChange"],Vo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",Ho="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",jo=t.defineComponent({name:"EcanText",components:{Skeleton:Vt},props:{...qo},setup(e,{expose:o}){const n=t.ref(!1),a=Ee(e),i=t.ref({}),r=t.computed(()=>e.variableFontSize||"14px"),s=t.computed(()=>"-"+t.unref(r)),l=R=>{var B;if(e.showAnimation){const S=e.text.match(/\{(.+?)\}/g)||[];if(S!=null&&S.length){const E=(B=S[0].slice(1,-1))==null?void 0:B.trim();if(t.unref(i)[E]===R){i.value=R;return}const _=+R[E],M=String(Math.abs(_)).length;if(isNaN(_))i.value=R;else{let j=[];for(let z=0;z<5;z++){const q=Math.ceil(Math.random()*(Math.abs(_)+1)-1);j.includes(q)||j.push(q)}j.sort((z,q)=>z-q),j=j.map(z=>{const q=String(z).split("").reverse(),P=[];for(let Z=0;Z<M;Z++)q&&q[Z]?P.push(q[Z]):P.push("0");return(_<0?"-":"")+P.reverse().join("")}),j.push(_);let F=0;for(const z of j)setTimeout(()=>{i.value={...t.unref(i),[E]:z}},F*1e3),F+=.1}}else i.value=R}else i.value=R};t.watch(()=>[e.data,e.dataType],([R,B])=>{B==="static"&&l(R)},{immediate:!0});const{getGlobalModel:d,setGlobalModel:c,getRecordValueByKeyName:u,hanldePageRequestData:y}=t.inject(Ie,{getGlobalModel:R=>{},setGlobalModel:(R,B)=>{},getRecordValueByKeyName:R=>{},hanldePageRequestData:(R,B)=>{}}),{setLoadedData:f}=t.inject(kt,{setLoadedData:(R,B)=>{}}),g=t.computed(()=>{let R="";if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:_}=e;R+=`background: linear-gradient(${E}, ${_}, ${B||"transparent"} ${S*100}%);-webkit-background-clip: text;color: transparent;`}return R}),m=t.computed(()=>{const R={};if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:_}=e,M=B||"transparent";R.background=`linear-gradient(${E}, ${_}, ${M} ${S*100}%)`,R["-webkit-background-clip"]="text",R.color="transparent"}return R}),h=t.computed(()=>{var F;if(t.unref(n))return"NaN";const R=t.unref(i),B=e.increaseColor||e.color,S=e.declineColor||e.color;let E=e.text;E=E==null?void 0:E.replace(/\n|\\n/g,"<br/>"),E=E==null?void 0:E.replace(/\s(?!\{) | (?!\})\s/g,"&nbsp;");const _=E.match(/\{(.+?)\}/g)||[];let M="";const j=e.showEllipsis?"show-ellipsis":"";if(_==null||_.length===0){if(E&&e.format==="percentage"&&!isNaN(+E)){const z=parseFloat(E),q=z*100,P=C(q.toFixed(2));z>=0?E=`<span class="${j}" style="color: ${P||B||"#ED6643"};font-size:${t.unref(r)};display: inline-block;${t.unref(g)}">
99
+ `;let r=e;if(n!=null&&n.length){for(const l of n){const d=Le(l,{textData:o},{useNewline:!1,useSpace:!1});d&&(r=r.replace(l,d))}return`${i}{text|${r}}`}else return e},Nr=(e,o)=>{const{props:n,componentList:a,getGlobalModel:i}=e,{graphicConfig:r={},startValue:s,endValue:l}=n,d=Qc({graphicConfig:r,startValue:s,endValue:l,componentList:a,getGlobalModel:i}),{dimensions:c,dataset:u}=o,{classificationList:y=[]}=r,g=y.find(m=>m.show).label||"";for(const m of d)c.includes(m)||c.push(m);c.sort((m,h)=>ve(m).isBefore(ve(h))?-1:1);for(const m of u){const{data:h}=m;if(h!=null&&h.length){const C=[];for(const v of d)if(h.find(x=>x[g]!==v)){const x=_e.cloneDeep(h[0]);for(const p in x)p===g?x[p]=v:x[p]=0;C.push(x)}m.data.push(...C),m.data.sort((v,x)=>ve(v[g]).isBefore(ve(x[g]))?-1:1)}}},cn=e=>{const o=[];for(const n of e)n.conditions?o.push(...cn(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o};function Qc(e){const{startValue:o,endValue:n,componentList:a,graphicConfig:i,getGlobalModel:r}=e,s=Or(o),l=Or(n),d=[];if(s&&l){const c=a.find(y=>y.keyName===s.keyName),u=a.find(y=>y.keyName===l.keyName);if(c&&u){const y=r(c.id),f=r(u.id),{classificationList:g=[]}=i,m=g.find(h=>h.show);if(m){let h="YYYY-MM";switch(m.name){case"the_year":h="YYYY";break;case"the_month":h="MM";break;case"the_day":h="DD";break;case"the_date":h=(m==null?void 0:m.dateFormat)||h;break}const C=Fr(h);if(h){const v=t.unref(y[s.field]),x=t.unref(f[l.field]);let p=ve(v);const b=ve(x);for(d.push(b.format(h));p.isBefore(b);)d.push(p.format(h)),p=p.add(1,C)}}}}return d}function Or(e){let o=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let a=n[0].slice(1,-1).trim();const i=a.match(/\[(.+?)\]/g);let r="";i!=null&&i.length&&(a=a.replace(i[0],""),r=i[0].slice(1,-1).trim()),o={keyName:a,field:r}}}return o}function Fr(e){const o=e.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const dn=(e,o)=>{const n={dayjs:ve,...o};let a="";const i=[];for(const l in n)a+=`${l},`,i.push(n[l]);a=a.replace(/,$/,"");const r=`function (${a}){return ${e}}`;let s;try{s=Function(`"use strict";return (${r})`)()(...i)}catch{return e}return s},Le=(e="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:i=!1}={})=>{const s={...window.config||{},...o},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let d=0;d<l.length;d++){const c=l[d];let u=c.slice(1,-1).trim();const y=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=u.match(y);for(let g=0;g<f.length;g++){const m=f[g],h=s[m];h!=null&&typeof h!="function"&&(u=u.replace(m,h))}(/\(.*\)/g.test(u)||/[+/\\*]/g.test(u))&&(u=dn(u,n)),e=e.replace(c,u)}return a&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),i&&(e=e==null?void 0:e.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),e},Ve=(e,o=()=>{})=>{const{requestUrl:n,requestMethod:a,requestHeaders:i,requestParams:r,requestInterval:s,isOpenRequestTimer:l,openCustomRequestData:d,projectRequestUrl:c="",getModel:u}=e,{contextRequestUrl:y,touchEventId:f}=t.inject(He,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:g}=t.inject(Ie,{getGlobalModel:x=>{}})||{},m=u||g,h=Le(n),C=async(x={})=>{if(!h||!a||!i)return;let p={};r.forEach(A=>{const{key:O,value:w}=A;if(typeof w=="object"&&w!=null&&w.id){let I={};const{id:N,prop:D,propKey:R,operate:B}=w;N==="THIS"?I=m(t.unref(f))||{}:I=m(N)||{};const S=t.unref(I[D]);let E=null;if(["date","range"].some(M=>at(I==null?void 0:I.type,M))){const{value:M,type:j,mode:F}=B||{};if(M&&j&&F)switch(j){case"add":E=t.unref(S).add(M,F);break;case"minus":E=t.unref(S).subtract(M,F);break}E==null&&(E=t.unref(S)),E=(E==null?void 0:E.format((R==null?void 0:R.trim())||I.format))||""}else Object.prototype.toString.call(S)==="[object Object]"?R?E=S[R]:E=D?S[D]:S:at(I==null?void 0:I.type,"select")&&t.unref(S)&&D&&Array.isArray(t.unref(S))?E=t.unref(S).map(M=>Object.prototype.hasOwnProperty.call(M,D)?M[D]:M):E=S;p[O]=E}else typeof w=="string"&&(p[O]=Le(w))}),p={...window.config.requestParams,...x,...p};let b="";const k=Object.keys(p),T=k.length-1,L=k.length;k.forEach((A,O)=>{let w=p[A];Object.prototype.toString.call(w)==="[object Object]"&&(w=JSON.stringify(w)),O===0?L!==1?b+=`?${A}=${w}&`:b+=`?${A}=${w}`:O===T?b+=`${A}=${w}`:b+=`${A}=${w}&`});try{const A=["get","head"].includes(a),O={};let w=A?h+b:h;p.dataSqlId&&!w.includes("dataSqlId")&&(w+=`${w.includes("?")?"&":"?"}dataSqlId=${p.dataSqlId}`),Object.prototype.hasOwnProperty.call(p,"signal")&&(O.signal=p.signal);const I=await xt({baseURL:t.unref(y)||c||"",url:w,method:a,headers:i,data:A?{}:p,...O});return o(I),I}catch(A){console.error(A)}},v=l&&d&&setInterval(C,s*1e3);return t.onUnmounted(()=>{clearInterval(v)}),C},Dt=(e=[],o,n=!1)=>{let{name:a="name",types:i=[]}=o||{};a=(a==null?void 0:a.trim())||a;const r=new Set,s=new Map,l=e.length,d=i.length;if(l===1&&!n){const y=[];for(let g=0;g<d;g++){const m=i[g],{label:h,value:C}=m,v={...e[0],value:e[0][C]};r.add(h),y.push(v)}const f=e[0][a]||"";s.set(f,y)}else for(let y=0;y<l;y++){const f=e[y],g=f[a];r.add(g);for(let m=0;m<d;m++){const h=i[m],{label:C,value:v}=h,x={...f,value:f[v]||0};if(s.has(C)){const p=s.get(C);p.push(x),s.set(C,p)}else s.set(C,[x])}}const c=Array.from(r),u=[];for(const[y,f]of s)u.push({name:y,data:f});return{dimensions:c,dataset:u}},mt=(e,o=!1)=>{var a;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((a=window==null?void 0:window.config)==null?void 0:a.uploadPath)+e,o&&(n=`url(${n})`),n},Fo=(e,o)=>{const n=`${Ei}/preview?pageId=${o}`,a=`${Ei}/${o}`;return e==="preview"?n:a},dt=(e,o)=>{var i;if(e==null)return o;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let r=0;r<a;r++){const s=n[r];if(s==null||s==="")break;let l=(i=s.slice(1,-1))==null?void 0:i.trim();l=l==null?void 0:l.replace(/value/g,o);try{let d=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(d=dn(l)),e=e.replace(s,d)}catch{e=e.replace(s,l)}}return e},Ze=(e={})=>{const{requestToken:o}=t.inject(Ai,{requestToken:()=>{}}),{setLoadedData:n}=t.inject(kt,{setLoadedData:(v,x)=>{}}),{getGlobalModel:a}=t.inject(Ie,{getGlobalModel:v=>{}});e.dataType==="indicator"&&o();const i=v=>{const{around:x,unit:p,id:b}=v;let k="";const{pageMode:T="",componentList:L=[]}=(e==null?void 0:e.graphicConfig)||{};let A=null,O=null;if(T==="design"){const w=L==null?void 0:L.find(E=>E.id===b);if(!w)return[];const{interval:I,intervalUnit:N,startTime:D,endTime:R,operate:B,useCurrentTime:S}=w||{};if(S&&(A=ve().subtract(I,N),O=ve()),D&&(A=ve(D)),R&&(O=ve(R)),B){const{type:E,value:_,mode:M}=B;switch(E){case"add":A=A&&A.add(_,M),O=O&&O.add(_,M);break;case"minus":A=A&&A.subtract(_,M),O=O&&O.subtract(_,M)}}}else{const w=a(b)||{};t.unref(w.startTime)&&(A=ve(t.unref(w.startTime))),t.unref(w.endTime)&&(O=ve(t.unref(w.endTime)))}if(A&&O){const w=O.diff(A,p.toLowerCase());k=`${x==="before"?"-":""}${w+1}`}return k?[k]:[]},r=(v,x)=>Object.prototype.hasOwnProperty.call(v,x),s=(v,x)=>{if(x)r(v,"indexCode")&&(v.hrpIndexCode=v.indexCode,delete v.indexCode),r(v,"indexCodeNum")&&(v.hrpIndexCodeNum=v.indexCodeNum,delete v.indexCodeNum),r(v,"dataType")&&delete v.dataType;else{const{calcWays:p=[],dateCalcTypes:b=[],activeKey:k,componentId:T=""}=v;if(k===5&&(p!=null&&p.length)&&(b!=null&&b.length)&&T){const L=p[0].split("-");(L==null?void 0:L.length)>1&&L[0]==="rangeValue"&&(v.calcWays=i({around:L[1],unit:b[0],id:T})),delete v.radioValue}r(v,"dataType")&&(v.fieldType==="DATE"&&(v.label=v.fieldName),v.dataType==="component"&&(v.fieldValue="${"+v.fieldValue+"}"),delete v.dataType),r(v,"activeKey")&&delete v.activeKey,r(v,"radioValue")&&delete v.radioValue,r(v,"indexCode")&&(v.hrpIndexCode=v.indexCode,delete v.indexCode),r(v,"indexCodeNum")&&(v.hrpIndexCodeNum=v.indexCodeNum,delete v.indexCodeNum),v.dataType!=="component"&&v.useCurrentTime&&(v.fieldValue=ve().format(v.dateFormat)),delete v.useCurrentTime}},l=(v,x)=>{const p=[];return v!=null&&v.length&&_e.cloneDeep(v).forEach(b=>{if(b.join&&b.conditions){const k=!b.conditions.some(T=>T.join&&T.conditions);b.conditions.forEach((T,L)=>{s(T,x);const A={};if(L<b.conditions.length-1&&(A.join=b.join),k)p.push({...A,...T});else if(T.join&&T.conditions){const O=x?"sqlConditions":"conditions";p.push({[O]:l([T],x),...A})}else p.push({...A,...T})})}else s(b,x),p.push(b)}),p},d=(v={},x)=>{if(v!=null&&v.sortCpnts&&x){const F=C(v);F&&(x.sort=F)}const{label:p,name:b,location:k,show:T,indexCode:L,indexCodeNum:A,calcType:O="COLUMN",builtInFormula:w,builtInValueSource:I,builtInCalcWay:N,formula:D,conditions:R,aggregate:B,distinct:S,dimByCount:E,dataTo:_}=v;let M;if(R&&(M=l(R)),O==="COMPONENT"){const F={};return m(F,I),{label:p.trim(),columnName:b,show:T,calcType:O,componentAlias:N,componentValue:F.fieldValue||null}}const j={label:p.trim(),columnName:b,location:k,show:T,calcType:_==="1"?"VIEW":O,hrpIndexCode:L,hrpIndexCodeNum:A,aggregate:B,builtInFormula:w,builtInValueSource:I,formula:D,conditions:M};if(w==="DATE_OFFSET"){const F=N.split("-");if((F==null?void 0:F.length)===3){let z=F[0];return F[2]==="before"&&F[0]!=="0"&&(z=`-${F[0]}`),{...j,calcWays:[z],dateCalcTypes:[F[1]]}}}else return b==="the_count"&&(j.calcType="AGGREGATE",j.distinct=!!S,j.typeGuid=E),{...j,builtInCalcWay:N}},c=v=>{if(!v)return[];const x=_e.cloneDeep((v==null?void 0:v.controlList)||[]),{classificationList:p=[],rowHeaderList:b=[],dimensionList:k=[],seriesList:T=[],leftAxisList:L=[],rightAxisList:A=[],queryColumnList:O=[],indicators:w=[]}=v;f(x);const I=[...p,...b,...k,...T,...L,...A,...O,...w],N=[];for(const B of I){const S=cn((B==null?void 0:B.conditions)||[]);if(S!=null&&S.length){const E=S.filter(_=>(_==null?void 0:_.dataType)==="component").map(_=>{const M={};return _!=null&&_.dateFormat&&(M.format=_.dateFormat),{conditionKey:_.fieldName,conditionLabel:_.fieldName,conditionName:_.fieldName,conditionValueType:_.fieldType,id:_.componentId,keyName:_.fieldValue,rule:_.rule,notGlobal:!0,indexCode:_.indexCode,typeGuid:_.typeGuid,indexCodeNum:_.indexCodeNum,...M}});if(E!=null&&E.length)for(const _ of E)N.find(M=>M.keyName===_.keyName)||N.push(_)}}const D=N.length,R=x;for(let B=0;B<D;B++){const S=N[B];if((S==null?void 0:S.conditionKey)==="parentCode")continue;const{id:E,keyName:_,prop:M,format:j,modelKey:F,dataType:z="component",customValue:q}=S,P=u(S);m(P,E,{prop:M,dateFormat:j,modelKey:F,keyName:_}),z===""&&(P.fieldValue=q||""),R.push(P)}for(let B=R.length-1;B>=0;B--){const S=R[B];S.globalCondition||cn(R).find(_=>_.alias===S.alias&&_.globalCondition)&&R.splice(B,1)}return R};function u(v){const{id:x,keyName:p,conditionLabel:b,conditionKey:k,conditionValueType:T,prop:L,rule:A="NONE",notGlobal:O=!1,indexCode:w,typeGuid:I,indexCodeNum:N,dataType:D="component"}=v;let R=p||x;R&&L&&(R+=`-${L}`);let B=A;return B==="NONE"&&(["startTime","endTime"].includes(L)?B=L==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":p!=null&&p.includes("startTime")?B=L==="GREATER_EQUAL":p!=null&&p.includes("endTime")?B=L==="LESS_EQUAL":B="EQUAL"),{rule:B,label:b,fieldName:k,fieldValue:"",valueType:T,alias:R,globalCondition:!O,indexCode:w,typeGuid:I,indexCodeNum:N,dataType:D}}const y=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function f(v){if(v!=null&&v.length)for(const x of v)if(x!=null&&x.conditions)f(x.conditions);else{const{id:p,keyName:b,prop:k,modelKey:T,format:L,dataType:A="component",customValue:O}=x,w=u(x);m(w,p,{prop:k,dateFormat:L,modelKey:T,keyName:b}),A===""&&(w.fieldValue=O||"");for(const I in w)x[I]=w[I];for(const I of y)delete x[I]}}function g(v){const x=[];if(v!=null&&v.length){for(const p of v)if(p.variableName){const b={variateName:p.variableName,globalCondition:!1,valueType:p.variableType,alias:p.keyName||""};m(b,p.id,{dateFormat:p.format,prop:p.dateTypeValue,keyName:p.keyName}),p.dataType===""&&(b.fieldValue=p.variableValue),p.format&&(b.dateFormat=p.format),p.label&&(b.label=p.label),x.push(b)}}return x}function m(v,x,p){var B,S;const b=a(x)||{},{prop:k="",dateFormat:T="",modelKey:L="",keyName:A=""}=p||{},{value:O,format:w="YYYY-MM-DD",type:I="",useCurrentTime:N,RECORD:D}=b||{},R=T||w;if(at(b.type,"date"))N?O?v.fieldValue=(B=t.unref(O))==null?void 0:B.format(R):v.fieldValue=ve().format(R):v.fieldValue=(S=t.unref(O))==null?void 0:S.format(R),v.dateFormat=R;else if(I==="ecanRangePicker"){let E=k;if(!k){const M=A&&A.split("-");M!=null&&M.length&&(E=M[M.length-1])}if(!E)return;let _=null;if(t.unref(b[E])&&(_=ve(t.unref(b[E]))),_&&(v.fieldValue=_==null?void 0:_.format(R)),E==="rangeValue"&&b.startTime&&b.endTime){const M=Fr(R);M&&(v.fieldValue=t.unref(b.endTime).diff(t.unref(b.startTime),M)+1)}v.dateFormat=R}else at(I,Di)?L&&D?v.fieldValue=D[L]:!L&&D?v.fieldValue=D.value:v.fieldValue=t.unref(O):v.fieldValue=t.unref(O)}const h=v=>{if(v){const x=_e.cloneDeep(v);return v.defaultCode&&(x.label=x.columnName,delete x.defaultCode),x}else return v},C=v=>{const{sortCpnts:x=[]}=v;let p,b="";for(const k of x){const T=a(k)||{},{type:L,RECORD:A}=T;if(at(L,"image")&&at(A==null?void 0:A.value,["asc","desc"])){b=A.value.toUpperCase();break}}return b&&(p={label:v.label,columnName:v.name,order:b,type:"NORMAL"}),p};return async(v={})=>{var U,Q,X,ae,oe,se;n(e.id,!1);const{graphicConfig:x,type:p,isGroupTable:b=!1}=e;let{source:k,dataViewId:T,plugin:L="1",layer:A,chartType:O,classificationList:w=[],rowHeaderList:I=[],dimensionList:N=[],seriesList:D=[],leftAxisList:R=[],rightAxisList:B=[],queryColumnList:S=[],indicators:E=[],controlList:_=[],formFields:M={},variableList:j=[],variableConditions:F=[],idxLibMode:z,preview:q=!1}=x||{},P=[];if((x==null?void 0:x.pageMode)==="design"?(P=(x.sqlConditions??[]).map(ne=>{const ce={};if(!r(ne,"globalCondition")&&!ne.join&&(ce.globalCondition=!0),!ne.join){const fe=ne.rule||"EQUAL";ce.rule=fe==="NONE"?"EQUAL":fe}return{...ne,...ce}}),F!=null&&F.length&&(P=P.concat(F))):(P=c(x),j!=null&&j.length&&(P=P.concat(g(j)))),P!=null&&P.length){const ne=P.filter(fe=>fe.globalCondition),ce=P.filter(fe=>!fe.globalCondition);(ne==null?void 0:ne.length)>1&&(P=[{join:"&&",conditions:ne},...ce])}P!=null&&P.length&&(P=l(P,"1")),A==null&&(at(p,["table"])||at(p,"list")&&(w==null?void 0:w.length)>1?A="1":at(p,["select","checkbox","radio"])?A="3":A="2");let Z,V="";if(Array.isArray(w)&&w.length>0&&(p!=="ecanList"||(w==null?void 0:w.length)===1)){const ne=w.length;for(let ce=0;ce<ne;ce++){const fe=w[ce]||{},{label:Te="",name:Oe="",show:We=!1,sort:it,customGroup:Ue,conditions:Qe,dateFormat:Je,typeGuid:ft="",truncations:Xe=[]}=fe;if(We||ne===1){V=ft,Z={label:Te.trim(),columnName:Oe,show:We,sort:C(fe)||h(it)||it,customGroup:Ue,conditions:l(Qe),typeGuid:ft},Je&&(Z.dateFormat=Je),Oe==="the_date"&&!Z.dateFormat&&(Z.dateFormat="YYYY-MM");const Fe={};if(Array.isArray(Xe)&&Xe.length>0){const $e=Xe.length;for(let ut=0;ut<$e;ut++){const pt=Xe[ut]||{},{rule:W="",num:K=0,name:J=""}=pt;W&&K&&(Fe.num=K,Fe.rule=W,J&&(Fe.otherGroupName=J))}}(U=Object.keys(Fe))!=null&&U.length&&(Z.truncation=Fe);break}}}let H;if(Array.isArray(D)&&D.length>0){const ne=D.length;for(let ce=0;ce<ne;ce++){const fe=D[ce]||{},{label:Te="",name:Oe="",show:We=!1,sort:it,customGroup:Ue,conditions:Qe}=fe;if(We||ne===1){H={label:Te.trim(),columnName:Oe,show:We,sort:it,customGroup:Ue,conditions:l(Qe)};break}}}const $=[];R==null||R.forEach(ne=>{ne.location="LEFT",$.push(d(ne,Z))}),B==null||B.forEach(ne=>{ne.location="RIGHT",$.push(d(ne,Z))}),E==null||E.forEach(ne=>{ne.location="LEFT",$.push(d(ne,Z))});const ee=[];p==="ecanList"&&(w==null?void 0:w.length)>1&&(S=w),S==null||S.forEach(ne=>{const{label:ce,name:fe,location:Te,show:Oe,indexCode:We,sort:it,typeGuid:Ue,indexCodeNum:Qe}=ne;let Je=it;if(v.sort){const{field:ft,order:Xe}=v.sort;let Fe=$.find($e=>$e.label===ft);!Fe&&ce===ft&&(Fe=ne),Fe&&(Je={columnName:Fe.columnName,label:v.sort.field,order:Xe.toUpperCase(),type:"NORMAL"})}ee.push({label:ce,columnName:fe,location:Te,show:Oe,sort:Je,calcType:"COLUMN",hrpIndexCode:We,hrpIndexCodeNum:Qe,typeGuid:Ue})});const ie=[];let he=[];if(Array.isArray(I)&&I.length>0?he=I:Array.isArray(N)&&N.length>0&&(he=N),he!=null&&he.length){const ne=he.length;for(let ce=0;ce<ne;ce++){const fe=he[ce]||{},{label:Te="",name:Oe="",show:We=!1,sort:it,customGroup:Ue,conditions:Qe,truncations:Je,typeGuid:ft="",dateFormat:Xe}=fe;let Fe=it;if(v.sort){const{field:pt,order:W}=v.sort;let K=$.find(J=>J.label===pt);!K&&fe.label===pt&&(K=fe),K&&(Fe={columnName:K.columnName,label:v.sort.field,order:W.toUpperCase(),type:"NORMAL"})}const $e={label:Te.trim(),columnName:Oe,show:We,sort:Fe,customGroup:Ue,conditions:l(Qe),typeGuid:ft};Xe&&($e.dateFormat=Xe),Oe==="the_date"&&!$e.dateFormat&&($e.dateFormat="YYYY-MM");const ut={};if(Array.isArray(Je)&&Je.length>0){const pt=Je.length;for(let W=0;W<pt;W++){const K=Je[W]||{},{rule:J="",num:re=0,name:de=""}=K;J&&re&&(ut.num=re,ut.rule=J,de&&(ut.otherGroupName=de))}}(Q=Object.keys(ut))!=null&&Q.length&&($e.truncation=ut),ie.push($e)}}if(at(p,["text","proportion","counter"])&&(O="zb"),b){if(ie.length===0||$.length===0)return;O="grouptable"}else{if(A==="1"&&ee.length===0)return;if(A==="2"&&$.length===0)return;if(A==="3"&&(!V||!M.labelField||!M.valueField))return;if(A==="3"&&p==="ecanDataSelect"&&$.length===0)return}N!=null&&N.length&&(A="1",O="grouptable");let ue=(X=window==null?void 0:window.config)==null?void 0:X.pageId;if(!ue){const{pathname:ne}=window==null?void 0:window.location;if(ne){const ce=ne.split("/");ce!=null&&ce.length&&(ue=ce[ce.length-1])}}if((ae=Object.keys(M))!=null&&ae.length){const ne=cn(_).find(fe=>fe.conditionKey==="parentCode"),ce={};if(ne){const fe=a(ne.id)||{};if(fe!=null&&fe.itemCodes)ce.parentItemCodes=fe.itemCodes;else return}p==="ecanDataSelect"&&(ce.indicatorList=$.filter(fe=>fe.show));try{return await xt.post(`${Bi}/diagram/formData`,{source:k,dataViewId:T,plugin:"4",layer:A,chartType:"normalSelect",rangeIndexTypeGuid:V,type:p==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:M.labelField,valueField:M.valueField,pageId:ue,sqlConditions:P,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...ce},{headers:{Authentication:(oe=window==null?void 0:window.config)==null?void 0:oe.indicatorToken,operateContext:Ti}})}catch(fe){console.error(fe)}finally{}}else try{return await xt.post(`${Bi}/diagram`,{source:k,dataViewId:T,plugin:L,layer:A,chartType:O,classification:Z,series:H,indicatorList:$,queryColumns:b?[]:ee,pageFlag:!0,pageId:ue,sqlConditions:P.map(ce=>{const{fieldValue:fe}=ce,Te={};return fe&&Array.isArray(fe)&&(Te.fieldValue=JSON.stringify(fe)),{...ce,...Te}}),idxLibMode:z,preview:q,rowHeaders:ie,keyName:e.keyName},{headers:{Authentication:(se=window==null?void 0:window.config)==null?void 0:se.indicatorToken,operateContext:Ti}})}catch(ne){console.error(ne)}finally{}}},Jc=()=>{const o=window.location.search.slice(1).split("&"),n=o.length,a={};for(let i=0;i<n;i++){const r=o[i];if(r==null||r==="")continue;const s=r.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(a[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...a},window.config={...window.config,...a}},Xc=t.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...Wn},setup(e){const{width:o,height:n}=t.inject(He,{width:null,height:null}),a=t.inject("setPageHeight",b=>{}),i=t.inject("isMobile",!1),r=t.computed(()=>{const b={};return i||(b.width=o.value,b.height=n.value),{...b,backgroundColor:e.backgroundColor,backgroundImage:mt(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=t.ref(0),l=t.ref(0),d=t.ref(0),c=t.ref(0),u=t.ref(!1),y=t.ref();let f;const g=()=>new Promise(b=>{t.nextTick(()=>{o.value&&n.value?(s.value=parseFloat(o.value),l.value=parseFloat(n.value)):(s.value=y.value.clientWidth,l.value=y.value.clientHeight),(!d.value||!c.value)&&(d.value=window.screen.width,c.value=window.screen.height),b()})}),m=()=>{s.value&&l.value?(y.value.style.width=`${s.value}px`,y.value.style.height=`${l.value}px`):(y.value.style.width=`${d.value}px`,y.value.style.height=`${c.value}px`)};t.watch([o,n],async()=>{await g(),m(),C(),window.addEventListener("resize",v),x(),u.value=!0},{immediate:!0});const h=t.ref({});t.provide("scaleValue",h);const C=()=>{if(i){y.value.style.width="100%",y.value.style.height="auto",a("auto");return}const b=document.body.clientWidth,k=document.body.clientHeight,T=s.value||d.value,L=l.value||c.value,A=b/T;let O=k/L;(s.value!==1920||l.value!==1080)&&(O=l.value/s.value*b/L),h.value={widthScale:A,heightScale:O},y.value&&(y.value.style.transform=`scale(${A}, ${O})`),a(O)},v=_e.debounce(async()=>{await g(),C()},100),x=()=>{const b=window.MutationObserver;f=new b(v),f.observe(y.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},p=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return t.onMounted(()=>{u.value=!1}),t.onUnmounted(()=>{window.removeEventListener("resize",v),p()}),{style:r,container:y,ready:u}}}),dh="",ed={id:"container",ref:"container"};function td(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",ed,[e.ready?(t.openBlock(),t.createElementBlock("div",{key:0,class:"page-config",style:t.normalizeStyle(e.style)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)):t.createCommentVNode("",!0)],512)}const Mr=Ae(Se(Xc,[["render",td],["__scopeId","data-v-b496b36e"]])),Mo={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[]},zo=ke(Mo),nd=t.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...zo},setup(e,{expose:o}){Jc();const n=t.computed(()=>!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)),a=t.ref(),i=()=>{a.value.setAttribute("datav-theme",e.theme)},r=t.inject("usedComponentList",[]),s=t.inject("componentList",[]),l=t.computed(()=>{const U=[];for(const Q of t.unref(r))Q.type==="ecanModal"?U.push(...Q.componentList):U.push(Q);return U});t.watch(()=>e.theme,()=>{i()}),t.onMounted(()=>{i()});const d=t.computed(()=>Le(e.contextRequestUrl)),c=t.computed(()=>e.pageMode),u=t.computed(()=>e.theme),y=t.computed(()=>e.width),f=t.computed(()=>e.height),g=t.computed(()=>e.pageFontFamily),m=t.computed(()=>{const U=[],Q=t.unref(s).filter(X=>X.type==="ecanModal");for(const X of Q)X!=null&&X.requestList&&U.push(...X.requestList);return[...U,...e.requestList]}),h=t.ref("");t.provide(He,{contextRequestUrl:d,pageMode:c,theme:u,touchEventId:h,width:y,height:f,fontFamily:g,requestList:m});const C=t.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});t.provide("setPageHeight",U=>{let Q=U;n.value||(Q=parseFloat(f.value)*U+"px"),C.value.height=Q}),t.provide("isMobile",n.value),t.provide("getContainerMap",()=>e.containerMap),t.provide("getCombinationMap",()=>e.combinationMap);const v=t.ref(),x=new Map;console.log("globalModel",x);const p=U=>x.get(U),b=(U,Q)=>{v.value=Q,x.set(U,Q)},k=()=>{v.value=null},T=U=>{let Q=U;if(Q){const X=U.match(/\{(.+?)\}/g);if(X!=null&&X.length){let ae=X[0].slice(1,-1).trim();const oe=ae.match(/\[(.+?)\]/g);let se="";oe!=null&&oe.length&&(ae=ae.replace(oe[0],""),se=oe[0].slice(1,-1).trim());const ne=t.unref(r).find(ce=>ce.keyName===ae);if(ne){const ce=p(ne.id),{type:fe,value:Te,RECORD:Oe,recordData:We}=ce||{};at(fe,Di)?Q=Oe[se]:at(fe,"select")?Q=We[se]:at(fe,["rangePicker","date"])?ve.isDayjs(t.unref(ce[se]))?Q=t.unref(ce[se]).format(ce.format):Q=t.unref(ce[se]):Q=Te}else Q=""}}return Q},L=new Map,A={},O=async(U,Q)=>{var ne;const{requestName:X}=U,ae=await Ve({...U,projectRequestUrl:t.unref(d),getModel:p})(),oe=((ne=ae==null?void 0:ae.data)==null?void 0:ne.data)||{},se=L.get(X);if(se!=null&&se.length&&(!Q||A[X])){for(const ce of se)ce(oe);Q||L.delete(X)}},w=(U,Q)=>{A[U]&&(clearInterval(A[U]),delete A[U],L.delete(U));const X=t.unref(l).filter(oe=>oe.customRequestName===U),ae=L.get(U)||[];if((X==null?void 0:X.length)>ae.length&&(ae.push(Q),L.set(U,ae),(X==null?void 0:X.length)===ae.length)){const oe=t.unref(m).find(se=>se.requestName===U);oe&&(oe!=null&&oe.isOpenRequestTimer&&(oe!=null&&oe.requestInterval)?(O(oe,!0),A[U]=setInterval(()=>{O(oe,!0)},oe.requestInterval*1e3)):O(oe))}};t.provide(Ie,{getGlobalModel:p,setGlobalModel:b,clearInteractiveData:k,getRecordValueByKeyName:T,hanldePageRequestData:w,interactiveData:v});const I=t.ref({}),N=(U,Q)=>{I.value[U]=Q};t.provide(kt,{loadedData:I,setLoadedData:N});const D=[],R=()=>{D.pop()},B=U=>{D.push(U)},S=new Map,E=U=>S.get(U),_=(U,Q)=>{S.set(U,Q)};t.provide(ki,{popUseModalIds:R,pushUseModalIds:B,getModalModel:E,setModalModel:_});const M=ls(),j=new Set,F=(U,Q)=>{j.add(U),M.on(U,X=>{const{eventName:ae,params:oe}=X;return typeof Q[ae]=="function"&&Q[ae](oe)}),t.onBeforeUnmount(()=>{z(U)})},z=U=>{j.delete(U),M.off(U)},q=(U,Q,X={})=>{if(U==="PAGE"){const ae=D.length;let oe=[];if(ae===0)oe=[...j];else{const se=D[ae-1];oe=[...E(se)]}oe.forEach(se=>{M.emit(se,{eventName:Q,params:X})})}else M.emit(U,{eventName:Q,params:X})};t.provide(Gn,{onEvent:F,offEvent:z,emitEvent:q});const P=t.ref(0),Z=()=>{P.value=t.unref(P)+1};t.provide(Ai,{requestToken:Z});const V=new Map,H=new Map,$=({requestFn:U=()=>{},sortNum:Q=0,id:X=""})=>{if(V.has(Q)){const ae=V.get(Q);ae==null||ae.push(U)}else V.set(Q,[U]);H.set(X,U)},ee=U=>new Promise((Q,X)=>{const ae=U.map(oe=>oe());Promise.all(ae).then(oe=>{Q(oe)}).catch(oe=>{X(oe)})}),ie=U=>new Promise(async(Q,X)=>{if(U){if(typeof U=="string"){const ae=H.get(U);if(typeof ae=="function"){const oe=xt.interceptors.response.use(se=>(Q(se),se),se=>(X(se),Promise.reject(se)));ae(),xt.interceptors.response.eject(oe)}}}else{const ae=Array.from(V);ae.sort((se,ne)=>ne[0]-se[0]);const oe=ae.length;try{e.pageMode!=="design"&&t.unref(P)>0;for(let se=0;se<oe;se++){const ne=ae[se][1];await ee(ne)}}catch(se){console.error(se)}finally{V.clear(),Q(null)}}});t.provide(qe,{setRequest:$,touchRequest:ie});const he=()=>{M.emit(an)};t.provide(an,{emitRefreshPage:he});const ue=U=>{M.on(an,()=>U()),t.onMounted(()=>{M.off(an)})};return t.watchEffect(()=>{var U;if((U=t.unref(r))!=null&&U.length&&t.unref(c)!=="design"){const{jumpType:Q,jumpTime:X,jumpPage:ae,jumpLink:oe}=e;if(X!=null&&X.value){let se=0;switch(X==null?void 0:X.suffix){case"hours":se=X.value*60*60*1e3;break;case"minute":se=X.value*60*1e3;break;case"seconds":se=X.value*1e3;break}setTimeout(()=>{let ne="";Q==="page"&&ae?ne=Fo(t.unref(c),ae):Q==="link"&&oe&&(ne=oe),ne=Le(ne),window.open(ne,"_self")},se)}}}),t.onBeforeUnmount(()=>{V==null||V.clear(),H==null||H.clear()}),o({touchRequest:ie,getGlobalModel:p,onRefreshPage:ue}),{providerConfig:a,configStyle:C}}}),uh="";function od(e,o,n,a,i,r){return t.openBlock(),t.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:t.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const zr=Ae(Se(nd,[["render",od],["__scopeId","data-v-fc92f909"]])),Po={...De,name:"文本",keyName:"文本",type:"ecanText",width:"100px",height:"40px",text:"文字",lineHeight:1,color:"#333",variableColor:"#f00",fontSize:"14px",fontFamily:"",fontWeight:400,textShadow:"",justifyContent:"center",alignItems:"center",variableFontSize:"14px",variableDefaultValue:"0",format:"",target:"self",href:"",linkPage:"",data:{},percentageSide:"left",increaseColor:"",declineColor:"",minusSignShow:!0,unitShow:!0,unitText:"",unitFontSize:"14px",unitFontWeight:400,unitColor:"#333",unitTop:"",unitLeft:"",graphicConfig:{},targetShow:!1,targetRule:"",targetValue:"",notExpectColor:"",gradientShow:!1,gradientColor:"",gradientOffset:1,gradientAngle:"180deg",openCustomRequestData:!0,customRequestName:"",customRequestField:"",showEllipsis:!1,showAnimation:!1,transParams:[]},qo=ke(Po),Pr=["refreshData","click","valueChange"],Vo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=",Ho="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA3LTIyVDA5OjM1OjE5KzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMi0wNy0yMlQwOTozNTozNyswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MzZkZTc4NjEtZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==",jo=t.defineComponent({name:"EcanText",components:{Skeleton:Vt},props:{...qo},setup(e,{expose:o}){const n=t.ref(!1),a=Ee(e),i=t.ref({}),r=t.computed(()=>e.variableFontSize||"14px"),s=t.computed(()=>"-"+t.unref(r)),l=R=>{var B;if(e.showAnimation){const S=e.text.match(/\{(.+?)\}/g)||[];if(S!=null&&S.length){const E=(B=S[0].slice(1,-1))==null?void 0:B.trim();if(t.unref(i)[E]===R){i.value=R;return}const _=+R[E],M=String(Math.abs(_)).length;if(isNaN(_))i.value=R;else{let j=[];for(let z=0;z<5;z++){const q=Math.ceil(Math.random()*(Math.abs(_)+1)-1);j.includes(q)||j.push(q)}j.sort((z,q)=>z-q),j=j.map(z=>{const q=String(z).split("").reverse(),P=[];for(let Z=0;Z<M;Z++)q&&q[Z]?P.push(q[Z]):P.push("0");return(_<0?"-":"")+P.reverse().join("")}),j.push(_);let F=0;for(const z of j)setTimeout(()=>{i.value={...t.unref(i),[E]:z}},F*1e3),F+=.1}}else i.value=R}else i.value=R};t.watch(()=>[e.data,e.dataType],([R,B])=>{B==="static"&&l(R)},{immediate:!0});const{getGlobalModel:d,setGlobalModel:c,getRecordValueByKeyName:u,hanldePageRequestData:y}=t.inject(Ie,{getGlobalModel:R=>{},setGlobalModel:(R,B)=>{},getRecordValueByKeyName:R=>{},hanldePageRequestData:(R,B)=>{}}),{setLoadedData:f}=t.inject(kt,{setLoadedData:(R,B)=>{}}),g=t.computed(()=>{let R="";if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:_}=e;R+=`background: linear-gradient(${E}, ${_}, ${B||"transparent"} ${S*100}%);-webkit-background-clip: text;color: transparent;`}return R}),m=t.computed(()=>{const R={};if(e.gradientShow){const{gradientColor:B,gradientOffset:S,gradientAngle:E,color:_}=e,M=B||"transparent";R.background=`linear-gradient(${E}, ${_}, ${M} ${S*100}%)`,R["-webkit-background-clip"]="text",R.color="transparent"}return R}),h=t.computed(()=>{var F;if(t.unref(n))return"NaN";const R=t.unref(i),B=e.increaseColor||e.color,S=e.declineColor||e.color;let E=e.text;E=E==null?void 0:E.replace(/\n|\\n/g,"<br/>"),E=E==null?void 0:E.replace(/\s(?!\{) | (?!\})\s/g,"&nbsp;");const _=E.match(/\{(.+?)\}/g)||[];let M="";const j=e.showEllipsis?"show-ellipsis":"";if(_==null||_.length===0){if(E&&e.format==="percentage"&&!isNaN(+E)){const z=parseFloat(E),q=z*100,P=C(q.toFixed(2));z>=0?E=`<span class="${j}" style="color: ${P||B||"#ED6643"};font-size:${t.unref(r)};display: inline-block;${t.unref(g)}">
100
100
  <div class="percentage-img-box">
101
101
  <img style="width: ${t.unref(r)};filter: ${`drop-shadow(${P||B||"#ED6643"} ${t.unref(r)} 0px)`};" src="${Vo}"/>
102
102
  </div>