@ecan-bi/datav 1.3.85 → 1.3.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.3.85 */
1
+ /*! @ecan-bi/datav@1.3.86 */
2
2
  (function(Ee,qe){typeof exports=="object"&&typeof module<"u"?qe(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"],qe):(Ee=typeof globalThis<"u"?globalThis:Ee||self,qe(Ee["@ecan/bi-datav"]={},Ee.Vue,Ee["echarts/core"],Ee.ResizeDetector,Ee.AntDesignVue,null,null,Ee.LodashEs,Ee.Dayjs,Ee.Axios,Ee.Mitt,null,null,null,Ee["ant-design-vue/es/date-picker/locale/zh_CN"],null,null,null,null,Ee["echarts/renderers"],Ee["echarts/charts"],Ee["echarts/components"],null,Ee.Echarts,null,null,Ee.Xlsx,Ee.big.js))})(this,function(exports,vue,core$1,resizeDetector,antDesignVue,style$1,style$2,lodashEs,dayjs,axios,mitt,style$3,style$4,style$5,locale,style$6,style$7,style$8,style$9,renderers,charts,components$1,style$a,echarts,style$b,style$c,xlsx,big_js){var Ee,qe,je,Ue;"use strict";function _interopNamespaceDefault(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const echarts__namespace=_interopNamespaceDefault(echarts),METHOD_NAMES=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function usePublicAPI(e,r){function n(a){return(...o)=>{if(e.value||r(),!e.value)throw new Error("ECharts is not initialized yet.");return e.value[a].apply(e.value,o)}}function i(){const a=Object.create(null);return METHOD_NAMES.forEach(o=>{a[o]=n(o)}),a}return i()}function useAutoresize(e,r,n){let i=null;vue.watch([n,e,r],([a,o,s],l,c)=>{a&&o&&s&&(i=core$1.throttle(()=>{o.resize()},100),resizeDetector.addListener(a,i)),c(()=>{i&&a&&resizeDetector.removeListener(a,i)})})}const autoresizeProps={autoresize:Boolean},LOADING_OPTIONS_KEY="ecLoadingOptions";function useLoading(e,r,n){const i=vue.inject(LOADING_OPTIONS_KEY,{}),a=vue.computed(()=>({...vue.unref(i),...n==null?void 0:n.value}));vue.watchEffect(()=>{const o=e.value;o&&(r.value?o.showLoading(a.value):o.hideLoading())})}const loadingProps$1={loading:Boolean,loadingOptions:Object},style="",onRE=/^on[^a-z]/,isOn=e=>onRE.test(e);function omitOn(e){const r={};for(const n in e)isOn(n)||(r[n]=e[n]);return r}const TAG_NAME="x-vue-echarts",THEME_KEY="ecTheme",INIT_OPTIONS_KEY="ecInitOptions",UPDATE_OPTIONS_KEY="ecUpdateOptions",Echarts=vue.defineComponent({name:"echarts",props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...autoresizeProps,...loadingProps$1},inheritAttrs:!1,setup(e,{attrs:r,listeners:n}){const i=vue.shallowRef(),a=vue.shallowRef(),o=vue.shallowRef(),s=vue.inject(THEME_KEY,null),l=vue.inject(INIT_OPTIONS_KEY,null),c=vue.inject(UPDATE_OPTIONS_KEY,null),{autoresize:u,manualUpdate:h,loading:b,loadingOptions:f}=vue.toRefs(e),y=vue.computed(()=>o.value||e.option||Object.create(null)),d=vue.computed(()=>e.theme||vue.unref(s)||{}),g=vue.computed(()=>e.initOptions||vue.unref(l)||{}),w=vue.computed(()=>e.updateOptions||vue.unref(c)||{}),p=vue.computed(()=>omitOn(r));function m(P){if(a.value||!i.value)return;const A=a.value=core$1.init(i.value,d.value,g.value);e.group&&(A.group=e.group);let R=n;R||(R={},Object.keys(r).filter(L=>L.indexOf("on")===0&&L.length>2).forEach(L=>{const V=L.charAt(2).toLowerCase()+L.slice(3);R[V]=r[L]})),Object.keys(R).forEach(L=>{const V=R[L];V&&(L.indexOf("zr:")===0?A.getZr().on(L.slice(3).toLowerCase(),V):A.on(L.toLowerCase(),V))});function I(){if(A&&!A.isDisposed())try{A.resize()}catch(L){if(L.message==="Cannot read property 'get' of undefined")return;throw L}}function B(){A.setOption(P||y.value,w.value)}u.value?vue.nextTick(()=>{I(),B()}):B()}function v(P,A){e.manualUpdate&&(o.value=P),a.value?a.value.setOption(P,A||{}):m(P)}function x(){a.value&&(a.value.dispose(),a.value=void 0)}let E=null;vue.watch(h,P=>{typeof E=="function"&&(E(),E=null),P||(E=vue.watch(()=>e.option,A=>{A&&(a.value?a.value.setOption(A,w.value):m())},{deep:!0}))},{immediate:!0}),vue.watch([d,g],()=>{x(),m()},{deep:!0}),vue.watchEffect(()=>{e.group&&a.value&&(a.value.group=e.group)});const _=usePublicAPI(a,m);return useLoading(a,b,f),useAutoresize(a,u,i),vue.onMounted(()=>{e.option&&m()}),vue.onUnmounted(x),{chart:a,root:i,setOption:v,nonEventAttrs:p,..._}},render(){const e={...this.nonEventAttrs};return e.ref="root",e.class=e.class?["echarts"].concat(e.class):"echarts",vue.h(TAG_NAME,e)}});function bound01(e,r){isOnePointZero(e)&&(e="100%");var n=isPercentage(e);return e=r===360?e:Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*r),10)/100),Math.abs(e-r)<1e-6?1:(r===360?e=(e<0?e%r+r:e%r)/parseFloat(String(r)):e=e%r/parseFloat(String(r)),e)}function isOnePointZero(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function isPercentage(e){return typeof e=="string"&&e.indexOf("%")!==-1}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function convertToPercentage(e){return e<=1?"".concat(Number(e)*100,"%"):e}function pad2(e){return e.length===1?"0"+e:String(e)}function rgbToRgb(e,r,n){return{r:bound01(e,255)*255,g:bound01(r,255)*255,b:bound01(n,255)*255}}function hue2rgb(e,r,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(r-e)*(6*n):n<1/2?r:n<2/3?e+(r-e)*(2/3-n)*6:e}function hslToRgb(e,r,n){var i,a,o;if(e=bound01(e,360),r=bound01(r,100),n=bound01(n,100),r===0)a=n,o=n,i=n;else{var s=n<.5?n*(1+r):n+r-n*r,l=2*n-s;i=hue2rgb(l,s,e+1/3),a=hue2rgb(l,s,e),o=hue2rgb(l,s,e-1/3)}return{r:i*255,g:a*255,b:o*255}}function rgbToHsv(e,r,n){e=bound01(e,255),r=bound01(r,255),n=bound01(n,255);var i=Math.max(e,r,n),a=Math.min(e,r,n),o=0,s=i,l=i-a,c=i===0?0:l/i;if(i===a)o=0;else{switch(i){case e:o=(r-n)/l+(r<n?6:0);break;case r:o=(n-e)/l+2;break;case n:o=(e-r)/l+4;break}o/=6}return{h:o,s:c,v:s}}function hsvToRgb(e,r,n){e=bound01(e,360)*6,r=bound01(r,100),n=bound01(n,100);var i=Math.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6,u=[n,s,o,o,l,n][c],h=[l,n,n,s,o,o][c],b=[o,o,l,n,n,s][c];return{r:u*255,g:h*255,b:b*255}}function rgbToHex(e,r,n,i){var a=[pad2(Math.round(e).toString(16)),pad2(Math.round(r).toString(16)),pad2(Math.round(n).toString(16))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}var names={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 inputToRGB(e){var r={r:0,g:0,b:0},n=1,i=null,a=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=stringInputToObject(e)),typeof e=="object"&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(r=rgbToRgb(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(i=convertToPercentage(e.s),a=convertToPercentage(e.v),r=hsvToRgb(e.h,i,a),s=!0,l="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(i=convertToPercentage(e.s),o=convertToPercentage(e.l),r=hslToRgb(e.h,i,o),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=boundAlpha(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),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 stringInputToObject(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var r=!1;if(names[e])e=names[e],r=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=matchers.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=matchers.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=matchers.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=matchers.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=matchers.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=matchers.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=matchers.hex8.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:r?"name":"hex8"}:(n=matchers.hex6.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:r?"name":"hex"}:(n=matchers.hex4.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),a:convertHexToDecimal(n[4]+n[4]),format:r?"name":"hex8"}:(n=matchers.hex3.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),format:r?"name":"hex"}:!1)))))))))}function isValidCSSUnit(e){return!!matchers.CSS_UNIT.exec(String(e))}var hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{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 toHsv(e){var r=e.r,n=e.g,i=e.b,a=rgbToHsv(r,n,i);return{h:a.h*360,s:a.s,v:a.v}}function toHex(e){var r=e.r,n=e.g,i=e.b;return"#".concat(rgbToHex(r,n,i,!1))}function mix(e,r,n){var i=n/100,a={r:(r.r-e.r)*i+e.r,g:(r.g-e.g)*i+e.g,b:(r.b-e.b)*i+e.b};return a}function getHue(e,r,n){var i;return Math.round(e.h)>=60&&Math.round(e.h)<=240?i=n?Math.round(e.h)-hueStep*r:Math.round(e.h)+hueStep*r:i=n?Math.round(e.h)+hueStep*r:Math.round(e.h)-hueStep*r,i<0?i+=360:i>=360&&(i-=360),i}function getSaturation(e,r,n){if(e.h===0&&e.s===0)return e.s;var i;return n?i=e.s-saturationStep*r:r===darkColorCount?i=e.s+saturationStep:i=e.s+saturationStep2*r,i>1&&(i=1),n&&r===lightColorCount&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2))}function getValue(e,r,n){var i;return n?i=e.v+brightnessStep1*r:i=e.v-brightnessStep2*r,i>1&&(i=1),Number(i.toFixed(2))}function generate$1(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],i=inputToRGB(e),a=lightColorCount;a>0;a-=1){var o=toHsv(i),s=toHex(inputToRGB({h:getHue(o,a,!0),s:getSaturation(o,a,!0),v:getValue(o,a,!0)}));n.push(s)}n.push(toHex(i));for(var l=1;l<=darkColorCount;l+=1){var c=toHsv(i),u=toHex(inputToRGB({h:getHue(c,l),s:getSaturation(c,l),v:getValue(c,l)}));n.push(u)}return r.theme==="dark"?darkColorMap.map(function(h){var b=h.index,f=h.opacity,y=toHex(mix(inputToRGB(r.backgroundColor||"#141414"),inputToRGB(n[b]),f*100));return y}):n}var presetPrimaryColors={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"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(e){presetPalettes[e]=generate$1(presetPrimaryColors[e]),presetPalettes[e].primary=presetPalettes[e][5],presetDarkPalettes[e]=generate$1(presetPrimaryColors[e],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[e].primary=presetDarkPalettes[e][5]});var containers=[],styleElements=[],usage="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function createStyleElement(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function insertCss(e,r){if(r=r||{},e===void 0)throw new Error(usage);var n=r.prepend===!0?"prepend":"append",i=r.container!==void 0?r.container:document.querySelector("head"),a=containers.indexOf(i);a===-1&&(a=containers.push(i)-1,styleElements[a]={});var o;return styleElements[a]!==void 0&&styleElements[a][n]!==void 0?o=styleElements[a][n]:(o=styleElements[a][n]=createStyleElement(),n==="prepend"?i.insertBefore(o,i.childNodes[0]):i.appendChild(o)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),o.styleSheet?o.styleSheet.cssText+=e:o.textContent+=e,o}function _objectSpread$8(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?Object(arguments[r]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),i.forEach(function(a){_defineProperty$8(e,a,n[a])})}return e}function _defineProperty$8(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function warn(e,r){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(r))}function warning(e,r){warn(e,"[@ant-design/icons-vue] ".concat(r))}function isIconDefinition(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function generate(e,r,n){return n?vue.h(e.tag,_objectSpread$8({key:r},n,e.attrs),(e.children||[]).map(function(i,a){return generate(i,"".concat(r,"-").concat(e.tag,"-").concat(a))})):vue.h(e.tag,_objectSpread$8({key:r},e.attrs),(e.children||[]).map(function(i,a){return generate(i,"".concat(r,"-").concat(e.tag,"-").concat(a))}))}function getSecondaryColor(e){return generate$1(e)[0]}function normalizeTwoToneColors(e){return e?Array.isArray(e)?e:[e]:[]}var iconStyles=`
3
3
  .anticon {
4
4
  display: inline-block;
@@ -96,7 +96,7 @@ version: 2.9.0
96
96
  `,n+="-----END PUBLIC KEY-----",n},r.hasPublicKeyProperty=function(n){return n=n||{},n.hasOwnProperty("n")&&n.hasOwnProperty("e")},r.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")},r.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)},r}(RSAKey),_a,version=typeof process<"u"?(_a=process.env)===null||_a===void 0?void 0:_a.npm_package_version:void 0,JSEncrypt=function(){function e(r){r===void 0&&(r={}),r=r||{},this.default_key_size=r.default_key_size?parseInt(r.default_key_size,10):1024,this.default_public_exponent=r.default_public_exponent||"010001",this.log=r.log||!1,this.key=null}return e.prototype.setKey=function(r){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new JSEncryptRSAKey(r)},e.prototype.setPrivateKey=function(r){this.setKey(r)},e.prototype.setPublicKey=function(r){this.setKey(r)},e.prototype.decrypt=function(r){try{return this.getKey().decrypt(b64tohex(r))}catch{return!1}},e.prototype.encrypt=function(r){try{return hex2b64(this.getKey().encrypt(r))}catch{return!1}},e.prototype.sign=function(r,n,i){try{return hex2b64(this.getKey().sign(r,n,i))}catch{return!1}},e.prototype.verify=function(r,n,i){try{return this.getKey().verify(r,b64tohex(n),i)}catch{return!1}},e.prototype.getKey=function(r){if(!this.key){if(this.key=new JSEncryptRSAKey,r&&{}.toString.call(r)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,r);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=version,e}();const encryptor=new JSEncrypt,aesKey=createAesKey();function createAesKey(){let r=Math.random().toString(36).substr(2);for(;r.length<16;)r+=Math.random().toString(36).substr(2);return r=r.substr(0,16),r}const iv=CryptoJS.enc.Utf8.parse("ABCDEF1234123412");function aesEncrypt(e,r){r=r||aesKey;const n=CryptoJS.enc.Utf8.parse(r);let i="";switch(typeof e){case"string":i=CryptoJS.enc.Utf8.parse(e);break;case"object":i=CryptoJS.enc.Utf8.parse(JSON.stringify(e));break;default:i=CryptoJS.enc.Utf8.parse(e.toString())}return CryptoJS.AES.encrypt(i,n,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding}).toString()}function aesDecrypt(e,r){r=r||aesKey;const n=CryptoJS.enc.Utf8.parse(r),i=CryptoJS.AES.decrypt(e,n,{iv,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.ZeroPadding});return CryptoJS.enc.Utf8.stringify(i).toString()}function setPublicKey(e){encryptor.setPublicKey(e)}function rsaEncrypt(e){return encryptor.encrypt(e)}function hasEncryptUrl(e=""){e.startsWith("/")||(e="/"+e),e=e.split("?")[0];const n=["/diagram","/dataview"].map(i=>`^(.*?)${i}(/|$)`);for(const i of n)if(new RegExp(i).test(e))return!0;return!1}function EncryptConfigParam(e){const{paramType:r,data:n,params:i,method:a}=e;r==="form"?["get","delete"].includes(a)?e.params=getEncryptParam(i,"string"):e.data=getEncryptParam(n,"string"):["get","delete"].includes(a)?e.params=getEncryptParam(i,"string"):e.data=getEncryptParam(n)}function getEncryptParam(e,r){let n=e||{};if(r==="string"){n="";for(const l in e)if(Object.hasOwnProperty.call(e,l)){const c=e[l];n+=`${l}=${encodeURIComponent(c)}&`}}setPublicKey("MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMKaTbS1XHH7u/4dhao1n5Lcegpy6AHKX2TjmTP7IDW6N4wznqlL3Tt+U0/Il1TlNp1/EN+tffYYg4dPrrCUDwcCAwEAAQ==");const a=rsaEncrypt(aesKey);return{c:aesEncrypt(n,aesKey),p:a}}window.getEncryptParam=getEncryptParam;function encryptData(e,r){var n;(n=window==null?void 0:window.config)!=null&&n.encryptFlag&&hasEncryptUrl(e.url)&&(e.data instanceof FormData?e.data=getEncryptFileParam(e.data):EncryptConfigParam(e))}function getEncryptFileParam(e){const r=e.entries(),n=new FormData,i={};for(const o of r){const s=o[0],l=o[1];l instanceof Blob?n.append(s,l):i[s]=l}const a=getEncryptParam(i,"json");return typeof a=="object"&&(n.append("c",a.c),n.append("p",a.p)),n}window.xhaesKey=aesKey,window.xhaesDecrypt=aesDecrypt;function decryptData(e,r){var n;if((n=window==null?void 0:window.config)!=null&&n.encryptFlag&&hasEncryptUrl(e.config.url)&&!(e.data instanceof Blob)&&e.data.data!==void 0){const i=aesDecrypt(e.data.data.content,aesKey);e.data=JSON.parse(i)}}const requestErrorTip=window.config.requestErrorTip,request=axios.create({timeout:1e3*180});request.interceptors.request.use(e=>{const{requestParams:r={}}=window.config;return r!=null&&r.pltToken&&(e.headers["Plt-Token"]=r.pltToken),encryptData(e),e},e=>Promise.reject(e)),request.interceptors.response.use(e=>{var r,n,i;return requestErrorTip&&+((r=e==null?void 0:e.data)==null?void 0:r.code)==500&&antDesignVue.message.error({content:((n=e==null?void 0:e.data)==null?void 0:n.msg)||((i=e==null?void 0:e.data)==null?void 0:i.message)||"服务器异常",key:"SERVER_ERROR",duration:2}),decryptData(e),e},e=>{if(decryptData(e==null?void 0:e.response),requestErrorTip)if(e.message.includes("timeout"))antDesignVue.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT",duration:2});else{const{status:r}=(e==null?void 0:e.response)||{};r>=400&&r<500&&antDesignVue.message.error({content:"请求异常",key:"REQUEST_ERROR",duration:2}),r>=500&&antDesignVue.message.error({content:"服务器异常",key:"REQUEST_ERROR",duration:2})}return Promise.reject(e)});const handleFormatter=e=>e.replace(/\\n/g,`
97
97
  `),formatMoney=(e,r=2)=>{const n=parseFloat(e+"");return isNaN(n)?e:n.toFixed(r).replace(/(\d)(?=(\d{3})+\.)/g,"$1,")},formatThousands=e=>{const r=parseFloat(e+"");return isNaN(r)?e:(r+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")},formatPercentage=(e,r=2)=>{const n=e+"";if(n.includes("%"))return e;const i=parseFloat(n);return isNaN(i)?e:`${(i*100).toFixed(r)}%`},formatDecimals=(e,r=2)=>{const n=e+"",i=parseFloat(n);return isNaN(i)?e:i.toFixed(r)},formatCustom=(e,r)=>useValueFormatter(r,e),lowerCaseIncludes=(e,r)=>{if(typeof e=="string"&&typeof r=="string")return e.toLocaleLowerCase().includes(r.toLocaleLowerCase());if(typeof e=="string"&&Array.isArray(r)){const n=r.length;for(let i=0;i<n;i++){const a=r[i];if(typeof a=="string"&&e.toLocaleLowerCase().includes(a.toLocaleLowerCase()))return!0}}return!1},hasOwn=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),getFixedValueDatas=e=>{const{leftAxisList:r=[],rightAxisList:n=[],queryColumnList:i=[],indicators:a=[]}=e;return[...r,...n,...i,...a].filter(o=>(o==null?void 0:o.calcType)==="COMPONENT").map(o=>({keyName:o.builtInCalcWay,id:o.builtInValueSource}))},canRequestIndicator=(e,r)=>{let n=!0;const i=getFixedValueDatas(e);return i!=null&&i.length&&(n=i.map(a=>r[a.id]).every(a=>a)),n},getLegendFormat=(e,r)=>{var s;const n=e.match(/\{(.+?)\}/g),i=((s=e.split(`
98
98
  `))==null?void 0:s.length)-1;let a="";if(i)for(let l=0;l<i;l++)a+=`
99
- `;let o=e;if(n!=null&&n.length){for(const l of n){const c=useVariablesInText(l,{textData:r},{useNewline:!1,useSpace:!1});c&&(o=o.replace(l,c))}return`${a}{text|${o}}`}else return e},setDefaultRangeVal=(e,r)=>{const{props:n,componentList:i,getGlobalModel:a}=e,{graphicConfig:o={},startValue:s,endValue:l}=n,c=getdefCompleteData({graphicConfig:o,startValue:s,endValue:l,componentList:i,getGlobalModel:a}),{dimensions:u,dataset:h}=r,{classificationList:b=[]}=o,y=b.find(d=>d.show).label||"";for(const d of c)u.includes(d)||u.push(d);u.sort((d,g)=>dayjs(d).isBefore(dayjs(g))?-1:1);for(const d of h){const{data:g}=d;if(g!=null&&g.length){const w=[];for(const p of c)if(g.find(m=>m[y]!==p)){const m=lodashEs.cloneDeep(g[0]);for(const v in m)v===y?m[v]=p:m[v]=0;w.push(m)}d.data.push(...w),d.data.sort((p,m)=>dayjs(p[y]).isBefore(dayjs(m[y]))?-1:1)}}},getConditions=e=>{const r=[];for(const n of e)n.conditions?r.push(...getConditions(n.conditions)):(n==null?void 0:n.dataType)==="component"&&r.push(n);return r};function getdefCompleteData(e){const{startValue:r,endValue:n,componentList:i,graphicConfig:a,getGlobalModel:o}=e,s=getVariableAndField(r),l=getVariableAndField(n),c=[];if(s&&l){const u=i.find(b=>b.keyName===s.keyName),h=i.find(b=>b.keyName===l.keyName);if(u&&h){const b=o(u.id),f=o(h.id),{classificationList:y=[]}=a,d=y.find(g=>g.show);if(d){let g="YYYY-MM";switch(d.name){case"the_year":g="YYYY";break;case"the_month":g="MM";break;case"the_day":g="DD";break;case"the_date":g=(d==null?void 0:d.dateFormat)||g;break}const w=getFormatStep(g);if(g){const p=vue.unref(b[s.field]),m=vue.unref(f[l.field]);let v=dayjs(p);const x=dayjs(m);for(c.push(x.format(g));v.isBefore(x);)c.push(v.format(g)),v=v.add(1,w)}}}}return c}function getVariableAndField(e){let r=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let i=n[0].slice(1,-1).trim();const a=i.match(/\[(.+?)\]/g);let o="";a!=null&&a.length&&(i=i.replace(a[0],""),o=a[0].slice(1,-1).trim()),r={keyName:i,field:o}}}return r}function getFormatStep(e){const r=e.split("-");let n="";if(r!=null&&r.length)switch(r[r.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}function handleJumpLink(e,r){var b;const{pageMode:n,targetTemplate:i,getRecordValueByKeyName:a,setTemplateData:o}=r,s=e.linkPage||"",l=usePageUrl(n,s),c=e.href;let u=c||l;u=useVariablesInText(u);const h=e.target;if(h)if(h==="event")window.parent.postMessage({type:"openPage",url:c},"*");else{const f={pageId:s,componentId:i};if((b=e.transParams)!=null&&b.length){u.includes("?")?u+="&":u+="?";const y=[];for(const d of e.transParams){const g=a(String(d.fieldName));y.push(`${d.keyName}=${g}`),f[d.keyName]=g}u+=y.join("&")}h==="template"?o(f):(h==="blank"&&(u+=`${u.includes("?")?"&":"?"}drillFlag=1`),window.open(u,"_"+h))}}function getPageUrlParams(e){var n,i;let r={};if(e){const a=(((n=window.config)==null?void 0:n.urlParams)||{})[e]||{};for(const o in a)o.includes("{")||(r[o]=a[o])}else r=((i=window.config)==null?void 0:i.requestParams)||{};return r}const runCode=(e,r)=>{const n={dayjs,...r};let i="";const a=[];for(const l in n)i+=`${l},`,a.push(n[l]);i=i.replace(/,$/,"");const o=`function (${i}){return ${e}}`;let s;try{s=Function(`"use strict";return (${o})`)()(...a)}catch{return e}return s},useVariablesInText=(e="",{textData:r,codeData:n}={},{useNewline:i=!1,useSpace:a=!1}={})=>{const s={...window.config||{},...r},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let c=0;c<l.length;c++){const u=l[c];let h=u.slice(1,-1).trim();const b=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=h.match(b);for(let y=0;y<f.length;y++){const d=f[y],g=s[d];g!=null&&typeof g!="function"&&(h=h.replace(d,g))}(/\(.*\)/g.test(h)||/[+/\\*]/g.test(h))&&(h=runCode(h,n)),e=e.replace(u,h)}return i&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),a&&(e=e==null?void 0:e.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),e},useRequestData=(e,r,n=()=>{})=>{const{requestUrl:i,requestMethod:a,requestHeaders:o,requestParams:s,requestInterval:l,isViewRedrawing:c,isOpenRequestTimer:u,openCustomRequestData:h,projectRequestUrl:b="",getModel:f,requestParamsMode:y,customRequestParams:d,dataSetParam:g,requestType:w,dataType:p}=e;console.log(e,"props");const{pageMode:m}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{pageId:v}=vue.inject("templateOperate",{pageId:""})||{},{contextRequestUrl:x,touchEventId:E}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:_}=vue.inject(GLOBAL_MODEL,{getGlobalModel:B=>{}})||{},P=f||_,A=useVariablesInText(i),R=async(B={})=>{var C;if(p!=="request"&&I){clearInterval(I);return}if(!A||!a||!o)return;let L={};for(const D of s){const{key:k,value:F}=D;if((F==null?void 0:F.id)==="PARENT"&&(F!=null&&F.prop)){const G=(((C=window.config)==null?void 0:C.record)||{})[F.prop];if(G){const j=G[F.propKey||"value"];j&&(["date","range"].some(H=>lowerCaseIncludes(G==null?void 0:G.type,H))?L[k]=vue.unref(j).format(G.format||"YYYY-MM-DD"):L[k]=vue.unref(j))}continue}if(c&&e.dataType!=="indicator"&&r.value.clear(),typeof F=="object"&&F!=null&&F.id){let $={};const{id:G,prop:j,propKey:U,operate:H}=F;let O=!1;try{JSON.parse(G),O=!0}catch{O=!1}G==="THIS"?$=P(vue.unref(E))||{}:$=P(G)||{};const K=vue.unref($[j]);let Y=null;if(["date","range"].some(J=>lowerCaseIncludes($==null?void 0:$.type,J))){const{value:J,type:Z,mode:W}=H||{};if(J&&Z&&W)switch(Z){case"add":Y=vue.unref(K).add(J,W);break;case"minus":Y=vue.unref(K).subtract(J,W);break}Y==null&&(Y=vue.unref(K)),Y=(Y==null?void 0:Y.format((U==null?void 0:U.trim())||$.format))||""}else if(Object.prototype.toString.call(K)==="[object Object]")U?Y=K[U]:Y=j?K[j]:K;else if(lowerCaseIncludes($==null?void 0:$.type,"select")&&vue.unref(K)&&j&&Array.isArray(vue.unref(K)))Y=vue.unref(K).map(J=>Object.prototype.hasOwnProperty.call(J,j)?J[j]:J);else if(O){const J=JSON.parse(G);console.log(J,"urlvalue"),Y=J.value}else Y=K;L[k]=Y}else typeof F=="object"&&F.id===null&&w===1?(console.log(F.propKey,"value.propKey"),L[k]=F.propKey):typeof F=="string"&&(L[k]=useVariablesInText(F))}if(w===1){console.log(L,"_params");const D=Object.entries(L);g.param=g.param.map((k,F)=>({...k,paramKey:D[F][0],defaultValue:D[F][1]||""})),L=g}if(y==="2"&&d!=="{}"){const D=JSON.parse(d);V(D),D&&(L=D)}function V(D){const k={...L,...getPageUrlParams(v)};if(Array.isArray(D))D.forEach((F,$)=>{if(typeof F=="string"){const G=F.match(/\${(.+?)\}/g);if(G!=null&&G.length){const j=G[0].slice(2,-1);j&&k[j]?D[$]=k[j]:D[$]=""}}else V(F)});else if(Object.prototype.toString.call(D)==="[object Object]")for(const F in D)if(typeof D[F]=="string"){const $=D[F].match(/\${(.+?)\}/g);if($!=null&&$.length){const G=$[0].slice(2,-1);G&&k[G]?D[F]=k[G]:D[F]=""}}else V(D[F])}L={...getPageUrlParams(v),...B,...L};let q="";const N=Object.keys(L),T=N.length-1,M=N.length;N.forEach((D,k)=>{let F=L[D];Object.prototype.toString.call(F)==="[object Object]"&&(F=JSON.stringify(F)),k===0?M!==1?q+=`?${D}=${F}&`:q+=`?${D}=${F}`:k===T?q+=`${D}=${F}`:q+=`${D}=${F}&`});function S(D){var k;if(w===1)return{Authentication:(k=window==null?void 0:window.config)==null?void 0:k.indicatorToken};if(typeof D=="string"){const F=JSON.parse(D),$=getPageUrlParams(v);if(Object.prototype.toString.call(F)==="[object Object]"){for(const G in F)if(typeof F[G]=="string"){const j=F[G].match(/\${(.+?)\}/g);if(j!=null&&j.length){const U=j[0].slice(2,-1);U&&$[U]?F[G]=$[U]:F[G]=""}}}return F}else return D}try{const D=["get","head"].includes(a),k={};let F=D?A+q:A;L.dataSqlId&&!F.includes("dataSqlId")&&(F+=`${F.includes("?")?"&":"?"}dataSqlId=${L.dataSqlId}`),Object.prototype.hasOwnProperty.call(L,"signal")&&(k.signal=L.signal);const $=await request({baseURL:vue.unref(x)||b||"",url:F,method:a,headers:o?S(o):{},data:D?{}:L,...k});return n($),$}catch(D){console.error(D)}},I=vue.unref(m)!=="design"&&u&&(h||h===void 0)&&setInterval(R,l*1e3);return vue.onUnmounted(()=>{clearInterval(I)}),R},useTransformChartDataByAttrKey=(e=[],r,n=!1)=>{let{name:i="name",types:a=[]}=r||{};i=(i==null?void 0:i.trim())||i;const o=new Set,s=new Map,l=e.length,c=a.length;if(l===1&&!n){const b=[];for(let y=0;y<c;y++){const d=a[y],{label:g,value:w}=d,p={...e[0],value:e[0][w]};o.add(g),b.push(p)}const f=e[0][i]||"";s.set(f,b)}else for(let b=0;b<l;b++){const f=e[b],y=f[i];o.add(y);for(let d=0;d<c;d++){const g=a[d],{label:w,value:p}=g,m={...f,value:f[p]||0};if(s.has(w)){const v=s.get(w);v.push(m),s.set(w,v)}else s.set(w,[m])}}const u=Array.from(o),h=[];for(const[b,f]of s)h.push({name:b,data:f});return{dimensions:u,dataset:h}},useImagePath=(e,r=!1)=>{var i;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((i=window==null?void 0:window.config)==null?void 0:i.uploadPath)+e,r&&(n=`url(${n})`),n},usePageUrl=(e,r)=>{const n=`${BASE_URL}/preview?pageId=${r}`,i=`${BASE_URL}/${r}`;return e==="preview"?n:i},useValueFormatter=(e,r)=>{var a;if(e==null)return r;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return r;const i=n.length;for(let o=0;o<i;o++){const s=n[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,r);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e},useIndicatorData=(e={},r,n=()=>{})=>{var P;const{pageMode:i}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:a}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:o}=vue.inject(LOADED_DATA,{setLoadedData:(A,R)=>{}}),{getGlobalModel:s}=vue.inject(GLOBAL_MODEL,{getGlobalModel:A=>{}}),{pageId:l}=vue.inject("templateOperate",{pageId:""})||{};e.dataType==="indicator"&&a();const c=A=>{const{around:R,unit:I,id:B}=A;let L="";const{pageMode:V="",componentList:q=[]}=(e==null?void 0:e.graphicConfig)||{};let N=null,T=null;if(V==="design"){const M=q==null?void 0:q.find(G=>G.id===B);if(!M)return[];const{interval:S,intervalUnit:C,startTime:D,endTime:k,operate:F,useCurrentTime:$}=M||{};if($&&(N=dayjs().subtract(S,C),T=dayjs()),D&&(N=dayjs(D)),k&&(T=dayjs(k)),F){const{type:G,value:j,mode:U}=F;switch(G){case"add":N=N&&N.add(j,U),T=T&&T.add(j,U);break;case"minus":N=N&&N.subtract(j,U),T=T&&T.subtract(j,U)}}}else{const M=s(B)||{};vue.unref(M.startTime)&&(N=dayjs(vue.unref(M.startTime))),vue.unref(M.endTime)&&(T=dayjs(vue.unref(M.endTime)))}if(N&&T){const M=T.diff(N,I.toLowerCase());L=`${R==="before"?"-":""}${M+1}`}return L?[L]:[]},u=(A,R)=>Object.prototype.hasOwnProperty.call(A,R),h=(A,R)=>{if(R)u(A,"indexCode")&&(A.hrpIndexCode=A.indexCode,delete A.indexCode),u(A,"indexCodeNum")&&(A.hrpIndexCodeNum=A.indexCodeNum,delete A.indexCodeNum),u(A,"dataType")&&delete A.dataType;else{const{calcWays:I=[],dateCalcTypes:B=[],activeKey:L,componentId:V=""}=A;if(L===5&&(I!=null&&I.length)&&(B!=null&&B.length)&&V){const q=I[0].split("-");(q==null?void 0:q.length)>1&&q[0]==="rangeValue"&&(A.calcWays=c({around:q[1],unit:B[0],id:V})),delete A.radioValue}if(u(A,"dataType")){if(A.fieldType==="DATE"&&(A.label=A.fieldName),A.dataType==="component")if(A.fieldValue==="PARENT"){let q=A.modelKey;q&&A.prop&&(q+=`-${A.prop}`),A.fieldValue="${"+q+"}"}else A.fieldValue="${"+A.fieldValue+"}";delete A.dataType}u(A,"activeKey")&&delete A.activeKey,u(A,"radioValue")&&delete A.radioValue,u(A,"indexCode")&&(A.hrpIndexCode=A.indexCode,delete A.indexCode),u(A,"indexCodeNum")&&(A.hrpIndexCodeNum=A.indexCodeNum,delete A.indexCodeNum),A.dataType!=="component"&&A.useCurrentTime&&(A.fieldValue=dayjs().format(A.dateFormat)),u(A,"modelKey")&&delete A.modelKey,u(A,"prop")&&delete A.prop,delete A.useCurrentTime}},b=(A,R)=>{const I=[];return A!=null&&A.length&&lodashEs.cloneDeep(A).forEach(B=>{if(B.join&&B.conditions){const L=!B.conditions.some(V=>V.join&&V.conditions);B.conditions.forEach((V,q)=>{h(V,R);const N={};if(q<B.conditions.length-1&&(N.join=B.join),L)I.push({...N,...V});else if(V.join&&V.conditions){const T=R?"sqlConditions":"conditions";I.push({[T]:b([V],R),...N})}else I.push({...N,...V})})}else h(B,R),I.push(B)}),I},f=(A={},R)=>{if(A!=null&&A.sortCpnts&&R){const O=x(A);O&&(R.sort=O)}const{label:I,name:B,location:L,show:V,indexCode:q,indexCodeNum:N,calcType:T="COLUMN",builtInFormula:M,builtInValueSource:S,builtInCalcWay:C,formula:D,conditions:k,aggregate:F,distinct:$,dimByCount:G,dataTo:j}=A;let U;if(k&&(U=b(k)),T==="COMPONENT"){const O={};return m(O,S),{label:I.trim(),columnName:B,show:V,calcType:T,componentAlias:C,componentValue:O.fieldValue||null}}const H={label:I.trim(),columnName:B,location:L,show:V,calcType:j==="1"?"VIEW":T,hrpIndexCode:q,hrpIndexCodeNum:N,aggregate:F,builtInFormula:M,builtInValueSource:S,formula:D,conditions:U};if(M==="DATE_OFFSET"){const O=C.split("-");if((O==null?void 0:O.length)===3){let K=O[0];return O[2]==="before"&&O[0]!=="0"&&(K=`-${O[0]}`),{...H,calcWays:[K],dateCalcTypes:[O[1]]}}}else return B==="the_count"&&(H.calcType="AGGREGATE",H.distinct=!!$,H.typeGuid=G),{...H,builtInCalcWay:C}},y=A=>{if(!A)return[];const R=lodashEs.cloneDeep((A==null?void 0:A.controlList)||[]).filter(F=>F.conditionKey!=="parentCode"),{classificationList:I=[],rowHeaderList:B=[],dimensionList:L=[],seriesList:V=[],leftAxisList:q=[],rightAxisList:N=[],queryColumnList:T=[],indicators:M=[]}=A;w(R);const S=[...I,...B,...L,...V,...q,...N,...T,...M],C=[];for(const F of S){const $=getConditions((F==null?void 0:F.conditions)||[]);if($!=null&&$.length){const G=$.filter(j=>(j==null?void 0:j.dataType)==="component").map(j=>{const U={};return j!=null&&j.dateFormat&&(U.format=j.dateFormat),j.fieldValue==="PARENT"&&(U.id="PARENT",U.keyName=j.modelKey,U.modelKey=j.modelKey,U.prop=j.prop),{conditionKey:j.fieldName,conditionLabel:j.fieldName,conditionName:j.fieldName,conditionValueType:j.fieldType,id:j.componentId,keyName:j.fieldValue,rule:j.rule,notGlobal:!0,indexCode:j.indexCode,typeGuid:j.typeGuid,indexCodeNum:j.indexCodeNum,...U}});if(G!=null&&G.length)for(const j of G)C.find(U=>U.keyName===j.keyName)||C.push(j)}}const D=C.length,k=R;for(let F=0;F<D;F++){const $=C[F];if(($==null?void 0:$.conditionKey)==="parentCode")continue;const{id:G,keyName:j,prop:U,format:H,modelKey:O,dataType:K="component",customValue:Y}=$,Q=d($);m(Q,G,{prop:U,dateFormat:H,modelKey:O,keyName:j}),K===""&&(Q.fieldValue=Y||""),k.push(Q)}for(let F=k.length-1;F>=0;F--){const $=k[F];$.globalCondition||getConditions(k).find(j=>j.alias===$.alias&&j.globalCondition)&&k.splice(F,1)}return k};function d(A){const{id:R,keyName:I,conditionLabel:B,conditionKey:L,conditionValueType:V,prop:q,rule:N="NONE",notGlobal:T=!1,indexCode:M,typeGuid:S,indexCodeNum:C,dataType:D="component"}=A;let k=I||R;k&&q&&(k+=`-${q}`);let F=N;return F==="NONE"&&(["startTime","endTime"].includes(q)?F=q==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":I!=null&&I.includes("startTime")?F=q==="GREATER_EQUAL":I!=null&&I.includes("endTime")?F=q==="LESS_EQUAL":F="EQUAL"),R==="PARENT"&&(k=A.modelKey,k&&q&&(k+=`-${q}`),F=N),{rule:F,label:B,fieldName:L,fieldValue:"",valueType:V,alias:k,globalCondition:!T,indexCode:M,typeGuid:S,indexCodeNum:C,dataType:D}}const g=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function w(A){if(A!=null&&A.length)for(const R of A)if(R!=null&&R.conditions)w(R.conditions);else{const{id:I,keyName:B,prop:L,modelKey:V,format:q,dataType:N="component",customValue:T}=R,M=d(R);m(M,I,{prop:L,dateFormat:q,modelKey:V,keyName:B}),N===""&&(M.fieldValue=T||"");for(const S in M)R[S]=M[S];for(const S of g)delete R[S]}}function p(A){const R=[];if(A!=null&&A.length){for(const I of A)if(I.variableName){const B={variateName:I.variableName,globalCondition:!1,valueType:I.variableType,alias:I.keyName||""};m(B,I.id,{dateFormat:I.format,prop:I.dateTypeValue,keyName:I.keyName,operateType:I.operateType,operateMode:I.operateMode,operateValue:I.operateValue}),I.dataType===""&&(B.fieldValue=I.variableValue),I.format&&(B.dateFormat=I.format),I.label&&(B.label=I.label),R.push(B)}}return R}function m(A,R,I){const{prop:B="",dateFormat:L="",modelKey:V="",keyName:q="",operateValue:N,operateMode:T,operateType:M}=I||{},S=V||q;if(R==="PARENT"&&S&&B){const U=window.config.record;if(U&&U[S]){const H=vue.unref(U[S][B]);dayjs.isDayjs(H)?A.fieldValue=H.format(L||"YYYY-MM-DD"):A.fieldValue=H}return}const C=s(R)||{},{value:D,format:k="YYYY-MM-DD",type:F="",useCurrentTime:$,RECORD:G}=C||{},j=L||k;if(lowerCaseIncludes(C.type,"date")){let U;if($?D?U=vue.unref(D):U=dayjs():U=vue.unref(D),N&&T&&M)switch(M){case"add":U=U.add(N,T);break;case"minus":U=U.subtract(N,T);break}A.fieldValue=U==null?void 0:U.format(j),A.dateFormat=j}else if(F==="ecanRangePicker"){let U=B;if(!B){const O=q&&q.split("-");O!=null&&O.length&&(U=O[O.length-1])}if(!U)return;let H=null;if(vue.unref(C[U])&&(H=dayjs(vue.unref(C[U]))),N&&T&&M){if(N==="rangeValue"){if(C.startTime&&C.endTime){const O=vue.unref(C.endTime).diff(vue.unref(C.startTime),T)+1;switch(M){case"add":H=H&&H.add(O,T);break;case"minus":H=H&&H.subtract(O,T)}}}else if(!isNaN(+N))switch(M){case"add":H=H&&H.add(N,T);break;case"minus":H=H&&H.subtract(N,T)}}if(H&&(A.fieldValue=H==null?void 0:H.format(j)),U==="rangeValue"&&C.startTime&&C.endTime){const O=getFormatStep(j);O&&(A.fieldValue=vue.unref(C.endTime).diff(vue.unref(C.startTime),O)+1)}A.dateFormat=j}else lowerCaseIncludes(F,MODEL_KEY_LIST)?V&&G?A.fieldValue=G[V]:!V&&G?A.fieldValue=G.value:A.fieldValue=vue.unref(D):A.fieldValue=vue.unref(D)}const v=A=>{var R;if(A){const I=Array.isArray(A)?lodashEs.cloneDeep(A):[lodashEs.cloneDeep(A)];let B="",L=[];const V=[],q=[],N=[];for(const T of I){if(T.defaultCode&&(T.label=T.columnName,delete T.defaultCode),T.type==="CUSTOM"&&(L=T.customOrderColumns),B=T.type,V.push(T.label),(R=T.columnName)!=null&&R.includes("_ecanrepeat_")){const M=T.columnName.split("_ecanrepeat_");q.push(M[0])}else q.push(T.columnName);N.push(T.order)}return B!=="CUSTOM"&&(V==null?void 0:V.length)>1&&(B="COMBINATION"),B==="CUSTOM"?{label:V.join(","),columnName:q.join(","),type:B,customOrderColumns:L}:{label:V.join(","),columnName:q.join(","),order:N.join(","),type:B}}else return A},x=A=>{const{sortCpnts:R=[]}=A;let I,B="";for(const L of R){const V=s(L)||{},{type:q,RECORD:N}=V;if(lowerCaseIncludes(q,"image")&&lowerCaseIncludes(N==null?void 0:N.value,["asc","desc"])){B=N.value.toUpperCase();break}}return B&&(I={label:A.label,columnName:A.name,order:B,type:"NORMAL"}),I},E=async(A={})=>{var ye,be,Ce,Pe,Se,Te;e.isViewRedrawing&&r.value.clear(),o(e.id,!1);const{graphicConfig:R,type:I,isGroupTable:B=!1}=e;let{source:L,dataViewId:V,plugin:q="1",layer:N,chartType:T,classificationList:M=[],rowHeaderList:S=[],dimensionList:C=[],seriesList:D=[],leftAxisList:k=[],rightAxisList:F=[],queryColumnList:$=[],indicators:G=[],controlList:j=[],formFields:U={},variableList:H=[],variableConditions:O=[],idxLibMode:K,preview:Y=!1,edvDataSetId:Q}=R||{},J=[];if((R==null?void 0:R.pageMode)==="design"?(J=(R.sqlConditions??[]).map(de=>{const pe={};if(!u(de,"globalCondition")&&!de.join&&(pe.globalCondition=!0),!de.join){const ve=de.rule||"EQUAL";pe.rule=ve==="NONE"?"EQUAL":ve}return{...de,...pe}}),O!=null&&O.length&&(J=J.concat(O))):(J=y(R),H!=null&&H.length&&(J=J.concat(p(H)))),J!=null&&J.length){const de=J.filter(ve=>ve.globalCondition),pe=J.filter(ve=>!ve.globalCondition);(de==null?void 0:de.length)>1&&(J=[{join:"&&",conditions:de},...pe])}J!=null&&J.length&&(J=b(J,"1")),N==null&&(lowerCaseIncludes(I,["table"])||lowerCaseIncludes(I,["list","circulate"])&&(M==null?void 0:M.length)>1?N="1":lowerCaseIncludes(I,["select","checkbox","radio"])?N="3":N="2");let Z;const W=[];let ee="";if(Array.isArray(M)&&M.length>0&&(!["ecanList","ecanCirculate"].includes(I)||(M==null?void 0:M.length)===1)){const de=M.length;for(let pe=0;pe<de;pe++){const ve=M[pe]||{},{label:_e="",name:ke="",show:De=!1,sort:Fe,customGroup:Re,conditions:Le,dateFormat:Ie,typeGuid:Ve="",truncations:Oe=[]}=ve;if(De||de===1){ee=Ve,Z={label:_e.trim(),columnName:ke,show:De,sort:x(ve)||v(Fe)||Fe,customGroup:Re,conditions:b(Le),typeGuid:Ve},Ie&&(Z.dateFormat=Ie),ke==="the_date"&&!Z.dateFormat&&(Z.dateFormat="YYYY-MM");const X={};if(Array.isArray(Oe)&&Oe.length>0){const te=Oe.length;for(let re=0;re<te;re++){const le=Oe[re]||{},{rule:ue="",num:ce=0,name:oe=""}=le;ue&&ce&&(X.num=ce,X.rule=ue,oe&&(X.otherGroupName=oe))}}if((ye=Object.keys(X))!=null&&ye.length&&(Z.truncation=X),lowerCaseIncludes(I,"scatter"))W.push(Z);else break}}}let ne;if(Array.isArray(D)&&D.length>0){const de=D.length;for(let pe=0;pe<de;pe++){const ve=D[pe]||{},{label:_e="",name:ke="",show:De=!1,sort:Fe,customGroup:Re,conditions:Le,typeGuid:Ie}=ve;if(De||de===1){ne={label:_e.trim(),columnName:ke,show:De,sort:v(Fe),customGroup:Re,conditions:b(Le),typeGuid:Ie};break}}}const ie=[];k==null||k.forEach(de=>{de.location="LEFT",ie.push(f(de,Z))}),F==null||F.forEach(de=>{de.location="RIGHT",ie.push(f(de,Z))}),G==null||G.forEach(de=>{de.location="LEFT",ie.push(f(de,Z))});const ae=[];["ecanList","ecanCirculate"].includes(I)&&(M==null?void 0:M.length)>1&&($=M),$==null||$.forEach(de=>{const{label:pe,name:ve,location:_e,show:ke,indexCode:De,sort:Fe,typeGuid:Re,indexCodeNum:Le,dateFormat:Ie,conditions:Ve}=de;let Oe=v(Fe);if(A.sort){const{field:te,order:re}=A.sort;let le=ie.find(ue=>ue.label===te);!le&&pe===te&&(le=de),le&&(Oe={columnName:le.columnName,label:A.sort.field,order:re.toUpperCase(),type:"NORMAL"})}const X={label:pe,columnName:ve,location:_e,show:ke,sort:Oe,calcType:"COLUMN",hrpIndexCode:De,hrpIndexCodeNum:Le,conditions:b(Ve),typeGuid:Re};Ie&&(X.dateFormat=Ie),ve==="the_date"&&!X.dateFormat&&(X.dateFormat="YYYY-MM"),ae.push(X)});const se=[];let fe=[];if(Array.isArray(S)&&S.length>0?fe=S:Array.isArray(C)&&C.length>0&&(fe=C),fe!=null&&fe.length){const de=fe.length;for(let pe=0;pe<de;pe++){const ve=fe[pe]||{},{label:_e="",name:ke="",show:De=!1,sort:Fe,customGroup:Re,conditions:Le,truncations:Ie,typeGuid:Ve="",dateFormat:Oe}=ve;let X=v(Fe);if(A.sort){const{field:le,order:ue}=A.sort;let ce=ie.find(oe=>oe.label===le);!ce&&ve.label===le&&(ce=ve),ce&&(X={columnName:ce.columnName,label:A.sort.field,order:ue.toUpperCase(),type:"NORMAL"})}const te={label:_e.trim(),columnName:ke,show:De,sort:X,customGroup:Re,conditions:b(Le),typeGuid:Ve};Oe&&(te.dateFormat=Oe),ke==="the_date"&&!te.dateFormat&&(te.dateFormat="YYYY-MM");const re={};if(Array.isArray(Ie)&&Ie.length>0){const le=Ie.length;for(let ue=0;ue<le;ue++){const ce=Ie[ue]||{},{rule:oe="",num:me=0,name:ge=""}=ce;oe&&me&&(re.num=me,re.rule=oe,ge&&(re.otherGroupName=ge))}}(be=Object.keys(re))!=null&&be.length&&(te.truncation=re),se.push(te)}}if(lowerCaseIncludes(I,["text","proportion","counter"])&&(T="zb"),B){if(se.length===0||ie.length===0)return;T="grouptable"}else{if(N==="1"&&ae.length===0)return;if(N==="2"&&ie.length===0)return;if(N==="3"&&(!ee||!U.labelField||!U.valueField))return;if(N==="3"&&I==="ecanDataSelect"&&ie.length===0)return}C!=null&&C.length&&(N="1",T="grouptable");let he=l||((Ce=window==null?void 0:window.config)==null?void 0:Ce.pageId);if(!he){const{pathname:de}=window==null?void 0:window.location;if(de){const pe=de.split("/");pe!=null&&pe.length&&(he=pe[pe.length-1])}}if(I!=="ecanScatter"&&((Pe=Object.keys(U))!=null&&Pe.length)){const de=getConditions(j).find(ve=>ve.conditionKey==="parentCode"),pe={};if(de){const ve=s(de.id)||{};if(ve!=null&&ve.itemCodes)pe.parentItemCodes=ve.itemCodes;else return}I==="ecanDataSelect"&&(pe.indicatorList=ie.filter(ve=>ve.show));try{const ve=await request.post(`${INDICATOR_URL}/diagram/formData`,{source:L,dataViewId:V,plugin:"4",layer:N,chartType:"normalSelect",rangeIndexTypeGuid:ee,type:I==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:U.labelField,valueField:U.valueField,pageId:he,sqlConditions:J,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...pe},{headers:{Authentication:(Se=window==null?void 0:window.config)==null?void 0:Se.indicatorToken,operateContext:CONTEXT}});return A!=null&&A.isTimer&&n(ve),ve}catch(ve){console.error(ve)}finally{}}else try{let de={};lowerCaseIncludes(I,"scatter")?de={classifications:W}:de={classification:Z};const pe=await request.post(`${INDICATOR_URL}/diagram`,{source:L,dataViewId:V,plugin:q,layer:N,chartType:T,...de,series:ne,indicatorList:ie,queryColumns:B?[]:ae,pageFlag:!0,pageId:he,edvDataSetId:Q||"",sqlConditions:J.map(ve=>{const{fieldValue:_e}=ve,ke={};return _e&&Array.isArray(_e)&&(ke.fieldValue=JSON.stringify(_e)),{...ve,...ke}}),idxLibMode:K,preview:Y,rowHeaders:se,keyName:e.keyName},{headers:{Authentication:(Te=window==null?void 0:window.config)==null?void 0:Te.indicatorToken,operateContext:CONTEXT}});return A!=null&&A.isTimer&&n(pe),pe}catch(de){console.error(de)}finally{}},_=vue.unref(i)!=="design"&&((P=e==null?void 0:e.graphicConfig)==null?void 0:P.pageMode)!=="design"&&e.isOpenRequestTimer&&e.requestInterval&&setInterval(()=>{E({isTimer:!0})},e.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(_)}),E},useHrefParamsToGlobalVariables=()=>{const r=window.location.search.slice(1).split("&"),n=r.length,i={};for(let a=0;a<n;a++){const o=r[a];if(o==null||o==="")continue;const s=o.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(i[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...i},window.config={...window.config,...i}},_sfc_main$s=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""}},setup(e){const{width:r,height:n}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),i=vue.inject("setPageHeight",x=>{}),a=vue.inject("isMobile",!1),o=vue.computed(()=>{const x={};return a||(x.width=r.value,x.height=n.value),{...x,backgroundColor:e.backgroundColor,backgroundImage:useImagePath(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=vue.ref(0),l=vue.ref(0),c=vue.ref(0),u=vue.ref(0),h=vue.ref(!1),b=vue.ref();let f;const y=()=>new Promise(x=>{vue.nextTick(()=>{r.value&&n.value?(s.value=parseFloat(r.value),l.value=parseFloat(n.value)):(s.value=b.value.clientWidth,l.value=b.value.clientHeight),(!c.value||!u.value)&&(c.value=window.screen.width,u.value=window.screen.height),x()})}),d=()=>{s.value&&l.value?(b.value.style.width=`${s.value}px`,b.value.style.height=`${l.value}px`):(b.value.style.width=`${c.value}px`,b.value.style.height=`${u.value}px`)};vue.watch([r,n],async()=>{e.pageId||(await y(),d(),w(),window.addEventListener("resize",p),m()),h.value=!0},{immediate:!0});const g=vue.ref({});vue.provide("scaleValue",g);const w=()=>{if(a){b.value.style.width="100%",b.value.style.height="auto",i("auto");return}const x=document.body.clientWidth,E=document.body.clientHeight,_=s.value||c.value,P=l.value||u.value,A=x/_;let R=E/P;(s.value!==1920||l.value!==1080)&&(R=l.value/s.value*x/P),g.value={widthScale:A,heightScale:R},b.value&&(b.value.style.transform=`scale(${A}, ${R})`),i(R)},p=lodashEs.debounce(async()=>{await y(),w()},100),m=()=>{const x=window.MutationObserver;f=new x(p),f.observe(b.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},v=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return vue.onMounted(()=>{h.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",p),v()}),{style:o,container:b,ready:h}}}),PageConfig_vue_vue_type_style_index_0_scoped_3fe72c34_lang="",_hoisted_1$g={id:"container",ref:"container"};function _sfc_render$x(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[e.ready||e.pageId?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",style:vue.normalizeStyle(e.style)},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)):vue.createCommentVNode("",!0)],512)}const PageConfig=_export_sfc$1(_sfc_main$s,[["render",_sfc_render$x],["__scopeId","data-v-3fe72c34"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[]},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$r=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...providerConfigComponentProps,pageId:{type:String,default:""}},setup(e,{expose:r,emit:n}){e.pageId||useHrefParamsToGlobalVariables();const i=vue.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=vue.ref(),o=()=>{a.value.setAttribute("datav-theme",e.theme)},s=vue.inject("usedComponentList",[]),l=vue.inject("componentList",[]),c=vue.computed(()=>{const W=[];for(const ee of vue.unref(s))ee.type==="ecanModal"?W.push(...ee.componentList):W.push(ee);return W});vue.watch(()=>e.theme,()=>{o()}),vue.onMounted(()=>{o()});const u=vue.computed(()=>useVariablesInText(e.contextRequestUrl)),h=vue.computed(()=>e.pageMode),b=vue.computed(()=>e.theme),f=vue.computed(()=>e.width),y=vue.computed(()=>e.height),d=vue.computed(()=>e.pageFontFamily),g=vue.computed(()=>{const W=[],ee=vue.unref(l).filter(ne=>ne.type==="ecanModal");for(const ne of ee)ne!=null&&ne.requestList&&W.push(...ne.requestList);return[...W,...e.requestList]}),w=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:u,pageMode:h,theme:b,touchEventId:w,width:f,height:y,fontFamily:d,requestList:g});const p=vue.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",W=>{let ee=W;i.value||(ee=parseFloat(y.value)*W+"px"),p.value.height=ee}),vue.provide("isMobile",i.value),vue.provide("getContainerMap",()=>e.containerMap),vue.provide("getCombinationMap",()=>e.combinationMap),vue.provide("templateOperate",{pageId:e.pageId,templateEmit:n,setTemplateData:W=>{var ee;if(W!=null&&W.pageId){const{componentId:ne,...ie}=W;(ee=window.config)!=null&&ee.urlParams||(window.config.urlParams={}),window.config.urlParams[W.pageId]=ie,n("templateChange",W)}}});const m=vue.ref(),v=new Map,x=W=>v.get(W),E=(W,ee)=>{var ne;if(m.value=ee,v.set(W,ee),!e.pageId){const ie=vue.unref(s).find(ae=>ae.id===W);ie&&((ne=window.config)!=null&&ne.record||(window.config.record={}),window.config.record[ie.keyName]=ee)}},_=()=>{m.value=null},P=W=>{let ee=W;if(ee){const ne=W.match(/\{(.+?)\}/g);if(ne!=null&&ne.length){let ie=ne[0].slice(1,-1).trim();const ae=ie.match(/\[(.+?)\]/g);let se="";ae!=null&&ae.length&&(ie=ie.replace(ae[0],""),se=ae[0].slice(1,-1).trim());const fe=vue.unref(c).find(he=>he.keyName===ie);if(fe){const he=x(fe.id),{type:ye,value:be,RECORD:Ce,recordData:Pe}=he||{};lowerCaseIncludes(ye,MODEL_KEY_LIST)?ee=Ce[se]:lowerCaseIncludes(ye,"select")?ee=Pe[se]:lowerCaseIncludes(ye,["rangePicker","date"])?dayjs.isDayjs(vue.unref(he[se]))?ee=vue.unref(he[se]).format(he.format):ee=vue.unref(he[se]):ee=be}else ee=""}}return ee},A=new Map,R={},I=async(W,ee)=>{var fe;const{requestName:ne}=W,ie=await useRequestData({...W,projectRequestUrl:vue.unref(u),getModel:x})(),ae=((fe=ie==null?void 0:ie.data)==null?void 0:fe.data)||{},se=A.get(ne);if(se!=null&&se.length&&(!ee||R[ne])){for(const he of se)he(ae);ee||A.delete(ne)}},B=(W,ee)=>{R[W]&&(clearInterval(R[W]),delete R[W],A.delete(W));const ne=vue.unref(c).filter(ae=>!ae.openCustomRequestData&&ae.customRequestName===W),ie=A.get(W)||[];if((ne==null?void 0:ne.length)>ie.length&&(ie.push(ee),A.set(W,ie),(ne==null?void 0:ne.length)===ie.length)){const ae=vue.unref(g).find(se=>se.requestName===W);ae&&(ae!=null&&ae.isOpenRequestTimer&&(ae!=null&&ae.requestInterval)?(I(ae,!0),R[W]=setInterval(()=>{I(ae,!0)},ae.requestInterval*1e3)):I(ae))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:x,setGlobalModel:E,clearInteractiveData:_,getRecordValueByKeyName:P,hanldePageRequestData:B,interactiveData:m});const L=vue.ref({}),V=(W,ee)=>{L.value[W]=ee};vue.provide(LOADED_DATA,{loadedData:L,setLoadedData:V});const q=[],N=()=>{q.pop()},T=W=>{q.push(W)},M=new Map,S=W=>M.get(W),C=(W,ee)=>{M.set(W,ee)};vue.provide(MODAL_MODEL,{popUseModalIds:N,pushUseModalIds:T,getModalModel:S,setModalModel:C});const D=mitt(),k=new Set,F=(W,ee)=>{k.add(W),D.on(W,ne=>{const{eventName:ie,params:ae}=ne;return typeof ee[ie]=="function"&&ee[ie](ae)}),vue.onBeforeUnmount(()=>{$(W)})},$=W=>{k.delete(W),D.off(W)},G=(W,ee,ne={})=>{if(W==="PAGE"){const ie=q.length;let ae=[];if(ie===0)ae=[...k];else{const se=q[ie-1];ae=[...S(se)]}ae.forEach(se=>{D.emit(se,{eventName:ee,params:ne})})}else D.emit(W,{eventName:ee,params:ne})};vue.provide(EVENT_BUS,{onEvent:F,offEvent:$,emitEvent:G});const j=vue.ref(0),U=()=>{j.value=vue.unref(j)+1};vue.provide(GLOBAL_TOKEN,{requestToken:U});const H=new Map,O=new Map,K=({requestFn:W=()=>{},sortNum:ee=0,id:ne=""})=>{if(H.has(ee)){const ie=H.get(ee);ie==null||ie.push(W)}else H.set(ee,[W]);O.set(ne,W)},Y=W=>new Promise((ee,ne)=>{const ie=W.map(ae=>ae());Promise.all(ie).then(ae=>{ee(ae)}).catch(ae=>{ne(ae)})}),Q=W=>new Promise(async(ee,ne)=>{if(W){if(typeof W=="string"){const ie=O.get(W);if(typeof ie=="function"){const ae=request.interceptors.response.use(se=>(ee(se),se),se=>(ne(se),Promise.reject(se)));ie(),request.interceptors.response.eject(ae)}}}else{const ie=Array.from(H);ie.sort((se,fe)=>fe[0]-se[0]);const ae=ie.length;try{e.pageMode!=="design"&&vue.unref(j)>0;for(let se=0;se<ae;se++){const fe=ie[se][1];await Y(fe)}}catch(se){console.error(se)}finally{H.clear(),ee(null)}}});vue.provide(REQUEST_MODEL,{setRequest:K,touchRequest:Q});const J=()=>{D.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:J});const Z=W=>{D.on(REFRESH_PAGE,()=>W()),vue.onMounted(()=>{D.off(REFRESH_PAGE)})};return vue.watchEffect(()=>{var W;if((W=vue.unref(s))!=null&&W.length&&vue.unref(h)!=="design"){const{jumpType:ee,jumpTime:ne,jumpPage:ie,jumpLink:ae}=e;if(ne!=null&&ne.value){let se=0;switch(ne==null?void 0:ne.suffix){case"hours":se=ne.value*60*60*1e3;break;case"minute":se=ne.value*60*1e3;break;case"seconds":se=ne.value*1e3;break}setTimeout(()=>{let fe="";ee==="page"&&ie?fe=usePageUrl(vue.unref(h),ie):ee==="link"&&ae&&(fe=ae),fe=useVariablesInText(fe),window.open(fe,"_self")},se)}}}),vue.onBeforeUnmount(()=>{H==null||H.clear(),O==null||O.clear()}),r({touchRequest:Q,getGlobalModel:x,onRefreshPage:Z,emitEvent:G,props:e}),{providerConfig:a,configStyle:p}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_e581716a_lang="";function _sfc_render$w(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:vue.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ProviderConfig=_export_sfc$1(_sfc_main$r,[["render",_sfc_render$w],["__scopeId","data-v-e581716a"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props,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:[],exceedConfig:"",targetTemplate:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="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=",goDown="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==",__default__$4=vue.defineComponent({name:"EcanText",components:{Skeleton},props:{...textComponentProps},setup(e,{expose:r}){const n=vue.ref(!1),i=usePickComponentStyle(e),a=vue.ref({}),o=vue.computed(()=>e.variableFontSize||"14px"),s=vue.computed(()=>"-"+vue.unref(o)),l=C=>{var D,k;if(e.showAnimation){const F=e.text.match(/\{(.+?)\}/g)||[];if(F!=null&&F.length){const $=(D=F[0].slice(1,-1))==null?void 0:D.trim();if(vue.unref(a)[$]===C){a.value=C;return}const G=+C[$];let j=0;if(isNaN(G))a.value=C;else{String(G).includes(".")&&(j=((k=String(G).split(".")[1])==null?void 0:k.length)||0);const U=Math.abs(G)*Math.pow(10,j),H=String(U).length;let O=[];for(let Y=0;Y<5;Y++){const Q=Math.ceil(Math.random()*(U+1)-1);O.includes(Q)||O.push(Q)}O.sort((Y,Q)=>Y-Q),O=O.map(Y=>{const Q=String(Y).split("").reverse(),J=[];for(let Z=0;Z<H;Z++)Q&&Q[Z]?J.push(Q[Z]):J.push("0");return j&&J.splice(j,0,"."),(G<0?"-":"")+J.reverse().join("")}),O.push(G);let K=0;for(const Y of O)setTimeout(()=>{a.value={...vue.unref(a),[$]:Y}},K*1e3),K+=.1}}else a.value=C}else a.value=C};vue.watch(()=>[e.data,e.dataType],([C,D])=>{D==="static"&&l(C)},{immediate:!0});const{getGlobalModel:c,setGlobalModel:u,getRecordValueByKeyName:h,hanldePageRequestData:b}=vue.inject(GLOBAL_MODEL,{getGlobalModel:C=>{},setGlobalModel:(C,D)=>{},getRecordValueByKeyName:C=>{},hanldePageRequestData:(C,D)=>{}}),{setLoadedData:f}=vue.inject(LOADED_DATA,{setLoadedData:(C,D)=>{}}),{setTemplateData:y}=vue.inject("templateOperate",{setTemplateData:C=>{}}),d=vue.computed(()=>{let C="";if(e.gradientShow){const{gradientColor:D,gradientOffset:k,gradientAngle:F,color:$}=e;C+=`background: linear-gradient(${F}, ${$}, ${D||"transparent"} ${k*100}%);-webkit-background-clip: text;color: transparent;`}return C}),g=vue.computed(()=>{const C={};if(e.gradientShow){const{gradientColor:D,gradientOffset:k,gradientAngle:F,color:$}=e,G=D||"transparent";C.background=`linear-gradient(${F}, ${$}, ${G} ${k*100}%)`,C["-webkit-background-clip"]="text",C.color="transparent"}return C}),w=vue.computed(()=>{const C={};return e.linkPage&&(C.cursor="pointer",C.userSelect="none"),C}),p=vue.ref(1),m=vue.computed(()=>{var U;if(vue.unref(n))return"NaN";if(!p.value)return;const C=vue.unref(a),D=e.increaseColor||e.color,k=e.declineColor||e.color;let F=e.text;F=F==null?void 0:F.replace(/\n|\\n/g,"<br/>"),F=F==null?void 0:F.replace(/\s(?!\{) | (?!\})\s/g,"&nbsp;");const $=F.match(/\{(.+?)\}/g)||[];let G="",j="";if(e.exceedConfig==="wrap"?j="show-wrap":e.exceedConfig==="ellipsis"&&(j="show-ellipsis"),$==null||$.length===0){if(F&&e.format==="percentage"&&!isNaN(+F)){const H=parseFloat(F),O=H*100,K=v(O.toFixed(2));H>=0?F=`<span class="${j}" style="color: ${K||D||"#ED6643"};font-size:${vue.unref(o)};display: inline-block;${vue.unref(d)}">
99
+ `;let o=e;if(n!=null&&n.length){for(const l of n){const c=useVariablesInText(l,{textData:r},{useNewline:!1,useSpace:!1});c&&(o=o.replace(l,c))}return`${a}{text|${o}}`}else return e},setDefaultRangeVal=(e,r)=>{const{props:n,componentList:i,getGlobalModel:a}=e,{graphicConfig:o={},startValue:s,endValue:l}=n,c=getdefCompleteData({graphicConfig:o,startValue:s,endValue:l,componentList:i,getGlobalModel:a}),{dimensions:u,dataset:h}=r,{classificationList:b=[]}=o,y=b.find(d=>d.show).label||"";for(const d of c)u.includes(d)||u.push(d);u.sort((d,g)=>dayjs(d).isBefore(dayjs(g))?-1:1);for(const d of h){const{data:g}=d;if(g!=null&&g.length){const w=[];for(const p of c)if(g.find(m=>m[y]!==p)){const m=lodashEs.cloneDeep(g[0]);for(const v in m)v===y?m[v]=p:m[v]=0;w.push(m)}d.data.push(...w),d.data.sort((p,m)=>dayjs(p[y]).isBefore(dayjs(m[y]))?-1:1)}}},getConditions=e=>{const r=[];for(const n of e)n.conditions?r.push(...getConditions(n.conditions)):(n==null?void 0:n.dataType)==="component"&&r.push(n);return r};function getdefCompleteData(e){const{startValue:r,endValue:n,componentList:i,graphicConfig:a,getGlobalModel:o}=e,s=getVariableAndField(r),l=getVariableAndField(n),c=[];if(s&&l){const u=i.find(b=>b.keyName===s.keyName),h=i.find(b=>b.keyName===l.keyName);if(u&&h){const b=o(u.id),f=o(h.id),{classificationList:y=[]}=a,d=y.find(g=>g.show);if(d){let g="YYYY-MM";switch(d.name){case"the_year":g="YYYY";break;case"the_month":g="MM";break;case"the_day":g="DD";break;case"the_date":g=(d==null?void 0:d.dateFormat)||g;break}const w=getFormatStep(g);if(g){const p=vue.unref(b[s.field]),m=vue.unref(f[l.field]);let v=dayjs(p);const x=dayjs(m);for(c.push(x.format(g));v.isBefore(x);)c.push(v.format(g)),v=v.add(1,w)}}}}return c}function getVariableAndField(e){let r=null;if(e){const n=e.match(/\{(.+?)\}/g);if(n!=null&&n.length){let i=n[0].slice(1,-1).trim();const a=i.match(/\[(.+?)\]/g);let o="";a!=null&&a.length&&(i=i.replace(a[0],""),o=a[0].slice(1,-1).trim()),r={keyName:i,field:o}}}return r}function getFormatStep(e){const r=e.split("-");let n="";if(r!=null&&r.length)switch(r[r.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}function handleJumpLink(e,r){var b;const{pageMode:n,targetTemplate:i,getRecordValueByKeyName:a,setTemplateData:o}=r,s=e.linkPage||"",l=usePageUrl(n,s),c=e.href;let u=c||l;u=useVariablesInText(u);const h=e.target;if(h)if(h==="event")window.parent.postMessage({type:"openPage",url:c},"*");else{const f={pageId:s,componentId:i};if((b=e.transParams)!=null&&b.length){u.includes("?")?u+="&":u+="?";const y=[];for(const d of e.transParams){const g=a(String(d.fieldName));y.push(`${d.keyName}=${g}`),f[d.keyName]=g}u+=y.join("&")}h==="template"?o(f):(h==="blank"&&(u+=`${u.includes("?")?"&":"?"}drillFlag=1`),window.open(u,"_"+h))}}function getPageUrlParams(e){var n,i;let r={};if(e){const a=(((n=window.config)==null?void 0:n.urlParams)||{})[e]||{};for(const o in a)o.includes("{")||(r[o]=a[o])}else r=((i=window.config)==null?void 0:i.requestParams)||{};return r}const runCode=(e,r)=>{const n={dayjs,...r};let i="";const a=[];for(const l in n)i+=`${l},`,a.push(n[l]);i=i.replace(/,$/,"");const o=`function (${i}){return ${e}}`;let s;try{s=Function(`"use strict";return (${o})`)()(...a)}catch{return e}return s},useVariablesInText=(e="",{textData:r,codeData:n}={},{useNewline:i=!1,useSpace:a=!1}={})=>{const s={...window.config||{},...r},l=e.match(/\{(.+?)\}/g);if(l==null||l.length===0)return e;for(let c=0;c<l.length;c++){const u=l[c];let h=u.slice(1,-1).trim();const b=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=h.match(b);for(let y=0;y<f.length;y++){const d=f[y],g=s[d];g!=null&&typeof g!="function"&&(h=h.replace(d,g))}(/\(.*\)/g.test(h)||/[+/\\*]/g.test(h))&&(h=runCode(h,n)),e=e.replace(u,h)}return i&&(e=e==null?void 0:e.replace(/\n|\\n/g,"<br/>")),a&&(e=e==null?void 0:e.replace(/\s{2,}?/g,"&nbsp;&nbsp;")),e},useRequestData=(e,r,n=()=>{})=>{const{requestUrl:i,requestMethod:a,requestHeaders:o,requestParams:s,requestInterval:l,isViewRedrawing:c,isOpenRequestTimer:u,openCustomRequestData:h,projectRequestUrl:b="",getModel:f,requestParamsMode:y,customRequestParams:d,dataSetParam:g,requestType:w,dataType:p}=e;console.log(e,"props");const{pageMode:m}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"})||{},{pageId:v}=vue.inject("templateOperate",{pageId:""})||{},{contextRequestUrl:x,touchEventId:E}=vue.inject(GLOBAL_CONFIG,{contextRequestUrl:"",touchEventId:""})||{},{getGlobalModel:_}=vue.inject(GLOBAL_MODEL,{getGlobalModel:B=>{}})||{},P=f||_,A=useVariablesInText(i),R=async(B={})=>{var C;if(p!=="request"&&I){clearInterval(I);return}if(!A||!a||!o)return;let L={};for(const D of s){const{key:k,value:F}=D;if((F==null?void 0:F.id)==="PARENT"&&(F!=null&&F.prop)){const G=(((C=window.config)==null?void 0:C.record)||{})[F.prop];if(G){const j=G[F.propKey||"value"];j&&(["date","range"].some(H=>lowerCaseIncludes(G==null?void 0:G.type,H))?L[k]=vue.unref(j).format(G.format||"YYYY-MM-DD"):L[k]=vue.unref(j))}continue}if(c&&e.dataType!=="indicator"&&r.value.clear(),typeof F=="object"&&F!=null&&F.id){let $={};const{id:G,prop:j,propKey:U,operate:H}=F;let O=!1;try{JSON.parse(G),O=!0}catch{O=!1}G==="THIS"?$=P(vue.unref(E))||{}:$=P(G)||{};const K=vue.unref($[j]);let Y=null;if(["date","range"].some(J=>lowerCaseIncludes($==null?void 0:$.type,J))){const{value:J,type:Z,mode:W}=H||{};if(J&&Z&&W)switch(Z){case"add":Y=vue.unref(K).add(J,W);break;case"minus":Y=vue.unref(K).subtract(J,W);break}Y==null&&(Y=vue.unref(K)),Y=(Y==null?void 0:Y.format((U==null?void 0:U.trim())||$.format))||""}else if(Object.prototype.toString.call(K)==="[object Object]")U?Y=K[U]:Y=j?K[j]:K;else if(lowerCaseIncludes($==null?void 0:$.type,"select")&&vue.unref(K)&&j&&Array.isArray(vue.unref(K)))Y=vue.unref(K).map(J=>Object.prototype.hasOwnProperty.call(J,j)?J[j]:J);else if(O){const J=JSON.parse(G);console.log(J,"urlvalue"),Y=J.value}else Y=K;L[k]=Y}else typeof F=="object"&&F.id===null&&w===1?(console.log(F.propKey,"value.propKey"),L[k]=F.propKey):typeof F=="string"&&(L[k]=useVariablesInText(F))}if(w===1){console.log(L,"_params");const D=Object.entries(L);g.param=g.param.map((k,F)=>({...k,paramKey:D[F][0],defaultValue:D[F][1]||""})),L=g}if(y==="2"&&d!=="{}"){const D=JSON.parse(d);V(D),D&&(L=D)}function V(D){const k={...L,...getPageUrlParams(v)};if(Array.isArray(D))D.forEach((F,$)=>{if(typeof F=="string"){const G=F.match(/\${(.+?)\}/g);if(G!=null&&G.length){const j=G[0].slice(2,-1);j&&k[j]?D[$]=k[j]:D[$]=""}}else V(F)});else if(Object.prototype.toString.call(D)==="[object Object]")for(const F in D)if(typeof D[F]=="string"){const $=D[F].match(/\${(.+?)\}/g);if($!=null&&$.length){const G=$[0].slice(2,-1);G&&k[G]?D[F]=k[G]:D[F]=""}}else V(D[F])}L={...getPageUrlParams(v),...B,...L};let q="";const N=Object.keys(L),T=N.length-1,M=N.length;N.forEach((D,k)=>{let F=L[D];Object.prototype.toString.call(F)==="[object Object]"&&(F=JSON.stringify(F)),k===0?M!==1?q+=`?${D}=${F}&`:q+=`?${D}=${F}`:k===T?q+=`${D}=${F}`:q+=`${D}=${F}&`});function S(D){var k;if(w===1)return{Authentication:(k=window==null?void 0:window.config)==null?void 0:k.indicatorToken};if(typeof D=="string"){const F=JSON.parse(D),$=getPageUrlParams(v);if(Object.prototype.toString.call(F)==="[object Object]"){for(const G in F)if(typeof F[G]=="string"){const j=F[G].match(/\${(.+?)\}/g);if(j!=null&&j.length){const U=j[0].slice(2,-1);U&&$[U]?F[G]=$[U]:F[G]=""}}}return F}else return D}try{const D=["get","head"].includes(a),k={};let F=D?A+q:A;L.dataSqlId&&!F.includes("dataSqlId")&&(F+=`${F.includes("?")?"&":"?"}dataSqlId=${L.dataSqlId}`),Object.prototype.hasOwnProperty.call(L,"signal")&&(k.signal=L.signal);const $=await request({baseURL:vue.unref(x)||b||"",url:F,method:a,headers:o?S(o):{},data:D?{}:L,...k});return n($),$}catch(D){console.error(D)}},I=vue.unref(m)!=="design"&&u&&(h||h===void 0)&&setInterval(R,l*1e3);return vue.onUnmounted(()=>{clearInterval(I)}),R},useTransformChartDataByAttrKey=(e=[],r,n=!1)=>{let{name:i="name",types:a=[]}=r||{};i=(i==null?void 0:i.trim())||i;const o=new Set,s=new Map,l=e.length,c=a.length;if(l===1&&!n){const b=[];for(let y=0;y<c;y++){const d=a[y],{label:g,value:w}=d,p={...e[0],value:e[0][w]};o.add(g),b.push(p)}const f=e[0][i]||"";s.set(f,b)}else for(let b=0;b<l;b++){const f=e[b],y=f[i];o.add(y);for(let d=0;d<c;d++){const g=a[d],{label:w,value:p}=g,m={...f,value:f[p]||0};if(s.has(w)){const v=s.get(w);v.push(m),s.set(w,v)}else s.set(w,[m])}}const u=Array.from(o),h=[];for(const[b,f]of s)h.push({name:b,data:f});return{dimensions:u,dataset:h}},useImagePath=(e,r=!1)=>{var i;if(!e)return e;let n="";return e!=null&&e.includes("://")?n=e:n=((i=window==null?void 0:window.config)==null?void 0:i.uploadPath)+e,r&&(n=`url(${n})`),n},usePageUrl=(e,r)=>{const n=`${BASE_URL}/preview?pageId=${r}`,i=`${BASE_URL}/${r}`;return e==="preview"?n:i},useValueFormatter=(e,r)=>{var a;if(e==null)return r;const n=e.match(/\{.*\}/g);if(n==null||n.length===0)return r;const i=n.length;for(let o=0;o<i;o++){const s=n[o];if(s==null||s==="")break;let l=(a=s.slice(1,-1))==null?void 0:a.trim();l=l==null?void 0:l.replace(/value/g,r);try{let c=l;(/\(.*\)/g.test(l)||/[+/\\*]/g.test(l))&&(c=runCode(l)),e=e.replace(s,c)}catch{e=e.replace(s,l)}}return e},useIndicatorData=(e={},r,n=()=>{})=>{var P;const{pageMode:i}=vue.inject(GLOBAL_CONFIG,{pageMode:"normal"}),{requestToken:a}=vue.inject(GLOBAL_TOKEN,{requestToken:()=>{}}),{setLoadedData:o}=vue.inject(LOADED_DATA,{setLoadedData:(A,R)=>{}}),{getGlobalModel:s}=vue.inject(GLOBAL_MODEL,{getGlobalModel:A=>{}}),{pageId:l}=vue.inject("templateOperate",{pageId:""})||{};e.dataType==="indicator"&&a();const c=A=>{const{around:R,unit:I,id:B}=A;let L="";const{pageMode:V="",componentList:q=[]}=(e==null?void 0:e.graphicConfig)||{};let N=null,T=null;if(V==="design"){const M=q==null?void 0:q.find(G=>G.id===B);if(!M)return[];const{interval:S,intervalUnit:C,startTime:D,endTime:k,operate:F,useCurrentTime:$}=M||{};if($&&(N=dayjs().subtract(S,C),T=dayjs()),D&&(N=dayjs(D)),k&&(T=dayjs(k)),F){const{type:G,value:j,mode:U}=F;switch(G){case"add":N=N&&N.add(j,U),T=T&&T.add(j,U);break;case"minus":N=N&&N.subtract(j,U),T=T&&T.subtract(j,U)}}}else{const M=s(B)||{};vue.unref(M.startTime)&&(N=dayjs(vue.unref(M.startTime))),vue.unref(M.endTime)&&(T=dayjs(vue.unref(M.endTime)))}if(N&&T){const M=T.diff(N,I.toLowerCase());L=`${R==="before"?"-":""}${M+1}`}return L?[L]:[]},u=(A,R)=>Object.prototype.hasOwnProperty.call(A,R),h=(A,R)=>{if(R)u(A,"indexCode")&&(A.hrpIndexCode=A.indexCode,delete A.indexCode),u(A,"indexCodeNum")&&(A.hrpIndexCodeNum=A.indexCodeNum,delete A.indexCodeNum),u(A,"dataType")&&delete A.dataType;else{const{calcWays:I=[],dateCalcTypes:B=[],activeKey:L,componentId:V=""}=A;if(L===5&&(I!=null&&I.length)&&(B!=null&&B.length)&&V){const q=I[0].split("-");(q==null?void 0:q.length)>1&&q[0]==="rangeValue"&&(A.calcWays=c({around:q[1],unit:B[0],id:V})),delete A.radioValue}if(u(A,"dataType")){if(A.fieldType==="DATE"&&(A.label=A.fieldName),A.dataType==="component")if(A.fieldValue==="PARENT"){let q=A.modelKey;q&&A.prop&&(q+=`-${A.prop}`),A.fieldValue="${"+q+"}"}else A.fieldValue="${"+A.fieldValue+"}";delete A.dataType}u(A,"activeKey")&&delete A.activeKey,u(A,"radioValue")&&delete A.radioValue,u(A,"indexCode")&&(A.hrpIndexCode=A.indexCode,delete A.indexCode),u(A,"indexCodeNum")&&(A.hrpIndexCodeNum=A.indexCodeNum,delete A.indexCodeNum),A.dataType!=="component"&&A.useCurrentTime&&(A.fieldValue=dayjs().format(A.dateFormat)),u(A,"modelKey")&&delete A.modelKey,u(A,"prop")&&delete A.prop,delete A.useCurrentTime}},b=(A,R)=>{const I=[];return A!=null&&A.length&&lodashEs.cloneDeep(A).forEach(B=>{if(B.join&&B.conditions){const L=!B.conditions.some(V=>V.join&&V.conditions);B.conditions.forEach((V,q)=>{h(V,R);const N={};if(q<B.conditions.length-1&&(N.join=B.join),L)I.push({...N,...V});else if(V.join&&V.conditions){const T=R?"sqlConditions":"conditions";I.push({[T]:b([V],R),...N})}else I.push({...N,...V})})}else h(B,R),I.push(B)}),I},f=(A={},R)=>{if(A!=null&&A.sortCpnts&&R){const O=x(A);O&&(R.sort=O)}const{label:I,name:B,location:L,show:V,indexCode:q,indexCodeNum:N,calcType:T="COLUMN",builtInFormula:M,builtInValueSource:S,builtInCalcWay:C,formula:D,conditions:k,aggregate:F,distinct:$,dimByCount:G,dataTo:j}=A;let U;if(k&&(U=b(k)),T==="COMPONENT"){const O={};return m(O,S),{label:I.trim(),columnName:B,show:V,calcType:T,componentAlias:C,componentValue:O.fieldValue||null}}const H={label:I.trim(),columnName:B,location:L,show:V,calcType:j==="1"?"VIEW":T,hrpIndexCode:q,hrpIndexCodeNum:N,aggregate:F,builtInFormula:M,builtInValueSource:S,formula:D,conditions:U};if(M==="DATE_OFFSET"){const O=C.split("-");if((O==null?void 0:O.length)===3){let K=O[0];return O[2]==="before"&&O[0]!=="0"&&(K=`-${O[0]}`),{...H,calcWays:[K],dateCalcTypes:[O[1]]}}}else return B==="the_count"&&(H.calcType="AGGREGATE",H.distinct=!!$,H.typeGuid=G),{...H,builtInCalcWay:C}},y=A=>{if(!A)return[];const R=lodashEs.cloneDeep((A==null?void 0:A.controlList)||[]).filter(F=>F.conditionKey!=="parentCode"),{classificationList:I=[],rowHeaderList:B=[],dimensionList:L=[],seriesList:V=[],leftAxisList:q=[],rightAxisList:N=[],queryColumnList:T=[],indicators:M=[]}=A;w(R);const S=[...I,...B,...L,...V,...q,...N,...T,...M],C=[];for(const F of S){const $=getConditions((F==null?void 0:F.conditions)||[]);if($!=null&&$.length){const G=$.filter(j=>(j==null?void 0:j.dataType)==="component").map(j=>{const U={};return j!=null&&j.dateFormat&&(U.format=j.dateFormat),j.fieldValue==="PARENT"&&(U.id="PARENT",U.keyName=j.modelKey,U.modelKey=j.modelKey,U.prop=j.prop),{conditionKey:j.fieldName,conditionLabel:j.fieldName,conditionName:j.fieldName,conditionValueType:j.fieldType,id:j.componentId,keyName:j.fieldValue,rule:j.rule,notGlobal:!0,indexCode:j.indexCode,typeGuid:j.typeGuid,indexCodeNum:j.indexCodeNum,...U}});if(G!=null&&G.length)for(const j of G)C.find(U=>U.keyName===j.keyName)||C.push(j)}}const D=C.length,k=R;for(let F=0;F<D;F++){const $=C[F];if(($==null?void 0:$.conditionKey)==="parentCode")continue;const{id:G,keyName:j,prop:U,format:H,modelKey:O,dataType:K="component",customValue:Y}=$,Q=d($);m(Q,G,{prop:U,dateFormat:H,modelKey:O,keyName:j}),K===""&&(Q.fieldValue=Y||""),k.push(Q)}for(let F=k.length-1;F>=0;F--){const $=k[F];$.globalCondition||getConditions(k).find(j=>j.alias===$.alias&&j.globalCondition)&&k.splice(F,1)}return k};function d(A){const{id:R,keyName:I,conditionLabel:B,conditionKey:L,conditionValueType:V,prop:q,rule:N="NONE",notGlobal:T=!1,indexCode:M,typeGuid:S,indexCodeNum:C,dataType:D="component"}=A;let k=I||R;k&&q&&(k+=`-${q}`);let F=N;return F==="NONE"&&(["startTime","endTime"].includes(q)?F=q==="startTime"?"GREATER_EQUAL":"LESS_EQUAL":I!=null&&I.includes("startTime")?F=q==="GREATER_EQUAL":I!=null&&I.includes("endTime")?F=q==="LESS_EQUAL":F="EQUAL"),R==="PARENT"&&(k=A.modelKey,k&&q&&(k+=`-${q}`),F=N),{rule:F,label:B,fieldName:L,fieldValue:"",valueType:V,alias:k,globalCondition:!T,indexCode:M,typeGuid:S,indexCodeNum:C,dataType:D}}const g=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function w(A){if(A!=null&&A.length)for(const R of A)if(R!=null&&R.conditions)w(R.conditions);else{const{id:I,keyName:B,prop:L,modelKey:V,format:q,dataType:N="component",customValue:T}=R,M=d(R);m(M,I,{prop:L,dateFormat:q,modelKey:V,keyName:B}),N===""&&(M.fieldValue=T||"");for(const S in M)R[S]=M[S];for(const S of g)delete R[S]}}function p(A){const R=[];if(A!=null&&A.length){for(const I of A)if(I.variableName){const B={variateName:I.variableName,globalCondition:!1,valueType:I.variableType,alias:I.keyName||""};m(B,I.id,{dateFormat:I.format,prop:I.dateTypeValue,keyName:I.keyName,operateType:I.operateType,operateMode:I.operateMode,operateValue:I.operateValue}),I.dataType===""&&(B.fieldValue=I.variableValue),I.format&&(B.dateFormat=I.format),I.label&&(B.label=I.label),R.push(B)}}return R}function m(A,R,I){const{prop:B="",dateFormat:L="",modelKey:V="",keyName:q="",operateValue:N,operateMode:T,operateType:M}=I||{},S=V||q;if(R==="PARENT"&&S&&B){const U=window.config.record;let H=B,O=L;const K=B.match(/\{(.+?)\}/g);if(K!=null&&K.length){const Y=K[0].slice(1,-1).trim();H=B.replace(K[0],""),O=Y,A.dateFormat=O}if(U&&U[S]){const Y=vue.unref(U[S][H]);dayjs.isDayjs(Y)?A.fieldValue=Y.format(O||"YYYY-MM-DD"):A.fieldValue=Y}return}const C=s(R)||{},{value:D,format:k="YYYY-MM-DD",type:F="",useCurrentTime:$,RECORD:G}=C||{},j=L||k;if(lowerCaseIncludes(C.type,"date")){let U;if($?D?U=vue.unref(D):U=dayjs():U=vue.unref(D),N&&T&&M)switch(M){case"add":U=U.add(N,T);break;case"minus":U=U.subtract(N,T);break}A.fieldValue=U==null?void 0:U.format(j),A.dateFormat=j}else if(F==="ecanRangePicker"){let U=B;if(!B){const O=q&&q.split("-");O!=null&&O.length&&(U=O[O.length-1])}if(!U)return;let H=null;if(vue.unref(C[U])&&(H=dayjs(vue.unref(C[U]))),N&&T&&M){if(N==="rangeValue"){if(C.startTime&&C.endTime){const O=vue.unref(C.endTime).diff(vue.unref(C.startTime),T)+1;switch(M){case"add":H=H&&H.add(O,T);break;case"minus":H=H&&H.subtract(O,T)}}}else if(!isNaN(+N))switch(M){case"add":H=H&&H.add(N,T);break;case"minus":H=H&&H.subtract(N,T)}}if(H&&(A.fieldValue=H==null?void 0:H.format(j)),U==="rangeValue"&&C.startTime&&C.endTime){const O=getFormatStep(j);O&&(A.fieldValue=vue.unref(C.endTime).diff(vue.unref(C.startTime),O)+1)}A.dateFormat=j}else lowerCaseIncludes(F,MODEL_KEY_LIST)?V&&G?A.fieldValue=G[V]:!V&&G?A.fieldValue=G.value:A.fieldValue=vue.unref(D):A.fieldValue=vue.unref(D)}const v=A=>{var R;if(A){const I=Array.isArray(A)?lodashEs.cloneDeep(A):[lodashEs.cloneDeep(A)];let B="",L=[];const V=[],q=[],N=[];for(const T of I){if(T.defaultCode&&(T.label=T.columnName,delete T.defaultCode),T.type==="CUSTOM"&&(L=T.customOrderColumns),B=T.type,V.push(T.label),(R=T.columnName)!=null&&R.includes("_ecanrepeat_")){const M=T.columnName.split("_ecanrepeat_");q.push(M[0])}else q.push(T.columnName);N.push(T.order)}return B!=="CUSTOM"&&(V==null?void 0:V.length)>1&&(B="COMBINATION"),B==="CUSTOM"?{label:V.join(","),columnName:q.join(","),type:B,customOrderColumns:L}:{label:V.join(","),columnName:q.join(","),order:N.join(","),type:B}}else return A},x=A=>{const{sortCpnts:R=[]}=A;let I,B="";for(const L of R){const V=s(L)||{},{type:q,RECORD:N}=V;if(lowerCaseIncludes(q,"image")&&lowerCaseIncludes(N==null?void 0:N.value,["asc","desc"])){B=N.value.toUpperCase();break}}return B&&(I={label:A.label,columnName:A.name,order:B,type:"NORMAL"}),I},E=async(A={})=>{var ye,be,Ce,Pe,Se,Te;e.isViewRedrawing&&r.value.clear(),o(e.id,!1);const{graphicConfig:R,type:I,isGroupTable:B=!1}=e;let{source:L,dataViewId:V,plugin:q="1",layer:N,chartType:T,classificationList:M=[],rowHeaderList:S=[],dimensionList:C=[],seriesList:D=[],leftAxisList:k=[],rightAxisList:F=[],queryColumnList:$=[],indicators:G=[],controlList:j=[],formFields:U={},variableList:H=[],variableConditions:O=[],idxLibMode:K,preview:Y=!1,edvDataSetId:Q}=R||{},J=[];if((R==null?void 0:R.pageMode)==="design"?(J=(R.sqlConditions??[]).map(de=>{const pe={};if(!u(de,"globalCondition")&&!de.join&&(pe.globalCondition=!0),!de.join){const ve=de.rule||"EQUAL";pe.rule=ve==="NONE"?"EQUAL":ve}return{...de,...pe}}),O!=null&&O.length&&(J=J.concat(O))):(J=y(R),H!=null&&H.length&&(J=J.concat(p(H)))),J!=null&&J.length){const de=J.filter(ve=>ve.globalCondition),pe=J.filter(ve=>!ve.globalCondition);(de==null?void 0:de.length)>1&&(J=[{join:"&&",conditions:de},...pe])}J!=null&&J.length&&(J=b(J,"1")),N==null&&(lowerCaseIncludes(I,["table"])||lowerCaseIncludes(I,["list","circulate"])&&(M==null?void 0:M.length)>1?N="1":lowerCaseIncludes(I,["select","checkbox","radio"])?N="3":N="2");let Z;const W=[];let ee="";if(Array.isArray(M)&&M.length>0&&(!["ecanList","ecanCirculate"].includes(I)||(M==null?void 0:M.length)===1)){const de=M.length;for(let pe=0;pe<de;pe++){const ve=M[pe]||{},{label:_e="",name:ke="",show:De=!1,sort:Fe,customGroup:Re,conditions:Le,dateFormat:Ie,typeGuid:Ve="",truncations:Oe=[]}=ve;if(De||de===1){ee=Ve,Z={label:_e.trim(),columnName:ke,show:De,sort:x(ve)||v(Fe)||Fe,customGroup:Re,conditions:b(Le),typeGuid:Ve},Ie&&(Z.dateFormat=Ie),ke==="the_date"&&!Z.dateFormat&&(Z.dateFormat="YYYY-MM");const X={};if(Array.isArray(Oe)&&Oe.length>0){const te=Oe.length;for(let re=0;re<te;re++){const le=Oe[re]||{},{rule:ue="",num:ce=0,name:oe=""}=le;ue&&ce&&(X.num=ce,X.rule=ue,oe&&(X.otherGroupName=oe))}}if((ye=Object.keys(X))!=null&&ye.length&&(Z.truncation=X),lowerCaseIncludes(I,"scatter"))W.push(Z);else break}}}let ne;if(Array.isArray(D)&&D.length>0){const de=D.length;for(let pe=0;pe<de;pe++){const ve=D[pe]||{},{label:_e="",name:ke="",show:De=!1,sort:Fe,customGroup:Re,conditions:Le,typeGuid:Ie}=ve;if(De||de===1){ne={label:_e.trim(),columnName:ke,show:De,sort:v(Fe),customGroup:Re,conditions:b(Le),typeGuid:Ie};break}}}const ie=[];k==null||k.forEach(de=>{de.location="LEFT",ie.push(f(de,Z))}),F==null||F.forEach(de=>{de.location="RIGHT",ie.push(f(de,Z))}),G==null||G.forEach(de=>{de.location="LEFT",ie.push(f(de,Z))});const ae=[];["ecanList","ecanCirculate"].includes(I)&&(M==null?void 0:M.length)>1&&($=M),$==null||$.forEach(de=>{const{label:pe,name:ve,location:_e,show:ke,indexCode:De,sort:Fe,typeGuid:Re,indexCodeNum:Le,dateFormat:Ie,conditions:Ve}=de;let Oe=v(Fe);if(A.sort){const{field:te,order:re}=A.sort;let le=ie.find(ue=>ue.label===te);!le&&pe===te&&(le=de),le&&(Oe={columnName:le.columnName,label:A.sort.field,order:re.toUpperCase(),type:"NORMAL"})}const X={label:pe,columnName:ve,location:_e,show:ke,sort:Oe,calcType:"COLUMN",hrpIndexCode:De,hrpIndexCodeNum:Le,conditions:b(Ve),typeGuid:Re};Ie&&(X.dateFormat=Ie),ve==="the_date"&&!X.dateFormat&&(X.dateFormat="YYYY-MM"),ae.push(X)});const se=[];let fe=[];if(Array.isArray(S)&&S.length>0?fe=S:Array.isArray(C)&&C.length>0&&(fe=C),fe!=null&&fe.length){const de=fe.length;for(let pe=0;pe<de;pe++){const ve=fe[pe]||{},{label:_e="",name:ke="",show:De=!1,sort:Fe,customGroup:Re,conditions:Le,truncations:Ie,typeGuid:Ve="",dateFormat:Oe}=ve;let X=v(Fe);if(A.sort){const{field:le,order:ue}=A.sort;let ce=ie.find(oe=>oe.label===le);!ce&&ve.label===le&&(ce=ve),ce&&(X={columnName:ce.columnName,label:A.sort.field,order:ue.toUpperCase(),type:"NORMAL"})}const te={label:_e.trim(),columnName:ke,show:De,sort:X,customGroup:Re,conditions:b(Le),typeGuid:Ve};Oe&&(te.dateFormat=Oe),ke==="the_date"&&!te.dateFormat&&(te.dateFormat="YYYY-MM");const re={};if(Array.isArray(Ie)&&Ie.length>0){const le=Ie.length;for(let ue=0;ue<le;ue++){const ce=Ie[ue]||{},{rule:oe="",num:me=0,name:ge=""}=ce;oe&&me&&(re.num=me,re.rule=oe,ge&&(re.otherGroupName=ge))}}(be=Object.keys(re))!=null&&be.length&&(te.truncation=re),se.push(te)}}if(lowerCaseIncludes(I,["text","proportion","counter"])&&(T="zb"),B){if(se.length===0||ie.length===0)return;T="grouptable"}else{if(N==="1"&&ae.length===0)return;if(N==="2"&&ie.length===0)return;if(N==="3"&&(!ee||!U.labelField||!U.valueField))return;if(N==="3"&&I==="ecanDataSelect"&&ie.length===0)return}C!=null&&C.length&&(N="1",T="grouptable");let he=l||((Ce=window==null?void 0:window.config)==null?void 0:Ce.pageId);if(!he){const{pathname:de}=window==null?void 0:window.location;if(de){const pe=de.split("/");pe!=null&&pe.length&&(he=pe[pe.length-1])}}if(I!=="ecanScatter"&&((Pe=Object.keys(U))!=null&&Pe.length)){const de=getConditions(j).find(ve=>ve.conditionKey==="parentCode"),pe={};if(de){const ve=s(de.id)||{};if(ve!=null&&ve.itemCodes)pe.parentItemCodes=ve.itemCodes;else return}I==="ecanDataSelect"&&(pe.indicatorList=ie.filter(ve=>ve.show));try{const ve=await request.post(`${INDICATOR_URL}/diagram/formData`,{source:L,dataViewId:V,plugin:"4",layer:N,chartType:"normalSelect",rangeIndexTypeGuid:ee,type:I==="ecanDataSelect"?"normalSelectData":"normalSelect",labelField:U.labelField,valueField:U.valueField,pageId:he,sqlConditions:J,idxLibMode:"WITH_DATE_DIM_TABLE",keyName:e.keyName,...pe},{headers:{Authentication:(Se=window==null?void 0:window.config)==null?void 0:Se.indicatorToken,operateContext:CONTEXT}});return A!=null&&A.isTimer&&n(ve),ve}catch(ve){console.error(ve)}finally{}}else try{let de={};lowerCaseIncludes(I,"scatter")?de={classifications:W}:de={classification:Z};const pe=await request.post(`${INDICATOR_URL}/diagram`,{source:L,dataViewId:V,plugin:q,layer:N,chartType:T,...de,series:ne,indicatorList:ie,queryColumns:B?[]:ae,pageFlag:!0,pageId:he,edvDataSetId:Q||"",sqlConditions:J.map(ve=>{const{fieldValue:_e}=ve,ke={};return _e&&Array.isArray(_e)&&(ke.fieldValue=JSON.stringify(_e)),{...ve,...ke}}),idxLibMode:K,preview:Y,rowHeaders:se,keyName:e.keyName},{headers:{Authentication:(Te=window==null?void 0:window.config)==null?void 0:Te.indicatorToken,operateContext:CONTEXT}});return A!=null&&A.isTimer&&n(pe),pe}catch(de){console.error(de)}finally{}},_=vue.unref(i)!=="design"&&((P=e==null?void 0:e.graphicConfig)==null?void 0:P.pageMode)!=="design"&&e.isOpenRequestTimer&&e.requestInterval&&setInterval(()=>{E({isTimer:!0})},e.requestInterval*1e3);return vue.onUnmounted(()=>{clearInterval(_)}),E},useHrefParamsToGlobalVariables=()=>{const r=window.location.search.slice(1).split("&"),n=r.length,i={};for(let a=0;a<n;a++){const o=r[a];if(o==null||o==="")continue;const s=o.split("=");if(Array.isArray(s)){const l=s[0];l.includes("{")||(i[l]=s[1])}}window.config.requestParams={...window.config.requestParams,...i},window.config={...window.config,...i}},_sfc_main$s=vue.defineComponent({name:"EcanPageConfig",inheritAttrs:!1,props:{...pageConfigComponentProps,pageId:{type:String,default:""}},setup(e){const{width:r,height:n}=vue.inject(GLOBAL_CONFIG,{width:null,height:null}),i=vue.inject("setPageHeight",x=>{}),a=vue.inject("isMobile",!1),o=vue.computed(()=>{const x={};return a||(x.width=r.value,x.height=n.value),{...x,backgroundColor:e.pageId?"transparent":e.backgroundColor,backgroundImage:useImagePath(e.backgroundImage,!0),backgroundSize:e.backgroundSize}}),s=vue.ref(0),l=vue.ref(0),c=vue.ref(0),u=vue.ref(0),h=vue.ref(!1),b=vue.ref();let f;const y=()=>new Promise(x=>{vue.nextTick(()=>{r.value&&n.value?(s.value=parseFloat(r.value),l.value=parseFloat(n.value)):(s.value=b.value.clientWidth,l.value=b.value.clientHeight),(!c.value||!u.value)&&(c.value=window.screen.width,u.value=window.screen.height),x()})}),d=()=>{s.value&&l.value?(b.value.style.width=`${s.value}px`,b.value.style.height=`${l.value}px`):(b.value.style.width=`${c.value}px`,b.value.style.height=`${u.value}px`)};vue.watch([r,n],async()=>{e.pageId||(await y(),d(),w(),window.addEventListener("resize",p),m()),h.value=!0},{immediate:!0});const g=vue.ref({});vue.provide("scaleValue",g);const w=()=>{if(a){b.value.style.width="100%",b.value.style.height="auto",i("auto");return}const x=document.body.clientWidth,E=document.body.clientHeight,_=s.value||c.value,P=l.value||u.value,A=x/_;let R=E/P;(s.value!==1920||l.value!==1080)&&(R=l.value/s.value*x/P),g.value={widthScale:A,heightScale:R},b.value&&(b.value.style.transform=`scale(${A}, ${R})`),i(R)},p=lodashEs.debounce(async()=>{await y(),w()},100),m=()=>{const x=window.MutationObserver;f=new x(p),f.observe(b.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})},v=()=>{f&&(f.disconnect(),f.takeRecords(),f=null)};return vue.onMounted(()=>{h.value=!1}),vue.onUnmounted(()=>{window.removeEventListener("resize",p),v()}),{style:o,container:b,ready:h}}}),PageConfig_vue_vue_type_style_index_0_scoped_e1e149bf_lang="",_hoisted_1$g={id:"container",ref:"container"};function _sfc_render$x(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$g,[e.ready||e.pageId?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"page-config",style:vue.normalizeStyle(e.style)},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)):vue.createCommentVNode("",!0)],512)}const PageConfig=_export_sfc$1(_sfc_main$s,[["render",_sfc_render$x],["__scopeId","data-v-e1e149bf"]]),EcanPageConfig=withInstall$1(PageConfig),providerConfig={contextRequestUrl:"",pageMode:"normal",theme:"light",containerMap:{},combinationMap:{},width:"1920px",height:"1080px",pageFontFamily:"",jumpType:"page",jumpTime:null,jumpPage:"",jumpLink:"",requestList:[],events:[]},providerConfigComponentProps=transformToComponentProps(providerConfig),_sfc_main$r=vue.defineComponent({name:"EcanProviderConfig",inheritAttrs:!1,props:{...providerConfigComponentProps,pageId:{type:String,default:""}},setup(e,{expose:r,emit:n}){e.pageId||useHrefParamsToGlobalVariables();const i=vue.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=vue.ref(),o=()=>{a.value.setAttribute("datav-theme",e.theme)},s=vue.inject("usedComponentList",[]),l=vue.inject("componentList",[]),c=vue.computed(()=>{const W=[];for(const ee of vue.unref(s))ee.type==="ecanModal"?W.push(...ee.componentList):W.push(ee);return W});vue.watch(()=>e.theme,()=>{o()}),vue.onMounted(()=>{o()});const u=vue.computed(()=>useVariablesInText(e.contextRequestUrl)),h=vue.computed(()=>e.pageMode),b=vue.computed(()=>e.theme),f=vue.computed(()=>e.width),y=vue.computed(()=>e.height),d=vue.computed(()=>e.pageFontFamily),g=vue.computed(()=>{const W=[],ee=vue.unref(l).filter(ne=>ne.type==="ecanModal");for(const ne of ee)ne!=null&&ne.requestList&&W.push(...ne.requestList);return[...W,...e.requestList]}),w=vue.ref("");vue.provide(GLOBAL_CONFIG,{contextRequestUrl:u,pageMode:h,theme:b,touchEventId:w,width:f,height:y,fontFamily:d,requestList:g});const p=vue.ref({height:"100%",overflow:e.pageMode==="design"?"":"hidden"});vue.provide("setPageHeight",W=>{let ee=W;i.value||(ee=parseFloat(y.value)*W+"px"),p.value.height=ee}),vue.provide("isMobile",i.value),vue.provide("getContainerMap",()=>e.containerMap),vue.provide("getCombinationMap",()=>e.combinationMap),vue.provide("templateOperate",{pageId:e.pageId,templateEmit:n,setTemplateData:W=>{var ee;if(W!=null&&W.pageId){const{componentId:ne,...ie}=W;(ee=window.config)!=null&&ee.urlParams||(window.config.urlParams={}),window.config.urlParams[W.pageId]=ie,n("templateChange",W)}}});const m=vue.ref(),v=new Map,x=W=>v.get(W),E=(W,ee)=>{var ne;if(m.value=ee,v.set(W,ee),!e.pageId){const ie=vue.unref(s).find(ae=>ae.id===W);ie&&((ne=window.config)!=null&&ne.record||(window.config.record={}),window.config.record[ie.keyName]=ee)}},_=()=>{m.value=null},P=W=>{let ee=W;if(ee){const ne=W.match(/\{(.+?)\}/g);if(ne!=null&&ne.length){let ie=ne[0].slice(1,-1).trim();const ae=ie.match(/\[(.+?)\]/g);let se="";ae!=null&&ae.length&&(ie=ie.replace(ae[0],""),se=ae[0].slice(1,-1).trim());const fe=vue.unref(c).find(he=>he.keyName===ie);if(fe){const he=x(fe.id),{type:ye,value:be,RECORD:Ce,recordData:Pe}=he||{};lowerCaseIncludes(ye,MODEL_KEY_LIST)?ee=Ce[se]:lowerCaseIncludes(ye,"select")?ee=Pe[se]:lowerCaseIncludes(ye,["rangePicker","date"])?dayjs.isDayjs(vue.unref(he[se]))?ee=vue.unref(he[se]).format(he.format):ee=vue.unref(he[se]):ee=be}else ee=""}}return ee},A=new Map,R={},I=async(W,ee)=>{var fe;const{requestName:ne}=W,ie=await useRequestData({...W,projectRequestUrl:vue.unref(u),getModel:x})(),ae=((fe=ie==null?void 0:ie.data)==null?void 0:fe.data)||{},se=A.get(ne);if(se!=null&&se.length&&(!ee||R[ne])){for(const he of se)he(ae);ee||A.delete(ne)}},B=(W,ee)=>{R[W]&&(clearInterval(R[W]),delete R[W],A.delete(W));const ne=vue.unref(c).filter(ae=>!ae.openCustomRequestData&&ae.customRequestName===W),ie=A.get(W)||[];if((ne==null?void 0:ne.length)>ie.length&&(ie.push(ee),A.set(W,ie),(ne==null?void 0:ne.length)===ie.length)){const ae=vue.unref(g).find(se=>se.requestName===W);ae&&(ae!=null&&ae.isOpenRequestTimer&&(ae!=null&&ae.requestInterval)?(I(ae,!0),R[W]=setInterval(()=>{I(ae,!0)},ae.requestInterval*1e3)):I(ae))}};vue.provide(GLOBAL_MODEL,{getGlobalModel:x,setGlobalModel:E,clearInteractiveData:_,getRecordValueByKeyName:P,hanldePageRequestData:B,interactiveData:m});const L=vue.ref({}),V=(W,ee)=>{L.value[W]=ee};vue.provide(LOADED_DATA,{loadedData:L,setLoadedData:V});const q=[],N=()=>{q.pop()},T=W=>{q.push(W)},M=new Map,S=W=>M.get(W),C=(W,ee)=>{M.set(W,ee)};vue.provide(MODAL_MODEL,{popUseModalIds:N,pushUseModalIds:T,getModalModel:S,setModalModel:C});const D=mitt(),k=new Set,F=(W,ee)=>{k.add(W),D.on(W,ne=>{const{eventName:ie,params:ae}=ne;return typeof ee[ie]=="function"&&ee[ie](ae)}),vue.onBeforeUnmount(()=>{$(W)})},$=W=>{k.delete(W),D.off(W)},G=(W,ee,ne={})=>{if(W==="PAGE"){const ie=q.length;let ae=[];if(ie===0)ae=[...k];else{const se=q[ie-1];ae=[...S(se)]}ae.forEach(se=>{D.emit(se,{eventName:ee,params:ne})})}else D.emit(W,{eventName:ee,params:ne})};vue.provide(EVENT_BUS,{onEvent:F,offEvent:$,emitEvent:G});const j=vue.ref(0),U=()=>{j.value=vue.unref(j)+1};vue.provide(GLOBAL_TOKEN,{requestToken:U});const H=new Map,O=new Map,K=({requestFn:W=()=>{},sortNum:ee=0,id:ne=""})=>{if(H.has(ee)){const ie=H.get(ee);ie==null||ie.push(W)}else H.set(ee,[W]);O.set(ne,W)},Y=W=>new Promise((ee,ne)=>{const ie=W.map(ae=>ae());Promise.all(ie).then(ae=>{ee(ae)}).catch(ae=>{ne(ae)})}),Q=W=>new Promise(async(ee,ne)=>{if(W){if(typeof W=="string"){const ie=O.get(W);if(typeof ie=="function"){const ae=request.interceptors.response.use(se=>(ee(se),se),se=>(ne(se),Promise.reject(se)));ie(),request.interceptors.response.eject(ae)}}}else{const ie=Array.from(H);ie.sort((se,fe)=>fe[0]-se[0]);const ae=ie.length;try{e.pageMode!=="design"&&vue.unref(j)>0;for(let se=0;se<ae;se++){const fe=ie[se][1];await Y(fe)}}catch(se){console.error(se)}finally{H.clear(),ee(null)}}});vue.provide(REQUEST_MODEL,{setRequest:K,touchRequest:Q});const J=()=>{D.emit(REFRESH_PAGE)};vue.provide(REFRESH_PAGE,{emitRefreshPage:J});const Z=W=>{D.on(REFRESH_PAGE,()=>W()),vue.onMounted(()=>{D.off(REFRESH_PAGE)})};return vue.watchEffect(()=>{var W;if((W=vue.unref(s))!=null&&W.length&&vue.unref(h)!=="design"){const{jumpType:ee,jumpTime:ne,jumpPage:ie,jumpLink:ae}=e;if(ne!=null&&ne.value){let se=0;switch(ne==null?void 0:ne.suffix){case"hours":se=ne.value*60*60*1e3;break;case"minute":se=ne.value*60*1e3;break;case"seconds":se=ne.value*1e3;break}setTimeout(()=>{let fe="";ee==="page"&&ie?fe=usePageUrl(vue.unref(h),ie):ee==="link"&&ae&&(fe=ae),fe=useVariablesInText(fe),window.open(fe,"_self")},se)}}}),vue.onBeforeUnmount(()=>{H==null||H.clear(),O==null||O.clear()}),r({touchRequest:Q,getGlobalModel:x,onRefreshPage:Z,emitEvent:G,props:e}),{providerConfig:a,configStyle:p}}}),ProviderConfig_vue_vue_type_style_index_0_scoped_e581716a_lang="";function _sfc_render$w(e,r,n,i,a,o){return vue.openBlock(),vue.createElementBlock("div",{id:"ProviderConfig",ref:"providerConfig",style:vue.normalizeStyle({...e.configStyle,fontFamily:e.pageFontFamily})},[vue.renderSlot(e.$slots,"default",{},void 0,!0)],4)}const ProviderConfig=_export_sfc$1(_sfc_main$r,[["render",_sfc_render$w],["__scopeId","data-v-e581716a"]]),EcanProviderConfig=withInstall$1(ProviderConfig),textProps={...props,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:[],exceedConfig:"",targetTemplate:""},textComponentProps=transformToComponentProps(textProps),textEvents=["refreshData","click","valueChange"],goUp="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=",goDown="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==",__default__$4=vue.defineComponent({name:"EcanText",components:{Skeleton},props:{...textComponentProps},setup(e,{expose:r}){const n=vue.ref(!1),i=usePickComponentStyle(e),a=vue.ref({}),o=vue.computed(()=>e.variableFontSize||"14px"),s=vue.computed(()=>"-"+vue.unref(o)),l=C=>{var D,k;if(e.showAnimation){const F=e.text.match(/\{(.+?)\}/g)||[];if(F!=null&&F.length){const $=(D=F[0].slice(1,-1))==null?void 0:D.trim();if(vue.unref(a)[$]===C){a.value=C;return}const G=+C[$];let j=0;if(isNaN(G))a.value=C;else{String(G).includes(".")&&(j=((k=String(G).split(".")[1])==null?void 0:k.length)||0);const U=Math.abs(G)*Math.pow(10,j),H=String(U).length;let O=[];for(let Y=0;Y<5;Y++){const Q=Math.ceil(Math.random()*(U+1)-1);O.includes(Q)||O.push(Q)}O.sort((Y,Q)=>Y-Q),O=O.map(Y=>{const Q=String(Y).split("").reverse(),J=[];for(let Z=0;Z<H;Z++)Q&&Q[Z]?J.push(Q[Z]):J.push("0");return j&&J.splice(j,0,"."),(G<0?"-":"")+J.reverse().join("")}),O.push(G);let K=0;for(const Y of O)setTimeout(()=>{a.value={...vue.unref(a),[$]:Y}},K*1e3),K+=.1}}else a.value=C}else a.value=C};vue.watch(()=>[e.data,e.dataType],([C,D])=>{D==="static"&&l(C)},{immediate:!0});const{getGlobalModel:c,setGlobalModel:u,getRecordValueByKeyName:h,hanldePageRequestData:b}=vue.inject(GLOBAL_MODEL,{getGlobalModel:C=>{},setGlobalModel:(C,D)=>{},getRecordValueByKeyName:C=>{},hanldePageRequestData:(C,D)=>{}}),{setLoadedData:f}=vue.inject(LOADED_DATA,{setLoadedData:(C,D)=>{}}),{setTemplateData:y}=vue.inject("templateOperate",{setTemplateData:C=>{}}),d=vue.computed(()=>{let C="";if(e.gradientShow){const{gradientColor:D,gradientOffset:k,gradientAngle:F,color:$}=e;C+=`background: linear-gradient(${F}, ${$}, ${D||"transparent"} ${k*100}%);-webkit-background-clip: text;color: transparent;`}return C}),g=vue.computed(()=>{const C={};if(e.gradientShow){const{gradientColor:D,gradientOffset:k,gradientAngle:F,color:$}=e,G=D||"transparent";C.background=`linear-gradient(${F}, ${$}, ${G} ${k*100}%)`,C["-webkit-background-clip"]="text",C.color="transparent"}return C}),w=vue.computed(()=>{const C={};return e.linkPage&&(C.cursor="pointer",C.userSelect="none"),C}),p=vue.ref(1),m=vue.computed(()=>{var U;if(vue.unref(n))return"NaN";if(!p.value)return;const C=vue.unref(a),D=e.increaseColor||e.color,k=e.declineColor||e.color;let F=e.text;F=F==null?void 0:F.replace(/\n|\\n/g,"<br/>"),F=F==null?void 0:F.replace(/\s(?!\{) | (?!\})\s/g,"&nbsp;");const $=F.match(/\{(.+?)\}/g)||[];let G="",j="";if(e.exceedConfig==="wrap"?j="show-wrap":e.exceedConfig==="ellipsis"&&(j="show-ellipsis"),$==null||$.length===0){if(F&&e.format==="percentage"&&!isNaN(+F)){const H=parseFloat(F),O=H*100,K=v(O.toFixed(2));H>=0?F=`<span class="${j}" style="color: ${K||D||"#ED6643"};font-size:${vue.unref(o)};display: inline-block;${vue.unref(d)}">
100
100
  <div class="percentage-img-box">
101
101
  <img style="width: ${vue.unref(o)};filter: ${`drop-shadow(${K||D||"#ED6643"} ${vue.unref(o)} 0px)`};" src="${goUp}"/>
102
102
  </div>