@ecan-bi/indicator-library 1.0.56 → 1.0.58
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/assets/editor.worker-02df2e61.js +1 -1
- package/dist/assets/json.worker-867823a6.js +1 -1
- package/dist/assets/ts.worker-7254b425.js +1 -1
- package/dist/index.es.js +1867 -1855
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/DataConfigCard.vue.d.ts +1 -0
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/filter-modal/Condition.vue.d.ts +1 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@1.0.
|
|
2
|
-
(function(he,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(he=typeof globalThis<"u"?globalThis:he||self,e(he["@ecan-bi/indicator-library"]={},he.Vue,he.LodashEs,he.AntDesignVue,he.Draggable,null,null,he.Dayjs,null,he.MonacoEditor,null,he.Echarts))})(this,function(he,e,re,v,Ct,Fu,$u,de,Du,Ua,vu,Ga){var Ra;"use strict";function za(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const Ha=za(Ga),tn=(t,o)=>{if(t.install=n=>{for(const a of[t,...Object.values(o??{})])n.component(a.name,a)},o)for(const[n,a]of Object.entries(o))t[n]=a;return t},Be="$request",ke=((Ra=window==null?void 0:window.config)==null?void 0:Ra.indicatorURL)||"",Oe="INDICATOR_TOKEN",on="DATA_LIST",Me="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",Se="UPDATE_GRAPHIC_CONFIG",nn="SHOW_STYLE_CONFIG",an="REFRESH_DATA",Ft="CHARTS_OPTIONS",rn="TABLE_OPTIONS",Wa=18,ro="UPDATE_CHARTS_OPTIONS",lo="UPDATE_TABLE_OPTIONS",io="SOURCE_TYPE",ln="CHANGE_CONDITION",sn="DATA_VIEW_COLUMNS",ze="RENDER_USED_COMPONENTS",$t="UPDATE_USED_COMPONENT",cn="MAP_ATTRIBUTE_PROPS",dn="PAGE_CONFIG",pn={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},qa={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Ya=e.defineComponent({name:"DataViewList",components:{ASpin:v.Spin,ATreeSelect:v.TreeSelect,Draggable:Ct},setup(){var O;const t=e.inject(Be),o=e.unref(e.inject(Oe)),n=e.inject(pe),a=e.inject(Se),r=e.computed(()=>{var m;return((m=e.unref(n))==null?void 0:m.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(O=window==null?void 0:window.config)==null?void 0:O.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var N,g;const m=r.value;l.value=!0;try{const{data:B}=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,B.success&&((N=i.value)==null||N.push(s),i.value=(g=i.value)==null?void 0:g.concat(p([B.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(m=[],N)=>{const g=[];return m.forEach(B=>{g.push({id:B.id,pId:N??B.parentId,value:B.id,title:B.name,isLeaf:B.leaf||!1,nature:B.nature,selectable:B.leaf||!1})}),g},u=async(m,N)=>{var V;let g=0;if(m){const{value:T}=m.dataRef;g=T}const{data:B}=await t.post(`${ke}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:g},{headers:{Authentication:o,operateContext:"ygt"}});B.success&&(i.value=(V=e.unref(i))==null?void 0:V.concat(p(B.data)),N&&e.unref(r)&&await c())},f=m=>{k(m),a({dataViewId:m,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(on,{setDataList:m=>m}),A=e.ref(!1),y=e.ref([]),k=async m=>{if(m){y.value=[],A.value=!0;try{const N=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:g,data:B={}}=N.data;if(A.value=!1,g){const{rows:V=[]}=B;V==null||V.forEach(T=>{var j;const M=((j=T==null?void 0:T.dataViewColumns)==null?void 0:j.map(W=>({...W,show:!0})))||[];y.value=[...e.unref(y),...M]}),h(e.unref(y))}}catch{A.value=!1}}},S=m=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[m],w=(m,N)=>{const g=N[m.oldIndex];if(g){const B={...g,label:g.name,name:g.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(B))}};return e.onMounted(async()=>{await u(void 0,!0),k(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:i,treeSelectLoading:l,dataViewList:y,dataViewLoading:A,onDataViewIdChange:f,mapGenericType:S,onDragStart:w}}}),Gu="",te=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},Ka={class:"data-view-list"},Qa={class:"columns"},Xa={class:"column-item"},Ja={class:"column-item-name"};function Za(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",Ka,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Qa,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Xa,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Ja,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const er=te(Ya,[["render",Za],["__scopeId","data-v-4a66f7d2"]]);function Ae(t,o){tr(t)&&(t="100%");var n=or(t);return t=o===360?t:Math.min(o,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*o),10)/100),Math.abs(t-o)<1e-6?1:(o===360?t=(t<0?t%o+o:t%o)/parseFloat(String(o)):t=t%o/parseFloat(String(o)),t)}function tr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function or(t){return typeof t=="string"&&t.indexOf("%")!==-1}function nr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Dt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function so(t){return t.length===1?"0"+t:String(t)}function ar(t,o,n){return{r:Ae(t,255)*255,g:Ae(o,255)*255,b:Ae(n,255)*255}}function co(t,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(o-t)*(6*n):n<1/2?o:n<2/3?t+(o-t)*(2/3-n)*6:t}function rr(t,o,n){var a,r,l;if(t=Ae(t,360),o=Ae(o,100),n=Ae(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=co(d,i,t+1/3),r=co(d,i,t),l=co(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function lr(t,o,n){t=Ae(t,255),o=Ae(o,255),n=Ae(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function ir(t,o,n){t=Ae(t,360)*6,o=Ae(o,100),n=Ae(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:u*255}}function sr(t,o,n,a){var r=[so(Math.round(t).toString(16)),so(Math.round(o).toString(16)),so(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function un(t){return we(t)/255}function we(t){return parseInt(t,16)}var fn={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 wt(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=pr(t)),typeof t=="object"&&(je(t.r)&&je(t.g)&&je(t.b)?(o=ar(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):je(t.h)&&je(t.s)&&je(t.v)?(a=Dt(t.s),r=Dt(t.v),o=ir(t.h,a,r),i=!0,d="hsv"):je(t.h)&&je(t.s)&&je(t.l)&&(a=Dt(t.s),l=Dt(t.l),o=rr(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=nr(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var cr="[-\\+]?\\d+%?",dr="[-\\+]?\\d*\\.\\d+%?",He="(?:".concat(dr,")|(?:").concat(cr,")"),po="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),uo="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),Ve={CSS_UNIT:new RegExp(He),rgb:new RegExp("rgb"+po),rgba:new RegExp("rgba"+uo),hsl:new RegExp("hsl"+po),hsla:new RegExp("hsla"+uo),hsv:new RegExp("hsv"+po),hsva:new RegExp("hsva"+uo),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 pr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(fn[t])t=fn[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ve.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ve.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ve.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Ve.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ve.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Ve.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ve.hex8.exec(t),n?{r:we(n[1]),g:we(n[2]),b:we(n[3]),a:un(n[4]),format:o?"name":"hex8"}:(n=Ve.hex6.exec(t),n?{r:we(n[1]),g:we(n[2]),b:we(n[3]),format:o?"name":"hex"}:(n=Ve.hex4.exec(t),n?{r:we(n[1]+n[1]),g:we(n[2]+n[2]),b:we(n[3]+n[3]),a:un(n[4]+n[4]),format:o?"name":"hex8"}:(n=Ve.hex3.exec(t),n?{r:we(n[1]+n[1]),g:we(n[2]+n[2]),b:we(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function je(t){return!!Ve.CSS_UNIT.exec(String(t))}var vt=2,mn=.16,ur=.05,fr=.05,mr=.15,hn=5,yn=4,hr=[{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 gn(t){var o=t.r,n=t.g,a=t.b,r=lr(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Pt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(sr(o,n,a,!1))}function yr(t,o,n){var a=n/100,r={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b};return r}function bn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-vt*o:Math.round(t.h)+vt*o:a=n?Math.round(t.h)+vt*o:Math.round(t.h)-vt*o,a<0?a+=360:a>=360&&(a-=360),a}function Cn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-mn*o:o===yn?a=t.s+mn:a=t.s+ur*o,a>1&&(a=1),n&&o===hn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function wn(t,o,n){var a;return n?a=t.v+fr*o:a=t.v-mr*o,a>1&&(a=1),Number(a.toFixed(2))}function fo(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=wt(t),r=hn;r>0;r-=1){var l=gn(a),i=Pt(wt({h:bn(l,r,!0),s:Cn(l,r,!0),v:wn(l,r,!0)}));n.push(i)}n.push(Pt(a));for(var d=1;d<=yn;d+=1){var s=gn(a),c=Pt(wt({h:bn(s,d),s:Cn(s,d),v:wn(s,d)}));n.push(c)}return o.theme==="dark"?hr.map(function(p){var u=p.index,f=p.opacity,h=Pt(yr(wt(o.backgroundColor||"#141414"),wt(n[u]),f*100));return h}):n}var mo={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"},ho={},yo={};Object.keys(mo).forEach(function(t){ho[t]=fo(mo[t]),ho[t].primary=ho[t][5],yo[t]=fo(mo[t],{theme:"dark",backgroundColor:"#141414"}),yo[t].primary=yo[t][5]});var _n=[],_t=[],gr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function br(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Cr(t,o){if(o=o||{},t===void 0)throw new Error(gr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=_n.indexOf(a);r===-1&&(r=_n.push(a)-1,_t[r]={});var l;return _t[r]!==void 0&&_t[r][n]!==void 0?l=_t[r][n]:(l=_t[r][n]=br(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function xn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){wr(t,r,n[r])})}return t}function wr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function _r(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function xr(t,o){_r(t,"[@ant-design/icons-vue] ".concat(o))}function kn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function go(t,o,n){return n?e.h(t.tag,xn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return go(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,xn({key:o},t.attrs),(t.children||[]).map(function(a,r){return go(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function Sn(t){return fo(t)[0]}function An(t){return t?Array.isArray(t)?t:[t]:[]}var kr=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@1.0.58 */
|
|
2
|
+
(function(he,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("ant-design-vue"),require("vuedraggable"),require("ant-design-vue/es/popover/style"),require("ant-design-vue/es/dropdown/style"),require("dayjs"),require("ant-design-vue/es/table/style"),require("monaco-editor"),require("ant-design-vue/es/collapse/style"),require("echarts")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","ant-design-vue","vuedraggable","ant-design-vue/es/popover/style","ant-design-vue/es/dropdown/style","dayjs","ant-design-vue/es/table/style","monaco-editor","ant-design-vue/es/collapse/style","echarts"],e):(he=typeof globalThis<"u"?globalThis:he||self,e(he["@ecan-bi/indicator-library"]={},he.Vue,he.LodashEs,he.AntDesignVue,he.Draggable,null,null,he.Dayjs,null,he.MonacoEditor,null,he.Echarts))})(this,function(he,e,re,v,_t,Du,vu,de,Pu,za,Mu,Ha){var Ga;"use strict";function Wa(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const qa=Wa(Ha),nn=(t,o)=>{if(t.install=n=>{for(const a of[t,...Object.values(o??{})])n.component(a.name,a)},o)for(const[n,a]of Object.entries(o))t[n]=a;return t},Be="$request",ke=((Ga=window==null?void 0:window.config)==null?void 0:Ga.indicatorURL)||"",Oe="INDICATOR_TOKEN",an="DATA_LIST",Me="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",xe="UPDATE_GRAPHIC_CONFIG",rn="SHOW_STYLE_CONFIG",ln="REFRESH_DATA",Dt="CHARTS_OPTIONS",sn="TABLE_OPTIONS",Ya=18,io="UPDATE_CHARTS_OPTIONS",so="UPDATE_TABLE_OPTIONS",co="SOURCE_TYPE",cn="CHANGE_CONDITION",dn="DATA_VIEW_COLUMNS",He="RENDER_USED_COMPONENTS",vt="UPDATE_USED_COMPONENT",pn="MAP_ATTRIBUTE_PROPS",un="PAGE_CONFIG",fn={bar:{name:"柱状图",type:"bar",width:"400px",height:"400px",xAxisLabelFormatter:"{value}",yAxisLabelFormatter:"{value}",yAxisLineAlwaysDisplay:!1,titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipFormatter:"{marker} {a} {c}",xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelInterval:0,xAxisLabelColor:"#333",xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisLabelWidth:void 0,yAxisLabelRotate:0,yAxisLabelOverflow:"none",yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",barWidth:"40%",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",isUseHorizontalAxis:!1,axisInverse:!1,xAxisInverse:!1,yAxisInverse:!1,isStack:!1,labelShow:!1,labelFontSize:"12px",labelPosition:"inside",labelColor:"",toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0},line:{name:"折线图",type:"line",width:"400px",height:"400px",legendShow:!0,legendOrient:"horizontal",legendTop:"top",legendLeft:"center",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],symbolSize:4,lineStyleWidth:2,smooth:!1,xAxisLabelWidth:void 0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisLabelFormatter:"{value}",xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,yAxisLabelFormatter:"{value}",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",tooltipShow:!0,tooltipFormatter:"{marker} {a} {c}",toolboxShow:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0},pie:{name:"饼图",type:"pie",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],backgroundColor:"",tooltipShow:!0,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {b} {c} ({d}%)",legendShow:!0,legendTextStyleColor:"#333",legendOrient:"vertical",legendTop:"top",legendLeft:"left",innerRadius:"0%",outerRadius:"60%",centerLeft:"50%",centerTop:"50%",minAngle:0,labelShow:!0,labelColor:"#333",isUseLabelColors:!1,labelFontSize:12,labelPosition:"outside",labelFormatter:"{b}\\n{d}%",labelLineShow:!0,labelLineLength:10,labelLineLength2:15,roseType:"",gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息"},customGraph:{name:"自定义图表",type:"customGraph",width:"400px",height:"400px",option:{},optionCode:""},comboGraph:{name:"组合图表",type:"comboGraph",width:"400px",height:"400px",titleText:"",titleSubtext:"",colors:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],legendShow:!0,legendTextStyleColor:"#333",legendOrient:"horizontal",legendTop:"top",legendLeft:"center",tooltipShow:!0,tooltipTextStyleColor:"",tooltipTrigger:"item",tooltipFormatter:"{marker} {a} {c}",xAxisLabelInterval:0,xAxisSplitLineShow:!0,xAxisLabelRotate:0,xAxisLabelOverflow:"none",xAxisLabelWidth:void 0,xAxisSplitLineStyleColor:"#333",xAxisLabelColor:"#333",xAxisLineStyleColor:"#333",xAxisTickShow:!0,xAxisMinInterval:0,yAxisMinInterval:0,yAxisSplitLineShow:!0,yAxisSplitLineStyleColor:"#333",yAxisLabelColor:"#333",yAxisLineStyleColor:"#333",yAxisLineAlwaysDisplay:!1,seriesTypes:[{type:"bar",axisIndex:0},{type:"line",axisIndex:0}],yAxis:[{axisLabelFormatter:"{value}"},{axisLabelFormatter:"{value}"}],gridContainLabel:!0,gridTop:"10%",gridBottom:"10%",gridLeft:"5%",gridRight:"5%",toolboxShow:!1,toolboxLocation:!1,toolboxDownloadShow:!0,toolboxDataZoomShow:!0,toolboxInfoShow:!0,toolboxOrient:"horizontal",toolboxItemSize:16,toolboxItemGap:8,toolboxLeft:"right",toolboxTop:"top",toolboxIconStyleBorderColor:"#666",toolboxDownloadUrl:"",toolboxInfoText:"当前无说明信息",areaStyleOpacity:0,symbolSize:4,lineStyleWidth:2,smooth:!1,barWidth:"40%"}},Ka={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Qa=e.defineComponent({name:"DataViewList",components:{ASpin:v.Spin,ATreeSelect:v.TreeSelect,Draggable:_t},setup(){var O;const t=e.inject(Be),o=e.unref(e.inject(Oe)),n=e.inject(pe),a=e.inject(xe),r=e.computed(()=>{var m;return((m=e.unref(n))==null?void 0:m.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(O=window==null?void 0:window.config)==null?void 0:O.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var N,g;const m=r.value;l.value=!0;try{const{data:B}=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,B.success&&((N=i.value)==null||N.push(s),i.value=(g=i.value)==null?void 0:g.concat(p([B.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(m=[],N)=>{const g=[];return m.forEach(B=>{g.push({id:B.id,pId:N??B.parentId,value:B.id,title:B.name,isLeaf:B.leaf||!1,nature:B.nature,selectable:B.leaf||!1})}),g},u=async(m,N)=>{var V;let g=0;if(m){const{value:T}=m.dataRef;g=T}const{data:B}=await t.post(`${ke}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:g},{headers:{Authentication:o,operateContext:"ygt"}});B.success&&(i.value=(V=e.unref(i))==null?void 0:V.concat(p(B.data)),N&&e.unref(r)&&await c())},f=m=>{x(m),a({dataViewId:m,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(an,{setDataList:m=>m}),A=e.ref(!1),y=e.ref([]),x=async m=>{if(m){y.value=[],A.value=!0;try{const N=await t.post(`${ke}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:g,data:B={}}=N.data;if(A.value=!1,g){const{rows:V=[]}=B;V==null||V.forEach(T=>{var j;const M=((j=T==null?void 0:T.dataViewColumns)==null?void 0:j.map(q=>({...q,show:!0})))||[];y.value=[...e.unref(y),...M]}),h(e.unref(y))}}catch{A.value=!1}}},S=m=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[m],w=(m,N)=>{const g=N[m.oldIndex];if(g){const B={...g,label:g.name,name:g.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(B))}};return e.onMounted(async()=>{await u(void 0,!0),x(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:i,treeSelectLoading:l,dataViewList:y,dataViewLoading:A,onDataViewIdChange:f,mapGenericType:S,onDragStart:w}}}),Hu="",te=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},Xa={class:"data-view-list"},Ja={class:"columns"},Za={class:"column-item"},er={class:"column-item-name"};function tr(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",Xa,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Ja,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Za,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",er,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const or=te(Qa,[["render",tr],["__scopeId","data-v-4a66f7d2"]]);function Se(t,o){nr(t)&&(t="100%");var n=ar(t);return t=o===360?t:Math.min(o,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*o),10)/100),Math.abs(t-o)<1e-6?1:(o===360?t=(t<0?t%o+o:t%o)/parseFloat(String(o)):t=t%o/parseFloat(String(o)),t)}function nr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function ar(t){return typeof t=="string"&&t.indexOf("%")!==-1}function rr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Pt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function po(t){return t.length===1?"0"+t:String(t)}function lr(t,o,n){return{r:Se(t,255)*255,g:Se(o,255)*255,b:Se(n,255)*255}}function uo(t,o,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(o-t)*(6*n):n<1/2?o:n<2/3?t+(o-t)*(2/3-n)*6:t}function ir(t,o,n){var a,r,l;if(t=Se(t,360),o=Se(o,100),n=Se(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=uo(d,i,t+1/3),r=uo(d,i,t),l=uo(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function sr(t,o,n){t=Se(t,255),o=Se(o,255),n=Se(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function cr(t,o,n){t=Se(t,360)*6,o=Se(o,100),n=Se(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:u*255}}function dr(t,o,n,a){var r=[po(Math.round(t).toString(16)),po(Math.round(o).toString(16)),po(Math.round(n).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function mn(t){return Ce(t)/255}function Ce(t){return parseInt(t,16)}var hn={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 kt(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=fr(t)),typeof t=="object"&&(je(t.r)&&je(t.g)&&je(t.b)?(o=lr(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):je(t.h)&&je(t.s)&&je(t.v)?(a=Pt(t.s),r=Pt(t.v),o=cr(t.h,a,r),i=!0,d="hsv"):je(t.h)&&je(t.s)&&je(t.l)&&(a=Pt(t.s),l=Pt(t.l),o=ir(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=rr(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var pr="[-\\+]?\\d+%?",ur="[-\\+]?\\d*\\.\\d+%?",We="(?:".concat(ur,")|(?:").concat(pr,")"),fo="[\\s|\\(]+(".concat(We,")[,|\\s]+(").concat(We,")[,|\\s]+(").concat(We,")\\s*\\)?"),mo="[\\s|\\(]+(".concat(We,")[,|\\s]+(").concat(We,")[,|\\s]+(").concat(We,")[,|\\s]+(").concat(We,")\\s*\\)?"),Ve={CSS_UNIT:new RegExp(We),rgb:new RegExp("rgb"+fo),rgba:new RegExp("rgba"+mo),hsl:new RegExp("hsl"+fo),hsla:new RegExp("hsla"+mo),hsv:new RegExp("hsv"+fo),hsva:new RegExp("hsva"+mo),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 fr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(hn[t])t=hn[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ve.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ve.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ve.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Ve.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ve.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Ve.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ve.hex8.exec(t),n?{r:Ce(n[1]),g:Ce(n[2]),b:Ce(n[3]),a:mn(n[4]),format:o?"name":"hex8"}:(n=Ve.hex6.exec(t),n?{r:Ce(n[1]),g:Ce(n[2]),b:Ce(n[3]),format:o?"name":"hex"}:(n=Ve.hex4.exec(t),n?{r:Ce(n[1]+n[1]),g:Ce(n[2]+n[2]),b:Ce(n[3]+n[3]),a:mn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Ve.hex3.exec(t),n?{r:Ce(n[1]+n[1]),g:Ce(n[2]+n[2]),b:Ce(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function je(t){return!!Ve.CSS_UNIT.exec(String(t))}var Mt=2,yn=.16,mr=.05,hr=.05,yr=.15,gn=5,bn=4,gr=[{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 Cn(t){var o=t.r,n=t.g,a=t.b,r=sr(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function jt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(dr(o,n,a,!1))}function br(t,o,n){var a=n/100,r={r:(o.r-t.r)*a+t.r,g:(o.g-t.g)*a+t.g,b:(o.b-t.b)*a+t.b};return r}function wn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Mt*o:Math.round(t.h)+Mt*o:a=n?Math.round(t.h)+Mt*o:Math.round(t.h)-Mt*o,a<0?a+=360:a>=360&&(a-=360),a}function _n(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-yn*o:o===bn?a=t.s+yn:a=t.s+mr*o,a>1&&(a=1),n&&o===gn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function kn(t,o,n){var a;return n?a=t.v+hr*o:a=t.v-yr*o,a>1&&(a=1),Number(a.toFixed(2))}function ho(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=kt(t),r=gn;r>0;r-=1){var l=Cn(a),i=jt(kt({h:wn(l,r,!0),s:_n(l,r,!0),v:kn(l,r,!0)}));n.push(i)}n.push(jt(a));for(var d=1;d<=bn;d+=1){var s=Cn(a),c=jt(kt({h:wn(s,d),s:_n(s,d),v:kn(s,d)}));n.push(c)}return o.theme==="dark"?gr.map(function(p){var u=p.index,f=p.opacity,h=jt(br(kt(o.backgroundColor||"#141414"),kt(n[u]),f*100));return h}):n}var yo={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"},go={},bo={};Object.keys(yo).forEach(function(t){go[t]=ho(yo[t]),go[t].primary=go[t][5],bo[t]=ho(yo[t],{theme:"dark",backgroundColor:"#141414"}),bo[t].primary=bo[t][5]});var xn=[],xt=[],Cr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function wr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function _r(t,o){if(o=o||{},t===void 0)throw new Error(Cr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=xn.indexOf(a);r===-1&&(r=xn.push(a)-1,xt[r]={});var l;return xt[r]!==void 0&&xt[r][n]!==void 0?l=xt[r][n]:(l=xt[r][n]=wr(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function Sn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){kr(t,r,n[r])})}return t}function kr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function xr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Sr(t,o){xr(t,"[@ant-design/icons-vue] ".concat(o))}function An(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Co(t,o,n){return n?e.h(t.tag,Sn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Co(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Sn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Co(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function Nn(t){return ho(t)[0]}function Tn(t){return t?Array.isArray(t)?t:[t]:[]}var Ar=`
|
|
3
3
|
.anticon {
|
|
4
4
|
display: inline-block;
|
|
5
5
|
color: inherit;
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
transform: rotate(360deg);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jr(t,o){if(t){if(typeof t=="string")return Ln(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ln(t,o)}}function Ln(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Rr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function Ur(t){if(Array.isArray(t))return t}function Bn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Co(t,r,n[r])})}return t}function Co(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Gr(t,o){if(t==null)return{};var n=zr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function zr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}En("#1890ff");var rt=function(o,n){var a,r=Bn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=Gr(r,vr),h=(a={anticon:!0},Co(a,"anticon-".concat(i.name),!!i.name),Co(a,l,l),a),A=d===""||d||i.name==="loading"?"anticon-spin":"",y=c;y===void 0&&u&&(y=-1,f.tabindex=y);var k=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,S=An(p),w=Pr(S,2),O=w[0],m=w[1];return e.createVNode("span",Bn({role:"img","aria-label":i.name},f,{onClick:u,class:h}),[e.createVNode(bo,{class:A,icon:i,primaryColor:O,secondaryColor:m,style:k},null)])};rt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},rt.displayName="AntdIcon",rt.inheritAttrs=!1,rt.getTwoToneColor=Dr,rt.setTwoToneColor=En;const ye=rt;var Hr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Wr=Hr;function On(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){qr(t,r,n[r])})}return t}function qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var wo=function(o,n){var a=On({},o,n.attrs);return e.createVNode(ye,On({},a,{icon:Wr}),null)};wo.displayName="AppstoreAddOutlined",wo.inheritAttrs=!1;const Vn=wo;var Yr={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const Kr=Yr;function In(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Qr(t,r,n[r])})}return t}function Qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var _o=function(o,n){var a=In({},o,n.attrs);return e.createVNode(ye,In({},a,{icon:Kr}),null)};_o.displayName="CaretDownOutlined",_o.inheritAttrs=!1;const Xr=_o;var Jr={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const Zr=Jr;function Fn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){el(t,r,n[r])})}return t}function el(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var xo=function(o,n){var a=Fn({},o,n.attrs);return e.createVNode(ye,Fn({},a,{icon:Zr}),null)};xo.displayName="CaretRightOutlined",xo.inheritAttrs=!1;const tl=xo;var ol={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const nl=ol;function $n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){al(t,r,n[r])})}return t}function al(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ko=function(o,n){var a=$n({},o,n.attrs);return e.createVNode(ye,$n({},a,{icon:nl}),null)};ko.displayName="CloseOutlined",ko.inheritAttrs=!1;const So=ko;var rl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const ll=rl;function Dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){il(t,r,n[r])})}return t}function il(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ao=function(o,n){var a=Dn({},o,n.attrs);return e.createVNode(ye,Dn({},a,{icon:ll}),null)};Ao.displayName="CopyOutlined",Ao.inheritAttrs=!1;const sl=Ao;var cl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const dl=cl;function vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){pl(t,r,n[r])})}return t}function pl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var No=function(o,n){var a=vn({},o,n.attrs);return e.createVNode(ye,vn({},a,{icon:dl}),null)};No.displayName="DeleteOutlined",No.inheritAttrs=!1;const ul=No;var fl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const ml=fl;function Pn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){hl(t,r,n[r])})}return t}function hl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var To=function(o,n){var a=Pn({},o,n.attrs);return e.createVNode(ye,Pn({},a,{icon:ml}),null)};To.displayName="DoubleRightOutlined",To.inheritAttrs=!1;const yl=To;var gl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const bl=gl;function Mn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Cl(t,r,n[r])})}return t}function Cl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Eo=function(o,n){var a=Mn({},o,n.attrs);return e.createVNode(ye,Mn({},a,{icon:bl}),null)};Eo.displayName="DownOutlined",Eo.inheritAttrs=!1;const wl=Eo;var _l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const xl=_l;function jn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){kl(t,r,n[r])})}return t}function kl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Lo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(ye,jn({},a,{icon:xl}),null)};Lo.displayName="InfoCircleOutlined",Lo.inheritAttrs=!1;const Sl=Lo;var Al={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const Nl=Al;function Rn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Tl(t,r,n[r])})}return t}function Tl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ye,Rn({},a,{icon:Nl}),null)};Bo.displayName="MinusCircleOutlined",Bo.inheritAttrs=!1;const El=Bo;var Ll={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const Bl=Ll;function Un(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ol(t,r,n[r])})}return t}function Ol(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ye,Un({},a,{icon:Bl}),null)};Oo.displayName="PlusCircleOutlined",Oo.inheritAttrs=!1;const Vl=Oo;var Il={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Fl=Il;function Gn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){$l(t,r,n[r])})}return t}function $l(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vo=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:Fl}),null)};Vo.displayName="PlusOutlined",Vo.inheritAttrs=!1;const Dl=Vo;var vl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const Pl=vl;function zn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ml(t,r,n[r])})}return t}function Ml(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Io=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:Pl}),null)};Io.displayName="QuestionCircleOutlined",Io.inheritAttrs=!1;const jl=Io;var Rl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const Ul=Rl;function Hn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Gl(t,r,n[r])})}return t}function Gl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Fo=function(o,n){var a=Hn({},o,n.attrs);return e.createVNode(ye,Hn({},a,{icon:Ul}),null)};Fo.displayName="ReloadOutlined",Fo.inheritAttrs=!1;const zl=Fo;var Hl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Wl=Hl;function Wn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ql(t,r,n[r])})}return t}function ql(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var $o=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(ye,Wn({},a,{icon:Wl}),null)};$o.displayName="SettingOutlined",$o.inheritAttrs=!1;const Yl=$o,Kl=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:tl,CaretDownOutlined:Xr,AInputSearch:v.InputSearch,ASpin:v.Spin,APagination:v.Pagination,Draggable:Ct},setup(){var m;const t=(m=window==null?void 0:window.config)==null?void 0:m.pageId,o=e.inject(Be),n=e.unref(e.inject(Oe)),a=e.inject(Me),r=e.computed(()=>{var N;return(N=e.unref(a))==null?void 0:N.graphicConfig}),l=e.computed(()=>{var N;return(N=e.unref(r))==null?void 0:N.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const N={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const g=await o.post(`${ke}/diagram/sourceList`,N,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:B,data:V={}}=g.data;if(B){const{rows:T=[],total:M=0}=V;T==null||T.forEach(j=>{var W;j.show=!1,(W=j.dataViewColumns)==null||W.forEach(I=>{I.show=!0,I.edit=!1,I.title&&(I.label=I.title)})}),i.value=T,s.totalResult=+M}}catch{d.value=!1}},u=N=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[N],f=N=>{i.value[N].show=!i.value[N].show},h=()=>{s.currentPage=1,p()},A=re.debounce(()=>{s.currentPage=1,p()},200),y=(N,g)=>{s.pageSize=g,s.currentPage=N,p()};e.onMounted(()=>{p()});const k=e.inject(pe),S=e.computed(()=>{const N=["classificationList","rowHeaderList","dimensionList"];let g=[];for(const B in e.unref(k))if(Object.prototype.hasOwnProperty.call(e.unref(k),B)&&N.includes(B)){const V=e.unref(k)[B];Array.isArray(V)&&(g=g.concat(V))}return g});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:h,onChange:A,onPaginationChange:y,searchText:c,setItemDisabled:(N=[])=>{let g=!1;for(const B of e.unref(S))if(!N.find(T=>T.typeGuid===B.typeGuid)){g=!0;break}return g},onDragStart:(N,g)=>{const B=g[N.oldIndex];B&&sessionStorage.setItem("indicator-list-item",JSON.stringify(B))}}}}),zu="",Ql={class:"data-source-list"},Xl={class:"columns"},Jl={class:"column-item"},Zl=["onClick"],ei={key:0},ti={class:"column-child-item"},oi={class:"column-child-item-name"};function ni(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Xl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Jl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:A=>t.onToggleGroup(h)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,Zl)]),f.show?(e.openBlock(),e.createElementBlock("div",ei,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":A=>f.dataViewColumns=A,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:A=>t.onDragStart(A,f.dataViewColumns)},{item:e.withCtx(({element:A})=>[e.createElementVNode("div",ti,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(A.scope))+"】 ",1),e.createElementVNode("span",oi,e.toDisplayString(A.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const ai=te(Kl,[["render",ni],["__scopeId","data-v-c4000c1e"]]),ri=e.defineComponent({name:"DataList",components:{DataSourceList:ai,DataViewList:er},setup(){return{source:e.inject(io)}}});function li(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const ii=te(ri,[["render",li]]),qn={mounted(t){t.focus()}},si=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:Ct,AModal:v.Modal,AButton:v.Button},setup(t,{expose:o}){var O;const n=(O=window==null?void 0:window.config)==null?void 0:O.pageId,a=e.inject(Be),r=e.unref(e.inject(Oe)),l=e.inject(pe),i=e.inject(Se),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const m=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:N,data:g=[]}=m.data;N&&(c.value=g==null?void 0:g.slice(0,200))}catch(m){console.error(m)}},u=()=>{var V;const m=((V=e.unref(l)[t.type])==null?void 0:V.slice())||[],N=m[t.index],{label:g,name:B}=t.item;N.sort={label:g,columnName:B,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:m})};let f=!1;const h=()=>{f=!0},A=e.ref(!1),y=()=>{A.value=!0},k=()=>{A.value=!1},S=()=>{f&&u(),f=!1,k()};return o({showModal:y}),e.watch(A,m=>{var N,g;if(m){const B=(g=(N=t.item)==null?void 0:N.sort)==null?void 0:g.customOrderColumns;B==null?p():c.value=B}else c.value=[];window.changeShowTable&&window.changeShowTable(!m)},{flush:"post"}),{visible:A,onCancel:S,customSortList:c,onChange:h,onDeleteConfig:()=>{var V;const m=((V=e.unref(l)[t.type])==null?void 0:V.slice())||[],N=m[t.index],{label:g,name:B}=t.item;N.sort={label:g,columnName:B},i({[t.type]:m}),k()}}}}),Hu="",ci={class:"button-wrapper"},di={class:"sort-item"};function pi(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",ci,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",di,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const ui=te(si,[["render",pi],["__scopeId","data-v-8e16d201"]]),fi=e.defineComponent({name:"CustomGroupModal",directives:{focus:qn},components:{CloseOutlined:So,AModal:v.Modal,ASelect:v.Select,ASelectOption:v.SelectOption,AButton:v.Button,AInput:v.Input,ACheckbox:v.Checkbox,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ATag:v.Tag,ACheckableTag:v.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var $;const n=e.inject(Be),a=($=window==null?void 0:window.config)==null?void 0:$.pageId,r=e.unref(e.inject(Oe));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const b=e.unref(c).map(_=>_.title);return new Set(b)}),u=e.ref([]);e.watch(()=>e.unref(c).length,b=>{u.value=new Array(b).fill(!1)});const f=e.computed(()=>{let b=0;return e.unref(c).forEach(_=>{var L;(L=_.data)==null||L.forEach(P=>{P.checked&&b++})}),b}),h=()=>{const b=e.unref(d);if(!b){v.message.error("创建分组名不能空");return}e.unref(p).has(b)?v.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:b,data:[]}),l=!0)},A=b=>{e.unref(c).splice(b,1),l=!0},y=e.ref(null),k=()=>{if(e.unref(f)===0){v.message.error("当前移入分组已选个数为0");return}const b=e.unref(y);if(b==null){v.message.error("请选择移入分组");return}if(!e.unref(c)[b]){v.message.error("移入分组不存在,请重新选择");return}const _=[],L=e.unref(c).length;for(let P=0;P<L;P++){const D=e.unref(c)[P];e.unref(c)[P].data=D.data.filter(H=>(H.checked&&_.push({...H,checked:!1}),!H.checked))}e.unref(c)[b].data=[..._,...e.unref(c)[b].data],l=!0},S=b=>{e.unref(u)[b]=!0},w=b=>{e.unref(u)[b]=!1},O=(b,_)=>{const L=b.target.value;e.unref(p).has(L)&&v.message.error("组名不能相同,请修改"),e.unref(c)[_].title=L,l=!0},m=e.inject(pe),N=e.inject(Se),g=e.computed(()=>e.unref(m).source),B=e.computed(()=>e.unref(m).dataViewId),V=e.ref(!1),T=()=>{var Q,X;const b=e.unref(c);let _="";e.unref(V)&&(_=(Q=b[0])==null?void 0:Q.title);const L=b==null?void 0:b.length,P={};for(let oe=1;oe<L;oe++){const ne=b[oe]||{},{title:J,data:ae}=ne;P[J]=(ae==null?void 0:ae.map(me=>me.label))||[]}const D=((X=e.unref(m)[t.type])==null?void 0:X.slice())||[],H=D[t.index];H.customGroup={groupInfoMap:P,otherGroupName:_},N({[t.type]:D})},M=e.ref(!1),j=()=>{M.value=!0},W=()=>{M.value=!1},I=()=>{W(),l&&T(),l=!1},x=()=>{l=!0},F=new Set,C=async()=>{const b=t.item.customGroup||{},_=b.otherGroupName,L=b.groupInfoMap;(_===""||_==null)&&(V.value=!1),e.unref(c)[0]={title:_||"未分组",data:[]};let P=1;for(const D in L)if(Object.prototype.hasOwnProperty.call(L,D)){const Q=L[D].map(X=>(F.add(X),{label:X,checked:!1}));e.unref(c)[P]={title:D,data:Q},P++}await E()},E=async()=>{var b;try{const _=await n.post(`${ke}/diagram/groupvalue`,{source:e.unref(g),dataViewId:e.unref(B),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:L,data:P=[]}=_.data;if(L){const D=[];(b=P==null?void 0:P.slice(0,200))==null||b.forEach(H=>{F.has(H)||D.push({label:H,checked:!1})}),e.unref(c)[0].data=D}}catch(_){console.error(_)}};return e.watch(M,b=>{b&&C(),window.changeShowTable&&window.changeShowTable(!b)},{flush:"post"}),o({showModal:j}),{visible:M,title:i,activeKey:s,customGroupList:c,onCancel:I,useOtherGroup:V,selectCount:f,createGroupTitle:d,onAddGroup:h,onDeleteGroup:A,onMoveInGroup:k,selectGroupIndex:y,onEditTitle:S,onTitleChange:O,onFinishEditTitle:w,onUseOtherGroup:x,customGroupEditTitleList:u}}}),Wu="",qu="",mi={class:"custom-group-header"},hi={class:"move-and-create"},yi={class:"select-tip"},gi={class:"select-count"},bi={class:"create-group"},Ci={class:"custom-group-content"},wi=["onClick"],_i={class:"extra"},xi={class:"custom-group-list"},ki={class:"text"};function Si(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),A=e.resolveComponent("a-collapse-panel"),y=e.resolveComponent("a-collapse"),k=e.resolveComponent("a-modal"),S=e.resolveDirective("focus");return e.openBlock(),e.createBlock(k,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",mi,[e.createElementVNode("div",hi,[e.createElementVNode("div",null,[e.createElementVNode("span",yi,[e.createTextVNode(" 已选"),e.createElementVNode("span",gi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=w=>t.selectGroupIndex=w),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,O)=>(e.openBlock(),e.createBlock(i,{key:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",bi,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=w=>t.createGroupTitle=w),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=w=>t.useOtherGroup=w),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Ci,[e.createVNode(y,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=w=>t.activeKey=w),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,O)=>(e.openBlock(),e.createBlock(A,{key:O},{header:e.withCtx(()=>[t.customGroupEditTitleList[O]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:w.title,size:"small",onChange:m=>t.onTitleChange(m,O),onBlur:m=>t.onFinishEditTitle(O),onPressEnter:m=>t.onFinishEditTitle(O)},null,8,["value","onChange","onBlur","onPressEnter"])),[[S]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(m=>t.onEditTitle(O),["prevent","stop"])},e.toDisplayString(w.title),9,wi))]),extra:e.withCtx(()=>[e.createElementVNode("div",_i,[O===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),O!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(m=>t.onDeleteGroup(O),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.data,(m,N)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:m.checked,"onUpdate:checked":g=>m.checked=g,class:"custom-group",key:N},{default:e.withCtx(()=>[e.createElementVNode("span",ki,e.toDisplayString(m.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Ai=te(fi,[["render",Si],["__scopeId","data-v-7e3049d2"]]);var Ni=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Do={},Ti={get exports(){return Do},set exports(t){Do=t}};(function(t,o){(function(n,a){t.exports=a()})(Ni,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(Ti);const Ei=Do;de.extend(Ei);const Li=e.defineComponent({name:"Condition",components:{CloseOutlined:So,DownOutlined:wl,AppstoreAddOutlined:Vn,ASelect:v.Select,AInput:v.Input,ADatePicker:v.DatePicker,AButton:v.Button,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem,ASubMenu:v.SubMenu,APopover:v.Popover,ATabs:v.Tabs,ATabPane:v.TabPane,ARadioGroup:v.RadioGroup,ARadio:v.Radio,AInputNumber:v.InputNumber,ASelectOption:v.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var Ze,mt,ht,et,Ye,tt,yt,xe,ve,Ge,ot,Ke;const o=(Ze=window==null?void 0:window.config)==null?void 0:Ze.pageId,n=e.inject(pe),a=e.inject(Be),r=e.unref(e.inject(Oe)),l=e.inject(sn),i=e.inject(ze),d=e.ref(!1),s=de(),c=e.computed(()=>{var z;const R=[];return(z=e.unref(i))==null||z.forEach(K=>{const{keyName:Z="",id:ee="",type:ue}=K;ue==="ecanRangePicker"?R.push({value:`${ee}-startTime`,label:`${Z||ee}-开始时间值`,keyName:`${Z||ee}-startTime`,id:ee},{value:`${ee}-endTime`,label:`${Z||ee}-结束时间值`,keyName:`${Z||ee}-endTime`,id:ee}):R.push({value:ee,label:`${Z||ee}`,keyName:`${Z||ee}`,id:ee})}),R}),p=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.dataViewId}),u=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.source}),f=e.ref(!1),h={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},A=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],y=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),k=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),S=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],w=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],O=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],m=e.ref({fieldName:(mt=t.data)==null?void 0:mt.fieldName,fieldType:(ht=t.data)==null?void 0:ht.fieldType,rule:(et=t.data)==null?void 0:et.rule,id:(Ye=t.data)==null?void 0:Ye.id,fieldValue:N(),label:(tt=t.data)==null?void 0:tt.label,targetSource:"",typeGuid:(yt=t.data)==null?void 0:yt.typeGuid,indexCode:(xe=t.data)==null?void 0:xe.indexCode,indexCodeNum:(ve=t.data)==null?void 0:ve.indexCodeNum,dataType:((Ge=t.data)==null?void 0:Ge.dataType)||"",componentId:((ot=t.data)==null?void 0:ot.componentId)||"",useCurrentTime:!!((Ke=t.data)!=null&&Ke.useCurrentTime)});function N(){const{fieldType:R="",dataType:z="",fieldValue:K=""}=t.data;if(R==="DATE"&&z==="time")return K&&de(K);if(z==="component"){const Z=e.unref(c).find(ee=>ee.keyName===K);return Z?Z.value:K}else return K}const g=e.ref(!1),B=e.computed(()=>m.value.fieldType==="DATE"),V=e.computed(()=>{const R=t.type;let z=[];const K=["classificationList","seriesList","rowHeaderList","dimensionList"];if(K.includes(R)){let Z=[];for(const ee in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ee)&&!["controlList","sqlConditions"].includes(ee)){const ue=e.unref(n)[ee];Array.isArray(ue)&&(K.includes(ee)?Z=Z.concat(ue.filter(ge=>ge.show)):Z=Z.concat(ue))}z=Z}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(R)&&(z=e.unref(l));return z.map(Z=>({...Z,value:Z.name}))}),{updateCondition:T,deleteCondition:M}=e.inject(ln,{updateCondition:(R,z,K)=>{},deleteCondition:(R,z)=>{}}),j=()=>{M(t.level,t.index)};e.watch(m,R=>{const z=re.cloneDeep(R);R.fieldType==="DATE"&&R.dataType!=="component"&&R.fieldValue&&(z.fieldValue=R.fieldValue.format(R.dateFormat)),T(z,t.level,t.index)},{deep:!0}),e.watch(d,R=>{m.value.fieldValue="",m.value.useCurrentTime=R});const W=R=>{const z=e.unref(V).find(U=>U.value===R)||{},{name:K,genericType:Z,id:ee,label:ue,typeGuid:ge,indexCode:gt,indexCodeNum:bt}=z;m.value={id:ee,fieldName:K,fieldType:Z,label:ue,rule:"",fieldValue:Z==="DATE"?null:void 0,targetSource:"",typeGuid:ge,indexCode:gt,indexCodeNum:bt,dataType:"",useCurrentTime:!1}},I=R=>{const z=e.unref(c).find(K=>K.value===R)||{};e.unref(m).componentId=z.id||""},x=e.computed(()=>{const R=e.unref(m).fieldType;return R==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:R==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:R==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),F=e.computed(()=>{let R="";const z=e.unref(x).find(K=>K.value===e.unref(m).rule);return z&&(R=z.label),R}),C=e.computed(()=>{let R={fontSize:"12px"};return e.unref(F)||(R={...R,position:"absolute",right:"11px",top:"9px"}),R}),E=e.ref([]),$=async()=>{var R;if(!(e.unref(E).length>0))try{const z=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(m).fieldName,hrpIndexTypeGuid:e.unref(m).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:K,data:Z=[]}=z.data;K&&(E.value=(R=Z==null?void 0:Z.slice(0,200))==null?void 0:R.map(ee=>({label:ee,value:ee})))}catch(z){console.error(z)}},b=R=>{e.unref(m).rule=R,e.unref(m).fieldValue=e.unref(m).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(R)&&$()},_=R=>{e.unref(m).dataType=R,e.unref(m).fieldValue=""},L=e.ref(),P=R=>{L.value=R,e.unref(m).fieldValue=(R==null?void 0:R.join(","))||""},D=R=>{const{keyPath:z}=R;e.unref(m).rule=z[0],e.unref(m).dataType=z[1],e.unref(m).dateFormat=z[2],e.unref(m).fieldValue=""};e.onMounted(()=>{var Z,ee,ue,ge,gt,bt,U;if(m.value.dataType=((Z=t.data)==null?void 0:Z.dataType)||"",m.value.componentId=((ee=t.data)==null?void 0:ee.componentId)||"",e.unref(m).fieldType==="DATE"){const{activeKey:G,dateCalcTypes:q=[]}=t.data||{};if(e.unref(m).dateFormat=(ue=t.data)==null?void 0:ue.dateFormat,e.unref(m).activeKey=G,e.unref(m).calcWays=((ge=t.data)==null?void 0:ge.calcWays)||[],e.unref(m).dateCalcTypes=q,e.unref(m).useCurrentTime&&e.unref(m).dataType!=="component"&&(d.value=!0),G===5){const Y=e.unref(m).calcWays[0];if(Y){const se=Y.split("-");e.unref(y).expression=se[0],e.unref(y).around=se[1]}e.unref(y).unit=q[0]||"YEAR"}else{e.unref(m).radioValue=((gt=t.data)==null?void 0:gt.radioValue)||"";const Y=e.unref(k).find(se=>{var ce;return se.key===((ce=t.data)==null?void 0:ce.activeKey)});Y&&ae(Y,t.data)}}else L.value=((U=(bt=t.data)==null?void 0:bt.fieldValue)==null?void 0:U.split(","))||[];const{fieldType:R,fieldName:z,rule:K}=m.value;R!=="DATE"&&z&&K&&["IN","NOT_IN"].includes(K)&&$()});const H=R=>{if(e.unref(m).activeKey===R){e.unref(k)[R].radioValue=e.unref(m).radioValue,e.unref(k)[e.unref(m).activeKey]&&(e.unref(k)[e.unref(m).activeKey].radioValue=e.unref(m).radioValue,e.unref(m).radioValue==="1"?e.unref(k)[R].beforeNum=e.unref(m).calcWays[0]:e.unref(m).radioValue==="2"&&(e.unref(k)[R].afterNum=e.unref(m).calcWays[0]));return}e.unref(k).forEach(z=>{z.beforeNum=0,z.afterNum=0,z.radioValue="1",z.value=""})},Q=(R,z)=>{f.value=!0;const K=R.target.value,Z=z.type,ee=e.unref(m).dateFormat,ue=Math.abs(z.beforeNum),ge=z.afterNum;z.value=me(K,Z,ee,ue,ge)},X=R=>{const z=e.unref(m).activeKey;if(R!==z)return;let K="";z===0?K="years":z===1?K="quarters":z===2?K="months":z===3?K="weeks":z===4&&(K="days");const Z=e.unref(m).dateFormat,ee=e.unref(m).radioValue;let ue=0,ge=0;return ee==="1"?ue=Math.abs(e.unref(m).calcWays[0]):ee==="2"&&(ge=e.unref(m).calcWays[0]),me(ee,K,Z,ue,ge)},oe=(R,z,K,Z)=>{if(f.value=!0,z.radioValue===Z){const ee=R.target.value;K==="+"?z.value=de().add(ee,z.type).format(e.unref(m).dateFormat):z.value=de().subtract(ee,z.type).format(e.unref(m).dateFormat)}},ne=(R,z)=>{e.unref(m).calcWays||(e.unref(m).calcWays=[]),e.unref(m).activeKey=z,e.unref(m).radioValue=R.radioValue,R.radioValue==="1"?e.unref(m).calcWays[0]="-"+R.beforeNum:R.radioValue==="2"?e.unref(m).calcWays[0]=R.afterNum:R.radioValue==="3"?z===4?e.unref(m).calcWays[0]="0":e.unref(m).calcWays[0]="BEGIN":R.radioValue==="4"&&(e.unref(m).calcWays[0]="END"),z===0?e.unref(m).dateCalcTypes=["YEAR"]:z===1?e.unref(m).dateCalcTypes=["QUARTER"]:z===2?e.unref(m).dateCalcTypes=["MONTH"]:z===3?e.unref(m).dateCalcTypes=["WEEK"]:z===4&&(e.unref(m).dateCalcTypes=["DAY"]),g.value=!1},J=()=>{e.unref(m).activeKey=5,e.unref(m).dateCalcTypes=[e.unref(y).unit],e.unref(m).calcWays[0]=`${e.unref(y).expression}-${e.unref(y).around}`,g.value=!1};function ae(R,z){const{radioValue:K="",calcWays:Z=[]}=z;R.radioValue=K,Z!=null&&Z.length&&(K==="1"?R.beforeNum=Math.abs(Z[0]):K==="2"&&(R.afterNum=Z[0]))}function me(R,z,K,Z,ee){if(R==="1")return de().subtract(Z,z).format(K);if(R==="2")return de().add(ee,z).format(K);if(R==="3"){if(z==="years")return de().startOf("year").format(K);if(z==="quarters")return de().startOf("quarter").format(K);if(z==="months")return de().startOf("month").format(K);if(z==="days")return de().format(K)}else if(R==="4"){if(z==="years")return de().endOf("year").format(K);if(z==="quarters")return de().endOf("quarter").format(K);if(z==="months")return de().endOf("month").format(K)}return""}return{fieldOptions:V,ruleOptions:x,onFieldChange:W,condition:m,valueOptions:E,onRuleChange:b,onDataTypeChange:_,onFieldValueSelectChange:P,fieldValues:L,onDelete:j,isDateType:B,formatList:A,tabDateList:k,compareList:S,menuRule:w,dateBtnLabel:F,downIconStyle:C,popoverVisible:g,dateRadioStyle:h,showTime:f,controlList:c,dataTypeList:O,customTabData:y,isUseCurrentTime:d,currentTime:s,handleMenuClick:D,changeTabInitDate:H,changeRadioValue:Q,getFieldValue:X,blurCompare:oe,okDatePickConfig:ne,onChangeComponent:I,filterOption:(R,z)=>z.label.toLowerCase().indexOf(R.toLowerCase())>=0,okCustomConfig:J}}}),Yu="",Ku="",Bi={class:"condition"},Oi=["title"],Vi={class:"rule"},Ii={class:"data-type"},Fi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},$i={class:"popover-content-wrap"},Di={key:0,class:"use-current-time"},vi={class:"tabFilterRadio"},Pi={key:0},Mi={key:1},ji={style:{"margin-left":"10px"}},Ri={style:{"margin-left":"10px"}},Ui={style:{position:"absolute",bottom:"10px"}},Gi={style:{display:"flex"}},zi={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function Hi(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),A=e.resolveComponent("a-date-picker"),y=e.resolveComponent("a-checkbox"),k=e.resolveComponent("a-input-number"),S=e.resolveComponent("a-radio"),w=e.resolveComponent("a-radio-group"),O=e.resolveComponent("a-tab-pane"),m=e.resolveComponent("a-tabs"),N=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),B=e.resolveComponent("a-input"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Bi,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(T,M)=>(e.openBlock(),e.createBlock(i,{key:M,value:T.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:T.label},e.toDisplayString(T.label),9,Oi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Vi,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,T=>(e.openBlock(),e.createBlock(c,{key:T.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,M=>{var j;return e.openBlock(),e.createBlock(c,{key:M.value,disabled:M.value==="component"&&!((j=t.controlList)!=null&&j.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===M.value?"color: #1890FF;":"")},e.toDisplayString(M.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,W=>(e.openBlock(),e.createBlock(s,{key:W.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===M.value&&t.condition.dateFormat===W.value?"color: #1890FF;":"")},e.toDisplayString(W.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",Ii,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(T,M)=>(e.openBlock(),e.createBlock(i,{key:M,value:T.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Fi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(A,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(A,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=T=>t.condition.fieldValue=T),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(g,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=T=>t.popoverVisible=T),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",$i,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Di,[e.createVNode(y,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=T=>t.isUseCurrentTime=T)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(m,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(T,M)=>(e.openBlock(),e.createBlock(O,{key:M,tab:T.label},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[e.createVNode(w,{value:T.radioValue,"onUpdate:value":j=>T.radioValue=j,onChange:j=>t.changeRadioValue(j,T)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Pi,"相对当前时间:"+e.toDisplayString(T.value),1)):(e.openBlock(),e.createElementBlock("div",Mi,"相对当前时间:"+e.toDisplayString(t.getFieldValue(M)),1)),e.createVNode(S,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(k,{value:T.beforeNum,"onUpdate:value":j=>T.beforeNum=j,min:0,onBlur:j=>t.blurCompare(j,T,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ji,e.toDisplayString(T.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(S,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(k,{value:T.afterNum,"onUpdate:value":j=>T.afterNum=j,min:0,onBlur:j=>t.blurCompare(j,T,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Ri,e.toDisplayString(T.afterLabel),1)]),_:2},1032,["style"]),T.beforeText?(e.openBlock(),e.createBlock(S,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),T.afterText?(e.openBlock(),e.createBlock(S,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",Ui,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=j=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:j=>t.okDatePickConfig(T,M)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(O,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",Gi,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=T=>t.customTabData.expression=T),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=T=>t.customTabData.unit=T),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=T=>t.customTabData.around=T)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",zi,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=T=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=T=>{t.popoverVisible=!0})},[e.createVNode(N)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(B,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=T=>t.condition.fieldValue=T)},null,8,["value"])),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Wi=te(Li,[["render",Hi],["__scopeId","data-v-122d8ca3"]]),qi=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Wi}}),Qu="",Yi={key:0,class:"condition-list"},Ki={key:0,class:"condition-container"},Qi={key:0,class:"condition-text"},Xi={key:1,class:"condition-text"},Ji={class:"conditions"};function Zi(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Ki,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",Qi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Xi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Ji,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const es=te(qi,[["render",Zi],["__scopeId","data-v-86c0c5aa"]]),ts=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:v.Select,AInput:v.Input,AInputNumber:v.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=re.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Xu="",Yn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),os={class:"truncations"},ns={class:"rule"},as={class:"field-value"},rs={class:"field-value"},ls=Yn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),is=Yn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),ss=["onClick"];function cs(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",ns,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",as,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",rs,[ls,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),is]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,ss)]))),128))])}const ds=te(ts,[["render",cs],["__scopeId","data-v-f543c690"]]),Ie=(t,o)=>{if(typeof t=="string"&&typeof o=="string")return t.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const r=o[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},ps=t=>t.replace(/\\n/g,`
|
|
59
|
-
`),jt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Rt=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Rt(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},Kn=(t,o)=>{var k;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,u=[],f=[...a,...r,...l,...i,...d,...s,...c,...p],h=[];for(const S of f){const w=Rt((S==null?void 0:S.conditions)||[]);if(w!=null&&w.length){const O=w.filter(m=>Qn(m,o)?(m==null?void 0:m.dataType)==="component":!1).map(m=>{const N=Qn(m,o),g={};return m!=null&&m.dateFormat&&(g.format=m.dateFormat),{conditionKey:m.fieldName,conditionLabel:m.fieldName,conditionName:m.fieldName,conditionValueType:m.fieldType,id:N.id,keyName:m.fieldValue,rule:m.rule,notGlobal:!0,indexCode:m.indexCode,typeGuid:m.typeGuid,indexCodeNum:m.indexCodeNum,...g}});if(O!=null&&O.length)for(const m of O)h.find(N=>N.keyName===m.keyName)||h.push(m)}}const A=n.concat(h),y=A.length;for(let S=0;S<y;S++){const w=A[S];if(w&&!((k=Object.keys(w))!=null&&k.length)||(w==null?void 0:w.conditionKey)==="parentCode")continue;const{id:O,keyName:m,conditionLabel:N,conditionKey:g,conditionValueType:B,prop:V,rule:T="NONE",notGlobal:M=!1,format:j,indexCode:W,indexCodeNum:I,typeGuid:x,dataType:F="component",customValue:C}=w;let E=m||O;E&&V&&(E+=`-${V}`);const $=o.find(X=>X.id===O),b={rule:T,label:N,fieldName:g,fieldValue:"",valueType:B,alias:E,globalCondition:!M,indexCode:W,indexCodeNum:I,typeGuid:x},{value:_,format:L="YYYY-MM-DD",operate:P,type:D="",useCurrentTime:H}=$||{},Q=j||L;if(Ie(D,"date")){let X;if(H?X=de():X=de(_),P&&_){const{mode:oe,type:ne,value:J}=P;if(J)switch(ne){case"add":X=X.add(J,oe);break;case"minus":X=X.subtract(J,oe);break}}b.fieldValue=(X==null?void 0:X.format(Q))||"",b.dateFormat=Q}else if(D==="ecanRangePicker"){const{interval:X,intervalUnit:oe}=$||{};let ne=V;if(!V){const ae=m==null?void 0:m.split("-");ae!=null&&ae.length&&(ne=ae[ae.length-1])}if(!ne)return;let J=null;if(H&&(ne==="startTime"?J=de().subtract(X,oe):ne==="endTime"&&(J=de())),$[ne]&&(J=de($[ne])),P){const{type:ae,value:me,mode:qe}=P;switch(ae){case"add":J=J&&J.add(me,qe);break;case"minus":J=J&&J.subtract(me,qe)}}J&&(b.fieldValue=J==null?void 0:J.format(Q)),b.dateFormat=Q}else{const X=_&&_.match(/\{(.+?)\}/g);X!=null&&X.length?b.fieldValue="":b.fieldValue=_}F===""&&(b.fieldValue=C||""),u.push(b)}for(let S=u.length-1;S>=0;S--){const w=u[S];w.globalCondition||u.find(m=>m.alias===w.alias&&m.globalCondition)&&u.splice(S,1)}return u},Ut=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break;case"ecanImage":o="click";break}return o};function Qn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let vo=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const us=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:es,TruncationList:ds,AModal:v.Modal,AButton:v.Button,ATabs:v.Tabs,ATabPane:v.TabPane},setup(t,{expose:o}){var W;const n=e.ref("1"),a=()=>{var I;return`添加过滤条件-${((I=t.item)==null?void 0:I.label)||""}`},r=e.inject(pe),l=e.inject(Se),i=e.inject(ze),d=e.computed(()=>{var I;return(I=e.unref(r))==null?void 0:I.dataSourceId}),s=e.inject(Me),c=e.inject($t),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,I=>{var x,F,C,E;I&&(Array.isArray((x=t.item)==null?void 0:x.conditions)&&(p.value=re.cloneDeep((F=t.item)==null?void 0:F.conditions)||[]),Array.isArray((C=t.item)==null?void 0:C.truncations)?u.value=re.cloneDeep((E=t.item)==null?void 0:E.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!I)},{flush:"post"});let h=!1;const A=I=>{var x;h=!0,e.unref(p)==null||((x=e.unref(p))==null?void 0:x.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==I?p.value=[{join:I,conditions:[e.unref(p)[0],{keyValue:vo()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===I&&p.value[0].conditions.push({keyValue:vo()}))};e.provide(ln,{updateCondition(I,x,F){var E;h=!0;let C=e.unref(p);for(let $=0;$<x&&C[0];$++)C=(E=C[0])==null?void 0:E.conditions;Array.isArray(C)&&C[F]&&(C[F]=I)},deleteCondition(I,x){var C,E;h=!0;let F=e.unref(p);for(let $=0;$<I&&F[0];$++)F=(C=F[0])==null?void 0:C.conditions;if(Array.isArray(F)&&F[x]&&(F.splice(x,1),F.length===1)){let $=e.unref(p);const b=I-2>0?I-2:0;for(let _=0;_<b&&$[0];_++)$=(E=$[0])==null?void 0:E.conditions;$[0].join===F[0].join?$[0].conditions=[...F[0].conditions,...$[0].conditions.slice(1)]:$[0]=F[0]}}});const y=I=>{h=!0,u.value=I},k=e.computed(()=>{var x;const I=[];return(x=e.unref(i))==null||x.forEach(F=>{const{keyName:C="",id:E="",type:$}=F;$==="ecanRangePicker"?I.push({value:`${E}-startTime`,label:`${C||E}-开始时间值`,keyName:`${C||E}-startTime`},{value:`${E}-endTime`,label:`${C||E}-结束时间值`,keyName:`${C||E}-endTime`}):I.push({value:E,label:`${C||E}`,keyName:`${C||E}`})}),I}),S=()=>{var b,_;const{controlList:I=[]}=e.unref(r),x=((b=e.unref(r)[t.type])==null?void 0:b.slice())||[],F=Rt(re.cloneDeep(x[t.index].conditions));x[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((_=e.unref(u))!=null&&_.length)&&(x[t.index].truncations=e.unref(u));const C=Rt(e.unref(p));for(const L of C)if(L.dataType==="component"&&L.fieldValue){const P=e.unref(k).find(D=>D.value===L.fieldValue);P&&(L.fieldValue=P.keyName)}const E=F.filter(L=>!C.find(P=>P.componentId===L.componentId)).filter(L=>!I.find(P=>P.id===L.componentId)),$=C.filter(L=>!F.find(P=>P.componentId===L.componentId));w(E,$),l({[t.type]:x,sqlConditions:Kn({...e.unref(r),[t.type]:x},e.unref(i))})};function w(I,x){var C;const F=I.map(E=>({...E,delete:!0})).concat(x.map(E=>({...E,add:!0})));for(const E of F){const $=e.unref(i).find(b=>b.id===E.componentId);if($){const{type:b,id:_,events:L=[]}=$,P=Ut(b);if(E.add)L.find(D=>{var H;return D.on===P&&D.target===((H=e.unref(s))==null?void 0:H.id)&&D.emit==="refreshData"})||c({id:_,events:[...L,{on:P,target:(C=e.unref(s))==null?void 0:C.id,emit:"refreshData"}].reverse()});else if(E.delete){const D=L.findIndex(H=>{var Q;return H.on===P&&H.target===((Q=e.unref(s))==null?void 0:Q.id)&&H.emit==="refreshData"});D!==-1&&(L.splice(D,1),c({id:_,events:L}))}}}}const O=()=>{f.value=!0},m=()=>{p.value=[],f.value=!1},N=()=>{h&&S(),h=!1,m()},g=()=>{m()},B=e.inject(Be),V=e.unref(e.inject(Oe)),T=(W=window==null?void 0:window.config)==null?void 0:W.pageId,M=e.ref([]);e.provide(sn,M);const j=async I=>{var x;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:F,indexCode:C}=I,E=await B.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:T,dataSourceId:e.unref(d),indexGuid:F,indexCode:C},{headers:{Authentication:V,operateContext:"ygt"}}),{success:$,data:b=[]}=E.data;$&&((x=b==null?void 0:b.dataViewColumns)!=null&&x.length)&&(M.value=b.dataViewColumns.map(_=>({..._,label:_.title||_.label})))}catch(F){console.error(F)}};return e.watch(()=>t.item,I=>{I&&f.value&&j(I)}),o({showModal:O}),{visible:f,onOk:N,onCancel:g,handleTitle:a,conditionList:p,truncationList:u,addCondition:A,onUpdatetruncation:y,activeKey:n}}}),Ju="",fs={class:"header"},ms={class:"header"};function hs(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",fs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ms,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const ys=te(us,[["render",hs],["__scopeId","data-v-4fa1b1f2"]]),gs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:v.Input,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Se),l=e.ref(),i=p=>{const{showLabel:u="",label:f=""}=p;l.value=u||f||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),Zu="",bs=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Cs={class:"config-name"},ws=bs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function _s(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Cs,[ws,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const xs=te(gs,[["render",_s],["__scopeId","data-v-de6a1755"]]),ks=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Se),l=e.inject(ze),i=e.inject(Me),d=e.inject($t),s=e.ref(),c=e.computed(()=>{var S;return(S=e.unref(l))==null?void 0:S.filter(w=>w.keyName!=="")});let p=[];const u=S=>{const{sortCpnts:w=[]}=S;p=re.cloneDeep(w),s.value=re.cloneDeep(w),n.value=!0},f=()=>{n.value=!1},h=()=>{var N;const{controlList:S=[]}=e.unref(a),w=p.filter(g=>!e.unref(s).includes(g)).filter(g=>!S.find(B=>B.id===g)),O=e.unref(s).filter(g=>!p.includes(g)).filter(g=>!S.find(B=>B.id===g)),m=w.map(g=>({componentId:g,delete:!0})).concat(O.map(g=>({componentId:g,add:!0})));for(const g of m){const B=e.unref(l).find(V=>V.id===g.componentId);if(B){const{type:V,id:T,events:M=[]}=B,j=Ut(V);if(g.add)M.find(W=>{var I;return W.on===j&&W.target===((I=e.unref(i))==null?void 0:I.id)&&W.emit==="refreshData"})||d({id:T,events:[...M,{on:j,target:(N=e.unref(i))==null?void 0:N.id,emit:"refreshData"}].reverse()});else if(g.delete){const W=M.findIndex(I=>{var x;return I.on===j&&I.target===((x=e.unref(i))==null?void 0:x.id)&&I.emit==="refreshData"});W!==-1&&(M.splice(W,1),d({id:T,events:M}))}}}},A=()=>{var w;h();const S=((w=e.unref(a)[t.type])==null?void 0:w.slice())||[];S[t.index].sortCpnts=s.value,r({[t.type]:S}),f()},y=()=>{f()},k=(S,w)=>{var O;return(O=w==null?void 0:w.keyName)==null?void 0:O.toLowerCase().includes(S==null?void 0:S.toLowerCase())};return o({showModal:u}),{visible:n,onOk:A,onCancel:y,idFilterOption:k,fieldName:s,usedComponentList:c}}}),ef="",Ss=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),As={class:"sort-by-cpnt"},Ns=Ss(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function Ts(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",As,[Ns,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Es=te(ks,[["render",Ts],["__scopeId","data-v-2943f455"]]),Ls=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Se),l=e.ref(),i=e.ref([]),d=(f,h)=>{const{dimByCount:A=""}=f;l.value=A,i.value=h.filter(y=>["DIM","BUILT_IN_DIM"].includes(y.scope)).map(y=>({label:y.title||y.name,value:y.typeGuid})),n.value=!0},s=()=>{n.value=!1},c=()=>{var h;const f=((h=e.unref(a)[t.type])==null?void 0:h.slice())||[];f[t.index].dimByCount=l.value,r({[t.type]:f}),s()},p=()=>{s()},u=(f,h)=>{var A;return(A=h==null?void 0:h.label)==null?void 0:A.toLowerCase().includes(f==null?void 0:f.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:l,dimensionList:i}}}),tf="",Bs=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),Os={class:"dim-by-count"},Vs=Bs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Is(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[Vs,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Fs=te(Ls,[["render",Is],["__scopeId","data-v-e8608437"]]),Po=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:Po(t,r.children)&&(n=Po(t,r.children)))}return n},$s=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:v.Row,ACol:v.Col,ATextarea:v.Textarea,APopover:v.Popover,AInputSearch:v.InputSearch,ATree:v.Tree,DoubleRightOutlined:yl},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Be),a=e.unref(e.inject(Oe)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{console.log("graphicConfig",r);const g=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return t.mode==="edit"?(g==null?void 0:g.filter(B=>{var V;return B.id!==((V=t.item)==null?void 0:V.id)}))||[]:g||[]}),p=e.computed({get:()=>t.value||"",set:g=>{o("update:value",g),o("change",g)}}),u=e.ref(""),f=g=>{const B=document.getElementById("calTextArea");let V=p.value;if(document.selection){const T=document.selection.createRange();T.text=g}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const T=B.selectionStart,M=B.selectionEnd;let j=T;V=V.substring(0,T)+g+V.substring(M,V.length),j+=g.length,B.selectionStart=B.selectionEnd=j}else V+=g;p.value=V},h=["+","-","*","/","(",")"],A=(g,B)=>{let V="";switch(B){case"name":{V="${"+g+"}";break}case"function":{V=g+"()";break}default:V=g}f(V)},y=[],k=e.ref([]),S=e.ref(!0),w=e.ref([]),O=g=>{var B;for(const V of g)(B=V==null?void 0:V.children)!=null&&B.length?O(V.children):y.push({key:V.key,title:V.title})},m=async()=>{try{const g=await n.get(`${ke}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:V=[]}=g.data;B&&(V!=null&&V.length)&&(O(V),w.value=V)}catch(g){console.error(g)}},N=g=>{k.value=g,S.value=!1};return e.watch(u,g=>{const B=y.map(V=>V.title.indexOf(g)>-1?Po(V.key,w.value):null).filter((V,T,M)=>V&&M.indexOf(V)===T);k.value=B,u.value=g,S.value=!0}),e.onMounted(()=>{m()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:w,searchFuncValue:u,expandedKeys:k,autoExpandParent:S,selectedElem:A,onExpand:N}}}),of="",nf="",Ds={class:"formula-calculation"},vs={class:"field-area"},Ps=["onClick"],Ms={class:"cal_right_bottom"},js={class:"cal_fu"},Rs=["onClick"],Us={class:"function-wrap"},Gs={class:"wrap-search"},zs={class:"tree-box"},Hs={key:0},Ws={style:{color:"#f50"}},qs={key:1},Ys=["onClick"],Ks={class:"cal_a"};function Qs(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Ds,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",vs,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,A)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:A,onClick:y=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,Ps))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",Ms,[e.createElementVNode("ul",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,A)=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.selectedElem(h,"symbol"),key:A},e.toDisplayString(h),9,Rs))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",Us,[e.createElementVNode("div",Gs,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",zs,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:A})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Hs,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Ws,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",qs,e.toDisplayString(h),1)),A?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:y=>t.selectedElem(h,"function")},"插入",8,Ys)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Ks,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Xs=te($s,[["render",Qs],["__scopeId","data-v-d5a15c98"]]),Js=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Xs,AForm:v.Form,AModal:v.Modal,AFormItem:v.FormItem,AInput:v.Input,ASelect:v.Select,ASelectOption:v.SelectOption,ATextarea:v.Textarea,AInputNumber:v.InputNumber,ATooltip:v.Tooltip,QuestionCircleOutlined:jl},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(ze),a=e.inject(pe),r=e.inject(Se),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const I=["leftAxisList","rightAxisList","queryColumnList","indicators"];let x=[];for(const F of I)Object.prototype.hasOwnProperty.call(e.unref(a),F)&&(x=x.concat(e.unref(a)[F]));return x}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},f=e.ref({}),h=e.ref(),A=e.ref(!1),y=e.ref();e.watch(A,I=>{if(I)if(t.mode==="edit"){const{label:x,calcType:F,formula:C,builtInValueSource:E,builtInFormula:$,builtInCalcWay:b}=t.item;if(y.value={label:x,calcType:F,formula:C,builtInValueSource:E,builtInFormula:$,builtInCalcWay:b},$==="DATE_OFFSET"){const _=b.split("-");(_==null?void 0:_.length)===3&&(f.value={value:_[0],unit:_[1],around:_[2]})}}else t.mode==="add"&&(y.value=re.cloneDeep(p),f.value=re.cloneDeep(u));else y.value=re.cloneDeep(p),f.value=re.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!I)},{immediate:!0,deep:!0});let k=!1;const S=()=>{k=!0},w=I=>{const x=e.unref(l).find(F=>F.id===I);x&&(y.value.builtInCalcWay=x.keyName),k=!0},O=()=>{var E;const I=((E=e.unref(a)[t.type])==null?void 0:E.slice())||[],{label:x,builtInFormula:F}=e.unref(y)||{},C={};if(F==="DATE_OFFSET"&&(C.builtInCalcWay=`${e.unref(f).value}-${e.unref(f).unit}-${e.unref(f).around}`),t.mode==="add"){const $=vo();I.push({...e.unref(y),...C,id:$,show:!0,name:x})}else t.mode==="edit"&&(I[t.index]={...I[t.index],...e.unref(y),...C,name:x});r({[t.type]:I})},m=()=>{A.value=!0},N=()=>{A.value=!1},g=async(I,x)=>{if(x==="")return Promise.reject(new Error("请输入指标名"));{const F=e.unref(d).find(C=>C.label===x);return F?F.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},B=e.computed(()=>{let I={label:[{required:!0,validator:g,trigger:"change"}]};return y.value.calcType==="BUILT_IN"&&(I={...I,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),I}),V=()=>{h.value.validate().then(()=>{k&&O(),k=!1,N()})},T=()=>{h.value.clearValidate(),N()},M=()=>{k=!0,e.unref(y).builtInCalcWay=""},j=e.computed(()=>{let I="";const x=e.unref(y).builtInCalcWay,F=e.unref(y).builtInValueSource;if(!F||!x)return I;switch(e.unref(y).builtInFormula){case"BUILT_IN_RANK":{x==="ASC"?I="【"+F+"】由小到大在所有值中的排名":I="【"+F+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{I=`所有【】的
|
|
60
|
-
`,
|
|
61
|
-
`,x){case"SUM":{C="求和";break}case"AVG":{C="求平均值";break}case"MIN":{C="求最小值";break}case"MAX":{C="求最大值";break}}I=I+"将所有【"+F+"】"+C;break}}return I}),W=(I,x)=>x.keyName.toLowerCase().indexOf(I.toLowerCase())>=0;return o({showModal:m}),{visible:A,onCancel:T,labelCol:s,wrapperCol:c,formState:y,builtInValueSourceList:i,onOK:V,onChange:S,formRules:B,accessLogic:j,formRef:h,onChangeBuiltInFormula:M,componentList:l,onChangeComponent:w,filterOption:W,offsetConfig:f}}}),af="",rf="",Zs={key:0,class:"accesstip"},ec={style:{display:"flex","align-items":"center"}};function tc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-input-number"),h=e.resolveComponent("question-circle-outlined"),A=e.resolveComponent("a-tooltip"),y=e.resolveComponent("a-form"),k=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(k,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(y,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=S=>t.formState.label=S),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=S=>t.formState.calcType=S),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=S=>t.formState.formula=S),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=S=>t.formState.builtInFormula=S),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(s,{value:"DATE_OFFSET"},{default:e.withCtx(()=>[e.createTextVNode("日期偏移")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=S=>t.formState.builtInValueSource=S),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(S,w)=>(e.openBlock(),e.createBlock(s,{key:w,value:S.label,disabled:t.item.label===S.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=S=>t.formState.builtInCalcWay=S),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Zs," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=S=>t.formState.builtInValueSource=S),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createVNode(f,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=S=>t.offsetConfig.value=S),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=S=>t.offsetConfig.unit=S),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=S=>t.offsetConfig.around=S),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(A,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(h,{class:"icon",style:{color:"#989898","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const oc=te(Js,[["render",tc],["__scopeId","data-v-c0f3affa"]]),nc=e.defineComponent({name:"DataConfigCard",directives:{focus:qn},components:{CalculationModal:oc,FilterModal:ys,CustomGroupModal:Ai,SettingOutlined:Yl,DeleteOutlined:ul,CopyOutlined:sl,InfoCircleOutlined:Sl,CustomSortModal:ui,PlusOutlined:Dl,ACard:v.Card,ACheckbox:v.Checkbox,AInput:v.Input,ADropdown:v.Dropdown,AMenu:v.Menu,ASubMenu:v.SubMenu,AMenuItem:v.MenuItem,AMenuDivider:v.MenuDivider,ASelect:v.Select,APopover:v.Popover,Draggable:Ct,ConfigName:xs,SortByCpnt:Es,DimByCount:Fs},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(pe),a=e.inject(Se),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(io),d=(U={})=>{var Y;const{type:G}=t;if(e.unref(i)==="SQL_VIEW")return!0;let q=!1;if(["IDX","BUILT_IN_IDX"].includes(U.scope)?r.includes(G)&&(q=!0):["DIM","BUILT_IN_DIM"].includes(U.scope)&&l.includes(G)&&(q=!0),G==="dimensionList"){const se=((Y=e.unref(n)[G])==null?void 0:Y.slice())||[];(se==null?void 0:se.length)===1&&(q=!1)}return q},s=e.computed(()=>e.unref(ge).type==="ecanDataSelect"&&t.type==="indicators"),c=(U="{}")=>{var G;try{const q=JSON.parse(U);if(!d(q))return;const Y=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(s))&&Y.forEach(se=>{se.show=!1}),u(Y,q),Y.push(q),a({[t.type]:Y}),sessionStorage.setItem("indicator-list-item","")}catch(q){console.error(q)}},p=(U="{}")=>{var G;try{const{cardItem:q,type:Y,index:se}=JSON.parse(U);if(!d(q)||Y===t.type)return;const ce=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];u(ce,q),ce.push(q);const le=e.unref(n)[Y].slice()||[];le.splice(se,1),a({[t.type]:ce,[Y]:le})}catch(q){console.error(q)}};function u(U,G){const q=[];if(U.forEach(Y=>{Y.label.includes(G.label)&&q.push(Y.label.split(G.label)[1])}),q.length>=1){for(let Y=1;Y<=q.length;Y++)if(!q.includes(Y+"")){G.label=G.label+Y;break}}}const f=(U,G)=>{var se,ce;const q=(se=U.target)==null?void 0:se.checked,Y=((ce=e.unref(n)[t.type])==null?void 0:ce.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(s))&&Y.forEach(le=>{le.show=!1}),Y[G].show=q,a({[t.type]:Y})},h=U=>{var q;const G=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];G.splice(U,1),a({[t.type]:G})},A=()=>{sessionStorage.setItem("indicator-card-item","")},y=()=>{const U=sessionStorage.getItem("indicator-list-item"),G=sessionStorage.getItem("indicator-card-item");U?c(U):G&&p(G)},k=U=>{var Pe,nt;const{newIndex:G,oldIndex:q,from:Y,to:se}=U,ce=Y.id,le=se.id;if(G>=0&&q>=0){if(ce===le){const ie=((Pe=e.unref(n)[t.type])==null?void 0:Pe.slice())||[],fe=ie.splice(q,1)[0];fe&&(ie.splice(G,0,fe),a({[t.type]:ie}))}else if(t.type===le){const ie=((nt=e.unref(n)[le])==null?void 0:nt.slice())||[];if(ie!=null&&ie.length){const fe=ie.splice(ie.length-1,1)[0];fe&&(ie.splice(G,0,fe),a({[t.type]:ie}))}}}},S=(U,G)=>{const q=U.oldIndex,Y=G[q];Y&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:Y,type:t.type,index:q}))},w=e.computed(()=>e.unref(n)[t.type]||[]),O=e.ref([]);let m=!1;e.watch(()=>e.unref(w).length,U=>{O.value=new Array(U).fill(!1)},{flush:"post",immediate:!0});const N=U=>{var q;const G=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];G.splice(U,1),a({[t.type]:G})},g=U=>{O.value[U]=!0},B=()=>{m=!0},V=(U,G,q)=>{var Y,se;if(O.value[G]=!1,m){const ce=(Y=U.target)==null?void 0:Y.value,le=((se=e.unref(n)[t.type])==null?void 0:se.slice())||[],Pe=le.filter(ie=>{var fe;return(fe=ie==null?void 0:ie.formula)==null?void 0:fe.includes(q)}).map(ie=>ie.id),nt=le.filter(ie=>{var fe;return(fe=ie==null?void 0:ie.builtInValueSource)==null?void 0:fe.includes(q)}).map(ie=>ie.id);if(Pe!=null&&Pe.length)for(const ie of Pe){const fe=le.find(en=>en.id===ie);fe.formula=fe.formula.replaceAll(q,ce)}if(nt!=null&&nt.length)for(const ie of nt){const fe=le.find(en=>en.id===ie);fe.builtInValueSource=fe.builtInValueSource.replaceAll(q,ce)}le[G].label=ce,a({[t.type]:le})}m=!1},T="DEFAULT",M=e.computed(()=>{const U=e.unref(n)[t.type]||[],{leftAxisList:G=[],rightAxisList:q=[],indicators:Y=[]}=e.unref(n)||{};return[{id:T,label:"默认",name:"默认"},...U,...G,...q,...Y]}),j=(U={},G,q="ASC")=>{var Pe;const{label:Y,name:se,id:ce}=U,le=((Pe=e.unref(n)[t.type])==null?void 0:Pe.slice())||[];ce===T?delete le[G].sort:le[G].sort={label:Y,columnName:se,type:"NORMAL",order:q},a({[t.type]:le})},W=(U={},G="ASC")=>{const Y={ASC:"升序",DESC:"降序"}[G],{sort:se}=U,{label:ce,order:le}=se||{};return ce&&le===G?`${Y}(${ce})`:Y},I=e.ref(),x=e.ref(),F=e.ref(),C=e.ref(),E=(U={},G)=>{var q;I.value=U,x.value=G,(q=e.unref(F))==null||q.showModal()},$=U=>{var G;return"自定义排序"+(((G=U==null?void 0:U.sort)==null?void 0:G.type)==="CUSTOM"?"(已配置)":"")},b=(U={},G)=>{var q;I.value=U,x.value=G,(q=e.unref(C))==null||q.showModal()},_=U=>"自定义分组"+((U==null?void 0:U.customGroup)!=null?"(已配置)":""),L=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],P=[{name:"是",value:1},{name:"否",value:0}],D=(U,G)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[G].aggregate=U,a({[t.type]:q})},H=(U,G)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[G].distinct=U,a({[t.type]:q})},Q=(U,G)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[G].dateFormat=U,a({[t.type]:q})},X=(U="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[U]})`,oe=U=>`是否去重(${{0:"否",1:"是"}[U]||"否"})`,ne=(U={})=>{var G;return"过滤"+(U!=null&&U.conditions&&((G=U==null?void 0:U.conditions)==null?void 0:G.length)>0?"(已配置)":"")},J=e.ref(),ae=e.ref(),me=e.ref(),qe=e.ref(),Ze=(U={},G)=>{I.value=U,x.value=G,e.unref(J).showModal()},mt=(U={},G)=>{I.value=U,x.value=G,e.unref(ae).showModal(U)},ht=(U={},G)=>{I.value=U,x.value=G,e.unref(me).showModal(U)},et=(U={},G)=>{I.value=U,x.value=G,e.unref(qe).showModal(U,e.unref(Z))},Ye=e.ref(),tt=e.ref("add"),yt=(U,G,q)=>{var Y;tt.value=U,U==="edit"&&(I.value=G,x.value=q),(Y=e.unref(Ye))==null||Y.showModal()},xe=e.inject(Be),ve=e.unref(e.inject(Oe)),Ge=e.ref([]),ot=e.computed(()=>e.unref(n)[t.type]||{}),Ke=async()=>{try{const U=await xe.post(`${ke}/diagram/dimFields`,{},{headers:{Authentication:ve,operateContext:"ygt"}}),{success:G,data:q=[]}=U.data;G&&(Ge.value=q)}catch(U){console.error(U)}},R=(U,G)=>{const q=e.unref(n)[t.type]||{};q[G]=U,a({[t.type]:q})},z=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],K=e.ref({}),Z=e.ref([]),ee=async(U,G)=>{var Y;const{name:q}=G;if(!z.includes(t.type)&&U&&jt(G,"indexCode")){const se=await xe.post(`${ke}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:G.id,indexCode:G.indexCode,pageId:(Y=window==null?void 0:window.config)==null?void 0:Y.pageId},{headers:{Authentication:ve,operateContext:"ygt"}}),{success:ce,data:le}=se.data;ce&&le&&(Z.value=(le==null?void 0:le.dataViewColumns)||[],K.value[q]={name:le.name,code:le.indexCode})}},ue=U=>{const G=document.createElement("input");document.body.appendChild(G),G.setAttribute("value",U),G.select(),document.execCommand("copy"),document.body.removeChild(G),v.message.success("复制成功")},ge=e.inject(Me),gt=e.computed(()=>t.type==="indicators"&&e.unref(ge).type==="ecanTable"),bt=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ge).type==="ecanDataSelect"?Ge.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:Ke())}),{onCheckboxChange:f,onDropEnd:h,onDragItemEnd:A,onDragItemAdd:y,onDragItemSort:k,onDragItemStart:S,cardItemList:w,onDelete:N,onEdit:g,onCommitLabelChange:V,sortList:M,onSort:j,handleSortTitle:W,showCustomSortModal:E,customSortModalRef:F,currentItem:I,currentIndex:x,handleCustomSortTitle:$,handleCustomGroupTitle:_,customGroupModalRef:C,showCustomGroupModal:b,editLabelList:O,onLabelChange:B,aggregateList:L,distinctList:P,onAggregateChange:D,onDistinctChange:H,onDateFormatChange:Q,handleAggregateTitle:X,handleDistinctTitle:oe,onShowCalculationModal:yt,handleFilterTitle:ne,filterModalRef:J,configNameRef:ae,sortByCpntRef:me,dimByCountRef:qe,showFilterModal:Ze,calculationModalRef:Ye,calculationModalMode:tt,formatList:o,fieldOptions:Ge,fieldData:ot,onFieldChange:R,onVisibleChange:ee,copyDataViewName:ue,dataViewMap:K,isShowConfigName:gt,showConfigNameModal:mt,dimensionType:z,isShowSortByCpnt:bt,showSortByCpntModal:ht,dataSelectIndicators:s,showDimByCountModal:et}}}),lf="",sf="",lt=t=>(e.pushScopeId("data-v-eaf71f1f"),t=t(),e.popScopeId(),t),ac={class:"title"},rc={class:"title-text"},lc={class:"field-wrap"},ic={class:"field-item"},sc=lt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),cc={class:"field-item"},dc=lt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),pc={class:"title"},uc={class:"title-text"},fc=lt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),mc=lt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),hc={class:"card-item-wrap"},yc={class:"card-item-inner"},gc=["onClick"],bc=["onClick"],Cc=["onClick"],wc={style:{display:"flex","align-items":"center"}},_c=["title"],xc=lt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),kc={style:{display:"flex","align-items":"center"}},Sc=["title"],Ac=lt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Nc(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),f=e.resolveComponent("setting-outlined"),h=e.resolveComponent("a-menu-item"),A=e.resolveComponent("a-sub-menu"),y=e.resolveComponent("a-menu-divider"),k=e.resolveComponent("copy-outlined"),S=e.resolveComponent("a-menu"),w=e.resolveComponent("a-dropdown"),O=e.resolveComponent("delete-outlined"),m=e.resolveComponent("a-checkbox"),N=e.resolveComponent("draggable"),g=e.resolveComponent("custom-sort-modal"),B=e.resolveComponent("custom-group-modal"),V=e.resolveComponent("filter-modal"),T=e.resolveComponent("config-name"),M=e.resolveComponent("sort-by-cpnt"),j=e.resolveComponent("dim-by-count"),W=e.resolveComponent("calculation-modal"),I=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",ac,[e.createElementVNode("div",rc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createElementVNode("div",ic,[sc,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=x=>t.onFieldChange(x,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",cc,[dc,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=x=>t.onFieldChange(x,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",pc,[e.createElementVNode("div",uc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[fc]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(x=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),mc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(N,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=x=>t.cardItemList=x),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=x=>t.onDragItemStart(x,t.cardItemList))},{item:e.withCtx(({element:x,index:F})=>[e.createElementVNode("div",hc,[e.createVNode(m,{class:"card-item",checked:x.show,onChange:C=>t.onCheckboxChange(C,F)},{default:e.withCtx(()=>[e.createElementVNode("div",yc,[!t.editLabelList[F]&&x.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(C=>t.onEdit(F),["prevent","stop"])},e.toDisplayString(x.label),9,gc)):e.createCommentVNode("",!0),!t.editLabelList[F]&&!x.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(C=>t.onEdit(F),["prevent","stop"])}," 请点击填入名字 ",8,bc)):e.createCommentVNode("",!0),t.editLabelList[F]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":x.label,size:"small",onBlur:C=>t.onCommitLabelChange(C,F,x.label),onPressEnter:C=>t.onCommitLabelChange(C,F,x.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[I]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(x.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(C=>t.onShowCalculationModal("edit",x,F),["prevent","stop"])}," fx ",8,Cc)):e.createCommentVNode("",!0),e.createVNode(w,{trigger:["click"],onVisibleChange:C=>t.onVisibleChange(C,x)},{overlay:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:t.handleSortTitle(x,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.id,onClick:E=>t.onSort(C,F,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(A,{title:t.handleSortTitle(x,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,C=>(e.openBlock(),e.createBlock(h,{class:"menu-item",style:{"white-space":"nowrap"},key:C.id,onClick:E=>t.onSort(C,F,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h,{onClick:C=>t.showCustomSortModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(y),e.createVNode(h,{onClick:C=>t.showCustomGroupModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(y),x.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.value,onClick:E=>t.onDateFormatChange(C.value,F)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(x.dateFormat===C.value||!x.dateFormat&&C.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(C.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(y)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(h,{onClick:C=>t.showFilterModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(x)),1)]),_:2},1032,["onClick"]),e.createVNode(y),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(A,{title:t.handleAggregateTitle(x.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.value,onClick:E=>t.onAggregateChange(C.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(y)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(h,{onClick:C=>t.showConfigNameModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(y)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(h,{onClick:C=>t.showSortByCpntModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(y)],64)):e.createCommentVNode("",!0),x.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(h,{onClick:C=>t.showDimByCountModal(x,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(y),e.createVNode(A,{title:t.handleDistinctTitle(x.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.value,onClick:E=>t.onDistinctChange(C.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(y)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[x.name]?(e.openBlock(),e.createBlock(h,{key:0,onClick:C=>t.copyDataViewName(t.dataViewMap[x.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",wc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[x.name].name},[xc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[x.name].name),1)],8,_c),e.createVNode(k,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[x.name]?(e.openBlock(),e.createBlock(h,{key:1,onClick:C=>t.copyDataViewName(t.dataViewMap[x.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[x.name].code},[Ac,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[x.name].code),1)],8,Sc),e.createVNode(k,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(f,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(O,{class:"delete-icon",onClick:e.withModifiers(C=>t.onDelete(F),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(g,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(B,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(V,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(T,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(M,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(j,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(W,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const Tc=te(nc,[["render",Nc],["__scopeId","data-v-eaf71f1f"]]),Ec={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},Lc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Tc},setup(){const t=e.inject(Me),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Se),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var k,S;const s=re.cloneDeep((k=e.unref(t))==null?void 0:k.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"]},u="ecan";let f=e.unref(o);if(f.startsWith(u)){const w=u.length;f=((S=f.slice(w,w+1))==null?void 0:S.toLowerCase())+f.slice(w+1)}const h=p[f],A=Ec,y=(h==null?void 0:h.length)||0;for(let w=0;w<y;w++){const O=h[w];if(!O)break;r.push({...A[O],type:O})}for(const w of c)i(s,w)&&!h.find(O=>O===w)&&(s[w]=[]);l(s)})(),{cardsMap:a,cards:r}}}),cf="",df="",Bc={class:"data-group"};function Oc(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Vc=te(Lc,[["render",Oc],["__scopeId","data-v-dad9b990"]]),Ic=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Fc={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},$c=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:v.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function Dc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const vc=te($c,[["render",Dc]]),Pc=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?o("change",u):o("change",`${u}${f}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Mc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const Xn=te(Pc,[["render",Mc]]),jc=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:v.RadioGroup,ARadioButton:v.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function Rc(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const Uc=te(jc,[["render",Rc]]),Gc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function zc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const Hc=te(Gc,[["render",zc]]),Wc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:v.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function qc(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const Yc=te(Wc,[["render",qc]]);var be="top",Ne="bottom",Te="right",Ce="left",Mo="auto",kt=[be,Ne,Te,Ce],it="start",St="end",Kc="clippingParents",Jn="viewport",At="popper",Qc="reference",Zn=kt.reduce(function(t,o){return t.concat([o+"-"+it,o+"-"+St])},[]),ea=[].concat(kt,[Mo]).reduce(function(t,o){return t.concat([o,o+"-"+it,o+"-"+St])},[]),Xc="beforeRead",Jc="read",Zc="afterRead",ed="beforeMain",td="main",od="afterMain",nd="beforeWrite",ad="write",rd="afterWrite",ld=[Xc,Jc,Zc,ed,td,od,nd,ad,rd];function Fe(t){return t?(t.nodeName||"").toLowerCase():null}function _e(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function Qe(t){var o=_e(t).Element;return t instanceof o||t instanceof Element}function Ee(t){var o=_e(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function jo(t){if(typeof ShadowRoot>"u")return!1;var o=_e(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function id(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Ee(l)||!Fe(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function sd(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Ee(r)||!Fe(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const cd={name:"applyStyles",enabled:!0,phase:"write",fn:id,effect:sd,requires:["computeStyles"]};function $e(t){return t.split("-")[0]}var Xe=Math.max,Gt=Math.min,st=Math.round;function Ro(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function ta(){return!/^((?!chrome|android).)*safari/i.test(Ro())}function ct(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Ee(t)&&(r=t.offsetWidth>0&&st(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&st(a.height)/t.offsetHeight||1);var i=Qe(t)?_e(t):window,d=i.visualViewport,s=!ta()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function Uo(t){var o=ct(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(o.width-n)<=1&&(n=o.width),Math.abs(o.height-a)<=1&&(a=o.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function oa(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&jo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Re(t){return _e(t).getComputedStyle(t)}function dd(t){return["table","td","th"].indexOf(Fe(t))>=0}function We(t){return((Qe(t)?t.ownerDocument:t.document)||window.document).documentElement}function zt(t){return Fe(t)==="html"?t:t.assignedSlot||t.parentNode||(jo(t)?t.host:null)||We(t)}function na(t){return!Ee(t)||Re(t).position==="fixed"?null:t.offsetParent}function pd(t){var o=/firefox/i.test(Ro()),n=/Trident/i.test(Ro());if(n&&Ee(t)){var a=Re(t);if(a.position==="fixed")return null}var r=zt(t);for(jo(r)&&(r=r.host);Ee(r)&&["html","body"].indexOf(Fe(r))<0;){var l=Re(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Nt(t){for(var o=_e(t),n=na(t);n&&dd(n)&&Re(n).position==="static";)n=na(n);return n&&(Fe(n)==="html"||Fe(n)==="body"&&Re(n).position==="static")?o:n||pd(t)||o}function Go(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Tt(t,o,n){return Xe(t,Gt(o,n))}function ud(t,o,n){var a=Tt(t,o,n);return a>n?n:a}function aa(){return{top:0,right:0,bottom:0,left:0}}function ra(t){return Object.assign({},aa(),t)}function la(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var fd=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ra(typeof o!="number"?o:la(o,kt))};function md(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=$e(n.placement),s=Go(d),c=[Ce,Te].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=fd(r.padding,n),f=Uo(l),h=s==="y"?be:Ce,A=s==="y"?Ne:Te,y=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],k=i[s]-n.rects.reference[s],S=Nt(l),w=S?s==="y"?S.clientHeight||0:S.clientWidth||0:0,O=y/2-k/2,m=u[h],N=w-f[p]-u[A],g=w/2-f[p]/2+O,B=Tt(m,g,N),V=s;n.modifiersData[a]=(o={},o[V]=B,o.centerOffset=B-g,o)}}function hd(t){var o=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=o.elements.popper.querySelector(r),!r)||oa(o.elements.popper,r)&&(o.elements.arrow=r))}const yd={name:"arrow",enabled:!0,phase:"main",fn:md,effect:hd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dt(t){return t.split("-")[1]}var gd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:st(n*r)/r||0,y:st(a*r)/r||0}}function ia(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,h=f===void 0?0:f,A=i.y,y=A===void 0?0:A,k=typeof p=="function"?p({x:h,y}):{x:h,y};h=k.x,y=k.y;var S=i.hasOwnProperty("x"),w=i.hasOwnProperty("y"),O=Ce,m=be,N=window;if(c){var g=Nt(n),B="clientHeight",V="clientWidth";if(g===_e(n)&&(g=We(n),Re(g).position!=="static"&&d==="absolute"&&(B="scrollHeight",V="scrollWidth")),g=g,r===be||(r===Ce||r===Te)&&l===St){m=Ne;var T=u&&g===N&&N.visualViewport?N.visualViewport.height:g[B];y-=T-a.height,y*=s?1:-1}if(r===Ce||(r===be||r===Ne)&&l===St){O=Te;var M=u&&g===N&&N.visualViewport?N.visualViewport.width:g[V];h-=M-a.width,h*=s?1:-1}}var j=Object.assign({position:d},c&&gd),W=p===!0?bd({x:h,y},_e(n)):{x:h,y};if(h=W.x,y=W.y,s){var I;return Object.assign({},j,(I={},I[m]=w?"0":"",I[O]=S?"0":"",I.transform=(N.devicePixelRatio||1)<=1?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",I))}return Object.assign({},j,(o={},o[m]=w?y+"px":"",o[O]=S?h+"px":"",o.transform="",o))}function Cd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:$e(o.placement),variation:dt(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:r,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,ia(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,ia(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const wd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Cd,data:{}};var Ht={passive:!0};function _d(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=_e(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,Ht)}),d&&s.addEventListener("resize",n.update,Ht),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Ht)}),d&&s.removeEventListener("resize",n.update,Ht)}}const xd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_d,data:{}};var kd={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(t){return t.replace(/left|right|bottom|top/g,function(o){return kd[o]})}var Sd={start:"end",end:"start"};function sa(t){return t.replace(/start|end/g,function(o){return Sd[o]})}function zo(t){var o=_e(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function Ho(t){return ct(We(t)).left+zo(t).scrollLeft}function Ad(t,o){var n=_e(t),a=We(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=ta();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+Ho(t),y:s}}function Nd(t){var o,n=We(t),a=zo(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=Xe(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Xe(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+Ho(t),s=-a.scrollTop;return Re(r||n).direction==="rtl"&&(d+=Xe(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Wo(t){var o=Re(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ca(t){return["html","body","#document"].indexOf(Fe(t))>=0?t.ownerDocument.body:Ee(t)&&Wo(t)?t:ca(zt(t))}function Et(t,o){var n;o===void 0&&(o=[]);var a=ca(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=_e(a),i=r?[l].concat(l.visualViewport||[],Wo(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(Et(zt(i)))}function qo(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Td(t,o){var n=ct(t,!1,o==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function da(t,o,n){return o===Jn?qo(Ad(t,n)):Qe(o)?Td(o,n):qo(Nd(We(t)))}function Ed(t){var o=Et(zt(t)),n=["absolute","fixed"].indexOf(Re(t).position)>=0,a=n&&Ee(t)?Nt(t):t;return Qe(a)?o.filter(function(r){return Qe(r)&&oa(r,a)&&Fe(r)!=="body"}):[]}function Ld(t,o,n,a){var r=o==="clippingParents"?Ed(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=da(t,c,a);return s.top=Xe(p.top,s.top),s.right=Gt(p.right,s.right),s.bottom=Gt(p.bottom,s.bottom),s.left=Xe(p.left,s.left),s},da(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function pa(t){var o=t.reference,n=t.element,a=t.placement,r=a?$e(a):null,l=a?dt(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case be:s={x:i,y:o.y-n.height};break;case Ne:s={x:i,y:o.y+o.height};break;case Te:s={x:o.x+o.width,y:d};break;case Ce:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?Go(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case it:s[c]=s[c]-(o[p]/2-n[p]/2);break;case St:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function Lt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?Kc:d,c=n.rootBoundary,p=c===void 0?Jn:c,u=n.elementContext,f=u===void 0?At:u,h=n.altBoundary,A=h===void 0?!1:h,y=n.padding,k=y===void 0?0:y,S=ra(typeof k!="number"?k:la(k,kt)),w=f===At?Qc:At,O=t.rects.popper,m=t.elements[A?w:f],N=Ld(Qe(m)?m:m.contextElement||We(t.elements.popper),s,p,i),g=ct(t.elements.reference),B=pa({reference:g,element:O,strategy:"absolute",placement:r}),V=qo(Object.assign({},O,B)),T=f===At?V:g,M={top:N.top-T.top+S.top,bottom:T.bottom-N.bottom+S.bottom,left:N.left-T.left+S.left,right:T.right-N.right+S.right},j=t.modifiersData.offset;if(f===At&&j){var W=j[r];Object.keys(M).forEach(function(I){var x=[Te,Ne].indexOf(I)>=0?1:-1,F=[be,Ne].indexOf(I)>=0?"y":"x";M[I]+=W[F]*x})}return M}function Bd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?ea:s,p=dt(a),u=p?d?Zn:Zn.filter(function(A){return dt(A)===p}):kt,f=u.filter(function(A){return c.indexOf(A)>=0});f.length===0&&(f=u);var h=f.reduce(function(A,y){return A[y]=Lt(t,{placement:y,boundary:r,rootBoundary:l,padding:i})[$e(y)],A},{});return Object.keys(h).sort(function(A,y){return h[A]-h[y]})}function Od(t){if($e(t)===Mo)return[];var o=Wt(t);return[sa(t),o,sa(o)]}function Vd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,A=h===void 0?!0:h,y=n.allowedAutoPlacements,k=o.options.placement,S=$e(k),w=S===k,O=s||(w||!A?[Wt(k)]:Od(k)),m=[k].concat(O).reduce(function(H,Q){return H.concat($e(Q)===Mo?Bd(o,{placement:Q,boundary:p,rootBoundary:u,padding:c,flipVariations:A,allowedAutoPlacements:y}):Q)},[]),N=o.rects.reference,g=o.rects.popper,B=new Map,V=!0,T=m[0],M=0;M<m.length;M++){var j=m[M],W=$e(j),I=dt(j)===it,x=[be,Ne].indexOf(W)>=0,F=x?"width":"height",C=Lt(o,{placement:j,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),E=x?I?Te:Ce:I?Ne:be;N[F]>g[F]&&(E=Wt(E));var $=Wt(E),b=[];if(l&&b.push(C[W]<=0),d&&b.push(C[E]<=0,C[$]<=0),b.every(function(H){return H})){T=j,V=!1;break}B.set(j,b)}if(V)for(var _=A?3:1,L=function(Q){var X=m.find(function(oe){var ne=B.get(oe);if(ne)return ne.slice(0,Q).every(function(J){return J})});if(X)return T=X,"break"},P=_;P>0;P--){var D=L(P);if(D==="break")break}o.placement!==T&&(o.modifiersData[a]._skip=!0,o.placement=T,o.reset=!0)}}const Id={name:"flip",enabled:!0,phase:"main",fn:Vd,requiresIfExists:["offset"],data:{_skip:!1}};function ua(t,o,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-o.height-n.y,right:t.right-o.width+n.x,bottom:t.bottom-o.height+n.y,left:t.left-o.width-n.x}}function fa(t){return[be,Te,Ne,Ce].some(function(o){return t[o]>=0})}function Fd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=Lt(o,{elementContext:"reference"}),d=Lt(o,{altBoundary:!0}),s=ua(i,a),c=ua(d,r,l),p=fa(s),u=fa(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const $d={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Fd};function Dd(t,o,n){var a=$e(t),r=[Ce,be].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[Ce,Te].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function vd(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=ea.reduce(function(p,u){return p[u]=Dd(u,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const Pd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vd};function Md(t){var o=t.state,n=t.name;o.modifiersData[n]=pa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const jd={name:"popperOffsets",enabled:!0,phase:"read",fn:Md,data:{}};function Rd(t){return t==="x"?"y":"x"}function Ud(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,h=f===void 0?!0:f,A=n.tetherOffset,y=A===void 0?0:A,k=Lt(o,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),S=$e(o.placement),w=dt(o.placement),O=!w,m=Go(S),N=Rd(m),g=o.modifiersData.popperOffsets,B=o.rects.reference,V=o.rects.popper,T=typeof y=="function"?y(Object.assign({},o.rects,{placement:o.placement})):y,M=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),j=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,W={x:0,y:0};if(g){if(l){var I,x=m==="y"?be:Ce,F=m==="y"?Ne:Te,C=m==="y"?"height":"width",E=g[m],$=E+k[x],b=E-k[F],_=h?-V[C]/2:0,L=w===it?B[C]:V[C],P=w===it?-V[C]:-B[C],D=o.elements.arrow,H=h&&D?Uo(D):{width:0,height:0},Q=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:aa(),X=Q[x],oe=Q[F],ne=Tt(0,B[C],H[C]),J=O?B[C]/2-_-ne-X-M.mainAxis:L-ne-X-M.mainAxis,ae=O?-B[C]/2+_+ne+oe+M.mainAxis:P+ne+oe+M.mainAxis,me=o.elements.arrow&&Nt(o.elements.arrow),qe=me?m==="y"?me.clientTop||0:me.clientLeft||0:0,Ze=(I=j==null?void 0:j[m])!=null?I:0,mt=E+J-Ze-qe,ht=E+ae-Ze,et=Tt(h?Gt($,mt):$,E,h?Xe(b,ht):b);g[m]=et,W[m]=et-E}if(d){var Ye,tt=m==="x"?be:Ce,yt=m==="x"?Ne:Te,xe=g[N],ve=N==="y"?"height":"width",Ge=xe+k[tt],ot=xe-k[yt],Ke=[be,Ce].indexOf(S)!==-1,R=(Ye=j==null?void 0:j[N])!=null?Ye:0,z=Ke?Ge:xe-B[ve]-V[ve]-R+M.altAxis,K=Ke?xe+B[ve]+V[ve]-R-M.altAxis:ot,Z=h&&Ke?ud(z,xe,K):Tt(h?z:Ge,xe,h?K:ot);g[N]=Z,W[N]=Z-xe}o.modifiersData[a]=W}}const Gd={name:"preventOverflow",enabled:!0,phase:"main",fn:Ud,requiresIfExists:["offset"]};function zd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Hd(t){return t===_e(t)||!Ee(t)?zo(t):zd(t)}function Wd(t){var o=t.getBoundingClientRect(),n=st(o.width)/t.offsetWidth||1,a=st(o.height)/t.offsetHeight||1;return n!==1||a!==1}function qd(t,o,n){n===void 0&&(n=!1);var a=Ee(o),r=Ee(o)&&Wd(o),l=We(o),i=ct(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((Fe(o)!=="body"||Wo(l))&&(d=Hd(o)),Ee(o)?(s=ct(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=Ho(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function Yd(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function Kd(t){var o=Yd(t);return ld.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Qd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Xd(t){var o=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(o).map(function(n){return o[n]})}var ma={placement:"bottom",modifiers:[],strategy:"absolute"};function ha(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return!o.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function Jd(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?ma:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},ma,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,h={state:p,setOptions:function(S){var w=typeof S=="function"?S(p.options):S;y(),p.options=Object.assign({},l,p.options,w),p.scrollParents={reference:Qe(d)?Et(d):d.contextElement?Et(d.contextElement):[],popper:Et(s)};var O=Kd(Xd([].concat(a,p.options.modifiers)));return p.orderedModifiers=O.filter(function(m){return m.enabled}),A(),h.update()},forceUpdate:function(){if(!f){var S=p.elements,w=S.reference,O=S.popper;if(ha(w,O)){p.rects={reference:qd(w,Nt(O),p.options.strategy==="fixed"),popper:Uo(O)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(M){return p.modifiersData[M.name]=Object.assign({},M.data)});for(var m=0;m<p.orderedModifiers.length;m++){if(p.reset===!0){p.reset=!1,m=-1;continue}var N=p.orderedModifiers[m],g=N.fn,B=N.options,V=B===void 0?{}:B,T=N.name;typeof g=="function"&&(p=g({state:p,options:V,name:T,instance:h})||p)}}}},update:Qd(function(){return new Promise(function(k){h.forceUpdate(),k(p)})}),destroy:function(){y(),f=!0}};if(!ha(d,s))return h;h.setOptions(c).then(function(k){!f&&c.onFirstUpdate&&c.onFirstUpdate(k)});function A(){p.orderedModifiers.forEach(function(k){var S=k.name,w=k.options,O=w===void 0?{}:w,m=k.effect;if(typeof m=="function"){var N=m({state:p,name:S,instance:h,options:O}),g=function(){};u.push(N||g)}})}function y(){u.forEach(function(k){return k()}),u=[]}return h}}var Zd=[xd,jd,wd,cd,Pd,Id,Gd,yd,$d],ep=Jd({defaultModifiers:Zd});function Yo(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function ya(t,o){if(t){if(typeof t=="string")return Yo(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yo(t,o):void 0}}function tp(t){return function(o){if(Array.isArray(o))return Yo(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||ya(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function pt(t){return pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},pt(t)}function ga(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function ba(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){ga(l,a,r,i,d,"next",s)}function d(s){ga(l,a,r,i,d,"throw",s)}i(void 0)})}}var Ca={exports:{}},wa={exports:{}};(function(t){function o(n){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(wa),function(t){var o=wa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(b,_,L){b[_]=L.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(b,_,L){return Object.defineProperty(b,_,{value:L,enumerable:!0,configurable:!0,writable:!0}),b[_]}try{f({},"")}catch{f=function(_,L,P){return _[L]=P}}function h(b,_,L,P){var D=_&&_.prototype instanceof m?_:m,H=Object.create(D.prototype),Q=new E(P||[]);return d(H,"_invoke",{value:I(b,L,Q)}),H}function A(b,_,L){try{return{type:"normal",arg:b.call(_,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=h;var y="suspendedStart",k="suspendedYield",S="executing",w="completed",O={};function m(){}function N(){}function g(){}var B={};f(B,c,function(){return this});var V=Object.getPrototypeOf,T=V&&V(V($([])));T&&T!==l&&i.call(T,c)&&(B=T);var M=g.prototype=m.prototype=Object.create(B);function j(b){["next","throw","return"].forEach(function(_){f(b,_,function(L){return this._invoke(_,L)})})}function W(b,_){function L(D,H,Q,X){var oe=A(b[D],b,H);if(oe.type!=="throw"){var ne=oe.arg,J=ne.value;return J&&o(J)=="object"&&i.call(J,"__await")?_.resolve(J.__await).then(function(ae){L("next",ae,Q,X)},function(ae){L("throw",ae,Q,X)}):_.resolve(J).then(function(ae){ne.value=ae,Q(ne)},function(ae){return L("throw",ae,Q,X)})}X(oe.arg)}var P;d(this,"_invoke",{value:function(D,H){function Q(){return new _(function(X,oe){L(D,H,X,oe)})}return P=P?P.then(Q,Q):Q()}})}function I(b,_,L){var P=y;return function(D,H){if(P===S)throw new Error("Generator is already running");if(P===w){if(D==="throw")throw H;return{value:a,done:!0}}for(L.method=D,L.arg=H;;){var Q=L.delegate;if(Q){var X=x(Q,L);if(X){if(X===O)continue;return X}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(P===y)throw P=w,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);P=S;var oe=A(b,_,L);if(oe.type==="normal"){if(P=L.done?w:k,oe.arg===O)continue;return{value:oe.arg,done:L.done}}oe.type==="throw"&&(P=w,L.method="throw",L.arg=oe.arg)}}}function x(b,_){var L=_.method,P=b.iterator[L];if(P===a)return _.delegate=null,L==="throw"&&b.iterator.return&&(_.method="return",_.arg=a,x(b,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),O;var D=A(P,b.iterator,_.arg);if(D.type==="throw")return _.method="throw",_.arg=D.arg,_.delegate=null,O;var H=D.arg;return H?H.done?(_[b.resultName]=H.value,_.next=b.nextLoc,_.method!=="return"&&(_.method="next",_.arg=a),_.delegate=null,O):H:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,O)}function F(b){var _={tryLoc:b[0]};1 in b&&(_.catchLoc=b[1]),2 in b&&(_.finallyLoc=b[2],_.afterLoc=b[3]),this.tryEntries.push(_)}function C(b){var _=b.completion||{};_.type="normal",delete _.arg,b.completion=_}function E(b){this.tryEntries=[{tryLoc:"root"}],b.forEach(F,this),this.reset(!0)}function $(b){if(b||b===""){var _=b[c];if(_)return _.call(b);if(typeof b.next=="function")return b;if(!isNaN(b.length)){var L=-1,P=function D(){for(;++L<b.length;)if(i.call(b,L))return D.value=b[L],D.done=!1,D;return D.value=a,D.done=!0,D};return P.next=P}}throw new TypeError(o(b)+" is not iterable")}return N.prototype=g,d(M,"constructor",{value:g,configurable:!0}),d(g,"constructor",{value:N,configurable:!0}),N.displayName=f(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(b){var _=typeof b=="function"&&b.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,g):(b.__proto__=g,f(b,u,"GeneratorFunction")),b.prototype=Object.create(M),b},r.awrap=function(b){return{__await:b}},j(W.prototype),f(W.prototype,p,function(){return this}),r.AsyncIterator=W,r.async=function(b,_,L,P,D){D===void 0&&(D=Promise);var H=new W(h(b,_,L,P),D);return r.isGeneratorFunction(_)?H:H.next().then(function(Q){return Q.done?Q.value:H.next()})},j(M),f(M,u,"Generator"),f(M,c,function(){return this}),f(M,"toString",function(){return"[object Generator]"}),r.keys=function(b){var _=Object(b),L=[];for(var P in _)L.push(P);return L.reverse(),function D(){for(;L.length;){var H=L.pop();if(H in _)return D.value=H,D.done=!1,D}return D.done=!0,D}},r.values=$,E.prototype={constructor:E,reset:function(b){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(C),!b)for(var _ in this)_.charAt(0)==="t"&&i.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=a)},stop:function(){this.done=!0;var b=this.tryEntries[0].completion;if(b.type==="throw")throw b.arg;return this.rval},dispatchException:function(b){if(this.done)throw b;var _=this;function L(oe,ne){return H.type="throw",H.arg=b,_.next=oe,ne&&(_.method="next",_.arg=a),!!ne}for(var P=this.tryEntries.length-1;P>=0;--P){var D=this.tryEntries[P],H=D.completion;if(D.tryLoc==="root")return L("end");if(D.tryLoc<=this.prev){var Q=i.call(D,"catchLoc"),X=i.call(D,"finallyLoc");if(Q&&X){if(this.prev<D.catchLoc)return L(D.catchLoc,!0);if(this.prev<D.finallyLoc)return L(D.finallyLoc)}else if(Q){if(this.prev<D.catchLoc)return L(D.catchLoc,!0)}else{if(!X)throw new Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return L(D.finallyLoc)}}}},abrupt:function(b,_){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P.tryLoc<=this.prev&&i.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var D=P;break}}D&&(b==="break"||b==="continue")&&D.tryLoc<=_&&_<=D.finallyLoc&&(D=null);var H=D?D.completion:{};return H.type=b,H.arg=_,D?(this.method="next",this.next=D.finallyLoc,O):this.complete(H)},complete:function(b,_){if(b.type==="throw")throw b.arg;return b.type==="break"||b.type==="continue"?this.next=b.arg:b.type==="return"?(this.rval=this.arg=b.arg,this.method="return",this.next="end"):b.type==="normal"&&_&&(this.next=_),O},finish:function(b){for(var _=this.tryEntries.length-1;_>=0;--_){var L=this.tryEntries[_];if(L.finallyLoc===b)return this.complete(L.completion,L.afterLoc),C(L),O}},catch:function(b){for(var _=this.tryEntries.length-1;_>=0;--_){var L=this.tryEntries[_];if(L.tryLoc===b){var P=L.completion;if(P.type==="throw"){var D=P.arg;C(L)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(b,_,L){return this.delegate={iterator:$(b),resultName:_,nextLoc:L},this.method==="next"&&(this.arg=a),O}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Ca);var qt=Ca.exports(),Yt=qt;try{regeneratorRuntime=qt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=qt:Function("r","regeneratorRuntime = r")(qt)}function op(t){var o=function(n,a){if(pt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(pt(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return pt(o)==="symbol"?o:String(o)}function Ko(t,o,n){return(o=op(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Kt=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,h=u-d;f<0&&(f=0),h<0&&(h=0),f>t.size&&(f=t.size),h>t.size&&(h=t.size);var A=f/t.size*100,y=100-h/t.size*100;n("change",A,y)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),_a=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},np=_a(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),ap=_a(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ue(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}Ue(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Kt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[np,ap,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Kt.__scopeId="data-v-24517fec",Kt.__file="src/picker/Saturation.vue";var Qt=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),rp={ref:"canvas"};Ue(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Qt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",rp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Qt.__scopeId="data-v-78b9f4f0",Qt.__file="src/picker/Hue.vue";var Xt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),lp={ref:"canvas"};Ue(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Xt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",lp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Xt.__scopeId="data-v-24dc9656",Xt.__file="src/picker/Alpha.vue";var Jt=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,o){var n=o.emit;return{onInput:function(a){var r;n("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){n("focus")},onBlur:function(){n("blur")},onEnter:function(){n("enter")}}}}),ip={class:"input"},sp={class:"label"},cp=[".value"];function Bt(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,o)||ya(t,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Le(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?xa(Object(n),!0).forEach(function(a){Ko(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),Jt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",ip,[e.createElementVNode("span",sp,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:o[0]||(o[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:o[1]||(o[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:o[2]||(o[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:o[3]||(o[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,cp)])},Jt.__scopeId="data-v-d52a4d02",Jt.__file="src/picker/InputValue.vue";var ka=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},Sa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Zt=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(Sa[o]||o).concat(Sa[n]||n)},Aa=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Zt(o)).concat(Zt(n)).concat(Zt(a))},ut=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},Ot=function(t,o,n){t=6*ut(t,360),o=ut(o,100),n=ut(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},Na=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=ka(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=Ot(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(Aa(Ot(a,r,l))).concat(Zt(255*i))}else switch(o){case"hsl":var f=ka(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=Ot(a,r,l),A=h.r,y=h.g,k=h.b;return"rgb(".concat(A,", ").concat(y,", ").concat(k,")");default:return Aa(Ot(a,r,l))}},eo=function(t){var o=t.r,n=t.g,a=t.b;o=ut(o,255),n=ut(n,255),a=ut(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},Ta=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},Ea=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},Qo=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Xo(t,Jo(t),n),r=Va(a);return Na(r,o,n)}return""},La=function(t){var o=Bt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ba=function(t){var o=Bt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},Oa=function(t){var o=Bt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Xo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=La(t),a=n.r,r=n.g,l=n.b,i=n.a;return Le(Le({},eo({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=Oa(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=Ba(t),c=s.h,p=s.s,u=s.l,f=s.a;return Le(Le({},Ta({h:c,s:p,l:u})),{},{a:+f});default:var h=Ea(t),A=h.r,y=h.g,k=h.b,S=h.a;return Le(Le({},eo({r:A,g:y,b:k})),{},{a:S/255})}else switch(o){case"rgb":return Le(Le({},eo(La(t))),{},{a:1});case"hsv":var w=Oa(t);return{h:w.h,s:w.s,v:w.v,a:1};case"hsl":return Le(Le({},Ta(Ba(t))),{},{a:1});default:return Le(Le({},eo(Ea(t))),{},{a:1})}},Jo=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Va=function(t){var o=t.h,n=t.s,a=t.v,r=t.a;return isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:o,s:n,v:a,a:r}},Vt=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),dp=["draggable"];Ue(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Vt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,dp)},Vt.__scopeId="data-v-02da71fd",Vt.__file="src/color-item/ColorItem.vue";var to=e.defineComponent({name:"Colors",components:{ColorItem:Vt},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,o){var n=o.emit;return{onSelectColor:function(a,r){n("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return Qo(a,"hex",!0)})})}}}),pp={class:"colors"};function Ia(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ia(Object(n),!0).forEach(function(a){Ko(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ia(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),to.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},to.__scopeId="data-v-0f8b52a8",to.__file="src/picker/Colors.vue";var oo=e.defineComponent({name:"Picker",components:{Colors:to,Saturation:Kt,Hue:Qt,Alpha:Xt,InputValue:Jt},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return De(De({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var w,O=(w=t.value)===null||w===void 0?void 0:w.trim();if(O!=null&&O!==""){var m=Jo(O);return Va(Xo(O,m,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(w,O){var m="";w!=null?(m=Na(De({},w),t.format,t.showAlpha),i.value=De({},w)):i.value=null,d.value=m;var N=s();JSON.stringify(w)!==JSON.stringify(N)&&JSON.stringify(w)!==JSON.stringify(O)&&n("change",m)},{immediate:!0});var c=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.h)||0}),p=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.s)||0}),u=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.v)||0}),f=e.computed(function(){var w,O;return((w=e.unref(l))===null||w===void 0?void 0:w.a)!=null?(O=e.unref(l))===null||O===void 0?void 0:O.a:1}),h=e.computed(function(){return Ot(e.unref(c),e.unref(p),e.unref(u))}),A=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),y=e.computed(function(){var w=t.format;if(t.showAlpha)switch(w){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(w){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),k=e.ref(-1),S=function(w,O,m){if(w.length!==0){var N=Xo(w,O,m),g=N.h,B=N.s,V=N.v;if(!(isNaN(g)||isNaN(B)||isNaN(V))){var T=1,M=N.a;isNaN(M)||(T=M),l.value={h:g,s:B,v:V,a:T}}}};return{h:c,s:p,v:u,a:f,rgbStr:A,onSelectSaturation:function(w,O){k.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:w,v:O,a:e.unref(f)}:l.value=De(De({},e.unref(l)),{},{s:w,v:O})},onSelectHue:function(w){k.value=-1,e.unref(l)==null&&(l.value={h:w,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=De(De({},e.unref(l)),{},{h:w})},onSelectAlpha:function(w){k.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:w}:l.value=De(De({},e.unref(l)),{},{a:w})},label:y,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(w){k.value=-1,d.value=w},handleChange:function(){var w,O=(w=e.unref(d))===null||w===void 0?void 0:w.trim();if(O!==""){var m=t.showAlpha,N=t.format,g=function(B,V,T){if(T)switch(V){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(B);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(B);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(B);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(B)}else switch(V){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(B);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(B);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(B);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(B)}}(O,N,m);g?S(O,N,m):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:k,onSelectColor:function(w,O){if(k.value=O,(w=w.trim())==="")l.value=null;else{var m=Jo(w);m?S(w,m,!0):l.value=null}}}}}),up={class:"picker-inner"},fp={class:"picker-header"};Ue(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),oo.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",up,[e.createElementVNode("div",fp,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},oo.__scopeId="data-v-6ceadec6",oo.__file="src/picker/Picker.vue";var no=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var o=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}})}}}),mp=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function Fa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Zo(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Fa(Object(n),!0).forEach(function(a){Ko(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),no.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(mp),4)},no.__scopeId="data-v-ceb1719c",no.__file="src/add-color-item/AddColorItem.vue";var Je=null,ft=e.defineComponent({name:"ColorPicker",components:{ColorItem:Vt,Picker:oo,AddColorItem:no},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,o){var n=o.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(x){return Qo(x,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var x=t.value||"",F=Array.isArray(x)?x:[x];a.value=F.map(function(C){return Qo(C,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,h,A,y=e.ref(null),k=e.ref(null),S=(s=y,c=k,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Je.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(x){var F=x.state,C=F.styles,E=F.placement,$=C.popper;u.value=Zo(Zo(Zo({},$),p),{},{transformOrigin:E==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(x,F){var C,E=Bt(x,2),$=E[0],b=E[1],_=Bt(F,2),L=_[0],P=_[1];if($&&b&&(L!==$||P!==L)){(C=Je)===null||C===void 0||C.destroy();var D=$.$el||$,H=b.$el||b;e.nextTick(function(){Je=ep(D,H,f)})}}),e.onBeforeUnmount(function(){var x;Je&&((x=Je)===null||x===void 0||x.destroy(),Je=null)}),{instance:Je,style:u}),w=S.style,O=function(){e.unref(y)==null&&(y.value=e.unref(I)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},m=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},N=e.ref(),g=function(){var x=ba(Yt.mark(function F(C){var E,$,b,_;return Yt.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if($=C.target,(b=(E=$.dataset)===null||E===void 0?void 0:E.index)!=null&&b!==""){L.next=4;break}return L.abrupt("return");case 4:if(_=+b,e.unref(l)!==_){L.next=7;break}return L.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==_?(m(),h&&clearTimeout(h),h=setTimeout(function(){O(),clearTimeout(h)},100)):O(),l.value=_,y.value=$;case 10:case"end":return L.stop()}},F)}));return function(F){return x.apply(this,arguments)}}(),B=function(){var x=ba(Yt.mark(function F(C){var E,$,b,_,L;return Yt.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(_=C.target,!(!((E=e.unref(N))!==null&&E!==void 0&&E.isEqualNode(_))&&(!(($=e.unref(N))===null||$===void 0)&&$.contains(_)))){P.next=4;break}return P.abrupt("return");case 4:if(L=(b=e.unref(k))===null||b===void 0?void 0:b.$el,!(L!=null&&L.contains(_))){P.next=8;break}return P.abrupt("return");case 8:A&&clearTimeout(A),A=setTimeout(function(){e.unref(d)&&m()},0);case 10:case"end":return P.stop()}},F)}));return function(F){return x.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(O(),clearTimeout(A))});var V,T=e.ref(t.max>e.unref(a).length),M=e.computed(function(){return typeof t.popupContainer=="string"||pt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),j=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),W=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(k)]},function(){e.nextTick(function(){var x,F;(x=e.unref(N))===null||x===void 0||x.setAttribute("pick-colors-theme",e.unref(W)),(F=e.unref(k))===null||F===void 0||(F=F.$el)===null||F===void 0||F.setAttribute("pick-colors-theme",e.unref(W))})},{immediate:!0}),e.provide("theme",{theme:W});var I=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",B,!1),t.showPicker&&O()}),e.onUnmounted(function(){document.removeEventListener("mouseup",B,!1),h&&(clearTimeout(h),h=null),A&&(clearTimeout(A),A=null)}),{valueList:a,colorItemSelected:function(x){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===x},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:T,onPickerChange:function(x){var F=e.unref(l),C=e.unref(a).slice(),E=e.unref(a).length;if(F!=null){F>=0?C[F]=x:(l.value=E,C.push(x));var $="";$=Array.isArray(t.value)||t.addColor?C:x,t.value===void 0?a.value=Array.isArray($)?$:[$]:(n("update:value",$),n("change",$,x,F)),t.addColor&&E>=t.max&&(T.value=!1,n("overflowMax"))}},colorPicker:N,onColorClick:g,pickerRef:k,onColorItemDragStart:function(x){x.dataTransfer.effectAllowed="move";var F=x.target;V=+F.dataset.index},onColorItemDragOver:function(x){},onColorItemDrop:function(x){var F=+x.target.dataset.index,C=tp(e.unref(a)),E=C[V];C.splice(V,1);var $=C.slice(0,F),b=C.splice(F),_=$.concat([E]).concat(b);n("update:value",_),n("change",_,_[V],V)},colorItemsRef:I,pickerStyle:w,values:r,teleportDisabled:j,toPopupContainer:M}}});Ue(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),ft.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},ft.__scopeId="data-v-3c43ade8",ft.__file="src/ColorPicker.vue";const hp=e.defineComponent({name:"ColorPick",components:{PickColors:ft,AInput:v.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),pf="",yp={class:"color-pick"};function gp(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",yp,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const bp=te(hp,[["render",gp],["__scopeId","data-v-e2113f43"]]),Cp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:ft},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{v.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),uf="",wp={class:"color-group-pick"};function _p(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",wp,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const xp=te(Cp,[["render",_p],["__scopeId","data-v-b2be8322"]]),kp=e.defineComponent({name:"FormGroup",components:{Draggable:Ct,AppstoreAddOutlined:Vn,MinusCircleOutlined:El,PickColors:ft,InputNumber:Xn,PlusCircleOutlined:Vl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const h=Object.keys(f),A={};h.forEach(y=>{A[y]=""}),c.push(A)}else typeof f=="string"&&c.push(f);n.value=c}else v.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var h;const f=(h=t.value)==null?void 0:h.slice();if(Array.isArray(f)){const A=c==null?void 0:c.target,y=(A==null?void 0:A.value)!=null?A==null?void 0:A.value:c;u?f[p][u]=y:f[p]=y,n.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){v.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),ff="",Sp={class:"form-group"},Ap={class:"form-row"},Np={key:0,class:"label"},Tp={key:1,class:"label"},Ep={class:"icon-group"};function Lp(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Sp,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Ap,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Np,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Tp,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Ep,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Bp=te(kp,[["render",Lp],["__scopeId","data-v-f0c0ab4d"]]),Op=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:v.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Vp(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Ip=te(Op,[["render",Vp]]),Fp=e.defineComponent({name:"PropsToForm",components:{Input:vc,InputNumber:Xn,RadioGroup:Uc,Select:Hc,Switch:Yc,ColorPick:bp,ColorGroupPick:xp,FormGroup:Bp,Textarea:Ip},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Ft),n=e.inject(ro),a=e.inject(lo),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:A="change",events:y}=p;c[u]={...p,valueProp:h,value:f,events:{[A]:(k,S=!0)=>{l(S?{[u]:k}:{})},...y}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:re.reduce(s,(c,p,u)=>{const f=Fc[u];if(Array.isArray(f)){const h=f.find(A=>{const{onlyType:y,excludeType:k}=A;return y==null&&k==null?!0:y?Ie(e.unref(r),y):k?!Ie(e.unref(r),k):!1});h&&i({result:c,value:p,key:u,mapAttributeProp:h})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Ie}}}),mf="",$p={class:"props-to-form"},Dp={class:"label"},vp={class:"component-wrapper"};function Pp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",$p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",Dp,e.toDisplayString(i.label),1),e.createElementVNode("div",vp,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const Mp=te(Fp,[["render",Pp],["__scopeId","data-v-c6fb2484"]]);function jp(){return new Worker("/assets/editor.worker-02df2e61.js")}function Rp(){return new Worker("/assets/json.worker-867823a6.js")}function Up(){return new Worker("/assets/ts.worker-7254b425.js")}const Gp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new Rp:i==="typescript"||i==="javascript"?new Up:new jp}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=Ua.editor.create(n.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(re.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),hf="",zp={class:"editor",ref:"dom"};function Hp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",zp,null,512)}const $a=te(Gp,[["render",Hp],["__scopeId","data-v-71e88372"]]),Wp=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],qp=e.defineComponent({name:"TableColumnConfig",components:{ATable:v.Table,AModal:v.Modal,ACheckbox:v.Checkbox,AInput:v.Input,AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption,Editor:$a},setup(){const t=e.inject(Me),o=e.computed(()=>{var y;return!!((y=e.unref(t))!=null&&y.isGroupTable)}),n=e.computed(()=>{var y;return((y=e.unref(t))==null?void 0:y.graphicConfig)||{}}),a=e.computed(()=>{var y;return((y=e.unref(t))==null?void 0:y.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var k,S,w;let y=[];if(r.value=[],!o.value)y=((k=e.unref(n))==null?void 0:k.queryColumnList)||[];else{const O=((S=e.unref(n))==null?void 0:S.rowHeaderList)||[],m=((w=e.unref(n))==null?void 0:w.indicators)||[];y=[...O,...m]}y.forEach(O=>{var N;let m=(N=e.unref(a))==null?void 0:N.find(g=>g.prop===O.name);m||(m={label:O.label,prop:O.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(m)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:Wp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(y,k,S)=>{y&&k&&(l=y,i=k,d.value=y[k]||"",c.value=!0,s.value=S)},onEditorChange:y=>{try{d.value=y}catch(k){console.error(k)}},changeRenderBool:(y,k)=>{y.style=k.target.checked,y.style?y.renderBool===void 0&&(y.renderBool=!1):delete y.renderBool}}}}),yf="",Yp={class:"table-column-config"};function Kp(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Yp,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:A,text:y,record:k})=>[A.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:S=>t.changeRenderBool(k,S),checked:k.style},null,8,["onChange","checked"])):A.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:k.width,"onUpdate:value":S=>k.width=S,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):A.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[k.style?(e.openBlock(),e.createBlock(d,{key:1,value:k.renderText,"onUpdate:value":S=>k.renderText=S,readOnly:!0,onClick:S=>t.renderSave(k,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y),1)],64))],64)):A.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[k.style?(e.openBlock(),e.createBlock(d,{key:1,value:k.headerTemplate,"onUpdate:value":S=>k.headerTemplate=S,readOnly:!0,onClick:S=>t.renderSave(k,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y),1)],64))],64)):A.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:k.headerAlign,"onUpdate:value":S=>k.headerAlign=S},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:k.align,"onUpdate:value":S=>k.align=S},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:k.fixed,"onUpdate:value":S=>k.fixed=S},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:k.dataFormat,"onUpdate:value":S=>k.dataFormat=S,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[k.dataFormat&&k.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:k.retentiondigit,"onUpdate:value":S=>k.retentiondigit=S,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=A=>t.editorVisible=A),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const Qp=te(qp,[["render",Kp],["__scopeId","data-v-afebddc0"]]),Xp=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Mp,TableColumnConfig:Qp,Editor:$a,AFormItem:v.FormItem,ASelect:v.Select,ASelectOption:v.SelectOption,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ASwitch:v.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Ft),r=e.inject(rn),l=e.inject(ro),i=e.inject(lo),d=e.inject(an),s=N=>{l({...pn[N]},!1),d()},c=e.computed(()=>{var N;return(N=e.unref(a))==null?void 0:N.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Ic.map(N=>{const{props:g,title:B,enableProps:V,onlyType:T,excludeType:M}=N,j=[];g.forEach(x=>{typeof x=="string"&&(p.includes(x)?t.isGroupTable&&j.push(x):j.push(x))});let W,I;return t.componentType==="table"&&(T!=null&&T.includes(t.componentType))?(W=typeof V=="string"&&r.value?r.value[V]:void 0,I=re.pick(e.unref(r),j)):(W=typeof V=="string"&&a.value?a.value[V]:void 0,I=re.pick(e.unref(a),j)),{title:B,enableProps:W,enablePropsName:V,onlyType:T,excludeType:M,props:I}}).filter(({props:N})=>Object.keys(N).length>0)),f=(N,g)=>{const{onlyType:B,excludeType:V}=N;return B==null&&V==null?!0:B?Ie(g,B):V?!Ie(g,V):!1},h=(N,g)=>(g==null||g.stopPropagation(),N),A=(N,g)=>{g!=null&&l({[g]:N})},y=e.computed(()=>JSON.stringify(e.unref(a),null,2)),k=N=>{try{const g=JSON.parse(N||"{}");l(g,!1)}catch(g){console.error(g)}},S=e.ref(""),w=N=>{try{S.value=N}catch(g){console.error(g)}},O=(N,g)=>{try{i({[g]:N})}catch(B){console.error(B)}},m=e.computed(()=>{var N;return["customGraph"].includes((N=e.unref(a))==null?void 0:N.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:y,updateComponentOptions:k,tableOptions:r,optionCode:S,onEditorChange:w,tableEditorChange:O,onSwitchClick:h,onSwitchChange:A,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:m}}}),gf="",bf="",Jp={class:"style-group"};function Zp(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),A=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Jp,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=y=>t.type=y),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=y=>t.activePanel=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[t.isRenderForm(y,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.title?(e.openBlock(),e.createBlock(u,{header:y.title,key:y.title},{extra:e.withCtx(()=>[typeof y.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:y.enableProps,onChange:k=>t.onSwitchChange(k,y.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:y.props,disabled:typeof y.enableProps=="boolean"?!y.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=y=>t.tablePanel=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,y=>{var k;return e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[y.title&&((k=y.onlyType)!=null&&k.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:y.title,key:y.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:y.props,disabled:typeof y.enableProps=="boolean"?!y.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(A)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=y=>t.tableEditorChange(y,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=y=>t.tableEditorChange(y,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const eu=te(Xp,[["render",Zp],["__scopeId","data-v-2fb3e2ad"]]),tu=e.defineComponent({name:"Card",components:{CloseOutlined:So},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(ze),a=e.inject($t),r=e.inject(cn),l=e.computed(()=>{var C;return(C=e.unref(n))==null?void 0:C.filter(E=>E.keyName!=="")}),i=e.computed(()=>{var $,b;const C=[],E=($=e.unref(l))==null?void 0:$.find(_=>{var L;return _.id===((L=t.control)==null?void 0:L.id)});if(E){const _=E.type,L=re.pick(E,["value","startTime","endTime"]);(b=Object.keys(L))!=null&&b.length||(L.value="");for(const P in L)if(Object.prototype.hasOwnProperty.call(L,P)){const D=e.unref(r)[P];if(Array.isArray(D)){const H=D.find(Q=>Ie(_,Q.onlyType));H&&C.push({label:H.label,value:P})}else C.push({label:D.label,value:P})}}return C}),d=()=>{o("delete",t.index),s(t.control.id)};function s(C){const E=e.unref(l).find($=>$.id===C);if(E){const{type:$,id:b,events:_=[]}=E,L=Ut($),P=_.findIndex(D=>{var H;return D.on===L&&D.target===((H=e.unref(S))==null?void 0:H.id)&&D.emit==="refreshData"});P!==-1&&(_.splice(P,1),a({id:b,events:_}))}}const c=C=>{const E={...t.control};if(E.id=C,E.customValue="",C){const $=e.unref(l).find(b=>b.id===C);$&&(E.keyName=$.keyName,m($,C))}delete E.prop,o("update",E,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=C=>{o("update",{...t.control,prop:C},t.index)},h=C=>{o("update",{...t.control,rule:C},t.index)},A=C=>{const E={...t.control};E.modelKey&&(E.modelKey=""),E.prop&&(E.prop=""),E.format&&(E.format=""),o("update",{...E,dataType:C,customValue:"",id:"",keyName:""},t.index)},y=C=>{o("update",{...t.control,customValue:C.target.value},t.index)},k=C=>{const E={...t.control};C==null?delete E.mode:E.mode=C,delete E.conditionLabel,delete E.conditionName,delete E.conditionKey,delete E.conditionValueType,o("update",E,t.index)},S=e.inject(Me),w=e.inject(pe),O=e.computed(()=>{var ne;const{classificationList:C=[],seriesList:E=[],leftAxisList:$=[],rightAxisList:b=[],indicators:_=[],rowHeaderList:L=[],queryColumnList:P=[]}=e.unref(w),D=re.cloneDeep([...C,...E,...$,...b,..._,...L,...P]);if(D!=null&&D.length)for(const J of D)J.id=J.name;const H=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(J=>({...J,id:J.name,label:J.title||J.label})),...D];((ne=e.unref(S))==null?void 0:ne.type)==="ecanSelect"&&H.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const Q=new Map,X=H.length;for(let J=0;J<X;J++){const ae=H[J],{id:me}=ae||{};Q.set(me,ae)}return[...Q].map(([J,ae])=>ae)});function m(C,E){var P;const{type:$,id:b,events:_=[]}=C,L=Ut($);if(e.unref(p)&&E!==e.unref(p)){const{controlList:D=[]}=e.unref(w);D.find(H=>H.id===e.unref(p))||s(e.unref(p))}_.find(D=>{var H;return D.on===L&&D.target===((H=e.unref(S))==null?void 0:H.id)&&D.emit==="refreshData"})||a({id:b,events:[..._,{on:L,target:(P=e.unref(S))==null?void 0:P.id,emit:"refreshData"}].reverse()})}const N=(C,E)=>{if(C){const{label:$,name:b,id:_,genericType:L,indexCode:P,typeGuid:D,indexCodeNum:H}=E||{};o("update",{...t.control,conditionKey:_,conditionLabel:$,conditionName:b,conditionValueType:L,indexCode:P,typeGuid:D,indexCodeNum:H},t.index)}else{const $={...t.control};delete $.conditionLabel,delete $.conditionName,delete $.conditionKey,delete $.conditionValueType,o("update",$,t.index)}},g=(C,E)=>{var $;return($=E==null?void 0:E.keyName)==null?void 0:$.toLowerCase().includes(C==null?void 0:C.toLowerCase())},B=(C,E)=>{var $;return($=E==null?void 0:E.label)==null?void 0:$.toLowerCase().includes(C==null?void 0:C.toLowerCase())},V=e.computed(()=>{const C=e.unref(O).find($=>$.id===t.control.conditionKey);let E="";return C&&(E=(C==null?void 0:C.genericType)||""),E==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:E==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:E==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),T=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],M=e.computed(()=>{let C=!1;const{id:E="",dataType:$="component"}=t.control;if(E&&$==="component"){const b=e.unref(l).find(L=>L.id===E),_=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];Ie(b==null?void 0:b.type,_)&&(C=!0)}return C}),j=e.computed(()=>{let C=!1;const{id:E="",dataType:$="component"}=t.control;if(E&&$==="component"){const b=e.unref(l).find(_=>_.id===E);(b==null?void 0:b.type)==="ecanRangePicker"&&(C=!0)}return C}),W=e.computed(()=>{let C=!1;const{id:E="",dataType:$="component"}=t.control;if(E&&$==="component"){const b=e.unref(l).find(_=>_.id===E);["ecanDatePicker","ecanRangePicker"].includes(b==null?void 0:b.type)&&(C=!0)}return C});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:k,onRuleChange:h,onDataTypeChange:A,onCustomValueChange:y,conditionKeyOptions:O,onConditionKeyChange:N,idFilterOption:g,filterOption:B,onFormatChange:C=>{o("update",{...t.control,format:C},t.index)},onModelPropChange:C=>{o("update",{...t.control,modelKey:C.target.value},t.index)},ruleOption:V,dataTypeOption:T,isShowProp:j,isShowFormat:W,isShowModelProp:M,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),Cf="",wf="",ou={class:"control-card"};function nu(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ou,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:3,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const au=te(tu,[["render",nu],["__scopeId","data-v-000b29c1"]]),ru=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:au,AButton:v.Button},setup(t,{expose:o}){const n=e.inject(ze),a=e.inject(pe),r=e.inject(Se),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const h of u)h.conditionKey&&(jt(h,"rule")||(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL"),jt(h,"dataType")||(h.dataType="component"));return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:Kn({...e.unref(a),...u},e.unref(n))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var h;const f=(h=e.unref(l))==null?void 0:h.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var A;const h=(A=e.unref(l))==null?void 0:A.slice();h[f]=u,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),_f="",lu={class:"control-group"},iu={class:"control-group-header"},su={class:"control-group-content"};function cu(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",lu,[e.createElementVNode("div",iu,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const du=te(ru,[["render",cu],["__scopeId","data-v-ff45d2c5"]]),pu=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:h,builtInValueSource:A,builtInCalcWay:y,formula:k,conditions:S,aggregate:w}=i;let O;return S&&(O=r(S)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:w,builtInFormula:h,builtInValueSource:A,builtInCalcWay:y,formula:k,conditions:O}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:h,classificationList:A=[],seriesList:y=[],leftAxisList:k=[],rightAxisList:S=[],queryColumnList:w=[],indicators:O=[],dataSourceId:m,idxLibMode:N,preview:g=!1}=i||{};f==null&&(Ie(d,"table")?f="1":f="2");let B;if(Array.isArray(A)&&A.length>0){const j=A.length;for(let W=0;W<j;W++){const I=A[W]||{},{label:x="",name:F="",show:C=!1,sort:E,customGroup:$,conditions:b}=I;if(C||j===1){B={label:x.trim(),columnName:F,show:C,sort:E,customGroup:$,conditions:r(b)};break}}}let V;if(Array.isArray(y)&&y.length>0){const j=y.length;for(let W=0;W<j;W++){const I=y[W]||{},{label:x="",name:F="",show:C=!1,sort:E,customGroup:$,conditions:b}=I;if(C||j===1){V={label:x.trim(),columnName:F,show:C,sort:E,customGroup:$,conditions:r(b)};break}}}const T=[];w==null||w.forEach(j=>{T.push(o(j))});const M=[];if(k==null||k.forEach(j=>{j.location="LEFT",M.push(l(j))}),S==null||S.forEach(j=>{j.location="RIGHT",M.push(l(j))}),O==null||O.forEach(j=>{j.location="LEFT",M.push(l(j))}),!(f==="1"&&T.length===0)&&!(f==="2"&&M.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:h,classification:B,series:V,indicatorList:M,queryColumns:T,pageFlag:!0,sqlConditions:[],dataSourceId:m,idxLibMode:N,preview:g})}catch(j){console.error(j)}}},Da=(t,o)=>{const n={dayjs:de,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},ao=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const h=u[f],A=l[h];A!=null&&(c=c.replace(h,A))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Da(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},It=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Da(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},uu=(t,o,n)=>{switch(t.type){case"bar":return fu(t,o,n);case"line":return mu(t,o,n);case"pie":return hu(t,o,n);case"comboGraph":return yu(t,o,n);default:return{}}},fu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const h={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:A,seriesName:y,name:k,value:S,data:w}=c[h]||{};h===0&&(u+=`${k}<br/>`),u+=ao(f,{textData:{marker:A,name:k,value:S,a:y,b:k,c:S,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return It(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return It(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},mu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:A,seriesName:y,name:k,value:S,data:w}=c[h]||{};h===0&&(u+=`${k}<br/>`),u+=ao(f,{textData:{marker:A,name:k,value:S,a:y,b:k,c:S,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return It(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(c){return It(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},hu=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return ao(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:ps(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},yu=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return It(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let h=0;h<c;h++){const A=f[h],{tooltipFormatter:y}=A||{},{marker:k,seriesName:S,name:w,value:O,data:m}=s[h]||{};h===0&&(p+=`${w}<br/>`),p+=ao(y||u,{textData:{marker:k,name:w,value:O,seriesName:S,a:S,b:w,c:O,...m}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},gu=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const h=a[f],{label:A,value:y}=h,k={...t[0],value:t[0][y]};r.add(A),p.push(k)}const u=t[0][n]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[n];r.add(f);for(let h=0;h<d;h++){const A=a[h],{label:y,value:k}=A,S={...u,value:u[k]};if(l.has(y)){const w=l.get(y);w.push(S),l.set(y,w)}else l.set(y,[S])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},bu=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[n]||"",h=u[a]||"",A=u[r]||"";if(l.add(f),i.has(A)){const y=i.get(A);y.push({name:f,value:h,...u}),i.set(A,y)}else i.set(A,[{name:f,value:h,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},Cu=e.defineComponent({name:"ChartGraph",components:{ASpin:v.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Be);let l=null;const i=e.inject(Oe)||"",d=e.inject(pe)||{},s=e.inject(Ft)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),h=e.ref(!1),A=e.computed(()=>h.value?Wa:12),y=e.ref({}),k=e.ref(),S=e.computed(()=>{const T=e.unref(n.value);if((T==null?void 0:T.type)==="customGraph")return k.value;const M=uu(T,e.unref(y),A.value);return{toolbox:{show:T.toolboxShow,left:T.toolboxLeft,top:T.toolboxTop,itemSize:T.toolboxItemSize,itemGap:T.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:T.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:T.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:T.titleText,subtext:T.titleSubtext,left:"center"},grid:{top:T.gridTop,bottom:T.gridBottom,left:T.gridLeft,right:T.gridRight,containLabel:T.gridContainLabel},color:T.colors,...M}}),w=(T=[],M,j=!1)=>{const W=j?M:null;y.value=gu(T,W)},O=(T=[],M)=>{y.value=bu(T,M)},m=async()=>{var T,M,j;try{const W=pu({graphicConfig:e.unref(a.value),type:(T=e.unref(n.value))==null?void 0:T.type,request:r,indicatorToken:i});f.value=!0;const I=await W(),{columns:x=[],rows:F=[]}=((M=I==null?void 0:I.data)==null?void 0:M.data)??{};if(((j=e.unref(n.value))==null?void 0:j.type)==="pie"){let C=[];if(x.length>0){const E=x[0],$=x[1];C=F.map(b=>({name:b[E],value:b[$]}))}O(C)}else{let C;x.length>0&&(C={name:x[0],types:x.slice(1).map(E=>({label:E,value:E}))}),w(F,C,!0)}}catch(W){console.error(W)}finally{f.value=!1}},N={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},g=()=>{e.unref(y).dataset.length===0?u.value.setOption(N):u.value.setOption(S.value)},B=()=>{e.unref(n.value).type!=="customGraph"&&m()},V=()=>{var T;(T=u.value)==null||T.resize()};return e.watch(S,()=>{g()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,T=>{try{const M=eval;k.value=M(T)}catch(M){console.error(M)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(V),l.observe(p.value)),u.value=Ha.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:B}),{echartRef:c,loading:f}}}),xf="",wu={class:"ecan-chart-graph",ref:"chartWrapRef"},_u={style:{width:"100%",height:"100%"},ref:"echartRef"};function xu(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",wu,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",_u,null,512)]),_:1},8,["spinning"])],512)}const va=te(Cu,[["render",xu],["__scopeId","data-v-8049fed2"]]),ku=e.defineComponent({name:"DataConfig",components:{DataGroup:Vc,StyleGroup:eu,ChartGraph:va,ATabs:v.Tabs,ATabPane:v.TabPane,ControlGroup:du,AButton:v.Button,ReloadOutlined:zl},setup(){var N;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Me),r=e.inject(nn),l=e.inject(pe),i=e.inject(ze),d=e.inject(dn),s=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const g=re.cloneDeep(e.unref(a));p(g);const B=re.pick(g,re.without(Object.keys(g),"position","top","left","width","height"));Ie(g.type,s)?(B.height=g.height,B.width=g.width):B.height="290px";const V=re.cloneDeep(e.unref(l));return V.pageMode="design",V.componentList=i,V.preview=!0,V.pageConfig=d,{...B,graphicConfig:V,toolboxShow:!1,sourceLeft:g.left,sourceTop:g.top}});function p(g){var B,V,T,M;["#ffffff","#fff"].includes((B=g==null?void 0:g.color)==null?void 0:B.toLowerCase())&&(g.color="#000"),["#ffffff","#fff"].includes((V=g==null?void 0:g.variableColor)==null?void 0:V.toLowerCase())&&(g.variableColor="#000"),["#ffffff","#fff"].includes((T=g==null?void 0:g.increaseColor)==null?void 0:T.toLowerCase())&&(g.increaseColor="#000"),["#ffffff","#fff"].includes((M=g==null?void 0:g.declineColor)==null?void 0:M.toLowerCase())&&(g.declineColor="#000")}const u=e.computed(()=>{let g=!0;return Ie(e.unref(c).type,s)&&(g=!1),g}),f=e.computed(()=>{var g;return(g=e.unref(c))==null?void 0:g.type}),h=e.computed(()=>{var g;return!!((g=e.unref(c))!=null&&g.isGroupTable)}),A=g=>{const B=g==="1";B&&f.value==="table"&&m(),window.changeShowTable&&window.changeShowTable(B),g==="3"&&O()},y=e.ref(),k=e.inject(Be),S=e.unref(e.inject(Oe)),w=(N=window==null?void 0:window.config)==null?void 0:N.pageId;function O(){var W;const{leftAxisList:g=[],rightAxisList:B=[],queryColumnList:V=[],indicators:T=[]}=e.unref(l),M=[...g,...B,...V,...T],j={};for(const I of M){const{id:x="",indexCode:F=""}=I;x&&!jt(I,"calcType")&&!j[x]&&(j[x]=F)}if((W=Object.keys(j))!=null&&W.length){const I=[];for(const x in j)I.push(new Promise((F,C)=>{k.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:w,indexGuid:x,indexCode:j[x],dataSourceId:""},{headers:{Authentication:S,operateContext:"ygt"}}).then(E=>{var _;const{success:$,data:b=[]}=E.data;$&&((_=b==null?void 0:b.dataViewColumns)!=null&&_.length)?F(b.dataViewColumns):C(b)}).catch(E=>{C(E)})}));Promise.all(I).then(x=>{if(x!=null&&x.length){const F=x.reduce((C,E)=>C.filter($=>E.find(b=>b.typeGuid===$.typeGuid)));y.value=F.filter(C=>C.typeGuid)}})}}const m=()=>{var B;let g;r&&f.value==="table"?g=window.updateConfig:g=(B=e.unref(n))==null?void 0:B.refreshData,typeof g=="function"&&g()};return e.provide(an,m),e.watch(l,()=>{m()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:h,onChange:A,component:c,fullWidth:u,renderUsedComponents:i,intersection:y,refreshData:m}}}),kf="",Su={class:"data-config"},Au={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Nu(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("reload-outlined"),u=e.resolveComponent("a-button"),f=e.resolveComponent("a-tabs"),h=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",Su,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=A=>t.activeKey=A),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(u,{onClick:t.refreshData},{icon:e.withCtx(()=>[e.createVNode(p)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",Au,null,512)):e.withDirectives((e.openBlock(),e.createBlock(h,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const Tu=te(ku,[["render",Nu],["__scopeId","data-v-15bbcd0f"]]),Eu=e.defineComponent({name:"IndicatorLibrary",components:{DataList:ii,DataConfig:Tu},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var N;return((N=e.unref(i))==null?void 0:N.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?re.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?re.cloneDeep(e.unref(i).chartsOptions):e.ref(re.cloneDeep(pn.line));p=e.ref(p);let u=e.unref(i).tableOptions?re.cloneDeep(e.unref(i).tableOptions):e.ref(re.cloneDeep(qa));u=e.ref(u);const f=e.ref([]),h=N=>{f.value=N},A=N=>{c.value={...e.unref(c),...e.unref(N)}},y=(N,g=!0)=>{g?p.value={...e.unref(p),...e.unref(N)}:p.value={...e.unref(N)}},k=N=>{u.value={...e.unref(u),...e.unref(N)}},S=()=>f,w=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=re.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=re.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},O=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=O,t.request&&e.provide(Be,t.request),e.provide(on,{setDataList:h,getDataList:S});const m=N=>{n("updateUsedComponent",N)};return e.provide(Me,i),e.provide(pe,c),e.provide(Ft,p),e.provide(rn,u),e.provide(io,r),e.provide(nn,s),e.provide(Oe,l),e.provide(Se,A),e.provide(ro,y),e.provide(lo,k),e.provide(ze,t.renderUsedComponentList),e.provide($t,m),e.provide(cn,t.mapAttributeProps),e.provide(dn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:w}),{isUpdate:a}}}),Sf="",Lu={key:0,class:"config-modal"},Bu={class:"config-modal-left"},Ou={class:"config-modal-right"};function Vu(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Lu,[e.createElementVNode("div",Bu,[e.createVNode(i)]),e.createElementVNode("div",Ou,[e.createVNode(d)])]))}const Pa=tn(te(Eu,[["render",Vu],["__scopeId","data-v-23d542ce"]])),Ma=tn(va),ja=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ma,EcanIndicatorLibrary:Pa},Symbol.toStringTag,{value:"Module"})),Iu={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(ja).forEach(a=>{const r=ja[a];r.install&&t.use(r)})}};he.EcanChartGraph=Ma,he.EcanIndicatorLibrary=Pa,he.default=Iu,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
56
|
+
`,En=!1,Nr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ar;e.nextTick(function(){En||(typeof window<"u"&&window.document&&window.document.documentElement&&_r(o,{prepend:!0}),En=!0)})},Tr=["icon","primaryColor","secondaryColor"];function Er(t,o){if(t==null)return{};var n=Lr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Lr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Rt(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Br(t,r,n[r])})}return t}function Br(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var St={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Or(t){var o=t.primaryColor,n=t.secondaryColor;St.primaryColor=o,St.secondaryColor=n||Nn(o),St.calculated=!!n}function Vr(){return Rt({},St)}var it=function(o,n){var a=Rt({},o,n.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=Er(a,Tr),s=St;if(l&&(s={primaryColor:l,secondaryColor:i||Nn(l)}),Nr(),Sr(An(r),"icon should be icon definiton, but got ".concat(r)),!An(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Rt({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),Co(c.icon,"svg-".concat(c.name),Rt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};it.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},it.inheritAttrs=!1,it.displayName="IconBase",it.getTwoToneColors=Vr,it.setTwoToneColors=Or;const wo=it;function Ir(t,o){return vr(t)||Dr(t,o)||$r(t,o)||Fr()}function Fr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $r(t,o){if(t){if(typeof t=="string")return Ln(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ln(t,o)}}function Ln(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Dr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function vr(t){if(Array.isArray(t))return t}function Bn(t){var o=Tn(t),n=Ir(o,2),a=n[0],r=n[1];return wo.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Pr(){var t=wo.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Mr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function jr(t,o){return zr(t)||Gr(t,o)||Ur(t,o)||Rr()}function Rr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ur(t,o){if(t){if(typeof t=="string")return On(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return On(t,o)}}function On(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function Gr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function zr(t){if(Array.isArray(t))return t}function Vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){_o(t,r,n[r])})}return t}function _o(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Hr(t,o){if(t==null)return{};var n=Wr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Wr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Bn("#1890ff");var st=function(o,n){var a,r=Vn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=Hr(r,Mr),h=(a={anticon:!0},_o(a,"anticon-".concat(i.name),!!i.name),_o(a,l,l),a),A=d===""||d||i.name==="loading"?"anticon-spin":"",y=c;y===void 0&&u&&(y=-1,f.tabindex=y);var x=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,S=Tn(p),w=jr(S,2),O=w[0],m=w[1];return e.createVNode("span",Vn({role:"img","aria-label":i.name},f,{onClick:u,class:h}),[e.createVNode(wo,{class:A,icon:i,primaryColor:O,secondaryColor:m,style:x},null)])};st.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},st.displayName="AntdIcon",st.inheritAttrs=!1,st.getTwoToneColor=Pr,st.setTwoToneColor=Bn;const ye=st;var qr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const Yr=qr;function In(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Kr(t,r,n[r])})}return t}function Kr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var ko=function(o,n){var a=In({},o,n.attrs);return e.createVNode(ye,In({},a,{icon:Yr}),null)};ko.displayName="AppstoreAddOutlined",ko.inheritAttrs=!1;const Fn=ko;var Qr={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const Xr=Qr;function $n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Jr(t,r,n[r])})}return t}function Jr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var xo=function(o,n){var a=$n({},o,n.attrs);return e.createVNode(ye,$n({},a,{icon:Xr}),null)};xo.displayName="CaretDownOutlined",xo.inheritAttrs=!1;const Zr=xo;var el={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"};const tl=el;function Dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ol(t,r,n[r])})}return t}function ol(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var So=function(o,n){var a=Dn({},o,n.attrs);return e.createVNode(ye,Dn({},a,{icon:tl}),null)};So.displayName="CaretRightOutlined",So.inheritAttrs=!1;const nl=So;var al={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const rl=al;function vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ll(t,r,n[r])})}return t}function ll(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ao=function(o,n){var a=vn({},o,n.attrs);return e.createVNode(ye,vn({},a,{icon:rl}),null)};Ao.displayName="CloseOutlined",Ao.inheritAttrs=!1;const No=Ao;var il={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const sl=il;function Pn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){cl(t,r,n[r])})}return t}function cl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var To=function(o,n){var a=Pn({},o,n.attrs);return e.createVNode(ye,Pn({},a,{icon:sl}),null)};To.displayName="CopyOutlined",To.inheritAttrs=!1;const dl=To;var pl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const ul=pl;function Mn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){fl(t,r,n[r])})}return t}function fl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Eo=function(o,n){var a=Mn({},o,n.attrs);return e.createVNode(ye,Mn({},a,{icon:ul}),null)};Eo.displayName="DeleteOutlined",Eo.inheritAttrs=!1;const ml=Eo;var hl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const yl=hl;function jn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){gl(t,r,n[r])})}return t}function gl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Lo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(ye,jn({},a,{icon:yl}),null)};Lo.displayName="DoubleRightOutlined",Lo.inheritAttrs=!1;const bl=Lo;var Cl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const wl=Cl;function Rn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){_l(t,r,n[r])})}return t}function _l(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ye,Rn({},a,{icon:wl}),null)};Bo.displayName="DownOutlined",Bo.inheritAttrs=!1;const kl=Bo;var xl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const Sl=xl;function Un(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Al(t,r,n[r])})}return t}function Al(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ye,Un({},a,{icon:Sl}),null)};Oo.displayName="InfoCircleOutlined",Oo.inheritAttrs=!1;const Nl=Oo;var Tl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const El=Tl;function Gn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Ll(t,r,n[r])})}return t}function Ll(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vo=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:El}),null)};Vo.displayName="MinusCircleOutlined",Vo.inheritAttrs=!1;const Bl=Vo;var Ol={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"};const Vl=Ol;function zn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Il(t,r,n[r])})}return t}function Il(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Io=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:Vl}),null)};Io.displayName="PlusCircleOutlined",Io.inheritAttrs=!1;const Fl=Io;var $l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Dl=$l;function Hn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){vl(t,r,n[r])})}return t}function vl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Fo=function(o,n){var a=Hn({},o,n.attrs);return e.createVNode(ye,Hn({},a,{icon:Dl}),null)};Fo.displayName="PlusOutlined",Fo.inheritAttrs=!1;const Pl=Fo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const jl=Ml;function Wn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Rl(t,r,n[r])})}return t}function Rl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var $o=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(ye,Wn({},a,{icon:jl}),null)};$o.displayName="QuestionCircleOutlined",$o.inheritAttrs=!1;const Ul=$o;var Gl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};const zl=Gl;function qn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Hl(t,r,n[r])})}return t}function Hl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Do=function(o,n){var a=qn({},o,n.attrs);return e.createVNode(ye,qn({},a,{icon:zl}),null)};Do.displayName="ReloadOutlined",Do.inheritAttrs=!1;const Wl=Do;var ql={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Yl=ql;function Yn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Kl(t,r,n[r])})}return t}function Kl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var vo=function(o,n){var a=Yn({},o,n.attrs);return e.createVNode(ye,Yn({},a,{icon:Yl}),null)};vo.displayName="SettingOutlined",vo.inheritAttrs=!1;const Ql=vo,Xl=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:nl,CaretDownOutlined:Zr,AInputSearch:v.InputSearch,ASpin:v.Spin,APagination:v.Pagination,Draggable:_t},setup(){var m;const t=(m=window==null?void 0:window.config)==null?void 0:m.pageId,o=e.inject(Be),n=e.unref(e.inject(Oe)),a=e.inject(Me),r=e.computed(()=>{var N;return(N=e.unref(a))==null?void 0:N.graphicConfig}),l=e.computed(()=>{var N;return(N=e.unref(r))==null?void 0:N.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const N={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const g=await o.post(`${ke}/diagram/sourceList`,N,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:B,data:V={}}=g.data;if(B){const{rows:T=[],total:M=0}=V;T==null||T.forEach(j=>{var q;j.show=!1,(q=j.dataViewColumns)==null||q.forEach(F=>{F.show=!0,F.edit=!1,F.title&&(F.label=F.title)})}),i.value=T,s.totalResult=+M}}catch{d.value=!1}},u=N=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[N],f=N=>{i.value[N].show=!i.value[N].show},h=()=>{s.currentPage=1,p()},A=re.debounce(()=>{s.currentPage=1,p()},200),y=(N,g)=>{s.pageSize=g,s.currentPage=N,p()};e.onMounted(()=>{p()});const x=e.inject(pe),S=e.computed(()=>{const N=["classificationList","rowHeaderList","dimensionList"];let g=[];for(const B in e.unref(x))if(Object.prototype.hasOwnProperty.call(e.unref(x),B)&&N.includes(B)){const V=e.unref(x)[B];Array.isArray(V)&&(g=g.concat(V))}return g});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:h,onChange:A,onPaginationChange:y,searchText:c,setItemDisabled:(N=[])=>{let g=!1;for(const B of e.unref(S))if(!N.find(T=>T.typeGuid===B.typeGuid)){g=!0;break}return g},onDragStart:(N,g)=>{const B=g[N.oldIndex];B&&sessionStorage.setItem("indicator-list-item",JSON.stringify(B))}}}}),Wu="",Jl={class:"data-source-list"},Zl={class:"columns"},ei={class:"column-item"},ti=["onClick"],oi={key:0},ni={class:"column-child-item"},ai={class:"column-child-item-name"};function ri(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Jl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Zl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",ei,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:A=>t.onToggleGroup(h)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,ti)]),f.show?(e.openBlock(),e.createElementBlock("div",oi,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":A=>f.dataViewColumns=A,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:A=>t.onDragStart(A,f.dataViewColumns)},{item:e.withCtx(({element:A})=>[e.createElementVNode("div",ni,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(A.scope))+"】 ",1),e.createElementVNode("span",ai,e.toDisplayString(A.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const li=te(Xl,[["render",ri],["__scopeId","data-v-c4000c1e"]]),ii=e.defineComponent({name:"DataList",components:{DataSourceList:li,DataViewList:or},setup(){return{source:e.inject(co)}}});function si(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const ci=te(ii,[["render",si]]),Kn={mounted(t){t.focus()}},di=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:_t,AModal:v.Modal,AButton:v.Button},setup(t,{expose:o}){var O;const n=(O=window==null?void 0:window.config)==null?void 0:O.pageId,a=e.inject(Be),r=e.unref(e.inject(Oe)),l=e.inject(pe),i=e.inject(xe),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const m=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:N,data:g=[]}=m.data;N&&(c.value=g==null?void 0:g.slice(0,200))}catch(m){console.error(m)}},u=()=>{var V;const m=((V=e.unref(l)[t.type])==null?void 0:V.slice())||[],N=m[t.index],{label:g,name:B}=t.item;N.sort={label:g,columnName:B,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:m})};let f=!1;const h=()=>{f=!0},A=e.ref(!1),y=()=>{A.value=!0},x=()=>{A.value=!1},S=()=>{f&&u(),f=!1,x()};return o({showModal:y}),e.watch(A,m=>{var N,g;if(m){const B=(g=(N=t.item)==null?void 0:N.sort)==null?void 0:g.customOrderColumns;B==null?p():c.value=B}else c.value=[];window.changeShowTable&&window.changeShowTable(!m)},{flush:"post"}),{visible:A,onCancel:S,customSortList:c,onChange:h,onDeleteConfig:()=>{var V;const m=((V=e.unref(l)[t.type])==null?void 0:V.slice())||[],N=m[t.index],{label:g,name:B}=t.item;N.sort={label:g,columnName:B},i({[t.type]:m}),x()}}}}),qu="",pi={class:"button-wrapper"},ui={class:"sort-item"};function fi(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",pi,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",ui,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const mi=te(di,[["render",fi],["__scopeId","data-v-8e16d201"]]),hi=e.defineComponent({name:"CustomGroupModal",directives:{focus:Kn},components:{CloseOutlined:No,AModal:v.Modal,ASelect:v.Select,ASelectOption:v.SelectOption,AButton:v.Button,AInput:v.Input,ACheckbox:v.Checkbox,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ATag:v.Tag,ACheckableTag:v.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var $;const n=e.inject(Be),a=($=window==null?void 0:window.config)==null?void 0:$.pageId,r=e.unref(e.inject(Oe));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const b=e.unref(c).map(_=>_.title);return new Set(b)}),u=e.ref([]);e.watch(()=>e.unref(c).length,b=>{u.value=new Array(b).fill(!1)});const f=e.computed(()=>{let b=0;return e.unref(c).forEach(_=>{var L;(L=_.data)==null||L.forEach(P=>{P.checked&&b++})}),b}),h=()=>{const b=e.unref(d);if(!b){v.message.error("创建分组名不能空");return}e.unref(p).has(b)?v.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:b,data:[]}),l=!0)},A=b=>{e.unref(c).splice(b,1),l=!0},y=e.ref(null),x=()=>{if(e.unref(f)===0){v.message.error("当前移入分组已选个数为0");return}const b=e.unref(y);if(b==null){v.message.error("请选择移入分组");return}if(!e.unref(c)[b]){v.message.error("移入分组不存在,请重新选择");return}const _=[],L=e.unref(c).length;for(let P=0;P<L;P++){const D=e.unref(c)[P];e.unref(c)[P].data=D.data.filter(H=>(H.checked&&_.push({...H,checked:!1}),!H.checked))}e.unref(c)[b].data=[..._,...e.unref(c)[b].data],l=!0},S=b=>{e.unref(u)[b]=!0},w=b=>{e.unref(u)[b]=!1},O=(b,_)=>{const L=b.target.value;e.unref(p).has(L)&&v.message.error("组名不能相同,请修改"),e.unref(c)[_].title=L,l=!0},m=e.inject(pe),N=e.inject(xe),g=e.computed(()=>e.unref(m).source),B=e.computed(()=>e.unref(m).dataViewId),V=e.ref(!1),T=()=>{var Q,X;const b=e.unref(c);let _="";e.unref(V)&&(_=(Q=b[0])==null?void 0:Q.title);const L=b==null?void 0:b.length,P={};for(let oe=1;oe<L;oe++){const ne=b[oe]||{},{title:J,data:ae}=ne;P[J]=(ae==null?void 0:ae.map(me=>me.label))||[]}const D=((X=e.unref(m)[t.type])==null?void 0:X.slice())||[],H=D[t.index];H.customGroup={groupInfoMap:P,otherGroupName:_},N({[t.type]:D})},M=e.ref(!1),j=()=>{M.value=!0},q=()=>{M.value=!1},F=()=>{q(),l&&T(),l=!1},k=()=>{l=!0},I=new Set,C=async()=>{const b=t.item.customGroup||{},_=b.otherGroupName,L=b.groupInfoMap;(_===""||_==null)&&(V.value=!1),e.unref(c)[0]={title:_||"未分组",data:[]};let P=1;for(const D in L)if(Object.prototype.hasOwnProperty.call(L,D)){const Q=L[D].map(X=>(I.add(X),{label:X,checked:!1}));e.unref(c)[P]={title:D,data:Q},P++}await E()},E=async()=>{var b;try{const _=await n.post(`${ke}/diagram/groupvalue`,{source:e.unref(g),dataViewId:e.unref(B),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:L,data:P=[]}=_.data;if(L){const D=[];(b=P==null?void 0:P.slice(0,200))==null||b.forEach(H=>{I.has(H)||D.push({label:H,checked:!1})}),e.unref(c)[0].data=D}}catch(_){console.error(_)}};return e.watch(M,b=>{b&&C(),window.changeShowTable&&window.changeShowTable(!b)},{flush:"post"}),o({showModal:j}),{visible:M,title:i,activeKey:s,customGroupList:c,onCancel:F,useOtherGroup:V,selectCount:f,createGroupTitle:d,onAddGroup:h,onDeleteGroup:A,onMoveInGroup:x,selectGroupIndex:y,onEditTitle:S,onTitleChange:O,onFinishEditTitle:w,onUseOtherGroup:k,customGroupEditTitleList:u}}}),Yu="",Ku="",yi={class:"custom-group-header"},gi={class:"move-and-create"},bi={class:"select-tip"},Ci={class:"select-count"},wi={class:"create-group"},_i={class:"custom-group-content"},ki=["onClick"],xi={class:"extra"},Si={class:"custom-group-list"},Ai={class:"text"};function Ni(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),A=e.resolveComponent("a-collapse-panel"),y=e.resolveComponent("a-collapse"),x=e.resolveComponent("a-modal"),S=e.resolveDirective("focus");return e.openBlock(),e.createBlock(x,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createElementVNode("div",gi,[e.createElementVNode("div",null,[e.createElementVNode("span",bi,[e.createTextVNode(" 已选"),e.createElementVNode("span",Ci,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=w=>t.selectGroupIndex=w),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,O)=>(e.openBlock(),e.createBlock(i,{key:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",wi,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=w=>t.createGroupTitle=w),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=w=>t.useOtherGroup=w),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",_i,[e.createVNode(y,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=w=>t.activeKey=w),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,O)=>(e.openBlock(),e.createBlock(A,{key:O},{header:e.withCtx(()=>[t.customGroupEditTitleList[O]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:w.title,size:"small",onChange:m=>t.onTitleChange(m,O),onBlur:m=>t.onFinishEditTitle(O),onPressEnter:m=>t.onFinishEditTitle(O)},null,8,["value","onChange","onBlur","onPressEnter"])),[[S]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(m=>t.onEditTitle(O),["prevent","stop"])},e.toDisplayString(w.title),9,ki))]),extra:e.withCtx(()=>[e.createElementVNode("div",xi,[O===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),O!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(m=>t.onDeleteGroup(O),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.data,(m,N)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:m.checked,"onUpdate:checked":g=>m.checked=g,class:"custom-group",key:N},{default:e.withCtx(()=>[e.createElementVNode("span",Ai,e.toDisplayString(m.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Ti=te(hi,[["render",Ni],["__scopeId","data-v-7e3049d2"]]);var Ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Po={},Li={get exports(){return Po},set exports(t){Po=t}};(function(t,o){(function(n,a){t.exports=a()})(Ei,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(Li);const Bi=Po;de.extend(Bi);const Oi=e.defineComponent({name:"Condition",components:{CloseOutlined:No,DownOutlined:kl,AppstoreAddOutlined:Fn,ASelect:v.Select,AInput:v.Input,ADatePicker:v.DatePicker,AButton:v.Button,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem,ASubMenu:v.SubMenu,APopover:v.Popover,ATabs:v.Tabs,ATabPane:v.TabPane,ARadioGroup:v.RadioGroup,ARadio:v.Radio,AInputNumber:v.InputNumber,ASelectOption:v.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var gt,bt,tt,ot,nt,at,Le,ve,Ye,ze,Ke,rt;const o=(gt=window==null?void 0:window.config)==null?void 0:gt.pageId,n=e.inject(pe),a=e.inject(Be),r=e.unref(e.inject(Oe)),l=e.inject(dn),i=e.inject(He),d=e.ref(!1),s=de(),c=e.computed(()=>{var z;const R=[];return(z=e.unref(i))==null||z.forEach(K=>{const{keyName:Z="",id:ee="",type:ue}=K;ue==="ecanRangePicker"?R.push({value:`${ee}-startTime`,label:`${Z||ee}-开始时间值`,keyName:`${Z||ee}-startTime`,id:ee},{value:`${ee}-endTime`,label:`${Z||ee}-结束时间值`,keyName:`${Z||ee}-endTime`,id:ee}):R.push({value:ee,label:`${Z||ee}`,keyName:`${Z||ee}`,id:ee})}),R}),p=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.dataViewId}),u=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.source}),f=e.ref(!1),h={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},A=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],y=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),x=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),S=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],w=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],O=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],m=e.ref({fieldName:(bt=t.data)==null?void 0:bt.fieldName,fieldType:(tt=t.data)==null?void 0:tt.fieldType,rule:(ot=t.data)==null?void 0:ot.rule,id:(nt=t.data)==null?void 0:nt.id,fieldValue:N(),label:(at=t.data)==null?void 0:at.label,targetSource:"",typeGuid:(Le=t.data)==null?void 0:Le.typeGuid,indexCode:(ve=t.data)==null?void 0:ve.indexCode,indexCodeNum:(Ye=t.data)==null?void 0:Ye.indexCodeNum,dataType:((ze=t.data)==null?void 0:ze.dataType)||"",componentId:((Ke=t.data)==null?void 0:Ke.componentId)||"",useCurrentTime:!!((rt=t.data)!=null&&rt.useCurrentTime)});function N(){const{fieldType:R="",dataType:z="",fieldValue:K=""}=t.data;if(R==="DATE"&&z==="time")return K&&de(K);if(z==="component"){const Z=e.unref(c).find(ee=>ee.keyName===K);return Z?Z.value:K}else return K}const g=e.ref(!1),B=e.computed(()=>m.value.fieldType==="DATE"),V=e.computed(()=>{const R=t.type;let z=[];const K=["classificationList","seriesList","rowHeaderList","dimensionList"];if(K.includes(R)){let Z=[];for(const ee in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ee)&&!["controlList","sqlConditions"].includes(ee)){const ue=e.unref(n)[ee];Array.isArray(ue)&&(K.includes(ee)?Z=Z.concat(ue.filter(_e=>_e.show)):Z=Z.concat(ue))}z=Z}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(R)&&(z=e.unref(l));return z.map(Z=>({...Z,value:Z.name}))}),{updateCondition:T,deleteCondition:M}=e.inject(cn,{updateCondition:(R,z,K)=>{},deleteCondition:(R,z)=>{}}),j=()=>{M(t.level,t.index)};e.watch(m,R=>{const z=re.cloneDeep(R);R.fieldType==="DATE"&&R.dataType!=="component"&&R.fieldValue&&(z.fieldValue=R.fieldValue.format(R.dateFormat)),T(z,t.level,t.index)},{deep:!0}),e.watch(d,R=>{m.value.fieldValue="",m.value.useCurrentTime=R});const q=R=>{const z=e.unref(V).find(wt=>wt.value===R)||{},{name:K,genericType:Z,id:ee,label:ue,typeGuid:_e,indexCode:Qe,indexCodeNum:Ct}=z;m.value={id:ee,fieldName:K,fieldType:Z,label:ue,rule:"",fieldValue:Z==="DATE"?null:void 0,targetSource:"",typeGuid:_e,indexCode:Qe,indexCodeNum:Ct,dataType:"",useCurrentTime:!1}},F=R=>{const z=e.unref(c).find(K=>K.value===R)||{};e.unref(m).componentId=z.id||""},k=e.computed(()=>{const R=e.unref(m).fieldType;return R==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:R==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:R==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),I=e.computed(()=>{let R="";const z=e.unref(k).find(K=>K.value===e.unref(m).rule);return z&&(R=z.label),R}),C=e.computed(()=>{let R={fontSize:"12px"};return e.unref(I)||(R={...R,position:"absolute",right:"11px",top:"9px"}),R}),E=e.ref([]),$=async()=>{var R;if(!(e.unref(E).length>0))try{const z=await a.post(`${ke}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(m).fieldName,hrpIndexTypeGuid:e.unref(m).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:K,data:Z=[]}=z.data;K&&(E.value=(R=Z==null?void 0:Z.slice(0,200))==null?void 0:R.map(ee=>({label:ee,value:ee})))}catch(z){console.error(z)}},b=R=>{e.unref(m).rule=R,e.unref(m).fieldValue=e.unref(m).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(R)&&$()},_=R=>{e.unref(m).dataType=R,e.unref(m).fieldValue=""},L=e.ref(),P=R=>{L.value=R,e.unref(m).fieldValue=(R==null?void 0:R.join(","))||""},D=R=>{const{keyPath:z}=R;e.unref(m).rule=z[0],e.unref(m).dataType=z[1],e.unref(m).dateFormat=z[2],e.unref(m).fieldValue=""};e.onMounted(()=>{var Z,ee,ue,_e,Qe,Ct,wt;if(m.value.dataType=((Z=t.data)==null?void 0:Z.dataType)||"",m.value.componentId=((ee=t.data)==null?void 0:ee.componentId)||"",e.unref(m).fieldType==="DATE"){const{activeKey:U,dateCalcTypes:G=[]}=t.data||{};if(e.unref(m).dateFormat=(ue=t.data)==null?void 0:ue.dateFormat,e.unref(m).activeKey=U,e.unref(m).calcWays=((_e=t.data)==null?void 0:_e.calcWays)||[],e.unref(m).dateCalcTypes=G,e.unref(m).useCurrentTime&&e.unref(m).dataType!=="component"&&(d.value=!0),U===5){const W=e.unref(m).calcWays[0];if(W){const Y=W.split("-");e.unref(y).expression=Y[0],e.unref(y).around=Y[1]}e.unref(y).unit=G[0]||"YEAR"}else{e.unref(m).radioValue=((Qe=t.data)==null?void 0:Qe.radioValue)||"";const W=e.unref(x).find(Y=>{var se;return Y.key===((se=t.data)==null?void 0:se.activeKey)});W&&ae(W,t.data)}}else L.value=((wt=(Ct=t.data)==null?void 0:Ct.fieldValue)==null?void 0:wt.split(","))||[];const{fieldType:R,fieldName:z,rule:K}=m.value;R!=="DATE"&&z&&K&&["IN","NOT_IN"].includes(K)&&$()});const H=R=>{if(e.unref(m).activeKey===R){e.unref(x)[R].radioValue=e.unref(m).radioValue,e.unref(x)[e.unref(m).activeKey]&&(e.unref(x)[e.unref(m).activeKey].radioValue=e.unref(m).radioValue,e.unref(m).radioValue==="1"?e.unref(x)[R].beforeNum=e.unref(m).calcWays[0]:e.unref(m).radioValue==="2"&&(e.unref(x)[R].afterNum=e.unref(m).calcWays[0]));return}e.unref(x).forEach(z=>{z.beforeNum=0,z.afterNum=0,z.radioValue="1",z.value=""})},Q=(R,z)=>{f.value=!0;const K=R.target.value,Z=z.type,ee=e.unref(m).dateFormat,ue=Math.abs(z.beforeNum),_e=z.afterNum;z.value=me(K,Z,ee,ue,_e)},X=R=>{const z=e.unref(m).activeKey;if(R!==z)return;let K="";z===0?K="years":z===1?K="quarters":z===2?K="months":z===3?K="weeks":z===4&&(K="days");const Z=e.unref(m).dateFormat,ee=e.unref(m).radioValue;let ue=0,_e=0;return ee==="1"?ue=Math.abs(e.unref(m).calcWays[0]):ee==="2"&&(_e=e.unref(m).calcWays[0]),me(ee,K,Z,ue,_e)},oe=(R,z,K,Z)=>{if(f.value=!0,z.radioValue===Z){const ee=R.target.value;K==="+"?z.value=de().add(ee,z.type).format(e.unref(m).dateFormat):z.value=de().subtract(ee,z.type).format(e.unref(m).dateFormat)}},ne=(R,z)=>{e.unref(m).calcWays||(e.unref(m).calcWays=[]),e.unref(m).activeKey=z,e.unref(m).radioValue=R.radioValue,R.radioValue==="1"?e.unref(m).calcWays[0]="-"+R.beforeNum:R.radioValue==="2"?e.unref(m).calcWays[0]=R.afterNum:R.radioValue==="3"?z===4?e.unref(m).calcWays[0]="0":e.unref(m).calcWays[0]="BEGIN":R.radioValue==="4"&&(e.unref(m).calcWays[0]="END"),z===0?e.unref(m).dateCalcTypes=["YEAR"]:z===1?e.unref(m).dateCalcTypes=["QUARTER"]:z===2?e.unref(m).dateCalcTypes=["MONTH"]:z===3?e.unref(m).dateCalcTypes=["WEEK"]:z===4&&(e.unref(m).dateCalcTypes=["DAY"]),g.value=!1},J=()=>{e.unref(m).activeKey=5,e.unref(m).dateCalcTypes=[e.unref(y).unit],e.unref(m).calcWays[0]=`${e.unref(y).expression}-${e.unref(y).around}`,g.value=!1};function ae(R,z){const{radioValue:K="",calcWays:Z=[]}=z;R.radioValue=K,Z!=null&&Z.length&&(K==="1"?R.beforeNum=Math.abs(Z[0]):K==="2"&&(R.afterNum=Z[0]))}function me(R,z,K,Z,ee){if(R==="1")return de().subtract(Z,z).format(K);if(R==="2")return de().add(ee,z).format(K);if(R==="3"){if(z==="years")return de().startOf("year").format(K);if(z==="quarters")return de().startOf("quarter").format(K);if(z==="months")return de().startOf("month").format(K);if(z==="days")return de().format(K)}else if(R==="4"){if(z==="years")return de().endOf("year").format(K);if(z==="quarters")return de().endOf("quarter").format(K);if(z==="months")return de().endOf("month").format(K)}return""}const Ge=(R,z)=>z.label.toLowerCase().indexOf(R.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(m).rule));return{fieldOptions:V,ruleOptions:k,onFieldChange:q,condition:m,valueOptions:E,onRuleChange:b,onDataTypeChange:_,onFieldValueSelectChange:P,fieldValues:L,onDelete:j,isDateType:B,formatList:A,tabDateList:x,compareList:S,menuRule:w,dateBtnLabel:I,downIconStyle:C,popoverVisible:g,dateRadioStyle:h,showTime:f,controlList:c,dataTypeList:O,customTabData:y,isUseCurrentTime:d,currentTime:s,isShowCustomDataType:et,handleMenuClick:D,changeTabInitDate:H,changeRadioValue:Q,getFieldValue:X,blurCompare:oe,okDatePickConfig:ne,onChangeComponent:F,filterOption:Ge,okCustomConfig:J}}}),Qu="",Xu="",Vi={class:"condition"},Ii=["title"],Fi={class:"rule"},$i={class:"data-type"},Di={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},vi={class:"popover-content-wrap"},Pi={key:0,class:"use-current-time"},Mi={class:"tabFilterRadio"},ji={key:0},Ri={key:1},Ui={style:{"margin-left":"10px"}},Gi={style:{"margin-left":"10px"}},zi={style:{position:"absolute",bottom:"10px"}},Hi={style:{display:"flex"}},Wi={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function qi(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),A=e.resolveComponent("a-date-picker"),y=e.resolveComponent("a-checkbox"),x=e.resolveComponent("a-input-number"),S=e.resolveComponent("a-radio"),w=e.resolveComponent("a-radio-group"),O=e.resolveComponent("a-tab-pane"),m=e.resolveComponent("a-tabs"),N=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),B=e.resolveComponent("a-input"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(T,M)=>(e.openBlock(),e.createBlock(i,{key:M,value:T.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:T.label},e.toDisplayString(T.label),9,Ii)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Fi,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,T=>(e.openBlock(),e.createBlock(c,{key:T.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,M=>{var j;return e.openBlock(),e.createBlock(c,{key:M.value,disabled:M.value==="component"&&!((j=t.controlList)!=null&&j.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===M.value?"color: #1890FF;":"")},e.toDisplayString(M.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,q=>(e.openBlock(),e.createBlock(s,{key:q.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===M.value&&t.condition.dateFormat===q.value?"color: #1890FF;":"")},e.toDisplayString(q.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",$i,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(T,M)=>(e.openBlock(),e.createBlock(i,{key:M,value:T.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Di,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(A,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(A,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=T=>t.condition.fieldValue=T),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(g,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=T=>t.popoverVisible=T),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",vi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Pi,[e.createVNode(y,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=T=>t.isUseCurrentTime=T)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(m,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(T,M)=>(e.openBlock(),e.createBlock(O,{key:M,tab:T.label},{default:e.withCtx(()=>[e.createElementVNode("div",Mi,[e.createVNode(w,{value:T.radioValue,"onUpdate:value":j=>T.radioValue=j,onChange:j=>t.changeRadioValue(j,T)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ji,"相对当前时间:"+e.toDisplayString(T.value),1)):(e.openBlock(),e.createElementBlock("div",Ri,"相对当前时间:"+e.toDisplayString(t.getFieldValue(M)),1)),e.createVNode(S,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(x,{value:T.beforeNum,"onUpdate:value":j=>T.beforeNum=j,min:0,onBlur:j=>t.blurCompare(j,T,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Ui,e.toDisplayString(T.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(S,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(x,{value:T.afterNum,"onUpdate:value":j=>T.afterNum=j,min:0,onBlur:j=>t.blurCompare(j,T,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Gi,e.toDisplayString(T.afterLabel),1)]),_:2},1032,["style"]),T.beforeText?(e.openBlock(),e.createBlock(S,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),T.afterText?(e.openBlock(),e.createBlock(S,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",zi,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=j=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:j=>t.okDatePickConfig(T,M)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(O,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=T=>t.customTabData.expression=T),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=T=>t.customTabData.unit=T),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=T=>t.customTabData.around=T)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",Wi,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=T=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=T=>{t.popoverVisible=!0})},[e.createVNode(N)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.isShowCustomDataType&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(B,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=T=>t.condition.fieldValue=T)},null,8,["value"])),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Yi=te(Oi,[["render",qi],["__scopeId","data-v-577fcc28"]]),Ki=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Yi}}),Ju="",Qi={key:0,class:"condition-list"},Xi={key:0,class:"condition-container"},Ji={key:0,class:"condition-text"},Zi={key:1,class:"condition-text"},es={class:"conditions"};function ts(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Qi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Xi,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",Ji,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Zi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",es,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const os=te(Ki,[["render",ts],["__scopeId","data-v-86c0c5aa"]]),ns=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:v.Select,AInput:v.Input,AInputNumber:v.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=re.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Zu="",Qn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),as={class:"truncations"},rs={class:"rule"},ls={class:"field-value"},is={class:"field-value"},ss=Qn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),cs=Qn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),ds=["onClick"];function ps(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",as,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.truncationList,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item",key:p},[e.createElementVNode("div",rs,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ls,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":u=>c.num=u,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",is,[ss,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),cs]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,ds)]))),128))])}const us=te(ns,[["render",ps],["__scopeId","data-v-f543c690"]]),Ie=(t,o)=>{if(typeof t=="string"&&typeof o=="string")return t.toLocaleLowerCase().includes(o.toLocaleLowerCase());if(typeof t=="string"&&Array.isArray(o)){const n=o.length;for(let a=0;a<n;a++){const r=o[a];if(typeof r=="string"&&t.toLocaleLowerCase().includes(r.toLocaleLowerCase()))return!0}}return!1},fs=t=>t.replace(/\\n/g,`
|
|
59
|
+
`),Ut=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Gt=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Gt(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},Xn=(t,o)=>{var x;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,u=[],f=[...a,...r,...l,...i,...d,...s,...c,...p],h=[];for(const S of f){const w=Gt((S==null?void 0:S.conditions)||[]);if(w!=null&&w.length){const O=w.filter(m=>Jn(m,o)?(m==null?void 0:m.dataType)==="component":!1).map(m=>{const N=Jn(m,o),g={};return m!=null&&m.dateFormat&&(g.format=m.dateFormat),{conditionKey:m.fieldName,conditionLabel:m.fieldName,conditionName:m.fieldName,conditionValueType:m.fieldType,id:N.id,keyName:m.fieldValue,rule:m.rule,notGlobal:!0,indexCode:m.indexCode,typeGuid:m.typeGuid,indexCodeNum:m.indexCodeNum,...g}});if(O!=null&&O.length)for(const m of O)h.find(N=>N.keyName===m.keyName)||h.push(m)}}const A=n.concat(h),y=A.length;for(let S=0;S<y;S++){const w=A[S];if(w&&!((x=Object.keys(w))!=null&&x.length)||(w==null?void 0:w.conditionKey)==="parentCode")continue;const{id:O,keyName:m,conditionLabel:N,conditionKey:g,conditionValueType:B,prop:V,rule:T="NONE",notGlobal:M=!1,format:j,indexCode:q,indexCodeNum:F,typeGuid:k,dataType:I="component",customValue:C}=w;let E=m||O;E&&V&&(E+=`-${V}`);const $=o.find(X=>X.id===O),b={rule:T,label:N,fieldName:g,fieldValue:"",valueType:B,alias:E,globalCondition:!M,indexCode:q,indexCodeNum:F,typeGuid:k},{value:_,format:L="YYYY-MM-DD",operate:P,type:D="",useCurrentTime:H}=$||{},Q=j||L;if(Ie(D,"date")){let X;if(H?X=de():X=de(_),P&&_){const{mode:oe,type:ne,value:J}=P;if(J)switch(ne){case"add":X=X.add(J,oe);break;case"minus":X=X.subtract(J,oe);break}}b.fieldValue=(X==null?void 0:X.format(Q))||"",b.dateFormat=Q}else if(D==="ecanRangePicker"){const{interval:X,intervalUnit:oe}=$||{};let ne=V;if(!V){const ae=m==null?void 0:m.split("-");ae!=null&&ae.length&&(ne=ae[ae.length-1])}if(!ne)return;let J=null;if(H&&(ne==="startTime"?J=de().subtract(X,oe):ne==="endTime"&&(J=de())),$[ne]&&(J=de($[ne])),P){const{type:ae,value:me,mode:Ge}=P;switch(ae){case"add":J=J&&J.add(me,Ge);break;case"minus":J=J&&J.subtract(me,Ge)}}J&&(b.fieldValue=J==null?void 0:J.format(Q)),b.dateFormat=Q}else{const X=_&&_.match(/\{(.+?)\}/g);X!=null&&X.length?b.fieldValue="":b.fieldValue=_}I===""&&(b.fieldValue=C||""),u.push(b)}for(let S=u.length-1;S>=0;S--){const w=u[S];w.globalCondition||u.find(m=>m.alias===w.alias&&m.globalCondition)&&u.splice(S,1)}return u},zt=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break;case"ecanImage":o="click";break}return o};function Jn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let Mo=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const ms=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:os,TruncationList:us,AModal:v.Modal,AButton:v.Button,ATabs:v.Tabs,ATabPane:v.TabPane},setup(t,{expose:o}){var q;const n=e.ref("1"),a=()=>{var F;return`添加过滤条件-${((F=t.item)==null?void 0:F.label)||""}`},r=e.inject(pe),l=e.inject(xe),i=e.inject(He),d=e.computed(()=>{var F;return(F=e.unref(r))==null?void 0:F.dataSourceId}),s=e.inject(Me),c=e.inject(vt),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,F=>{var k,I,C,E;F&&(Array.isArray((k=t.item)==null?void 0:k.conditions)&&(p.value=re.cloneDeep((I=t.item)==null?void 0:I.conditions)||[]),Array.isArray((C=t.item)==null?void 0:C.truncations)?u.value=re.cloneDeep((E=t.item)==null?void 0:E.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!F)},{flush:"post"});let h=!1;const A=F=>{var k;h=!0,e.unref(p)==null||((k=e.unref(p))==null?void 0:k.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==F?p.value=[{join:F,conditions:[e.unref(p)[0],{keyValue:Mo()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===F&&p.value[0].conditions.push({keyValue:Mo()}))};e.provide(cn,{updateCondition(F,k,I){var E;h=!0;let C=e.unref(p);for(let $=0;$<k&&C[0];$++)C=(E=C[0])==null?void 0:E.conditions;Array.isArray(C)&&C[I]&&(C[I]=F)},deleteCondition(F,k){var C,E;h=!0;let I=e.unref(p);for(let $=0;$<F&&I[0];$++)I=(C=I[0])==null?void 0:C.conditions;if(Array.isArray(I)&&I[k]&&(I.splice(k,1),I.length===1)){let $=e.unref(p);const b=F-2>0?F-2:0;for(let _=0;_<b&&$[0];_++)$=(E=$[0])==null?void 0:E.conditions;$[0].join===I[0].join?$[0].conditions=[...I[0].conditions,...$[0].conditions.slice(1)]:$[0]=I[0]}}});const y=F=>{h=!0,u.value=F},x=e.computed(()=>{var k;const F=[];return(k=e.unref(i))==null||k.forEach(I=>{const{keyName:C="",id:E="",type:$}=I;$==="ecanRangePicker"?F.push({value:`${E}-startTime`,label:`${C||E}-开始时间值`,keyName:`${C||E}-startTime`},{value:`${E}-endTime`,label:`${C||E}-结束时间值`,keyName:`${C||E}-endTime`}):F.push({value:E,label:`${C||E}`,keyName:`${C||E}`})}),F}),S=()=>{var b,_;const{controlList:F=[]}=e.unref(r),k=((b=e.unref(r)[t.type])==null?void 0:b.slice())||[],I=Gt(re.cloneDeep(k[t.index].conditions));k[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((_=e.unref(u))!=null&&_.length)&&(k[t.index].truncations=e.unref(u));const C=Gt(e.unref(p));for(const L of C)if(L.dataType==="component"&&L.fieldValue){const P=e.unref(x).find(D=>D.value===L.fieldValue);P&&(L.fieldValue=P.keyName)}const E=I.filter(L=>!C.find(P=>P.componentId===L.componentId)).filter(L=>!F.find(P=>P.id===L.componentId)),$=C.filter(L=>!I.find(P=>P.componentId===L.componentId));w(E,$),l({[t.type]:k,sqlConditions:Xn({...e.unref(r),[t.type]:k},e.unref(i))})};function w(F,k){var C;const I=F.map(E=>({...E,delete:!0})).concat(k.map(E=>({...E,add:!0})));for(const E of I){const $=e.unref(i).find(b=>b.id===E.componentId);if($){const{type:b,id:_,events:L=[]}=$,P=zt(b);if(E.add)L.find(D=>{var H;return D.on===P&&D.target===((H=e.unref(s))==null?void 0:H.id)&&D.emit==="refreshData"})||c({id:_,events:[...L,{on:P,target:(C=e.unref(s))==null?void 0:C.id,emit:"refreshData"}].reverse()});else if(E.delete){const D=L.findIndex(H=>{var Q;return H.on===P&&H.target===((Q=e.unref(s))==null?void 0:Q.id)&&H.emit==="refreshData"});D!==-1&&(L.splice(D,1),c({id:_,events:L}))}}}}const O=()=>{f.value=!0},m=()=>{p.value=[],f.value=!1},N=()=>{h&&S(),h=!1,m()},g=()=>{m()},B=e.inject(Be),V=e.unref(e.inject(Oe)),T=(q=window==null?void 0:window.config)==null?void 0:q.pageId,M=e.ref([]);e.provide(dn,M);const j=async F=>{var k;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:I,indexCode:C}=F,E=await B.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:T,dataSourceId:e.unref(d),indexGuid:I,indexCode:C},{headers:{Authentication:V,operateContext:"ygt"}}),{success:$,data:b=[]}=E.data;$&&((k=b==null?void 0:b.dataViewColumns)!=null&&k.length)&&(M.value=b.dataViewColumns.map(_=>({..._,label:_.title||_.label})))}catch(I){console.error(I)}};return e.watch(()=>t.item,F=>{F&&f.value&&j(F)}),o({showModal:O}),{visible:f,onOk:N,onCancel:g,handleTitle:a,conditionList:p,truncationList:u,addCondition:A,onUpdatetruncation:y,activeKey:n}}}),ef="",hs={class:"header"},ys={class:"header"};function gs(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",hs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ys,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const bs=te(ms,[["render",gs],["__scopeId","data-v-4fa1b1f2"]]),Cs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:v.Input,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(xe),l=e.ref(),i=p=>{const{showLabel:u="",label:f=""}=p;l.value=u||f||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),tf="",ws=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),_s={class:"config-name"},ks=ws(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function xs(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",_s,[ks,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ss=te(Cs,[["render",xs],["__scopeId","data-v-de6a1755"]]),As=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(xe),l=e.inject(He),i=e.inject(Me),d=e.inject(vt),s=e.ref(),c=e.computed(()=>{var S;return(S=e.unref(l))==null?void 0:S.filter(w=>w.keyName!=="")});let p=[];const u=S=>{const{sortCpnts:w=[]}=S;p=re.cloneDeep(w),s.value=re.cloneDeep(w),n.value=!0},f=()=>{n.value=!1},h=()=>{var N;const{controlList:S=[]}=e.unref(a),w=p.filter(g=>!e.unref(s).includes(g)).filter(g=>!S.find(B=>B.id===g)),O=e.unref(s).filter(g=>!p.includes(g)).filter(g=>!S.find(B=>B.id===g)),m=w.map(g=>({componentId:g,delete:!0})).concat(O.map(g=>({componentId:g,add:!0})));for(const g of m){const B=e.unref(l).find(V=>V.id===g.componentId);if(B){const{type:V,id:T,events:M=[]}=B,j=zt(V);if(g.add)M.find(q=>{var F;return q.on===j&&q.target===((F=e.unref(i))==null?void 0:F.id)&&q.emit==="refreshData"})||d({id:T,events:[...M,{on:j,target:(N=e.unref(i))==null?void 0:N.id,emit:"refreshData"}].reverse()});else if(g.delete){const q=M.findIndex(F=>{var k;return F.on===j&&F.target===((k=e.unref(i))==null?void 0:k.id)&&F.emit==="refreshData"});q!==-1&&(M.splice(q,1),d({id:T,events:M}))}}}},A=()=>{var w;h();const S=((w=e.unref(a)[t.type])==null?void 0:w.slice())||[];S[t.index].sortCpnts=s.value,r({[t.type]:S}),f()},y=()=>{f()},x=(S,w)=>{var O;return(O=w==null?void 0:w.keyName)==null?void 0:O.toLowerCase().includes(S==null?void 0:S.toLowerCase())};return o({showModal:u}),{visible:n,onOk:A,onCancel:y,idFilterOption:x,fieldName:s,usedComponentList:c}}}),of="",Ns=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),Ts={class:"sort-by-cpnt"},Es=Ns(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function Ls(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Ts,[Es,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Bs=te(As,[["render",Ls],["__scopeId","data-v-2943f455"]]),Os=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(xe),l=e.ref(),i=e.ref([]),d=(f,h)=>{const{dimByCount:A=""}=f;l.value=A,i.value=h.filter(y=>["DIM","BUILT_IN_DIM"].includes(y.scope)).map(y=>({label:y.title||y.name,value:y.typeGuid})),n.value=!0},s=()=>{n.value=!1},c=()=>{var h;const f=((h=e.unref(a)[t.type])==null?void 0:h.slice())||[];f[t.index].dimByCount=l.value,r({[t.type]:f}),s()},p=()=>{s()},u=(f,h)=>{var A;return(A=h==null?void 0:h.label)==null?void 0:A.toLowerCase().includes(f==null?void 0:f.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:l,dimensionList:i}}}),nf="",Vs=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),Is={class:"dim-by-count"},Fs=Vs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function $s(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Is,[Fs,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Ds=te(Os,[["render",$s],["__scopeId","data-v-e8608437"]]),jo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:jo(t,r.children)&&(n=jo(t,r.children)))}return n},vs=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:v.Row,ACol:v.Col,ATextarea:v.Textarea,APopover:v.Popover,AInputSearch:v.InputSearch,ATree:v.Tree,DoubleRightOutlined:bl},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Be),a=e.unref(e.inject(Oe)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{console.log("graphicConfig",r);const g=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return t.mode==="edit"?(g==null?void 0:g.filter(B=>{var V;return B.id!==((V=t.item)==null?void 0:V.id)}))||[]:g||[]}),p=e.computed({get:()=>t.value||"",set:g=>{o("update:value",g),o("change",g)}}),u=e.ref(""),f=g=>{const B=document.getElementById("calTextArea");let V=p.value;if(document.selection){const T=document.selection.createRange();T.text=g}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const T=B.selectionStart,M=B.selectionEnd;let j=T;V=V.substring(0,T)+g+V.substring(M,V.length),j+=g.length,B.selectionStart=B.selectionEnd=j}else V+=g;p.value=V},h=["+","-","*","/","(",")"],A=(g,B)=>{let V="";switch(B){case"name":{V="${"+g+"}";break}case"function":{V=g+"()";break}default:V=g}f(V)},y=[],x=e.ref([]),S=e.ref(!0),w=e.ref([]),O=g=>{var B;for(const V of g)(B=V==null?void 0:V.children)!=null&&B.length?O(V.children):y.push({key:V.key,title:V.title})},m=async()=>{try{const g=await n.get(`${ke}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:V=[]}=g.data;B&&(V!=null&&V.length)&&(O(V),w.value=V)}catch(g){console.error(g)}},N=g=>{x.value=g,S.value=!1};return e.watch(u,g=>{const B=y.map(V=>V.title.indexOf(g)>-1?jo(V.key,w.value):null).filter((V,T,M)=>V&&M.indexOf(V)===T);x.value=B,u.value=g,S.value=!0}),e.onMounted(()=>{m()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:w,searchFuncValue:u,expandedKeys:x,autoExpandParent:S,selectedElem:A,onExpand:N}}}),af="",rf="",Ps={class:"formula-calculation"},Ms={class:"field-area"},js=["onClick"],Rs={class:"cal_right_bottom"},Us={class:"cal_fu"},Gs=["onClick"],zs={class:"function-wrap"},Hs={class:"wrap-search"},Ws={class:"tree-box"},qs={key:0},Ys={style:{color:"#f50"}},Ks={key:1},Qs=["onClick"],Xs={class:"cal_a"};function Js(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Ps,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,A)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:A,onClick:y=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,js))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",Rs,[e.createElementVNode("ul",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,A)=>(e.openBlock(),e.createElementBlock("li",{onClick:y=>t.selectedElem(h,"symbol"),key:A},e.toDisplayString(h),9,Gs))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",zs,[e.createElementVNode("div",Hs,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",Ws,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:A})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",qs,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",Ys,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",Ks,e.toDisplayString(h),1)),A?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:y=>t.selectedElem(h,"function")},"插入",8,Qs)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Xs,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Zs=te(vs,[["render",Js],["__scopeId","data-v-4ca764e3"]]),ec=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Zs,AForm:v.Form,AModal:v.Modal,AFormItem:v.FormItem,AInput:v.Input,ASelect:v.Select,ASelectOption:v.SelectOption,ATextarea:v.Textarea,AInputNumber:v.InputNumber,ATooltip:v.Tooltip,QuestionCircleOutlined:Ul},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(He),a=e.inject(pe),r=e.inject(xe),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const F=["leftAxisList","rightAxisList","queryColumnList","indicators"];let k=[];for(const I of F)Object.prototype.hasOwnProperty.call(e.unref(a),I)&&(k=k.concat(e.unref(a)[I]));return k}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},f=e.ref({}),h=e.ref(),A=e.ref(!1),y=e.ref();e.watch(A,F=>{if(F)if(t.mode==="edit"){const{label:k,calcType:I,formula:C,builtInValueSource:E,builtInFormula:$,builtInCalcWay:b}=t.item;if(y.value={label:k,calcType:I,formula:C,builtInValueSource:E,builtInFormula:$,builtInCalcWay:b},$==="DATE_OFFSET"){const _=b.split("-");(_==null?void 0:_.length)===3&&(f.value={value:_[0],unit:_[1],around:_[2]})}}else t.mode==="add"&&(y.value=re.cloneDeep(p),f.value=re.cloneDeep(u));else y.value=re.cloneDeep(p),f.value=re.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!F)},{immediate:!0,deep:!0});let x=!1;const S=()=>{x=!0},w=F=>{const k=e.unref(l).find(I=>I.id===F);k&&(y.value.builtInCalcWay=k.keyName),x=!0},O=()=>{var E;const F=((E=e.unref(a)[t.type])==null?void 0:E.slice())||[],{label:k,builtInFormula:I}=e.unref(y)||{},C={};if(I==="DATE_OFFSET"&&(C.builtInCalcWay=`${e.unref(f).value}-${e.unref(f).unit}-${e.unref(f).around}`),t.mode==="add"){const $=Mo();F.push({...e.unref(y),...C,id:$,show:!0,name:k})}else t.mode==="edit"&&(F[t.index]={...F[t.index],...e.unref(y),...C,name:k});r({[t.type]:F})},m=()=>{A.value=!0},N=()=>{A.value=!1},g=async(F,k)=>{if(k==="")return Promise.reject(new Error("请输入指标名"));{const I=e.unref(d).find(C=>C.label===k);return I?I.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},B=e.computed(()=>{let F={label:[{required:!0,validator:g,trigger:"change"}]};return y.value.calcType==="BUILT_IN"&&(F={...F,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),F}),V=()=>{h.value.validate().then(()=>{x&&O(),x=!1,N()})},T=()=>{h.value.clearValidate(),N()},M=()=>{x=!0,e.unref(y).builtInCalcWay=""},j=e.computed(()=>{let F="";const k=e.unref(y).builtInCalcWay,I=e.unref(y).builtInValueSource;if(!I||!k)return F;switch(e.unref(y).builtInFormula){case"BUILT_IN_RANK":{k==="ASC"?F="【"+I+"】由小到大在所有值中的排名":F="【"+I+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{F=`所有【】的
|
|
60
|
+
`,k==="ASC"?F=F+"【"+I+"】由小到大的组内的排名":F=F+"【"+I+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let C="";switch(k){case"SUM":{C="求和";break}case"AVG":{C="求平均值";break}case"MIN":{C="求最小值";break}case"MAX":{C="求最大值";break}}F="将所有【"+I+"】"+C;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let C="";switch(F=`所有【】的
|
|
61
|
+
`,k){case"SUM":{C="求和";break}case"AVG":{C="求平均值";break}case"MIN":{C="求最小值";break}case"MAX":{C="求最大值";break}}F=F+"将所有【"+I+"】"+C;break}}return F}),q=(F,k)=>k.keyName.toLowerCase().indexOf(F.toLowerCase())>=0;return o({showModal:m}),{visible:A,onCancel:T,labelCol:s,wrapperCol:c,formState:y,builtInValueSourceList:i,onOK:V,onChange:S,formRules:B,accessLogic:j,formRef:h,onChangeBuiltInFormula:M,componentList:l,onChangeComponent:w,filterOption:q,offsetConfig:f}}}),lf="",sf="",tc={key:0,class:"accesstip"},oc={style:{display:"flex","align-items":"center"}};function nc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-input-number"),h=e.resolveComponent("question-circle-outlined"),A=e.resolveComponent("a-tooltip"),y=e.resolveComponent("a-form"),x=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(x,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(y,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=S=>t.formState.label=S),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=S=>t.formState.calcType=S),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=S=>t.formState.formula=S),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=S=>t.formState.builtInFormula=S),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(s,{value:"DATE_OFFSET"},{default:e.withCtx(()=>[e.createTextVNode("日期偏移")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=S=>t.formState.builtInValueSource=S),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(S,w)=>(e.openBlock(),e.createBlock(s,{key:w,value:S.label,disabled:t.item.label===S.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=S=>t.formState.builtInCalcWay=S),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",tc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=S=>t.formState.builtInValueSource=S),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",oc,[e.createVNode(f,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=S=>t.offsetConfig.value=S),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=S=>t.offsetConfig.unit=S),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=S=>t.offsetConfig.around=S),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(A,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(h,{class:"icon",style:{color:"#989898","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const ac=te(ec,[["render",nc],["__scopeId","data-v-c0f3affa"]]),rc=e.defineComponent({name:"DataConfigCard",directives:{focus:Kn},components:{CalculationModal:ac,FilterModal:bs,CustomGroupModal:Ti,SettingOutlined:Ql,DeleteOutlined:ml,CopyOutlined:dl,InfoCircleOutlined:Nl,CustomSortModal:mi,PlusOutlined:Pl,ACard:v.Card,ACheckbox:v.Checkbox,AInput:v.Input,ADropdown:v.Dropdown,AMenu:v.Menu,ASubMenu:v.SubMenu,AMenuItem:v.MenuItem,AMenuDivider:v.MenuDivider,ASelect:v.Select,APopover:v.Popover,Draggable:_t,ConfigName:Ss,SortByCpnt:Bs,DimByCount:Ds},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(pe),a=e.inject(xe),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(co),d=e.ref(),s=(U={})=>{var Y;const{type:G}=t;if(e.unref(i)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(U.scope)?r.includes(G)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(U.scope)&&l.includes(G)&&(W=!0),G==="dimensionList"){const se=((Y=e.unref(n)[G])==null?void 0:Y.slice())||[];(se==null?void 0:se.length)===1&&(W=!1)}return W},c=e.computed(()=>e.unref(Qe).type==="ecanDataSelect"&&t.type==="indicators"),p=(U="{}")=>{var G;try{const W=JSON.parse(U);if(!s(W))return;const Y=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(c))&&Y.forEach(se=>{se.show=!1}),f(Y,W),Y.push(W),a({[t.type]:Y}),sessionStorage.setItem("indicator-list-item","")}catch(W){console.error(W)}},u=(U="{}")=>{var G;try{const{cardItem:W,type:Y,index:se}=JSON.parse(U);if(!s(W)||Y===t.type)return;const ce=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];f(ce,W),ce.push(W);const le=e.unref(n)[Y].slice()||[];le.splice(se,1),a({[t.type]:ce,[Y]:le})}catch(W){console.error(W)}};function f(U,G){const W=[];if(U.forEach(Y=>{Y.label.includes(G.label)&&W.push(Y.label.split(G.label)[1])}),W.length>=1){for(let Y=1;Y<=W.length;Y++)if(!W.includes(Y+"")){G.label=G.label+Y;break}}}const h=(U,G)=>{var se,ce;const W=(se=U.target)==null?void 0:se.checked,Y=((ce=e.unref(n)[t.type])==null?void 0:ce.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(c))&&Y.forEach(le=>{le.show=!1}),Y[G].show=W,a({[t.type]:Y})},A=U=>{var W;const G=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];G.splice(U,1),a({[t.type]:G})},y=()=>{sessionStorage.setItem("indicator-card-item","")},x=()=>{const U=sessionStorage.getItem("indicator-list-item"),G=sessionStorage.getItem("indicator-card-item");U?p(U):G&&u(G)},S=U=>{var Pe,lt;const{newIndex:G,oldIndex:W,from:Y,to:se}=U,ce=Y.id,le=se.id;if(G>=0&&W>=0){if(ce===le){const ie=((Pe=e.unref(n)[t.type])==null?void 0:Pe.slice())||[],fe=ie.splice(W,1)[0];fe&&(ie.splice(G,0,fe),a({[t.type]:ie}))}else if(t.type===le){const ie=((lt=e.unref(n)[le])==null?void 0:lt.slice())||[];if(ie!=null&&ie.length){const fe=ie.splice(ie.length-1,1)[0];fe&&(ie.splice(G,0,fe),a({[t.type]:ie}))}}}},w=(U,G)=>{const W=U.oldIndex,Y=G[W];Y&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:Y,type:t.type,index:W}))},O=e.computed(()=>e.unref(n)[t.type]||[]),m=e.ref([]);let N=!1;e.watch(()=>e.unref(O).length,U=>{m.value=new Array(U).fill(!1)},{flush:"post",immediate:!0});const g=U=>{var W;const G=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];G.splice(U,1),a({[t.type]:G})},B=U=>{m.value[U]=!0},V=()=>{N=!0},T=(U,G,W)=>{var Y,se;if(m.value[G]=!1,N){const ce=(Y=U.target)==null?void 0:Y.value,le=((se=e.unref(n)[t.type])==null?void 0:se.slice())||[],Pe=le.filter(ie=>{var fe;return(fe=ie==null?void 0:ie.formula)==null?void 0:fe.includes(W)}).map(ie=>ie.id),lt=le.filter(ie=>{var fe;return(fe=ie==null?void 0:ie.builtInValueSource)==null?void 0:fe.includes(W)}).map(ie=>ie.id);if(Pe!=null&&Pe.length)for(const ie of Pe){const fe=le.find(on=>on.id===ie);fe.formula=fe.formula.replaceAll(W,ce)}if(lt!=null&<.length)for(const ie of lt){const fe=le.find(on=>on.id===ie);fe.builtInValueSource=fe.builtInValueSource.replaceAll(W,ce)}le[G].label=ce,a({[t.type]:le})}N=!1},M="DEFAULT",j=e.computed(()=>{const{scope:U,label:G}=e.unref(d);let W=e.unref(n)[t.type]||[];["DIM","BUILT_IN_DIM"].includes(U)&&(W=W.filter(le=>le.label===G));const{leftAxisList:Y=[],rightAxisList:se=[],indicators:ce=[]}=e.unref(n)||{};return[{id:M,label:"默认",name:"默认"},...W,...Y,...se,...ce]}),q=(U={},G,W="ASC")=>{var Pe;const{label:Y,name:se,id:ce}=U,le=((Pe=e.unref(n)[t.type])==null?void 0:Pe.slice())||[];ce===M?delete le[G].sort:le[G].sort={label:Y,columnName:se,type:"NORMAL",order:W},a({[t.type]:le})},F=(U={},G="ASC")=>{const Y={ASC:"升序",DESC:"降序"}[G],{sort:se}=U,{label:ce,order:le}=se||{};return ce&&le===G?`${Y}(${ce})`:Y},k=e.ref(),I=e.ref(),C=e.ref(),E=e.ref(),$=(U={},G)=>{var W;k.value=U,I.value=G,(W=e.unref(C))==null||W.showModal()},b=U=>{var G;return"自定义排序"+(((G=U==null?void 0:U.sort)==null?void 0:G.type)==="CUSTOM"?"(已配置)":"")},_=(U={},G)=>{var W;k.value=U,I.value=G,(W=e.unref(E))==null||W.showModal()},L=U=>"自定义分组"+((U==null?void 0:U.customGroup)!=null?"(已配置)":""),P=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],D=[{name:"是",value:1},{name:"否",value:0}],H=(U,G)=>{var Y;const W=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];W[G].aggregate=U,a({[t.type]:W})},Q=(U,G)=>{var Y;const W=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];W[G].distinct=U,a({[t.type]:W})},X=(U,G)=>{var Y;const W=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];W[G].dateFormat=U,a({[t.type]:W})},oe=(U="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[U]})`,ne=U=>`是否去重(${{0:"否",1:"是"}[U]||"否"})`,J=(U={})=>{var G;return"过滤"+(U!=null&&U.conditions&&((G=U==null?void 0:U.conditions)==null?void 0:G.length)>0?"(已配置)":"")},ae=e.ref(),me=e.ref(),Ge=e.ref(),et=e.ref(),gt=(U={},G)=>{k.value=U,I.value=G,e.unref(ae).showModal()},bt=(U={},G)=>{k.value=U,I.value=G,e.unref(me).showModal(U)},tt=(U={},G)=>{k.value=U,I.value=G,e.unref(Ge).showModal(U)},ot=(U={},G)=>{k.value=U,I.value=G,e.unref(et).showModal(U,e.unref(Z))},nt=e.ref(),at=e.ref("add"),Le=(U,G,W)=>{var Y;at.value=U,U==="edit"&&(k.value=G,I.value=W),(Y=e.unref(nt))==null||Y.showModal()},ve=e.inject(Be),Ye=e.unref(e.inject(Oe)),ze=e.ref([]),Ke=e.computed(()=>e.unref(n)[t.type]||{}),rt=async()=>{try{const U=await ve.post(`${ke}/diagram/dimFields`,{},{headers:{Authentication:Ye,operateContext:"ygt"}}),{success:G,data:W=[]}=U.data;G&&(ze.value=W)}catch(U){console.error(U)}},R=(U,G)=>{const W=e.unref(n)[t.type]||{};W[G]=U,a({[t.type]:W})},z=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],K=e.ref({}),Z=e.ref([]),ee=async(U,G)=>{var Y;const{name:W}=G;if(!z.includes(t.type)&&U&&Ut(G,"indexCode")){const se=await ve.post(`${ke}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:G.id,indexCode:G.indexCode,pageId:(Y=window==null?void 0:window.config)==null?void 0:Y.pageId},{headers:{Authentication:Ye,operateContext:"ygt"}}),{success:ce,data:le}=se.data;ce&&le&&(Z.value=(le==null?void 0:le.dataViewColumns)||[],K.value[W]={name:le.name,code:le.indexCode})}},ue=U=>{d.value=U},_e=U=>{const G=document.createElement("input");document.body.appendChild(G),G.setAttribute("value",U),G.select(),document.execCommand("copy"),document.body.removeChild(G),v.message.success("复制成功")},Qe=e.inject(Me),Ct=e.computed(()=>t.type==="indicators"&&e.unref(Qe).type==="ecanTable"),wt=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(Qe).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:rt())}),{onCheckboxChange:h,onDropEnd:A,onDragItemEnd:y,onDragItemAdd:x,onDragItemSort:S,onDragItemStart:w,cardItemList:O,onDelete:g,onEdit:B,onCommitLabelChange:T,sortList:j,onSort:q,handleSortTitle:F,showCustomSortModal:$,customSortModalRef:C,currentItem:k,currentIndex:I,handleCustomSortTitle:b,handleCustomGroupTitle:L,customGroupModalRef:E,showCustomGroupModal:_,editLabelList:m,onLabelChange:V,aggregateList:P,distinctList:D,onAggregateChange:H,onDistinctChange:Q,onDateFormatChange:X,handleAggregateTitle:oe,handleDistinctTitle:ne,onShowCalculationModal:Le,handleFilterTitle:J,filterModalRef:ae,configNameRef:me,sortByCpntRef:Ge,dimByCountRef:et,showFilterModal:gt,calculationModalRef:nt,calculationModalMode:at,formatList:o,fieldOptions:ze,fieldData:Ke,onFieldChange:R,onVisibleChange:ee,onClickSetting:ue,copyDataViewName:_e,dataViewMap:K,isShowConfigName:Ct,showConfigNameModal:bt,dimensionType:z,isShowSortByCpnt:wt,showSortByCpntModal:tt,dataSelectIndicators:c,showDimByCountModal:ot}}}),cf="",df="",ct=t=>(e.pushScopeId("data-v-a12758e1"),t=t(),e.popScopeId(),t),lc={class:"title"},ic={class:"title-text"},sc={class:"field-wrap"},cc={class:"field-item"},dc=ct(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),pc={class:"field-item"},uc=ct(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),fc={class:"title"},mc={class:"title-text"},hc=ct(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),yc=ct(()=>e.createElementVNode("span",null,"添加计算指标",-1)),gc={class:"card-item-wrap"},bc={class:"card-item-inner"},Cc=["onClick"],wc=["onClick"],_c=["onClick"],kc={style:{display:"flex","align-items":"center"}},xc=["title"],Sc=ct(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Ac={style:{display:"flex","align-items":"center"}},Nc=["title"],Tc=ct(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Ec(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),f=e.resolveComponent("setting-outlined"),h=e.resolveComponent("a-menu-item"),A=e.resolveComponent("a-sub-menu"),y=e.resolveComponent("a-menu-divider"),x=e.resolveComponent("copy-outlined"),S=e.resolveComponent("a-menu"),w=e.resolveComponent("a-dropdown"),O=e.resolveComponent("delete-outlined"),m=e.resolveComponent("a-checkbox"),N=e.resolveComponent("draggable"),g=e.resolveComponent("custom-sort-modal"),B=e.resolveComponent("custom-group-modal"),V=e.resolveComponent("filter-modal"),T=e.resolveComponent("config-name"),M=e.resolveComponent("sort-by-cpnt"),j=e.resolveComponent("dim-by-count"),q=e.resolveComponent("calculation-modal"),F=e.resolveDirective("focus");return t.type==="formFields"?(e.openBlock(),e.createBlock(d,{key:0,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createElementVNode("div",ic,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",sc,[e.createElementVNode("div",cc,[dc,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=k=>t.onFieldChange(k,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",pc,[uc,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=k=>t.onFieldChange(k,"valueField"))},null,8,["value","options"])])])]),_:1},8,["head-style"])):(e.openBlock(),e.createBlock(d,{key:1,class:"data-config-card","head-style":{backgroundColor:"rgba(161,212,230,0.3)",height:"58px",padding:"0 10px"}},{title:e.withCtx(()=>[e.createElementVNode("div",fc,[e.createElementVNode("div",mc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[hc]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(k=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),yc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(N,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=k=>t.cardItemList=k),class:"chart-column",id:t.type,group:"cardItem","item-key":"index",onAdd:t.onDragItemAdd,onSort:t.onDragItemSort,onEnd:t.onDragItemEnd,onStart:o[4]||(o[4]=k=>t.onDragItemStart(k,t.cardItemList))},{item:e.withCtx(({element:k,index:I})=>[e.createElementVNode("div",gc,[e.createVNode(m,{class:"card-item",checked:k.show,onChange:C=>t.onCheckboxChange(C,I)},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[!t.editLabelList[I]&&k.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(C=>t.onEdit(I),["prevent","stop"])},e.toDisplayString(k.label),9,Cc)):e.createCommentVNode("",!0),!t.editLabelList[I]&&!k.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(C=>t.onEdit(I),["prevent","stop"])}," 请点击填入名字 ",8,wc)):e.createCommentVNode("",!0),t.editLabelList[I]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":k.label,size:"small",onBlur:C=>t.onCommitLabelChange(C,I,k.label),onPressEnter:C=>t.onCommitLabelChange(C,I,k.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[F]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(k.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(C=>t.onShowCalculationModal("edit",k,I),["prevent","stop"])}," fx ",8,_c)):e.createCommentVNode("",!0),e.createVNode(w,{trigger:["click"],onVisibleChange:C=>t.onVisibleChange(C,k)},{overlay:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:t.handleSortTitle(k,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.id,onClick:E=>t.onSort(C,I,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(A,{title:t.handleSortTitle(k,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,C=>(e.openBlock(),e.createBlock(h,{class:"menu-item",style:{"white-space":"nowrap"},key:C.id,onClick:E=>t.onSort(C,I,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h,{onClick:C=>t.showCustomSortModal(k,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(k)),1)]),_:2},1032,["onClick"]),e.createVNode(y),e.createVNode(h,{onClick:C=>t.showCustomGroupModal(k,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(k)),1)]),_:2},1032,["onClick"]),e.createVNode(y),k.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.value,onClick:E=>t.onDateFormatChange(C.value,I)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(k.dateFormat===C.value||!k.dateFormat&&C.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(C.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(y)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(h,{onClick:C=>t.showFilterModal(k,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(k)),1)]),_:2},1032,["onClick"]),e.createVNode(y),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(A,{title:t.handleAggregateTitle(k.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.value,onClick:E=>t.onAggregateChange(C.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(y)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(h,{onClick:C=>t.showConfigNameModal(k,I)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(y)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(h,{onClick:C=>t.showSortByCpntModal(k,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(y)],64)):e.createCommentVNode("",!0),k.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(h,{onClick:C=>t.showDimByCountModal(k,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(y),e.createVNode(A,{title:t.handleDistinctTitle(k.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,C=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:C.value,onClick:E=>t.onDistinctChange(C.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(y)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[k.name]?(e.openBlock(),e.createBlock(h,{key:0,onClick:C=>t.copyDataViewName(t.dataViewMap[k.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[k.name].name},[Sc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[k.name].name),1)],8,xc),e.createVNode(x,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[k.name]?(e.openBlock(),e.createBlock(h,{key:1,onClick:C=>t.copyDataViewName(t.dataViewMap[k.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Ac,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[k.name].code},[Tc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[k.name].code),1)],8,Nc),e.createVNode(x,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(f,{class:"setting-icon",onClick:C=>t.onClickSetting(k)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(O,{class:"delete-icon",onClick:e.withModifiers(C=>t.onDelete(I),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(g,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(B,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(V,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(T,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(M,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(j,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(q,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const Lc=te(rc,[["render",Ec],["__scopeId","data-v-a12758e1"]]),Bc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},Oc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Lc},setup(){const t=e.inject(Me),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(xe),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var x,S;const s=re.cloneDeep((x=e.unref(t))==null?void 0:x.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"],counter:["indicators"]},u="ecan";let f=e.unref(o);if(f.startsWith(u)){const w=u.length;f=((S=f.slice(w,w+1))==null?void 0:S.toLowerCase())+f.slice(w+1)}const h=p[f],A=Bc,y=(h==null?void 0:h.length)||0;for(let w=0;w<y;w++){const O=h[w];if(!O)break;r.push({...A[O],type:O})}for(const w of c)i(s,w)&&!h.find(O=>O===w)&&(s[w]=[]);l(s)})(),{cardsMap:a,cards:r}}}),pf="",uf="",Vc={class:"data-group"};function Ic(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Fc=te(Oc,[["render",Ic],["__scopeId","data-v-64cc2643"]]),$c=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],Dc={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},vc=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:v.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function Pc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const Mc=te(vc,[["render",Pc]]),jc=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const u=t.value;return typeof u=="string"?parseFloat(u):typeof u=="object"&&u!=null?u[t.valueKey]:u}),a=u=>t.value!=null&&typeof t.value=="object"?t.value[t[`${u}ValueKey`]]:Array.isArray(t[u])?t[u][0]&&t[u][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?o("change",u):o("change",`${u}${f}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Rc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const Zn=te(jc,[["render",Rc]]),Uc=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:v.RadioGroup,ARadioButton:v.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function Gc(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const zc=te(Uc,[["render",Gc]]),Hc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function Wc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const qc=te(Hc,[["render",Wc]]),Yc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:v.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function Kc(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const Qc=te(Yc,[["render",Kc]]);var ge="top",Ae="bottom",Ne="right",be="left",Ro="auto",At=[ge,Ae,Ne,be],dt="start",Nt="end",Xc="clippingParents",ea="viewport",Tt="popper",Jc="reference",ta=At.reduce(function(t,o){return t.concat([o+"-"+dt,o+"-"+Nt])},[]),oa=[].concat(At,[Ro]).reduce(function(t,o){return t.concat([o,o+"-"+dt,o+"-"+Nt])},[]),Zc="beforeRead",ed="read",td="afterRead",od="beforeMain",nd="main",ad="afterMain",rd="beforeWrite",ld="write",id="afterWrite",sd=[Zc,ed,td,od,nd,ad,rd,ld,id];function Fe(t){return t?(t.nodeName||"").toLowerCase():null}function we(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function Xe(t){var o=we(t).Element;return t instanceof o||t instanceof Element}function Te(t){var o=we(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Uo(t){if(typeof ShadowRoot>"u")return!1;var o=we(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function cd(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Te(l)||!Fe(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function dd(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Te(r)||!Fe(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const pd={name:"applyStyles",enabled:!0,phase:"write",fn:cd,effect:dd,requires:["computeStyles"]};function $e(t){return t.split("-")[0]}var Je=Math.max,Ht=Math.min,pt=Math.round;function Go(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(o){return o.brand+"/"+o.version}).join(" "):navigator.userAgent}function na(){return!/^((?!chrome|android).)*safari/i.test(Go())}function ut(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Te(t)&&(r=t.offsetWidth>0&&pt(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&pt(a.height)/t.offsetHeight||1);var i=Xe(t)?we(t):window,d=i.visualViewport,s=!na()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function zo(t){var o=ut(t),n=t.offsetWidth,a=t.offsetHeight;return Math.abs(o.width-n)<=1&&(n=o.width),Math.abs(o.height-a)<=1&&(a=o.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:a}}function aa(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Uo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Re(t){return we(t).getComputedStyle(t)}function ud(t){return["table","td","th"].indexOf(Fe(t))>=0}function qe(t){return((Xe(t)?t.ownerDocument:t.document)||window.document).documentElement}function Wt(t){return Fe(t)==="html"?t:t.assignedSlot||t.parentNode||(Uo(t)?t.host:null)||qe(t)}function ra(t){return!Te(t)||Re(t).position==="fixed"?null:t.offsetParent}function fd(t){var o=/firefox/i.test(Go()),n=/Trident/i.test(Go());if(n&&Te(t)){var a=Re(t);if(a.position==="fixed")return null}var r=Wt(t);for(Uo(r)&&(r=r.host);Te(r)&&["html","body"].indexOf(Fe(r))<0;){var l=Re(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Et(t){for(var o=we(t),n=ra(t);n&&ud(n)&&Re(n).position==="static";)n=ra(n);return n&&(Fe(n)==="html"||Fe(n)==="body"&&Re(n).position==="static")?o:n||fd(t)||o}function Ho(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Lt(t,o,n){return Je(t,Ht(o,n))}function md(t,o,n){var a=Lt(t,o,n);return a>n?n:a}function la(){return{top:0,right:0,bottom:0,left:0}}function ia(t){return Object.assign({},la(),t)}function sa(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var hd=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ia(typeof o!="number"?o:sa(o,At))};function yd(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=$e(n.placement),s=Ho(d),c=[be,Ne].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=hd(r.padding,n),f=zo(l),h=s==="y"?ge:be,A=s==="y"?Ae:Ne,y=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],x=i[s]-n.rects.reference[s],S=Et(l),w=S?s==="y"?S.clientHeight||0:S.clientWidth||0:0,O=y/2-x/2,m=u[h],N=w-f[p]-u[A],g=w/2-f[p]/2+O,B=Lt(m,g,N),V=s;n.modifiersData[a]=(o={},o[V]=B,o.centerOffset=B-g,o)}}function gd(t){var o=t.state,n=t.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=o.elements.popper.querySelector(r),!r)||aa(o.elements.popper,r)&&(o.elements.arrow=r))}const bd={name:"arrow",enabled:!0,phase:"main",fn:yd,effect:gd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ft(t){return t.split("-")[1]}var Cd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:pt(n*r)/r||0,y:pt(a*r)/r||0}}function ca(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,h=f===void 0?0:f,A=i.y,y=A===void 0?0:A,x=typeof p=="function"?p({x:h,y}):{x:h,y};h=x.x,y=x.y;var S=i.hasOwnProperty("x"),w=i.hasOwnProperty("y"),O=be,m=ge,N=window;if(c){var g=Et(n),B="clientHeight",V="clientWidth";if(g===we(n)&&(g=qe(n),Re(g).position!=="static"&&d==="absolute"&&(B="scrollHeight",V="scrollWidth")),g=g,r===ge||(r===be||r===Ne)&&l===Nt){m=Ae;var T=u&&g===N&&N.visualViewport?N.visualViewport.height:g[B];y-=T-a.height,y*=s?1:-1}if(r===be||(r===ge||r===Ae)&&l===Nt){O=Ne;var M=u&&g===N&&N.visualViewport?N.visualViewport.width:g[V];h-=M-a.width,h*=s?1:-1}}var j=Object.assign({position:d},c&&Cd),q=p===!0?wd({x:h,y},we(n)):{x:h,y};if(h=q.x,y=q.y,s){var F;return Object.assign({},j,(F={},F[m]=w?"0":"",F[O]=S?"0":"",F.transform=(N.devicePixelRatio||1)<=1?"translate("+h+"px, "+y+"px)":"translate3d("+h+"px, "+y+"px, 0)",F))}return Object.assign({},j,(o={},o[m]=w?y+"px":"",o[O]=S?h+"px":"",o.transform="",o))}function _d(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:$e(o.placement),variation:ft(o.placement),popper:o.elements.popper,popperRect:o.rects.popper,gpuAcceleration:r,isFixed:o.options.strategy==="fixed"};o.modifiersData.popperOffsets!=null&&(o.styles.popper=Object.assign({},o.styles.popper,ca(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,ca(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const kd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_d,data:{}};var qt={passive:!0};function xd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=we(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,qt)}),d&&s.addEventListener("resize",n.update,qt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,qt)}),d&&s.removeEventListener("resize",n.update,qt)}}const Sd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:xd,data:{}};var Ad={left:"right",right:"left",bottom:"top",top:"bottom"};function Yt(t){return t.replace(/left|right|bottom|top/g,function(o){return Ad[o]})}var Nd={start:"end",end:"start"};function da(t){return t.replace(/start|end/g,function(o){return Nd[o]})}function Wo(t){var o=we(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function qo(t){return ut(qe(t)).left+Wo(t).scrollLeft}function Td(t,o){var n=we(t),a=qe(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=na();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+qo(t),y:s}}function Ed(t){var o,n=qe(t),a=Wo(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=Je(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Je(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+qo(t),s=-a.scrollTop;return Re(r||n).direction==="rtl"&&(d+=Je(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Yo(t){var o=Re(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function pa(t){return["html","body","#document"].indexOf(Fe(t))>=0?t.ownerDocument.body:Te(t)&&Yo(t)?t:pa(Wt(t))}function Bt(t,o){var n;o===void 0&&(o=[]);var a=pa(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=we(a),i=r?[l].concat(l.visualViewport||[],Yo(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(Bt(Wt(i)))}function Ko(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ld(t,o){var n=ut(t,!1,o==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function ua(t,o,n){return o===ea?Ko(Td(t,n)):Xe(o)?Ld(o,n):Ko(Ed(qe(t)))}function Bd(t){var o=Bt(Wt(t)),n=["absolute","fixed"].indexOf(Re(t).position)>=0,a=n&&Te(t)?Et(t):t;return Xe(a)?o.filter(function(r){return Xe(r)&&aa(r,a)&&Fe(r)!=="body"}):[]}function Od(t,o,n,a){var r=o==="clippingParents"?Bd(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=ua(t,c,a);return s.top=Je(p.top,s.top),s.right=Ht(p.right,s.right),s.bottom=Ht(p.bottom,s.bottom),s.left=Je(p.left,s.left),s},ua(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function fa(t){var o=t.reference,n=t.element,a=t.placement,r=a?$e(a):null,l=a?ft(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case ge:s={x:i,y:o.y-n.height};break;case Ae:s={x:i,y:o.y+o.height};break;case Ne:s={x:o.x+o.width,y:d};break;case be:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?Ho(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case dt:s[c]=s[c]-(o[p]/2-n[p]/2);break;case Nt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function Ot(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?Xc:d,c=n.rootBoundary,p=c===void 0?ea:c,u=n.elementContext,f=u===void 0?Tt:u,h=n.altBoundary,A=h===void 0?!1:h,y=n.padding,x=y===void 0?0:y,S=ia(typeof x!="number"?x:sa(x,At)),w=f===Tt?Jc:Tt,O=t.rects.popper,m=t.elements[A?w:f],N=Od(Xe(m)?m:m.contextElement||qe(t.elements.popper),s,p,i),g=ut(t.elements.reference),B=fa({reference:g,element:O,strategy:"absolute",placement:r}),V=Ko(Object.assign({},O,B)),T=f===Tt?V:g,M={top:N.top-T.top+S.top,bottom:T.bottom-N.bottom+S.bottom,left:N.left-T.left+S.left,right:T.right-N.right+S.right},j=t.modifiersData.offset;if(f===Tt&&j){var q=j[r];Object.keys(M).forEach(function(F){var k=[Ne,Ae].indexOf(F)>=0?1:-1,I=[ge,Ae].indexOf(F)>=0?"y":"x";M[F]+=q[I]*k})}return M}function Vd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?oa:s,p=ft(a),u=p?d?ta:ta.filter(function(A){return ft(A)===p}):At,f=u.filter(function(A){return c.indexOf(A)>=0});f.length===0&&(f=u);var h=f.reduce(function(A,y){return A[y]=Ot(t,{placement:y,boundary:r,rootBoundary:l,padding:i})[$e(y)],A},{});return Object.keys(h).sort(function(A,y){return h[A]-h[y]})}function Id(t){if($e(t)===Ro)return[];var o=Yt(t);return[da(t),o,da(o)]}function Fd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,A=h===void 0?!0:h,y=n.allowedAutoPlacements,x=o.options.placement,S=$e(x),w=S===x,O=s||(w||!A?[Yt(x)]:Id(x)),m=[x].concat(O).reduce(function(H,Q){return H.concat($e(Q)===Ro?Vd(o,{placement:Q,boundary:p,rootBoundary:u,padding:c,flipVariations:A,allowedAutoPlacements:y}):Q)},[]),N=o.rects.reference,g=o.rects.popper,B=new Map,V=!0,T=m[0],M=0;M<m.length;M++){var j=m[M],q=$e(j),F=ft(j)===dt,k=[ge,Ae].indexOf(q)>=0,I=k?"width":"height",C=Ot(o,{placement:j,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),E=k?F?Ne:be:F?Ae:ge;N[I]>g[I]&&(E=Yt(E));var $=Yt(E),b=[];if(l&&b.push(C[q]<=0),d&&b.push(C[E]<=0,C[$]<=0),b.every(function(H){return H})){T=j,V=!1;break}B.set(j,b)}if(V)for(var _=A?3:1,L=function(Q){var X=m.find(function(oe){var ne=B.get(oe);if(ne)return ne.slice(0,Q).every(function(J){return J})});if(X)return T=X,"break"},P=_;P>0;P--){var D=L(P);if(D==="break")break}o.placement!==T&&(o.modifiersData[a]._skip=!0,o.placement=T,o.reset=!0)}}const $d={name:"flip",enabled:!0,phase:"main",fn:Fd,requiresIfExists:["offset"],data:{_skip:!1}};function ma(t,o,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-o.height-n.y,right:t.right-o.width+n.x,bottom:t.bottom-o.height+n.y,left:t.left-o.width-n.x}}function ha(t){return[ge,Ne,Ae,be].some(function(o){return t[o]>=0})}function Dd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=Ot(o,{elementContext:"reference"}),d=Ot(o,{altBoundary:!0}),s=ma(i,a),c=ma(d,r,l),p=ha(s),u=ha(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const vd={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dd};function Pd(t,o,n){var a=$e(t),r=[be,ge].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[be,Ne].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function Md(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=oa.reduce(function(p,u){return p[u]=Pd(u,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const jd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Md};function Rd(t){var o=t.state,n=t.name;o.modifiersData[n]=fa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const Ud={name:"popperOffsets",enabled:!0,phase:"read",fn:Rd,data:{}};function Gd(t){return t==="x"?"y":"x"}function zd(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,h=f===void 0?!0:f,A=n.tetherOffset,y=A===void 0?0:A,x=Ot(o,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),S=$e(o.placement),w=ft(o.placement),O=!w,m=Ho(S),N=Gd(m),g=o.modifiersData.popperOffsets,B=o.rects.reference,V=o.rects.popper,T=typeof y=="function"?y(Object.assign({},o.rects,{placement:o.placement})):y,M=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),j=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,q={x:0,y:0};if(g){if(l){var F,k=m==="y"?ge:be,I=m==="y"?Ae:Ne,C=m==="y"?"height":"width",E=g[m],$=E+x[k],b=E-x[I],_=h?-V[C]/2:0,L=w===dt?B[C]:V[C],P=w===dt?-V[C]:-B[C],D=o.elements.arrow,H=h&&D?zo(D):{width:0,height:0},Q=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:la(),X=Q[k],oe=Q[I],ne=Lt(0,B[C],H[C]),J=O?B[C]/2-_-ne-X-M.mainAxis:L-ne-X-M.mainAxis,ae=O?-B[C]/2+_+ne+oe+M.mainAxis:P+ne+oe+M.mainAxis,me=o.elements.arrow&&Et(o.elements.arrow),Ge=me?m==="y"?me.clientTop||0:me.clientLeft||0:0,et=(F=j==null?void 0:j[m])!=null?F:0,gt=E+J-et-Ge,bt=E+ae-et,tt=Lt(h?Ht($,gt):$,E,h?Je(b,bt):b);g[m]=tt,q[m]=tt-E}if(d){var ot,nt=m==="x"?ge:be,at=m==="x"?Ae:Ne,Le=g[N],ve=N==="y"?"height":"width",Ye=Le+x[nt],ze=Le-x[at],Ke=[ge,be].indexOf(S)!==-1,rt=(ot=j==null?void 0:j[N])!=null?ot:0,R=Ke?Ye:Le-B[ve]-V[ve]-rt+M.altAxis,z=Ke?Le+B[ve]+V[ve]-rt-M.altAxis:ze,K=h&&Ke?md(R,Le,z):Lt(h?R:Ye,Le,h?z:ze);g[N]=K,q[N]=K-Le}o.modifiersData[a]=q}}const Hd={name:"preventOverflow",enabled:!0,phase:"main",fn:zd,requiresIfExists:["offset"]};function Wd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function qd(t){return t===we(t)||!Te(t)?Wo(t):Wd(t)}function Yd(t){var o=t.getBoundingClientRect(),n=pt(o.width)/t.offsetWidth||1,a=pt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function Kd(t,o,n){n===void 0&&(n=!1);var a=Te(o),r=Te(o)&&Yd(o),l=qe(o),i=ut(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((Fe(o)!=="body"||Yo(l))&&(d=qd(o)),Te(o)?(s=ut(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=qo(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function Qd(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function Xd(t){var o=Qd(t);return sd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Jd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Zd(t){var o=t.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(o).map(function(n){return o[n]})}var ya={placement:"bottom",modifiers:[],strategy:"absolute"};function ga(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return!o.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function ep(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?ya:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},ya,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,h={state:p,setOptions:function(S){var w=typeof S=="function"?S(p.options):S;y(),p.options=Object.assign({},l,p.options,w),p.scrollParents={reference:Xe(d)?Bt(d):d.contextElement?Bt(d.contextElement):[],popper:Bt(s)};var O=Xd(Zd([].concat(a,p.options.modifiers)));return p.orderedModifiers=O.filter(function(m){return m.enabled}),A(),h.update()},forceUpdate:function(){if(!f){var S=p.elements,w=S.reference,O=S.popper;if(ga(w,O)){p.rects={reference:Kd(w,Et(O),p.options.strategy==="fixed"),popper:zo(O)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(M){return p.modifiersData[M.name]=Object.assign({},M.data)});for(var m=0;m<p.orderedModifiers.length;m++){if(p.reset===!0){p.reset=!1,m=-1;continue}var N=p.orderedModifiers[m],g=N.fn,B=N.options,V=B===void 0?{}:B,T=N.name;typeof g=="function"&&(p=g({state:p,options:V,name:T,instance:h})||p)}}}},update:Jd(function(){return new Promise(function(x){h.forceUpdate(),x(p)})}),destroy:function(){y(),f=!0}};if(!ga(d,s))return h;h.setOptions(c).then(function(x){!f&&c.onFirstUpdate&&c.onFirstUpdate(x)});function A(){p.orderedModifiers.forEach(function(x){var S=x.name,w=x.options,O=w===void 0?{}:w,m=x.effect;if(typeof m=="function"){var N=m({state:p,name:S,instance:h,options:O}),g=function(){};u.push(N||g)}})}function y(){u.forEach(function(x){return x()}),u=[]}return h}}var tp=[Sd,Ud,kd,pd,jd,$d,Hd,bd,vd],op=ep({defaultModifiers:tp});function Qo(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function ba(t,o){if(t){if(typeof t=="string")return Qo(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qo(t,o):void 0}}function np(t){return function(o){if(Array.isArray(o))return Qo(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||ba(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function mt(t){return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},mt(t)}function Ca(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function wa(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){Ca(l,a,r,i,d,"next",s)}function d(s){Ca(l,a,r,i,d,"throw",s)}i(void 0)})}}var _a={exports:{}},ka={exports:{}};(function(t){function o(n){return t.exports=o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,o(n)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports})(ka),function(t){var o=ka.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(b,_,L){b[_]=L.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(b,_,L){return Object.defineProperty(b,_,{value:L,enumerable:!0,configurable:!0,writable:!0}),b[_]}try{f({},"")}catch{f=function(_,L,P){return _[L]=P}}function h(b,_,L,P){var D=_&&_.prototype instanceof m?_:m,H=Object.create(D.prototype),Q=new E(P||[]);return d(H,"_invoke",{value:F(b,L,Q)}),H}function A(b,_,L){try{return{type:"normal",arg:b.call(_,L)}}catch(P){return{type:"throw",arg:P}}}r.wrap=h;var y="suspendedStart",x="suspendedYield",S="executing",w="completed",O={};function m(){}function N(){}function g(){}var B={};f(B,c,function(){return this});var V=Object.getPrototypeOf,T=V&&V(V($([])));T&&T!==l&&i.call(T,c)&&(B=T);var M=g.prototype=m.prototype=Object.create(B);function j(b){["next","throw","return"].forEach(function(_){f(b,_,function(L){return this._invoke(_,L)})})}function q(b,_){function L(D,H,Q,X){var oe=A(b[D],b,H);if(oe.type!=="throw"){var ne=oe.arg,J=ne.value;return J&&o(J)=="object"&&i.call(J,"__await")?_.resolve(J.__await).then(function(ae){L("next",ae,Q,X)},function(ae){L("throw",ae,Q,X)}):_.resolve(J).then(function(ae){ne.value=ae,Q(ne)},function(ae){return L("throw",ae,Q,X)})}X(oe.arg)}var P;d(this,"_invoke",{value:function(D,H){function Q(){return new _(function(X,oe){L(D,H,X,oe)})}return P=P?P.then(Q,Q):Q()}})}function F(b,_,L){var P=y;return function(D,H){if(P===S)throw new Error("Generator is already running");if(P===w){if(D==="throw")throw H;return{value:a,done:!0}}for(L.method=D,L.arg=H;;){var Q=L.delegate;if(Q){var X=k(Q,L);if(X){if(X===O)continue;return X}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(P===y)throw P=w,L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);P=S;var oe=A(b,_,L);if(oe.type==="normal"){if(P=L.done?w:x,oe.arg===O)continue;return{value:oe.arg,done:L.done}}oe.type==="throw"&&(P=w,L.method="throw",L.arg=oe.arg)}}}function k(b,_){var L=_.method,P=b.iterator[L];if(P===a)return _.delegate=null,L==="throw"&&b.iterator.return&&(_.method="return",_.arg=a,k(b,_),_.method==="throw")||L!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+L+"' method")),O;var D=A(P,b.iterator,_.arg);if(D.type==="throw")return _.method="throw",_.arg=D.arg,_.delegate=null,O;var H=D.arg;return H?H.done?(_[b.resultName]=H.value,_.next=b.nextLoc,_.method!=="return"&&(_.method="next",_.arg=a),_.delegate=null,O):H:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,O)}function I(b){var _={tryLoc:b[0]};1 in b&&(_.catchLoc=b[1]),2 in b&&(_.finallyLoc=b[2],_.afterLoc=b[3]),this.tryEntries.push(_)}function C(b){var _=b.completion||{};_.type="normal",delete _.arg,b.completion=_}function E(b){this.tryEntries=[{tryLoc:"root"}],b.forEach(I,this),this.reset(!0)}function $(b){if(b||b===""){var _=b[c];if(_)return _.call(b);if(typeof b.next=="function")return b;if(!isNaN(b.length)){var L=-1,P=function D(){for(;++L<b.length;)if(i.call(b,L))return D.value=b[L],D.done=!1,D;return D.value=a,D.done=!0,D};return P.next=P}}throw new TypeError(o(b)+" is not iterable")}return N.prototype=g,d(M,"constructor",{value:g,configurable:!0}),d(g,"constructor",{value:N,configurable:!0}),N.displayName=f(g,u,"GeneratorFunction"),r.isGeneratorFunction=function(b){var _=typeof b=="function"&&b.constructor;return!!_&&(_===N||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,g):(b.__proto__=g,f(b,u,"GeneratorFunction")),b.prototype=Object.create(M),b},r.awrap=function(b){return{__await:b}},j(q.prototype),f(q.prototype,p,function(){return this}),r.AsyncIterator=q,r.async=function(b,_,L,P,D){D===void 0&&(D=Promise);var H=new q(h(b,_,L,P),D);return r.isGeneratorFunction(_)?H:H.next().then(function(Q){return Q.done?Q.value:H.next()})},j(M),f(M,u,"Generator"),f(M,c,function(){return this}),f(M,"toString",function(){return"[object Generator]"}),r.keys=function(b){var _=Object(b),L=[];for(var P in _)L.push(P);return L.reverse(),function D(){for(;L.length;){var H=L.pop();if(H in _)return D.value=H,D.done=!1,D}return D.done=!0,D}},r.values=$,E.prototype={constructor:E,reset:function(b){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(C),!b)for(var _ in this)_.charAt(0)==="t"&&i.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=a)},stop:function(){this.done=!0;var b=this.tryEntries[0].completion;if(b.type==="throw")throw b.arg;return this.rval},dispatchException:function(b){if(this.done)throw b;var _=this;function L(oe,ne){return H.type="throw",H.arg=b,_.next=oe,ne&&(_.method="next",_.arg=a),!!ne}for(var P=this.tryEntries.length-1;P>=0;--P){var D=this.tryEntries[P],H=D.completion;if(D.tryLoc==="root")return L("end");if(D.tryLoc<=this.prev){var Q=i.call(D,"catchLoc"),X=i.call(D,"finallyLoc");if(Q&&X){if(this.prev<D.catchLoc)return L(D.catchLoc,!0);if(this.prev<D.finallyLoc)return L(D.finallyLoc)}else if(Q){if(this.prev<D.catchLoc)return L(D.catchLoc,!0)}else{if(!X)throw new Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return L(D.finallyLoc)}}}},abrupt:function(b,_){for(var L=this.tryEntries.length-1;L>=0;--L){var P=this.tryEntries[L];if(P.tryLoc<=this.prev&&i.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var D=P;break}}D&&(b==="break"||b==="continue")&&D.tryLoc<=_&&_<=D.finallyLoc&&(D=null);var H=D?D.completion:{};return H.type=b,H.arg=_,D?(this.method="next",this.next=D.finallyLoc,O):this.complete(H)},complete:function(b,_){if(b.type==="throw")throw b.arg;return b.type==="break"||b.type==="continue"?this.next=b.arg:b.type==="return"?(this.rval=this.arg=b.arg,this.method="return",this.next="end"):b.type==="normal"&&_&&(this.next=_),O},finish:function(b){for(var _=this.tryEntries.length-1;_>=0;--_){var L=this.tryEntries[_];if(L.finallyLoc===b)return this.complete(L.completion,L.afterLoc),C(L),O}},catch:function(b){for(var _=this.tryEntries.length-1;_>=0;--_){var L=this.tryEntries[_];if(L.tryLoc===b){var P=L.completion;if(P.type==="throw"){var D=P.arg;C(L)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(b,_,L){return this.delegate={iterator:$(b),resultName:_,nextLoc:L},this.method==="next"&&(this.arg=a),O}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(_a);var Kt=_a.exports(),Qt=Kt;try{regeneratorRuntime=Kt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Kt:Function("r","regeneratorRuntime = r")(Kt)}function ap(t){var o=function(n,a){if(mt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(mt(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return mt(o)==="symbol"?o:String(o)}function Xo(t,o,n){return(o=ap(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Xt=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,h=u-d;f<0&&(f=0),h<0&&(h=0),f>t.size&&(f=t.size),h>t.size&&(h=t.size);var A=f/t.size*100,y=100-h/t.size*100;n("change",A,y)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),xa=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},rp=xa(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),lp=xa(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ue(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}Ue(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Xt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[rp,lp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Xt.__scopeId="data-v-24517fec",Xt.__file="src/picker/Saturation.vue";var Jt=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),ip={ref:"canvas"};Ue(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Jt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",ip,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Jt.__scopeId="data-v-78b9f4f0",Jt.__file="src/picker/Hue.vue";var Zt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),sp={ref:"canvas"};Ue(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Zt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",sp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Zt.__scopeId="data-v-24dc9656",Zt.__file="src/picker/Alpha.vue";var eo=e.defineComponent({name:"Input",props:{label:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number,default:168}},emits:["change","focus","blur","enter"],setup:function(t,o){var n=o.emit;return{onInput:function(a){var r;n("change",(r=a.target)===null||r===void 0?void 0:r.value)},valueStyle:e.computed(function(){return{minWidth:"".concat(t.width,"px"),maxWidth:"".concat(t.width,"px"),width:"".concat(t.width,"px")}}),onFocus:function(){n("focus")},onBlur:function(){n("blur")},onEnter:function(){n("enter")}}}}),cp={class:"input"},dp={class:"label"},pp=[".value"];function Vt(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,o)||ba(t,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ee(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Sa(Object(n),!0).forEach(function(a){Xo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),eo.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",cp,[e.createElementVNode("span",dp,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"value",style:e.normalizeStyle(t.valueStyle),".value":t.value,onFocus:o[0]||(o[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onInput:o[1]||(o[1]=function(){return t.onInput&&t.onInput.apply(t,arguments)}),onBlur:o[2]||(o[2]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onKeydown:o[3]||(o[3]=e.withKeys(function(){return t.onEnter&&t.onEnter.apply(t,arguments)},["enter"]))},null,44,pp)])},eo.__scopeId="data-v-d52a4d02",eo.__file="src/picker/InputValue.vue";var Aa=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},Na={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},to=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(Na[o]||o).concat(Na[n]||n)},Ta=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(to(o)).concat(to(n)).concat(to(a))},ht=function(t,o){var n;typeof(n=t)=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1&&(t="100%");var a=function(r){return typeof r=="string"&&r.indexOf("%")!==-1}(t);return t=Math.min(o,Math.max(0,parseFloat("".concat(t)))),a&&(t=parseInt("".concat(t*o),10)/100),Math.abs(t-o)<1e-6?1:t%o/parseFloat(o)},It=function(t,o,n){t=6*ht(t,360),o=ht(o,100),n=ht(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},Ea=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=Aa(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=It(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(Ta(It(a,r,l))).concat(to(255*i))}else switch(o){case"hsl":var f=Aa(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=It(a,r,l),A=h.r,y=h.g,x=h.b;return"rgb(".concat(A,", ").concat(y,", ").concat(x,")");default:return Ta(It(a,r,l))}},oo=function(t){var o=t.r,n=t.g,a=t.b;o=ht(o,255),n=ht(n,255),a=ht(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},La=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},Ba=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},Jo=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Zo(t,en(t),n),r=Fa(a);return Ea(r,o,n)}return""},Oa=function(t){var o=Vt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Va=function(t){var o=Vt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},Ia=function(t){var o=Vt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Zo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Oa(t),a=n.r,r=n.g,l=n.b,i=n.a;return Ee(Ee({},oo({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=Ia(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=Va(t),c=s.h,p=s.s,u=s.l,f=s.a;return Ee(Ee({},La({h:c,s:p,l:u})),{},{a:+f});default:var h=Ba(t),A=h.r,y=h.g,x=h.b,S=h.a;return Ee(Ee({},oo({r:A,g:y,b:x})),{},{a:S/255})}else switch(o){case"rgb":return Ee(Ee({},oo(Oa(t))),{},{a:1});case"hsv":var w=Ia(t);return{h:w.h,s:w.s,v:w.v,a:1};case"hsl":return Ee(Ee({},La(Va(t))),{},{a:1});default:return Ee(Ee({},oo(Ba(t))),{},{a:1})}},en=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Fa=function(t){var o=t.h,n=t.s,a=t.v,r=t.a;return isNaN(o)&&(o=0),isNaN(n)&&(n=0),isNaN(a)&&(a=0),isNaN(r)&&(r=1),{h:o,s:n,v:a,a:r}},Ft=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),up=["draggable"];Ue(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Ft.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,up)},Ft.__scopeId="data-v-02da71fd",Ft.__file="src/color-item/ColorItem.vue";var no=e.defineComponent({name:"Colors",components:{ColorItem:Ft},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(t,o){var n=o.emit;return{onSelectColor:function(a,r){n("change",a,r)},useColors:e.computed(function(){return t.colors.map(function(a){return Jo(a,"hex",!0)})})}}}),fp={class:"colors"};function $a(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function De(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?$a(Object(n),!0).forEach(function(a){Xo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),no.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",fp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},no.__scopeId="data-v-0f8b52a8",no.__file="src/picker/Colors.vue";var ao=e.defineComponent({name:"Picker",components:{Colors:no,Saturation:Xt,Hue:Jt,Alpha:Zt,InputValue:eo},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return De(De({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var w,O=(w=t.value)===null||w===void 0?void 0:w.trim();if(O!=null&&O!==""){var m=en(O);return Fa(Zo(O,m,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(w,O){var m="";w!=null?(m=Ea(De({},w),t.format,t.showAlpha),i.value=De({},w)):i.value=null,d.value=m;var N=s();JSON.stringify(w)!==JSON.stringify(N)&&JSON.stringify(w)!==JSON.stringify(O)&&n("change",m)},{immediate:!0});var c=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.h)||0}),p=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.s)||0}),u=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.v)||0}),f=e.computed(function(){var w,O;return((w=e.unref(l))===null||w===void 0?void 0:w.a)!=null?(O=e.unref(l))===null||O===void 0?void 0:O.a:1}),h=e.computed(function(){return It(e.unref(c),e.unref(p),e.unref(u))}),A=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),y=e.computed(function(){var w=t.format;if(t.showAlpha)switch(w){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(w){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),x=e.ref(-1),S=function(w,O,m){if(w.length!==0){var N=Zo(w,O,m),g=N.h,B=N.s,V=N.v;if(!(isNaN(g)||isNaN(B)||isNaN(V))){var T=1,M=N.a;isNaN(M)||(T=M),l.value={h:g,s:B,v:V,a:T}}}};return{h:c,s:p,v:u,a:f,rgbStr:A,onSelectSaturation:function(w,O){x.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:w,v:O,a:e.unref(f)}:l.value=De(De({},e.unref(l)),{},{s:w,v:O})},onSelectHue:function(w){x.value=-1,e.unref(l)==null&&(l.value={h:w,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=De(De({},e.unref(l)),{},{h:w})},onSelectAlpha:function(w){x.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:w}:l.value=De(De({},e.unref(l)),{},{a:w})},label:y,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(w){x.value=-1,d.value=w},handleChange:function(){var w,O=(w=e.unref(d))===null||w===void 0?void 0:w.trim();if(O!==""){var m=t.showAlpha,N=t.format,g=function(B,V,T){if(T)switch(V){case"rgb":return/^[rR][gG][Bb][Aa][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){3}[\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*[)]{1}$/.test(B);case"hsv":return/^[hH][Ss][Vv][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(B);case"hsl":return/^[hH][Ss][Ll][Aa][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,){2}([\s]*(1|1.0|0|0.[0-9]|0.[0-9][0-9])[\s]*)[)]$/.test(B);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(B)}else switch(V){case"rgb":return/^[rR][gG][Bb][(]([\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\s]*,){2}[\s]*(2[0-4]\d|25[0-5]|[01]?\d\d?)[\s]*[)]{1}$/.test(B);case"hsv":return/^[hH][Ss][Vv][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(B);case"hsl":return/^[hH][Ss][Ll][(]([\s]*(2[0-9][0-9]|360|3[0-5][0-9]|[01]?[0-9][0-9]?)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*,)([\s]*((100|[0-9][0-9]?)%|0)[\s]*)[)]$/.test(B);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(B)}}(O,N,m);g?S(O,N,m):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:x,onSelectColor:function(w,O){if(x.value=O,(w=w.trim())==="")l.value=null;else{var m=en(w);m?S(w,m,!0):l.value=null}}}}}),mp={class:"picker-inner"},hp={class:"picker-header"};Ue(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),ao.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",mp,[e.createElementVNode("div",hp,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},ao.__scopeId="data-v-6ceadec6",ao.__file="src/picker/Picker.vue";var ro=e.defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(t){var o=e.inject("theme",{theme:"light"}).theme;return{addColorItemStyle:e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),lineHeight:"".concat(t.size,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(o)==="dark"?"#2681ff":"#1890ff"):""}})}}}),yp=[function(t){return e.pushScopeId("data-v-ceb1719c"),t=t(),e.popScopeId(),t}(function(){return e.createElementVNode("g",{class:"container"},[e.createElementVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)})];function Da(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function tn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Da(Object(n),!0).forEach(function(a){Xo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),ro.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(yp),4)},ro.__scopeId="data-v-ceb1719c",ro.__file="src/add-color-item/AddColorItem.vue";var Ze=null,yt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Ft,Picker:ao,AddColorItem:ro},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String,default:"hex"},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean]},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}}},emits:["change","update:value","update:showPicker","overflowMax","closePicker"],setup:function(t,o){var n=o.emit,a=e.ref([]),r=e.computed(function(){return e.unref(a).map(function(k){return Jo(k,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var k=t.value||"",I=Array.isArray(k)?k:[k];a.value=I.map(function(C){return Jo(C,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,h,A,y=e.ref(null),x=e.ref(null),S=(s=y,c=x,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Ze.update()},modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!0}},{name:"flip",options:{fallbackPlacements:["top"],allowedAutoPlacements:["top","bottom"]}},{name:"applyStyles",enabled:!1},{name:"updateState",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(k){var I=k.state,C=I.styles,E=I.placement,$=C.popper;u.value=tn(tn(tn({},$),p),{},{transformOrigin:E==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(k,I){var C,E=Vt(k,2),$=E[0],b=E[1],_=Vt(I,2),L=_[0],P=_[1];if($&&b&&(L!==$||P!==L)){(C=Ze)===null||C===void 0||C.destroy();var D=$.$el||$,H=b.$el||b;e.nextTick(function(){Ze=op(D,H,f)})}}),e.onBeforeUnmount(function(){var k;Ze&&((k=Ze)===null||k===void 0||k.destroy(),Ze=null)}),{instance:Ze,style:u}),w=S.style,O=function(){e.unref(y)==null&&(y.value=e.unref(F)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},m=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},N=e.ref(),g=function(){var k=wa(Qt.mark(function I(C){var E,$,b,_;return Qt.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if($=C.target,(b=(E=$.dataset)===null||E===void 0?void 0:E.index)!=null&&b!==""){L.next=4;break}return L.abrupt("return");case 4:if(_=+b,e.unref(l)!==_){L.next=7;break}return L.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==_?(m(),h&&clearTimeout(h),h=setTimeout(function(){O(),clearTimeout(h)},100)):O(),l.value=_,y.value=$;case 10:case"end":return L.stop()}},I)}));return function(I){return k.apply(this,arguments)}}(),B=function(){var k=wa(Qt.mark(function I(C){var E,$,b,_,L;return Qt.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(_=C.target,!(!((E=e.unref(N))!==null&&E!==void 0&&E.isEqualNode(_))&&(!(($=e.unref(N))===null||$===void 0)&&$.contains(_)))){P.next=4;break}return P.abrupt("return");case 4:if(L=(b=e.unref(x))===null||b===void 0?void 0:b.$el,!(L!=null&&L.contains(_))){P.next=8;break}return P.abrupt("return");case 8:A&&clearTimeout(A),A=setTimeout(function(){e.unref(d)&&m()},0);case 10:case"end":return P.stop()}},I)}));return function(I){return k.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(O(),clearTimeout(A))});var V,T=e.ref(t.max>e.unref(a).length),M=e.computed(function(){return typeof t.popupContainer=="string"||mt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),j=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),q=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(x)]},function(){e.nextTick(function(){var k,I;(k=e.unref(N))===null||k===void 0||k.setAttribute("pick-colors-theme",e.unref(q)),(I=e.unref(x))===null||I===void 0||(I=I.$el)===null||I===void 0||I.setAttribute("pick-colors-theme",e.unref(q))})},{immediate:!0}),e.provide("theme",{theme:q});var F=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",B,!1),t.showPicker&&O()}),e.onUnmounted(function(){document.removeEventListener("mouseup",B,!1),h&&(clearTimeout(h),h=null),A&&(clearTimeout(A),A=null)}),{valueList:a,colorItemSelected:function(k){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===k},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:T,onPickerChange:function(k){var I=e.unref(l),C=e.unref(a).slice(),E=e.unref(a).length;if(I!=null){I>=0?C[I]=k:(l.value=E,C.push(k));var $="";$=Array.isArray(t.value)||t.addColor?C:k,t.value===void 0?a.value=Array.isArray($)?$:[$]:(n("update:value",$),n("change",$,k,I)),t.addColor&&E>=t.max&&(T.value=!1,n("overflowMax"))}},colorPicker:N,onColorClick:g,pickerRef:x,onColorItemDragStart:function(k){k.dataTransfer.effectAllowed="move";var I=k.target;V=+I.dataset.index},onColorItemDragOver:function(k){},onColorItemDrop:function(k){var I=+k.target.dataset.index,C=np(e.unref(a)),E=C[V];C.splice(V,1);var $=C.slice(0,I),b=C.splice(I),_=$.concat([E]).concat(b);n("update:value",_),n("change",_,_[V],V)},colorItemsRef:F,pickerStyle:w,values:r,teleportDisabled:j,toPopupContainer:M}}});Ue(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),yt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},yt.__scopeId="data-v-3c43ade8",yt.__file="src/ColorPicker.vue";const gp=e.defineComponent({name:"ColorPick",components:{PickColors:yt,AInput:v.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),ff="",bp={class:"color-pick"};function Cp(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",bp,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const wp=te(gp,[["render",Cp],["__scopeId","data-v-e2113f43"]]),_p=e.defineComponent({name:"ColorGroupPick",components:{PickColors:yt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{v.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),mf="",kp={class:"color-group-pick"};function xp(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",kp,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Sp=te(_p,[["render",xp],["__scopeId","data-v-b2be8322"]]),Ap=e.defineComponent({name:"FormGroup",components:{Draggable:_t,AppstoreAddOutlined:Fn,MinusCircleOutlined:Bl,PickColors:yt,InputNumber:Zn,PlusCircleOutlined:Fl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const h=Object.keys(f),A={};h.forEach(y=>{A[y]=""}),c.push(A)}else typeof f=="string"&&c.push(f);n.value=c}else v.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var h;const f=(h=t.value)==null?void 0:h.slice();if(Array.isArray(f)){const A=c==null?void 0:c.target,y=(A==null?void 0:A.value)!=null?A==null?void 0:A.value:c;u?f[p][u]=y:f[p]=y,n.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){v.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),hf="",Np={class:"form-group"},Tp={class:"form-row"},Ep={key:0,class:"label"},Lp={key:1,class:"label"},Bp={class:"icon-group"};function Op(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Np,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Ep,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Lp,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Vp=te(Ap,[["render",Op],["__scopeId","data-v-f0c0ab4d"]]),Ip=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:v.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Fp(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const $p=te(Ip,[["render",Fp]]),Dp=e.defineComponent({name:"PropsToForm",components:{Input:Mc,InputNumber:Zn,RadioGroup:zc,Select:qc,Switch:Qc,ColorPick:wp,ColorGroupPick:Sp,FormGroup:Vp,Textarea:$p},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Dt),n=e.inject(io),a=e.inject(so),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:A="change",events:y}=p;c[u]={...p,valueProp:h,value:f,events:{[A]:(x,S=!0)=>{l(S?{[u]:x}:{})},...y}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:re.reduce(s,(c,p,u)=>{const f=Dc[u];if(Array.isArray(f)){const h=f.find(A=>{const{onlyType:y,excludeType:x}=A;return y==null&&x==null?!0:y?Ie(e.unref(r),y):x?!Ie(e.unref(r),x):!1});h&&i({result:c,value:p,key:u,mapAttributeProp:h})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Ie}}}),yf="",vp={class:"props-to-form"},Pp={class:"label"},Mp={class:"component-wrapper"};function jp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",vp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",Pp,e.toDisplayString(i.label),1),e.createElementVNode("div",Mp,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const Rp=te(Dp,[["render",jp],["__scopeId","data-v-c6fb2484"]]);function Up(){return new Worker("/assets/editor.worker-02df2e61.js")}function Gp(){return new Worker("/assets/json.worker-867823a6.js")}function zp(){return new Worker("/assets/ts.worker-7254b425.js")}const Hp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new Gp:i==="typescript"||i==="javascript"?new zp:new Up}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=za.editor.create(n.value,{language:t.language,tabSize:2,automaticLayout:!0,scrollBeyondLastLine:!1,theme:r.light,wordWrap:"off",lineDecorationsWidth:3,lineHeight:15,lineNumbersMinChars:3,formatOnPaste:!0,formatOnType:!0,wordBasedSuggestions:!1,quickSuggestions:t.UseSuggestions,snippetSuggestions:"none",suggestOnTriggerCharacters:!1,scrollbar:{verticalScrollbarSize:6,horizontalScrollbarSize:6,alwaysConsumeMouseWheel:!1,arrowSize:0},autoIndent:"advanced",glyphMargin:!1,fontSize:13,contextmenu:!1,minimap:{enabled:t.isUseMinimap},readOnly:t.readonly,...t.options}),a==null||a.setValue(t.valueData),t.autoFormat&&setTimeout(()=>{a==null||a.getAction("editor.action.formatDocument").run()},200),a.onDidChangeModelContent(re.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),gf="",Wp={class:"editor",ref:"dom"};function qp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Wp,null,512)}const va=te(Hp,[["render",qp],["__scopeId","data-v-71e88372"]]),Yp=[{title:"列名",dataIndex:"label",fixed:"left",ellipsis:!0,width:135},{title:"参数",dataIndex:"prop",fixed:"left",ellipsis:!0,width:135},{title:"列自定义",dataIndex:"style",align:"center",ellipsis:!0,width:100},{title:"列宽度(px/%)",dataIndex:"width",ellipsis:!0,width:135},{title:"列自定义函数",dataIndex:"renderText",ellipsis:!0,width:170},{title:"列表头自定义函数",dataIndex:"headerTemplate",ellipsis:!0,width:170},{title:"数据格式化",dataIndex:"dataFormat",ellipsis:!0,width:225},{title:"保留小数位数",dataIndex:"retentiondigit",ellipsis:!0,width:135},{title:"表头/表尾列对齐方式",dataIndex:"headerAlign",ellipsis:!0,width:170},{title:"内容列对齐方式",dataIndex:"align",ellipsis:!0,width:170},{title:"固定当前列",dataIndex:"fixed",ellipsis:!0,width:170}],Kp=e.defineComponent({name:"TableColumnConfig",components:{ATable:v.Table,AModal:v.Modal,ACheckbox:v.Checkbox,AInput:v.Input,AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption,Editor:va},setup(){const t=e.inject(Me),o=e.computed(()=>{var y;return!!((y=e.unref(t))!=null&&y.isGroupTable)}),n=e.computed(()=>{var y;return((y=e.unref(t))==null?void 0:y.graphicConfig)||{}}),a=e.computed(()=>{var y;return((y=e.unref(t))==null?void 0:y.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var x,S,w;let y=[];if(r.value=[],!o.value)y=((x=e.unref(n))==null?void 0:x.queryColumnList)||[];else{const O=((S=e.unref(n))==null?void 0:S.rowHeaderList)||[],m=((w=e.unref(n))==null?void 0:w.indicators)||[];y=[...O,...m]}y.forEach(O=>{var N;let m=(N=e.unref(a))==null?void 0:N.find(g=>g.prop===O.name);m||(m={label:O.label,prop:O.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(m)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:Yp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(y,x,S)=>{y&&x&&(l=y,i=x,d.value=y[x]||"",c.value=!0,s.value=S)},onEditorChange:y=>{try{d.value=y}catch(x){console.error(x)}},changeRenderBool:(y,x)=>{y.style=x.target.checked,y.style?y.renderBool===void 0&&(y.renderBool=!1):delete y.renderBool}}}}),bf="",Qp={class:"table-column-config"};function Xp(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Qp,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:A,text:y,record:x})=>[A.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:S=>t.changeRenderBool(x,S),checked:x.style},null,8,["onChange","checked"])):A.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:x.width,"onUpdate:value":S=>x.width=S,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):A.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[x.style?(e.openBlock(),e.createBlock(d,{key:1,value:x.renderText,"onUpdate:value":S=>x.renderText=S,readOnly:!0,onClick:S=>t.renderSave(x,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y),1)],64))],64)):A.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[x.style?(e.openBlock(),e.createBlock(d,{key:1,value:x.headerTemplate,"onUpdate:value":S=>x.headerTemplate=S,readOnly:!0,onClick:S=>t.renderSave(x,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(y),1)],64))],64)):A.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:x.headerAlign,"onUpdate:value":S=>x.headerAlign=S},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:x.align,"onUpdate:value":S=>x.align=S},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:x.fixed,"onUpdate:value":S=>x.fixed=S},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:x.dataFormat,"onUpdate:value":S=>x.dataFormat=S,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[x.dataFormat&&x.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:x.retentiondigit,"onUpdate:value":S=>x.retentiondigit=S,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=A=>t.editorVisible=A),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const Jp=te(Kp,[["render",Xp],["__scopeId","data-v-afebddc0"]]),Zp=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Rp,TableColumnConfig:Jp,Editor:va,AFormItem:v.FormItem,ASelect:v.Select,ASelectOption:v.SelectOption,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ASwitch:v.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Dt),r=e.inject(sn),l=e.inject(io),i=e.inject(so),d=e.inject(ln),s=N=>{l({...fn[N]},!1),d()},c=e.computed(()=>{var N;return(N=e.unref(a))==null?void 0:N.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>$c.map(N=>{const{props:g,title:B,enableProps:V,onlyType:T,excludeType:M}=N,j=[];g.forEach(k=>{typeof k=="string"&&(p.includes(k)?t.isGroupTable&&j.push(k):j.push(k))});let q,F;return t.componentType==="table"&&(T!=null&&T.includes(t.componentType))?(q=typeof V=="string"&&r.value?r.value[V]:void 0,F=re.pick(e.unref(r),j)):(q=typeof V=="string"&&a.value?a.value[V]:void 0,F=re.pick(e.unref(a),j)),{title:B,enableProps:q,enablePropsName:V,onlyType:T,excludeType:M,props:F}}).filter(({props:N})=>Object.keys(N).length>0)),f=(N,g)=>{const{onlyType:B,excludeType:V}=N;return B==null&&V==null?!0:B?Ie(g,B):V?!Ie(g,V):!1},h=(N,g)=>(g==null||g.stopPropagation(),N),A=(N,g)=>{g!=null&&l({[g]:N})},y=e.computed(()=>JSON.stringify(e.unref(a),null,2)),x=N=>{try{const g=JSON.parse(N||"{}");l(g,!1)}catch(g){console.error(g)}},S=e.ref(""),w=N=>{try{S.value=N}catch(g){console.error(g)}},O=(N,g)=>{try{i({[g]:N})}catch(B){console.error(B)}},m=e.computed(()=>{var N;return["customGraph"].includes((N=e.unref(a))==null?void 0:N.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:y,updateComponentOptions:x,tableOptions:r,optionCode:S,onEditorChange:w,tableEditorChange:O,onSwitchClick:h,onSwitchChange:A,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:m}}}),Cf="",wf="",eu={class:"style-group"};function tu(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),A=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",eu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=y=>t.type=y),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=y=>t.activePanel=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[t.isRenderForm(y,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[y.title?(e.openBlock(),e.createBlock(u,{header:y.title,key:y.title},{extra:e.withCtx(()=>[typeof y.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:y.enableProps,onChange:x=>t.onSwitchChange(x,y.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:y.props,disabled:typeof y.enableProps=="boolean"?!y.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=y=>t.tablePanel=y)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,y=>{var x;return e.openBlock(),e.createElementBlock(e.Fragment,{key:y.title},[y.title&&((x=y.onlyType)!=null&&x.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:y.title,key:y.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:y.props,disabled:typeof y.enableProps=="boolean"?!y.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(A)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=y=>t.tableEditorChange(y,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=y=>t.tableEditorChange(y,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const ou=te(Zp,[["render",tu],["__scopeId","data-v-2fb3e2ad"]]),nu=e.defineComponent({name:"Card",components:{CloseOutlined:No},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(He),a=e.inject(vt),r=e.inject(pn),l=e.computed(()=>{var C;return(C=e.unref(n))==null?void 0:C.filter(E=>E.keyName!=="")}),i=e.computed(()=>{var $,b;const C=[],E=($=e.unref(l))==null?void 0:$.find(_=>{var L;return _.id===((L=t.control)==null?void 0:L.id)});if(E){const _=E.type,L=re.pick(E,["value","startTime","endTime"]);(b=Object.keys(L))!=null&&b.length||(L.value="");for(const P in L)if(Object.prototype.hasOwnProperty.call(L,P)){const D=e.unref(r)[P];if(Array.isArray(D)){const H=D.find(Q=>Ie(_,Q.onlyType));H&&C.push({label:H.label,value:P})}else C.push({label:D.label,value:P})}}return C}),d=()=>{o("delete",t.index),s(t.control.id)};function s(C){const E=e.unref(l).find($=>$.id===C);if(E){const{type:$,id:b,events:_=[]}=E,L=zt($),P=_.findIndex(D=>{var H;return D.on===L&&D.target===((H=e.unref(S))==null?void 0:H.id)&&D.emit==="refreshData"});P!==-1&&(_.splice(P,1),a({id:b,events:_}))}}const c=C=>{const E={...t.control};if(E.id=C,E.customValue="",C){const $=e.unref(l).find(b=>b.id===C);$&&(E.keyName=$.keyName,m($,C))}delete E.prop,o("update",E,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=C=>{o("update",{...t.control,prop:C},t.index)},h=C=>{o("update",{...t.control,rule:C},t.index)},A=C=>{const E={...t.control};E.modelKey&&(E.modelKey=""),E.prop&&(E.prop=""),E.format&&(E.format=""),o("update",{...E,dataType:C,customValue:"",id:"",keyName:""},t.index)},y=C=>{o("update",{...t.control,customValue:C.target.value},t.index)},x=C=>{const E={...t.control};C==null?delete E.mode:E.mode=C,delete E.conditionLabel,delete E.conditionName,delete E.conditionKey,delete E.conditionValueType,o("update",E,t.index)},S=e.inject(Me),w=e.inject(pe),O=e.computed(()=>{var ne;const{classificationList:C=[],seriesList:E=[],leftAxisList:$=[],rightAxisList:b=[],indicators:_=[],rowHeaderList:L=[],queryColumnList:P=[]}=e.unref(w),D=re.cloneDeep([...C,...E,...$,...b,..._,...L,...P]);if(D!=null&&D.length)for(const J of D)J.id=J.name;const H=[{label:"日期",name:"日期",id:"the_date",genericType:"DATE",typeGuid:"the_date",indexCode:null},{label:"HRP单位编号",name:"HRP单位编号",id:"hbdwbh",genericType:"TEXT",typeGuid:"hbdwbh",indexCode:null},{label:"HRP单位名称",name:"HRP单位名称",id:"hbdwbh_name",genericType:"TEXT",typeGuid:"hbdwbh_name",indexCode:null},...t.intersection.map(J=>({...J,id:J.name,label:J.title||J.label})),...D];((ne=e.unref(S))==null?void 0:ne.type)==="ecanSelect"&&H.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const Q=new Map,X=H.length;for(let J=0;J<X;J++){const ae=H[J],{id:me}=ae||{};Q.set(me,ae)}return[...Q].map(([J,ae])=>ae)});function m(C,E){var P;const{type:$,id:b,events:_=[]}=C,L=zt($);if(e.unref(p)&&E!==e.unref(p)){const{controlList:D=[]}=e.unref(w);D.find(H=>H.id===e.unref(p))||s(e.unref(p))}_.find(D=>{var H;return D.on===L&&D.target===((H=e.unref(S))==null?void 0:H.id)&&D.emit==="refreshData"})||a({id:b,events:[..._,{on:L,target:(P=e.unref(S))==null?void 0:P.id,emit:"refreshData"}].reverse()})}const N=(C,E)=>{if(C){const{label:$,name:b,id:_,genericType:L,indexCode:P,typeGuid:D,indexCodeNum:H}=E||{};o("update",{...t.control,conditionKey:_,conditionLabel:$,conditionName:b,conditionValueType:L,indexCode:P,typeGuid:D,indexCodeNum:H},t.index)}else{const $={...t.control};delete $.conditionLabel,delete $.conditionName,delete $.conditionKey,delete $.conditionValueType,o("update",$,t.index)}},g=(C,E)=>{var $;return($=E==null?void 0:E.keyName)==null?void 0:$.toLowerCase().includes(C==null?void 0:C.toLowerCase())},B=(C,E)=>{var $;return($=E==null?void 0:E.label)==null?void 0:$.toLowerCase().includes(C==null?void 0:C.toLowerCase())},V=e.computed(()=>{const C=e.unref(O).find($=>$.id===t.control.conditionKey);let E="";return C&&(E=(C==null?void 0:C.genericType)||""),E==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:E==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:E==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),T=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],M=e.computed(()=>{let C=!1;const{id:E="",dataType:$="component"}=t.control;if(E&&$==="component"){const b=e.unref(l).find(L=>L.id===E),_=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];Ie(b==null?void 0:b.type,_)&&(C=!0)}return C}),j=e.computed(()=>{let C=!1;const{id:E="",dataType:$="component"}=t.control;if(E&&$==="component"){const b=e.unref(l).find(_=>_.id===E);(b==null?void 0:b.type)==="ecanRangePicker"&&(C=!0)}return C}),q=e.computed(()=>{let C=!1;const{id:E="",dataType:$="component"}=t.control;if(E&&$==="component"){const b=e.unref(l).find(_=>_.id===E);["ecanDatePicker","ecanRangePicker"].includes(b==null?void 0:b.type)&&(C=!0)}return C});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:x,onRuleChange:h,onDataTypeChange:A,onCustomValueChange:y,conditionKeyOptions:O,onConditionKeyChange:N,idFilterOption:g,filterOption:B,onFormatChange:C=>{o("update",{...t.control,format:C},t.index)},onModelPropChange:C=>{o("update",{...t.control,modelKey:C.target.value},t.index)},ruleOption:V,dataTypeOption:T,isShowProp:j,isShowFormat:q,isShowModelProp:M,formatOptions:[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}]}}}),_f="",kf="",au={class:"control-card"};function ru(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",au,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,onChange:t.onDataTypeChange},null,8,["value","options","onChange"]),t.control.dataType===""?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.customValue,onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"])):e.createCommentVNode("",!0),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:2,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:3,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:4,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const lu=te(nu,[["render",ru],["__scopeId","data-v-000b29c1"]]),iu=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:lu,AButton:v.Button},setup(t,{expose:o}){const n=e.inject(He),a=e.inject(pe),r=e.inject(xe),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const h of u)h.conditionKey&&(Ut(h,"rule")||(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL"),Ut(h,"dataType")||(h.dataType="component"));return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:Xn({...e.unref(a),...u},e.unref(n))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var h;const f=(h=e.unref(l))==null?void 0:h.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var A;const h=(A=e.unref(l))==null?void 0:A.slice();h[f]=u,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),xf="",su={class:"control-group"},cu={class:"control-group-header"},du={class:"control-group-content"};function pu(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",su,[e.createElementVNode("div",cu,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const uu=te(iu,[["render",pu],["__scopeId","data-v-ff45d2c5"]]),fu=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:h,builtInValueSource:A,builtInCalcWay:y,formula:x,conditions:S,aggregate:w}=i;let O;return S&&(O=r(S)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:w,builtInFormula:h,builtInValueSource:A,builtInCalcWay:y,formula:x,conditions:O}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:h,classificationList:A=[],seriesList:y=[],leftAxisList:x=[],rightAxisList:S=[],queryColumnList:w=[],indicators:O=[],dataSourceId:m,idxLibMode:N,preview:g=!1}=i||{};f==null&&(Ie(d,"table")?f="1":f="2");let B;if(Array.isArray(A)&&A.length>0){const j=A.length;for(let q=0;q<j;q++){const F=A[q]||{},{label:k="",name:I="",show:C=!1,sort:E,customGroup:$,conditions:b}=F;if(C||j===1){B={label:k.trim(),columnName:I,show:C,sort:E,customGroup:$,conditions:r(b)};break}}}let V;if(Array.isArray(y)&&y.length>0){const j=y.length;for(let q=0;q<j;q++){const F=y[q]||{},{label:k="",name:I="",show:C=!1,sort:E,customGroup:$,conditions:b}=F;if(C||j===1){V={label:k.trim(),columnName:I,show:C,sort:E,customGroup:$,conditions:r(b)};break}}}const T=[];w==null||w.forEach(j=>{T.push(o(j))});const M=[];if(x==null||x.forEach(j=>{j.location="LEFT",M.push(l(j))}),S==null||S.forEach(j=>{j.location="RIGHT",M.push(l(j))}),O==null||O.forEach(j=>{j.location="LEFT",M.push(l(j))}),!(f==="1"&&T.length===0)&&!(f==="2"&&M.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:h,classification:B,series:V,indicatorList:M,queryColumns:T,pageFlag:!0,sqlConditions:[],dataSourceId:m,idxLibMode:N,preview:g})}catch(j){console.error(j)}}},Pa=(t,o)=>{const n={dayjs:de,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},lo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const h=u[f],A=l[h];A!=null&&(c=c.replace(h,A))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Pa(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},$t=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Pa(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},mu=(t,o,n)=>{switch(t.type){case"bar":return hu(t,o,n);case"line":return yu(t,o,n);case"pie":return gu(t,o,n);case"comboGraph":return bu(t,o,n);default:return{}}},hu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const h={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:A,seriesName:y,name:x,value:S,data:w}=c[h]||{};h===0&&(u+=`${x}<br/>`),u+=lo(f,{textData:{marker:A,name:x,value:S,a:y,b:x,c:S,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return $t(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return $t(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},yu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:A,seriesName:y,name:x,value:S,data:w}=c[h]||{};h===0&&(u+=`${x}<br/>`),u+=lo(f,{textData:{marker:A,name:x,value:S,a:y,b:x,c:S,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return $t(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(c){return $t(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},gu=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return lo(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:fs(t.labelFormatter)},labelLine:{show:t.labelLineShow,length:t.labelLineLength,length2:t.labelLineLength2},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"},label:{}}}]}},bu=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return $t(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let h=0;h<c;h++){const A=f[h],{tooltipFormatter:y}=A||{},{marker:x,seriesName:S,name:w,value:O,data:m}=s[h]||{};h===0&&(p+=`${w}<br/>`),p+=lo(y||u,{textData:{marker:x,name:w,value:O,seriesName:S,a:S,b:w,c:O,...m}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},Cu=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const h=a[f],{label:A,value:y}=h,x={...t[0],value:t[0][y]};r.add(A),p.push(x)}const u=t[0][n]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[n];r.add(f);for(let h=0;h<d;h++){const A=a[h],{label:y,value:x}=A,S={...u,value:u[x]};if(l.has(y)){const w=l.get(y);w.push(S),l.set(y,w)}else l.set(y,[S])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},wu=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[n]||"",h=u[a]||"",A=u[r]||"";if(l.add(f),i.has(A)){const y=i.get(A);y.push({name:f,value:h,...u}),i.set(A,y)}else i.set(A,[{name:f,value:h,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},_u=e.defineComponent({name:"ChartGraph",components:{ASpin:v.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Be);let l=null;const i=e.inject(Oe)||"",d=e.inject(pe)||{},s=e.inject(Dt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),h=e.ref(!1),A=e.computed(()=>h.value?Ya:12),y=e.ref({}),x=e.ref(),S=e.computed(()=>{const T=e.unref(n.value);if((T==null?void 0:T.type)==="customGraph")return x.value;const M=mu(T,e.unref(y),A.value);return{toolbox:{show:T.toolboxShow,left:T.toolboxLeft,top:T.toolboxTop,itemSize:T.toolboxItemSize,itemGap:T.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:T.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:T.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:T.titleText,subtext:T.titleSubtext,left:"center"},grid:{top:T.gridTop,bottom:T.gridBottom,left:T.gridLeft,right:T.gridRight,containLabel:T.gridContainLabel},color:T.colors,...M}}),w=(T=[],M,j=!1)=>{const q=j?M:null;y.value=Cu(T,q)},O=(T=[],M)=>{y.value=wu(T,M)},m=async()=>{var T,M,j;try{const q=fu({graphicConfig:e.unref(a.value),type:(T=e.unref(n.value))==null?void 0:T.type,request:r,indicatorToken:i});f.value=!0;const F=await q(),{columns:k=[],rows:I=[]}=((M=F==null?void 0:F.data)==null?void 0:M.data)??{};if(((j=e.unref(n.value))==null?void 0:j.type)==="pie"){let C=[];if(k.length>0){const E=k[0],$=k[1];C=I.map(b=>({name:b[E],value:b[$]}))}O(C)}else{let C;k.length>0&&(C={name:k[0],types:k.slice(1).map(E=>({label:E,value:E}))}),w(I,C,!0)}}catch(q){console.error(q)}finally{f.value=!1}},N={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},g=()=>{e.unref(y).dataset.length===0?u.value.setOption(N):u.value.setOption(S.value)},B=()=>{e.unref(n.value).type!=="customGraph"&&m()},V=()=>{var T;(T=u.value)==null||T.resize()};return e.watch(S,()=>{g()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,T=>{try{const M=eval;x.value=M(T)}catch(M){console.error(M)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(V),l.observe(p.value)),u.value=qa.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:B}),{echartRef:c,loading:f}}}),Sf="",ku={class:"ecan-chart-graph",ref:"chartWrapRef"},xu={style:{width:"100%",height:"100%"},ref:"echartRef"};function Su(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",ku,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",xu,null,512)]),_:1},8,["spinning"])],512)}const Ma=te(_u,[["render",Su],["__scopeId","data-v-8049fed2"]]),Au=e.defineComponent({name:"DataConfig",components:{DataGroup:Fc,StyleGroup:ou,ChartGraph:Ma,ATabs:v.Tabs,ATabPane:v.TabPane,ControlGroup:uu,AButton:v.Button,ReloadOutlined:Wl},setup(){var N;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Me),r=e.inject(rn),l=e.inject(pe),i=e.inject(He),d=e.inject(un),s=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const g=re.cloneDeep(e.unref(a));p(g);const B=re.pick(g,re.without(Object.keys(g),"position","top","left","width","height"));Ie(g.type,s)?(B.height=g.height,B.width=g.width):B.height="290px";const V=re.cloneDeep(e.unref(l));return V.pageMode="design",V.componentList=i,V.preview=!0,V.pageConfig=d,{...B,graphicConfig:V,toolboxShow:!1,sourceLeft:g.left,sourceTop:g.top}});function p(g){var B,V,T,M;["#ffffff","#fff"].includes((B=g==null?void 0:g.color)==null?void 0:B.toLowerCase())&&(g.color="#000"),["#ffffff","#fff"].includes((V=g==null?void 0:g.variableColor)==null?void 0:V.toLowerCase())&&(g.variableColor="#000"),["#ffffff","#fff"].includes((T=g==null?void 0:g.increaseColor)==null?void 0:T.toLowerCase())&&(g.increaseColor="#000"),["#ffffff","#fff"].includes((M=g==null?void 0:g.declineColor)==null?void 0:M.toLowerCase())&&(g.declineColor="#000")}const u=e.computed(()=>{let g=!0;return Ie(e.unref(c).type,s)&&(g=!1),g}),f=e.computed(()=>{var g;return(g=e.unref(c))==null?void 0:g.type}),h=e.computed(()=>{var g;return!!((g=e.unref(c))!=null&&g.isGroupTable)}),A=g=>{const B=g==="1";B&&f.value==="table"&&m(),window.changeShowTable&&window.changeShowTable(B),g==="3"&&O()},y=e.ref(),x=e.inject(Be),S=e.unref(e.inject(Oe)),w=(N=window==null?void 0:window.config)==null?void 0:N.pageId;function O(){var q;const{leftAxisList:g=[],rightAxisList:B=[],queryColumnList:V=[],indicators:T=[]}=e.unref(l),M=[...g,...B,...V,...T],j={};for(const F of M){const{id:k="",indexCode:I=""}=F;k&&!Ut(F,"calcType")&&!j[k]&&(j[k]=I)}if((q=Object.keys(j))!=null&&q.length){const F=[];for(const k in j)F.push(new Promise((I,C)=>{x.post(`${ke}/diagram/hrpIndexWithComplex`,{pageId:w,indexGuid:k,indexCode:j[k],dataSourceId:""},{headers:{Authentication:S,operateContext:"ygt"}}).then(E=>{var _;const{success:$,data:b=[]}=E.data;$&&((_=b==null?void 0:b.dataViewColumns)!=null&&_.length)?I(b.dataViewColumns):C(b)}).catch(E=>{C(E)})}));Promise.all(F).then(k=>{if(k!=null&&k.length){const I=k.reduce((C,E)=>C.filter($=>E.find(b=>b.typeGuid===$.typeGuid)));y.value=I.filter(C=>C.typeGuid)}})}}const m=()=>{var B;let g;r&&f.value==="table"?g=window.updateConfig:g=(B=e.unref(n))==null?void 0:B.refreshData,typeof g=="function"&&g()};return e.provide(ln,m),e.watch(l,()=>{m()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:h,onChange:A,component:c,fullWidth:u,renderUsedComponents:i,intersection:y,refreshData:m}}}),Af="",Nu={class:"data-config"},Tu={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function Eu(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("reload-outlined"),u=e.resolveComponent("a-button"),f=e.resolveComponent("a-tabs"),h=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",Nu,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=A=>t.activeKey=A),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(u,{onClick:t.refreshData},{icon:e.withCtx(()=>[e.createVNode(p)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",Tu,null,512)):e.withDirectives((e.openBlock(),e.createBlock(h,{key:1,class:e.normalizeClass(["chart-component",t.fullWidth?"full-width":""]),ref:"componentRef",style:{width:"100%",height:"290px"}},null,8,["class"])),[[e.vShow,t.activeKey==="1"]])],64)):e.createCommentVNode("",!0)])}const Lu=te(Au,[["render",Eu],["__scopeId","data-v-15bbcd0f"]]),Bu=e.defineComponent({name:"IndicatorLibrary",components:{DataList:ci,DataConfig:Lu},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var N;return((N=e.unref(i))==null?void 0:N.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?re.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?re.cloneDeep(e.unref(i).chartsOptions):e.ref(re.cloneDeep(fn.line));p=e.ref(p);let u=e.unref(i).tableOptions?re.cloneDeep(e.unref(i).tableOptions):e.ref(re.cloneDeep(Ka));u=e.ref(u);const f=e.ref([]),h=N=>{f.value=N},A=N=>{c.value={...e.unref(c),...e.unref(N)}},y=(N,g=!0)=>{g?p.value={...e.unref(p),...e.unref(N)}:p.value={...e.unref(N)}},x=N=>{u.value={...e.unref(u),...e.unref(N)}},S=()=>f,w=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=re.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=re.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},O=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=O,t.request&&e.provide(Be,t.request),e.provide(an,{setDataList:h,getDataList:S});const m=N=>{n("updateUsedComponent",N)};return e.provide(Me,i),e.provide(pe,c),e.provide(Dt,p),e.provide(sn,u),e.provide(co,r),e.provide(rn,s),e.provide(Oe,l),e.provide(xe,A),e.provide(io,y),e.provide(so,x),e.provide(He,t.renderUsedComponentList),e.provide(vt,m),e.provide(pn,t.mapAttributeProps),e.provide(un,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:w}),{isUpdate:a}}}),Nf="",Ou={key:0,class:"config-modal"},Vu={class:"config-modal-left"},Iu={class:"config-modal-right"};function Fu(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ou,[e.createElementVNode("div",Vu,[e.createVNode(i)]),e.createElementVNode("div",Iu,[e.createVNode(d)])]))}const ja=nn(te(Bu,[["render",Fu],["__scopeId","data-v-23d542ce"]])),Ra=nn(Ma),Ua=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ra,EcanIndicatorLibrary:ja},Symbol.toStringTag,{value:"Module"})),$u={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Ua).forEach(a=>{const r=Ua[a];r.install&&t.use(r)})}};he.EcanChartGraph=Ra,he.EcanIndicatorLibrary=ja,he.default=$u,Object.defineProperties(he,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
64
64
|
//# sourceMappingURL=index.umd.js.map
|