@ecan-bi/indicator-library 1.0.69 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
- /*! @ecan-bi/indicator-library@1.0.69 */
2
- (function(we,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):(we=typeof globalThis<"u"?globalThis:we||self,e(we["@ecan-bi/indicator-library"]={},we.Vue,we.LodashEs,we.AntDesignVue,we.Draggable,null,null,we.Dayjs,null,we.MonacoEditor,null,we.Echarts))})(this,function(we,e,Z,$,Tt,kf,_f,se,xf,er,Sf,tr){var Za;"use strict";function or(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 nr=or(tr),pn=(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},Me="$request",Ve=((Za=window==null?void 0:window.config)==null?void 0:Za.indicatorURL)||"",ve="INDICATOR_TOKEN",un="DATA_LIST",Ye="SELECTED_COMPONENT",fe="GRAPHIC_CONFIG",xe="UPDATE_GRAPHIC_CONFIG",fn="SHOW_STYLE_CONFIG",mn="REFRESH_DATA",Gt="CHARTS_OPTIONS",hn="TABLE_OPTIONS",ar=18,ho="UPDATE_CHARTS_OPTIONS",yo="UPDATE_TABLE_OPTIONS",go="SOURCE_TYPE",yn="CHANGE_CONDITION",gn="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",zt="UPDATE_USED_COMPONENT",bn="MAP_ATTRIBUTE_PROPS",Cn="PAGE_CONFIG",wn={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%"}},rr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},lr=e.defineComponent({name:"DataViewList",components:{ASpin:$.Spin,ATreeSelect:$.TreeSelect,Draggable:Tt},setup(){var x;const t=e.inject(Me),o=e.unref(e.inject(ve)),n=e.inject(fe),a=e.inject(xe),r=e.computed(()=>{var h;return((h=e.unref(n))==null?void 0:h.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(x=window==null?void 0:window.config)==null?void 0:x.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var A,L;const h=r.value;i.value=!0;try{const{data:O}=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,O.success&&((A=s.value)==null||A.push(l),s.value=(L=s.value)==null?void 0:L.concat(p([O.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(h=[],A)=>{const L=[];return h.forEach(O=>{L.push({id:O.id,pId:A??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),L},u=async(h,A)=>{var N;let L=0;if(h){const{value:V}=h.dataRef;L=V}const{data:O}=await t.post(`${Ve}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:L},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(s.value=(N=e.unref(s))==null?void 0:N.concat(p(O.data)),A&&e.unref(r)&&await c())},m=h=>{C(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(un,{setDataList:h=>h}),w=e.ref(!1),f=e.ref([]),C=async h=>{if(h){f.value=[],w.value=!0;try{const A=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:L,data:O={}}=A.data;if(w.value=!1,L){const{rows:N=[]}=O;N==null||N.forEach(V=>{var F;const B=((F=V==null?void 0:V.dataViewColumns)==null?void 0:F.map(H=>({...H,show:!0})))||[];f.value=[...e.unref(f),...B]}),g(e.unref(f))}}catch{w.value=!1}}},_=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],k=(h,A)=>{const L=A[h.oldIndex];if(L){const O={...L,label:L.name,name:L.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await u(void 0,!0),C(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:w,onDataViewIdChange:m,mapGenericType:_,onDragStart:k}}}),Vf="",oe=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},ir={class:"data-view-list"},sr={class:"columns"},cr={class:"column-item"},dr={class:"column-item-name"};function pr(t,o,n,a,r,i){const s=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",ir,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{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",sr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{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",cr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",dr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const ur=oe(lr,[["render",pr],["__scopeId","data-v-4a66f7d2"]]);function Be(t,o){fr(t)&&(t="100%");var n=mr(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 fr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function mr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function hr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ht(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bo(t){return t.length===1?"0"+t:String(t)}function yr(t,o,n){return{r:Be(t,255)*255,g:Be(o,255)*255,b:Be(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 gr(t,o,n){var a,r,i;if(t=Be(t,360),o=Be(o,100),n=Be(n,100),o===0)r=n,i=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,d=2*n-s;a=Co(d,s,t+1/3),r=Co(d,s,t),i=Co(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function br(t,o,n){t=Be(t,255),o=Be(o,255),n=Be(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),i=0,s=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(o-n)/d+(o<n?6:0);break;case o:i=(n-t)/d+2;break;case n:i=(t-o)/d+4;break}i/=6}return{h:i,s:l,v:s}}function Cr(t,o,n){t=Be(t,360)*6,o=Be(o,100),n=Be(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:c*255,g:p*255,b:u*255}}function wr(t,o,n,a){var r=[bo(Math.round(t).toString(16)),bo(Math.round(o).toString(16)),bo(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 kn(t){return Ae(t)/255}function Ae(t){return parseInt(t,16)}var _n={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 Et(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,i=null,s=!1,d=!1;return typeof t=="string"&&(t=xr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=yr(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=Ht(t.s),r=Ht(t.v),o=Cr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=Ht(t.s),i=Ht(t.l),o=gr(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=hr(n),{ok:s,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 kr="[-\\+]?\\d+%?",_r="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(_r,")|(?:").concat(kr,")"),wo="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),ko="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wo),rgba:new RegExp("rgba"+ko),hsl:new RegExp("hsl"+wo),hsla:new RegExp("hsla"+ko),hsv:new RegExp("hsv"+wo),hsva:new RegExp("hsva"+ko),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 xr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(_n[t])t=_n[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=je.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=je.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=je.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=je.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=je.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=je.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=je.hex8.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),a:kn(n[4]),format:o?"name":"hex8"}:(n=je.hex6.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),format:o?"name":"hex"}:(n=je.hex4.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),a:kn(n[4]+n[4]),format:o?"name":"hex8"}:(n=je.hex3.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Yt=2,xn=.16,Sr=.05,Nr=.05,Ar=.15,Sn=5,Nn=4,Tr=[{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 An(t){var o=t.r,n=t.g,a=t.b,r=br(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Wt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(wr(o,n,a,!1))}function Er(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 Tn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Yt*o:Math.round(t.h)+Yt*o:a=n?Math.round(t.h)+Yt*o:Math.round(t.h)-Yt*o,a<0?a+=360:a>=360&&(a-=360),a}function En(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-xn*o:o===Nn?a=t.s+xn:a=t.s+Sr*o,a>1&&(a=1),n&&o===Sn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Ln(t,o,n){var a;return n?a=t.v+Nr*o:a=t.v-Ar*o,a>1&&(a=1),Number(a.toFixed(2))}function _o(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Et(t),r=Sn;r>0;r-=1){var i=An(a),s=Wt(Et({h:Tn(i,r,!0),s:En(i,r,!0),v:Ln(i,r,!0)}));n.push(s)}n.push(Wt(a));for(var d=1;d<=Nn;d+=1){var l=An(a),c=Wt(Et({h:Tn(l,d),s:En(l,d),v:Ln(l,d)}));n.push(c)}return o.theme==="dark"?Tr.map(function(p){var u=p.index,m=p.opacity,g=Wt(Er(Et(o.backgroundColor||"#141414"),Et(n[u]),m*100));return g}):n}var xo={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"},So={},No={};Object.keys(xo).forEach(function(t){So[t]=_o(xo[t]),So[t].primary=So[t][5],No[t]=_o(xo[t],{theme:"dark",backgroundColor:"#141414"}),No[t].primary=No[t][5]});var Vn=[],Lt=[],Lr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function Vr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function Br(t,o){if(o=o||{},t===void 0)throw new Error(Lr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Vn.indexOf(a);r===-1&&(r=Vn.push(a)-1,Lt[r]={});var i;return Lt[r]!==void 0&&Lt[r][n]!==void 0?i=Lt[r][n]:(i=Lt[r][n]=Vr(),n==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}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){Or(t,r,n[r])})}return t}function Or(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Ir(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Fr(t,o){Ir(t,"[@ant-design/icons-vue] ".concat(o))}function On(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Ao(t,o,n){return n?e.h(t.tag,Bn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function In(t){return _o(t)[0]}function Fn(t){return t?Array.isArray(t)?t:[t]:[]}var Dr=`
1
+ /*! @ecan-bi/indicator-library@1.0.71 */
2
+ (function(we,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):(we=typeof globalThis<"u"?globalThis:we||self,e(we["@ecan-bi/indicator-library"]={},we.Vue,we.LodashEs,we.AntDesignVue,we.Draggable,null,null,we.Dayjs,null,we.MonacoEditor,null,we.Echarts))})(this,function(we,e,J,$,Tt,xf,Sf,se,Nf,tr,Af,or){var er;"use strict";function nr(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 ar=nr(or),pn=(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},ve="$request",Ve=((er=window==null?void 0:window.config)==null?void 0:er.indicatorURL)||"",Me="INDICATOR_TOKEN",un="DATA_LIST",Ye="SELECTED_COMPONENT",me="GRAPHIC_CONFIG",xe="UPDATE_GRAPHIC_CONFIG",fn="SHOW_STYLE_CONFIG",mn="REFRESH_DATA",Gt="CHARTS_OPTIONS",hn="TABLE_OPTIONS",rr=18,ho="UPDATE_CHARTS_OPTIONS",yo="UPDATE_TABLE_OPTIONS",go="SOURCE_TYPE",yn="CHANGE_CONDITION",gn="DATA_VIEW_COLUMNS",Pe="RENDER_USED_COMPONENTS",zt="UPDATE_USED_COMPONENT",bn="MAP_ATTRIBUTE_PROPS",Cn="PAGE_CONFIG",wn={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%"}},lr={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},ir=e.defineComponent({name:"DataViewList",components:{ASpin:$.Spin,ATreeSelect:$.TreeSelect,Draggable:Tt},setup(){var x;const t=e.inject(ve),o=e.unref(e.inject(Me)),n=e.inject(me),a=e.inject(xe),r=e.computed(()=>{var h;return((h=e.unref(n))==null?void 0:h.dataViewId)||null}),i=e.ref(!1),s=e.ref([]),d=(x=window==null?void 0:window.config)==null?void 0:x.pageId,l=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var L,B;const h=r.value;i.value=!0;try{const{data:I}=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});i.value=!1,I.success&&((L=s.value)==null||L.push(l),s.value=(B=s.value)==null?void 0:B.concat(p([I.data.rows[0]],"YXJG")))}catch{i.value=!1}},p=(h=[],L)=>{const B=[];return h.forEach(I=>{B.push({id:I.id,pId:L??I.parentId,value:I.id,title:I.name,isLeaf:I.leaf||!1,nature:I.nature,selectable:I.leaf||!1})}),B},u=async(h,L)=>{var A;let B=0;if(h){const{value:E}=h.dataRef;B=E}const{data:I}=await t.post(`${Ve}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:B},{headers:{Authentication:o,operateContext:"ygt"}});I.success&&(s.value=(A=e.unref(s))==null?void 0:A.concat(p(I.data)),L&&e.unref(r)&&await c())},m=h=>{w(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:g}=e.inject(un,{setDataList:h=>h}),C=e.ref(!1),f=e.ref([]),w=async h=>{if(h){f.value=[],C.value=!0;try{const L=await t.post(`${Ve}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:B,data:I={}}=L.data;if(C.value=!1,B){const{rows:A=[]}=I;A==null||A.forEach(E=>{var O;const N=((O=E==null?void 0:E.dataViewColumns)==null?void 0:O.map(M=>({...M,show:!0})))||[];f.value=[...e.unref(f),...N]}),g(e.unref(f))}}catch{C.value=!1}}},_=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],k=(h,L)=>{const B=L[h.oldIndex];if(B){const I={...B,label:B.name,name:B.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(I))}};return e.onMounted(async()=>{await u(void 0,!0),w(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:s,treeSelectLoading:i,dataViewList:f,dataViewLoading:C,onDataViewIdChange:m,mapGenericType:_,onDragStart:k}}}),Of="",oe=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},sr={class:"data-view-list"},cr={class:"columns"},dr={class:"column-item"},pr={class:"column-item-name"};function ur(t,o,n,a,r,i){const s=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),l=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",sr,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{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",cr,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(l,{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",dr,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",pr,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const fr=oe(ir,[["render",ur],["__scopeId","data-v-4a66f7d2"]]);function Be(t,o){mr(t)&&(t="100%");var n=hr(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 mr(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function hr(t){return typeof t=="string"&&t.indexOf("%")!==-1}function yr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Ht(t){return t<=1?"".concat(Number(t)*100,"%"):t}function bo(t){return t.length===1?"0"+t:String(t)}function gr(t,o,n){return{r:Be(t,255)*255,g:Be(o,255)*255,b:Be(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 br(t,o,n){var a,r,i;if(t=Be(t,360),o=Be(o,100),n=Be(n,100),o===0)r=n,i=n,a=n;else{var s=n<.5?n*(1+o):n+o-n*o,d=2*n-s;a=Co(d,s,t+1/3),r=Co(d,s,t),i=Co(d,s,t-1/3)}return{r:a*255,g:r*255,b:i*255}}function Cr(t,o,n){t=Be(t,255),o=Be(o,255),n=Be(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),i=0,s=a,d=a-r,l=a===0?0:d/a;if(a===r)i=0;else{switch(a){case t:i=(o-n)/d+(o<n?6:0);break;case o:i=(n-t)/d+2;break;case n:i=(t-o)/d+4;break}i/=6}return{h:i,s:l,v:s}}function wr(t,o,n){t=Be(t,360)*6,o=Be(o,100),n=Be(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:c*255,g:p*255,b:u*255}}function kr(t,o,n,a){var r=[bo(Math.round(t).toString(16)),bo(Math.round(o).toString(16)),bo(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 kn(t){return Ae(t)/255}function Ae(t){return parseInt(t,16)}var _n={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 Et(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,i=null,s=!1,d=!1;return typeof t=="string"&&(t=Sr(t)),typeof t=="object"&&(We(t.r)&&We(t.g)&&We(t.b)?(o=gr(t.r,t.g,t.b),s=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):We(t.h)&&We(t.s)&&We(t.v)?(a=Ht(t.s),r=Ht(t.v),o=wr(t.h,a,r),s=!0,d="hsv"):We(t.h)&&We(t.s)&&We(t.l)&&(a=Ht(t.s),i=Ht(t.l),o=br(t.h,a,i),s=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=yr(n),{ok:s,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 _r="[-\\+]?\\d+%?",xr="[-\\+]?\\d*\\.\\d+%?",Xe="(?:".concat(xr,")|(?:").concat(_r,")"),wo="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),ko="[\\s|\\(]+(".concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")[,|\\s]+(").concat(Xe,")\\s*\\)?"),je={CSS_UNIT:new RegExp(Xe),rgb:new RegExp("rgb"+wo),rgba:new RegExp("rgba"+ko),hsl:new RegExp("hsl"+wo),hsla:new RegExp("hsla"+ko),hsv:new RegExp("hsv"+wo),hsva:new RegExp("hsva"+ko),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 Sr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(_n[t])t=_n[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=je.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=je.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=je.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=je.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=je.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=je.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=je.hex8.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),a:kn(n[4]),format:o?"name":"hex8"}:(n=je.hex6.exec(t),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),format:o?"name":"hex"}:(n=je.hex4.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),a:kn(n[4]+n[4]),format:o?"name":"hex8"}:(n=je.hex3.exec(t),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function We(t){return!!je.CSS_UNIT.exec(String(t))}var Yt=2,xn=.16,Nr=.05,Ar=.05,Tr=.15,Sn=5,Nn=4,Er=[{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 An(t){var o=t.r,n=t.g,a=t.b,r=Cr(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Wt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(kr(o,n,a,!1))}function Lr(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 Tn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Yt*o:Math.round(t.h)+Yt*o:a=n?Math.round(t.h)+Yt*o:Math.round(t.h)-Yt*o,a<0?a+=360:a>=360&&(a-=360),a}function En(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-xn*o:o===Nn?a=t.s+xn:a=t.s+Nr*o,a>1&&(a=1),n&&o===Sn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Ln(t,o,n){var a;return n?a=t.v+Ar*o:a=t.v-Tr*o,a>1&&(a=1),Number(a.toFixed(2))}function _o(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Et(t),r=Sn;r>0;r-=1){var i=An(a),s=Wt(Et({h:Tn(i,r,!0),s:En(i,r,!0),v:Ln(i,r,!0)}));n.push(s)}n.push(Wt(a));for(var d=1;d<=Nn;d+=1){var l=An(a),c=Wt(Et({h:Tn(l,d),s:En(l,d),v:Ln(l,d)}));n.push(c)}return o.theme==="dark"?Er.map(function(p){var u=p.index,m=p.opacity,g=Wt(Lr(Et(o.backgroundColor||"#141414"),Et(n[u]),m*100));return g}):n}var xo={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"},So={},No={};Object.keys(xo).forEach(function(t){So[t]=_o(xo[t]),So[t].primary=So[t][5],No[t]=_o(xo[t],{theme:"dark",backgroundColor:"#141414"}),No[t].primary=No[t][5]});var Vn=[],Lt=[],Vr="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 Or(t,o){if(o=o||{},t===void 0)throw new Error(Vr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=Vn.indexOf(a);r===-1&&(r=Vn.push(a)-1,Lt[r]={});var i;return Lt[r]!==void 0&&Lt[r][n]!==void 0?i=Lt[r][n]:(i=Lt[r][n]=Br(),n==="prepend"?a.insertBefore(i,a.childNodes[0]):a.appendChild(i)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),i.styleSheet?i.styleSheet.cssText+=t:i.textContent+=t,i}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){Ir(t,r,n[r])})}return t}function Ir(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Fr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function Dr(t,o){Fr(t,"[@ant-design/icons-vue] ".concat(o))}function On(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function Ao(t,o,n){return n?e.h(t.tag,Bn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,Bn({key:o},t.attrs),(t.children||[]).map(function(a,r){return Ao(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function In(t){return _o(t)[0]}function Fn(t){return t?Array.isArray(t)?t:[t]:[]}var $r=`
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
- `,Dn=!1,$r=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dr;e.nextTick(function(){Dn||(typeof window<"u"&&window.document&&window.document.documentElement&&Br(o,{prepend:!0}),Dn=!0)})},Mr=["icon","primaryColor","secondaryColor"];function vr(t,o){if(t==null)return{};var n=Pr(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Pr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function qt(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 Vt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Rr(t){var o=t.primaryColor,n=t.secondaryColor;Vt.primaryColor=o,Vt.secondaryColor=n||In(o),Vt.calculated=!!n}function Ur(){return qt({},Vt)}var ht=function(o,n){var a=qt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=vr(a,Mr),l=Vt;if(i&&(l={primaryColor:i,secondaryColor:s||In(i)}),$r(),Fr(On(r),"icon should be icon definiton, but got ".concat(r)),!On(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=qt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Ao(c.icon,"svg-".concat(c.name),qt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};ht.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},ht.inheritAttrs=!1,ht.displayName="IconBase",ht.getTwoToneColors=Ur,ht.setTwoToneColors=Rr;const To=ht;function Gr(t,o){return Wr(t)||Yr(t,o)||Hr(t,o)||zr()}function zr(){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 Hr(t,o){if(t){if(typeof t=="string")return $n(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 $n(t,o)}}function $n(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 Yr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function Wr(t){if(Array.isArray(t))return t}function Mn(t){var o=Fn(t),n=Gr(o,2),a=n[0],r=n[1];return To.setTwoToneColors({primaryColor:a,secondaryColor:r})}function qr(){var t=To.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Kr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Qr(t,o){return el(t)||Zr(t,o)||Jr(t,o)||Xr()}function Xr(){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 Jr(t,o){if(t){if(typeof t=="string")return vn(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 vn(t,o)}}function vn(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 Zr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function el(t){if(Array.isArray(t))return t}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){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function tl(t,o){if(t==null)return{};var n=ol(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function ol(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Mn("#1890ff");var yt=function(o,n){var a,r=Pn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,m=tl(r,Kr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),w=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var C=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,_=Fn(p),k=Qr(_,2),x=k[0],h=k[1];return e.createVNode("span",Pn({role:"img","aria-label":s.name},m,{onClick:u,class:g}),[e.createVNode(To,{class:w,icon:s,primaryColor:x,secondaryColor:h,style:C},null)])};yt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},yt.displayName="AntdIcon",yt.inheritAttrs=!1,yt.getTwoToneColor=qr,yt.setTwoToneColor=Mn;const ye=yt;var nl={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 al=nl;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){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 Lo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(ye,jn({},a,{icon:al}),null)};Lo.displayName="AppstoreAddOutlined",Lo.inheritAttrs=!1;const Vo=Lo;var ll={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 il=ll;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){sl(t,r,n[r])})}return t}function sl(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:il}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const cl=Bo;var dl={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 pl=dl;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){ul(t,r,n[r])})}return t}function ul(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:pl}),null)};Oo.displayName="CaretRightOutlined",Oo.inheritAttrs=!1;const fl=Oo;var ml={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 hl=ml;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){yl(t,r,n[r])})}return t}function yl(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=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:hl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Kt=Io;var gl={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 bl=gl;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){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 Fo=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:bl}),null)};Fo.displayName="CopyOutlined",Fo.inheritAttrs=!1;const wl=Fo;var kl={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 _l=kl;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){xl(t,r,n[r])})}return t}function xl(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=Hn({},o,n.attrs);return e.createVNode(ye,Hn({},a,{icon:_l}),null)};Do.displayName="DeleteOutlined",Do.inheritAttrs=!1;const Sl=Do;var Nl={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 Al=Nl;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){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 $o=function(o,n){var a=Yn({},o,n.attrs);return e.createVNode(ye,Yn({},a,{icon:Al}),null)};$o.displayName="DoubleRightOutlined",$o.inheritAttrs=!1;const El=$o;var Ll={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 Vl=Ll;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){Bl(t,r,n[r])})}return t}function Bl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Mo=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(ye,Wn({},a,{icon:Vl}),null)};Mo.displayName="DownOutlined",Mo.inheritAttrs=!1;const Ol=Mo;var Il={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 Fl=Il;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){Dl(t,r,n[r])})}return t}function Dl(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=qn({},o,n.attrs);return e.createVNode(ye,qn({},a,{icon:Fl}),null)};vo.displayName="InfoCircleOutlined",vo.inheritAttrs=!1;const $l=vo;var Ml={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const vl=Ml;function Kn(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 Po=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(ye,Kn({},a,{icon:vl}),null)};Po.displayName="MenuOutlined",Po.inheritAttrs=!1;const Qn=Po;var jl={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 Rl=jl;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){Ul(t,r,n[r])})}return t}function Ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var jo=function(o,n){var a=Xn({},o,n.attrs);return e.createVNode(ye,Xn({},a,{icon:Rl}),null)};jo.displayName="MinusCircleOutlined",jo.inheritAttrs=!1;const Gl=jo;var zl={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 Hl=zl;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){Yl(t,r,n[r])})}return t}function Yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ro=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(ye,Jn({},a,{icon:Hl}),null)};Ro.displayName="PlusCircleOutlined",Ro.inheritAttrs=!1;const Wl=Ro;var ql={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 Kl=ql;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){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 Uo=function(o,n){var a=Zn({},o,n.attrs);return e.createVNode(ye,Zn({},a,{icon:Kl}),null)};Uo.displayName="PlusOutlined",Uo.inheritAttrs=!1;const Xl=Uo;var Jl={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 Zl=Jl;function ea(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){ei(t,r,n[r])})}return t}function ei(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Go=function(o,n){var a=ea({},o,n.attrs);return e.createVNode(ye,ea({},a,{icon:Zl}),null)};Go.displayName="QuestionCircleOutlined",Go.inheritAttrs=!1;const ti=Go;var oi={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 ni=oi;function ta(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){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=ta({},o,n.attrs);return e.createVNode(ye,ta({},a,{icon:ni}),null)};zo.displayName="ReloadOutlined",zo.inheritAttrs=!1;const ri=zo;var li={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 ii=li;function oa(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){si(t,r,n[r])})}return t}function si(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ho=function(o,n){var a=oa({},o,n.attrs);return e.createVNode(ye,oa({},a,{icon:ii}),null)};Ho.displayName="SettingOutlined",Ho.inheritAttrs=!1;const ci=Ho,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:fl,CaretDownOutlined:cl,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:Tt},setup(){var A;const t=(A=window==null?void 0:window.config)==null?void 0:A.pageId,o=e.inject(Me),n=e.unref(e.inject(ve)),a=e.inject(Ye),r=e.computed(()=>{var L;return(L=e.unref(a))==null?void 0:L.graphicConfig}),i=e.computed(()=>{var L;return(L=e.unref(r))==null?void 0:L.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const L={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const O=await o.post(`${Ve}/diagram/sourceList`,L,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:N,data:V={}}=O.data;if(N){const{rows:B=[],total:F=0}=V;B==null||B.forEach(H=>{var P;H.show=!1,(P=H.dataViewColumns)==null||P.forEach(S=>{S.show=!0,S.edit=!1,S.title&&(S.label=S.title)})}),s.value=B,l.totalResult=+F}}catch{d.value=!1}},u=L=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[L],m=L=>{s.value[L].show=!s.value[L].show},g=()=>{l.currentPage=1,p()},w=Z.debounce(()=>{l.currentPage=1,p()},200),f=(L,O)=>{l.pageSize=O,l.currentPage=L,p()};e.onMounted(()=>{p()});const C=e.inject(fe),_=e.computed(()=>{const L=["classificationList","rowHeaderList","dimensionList"];let O=[];for(const N in e.unref(C))if(Object.prototype.hasOwnProperty.call(e.unref(C),N)&&L.includes(N)){const V=e.unref(C)[N];Array.isArray(V)&&(O=O.concat(V))}return O});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:w,onPaginationChange:f,searchText:c,setItemDisabled:(L=[])=>{let O=!1;for(const N of e.unref(_))if(!L.find(B=>B.typeGuid===N.typeGuid)){O=!0;break}return O},onDragStart:(L,O)=>{const N=O.dataViewColumns[L.oldIndex];N&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...N,dataTo:O.dataTo})),O!=null&&O.hrpIndexVariates&&sessionStorage.setItem("indicator-variates",JSON.stringify(O.hrpIndexVariates)))},getSourceType:L=>L==="0"?"【指标库】":L==="1"?"【视图】":"【其他】"}}}),Bf="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=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",pi,[e.createVNode(s,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=m=>t.searchText=m),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:w=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":w=>m.dataViewColumns=w,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:w=>t.onDragStart(w,m)},{item:e.withCtx(({element:w})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(w.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(w.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]=m=>t.pagination.pageSize=m),total:t.pagination.totalResult,"show-total":m=>`共 ${m} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=m=>t.pagination.currentPage=m),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Ci=oe(di,[["render",bi],["__scopeId","data-v-056d1f48"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:ur},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=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(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),na={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:Tt,AModal:$.Modal,AButton:$.Button},setup(t,{expose:o}){var x;const n=(x=window==null?void 0:window.config)==null?void 0:x.pageId,a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(fe),s=e.inject(xe),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=async()=>{try{const h=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:A,data:L=[]}=h.data;A&&(c.value=L==null?void 0:L.slice(0,200))}catch(h){console.error(h)}},u=()=>{var N;const h=((N=e.unref(i)[t.type])==null?void 0:N.slice())||[],A=h[t.index],{label:L,name:O}=t.item;A.sort={label:L,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},s({[t.type]:h})};let m=!1;const g=()=>{m=!0},w=e.ref(!1),f=()=>{w.value=!0},C=()=>{w.value=!1},_=()=>{m&&u(),m=!1,C()};return o({showModal:f}),e.watch(w,h=>{var A,L;if(h){const O=(L=(A=t.item)==null?void 0:A.sort)==null?void 0:L.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!h)},{flush:"post"}),{visible:w,onCancel:_,customSortList:c,onChange:g,onDeleteConfig:()=>{var N;const h=((N=e.unref(i)[t.type])==null?void 0:N.slice())||[],A=h[t.index],{label:L,name:O}=t.item;A.sort={label:L,columnName:O},s({[t.type]:h}),C()}}}}),Of="",Si={class:"button-wrapper"},Ni={class:"sort-item"};function Ai(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),l=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(l,{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",Si,[e.createVNode(s,{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",Ni,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const Ti=oe(xi,[["render",Ai],["__scopeId","data-v-8e16d201"]]),Ei=e.defineComponent({name:"CustomGroupModal",directives:{focus:na},components:{CloseOutlined:Kt,AModal:$.Modal,ASelect:$.Select,ASelectOption:$.SelectOption,AButton:$.Button,AInput:$.Input,ACheckbox:$.Checkbox,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ATag:$.Tag,ACheckableTag:$.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var j;const n=e.inject(Me),a=(j=window==null?void 0:window.config)==null?void 0:j.pageId,r=e.unref(e.inject(ve));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const y=e.unref(c).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(c).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){$.message.error("创建分组名不能空");return}e.unref(p).has(y)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:y,data:[]}),i=!0)},w=y=>{e.unref(c).splice(y,1),i=!0},f=e.ref(null),C=()=>{if(e.unref(m)===0){$.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[y]){$.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const M=e.unref(c)[D];e.unref(c)[D].data=M.data.filter(G=>(G.checked&&b.push({...G,checked:!1}),!G.checked))}e.unref(c)[y].data=[...b,...e.unref(c)[y].data],i=!0},_=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},x=(y,b)=>{const T=y.target.value;e.unref(p).has(T)&&$.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},h=e.inject(fe),A=e.inject(xe),L=e.computed(()=>e.unref(h).source),O=e.computed(()=>e.unref(h).dataViewId),N=e.ref(!1),V=()=>{var K,Q;const y=e.unref(c);let b="";e.unref(N)&&(b=(K=y[0])==null?void 0:K.title);const T=y==null?void 0:y.length,D={};for(let ee=1;ee<T;ee++){const re=y[ee]||{},{title:he,data:me}=re;D[he]=(me==null?void 0:me.map(Ee=>Ee.label))||[]}const M=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],G=M[t.index];G.customGroup={groupInfoMap:D,otherGroupName:b},A({[t.type]:M})},B=e.ref(!1),F=()=>{B.value=!0},H=()=>{B.value=!1},P=()=>{H(),i&&V(),i=!1},S=()=>{i=!0},I=new Set,E=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,T=y.groupInfoMap;(b===""||b==null)&&(N.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const M in T)if(Object.prototype.hasOwnProperty.call(T,M)){const K=T[M].map(Q=>(I.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:M,data:K},D++}await v()},v=async()=>{var y;try{const b=await n.post(`${Ve}/diagram/groupvalue`,{source:e.unref(L),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const M=[];(y=D==null?void 0:D.slice(0,200))==null||y.forEach(G=>{I.has(G)||M.push({label:G,checked:!1})}),e.unref(c)[0].data=M}}catch(b){console.error(b)}};return e.watch(B,y=>{y&&E(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),o({showModal:F}),{visible:B,title:s,activeKey:l,customGroupList:c,onCancel:P,useOtherGroup:N,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:w,onMoveInGroup:C,selectGroupIndex:f,onEditTitle:_,onTitleChange:x,onFinishEditTitle:k,onUseOtherGroup:S,customGroupEditTitleList:u}}}),If="",Ff="",Li={class:"custom-group-header"},Vi={class:"move-and-create"},Bi={class:"select-tip"},Oi={class:"select-count"},Ii={class:"create-group"},Fi={class:"custom-group-content"},Di=["onClick"],$i={class:"extra"},Mi={class:"custom-group-list"},vi={class:"text"};function Pi(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),w=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),C=e.resolveComponent("a-modal"),_=e.resolveDirective("focus");return e.openBlock(),e.createBlock(C,{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",Li,[e.createElementVNode("div",Vi,[e.createElementVNode("div",null,[e.createElementVNode("span",Bi,[e.createTextVNode(" 已选"),e.createElementVNode("span",Oi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(s,{key:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ii,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",Fi,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(w,{key:x},{header:e.withCtx(()=>[t.customGroupEditTitleList[x]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,x),onBlur:h=>t.onFinishEditTitle(x),onPressEnter:h=>t.onFinishEditTitle(x)},null,8,["value","onChange","onBlur","onPressEnter"])),[[_]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(x),["prevent","stop"])},e.toDisplayString(k.title),9,Di))]),extra:e.withCtx(()=>[e.createElementVNode("div",$i,[x===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),x!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(x),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,A)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":L=>h.checked=L,class:"custom-group",key:A},{default:e.withCtx(()=>[e.createElementVNode("span",vi,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ji=oe(Ei,[["render",Pi],["__scopeId","data-v-7e3049d2"]]);let ke=(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};var Ri=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo={},Ui={get exports(){return Yo},set exports(t){Yo=t}};(function(t,o){(function(n,a){t.exports=a()})(Ri,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(Ui);const Gi=Yo;se.extend(Gi);const zi=e.defineComponent({name:"Condition",components:{CloseOutlined:Kt,DownOutlined:Ol,AppstoreAddOutlined:Vo,ASelect:$.Select,AInput:$.Input,ADatePicker:$.DatePicker,AButton:$.Button,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem,ASubMenu:$.SubMenu,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,ARadioGroup:$.RadioGroup,ARadio:$.Radio,AInputNumber:$.InputNumber,ASelectOption:$.SelectOption,MenuOutlined:Qn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var st,ct,At,dt,Le,Qe,tt,ot,ze,pt,ut,ft,nt;const o=(st=window==null?void 0:window.config)==null?void 0:st.pageId,n=e.inject(fe),a=e.inject(Me),r=e.unref(e.inject(ve)),i=e.inject(gn),s=e.inject(Pe),d=e.ref(!1),l=se(),c=e.computed(()=>{var Y;const z=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:ne="",id:J="",type:ce}=X;ce==="ecanRangePicker"?z.push({value:`${J}-startTime`,label:`${ne||J}-开始时间值`,keyName:`${ne||J}-startTime`,id:J},{value:`${J}-endTime`,label:`${ne||J}-结束时间值`,keyName:`${ne||J}-endTime`,id:J}):z.push({value:J,label:`${ne||J}`,keyName:`${ne||J}`,id:J})}),z}),p=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},w=[{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=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),C=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:""}]),_=[{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"}],k=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],x=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(ct=t.data)==null?void 0:ct.fieldName,fieldType:(At=t.data)==null?void 0:At.fieldType,rule:(dt=t.data)==null?void 0:dt.rule,id:(Le=t.data)==null?void 0:Le.id,fieldValue:A(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(ze=t.data)==null?void 0:ze.indexCodeNum,dataType:((pt=t.data)==null?void 0:pt.dataType)||"",componentId:((ut=t.data)==null?void 0:ut.componentId)||"",useCurrentTime:!!((ft=t.data)!=null&&ft.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function A(){const{fieldType:z="",dataType:Y="",fieldValue:X=""}=t.data;if(z==="DATE"&&Y==="time")return X&&se(X);if(Y==="component"){const ne=e.unref(c).find(J=>J.keyName===X);return ne?ne.value:X}else return X}const L=e.ref(!1),O=e.computed(()=>h.value.fieldType==="DATE"),N=e.computed(()=>{const z=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ne=["controlList","sqlConditions","variableList","variableConditions"];if(X.includes(z)){let J=[];for(const ce in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ce)&&!ne.includes(ce)){const _e=e.unref(n)[ce];Array.isArray(_e)&&(X.includes(ce)?J=J.concat(_e.filter(at=>at.show)):J=J.concat(_e))}Y=J}else["leftAxisList","rightAxisList","indicators"].includes(z)&&(Y=e.unref(i));return Y.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:V,deleteCondition:B,addCondition:F}=e.inject(yn,{updateCondition:(z,Y,X)=>{},deleteCondition:(z,Y)=>{},addCondition:(z,Y,X)=>{}}),H=()=>{B(t.index,t.path)};e.watch(h,z=>{const Y=Z.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(Y.fieldValue=z.fieldValue.format(z.dateFormat)),V(Y,t.index,t.path)},{deep:!0}),e.watch(d,z=>{h.value.fieldValue="",h.value.useCurrentTime=z});const P=z=>{var U;const Y=e.unref(N).find(W=>W.value===z)||{},{name:X,genericType:ne,id:J,label:ce,typeGuid:_e,indexCode:at,indexCodeNum:R}=Y;h.value={id:J,fieldName:X,fieldType:ne,label:ce,rule:"",fieldValue:ne==="DATE"?null:void 0,targetSource:"",typeGuid:_e,indexCode:at,indexCodeNum:R,dataType:"",useCurrentTime:!1,keyValue:((U=e.unref(h))==null?void 0:U.keyValue)||ke()}},S=z=>{const Y=e.unref(c).find(X=>X.value===z)||{};e.unref(h).componentId=Y.id||""},I=e.computed(()=>{const z=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),z==="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:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="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"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),E=e.computed(()=>{let z="";const Y=e.unref(I).find(X=>X.value===e.unref(h).rule);return Y&&(z=Y.label),z}),v=e.computed(()=>{let z={fontSize:"12px"};return e.unref(E)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),j=e.ref([]),y=async()=>{var z;if(!(e.unref(j).length>0))try{const Y=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:ne=[]}=Y.data;X&&(j.value=(z=ne==null?void 0:ne.slice(0,200))==null?void 0:z.map(J=>({label:J,value:J})))}catch(Y){console.error(Y)}},b=z=>{e.unref(h).rule=z,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&y()},T=z=>{e.unref(h).dataType=z,e.unref(h).fieldValue=""},D=e.ref(),M=z=>{D.value=z,e.unref(h).fieldValue=(z==null?void 0:z.join(","))||""},G=z=>{const{keyPath:Y}=z;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var ne,J,ce,_e,at,R,U,W;if(h.value.dataType=((ne=t.data)==null?void 0:ne.dataType)||"",h.value.componentId=((J=t.data)==null?void 0:J.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(_e=t.data)==null?void 0:_e.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((at=t.data)==null?void 0:at.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const ae=e.unref(h).calcWays[0];if(ae){const te=ae.split("-");e.unref(f).expression=te[0],e.unref(f).around=te[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((R=t.data)==null?void 0:R.radioValue)||"";const ae=e.unref(C).find(te=>{var le;return te.key===((le=t.data)==null?void 0:le.activeKey)});ae&&Ee(ae,t.data)}}else D.value=((W=(U=t.data)==null?void 0:U.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:z,fieldName:Y,rule:X}=h.value;z!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=z=>{if(e.unref(h).activeKey===z){e.unref(C)[z].radioValue=e.unref(h).radioValue,e.unref(C)[e.unref(h).activeKey]&&(e.unref(C)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(C)[z].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(C)[z].afterNum=e.unref(h).calcWays[0]));return}e.unref(C).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(z,Y)=>{m.value=!0;const X=z.target.value,ne=Y.type,J=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),_e=Y.afterNum;Y.value=de(X,ne,J,ce,_e)},ee=z=>{const Y=e.unref(h).activeKey;if(z!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const ne=e.unref(h).dateFormat,J=e.unref(h).radioValue;let ce=0,_e=0;return J==="1"?ce=Math.abs(e.unref(h).calcWays[0]):J==="2"&&(_e=e.unref(h).calcWays[0]),de(J,X,ne,ce,_e)},re=(z,Y,X,ne)=>{if(m.value=!0,Y.radioValue===ne){const J=z.target.value;X==="+"?Y.value=se().add(J,Y.type).format(e.unref(h).dateFormat):Y.value=se().subtract(J,Y.type).format(e.unref(h).dateFormat)}},he=(z,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=z.radioValue,z.radioValue==="1"?e.unref(h).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(h).calcWays[0]=z.afterNum:z.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),L.value=!1},me=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,L.value=!1};function Ee(z,Y){const{radioValue:X="",calcWays:ne=[]}=Y;z.radioValue=X,ne!=null&&ne.length&&(X==="1"?z.beforeNum=Math.abs(ne[0]):X==="2"&&(z.afterNum=ne[0]))}function de(z,Y,X,ne,J){if(z==="1")return se().subtract(ne,Y).format(X);if(z==="2")return se().add(J,Y).format(X);if(z==="3"){if(Y==="years")return se().startOf("year").format(X);if(Y==="quarters")return se().startOf("quarter").format(X);if(Y==="months")return se().startOf("month").format(X);if(Y==="days")return se().format(X)}else if(z==="4"){if(Y==="years")return se().endOf("year").format(X);if(Y==="quarters")return se().endOf("quarter").format(X);if(Y==="months")return se().endOf("month").format(X)}return""}const $e=(z,Y)=>Y.label.toLowerCase().indexOf(z.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:N,ruleOptions:I,onFieldChange:P,condition:h,valueOptions:j,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:M,fieldValues:D,onDelete:H,isDateType:O,formatList:w,tabDateList:C,compareList:_,menuRule:k,dateBtnLabel:E,downIconStyle:v,popoverVisible:L,dateRadioStyle:g,showTime:m,controlList:c,dataTypeList:x,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:G,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:re,okDatePickConfig:he,onChangeComponent:S,filterOption:$e,okCustomConfig:me,clickConditionMenu:({key:z})=>{F(t.path,t.index,z==="2"?"||":"&&")}}}}),Df="",$f="",Hi={class:"condition"},Yi=["title"],Wi={class:"rule"},qi={class:"data-type"},Ki={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Qi={class:"popover-content-wrap"},Xi={key:0,class:"use-current-time"},Ji={class:"tabFilterRadio"},Zi={key:0},es={key:1},ts={style:{"margin-left":"10px"}},os={style:{"margin-left":"10px"}},ns={style:{position:"absolute",bottom:"10px"}},as={style:{display:"flex"}},rs={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ls(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),w=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),C=e.resolveComponent("a-input-number"),_=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),A=e.resolveComponent("appstore-add-outlined"),L=e.resolveComponent("a-popover"),O=e.resolveComponent("a-input"),N=e.resolveComponent("menu-outlined"),V=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Hi,[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,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:B.label},e.toDisplayString(B.label),9,Yi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Wi,[t.isDateType?(e.openBlock(),e.createBlock(g,{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,B=>(e.openBlock(),e.createBlock(c,{key:B.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value?"color: #1890FF;":"")},e.toDisplayString(B.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,F=>{var H;return e.openBlock(),e.createBlock(c,{key:F.value,disabled:F.value==="component"&&!((H=t.controlList)!=null&&H.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value?"color: #1890FF;":"")},e.toDisplayString(F.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===B.value&&t.condition.dataType===F.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(m,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",qi,[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,(B,F)=>(e.openBlock(),e.createBlock(s,{key:F,value:B.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Ki,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(w,{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(w,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=B=>t.condition.fieldValue=B),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]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(L,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=B=>t.popoverVisible=B),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Qi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Xi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=B=>t.isUseCurrentTime=B)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(B,F)=>(e.openBlock(),e.createBlock(x,{key:F,tab:B.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[e.createVNode(k,{value:B.radioValue,"onUpdate:value":H=>B.radioValue=H,onChange:H=>t.changeRadioValue(H,B)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Zi,"相对当前时间:"+e.toDisplayString(B.value),1)):(e.openBlock(),e.createElementBlock("div",es,"相对当前时间:"+e.toDisplayString(t.getFieldValue(F)),1)),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.beforeNum,"onUpdate:value":H=>B.beforeNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ts,e.toDisplayString(B.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(C,{value:B.afterNum,"onUpdate:value":H=>B.afterNum=H,min:0,onBlur:H=>t.blurCompare(H,B,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",os,e.toDisplayString(B.afterLabel),1)]),_:2},1032,["style"]),B.beforeText?(e.openBlock(),e.createBlock(_,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),B.afterText?(e.openBlock(),e.createBlock(_,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",ns,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=H=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:H=>t.okDatePickConfig(B,F)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(x,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=B=>t.customTabData.expression=B),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=B=>t.customTabData.unit=B),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=B=>t.customTabData.around=B)},{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"])]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=B=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{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]=B=>{t.popoverVisible=!0})},[e.createVNode(A)])]),_: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"])):(!t.condition.fieldType||["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]=B=>t.condition.fieldValue=B),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(O,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=B=>t.condition.fieldValue=B)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(N,{class:"more-icon"})]),_:1}),e.createVNode(V,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const is=oe(zi,[["render",ls],["__scopeId","data-v-d10a7ca9"]]),ss=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:is}}),Mf="",cs={key:0,class:"condition-list"},ds={key:0,class:"condition-container"},ps={key:0,class:"condition-text"},us={key:1,class:"condition-text"},fs={class:"conditions"};function ms(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",cs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",ds,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",ps,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",us,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",fs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const hs=oe(ss,[["render",ms],["__scopeId","data-v-553c1496"]]),ys=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:$.Select,AInput:$.Input,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=Z.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),vf="",aa=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),gs={class:"truncations"},bs={class:"rule"},Cs={class:"field-value"},ws={class:"field-value"},ks=aa(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),_s=aa(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),xs=["onClick"];function Ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",gs,[(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",bs,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Cs,[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",ws,[ks,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),_s]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,xs)]))),128))])}const Ns=oe(ys,[["render",Ss],["__scopeId","data-v-f543c690"]]),ge=(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},As=t=>t.replace(/\\n/g,`
59
- `),gt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},ra=(t,o)=>{var f;const n=Z.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;ia(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const C of m){const _=Je((C==null?void 0:C.conditions)||[]);if(_!=null&&_.length){const k=_.filter(x=>sa(x,o)?(x==null?void 0:x.dataType)==="component":!1).map(x=>{const h=sa(x,o),A={};return x!=null&&x.dateFormat&&(A.format=x.dateFormat),{conditionKey:x.fieldName,conditionLabel:x.fieldName,conditionName:x.fieldName,conditionValueType:x.fieldType,id:h.id,keyName:x.fieldValue,rule:x.rule,notGlobal:!0,indexCode:x.indexCode,typeGuid:x.typeGuid,indexCodeNum:x.indexCodeNum,...A}});if(k!=null&&k.length)for(const x of k)g.find(h=>h.keyName===x.keyName)||g.push(x)}}const w=g.length;for(let C=0;C<w;C++){const _=g[C];if(_&&!((f=Object.keys(_))!=null&&f.length)||(_==null?void 0:_.conditionKey)==="parentCode")continue;const{id:k,keyName:x,prop:h,format:A,dataType:L="component",customValue:O}=_,N=la(_);Wo({sqlCondition:N,renderUsedComponents:o,id:k,dateFormat:A,prop:h,keyName:x,dataType:L,customValue:O}),u.push(N)}for(let C=u.length-1;C>=0;C--){const _=u[C];_.globalCondition||Je(u).find(x=>x.alias===_.alias&&x.globalCondition)&&u.splice(C,1)}return u},Bt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Wo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function la(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Ts=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function ia(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)ia(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=la(n);Wo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Ts)delete n[p]}}function Wo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,m=n.find(x=>x.id===a),{value:g,format:w="YYYY-MM-DD",operate:f,type:C="",useCurrentTime:_}=m||{},k=r||w;if(ge(C,"date")){let x;if(_?x=se():x=se(g),f&&g){const{mode:h,type:A,value:L}=f;if(L)switch(A){case"add":x=x.add(L,h);break;case"minus":x=x.subtract(L,h);break}}if(c&&p&&u)switch(u){case"add":x=x.add(c,p);break;case"minus":x=x.subtract(c,p);break}o.fieldValue=(x==null?void 0:x.format(k))||"",o.dateFormat=k}else if(C==="ecanRangePicker"){const{interval:x,intervalUnit:h,startTime:A,endTime:L}=m||{};let O=i;if(!i){const V=s==null?void 0:s.split("-");V!=null&&V.length&&(O=V[V.length-1])}if(!O)return;let N=null;if(_&&(O==="startTime"?N=se().subtract(x,h):O==="endTime"&&(N=se())),m[O]&&(N=se(m[O])),f){const{type:V,value:B,mode:F}=f;switch(V){case"add":N=N&&N.add(B,F);break;case"minus":N=N&&N.subtract(B,F)}}if(c&&p&&u){if(c==="rangeValue"){if(A&&L){const V=se(L).diff(se(A),p)+1;switch(u){case"add":N=N&&N.add(V,p);break;case"minus":N=N&&N.subtract(V,p)}}}else if(!isNaN(+c))switch(u){case"add":N=N&&N.add(c,p);break;case"minus":N=N&&N.subtract(c,p)}}if(N&&(o.fieldValue=N==null?void 0:N.format(k)),O==="rangeValue"&&A&&L){const V=Es(k);V&&(o.fieldValue=se(L).diff(se(A),V)+1)}o.dateFormat=k}else{const x=g&&g.match(/\{(.+?)\}/g);x!=null&&x.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=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 sa(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}function Es(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Ls=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:hs,TruncationList:Ns,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var S;return`添加过滤条件-${((S=t.item)==null?void 0:S.label)||""}`},r=e.inject(fe),i=e.inject(xe),s=e.inject(Pe),d=e.computed(()=>{var S;return(S=e.unref(r))==null?void 0:S.dataSourceId}),l=e.inject(Ye),c=e.inject(zt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=S=>{var I;for(const E of S)(I=E.conditions)!=null&&I.length?g(E.conditions):E.keyValue=ke()};e.watch(m,S=>{var I,E,v,j;if(S){if(Array.isArray((I=t.item)==null?void 0:I.conditions)){const y=Z.cloneDeep(((E=t.item)==null?void 0:E.conditions)||[]);g(y),p.value=y}Array.isArray((v=t.item)==null?void 0:v.truncations)?u.value=Z.cloneDeep((j=t.item)==null?void 0:j.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"});let w=!1;const f=S=>{var I;w=!0,e.unref(p)==null||((I=e.unref(p))==null?void 0:I.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==S?p.value=[{join:S,conditions:[e.unref(p)[0],{keyValue:ke()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===S&&p.value[0].conditions.push({keyValue:ke()}))};e.provide(yn,{updateCondition(S,I,E){var y;w=!0;let v=e.unref(p);const j=E.split("-");if(j!=null&&j.length)for(const b of j)if(v[b])v=(y=v[b])==null?void 0:y.conditions;else break;Array.isArray(v)&&v[I]&&(v[I]=S)},deleteCondition(S,I){var j,y,b;w=!0;let E=e.unref(p);const v=I.split("-");if(v!=null&&v.length){for(const T of v)if(E[T])E=(j=E[T])==null?void 0:j.conditions;else break;if(Array.isArray(E)&&E[S])if(E.splice(S,1),E.length===1){if(v.length>0){const T=v.length-1,D=v[T],M=v.slice(0,T);let G=e.unref(p),K="";for(const Q of M)if(G[Q])K=(y=G[Q])==null?void 0:y.join,G=(b=G[Q])==null?void 0:b.conditions;else break;if(K===E[0].join){if(Array.isArray(E[0].conditions)){const Q=Z.cloneDeep(E[0].conditions);G.splice(+D,1),G.splice(+D,0,...Q)}}else G[D]=E[0]}}else E.length===0&&(p.value=[])}},addCondition(S,I,E){var b,T;w=!0;let v=e.unref(p),j="";const y=S.split("-");if(y!=null&&y.length){for(const D of y)if(v[D])j=(b=v[D])==null?void 0:b.join,v=(T=v[D])==null?void 0:T.conditions;else break;if(j===E)v.splice(I+1,0,{keyValue:ke()});else{const D=Z.cloneDeep(v[I]);v[I]={join:E,conditions:[D,{keyValue:ke()}]}}}}});const C=S=>{w=!0,u.value=S},_=e.computed(()=>{var I;const S=[];return(I=e.unref(s))==null||I.forEach(E=>{const{keyName:v="",id:j="",type:y}=E;y==="ecanRangePicker"?S.push({value:`${j}-startTime`,label:`${v||j}-开始时间值`,keyName:`${v||j}-startTime`},{value:`${j}-endTime`,label:`${v||j}-结束时间值`,keyName:`${v||j}-endTime`}):S.push({value:j,label:`${v||j}`,keyName:`${v||j}`})}),S}),k=()=>{var b,T,D;const S=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),I=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],E=Je(Z.cloneDeep(I[t.index].conditions));I[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(I[t.index].truncations=e.unref(u));const v=Je(e.unref(p));for(const M of v)if(M.dataType==="component"&&M.fieldValue){const G=e.unref(_).find(K=>K.value===M.fieldValue);G&&(M.fieldValue=G.keyName)}const j=E.filter(M=>!v.find(G=>G.componentId===M.componentId)).filter(M=>!S.find(G=>G.id===M.componentId)),y=v.filter(M=>!E.find(G=>G.componentId===M.componentId));x(j,y),i({[t.type]:I,sqlConditions:ra({...e.unref(r),[t.type]:I},e.unref(s))})};function x(S,I){var v;const E=S.map(j=>({...j,delete:!0})).concat(I.map(j=>({...j,add:!0})));for(const j of E){const y=e.unref(s).find(b=>b.id===j.componentId);if(y){const{type:b,id:T,events:D=[]}=y,M=Qt(b);if(j.add)D.find(G=>{var K;return G.on===M&&G.target===((K=e.unref(l))==null?void 0:K.id)&&G.emit==="refreshData"})||c({id:T,events:[...D,{on:M,target:(v=e.unref(l))==null?void 0:v.id,emit:"refreshData"}].reverse()});else if(j.delete){const G=D.findIndex(K=>{var Q;return K.on===M&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});G!==-1&&(D.splice(G,1),c({id:T,events:D}))}}}}const h=()=>{m.value=!0},A=()=>{p.value=[],m.value=!1},L=()=>{w&&k(),w=!1,A()},O=()=>{A()},N=e.inject(Me),V=e.unref(e.inject(ve)),B=(P=window==null?void 0:window.config)==null?void 0:P.pageId,F=e.ref([]);e.provide(gn,F);const H=async S=>{var I;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:E,indexCode:v}=S,j=await N.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:B,dataSourceId:e.unref(d),indexGuid:E,indexCode:v},{headers:{Authentication:V,operateContext:"ygt"}}),{success:y,data:b=[]}=j.data;y&&((I=b==null?void 0:b.dataViewColumns)!=null&&I.length)&&(F.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(E){console.error(E)}};return e.watch(()=>t.item,S=>{S&&m.value&&H(S)}),o({showModal:h}),{visible:m,onOk:L,onCancel:O,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:C,activeKey:n}}}),Pf="",Vs={class:"header"},Bs={class:"header"};function Os(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=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]=m=>t.activeKey=m)},{default:e.withCtx(()=>[e.createVNode(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=m=>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(l,{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",Bs,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[6]||(o[6]=m=>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 Is=oe(Ls,[["render",Os],["__scopeId","data-v-498bb1e7"]]),Fs=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:$.Input,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.ref(),s=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),jf="",Ds=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),$s={class:"config-name"},Ms=Ds(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function vs(t,o,n,a,r,i){const s=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,[Ms,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Ps=oe(Fs,[["render",vs],["__scopeId","data-v-de6a1755"]]),js=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(zt),l=e.ref(),c=e.computed(()=>{var _;return(_=e.unref(i))==null?void 0:_.filter(k=>k.keyName!=="")});let p=[];const u=_=>{const{sortCpnts:k=[]}=_;p=Z.cloneDeep(k),l.value=Z.cloneDeep(k),n.value=!0},m=()=>{n.value=!1},g=()=>{var A,L;const _=Je(((A=e.unref(a))==null?void 0:A.controlList)||[]),k=p.filter(O=>!e.unref(l).includes(O)).filter(O=>!_.find(N=>N.id===O)),x=e.unref(l).filter(O=>!p.includes(O)).filter(O=>!_.find(N=>N.id===O)),h=k.map(O=>({componentId:O,delete:!0})).concat(x.map(O=>({componentId:O,add:!0})));for(const O of h){const N=e.unref(i).find(V=>V.id===O.componentId);if(N){const{type:V,id:B,events:F=[]}=N,H=Qt(V);if(O.add)F.find(P=>{var S;return P.on===H&&P.target===((S=e.unref(s))==null?void 0:S.id)&&P.emit==="refreshData"})||d({id:B,events:[...F,{on:H,target:(L=e.unref(s))==null?void 0:L.id,emit:"refreshData"}].reverse()});else if(O.delete){const P=F.findIndex(S=>{var I;return S.on===H&&S.target===((I=e.unref(s))==null?void 0:I.id)&&S.emit==="refreshData"});P!==-1&&(F.splice(P,1),d({id:B,events:F}))}}}},w=()=>{var k;g();const _=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];_[t.index].sortCpnts=l.value,r({[t.type]:_}),m()},f=()=>{m()},C=(_,k)=>{var x;return(x=k==null?void 0:k.keyName)==null?void 0:x.toLowerCase().includes(_==null?void 0:_.toLowerCase())};return o({showModal:u}),{visible:n,onOk:w,onCancel:f,idFilterOption:C,fieldName:l,usedComponentList:c}}}),Rf="",Rs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),Us={class:"sort-by-cpnt"},Gs=Rs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function zs(t,o,n,a,r,i){const s=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",Us,[Gs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),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 Hs=oe(js,[["render",zs],["__scopeId","data-v-08af1ef8"]]),Ys=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(fe),r=e.inject(xe),i=e.ref(),s=e.ref([]),d=(m,g)=>{const{dimByCount:w=""}=m;i.value=w,s.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var w;return(w=g==null?void 0:g.label)==null?void 0:w.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),Uf="",Ws=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),qs={class:"dim-by-count"},Ks=Ws(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Qs(t,o,n,a,r,i){const s=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",qs,[Ks,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Xs=oe(Ys,[["render",Qs],["__scopeId","data-v-e8608437"]]),qo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:qo(t,r.children)&&(n=qo(t,r.children)))}return n},Js=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:$.Row,ACol:$.Col,ATextarea:$.Textarea,APopover:$.Popover,AInputSearch:$.InputSearch,ATree:$.Tree,ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Me),a=e.unref(e.inject(ve)),r=e.inject(fe),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const V=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(V==null?void 0:V.filter(B=>{var F;return B.id!==((F=t.item)==null?void 0:F.id)}))||[]:V||[]}),u=e.computed(()=>s.value.filter(V=>!V.randomKey)),m=e.computed({get:()=>t.value||"",set:V=>{o("update:value",V),o("change",V)}}),g=e.ref("1"),w=e.ref(""),f=V=>{const B=document.getElementById("calTextArea");let F=m.value;if(document.selection){const H=document.selection.createRange();H.text=V}else if(typeof B.selectionStart=="number"&&typeof B.selectionEnd=="number"){const H=B.selectionStart,P=B.selectionEnd;let S=H;F=F.substring(0,H)+V+F.substring(P,F.length),S+=V.length,B.selectionStart=B.selectionEnd=S}else F+=V;m.value=F},C=["+","-","*","/","(",")"],_=(V,B)=>{let F="";switch(B){case"name":{F="${"+V+"}";break}case"function":{F=V+"()";break}default:F=V}f(F)},k=[],x=e.ref([]),h=e.ref(!0),A=e.ref([]),L=V=>{var B;for(const F of V)(B=F==null?void 0:F.children)!=null&&B.length?L(F.children):k.push({key:F.key,title:F.title})},O=async()=>{try{const V=await n.get(`${Ve}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:B,data:F=[]}=V.data;B&&(F!=null&&F.length)&&(L(F),A.value=F)}catch(V){console.error(V)}},N=V=>{x.value=V,h.value=!1};return e.watch(w,V=>{const B=k.map(F=>F.title.indexOf(V)>-1?qo(F.key,A.value):null).filter((F,H,P)=>F&&P.indexOf(F)===H);x.value=B,w.value=V,h.value=!0}),e.onMounted(()=>{O()}),{fieldList:p,varList:u,myValue:m,calculMethods:C,funcDescsData:A,searchFuncValue:w,expandedKeys:x,autoExpandParent:h,activeKey:g,selectedElem:_,onExpand:N}}}),Gf="",zf="",Zs={class:"formula-calculation"},ec={class:"field-area"},tc={style:{"text-align":"center",padding:"10px 0"}},oc=["onClick"],nc=["onClick"],ac={class:"cal_right_bottom"},rc={class:"cal_fu"},lc=["onClick"],ic={class:"function-wrap"},sc={class:"wrap-search"},cc={class:"tree-box"},dc={key:0},pc={style:{color:"#f50"}},uc={key:1},fc=["onClick"],mc={class:"cal_a"};function hc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),w=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Zs,[e.createVNode(w,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:_=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,oc))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:C,onClick:_=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,nc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",ac,[e.createElementVNode("ul",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,C)=>(e.openBlock(),e.createElementBlock("li",{onClick:_=>t.selectedElem(f,"symbol"),key:C},e.toDisplayString(f),9,lc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createElementVNode("div",sc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",cc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:C})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",dc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",pc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",uc,e.toDisplayString(f),1)),C?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:_=>t.selectedElem(f,"function")},"插入",8,fc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const yc=oe(Js,[["render",hc],["__scopeId","data-v-ba051d9b"]]),gc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:yc,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:ti},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(Pe),a=e.inject(fe),r=e.inject(xe),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let S=[];for(const I of P)Object.prototype.hasOwnProperty.call(e.unref(a),I)&&(S=S.concat(e.unref(a)[I]));return S}),l={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"},m=e.ref({}),g=e.ref(),w=e.ref(!1),f=e.ref();e.watch(w,P=>{if(P)if(t.mode==="edit"){const{label:S,calcType:I,formula:E,builtInValueSource:v,builtInFormula:j,builtInCalcWay:y}=t.item;if(f.value={label:S,calcType:I,formula:E,builtInValueSource:v,builtInFormula:j,builtInCalcWay:y},j==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u));else f.value=Z.cloneDeep(p),m.value=Z.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let C=!1;const _=()=>{C=!0},k=P=>{const S=e.unref(i).find(I=>I.id===P);S&&(f.value.builtInCalcWay=S.keyName),C=!0},x=()=>{var v;const P=((v=e.unref(a)[t.type])==null?void 0:v.slice())||[],{label:S,builtInFormula:I}=e.unref(f)||{},E={};if(I==="DATE_OFFSET"&&(E.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const j=ke();P.push({...e.unref(f),...E,id:j,show:!0,name:S})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(f),...E,name:S});r({[t.type]:P})},h=()=>{w.value=!0},A=()=>{w.value=!1},L=async(P,S)=>{if(S==="")return Promise.reject(new Error("请输入指标名"));{const I=e.unref(d).find(E=>E.label===S);return I?I.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},O=e.computed(()=>{let P={label:[{required:!0,validator:L,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),N=()=>{g.value.validate().then(()=>{C&&x(),C=!1,A()})},V=()=>{g.value.clearValidate(),A()},B=()=>{C=!0,e.unref(f).builtInCalcWay=""},F=e.computed(()=>{let P="";const S=e.unref(f).builtInCalcWay,I=e.unref(f).builtInValueSource;if(!I||!S)return P;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{S==="ASC"?P="【"+I+"】由小到大在所有值中的排名":P="【"+I+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
60
- `,S==="ASC"?P=P+"【"+I+"】由小到大的组内的排名":P=P+"【"+I+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let E="";switch(S){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}P="将所有【"+I+"】"+E;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let E="";switch(P=`所有【】的
61
- `,S){case"SUM":{E="求和";break}case"AVG":{E="求平均值";break}case"MIN":{E="求最小值";break}case"MAX":{E="求最大值";break}}P=P+"将所有【"+I+"】"+E;break}}return P}),H=(P,S)=>S.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return o({showModal:h}),{visible:w,onCancel:V,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:N,onChange:_,formRules:O,accessLogic:F,formRef:g,onChangeBuiltInFormula:B,componentList:i,onChangeComponent:k,filterOption:H,offsetConfig:m}}}),Hf="",Yf="",bc={key:0,class:"accesstip"},Cc={style:{display:"flex","align-items":"center"}};function wc(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),w=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),C=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(C,{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(f,{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(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=_=>t.formState.label=_),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]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{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]=_=>t.formState.formula=_),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]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{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]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:_.label,disabled:t.mode==="edit"&&t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.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]=_=>t.formState.builtInCalcWay=_),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(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{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",bc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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]=_=>t.formState.builtInValueSource=_),"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",Cc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=_=>t.offsetConfig.value=_),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]=_=>t.offsetConfig.unit=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{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]=_=>t.offsetConfig.around=_),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(w,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","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 kc=oe(gc,[["render",wc],["__scopeId","data-v-33575cd9"]]),_c=e.defineComponent({name:"DataConfigCard",directives:{focus:na},components:{CalculationModal:kc,FilterModal:Is,CustomGroupModal:ji,SettingOutlined:ci,DeleteOutlined:Sl,CopyOutlined:wl,InfoCircleOutlined:$l,CustomSortModal:Ti,PlusOutlined:Xl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:Tt,ConfigName:Ps,SortByCpnt:Hs,DimByCount:Xs},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(fe),a=e.inject(xe),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(R={})=>{var q;const{type:U}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(R.scope)?i.includes(U)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(R.scope)&&s.includes(U)&&(W=!0),U==="dimensionList"){const ie=((q=e.unref(n)[U])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(R="{}")=>{var U,W;try{const q=JSON.parse(R);if(!c(q))return;const ie=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&ie.forEach(te=>{te.show=!1}),g(ie,q),q.randomKey=ke(),ie.push(q);let ae=[];if(["IDX","BUILT_IN_IDX"].includes(q.scope)){const te=sessionStorage.getItem("indicator-variates");if(te){const le=JSON.parse(te);if(le!=null&&le.length){ae=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const pe of le)ae.unshift({...pe,dataType:"",id:null,dateTypeValue:null,format:pe.valueFormat&&pe.valueFormat.toUpperCase()||null,variableName:pe.name,variableType:pe.valueType,label:q.label,randomKey:q.randomKey,keyValue:ke()})}}}a({[t.type]:ie,variableList:ae,variableConditions:Bt(ae,r)}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(R="{}")=>{var U;try{const{cardItem:W,type:q,index:ie}=JSON.parse(R);if(!c(W)||q===t.type)return;const ae=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];g(ae,W),ae.push(W);const te=e.unref(n)[q].slice()||[];te.splice(ie,1),a({[t.type]:ae,[q]:te})}catch(W){console.error(W)}};function g(R,U){const W=[];if(R.forEach(q=>{q.label.includes(U.label)&&W.push(q.label.split(U.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){U.label=U.label+q;break}}}const w=(R,U)=>{var ie,ae;const W=(ie=R.target)==null?void 0:ie.checked,q=((ae=e.unref(n)[t.type])==null?void 0:ae.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!ge(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(te=>{te.show=!1}),q[U].show=W,a({[t.type]:q})},f=R=>{var W;const U=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];U.splice(R,1),a({[t.type]:U})},C=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const R=sessionStorage.getItem("indicator-list-item"),U=sessionStorage.getItem("indicator-card-item");R?u(R):U&&m(U)},k=R=>{var le,pe;const{newIndex:U,oldIndex:W,from:q,to:ie}=R,ae=q.id,te=ie.id;if(U>=0&&W>=0){if(ae===te){const be=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=be.splice(W,1)[0];He&&(be.splice(U,0,He),a({[t.type]:be}))}else if(t.type===te){const be=((pe=e.unref(n)[te])==null?void 0:pe.slice())||[];if(be!=null&&be.length){const He=be.splice(be.length-1,1)[0];He&&(be.splice(U,0,He),a({[t.type]:be}))}}}},x=(R,U)=>{const W=R.oldIndex,q=U[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(n)[t.type]||[]),A=e.ref([]);let L=!1;e.watch(()=>e.unref(h).length,R=>{A.value=new Array(R).fill(!1)},{flush:"post",immediate:!0});const O=R=>{var W,q,ie;const U=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=U[R])!=null&&q.randomKey){const ae=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let te=ae.length-1;te>=0;te--)ae[te].randomKey===U[R].randomKey&&ae.splice(te,1);a({variableConditions:Bt(ae,r),variableList:ae})}U.splice(R,1),a({[t.type]:U})},N=R=>{A.value[R]=!0},V=()=>{L=!0},B=(R,U,W)=>{var q,ie,ae,te;if(A.value[U]=!1,L){const le=(q=R.target)==null?void 0:q.value,pe=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],be=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.formula)==null?void 0:Ce.includes(W)}).map(ue=>ue.id),He=pe.filter(ue=>{var Ce;return(Ce=ue==null?void 0:ue.builtInValueSource)==null?void 0:Ce.includes(W)}).map(ue=>ue.id);if(be!=null&&be.length)for(const ue of be){const Ce=pe.find(mt=>mt.id===ue);Ce.formula=Ce.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const ue of He){const Ce=pe.find(mt=>mt.id===ue);Ce.builtInValueSource=Ce.builtInValueSource.replaceAll(W,le)}if(pe[U].label=le,(ae=pe[U])!=null&&ae.randomKey){const ue=((te=e.unref(n))==null?void 0:te.variableList)||[],Ce=ue.filter(mt=>mt.randomKey===pe[U].randomKey);Ce!=null&&Ce.length&&Ce.forEach(mt=>{mt.label=le}),a({variableConditions:Bt(ue,r),variableList:ue})}a({[t.type]:pe})}L=!1},F="DEFAULT",H=e.computed(()=>{const R=[],{scope:U,label:W}=e.unref(l);let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(U)&&(q=q.filter(le=>le.label===W)),U==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=Z.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,R.push(le)}const{leftAxisList:ie=[],rightAxisList:ae=[],indicators:te=[]}=e.unref(n)||{};return[{id:F,label:"默认",name:"默认"},...q,...R,...ie,...ae,...te]}),P=(R={},U,W="ASC")=>{var pe;const{label:q,name:ie,id:ae,defaultCode:te}=R,le=((pe=e.unref(n)[t.type])==null?void 0:pe.slice())||[];ae===F?delete le[U].sort:le[U].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:te},a({[t.type]:le})},S=(R={},U="ASC")=>{const q={ASC:"升序",DESC:"降序"}[U],{sort:ie}=R,{label:ae,order:te}=ie||{};return ae&&te===U?`${q}(${ae})`:q},I=e.ref(),E=e.ref(),v=e.ref(),j=e.ref(),y=(R={},U)=>{var W;I.value=R,E.value=U,(W=e.unref(v))==null||W.showModal()},b=R=>{var U;return"自定义排序"+(((U=R==null?void 0:R.sort)==null?void 0:U.type)==="CUSTOM"?"(已配置)":"")},T=(R={},U)=>{var W;I.value=R,E.value=U,(W=e.unref(j))==null||W.showModal()},D=R=>"自定义分组"+((R==null?void 0:R.customGroup)!=null?"(已配置)":""),M=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],G=[{name:"是",value:1},{name:"否",value:0}],K=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].aggregate=R,a({[t.type]:W})},Q=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].distinct=R,a({[t.type]:W})},ee=(R,U)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[U].dateFormat=R,a({[t.type]:W})},re=(R="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[R]})`,he=R=>`是否去重(${{0:"否",1:"是"}[R]||"否"})`,me=(R={})=>{var U;return"过滤"+(R!=null&&R.conditions&&((U=R==null?void 0:R.conditions)==null?void 0:U.length)>0?"(已配置)":"")},Ee=e.ref(),de=e.ref(),$e=e.ref(),et=e.ref(),mo=(R={},U)=>{I.value=R,E.value=U,e.unref(Ee).showModal()},st=(R={},U)=>{I.value=R,E.value=U,e.unref(de).showModal(R)},ct=(R={},U)=>{I.value=R,E.value=U,e.unref($e).showModal(R)},At=(R={},U)=>{I.value=R,E.value=U,e.unref(et).showModal(R,e.unref(Y))},dt=e.ref(),Le=e.ref("add"),Qe=(R,U,W)=>{var q;Le.value=R,R==="edit"&&(I.value=U,E.value=W),(q=e.unref(dt))==null||q.showModal()},tt=e.inject(Me),ot=e.unref(e.inject(ve)),ze=e.ref([]),pt=e.computed(()=>e.unref(n)[t.type]||{}),ut=async()=>{try{const R=await tt.post(`${Ve}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:U,data:W=[]}=R.data;U&&(ze.value=W)}catch(R){console.error(R)}},ft=(R,U)=>{const W=e.unref(n)[t.type]||{};W[U]=R,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],z=e.ref({}),Y=e.ref([]),X=async(R,U)=>{var q;const{name:W}=U;if(!nt.includes(t.type)&&R&&gt(U,"indexCode")){const ie=await tt.post(`${Ve}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:U.id,indexCode:U.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:ae,data:te}=ie.data;ae&&te&&(Y.value=(te==null?void 0:te.dataViewColumns)||[],z.value[W]={name:te.name,code:te.indexCode})}},ne=R=>{l.value=R},J=R=>{const U=document.createElement("input");document.body.appendChild(U),U.setAttribute("value",R),U.select(),document.execCommand("copy"),document.body.removeChild(U),$.message.success("复制成功")},ce=e.inject(Ye),_e=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),at=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ut())}),{onCheckboxChange:w,onDropEnd:f,onDragItemEnd:C,onDragItemAdd:_,onDragItemSort:k,onDragItemStart:x,cardItemList:h,onDelete:O,onEdit:N,onCommitLabelChange:B,sortList:H,onSort:P,handleSortTitle:S,showCustomSortModal:y,customSortModalRef:v,currentItem:I,currentIndex:E,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:j,showCustomGroupModal:T,editLabelList:A,onLabelChange:V,aggregateList:M,distinctList:G,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:re,handleDistinctTitle:he,onShowCalculationModal:Qe,handleFilterTitle:me,filterModalRef:Ee,configNameRef:de,sortByCpntRef:$e,dimByCountRef:et,showFilterModal:mo,calculationModalRef:dt,calculationModalMode:Le,formatList:o,fieldOptions:ze,fieldData:pt,onFieldChange:ft,onVisibleChange:X,onClickSetting:ne,copyDataViewName:J,dataViewMap:z,isShowConfigName:_e,showConfigNameModal:st,dimensionType:nt,isShowSortByCpnt:at,showSortByCpntModal:ct,dataSelectIndicators:p,showDimByCountModal:At}}}),Wf="",qf="",bt=t=>(e.pushScopeId("data-v-c2ca0016"),t=t(),e.popScopeId(),t),xc={class:"title"},Sc={class:"title-text"},Nc={class:"field-wrap"},Ac={class:"field-item"},Tc=bt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ec={class:"field-item"},Lc=bt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Vc={class:"title"},Bc={class:"title-text"},Oc=bt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Ic=bt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Fc={class:"card-item-wrap"},Dc={class:"card-item-inner"},$c=["onClick"],Mc=["onClick"],vc=["onClick"],Pc={style:{display:"flex","align-items":"center"}},jc=["title"],Rc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Uc={style:{display:"flex","align-items":"center"}},Gc=["title"],zc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Hc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),l=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),w=e.resolveComponent("a-sub-menu"),f=e.resolveComponent("a-menu-divider"),C=e.resolveComponent("copy-outlined"),_=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),x=e.resolveComponent("delete-outlined"),h=e.resolveComponent("a-checkbox"),A=e.resolveComponent("draggable"),L=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),N=e.resolveComponent("filter-modal"),V=e.resolveComponent("config-name"),B=e.resolveComponent("sort-by-cpnt"),F=e.resolveComponent("dim-by-count"),H=e.resolveComponent("calculation-modal"),P=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",xc,[e.createElementVNode("div",Sc,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Nc,[e.createElementVNode("div",Ac,[Tc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ec,[Lc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=S=>t.onFieldChange(S,"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",Vc,[e.createElementVNode("div",Bc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Oc]),default:e.withCtx(()=>[e.createVNode(l,{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(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Ic])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(A,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=S=>t.cardItemList=S),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]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:I})=>[e.createElementVNode("div",Fc,[e.createVNode(h,{class:"card-item",checked:S.show,onChange:E=>t.onCheckboxChange(E,I)},{default:e.withCtx(()=>[e.createElementVNode("div",Dc,[!t.editLabelList[I]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(E=>t.onEdit(I),["prevent","stop"])},e.toDisplayString(S.label),9,$c)):e.createCommentVNode("",!0),!t.editLabelList[I]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(E=>t.onEdit(I),["prevent","stop"])}," 请点击填入名字 ",8,Mc)):e.createCommentVNode("",!0),t.editLabelList[I]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":S.label,size:"small",onBlur:E=>t.onCommitLabelChange(E,I,S.label),onPressEnter:E=>t.onCommitLabelChange(E,I,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(E=>t.onShowCalculationModal("edit",S,I),["prevent","stop"])}," fx ",8,vc)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:E=>t.onVisibleChange(E,S)},{overlay:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:t.handleSortTitle(S,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.id,onClick:v=>t.onSort(E,I,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(w,{title:t.handleSortTitle(S,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,E=>(e.openBlock(),e.createBlock(g,{class:"menu-item",style:{"white-space":"nowrap"},key:E.id,onClick:v=>t.onSort(E,I,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g,{onClick:E=>t.showCustomSortModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(g,{onClick:E=>t.showCustomGroupModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),S.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onDateFormatChange(E.value,I)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===E.value||!S.dateFormat&&E.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(E.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(f)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:E=>t.showFilterModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(f),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(w,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onAggregateChange(E.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(g,{onClick:E=>t.showConfigNameModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(g,{onClick:E=>t.showSortByCpntModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),S.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:E=>t.showDimByCountModal(S,I)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(f),e.createVNode(w,{title:t.handleDistinctTitle(S.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,E=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:E.value,onClick:v=>t.onDistinctChange(E.value,I)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(f)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:E=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Pc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[Rc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,jc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:E=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Uc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[zc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,Gc),e.createVNode(C,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon",onClick:E=>t.onClickSetting(S)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(x,{class:"delete-icon",onClick:e.withModifiers(E=>t.onDelete(I),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(O,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(N,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(V,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(B,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(F,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(H,{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 Yc=oe(_c,[["render",Hc],["__scopeId","data-v-c2ca0016"]]),Wc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},qc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:Yc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(xe),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var C,_;const l=Z.cloneDeep((C=e.unref(t))==null?void 0:C.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 m=e.unref(o);if(m.startsWith(u)){const k=u.length;m=((_=m.slice(k,k+1))==null?void 0:_.toLowerCase())+m.slice(k+1)}const g=p[m],w=Wc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const x=g[k];if(!x)break;r.push({...w[x],type:x})}for(const k of c)s(l,k)&&!g.find(x=>x===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Kf="",Qf="",Kc={class:"data-group"};function Qc(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Kc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Xc=oe(qc,[["render",Qc],["__scopeId","data-v-64cc2643"]]),Jc=[{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"]}],Zc={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"}},ed=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:$.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function td(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const od=oe(ed,[["render",td]]),nd=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:$.InputNumber,ASelect:$.Select,ASelectOption:$.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")),i=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?o("change",u):o("change",`${u}${m}`)},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:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function ad(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{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(s,{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(s,{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 ca=oe(nd,[["render",ad]]),rd=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:$.RadioGroup,ARadioButton:$.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function ld(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const id=oe(rd,[["render",ld]]),sd=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function cd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const dd=oe(sd,[["render",cd]]),pd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:$.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function ud(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const fd=oe(pd,[["render",ud]]);var Se="top",Oe="bottom",Ie="right",Ne="left",Ko="auto",Ot=[Se,Oe,Ie,Ne],Ct="start",It="end",md="clippingParents",da="viewport",Ft="popper",hd="reference",pa=Ot.reduce(function(t,o){return t.concat([o+"-"+Ct,o+"-"+It])},[]),ua=[].concat(Ot,[Ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ct,o+"-"+It])},[]),yd="beforeRead",gd="read",bd="afterRead",Cd="beforeMain",wd="main",kd="afterMain",_d="beforeWrite",xd="write",Sd="afterWrite",Nd=[yd,gd,bd,Cd,wd,kd,_d,xd,Sd];function Re(t){return t?(t.nodeName||"").toLowerCase():null}function Te(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function rt(t){var o=Te(t).Element;return t instanceof o||t instanceof Element}function Fe(t){var o=Te(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Qo(t){if(typeof ShadowRoot>"u")return!1;var o=Te(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ad(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!Fe(i)||!Re(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Td(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],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!Fe(r)||!Re(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Ed={name:"applyStyles",enabled:!0,phase:"write",fn:Ad,effect:Td,requires:["computeStyles"]};function Ue(t){return t.split("-")[0]}var lt=Math.max,Xt=Math.min,wt=Math.round;function Xo(){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 fa(){return!/^((?!chrome|android).)*safari/i.test(Xo())}function kt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&Fe(t)&&(r=t.offsetWidth>0&&wt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&wt(a.height)/t.offsetHeight||1);var s=rt(t)?Te(t):window,d=s.visualViewport,l=!fa()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:c+u,bottom:p+m,left:c,x:c,y:p}}function Jo(t){var o=kt(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 ma(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Qo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Te(t).getComputedStyle(t)}function Ld(t){return["table","td","th"].indexOf(Re(t))>=0}function Ze(t){return((rt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Re(t)==="html"?t:t.assignedSlot||t.parentNode||(Qo(t)?t.host:null)||Ze(t)}function ha(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function Vd(t){var o=/firefox/i.test(Xo()),n=/Trident/i.test(Xo());if(n&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Qo(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Re(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Dt(t){for(var o=Te(t),n=ha(t);n&&Ld(n)&&qe(n).position==="static";)n=ha(n);return n&&(Re(n)==="html"||Re(n)==="body"&&qe(n).position==="static")?o:n||Vd(t)||o}function Zo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $t(t,o,n){return lt(t,Xt(o,n))}function Bd(t,o,n){var a=$t(t,o,n);return a>n?n:a}function ya(){return{top:0,right:0,bottom:0,left:0}}function ga(t){return Object.assign({},ya(),t)}function ba(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Od=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,ga(typeof o!="number"?o:ba(o,Ot))};function Id(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ue(n.placement),l=Zo(d),c=[Ne,Ie].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Od(r.padding,n),m=Jo(i),g=l==="y"?Se:Ne,w=l==="y"?Oe:Ie,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],C=s[l]-n.rects.reference[l],_=Dt(i),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,x=f/2-C/2,h=u[g],A=k-m[p]-u[w],L=k/2-m[p]/2+x,O=$t(h,L,A),N=l;n.modifiersData[a]=(o={},o[N]=O,o.centerOffset=O-L,o)}}function Fd(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)||ma(o.elements.popper,r)&&(o.elements.arrow=r))}const Dd={name:"arrow",enabled:!0,phase:"main",fn:Id,effect:Fd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _t(t){return t.split("-")[1]}var $d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Md(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:wt(n*r)/r||0,y:wt(a*r)/r||0}}function Ca(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=s.x,g=m===void 0?0:m,w=s.y,f=w===void 0?0:w,C=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=C.x,f=C.y;var _=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),x=Ne,h=Se,A=window;if(c){var L=Dt(n),O="clientHeight",N="clientWidth";if(L===Te(n)&&(L=Ze(n),qe(L).position!=="static"&&d==="absolute"&&(O="scrollHeight",N="scrollWidth")),L=L,r===Se||(r===Ne||r===Ie)&&i===It){h=Oe;var V=u&&L===A&&A.visualViewport?A.visualViewport.height:L[O];f-=V-a.height,f*=l?1:-1}if(r===Ne||(r===Se||r===Oe)&&i===It){x=Ie;var B=u&&L===A&&A.visualViewport?A.visualViewport.width:L[N];g-=B-a.width,g*=l?1:-1}}var F=Object.assign({position:d},c&&$d),H=p===!0?Md({x:g,y:f},Te(n)):{x:g,y:f};if(g=H.x,f=H.y,l){var P;return Object.assign({},F,(P={},P[h]=k?"0":"",P[x]=_?"0":"",P.transform=(A.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",P))}return Object.assign({},F,(o={},o[h]=k?f+"px":"",o[x]=_?g+"px":"",o.transform="",o))}function vd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ue(o.placement),variation:_t(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:s,roundOffsets:l})))),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:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Pd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vd,data:{}};var Zt={passive:!0};function jd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Te(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Rd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jd,data:{}};var Ud={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return Ud[o]})}var Gd={start:"end",end:"start"};function wa(t){return t.replace(/start|end/g,function(o){return Gd[o]})}function en(t){var o=Te(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function tn(t){return kt(Ze(t)).left+en(t).scrollLeft}function zd(t,o){var n=Te(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=fa();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+tn(t),y:l}}function Hd(t){var o,n=Ze(t),a=en(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=lt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=lt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+tn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=lt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function on(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ka(t){return["html","body","#document"].indexOf(Re(t))>=0?t.ownerDocument.body:Fe(t)&&on(t)?t:ka(Jt(t))}function Mt(t,o){var n;o===void 0&&(o=[]);var a=ka(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Te(a),s=r?[i].concat(i.visualViewport||[],on(a)?a:[]):a,d=o.concat(s);return r?d:d.concat(Mt(Jt(s)))}function nn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Yd(t,o){var n=kt(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 _a(t,o,n){return o===da?nn(zd(t,n)):rt(o)?Yd(o,n):nn(Hd(Ze(t)))}function Wd(t){var o=Mt(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Fe(t)?Dt(t):t;return rt(a)?o.filter(function(r){return rt(r)&&ma(r,a)&&Re(r)!=="body"}):[]}function qd(t,o,n,a){var r=o==="clippingParents"?Wd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=_a(t,c,a);return l.top=lt(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=lt(p.left,l.left),l},_a(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function xa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ue(a):null,i=a?_t(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Se:l={x:s,y:o.y-n.height};break;case Oe:l={x:s,y:o.y+o.height};break;case Ie:l={x:o.x+o.width,y:d};break;case Ne:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Zo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case Ct:l[c]=l[c]-(o[p]/2-n[p]/2);break;case It:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function vt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?md:d,c=n.rootBoundary,p=c===void 0?da:c,u=n.elementContext,m=u===void 0?Ft:u,g=n.altBoundary,w=g===void 0?!1:g,f=n.padding,C=f===void 0?0:f,_=ga(typeof C!="number"?C:ba(C,Ot)),k=m===Ft?hd:Ft,x=t.rects.popper,h=t.elements[w?k:m],A=qd(rt(h)?h:h.contextElement||Ze(t.elements.popper),l,p,s),L=kt(t.elements.reference),O=xa({reference:L,element:x,strategy:"absolute",placement:r}),N=nn(Object.assign({},x,O)),V=m===Ft?N:L,B={top:A.top-V.top+_.top,bottom:V.bottom-A.bottom+_.bottom,left:A.left-V.left+_.left,right:V.right-A.right+_.right},F=t.modifiersData.offset;if(m===Ft&&F){var H=F[r];Object.keys(B).forEach(function(P){var S=[Ie,Oe].indexOf(P)>=0?1:-1,I=[Se,Oe].indexOf(P)>=0?"y":"x";B[P]+=H[I]*S})}return B}function Kd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ua:l,p=_t(a),u=p?d?pa:pa.filter(function(w){return _t(w)===p}):Ot,m=u.filter(function(w){return c.indexOf(w)>=0});m.length===0&&(m=u);var g=m.reduce(function(w,f){return w[f]=vt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ue(f)],w},{});return Object.keys(g).sort(function(w,f){return g[w]-g[f]})}function Qd(t){if(Ue(t)===Ko)return[];var o=eo(t);return[wa(t),o,wa(o)]}function Xd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,w=g===void 0?!0:g,f=n.allowedAutoPlacements,C=o.options.placement,_=Ue(C),k=_===C,x=l||(k||!w?[eo(C)]:Qd(C)),h=[C].concat(x).reduce(function(G,K){return G.concat(Ue(K)===Ko?Kd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:w,allowedAutoPlacements:f}):K)},[]),A=o.rects.reference,L=o.rects.popper,O=new Map,N=!0,V=h[0],B=0;B<h.length;B++){var F=h[B],H=Ue(F),P=_t(F)===Ct,S=[Se,Oe].indexOf(H)>=0,I=S?"width":"height",E=vt(o,{placement:F,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),v=S?P?Ie:Ne:P?Oe:Se;A[I]>L[I]&&(v=eo(v));var j=eo(v),y=[];if(i&&y.push(E[H]<=0),d&&y.push(E[v]<=0,E[j]<=0),y.every(function(G){return G})){V=F,N=!1;break}O.set(F,y)}if(N)for(var b=w?3:1,T=function(K){var Q=h.find(function(ee){var re=O.get(ee);if(re)return re.slice(0,K).every(function(he){return he})});if(Q)return V=Q,"break"},D=b;D>0;D--){var M=T(D);if(M==="break")break}o.placement!==V&&(o.modifiersData[a]._skip=!0,o.placement=V,o.reset=!0)}}const Jd={name:"flip",enabled:!0,phase:"main",fn:Xd,requiresIfExists:["offset"],data:{_skip:!1}};function Sa(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 Na(t){return[Se,Ie,Oe,Ne].some(function(o){return t[o]>=0})}function Zd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=vt(o,{elementContext:"reference"}),d=vt(o,{altBoundary:!0}),l=Sa(s,a),c=Sa(d,r,i),p=Na(l),u=Na(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const ep={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zd};function tp(t,o,n){var a=Ue(t),r=[Ne,Se].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[Ne,Ie].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function op(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=ua.reduce(function(p,u){return p[u]=tp(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const np={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:op};function ap(t){var o=t.state,n=t.name;o.modifiersData[n]=xa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const rp={name:"popperOffsets",enabled:!0,phase:"read",fn:ap,data:{}};function lp(t){return t==="x"?"y":"x"}function ip(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,m=n.tether,g=m===void 0?!0:m,w=n.tetherOffset,f=w===void 0?0:w,C=vt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),_=Ue(o.placement),k=_t(o.placement),x=!k,h=Zo(_),A=lp(h),L=o.modifiersData.popperOffsets,O=o.rects.reference,N=o.rects.popper,V=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,B=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),F=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,H={x:0,y:0};if(L){if(i){var P,S=h==="y"?Se:Ne,I=h==="y"?Oe:Ie,E=h==="y"?"height":"width",v=L[h],j=v+C[S],y=v-C[I],b=g?-N[E]/2:0,T=k===Ct?O[E]:N[E],D=k===Ct?-N[E]:-O[E],M=o.elements.arrow,G=g&&M?Jo(M):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ya(),Q=K[S],ee=K[I],re=$t(0,O[E],G[E]),he=x?O[E]/2-b-re-Q-B.mainAxis:T-re-Q-B.mainAxis,me=x?-O[E]/2+b+re+ee+B.mainAxis:D+re+ee+B.mainAxis,Ee=o.elements.arrow&&Dt(o.elements.arrow),de=Ee?h==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,$e=(P=F==null?void 0:F[h])!=null?P:0,et=v+he-$e-de,mo=v+me-$e,st=$t(g?Xt(j,et):j,v,g?lt(y,mo):y);L[h]=st,H[h]=st-v}if(d){var ct,At=h==="x"?Se:Ne,dt=h==="x"?Oe:Ie,Le=L[A],Qe=A==="y"?"height":"width",tt=Le+C[At],ot=Le-C[dt],ze=[Se,Ne].indexOf(_)!==-1,pt=(ct=F==null?void 0:F[A])!=null?ct:0,ut=ze?tt:Le-O[Qe]-N[Qe]-pt+B.altAxis,ft=ze?Le+O[Qe]+N[Qe]-pt-B.altAxis:ot,nt=g&&ze?Bd(ut,Le,ft):$t(g?ut:tt,Le,g?ft:ot);L[A]=nt,H[A]=nt-Le}o.modifiersData[a]=H}}const sp={name:"preventOverflow",enabled:!0,phase:"main",fn:ip,requiresIfExists:["offset"]};function cp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function dp(t){return t===Te(t)||!Fe(t)?en(t):cp(t)}function pp(t){var o=t.getBoundingClientRect(),n=wt(o.width)/t.offsetWidth||1,a=wt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function up(t,o,n){n===void 0&&(n=!1);var a=Fe(o),r=Fe(o)&&pp(o),i=Ze(o),s=kt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Re(o)!=="body"||on(i))&&(d=dp(o)),Fe(o)?(l=kt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=tn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function fp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function mp(t){var o=fp(t);return Nd.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function hp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function yp(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 Aa={placement:"bottom",modifiers:[],strategy:"absolute"};function Ta(){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 gp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Aa:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Aa,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(_){var k=typeof _=="function"?_(p.options):_;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:rt(d)?Mt(d):d.contextElement?Mt(d.contextElement):[],popper:Mt(l)};var x=mp(yp([].concat(a,p.options.modifiers)));return p.orderedModifiers=x.filter(function(h){return h.enabled}),w(),g.update()},forceUpdate:function(){if(!m){var _=p.elements,k=_.reference,x=_.popper;if(Ta(k,x)){p.rects={reference:up(k,Dt(x),p.options.strategy==="fixed"),popper:Jo(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(B){return p.modifiersData[B.name]=Object.assign({},B.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var A=p.orderedModifiers[h],L=A.fn,O=A.options,N=O===void 0?{}:O,V=A.name;typeof L=="function"&&(p=L({state:p,options:N,name:V,instance:g})||p)}}}},update:hp(function(){return new Promise(function(C){g.forceUpdate(),C(p)})}),destroy:function(){f(),m=!0}};if(!Ta(d,l))return g;g.setOptions(c).then(function(C){!m&&c.onFirstUpdate&&c.onFirstUpdate(C)});function w(){p.orderedModifiers.forEach(function(C){var _=C.name,k=C.options,x=k===void 0?{}:k,h=C.effect;if(typeof h=="function"){var A=h({state:p,name:_,instance:g,options:x}),L=function(){};u.push(A||L)}})}function f(){u.forEach(function(C){return C()}),u=[]}return g}}var bp=[Rd,rp,Pd,Ed,np,Jd,sp,Dd,ep],Cp=gp({defaultModifiers:bp});function an(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 Ea(t,o){if(t){if(typeof t=="string")return an(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)?an(t,o):void 0}}function wp(t){return function(o){if(Array.isArray(o))return an(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||Ea(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 xt(t){return xt=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},xt(t)}function La(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Va(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){La(i,a,r,s,d,"next",l)}function d(l){La(i,a,r,s,d,"throw",l)}s(void 0)})}}var Ba={exports:{}},Oa={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})(Oa),function(t){var o=Oa.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(y,b,T){y[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,T){return Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,T,D){return b[T]=D}}function g(y,b,T,D){var M=b&&b.prototype instanceof h?b:h,G=Object.create(M.prototype),K=new v(D||[]);return d(G,"_invoke",{value:P(y,T,K)}),G}function w(y,b,T){try{return{type:"normal",arg:y.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var f="suspendedStart",C="suspendedYield",_="executing",k="completed",x={};function h(){}function A(){}function L(){}var O={};m(O,c,function(){return this});var N=Object.getPrototypeOf,V=N&&N(N(j([])));V&&V!==i&&s.call(V,c)&&(O=V);var B=L.prototype=h.prototype=Object.create(O);function F(y){["next","throw","return"].forEach(function(b){m(y,b,function(T){return this._invoke(b,T)})})}function H(y,b){function T(M,G,K,Q){var ee=w(y[M],y,G);if(ee.type!=="throw"){var re=ee.arg,he=re.value;return he&&o(he)=="object"&&s.call(he,"__await")?b.resolve(he.__await).then(function(me){T("next",me,K,Q)},function(me){T("throw",me,K,Q)}):b.resolve(he).then(function(me){re.value=me,K(re)},function(me){return T("throw",me,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function(M,G){function K(){return new b(function(Q,ee){T(M,G,Q,ee)})}return D=D?D.then(K,K):K()}})}function P(y,b,T){var D=f;return function(M,G){if(D===_)throw new Error("Generator is already running");if(D===k){if(M==="throw")throw G;return{value:a,done:!0}}for(T.method=M,T.arg=G;;){var K=T.delegate;if(K){var Q=S(K,T);if(Q){if(Q===x)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===f)throw D=k,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=_;var ee=w(y,b,T);if(ee.type==="normal"){if(D=T.done?k:C,ee.arg===x)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=k,T.method="throw",T.arg=ee.arg)}}}function S(y,b){var T=b.method,D=y.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,S(y,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),x;var M=w(D,y.iterator,b.arg);if(M.type==="throw")return b.method="throw",b.arg=M.arg,b.delegate=null,x;var G=M.arg;return G?G.done?(b[y.resultName]=G.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,x):G:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,x)}function I(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function E(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function v(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(I,this),this.reset(!0)}function j(y){if(y||y===""){var b=y[c];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,D=function M(){for(;++T<y.length;)if(s.call(y,T))return M.value=y[T],M.done=!1,M;return M.value=a,M.done=!0,M};return D.next=D}}throw new TypeError(o(y)+" is not iterable")}return A.prototype=L,d(B,"constructor",{value:L,configurable:!0}),d(L,"constructor",{value:A,configurable:!0}),A.displayName=m(L,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===A||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,L):(y.__proto__=L,m(y,u,"GeneratorFunction")),y.prototype=Object.create(B),y},r.awrap=function(y){return{__await:y}},F(H.prototype),m(H.prototype,p,function(){return this}),r.AsyncIterator=H,r.async=function(y,b,T,D,M){M===void 0&&(M=Promise);var G=new H(g(y,b,T,D),M);return r.isGeneratorFunction(b)?G:G.next().then(function(K){return K.done?K.value:G.next()})},F(B),m(B,u,"Generator"),m(B,c,function(){return this}),m(B,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),T=[];for(var D in b)T.push(D);return T.reverse(),function M(){for(;T.length;){var G=T.pop();if(G in b)return M.value=G,M.done=!1,M}return M.done=!0,M}},r.values=j,v.prototype={constructor:v,reset:function(y){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(E),!y)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function T(ee,re){return G.type="throw",G.arg=y,b.next=ee,re&&(b.method="next",b.arg=a),!!re}for(var D=this.tryEntries.length-1;D>=0;--D){var M=this.tryEntries[D],G=M.completion;if(M.tryLoc==="root")return T("end");if(M.tryLoc<=this.prev){var K=s.call(M,"catchLoc"),Q=s.call(M,"finallyLoc");if(K&&Q){if(this.prev<M.catchLoc)return T(M.catchLoc,!0);if(this.prev<M.finallyLoc)return T(M.finallyLoc)}else if(K){if(this.prev<M.catchLoc)return T(M.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<M.finallyLoc)return T(M.finallyLoc)}}}},abrupt:function(y,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var M=D;break}}M&&(y==="break"||y==="continue")&&M.tryLoc<=b&&b<=M.finallyLoc&&(M=null);var G=M?M.completion:{};return G.type=y,G.arg=b,M?(this.method="next",this.next=M.finallyLoc,x):this.complete(G)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),x},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),E(T),x}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===y){var D=T.completion;if(D.type==="throw"){var M=D.arg;E(T)}return M}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,T){return this.delegate={iterator:j(y),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),x}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Ba);var to=Ba.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function kp(t){var o=function(n,a){if(xt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(xt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return xt(o)==="symbol"?o:String(o)}function rn(t,o,n){return(o=kp(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=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 i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,m=p-s,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var w=m/t.size*100,f=100-g/t.size*100;n("change",w,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Ia=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},_p=Ia(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),xp=Ia(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(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))}}Ke(".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}"),no.render=function(t,o,n,a,r,i){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"]))},[_p,xp,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=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 i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Sp={ref:"canvas"};Ke(".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}"),ao.render=function(t,o,n,a,r,i){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",Sp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=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(),i=function(){var s=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"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=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)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Np={ref:"canvas"};Ke(".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}"),ro.render=function(t,o,n,a,r,i){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",Np,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=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")}}}}),Ap={class:"input"},Tp={class:"label"},Ep=[".value"];function Pt(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 i,s,d,l,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=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(m){u=!0,s=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||Ea(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 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 De(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){rn(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}Ke(".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}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("span",Tp,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,Ep)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var Da=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},$a={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat($a[o]||o).concat($a[n]||n)},Ma=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(a))},St=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)},jt=function(t,o,n){t=6*St(t,360),o=St(o,100),n=St(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},va=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=Da(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=jt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(Ma(jt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var m=Da(a,r/100,i/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*m[1]),"%, ").concat(Math.round(100*m[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%)");case"rgb":var g=jt(a,r,i),w=g.r,f=g.g,C=g.b;return"rgb(".concat(w,", ").concat(f,", ").concat(C,")");default:return Ma(jt(a,r,i))}},so=function(t){var o=t.r,n=t.g,a=t.b;o=St(o,255),n=St(n,255),a=St(a,255);var r,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},Pa=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},ja=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]}},ln=function(t,o,n){if(typeof t=="string"&&t!==""){var a=sn(t,cn(t),n),r=za(a);return va(r,o,n)}return""},Ra=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ua=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},Ga=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},sn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ra(t),a=n.r,r=n.g,i=n.b,s=n.a;return De(De({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=Ga(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ua(t),c=l.h,p=l.s,u=l.l,m=l.a;return De(De({},Pa({h:c,s:p,l:u})),{},{a:+m});default:var g=ja(t),w=g.r,f=g.g,C=g.b,_=g.a;return De(De({},so({r:w,g:f,b:C})),{},{a:_/255})}else switch(o){case"rgb":return De(De({},so(Ra(t))),{},{a:1});case"hsv":var k=Ga(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return De(De({},Pa(Ua(t))),{},{a:1});default:return De(De({},so(ja(t))),{},{a:1})}},cn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},za=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}},Rt=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)+"")}),i=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"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(l,"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(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Lp=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Rt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Lp)},Rt.__scopeId="data-v-02da71fd",Rt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:Rt},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 ln(a,"hex",!0)})})}}}),Vp={class:"colors"};function Ha(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 Ge(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ha(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Vp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},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 Ge(Ge({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var k,x=(k=t.value)===null||k===void 0?void 0:k.trim();if(x!=null&&x!==""){var h=cn(x);return za(sn(x,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,x){var h="";k!=null?(h=va(Ge({},k),t.format,t.showAlpha),s.value=Ge({},k)):s.value=null,d.value=h;var A=l();JSON.stringify(k)!==JSON.stringify(A)&&JSON.stringify(k)!==JSON.stringify(x)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,x;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(x=e.unref(i))===null||x===void 0?void 0:x.a:1}),g=e.computed(function(){return jt(e.unref(c),e.unref(p),e.unref(u))}),w=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),C=e.ref(-1),_=function(k,x,h){if(k.length!==0){var A=sn(k,x,h),L=A.h,O=A.s,N=A.v;if(!(isNaN(L)||isNaN(O)||isNaN(N))){var V=1,B=A.a;isNaN(B)||(V=B),i.value={h:L,s:O,v:N,a:V}}}};return{h:c,s:p,v:u,a:m,rgbStr:w,onSelectSaturation:function(k,x){C.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:k,v:x,a:e.unref(m)}:i.value=Ge(Ge({},e.unref(i)),{},{s:k,v:x})},onSelectHue:function(k){C.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=Ge(Ge({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){C.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:k}:i.value=Ge(Ge({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){C.value=-1,d.value=k},handleChange:function(){var k,x=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(x!==""){var h=t.showAlpha,A=t.format,L=function(O,N,V){if(V)switch(N){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(O);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(O);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(O);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(O)}else switch(N){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(O);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(O);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(O);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(O)}}(x,A,h);L?_(x,A,h):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:C,onSelectColor:function(k,x){if(C.value=x,(k=k.trim())==="")i.value=null;else{var h=cn(k);h?_(k,h,!0):i.value=null}}}}}),Bp={class:"picker-inner"},Op={class:"picker-header"};Ke(".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}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=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",Bp,[e.createElementVNode("div",Op,[e.createVNode(s,{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(l,{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)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=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"):""}})}}}),Ip=[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 Ya(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 dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".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}"),uo.render=function(t,o,n,a,r,i){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(Ip),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var it=null,Nt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Rt,Picker:po,AddColorItem:uo},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(S){return ln(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",I=Array.isArray(S)?S:[S];a.value=I.map(function(E){return ln(E,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,m,g,w,f=e.ref(null),C=e.ref(null),_=(l=f,c=C,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){it.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(S){var I=S.state,E=I.styles,v=I.placement,j=E.popper;u.value=dn(dn(dn({},j),p),{},{transformOrigin:v==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(S,I){var E,v=Pt(S,2),j=v[0],y=v[1],b=Pt(I,2),T=b[0],D=b[1];if(j&&y&&(T!==j||D!==T)){(E=it)===null||E===void 0||E.destroy();var M=j.$el||j,G=y.$el||y;e.nextTick(function(){it=Cp(M,G,m)})}}),e.onBeforeUnmount(function(){var S;it&&((S=it)===null||S===void 0||S.destroy(),it=null)}),{instance:it,style:u}),k=_.style,x=function(){e.unref(f)==null&&(f.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){i.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]))},A=e.ref(),L=function(){var S=Va(oo.mark(function I(E){var v,j,y,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(j=E.target,(y=(v=j.dataset)===null||v===void 0?void 0:v.index)!=null&&y!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){x(),clearTimeout(g)},100)):x(),i.value=b,f.value=j;case 10:case"end":return T.stop()}},I)}));return function(I){return S.apply(this,arguments)}}(),O=function(){var S=Va(oo.mark(function I(E){var v,j,y,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=E.target,!(!((v=e.unref(A))!==null&&v!==void 0&&v.isEqualNode(b))&&(!((j=e.unref(A))===null||j===void 0)&&j.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(y=e.unref(C))===null||y===void 0?void 0:y.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:w&&clearTimeout(w),w=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return D.stop()}},I)}));return function(I){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(x(),clearTimeout(w))});var N,V=e.ref(t.max>e.unref(a).length),B=e.computed(function(){return typeof t.popupContainer=="string"||xt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),F=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),H=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(C)]},function(){e.nextTick(function(){var S,I;(S=e.unref(A))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref(H)),(I=e.unref(C))===null||I===void 0||(I=I.$el)===null||I===void 0||I.setAttribute("pick-colors-theme",e.unref(H))})},{immediate:!0}),e.provide("theme",{theme:H});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&x()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),g&&(clearTimeout(g),g=null),w&&(clearTimeout(w),w=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===S},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:V,onPickerChange:function(S){var I=e.unref(i),E=e.unref(a).slice(),v=e.unref(a).length;if(I!=null){I>=0?E[I]=S:(i.value=v,E.push(S));var j="";j=Array.isArray(t.value)||t.addColor?E:S,t.value===void 0?a.value=Array.isArray(j)?j:[j]:(n("update:value",j),n("change",j,S,I)),t.addColor&&v>=t.max&&(V.value=!1,n("overflowMax"))}},colorPicker:A,onColorClick:L,pickerRef:C,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var I=S.target;N=+I.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var I=+S.target.dataset.index,E=wp(e.unref(a)),v=E[N];E.splice(N,1);var j=E.slice(0,I),y=E.splice(I),b=j.concat([v]).concat(y);n("update:value",b),n("change",b,b[N],N)},colorItemsRef:P,pickerStyle:k,values:r,teleportDisabled:F,toPopupContainer:B}}});Ke(".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)}"),Nt.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=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(s,{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(l,{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)},Nt.__scopeId="data-v-3c43ade8",Nt.__file="src/ColorPicker.vue";const Fp=e.defineComponent({name:"ColorPick",components:{PickColors:Nt,AInput:$.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}}}}),Xf="",Dp={class:"color-pick"};function $p(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Dp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Mp=oe(Fp,[["render",$p],["__scopeId","data-v-e2113f43"]]),vp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Nt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),Jf="",Pp={class:"color-group-pick"};function jp(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Pp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Rp=oe(vp,[["render",jp],["__scopeId","data-v-b2be8322"]]),Up=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:Vo,MinusCircleOutlined:Gl,PickColors:Nt,InputNumber:ca,PlusCircleOutlined:Wl},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 m=c[0];if(Object.prototype.toString.call(m)==="[object Object]"){const g=Object.keys(m),w={};g.forEach(f=>{w[f]=""}),c.push(w)}else typeof m=="string"&&c.push(m);n.value=c}else $.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const w=c==null?void 0:c.target,f=(w==null?void 0:w.value)!=null?w==null?void 0:w.value:c;u?m[p][u]=f:m[p]=f,n.value=m}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),Zf="",Gp={class:"form-group"},zp={class:"form-row"},Hp={key:0,class:"label"},Yp={key:1,class:"label"},Wp={class:"icon-group"};function qp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Gp,[e.createVNode(s,{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",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Hp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",Yp,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:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Wp,[(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(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Kp=oe(Up,[["render",qp],["__scopeId","data-v-f0c0ab4d"]]),Qp=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:$.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Xp(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Jp=oe(Qp,[["render",Xp]]),Zp=e.defineComponent({name:"PropsToForm",components:{Input:od,InputNumber:ca,RadioGroup:id,Select:dd,Switch:fd,ColorPick:Mp,ColorGroupPick:Rp,FormGroup:Kp,Textarea:Jp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Gt),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:m}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:w="change",events:f}=p;c[u]={...p,valueProp:g,value:m,events:{[w]:(C,_=!0)=>{i(_?{[u]:C}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:Z.reduce(l,(c,p,u)=>{const m=Zc[u];if(Array.isArray(m)){const g=m.find(w=>{const{onlyType:f,excludeType:C}=w;return f==null&&C==null?!0:f?ge(e.unref(r),f):C?!ge(e.unref(r),C):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:ge}}}),em="",eu={class:"props-to-form"},tu={class:"label"},ou={class:"component-wrapper"};function nu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",tu,e.toDisplayString(s.label),1),e.createElementVNode("div",ou,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const au=oe(Zp,[["render",nu],["__scopeId","data-v-c6fb2484"]]);function ru(){return new Worker("/assets/editor.worker-02df2e61.js")}function lu(){return new Worker("/assets/json.worker-867823a6.js")}function iu(){return new Worker("/assets/ts.worker-7254b425.js")}const su=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(i,s){return s==="json"?new lu:s==="typescript"||s==="javascript"?new iu:new ru}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=er.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(Z.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),tm="",cu={class:"editor",ref:"dom"};function du(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",cu,null,512)}const Wa=oe(su,[["render",du],["__scopeId","data-v-71e88372"]]),pu=[{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}],uu=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:Wa},setup(){const t=e.inject(Ye),o=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),n=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var C,_,k;let f=[];if(r.value=[],!o.value)f=((C=e.unref(n))==null?void 0:C.queryColumnList)||[];else{const x=((_=e.unref(n))==null?void 0:_.rowHeaderList)||[],h=((k=e.unref(n))==null?void 0:k.indicators)||[];f=[...x,...h]}f.forEach(x=>{var A;let h=(A=e.unref(a))==null?void 0:A.find(L=>L.prop===x.name);h||(h={label:x.label,prop:x.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:pu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,C,_)=>{f&&C&&(i=f,s=C,d.value=f[C]||"",c.value=!0,l.value=_)},onEditorChange:f=>{try{d.value=f}catch(C){console.error(C)}},changeRenderBool:(f,C)=>{f.style=C.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),om="",fu={class:"table-column-config"};function mu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",fu,[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:w,text:f,record:C})=>[w.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:_=>t.changeRenderBool(C,_),checked:C.style},null,8,["onChange","checked"])):w.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:C.width,"onUpdate:value":_=>C.width=_,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):w.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.renderText,"onUpdate:value":_=>C.renderText=_,readOnly:!0,onClick:_=>t.renderSave(C,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):w.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[C.style?(e.openBlock(),e.createBlock(d,{key:1,value:C.headerTemplate,"onUpdate:value":_=>C.headerTemplate=_,readOnly:!0,onClick:_=>t.renderSave(C,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):w.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:C.headerAlign,"onUpdate:value":_=>C.headerAlign=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:C.align,"onUpdate:value":_=>C.align=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:C.fixed,"onUpdate:value":_=>C.fixed=_},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:C.dataFormat,"onUpdate:value":_=>C.dataFormat=_,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):w.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[C.dataFormat&&C.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:C.retentiondigit,"onUpdate:value":_=>C.retentiondigit=_,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=w=>t.editorVisible=w),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(m,{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 hu=oe(uu,[["render",mu],["__scopeId","data-v-afebddc0"]]),yu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:au,TableColumnConfig:hu,Editor:Wa,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Gt),r=e.inject(hn),i=e.inject(ho),s=e.inject(yo),d=e.inject(mn),l=A=>{i({...wn[A]},!1),d()},c=e.computed(()=>{var A;return(A=e.unref(a))==null?void 0:A.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Jc.map(A=>{const{props:L,title:O,enableProps:N,onlyType:V,excludeType:B}=A,F=[];L.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&F.push(S):F.push(S))});let H,P;return t.componentType==="table"&&(V!=null&&V.includes(t.componentType))?(H=typeof N=="string"&&r.value?r.value[N]:void 0,P=Z.pick(e.unref(r),F)):(H=typeof N=="string"&&a.value?a.value[N]:void 0,P=Z.pick(e.unref(a),F)),{title:O,enableProps:H,enablePropsName:N,onlyType:V,excludeType:B,props:P}}).filter(({props:A})=>Object.keys(A).length>0)),m=(A,L)=>{const{onlyType:O,excludeType:N}=A;return O==null&&N==null?!0:O?ge(L,O):N?!ge(L,N):!1},g=(A,L)=>(L==null||L.stopPropagation(),A),w=(A,L)=>{L!=null&&i({[L]:A})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),C=A=>{try{const L=JSON.parse(A||"{}");i(L,!1)}catch(L){console.error(L)}},_=e.ref(""),k=A=>{try{_.value=A}catch(L){console.error(L)}},x=(A,L)=>{try{s({[L]:A})}catch(O){console.error(O)}},h=e.computed(()=>{var A;return["customGraph"].includes((A=e.unref(a))==null?void 0:A.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:C,tableOptions:r,optionCode:_,onEditorChange:k,tableEditorChange:x,onSwitchClick:g,onSwitchChange:w,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),nm="",am="",gu={class:"style-group"};function bu(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),w=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",gu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:f.enableProps,onChange:C=>t.onSwitchChange(C,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.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(m,{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(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var C;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((C=f.onlyType)!=null&&C.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.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(w)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Cu=oe(yu,[["render",bu],["__scopeId","data-v-2fb3e2ad"]]),wu=e.defineComponent({name:"Card",components:{CloseOutlined:Kt,MenuOutlined:Qn,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(zt),a=e.inject(bn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,T)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const y=[],b=(T=e.unref(d))==null?void 0:T.find(M=>{var G;return M.id===((G=t.control)==null?void 0:G.id)});if(b){const M=b.type,G=Z.pick(b,["value","startTime","endTime"]);(D=Object.keys(G))!=null&&D.length||(G.value="");for(const K in G)if(Object.prototype.hasOwnProperty.call(G,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(re=>ge(M,re.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{s(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(T=>T.id===y);if(b){const{type:T,id:D,events:M=[]}=b,G=Qt(T),K=M.findIndex(Q=>{var ee;return Q.on===G&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&(M.splice(K,1),n({id:D,events:M}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const T=e.unref(d).find(D=>D.id===y);T&&(b.keyName=T.keyName,O(T,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),w=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},C=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},_=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},x=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),A=e.inject(fe),L=e.computed(()=>{var Ee;const{classificationList:y=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:M=[],rowHeaderList:G=[],queryColumnList:K=[]}=e.unref(A),Q=Z.cloneDeep([...y,...b,...T,...D,...M,...G,...K]);if(Q!=null&&Q.length)for(const de of Q)de.id=de.name;const ee=[{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(de=>({...de,id:de.name,label:de.title||de.label})),...Q];((Ee=e.unref(h))==null?void 0:Ee.type)==="ecanSelect"&&ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const re=new Map,he=ee.length;for(let de=0;de<he;de++){const $e=ee[de],{id:et}=$e||{};re.set(et,$e)}return[...re].map(([de,$e])=>$e)});function O(y,b){var K,Q;const{type:T,id:D,events:M=[]}=y,G=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(A))==null?void 0:K.controlList)||[]).find(re=>re.id===e.unref(g))||u(e.unref(g))),M.find(ee=>{var re;return ee.on===G&&ee.target===((re=e.unref(h))==null?void 0:re.id)&&ee.emit==="refreshData"})||n({id:D,events:[...M,{on:G,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const N=(y,b)=>{if(y){const{label:T,name:D,id:M,genericType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},re={...t.control,conditionKey:M,conditionLabel:T,conditionName:D,conditionValueType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee};gt(re,"rule")||(re.rule="EQUAL"),gt(re,"dataType")||(re.dataType="component"),r({control:re,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},V=(y,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},B=(y,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},F=e.computed(()=>{const y=e.unref(L).find(T=>T.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="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"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="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"}]:[]}),H=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(G=>G.id===b),M=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];ge(D==null?void 0:D.type,M)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(y=!0)}return y}),I=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(M=>M.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:m,onIdFocus:w,onPropChange:f,onModeChange:x,onRuleChange:C,onDataTypeChange:_,onCustomValueChange:k,conditionKeyOptions:L,onConditionKeyChange:N,idFilterOption:V,filterOption:B,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:F,dataTypeOption:H,isShowProp:S,isShowFormat:I,isShowModelProp:P,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"}]}}}),rm="",lm="",ku={class:"control-card"};function _u(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",ku,[e.createVNode(s,{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(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},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,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},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(s,{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(s,{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(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const xu=oe(wu,[["render",_u],["__scopeId","data-v-d25f813a"]]),Su=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:xu}}),im="",Nu={key:0,class:"condition-list"},Au={key:0,class:"condition-container"},Tu={key:0,class:"condition-text"},Eu={key:1,class:"condition-text"},Lu={class:"conditions"};function Vu(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Nu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Au,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Tu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Eu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Lu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Bu=oe(Su,[["render",Vu],["__scopeId","data-v-916ff9bd"]]),Ou=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Bu,AButton:$.Button},setup(){const t=e.inject(Pe),o=e.inject(fe),n=e.inject(xe),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(gt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),gt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:ra({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:ke()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:ke()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:ke()}),i({controlList:u})))},d=p=>{var C,_,k,x;const{index:u,path:m}=p;let g=Z.cloneDeep((C=e.unref(a))==null?void 0:C.slice()),w=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(w[h])w=(_=w[h])==null?void 0:_.conditions;else break;if(Array.isArray(w)&&w[u])if(w.splice(u,1),w.length===1){if(f.length>0){const h=f.length-1,A=f[h],L=f.slice(0,h);let O=g,N="";for(const V of L)if(O[V])N=(k=O[V])==null?void 0:k.join,O=(x=O[V])==null?void 0:x.conditions;else break;if(N===w[0].join){if(Array.isArray(w[0].conditions)){const V=Z.cloneDeep(w[0].conditions);O.splice(+A,1),O.splice(+A,0,...V)}}else O[A]=w[0]}}else w.length===0&&(g=[]);i({controlList:g})}},l=p=>{var _,k;const{control:u,index:m,path:g}=p,w=Z.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let f=w;const C=g.split("-");if(C!=null&&C.length)for(const x of C)if(f[x])f=(k=f[x])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:w})},c=(p,u,m)=>{var _,k,x;const g=Z.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let w=g,f="";const C=p.split("-");if(C!=null&&C.length){for(const h of C)if(w[h])f=(k=w[h])==null?void 0:k.join,w=(x=w[h])==null?void 0:x.conditions;else break;if(f===m)w.splice(u+1,0,{keyValue:ke()});else{const h=Z.cloneDeep(w[u]);w[u]={join:m,conditions:[h,{keyValue:ke()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),sm="",Iu={class:"control-group"},Fu={class:"control-group-header"},Du={class:"control-group-content"};function $u(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Iu,[e.createElementVNode("div",Fu,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",Du,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Mu=oe(Ou,[["render",$u],["__scopeId","data-v-1e37d2d3"]]),vu=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Kt,AppstoreAddOutlined:Vo,ASelect:$.Select,ASelectOption:$.SelectOption,AInput:$.Input,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(Pe),r=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.filter(A=>A.keyName!=="")}),i=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],s=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],d=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],l=e.ref(Z.cloneDeep(t.item));e.watch(l,h=>{o("update",{...h,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var A;let h=null;if(((A=e.unref(l))==null?void 0:A.dataType)==="component"){const L=e.unref(r).find(O=>{var N;return O.id===((N=e.unref(l))==null?void 0:N.id)});L&&(h=L)}return h}),p=e.computed(()=>{var A;let h=!1;return((A=e.unref(l))==null?void 0:A.variableType)==="DATE"&&(h=!0),h}),u=e.computed(()=>{let h=!1;return e.unref(c)&&(h=ge(e.unref(c).type,"range")),h}),m=e.computed(()=>{let h=!1;return e.unref(c)&&(ge(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(h=!0):ge(e.unref(c).type,"date")&&(h=!0)),h}),g=(h,A)=>{h&&(e.unref(l).keyName=A.keyName)},w=()=>{o("delete",t.index)},f=e.computed(()=>e.unref(p)?[{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"}]:[]),C=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},_=()=>{e.unref(l).format=null},k=(h,A)=>{var L;return(L=A==null?void 0:A.keyName)==null?void 0:L.toLowerCase().includes(h==null?void 0:h.toLowerCase())};return e.watch(m,h=>{h&&(e.unref(l).operateType||(e.unref(l).operateType="add"),e.unref(l).operateMode||(e.unref(l).operateMode="year"),e.unref(l).operateValue||(e.unref(l).operateValue=0),e.unref(l).activeOperateKey||(e.unref(l).activeOperateKey=1))},{immediate:!0}),{variableData:l,typeOption:i,dataTypeOption:s,usedComponentList:r,formatOptions:f,rangeTypeOptions:d,isShowFormat:p,isDateRangeComponent:u,isShowDateOperate:m,popoverVisible:n,idFilterOption:k,onChangeComponent:g,onDelete:w,onChangeDataType:C,onChangeVariableType:_,changeTab:h=>{e.unref(l).activeOperateKey=h,h===1?e.unref(l).operateValue=0:h===2&&(e.unref(l).operateValue="rangeValue")}}}}),cm="",Pu={class:"variable-item"},ju=["title"],Ru={class:"popover-content-wrap"},Uu={style:{display:"flex"}};function Gu(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("a-tabs"),m=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),w=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Pu,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,ju)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=f=>t.variableData.variableName=f),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=f=>t.variableData.variableType=f),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=f=>t.variableData.dataType=f),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=f=>t.variableData.id=f),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=f=>t.variableData.variableValue=f),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=f=>t.variableData.dateTypeValue=f),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=f=>t.variableData.format=f),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(g,{key:4,visible:t.popoverVisible,"onUpdate:visible":o[14]||(o[14]=f=>t.popoverVisible=f),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(u,{defaultActiveKey:t.variableData.activeOperateKey,onChange:t.changeTab},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{tab:"日期偏移",key:1},{default:e.withCtx(()=>[e.createVNode(c,{class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=f=>t.variableData.operateValue=f),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=f=>t.variableData.operateType=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=f=>t.variableData.operateMode=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])]),_:1})),t.isDateRangeComponent?(e.openBlock(),e.createBlock(p,{tab:"自定义",key:2},{default:e.withCtx(()=>[e.createElementVNode("div",Uu,[e.createVNode(d,{value:t.variableData.operateValue,"onUpdate:value":o[10]||(o[10]=f=>t.variableData.operateValue=f),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[11]||(o[11]=f=>t.variableData.operateMode=f),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[12]||(o[12]=f=>t.variableData.operateType=f)},{default:e.withCtx(()=>[e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[13]||(o[13]=f=>{t.popoverVisible=!0})},[e.createVNode(m)])]),_:1},8,["visible"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const zu=oe(vu,[["render",Gu],["__scopeId","data-v-1d5b6ae6"]]),Hu=e.defineComponent({name:"VariableGroup",components:{VariableItem:zu},setup(){const t=e.inject(fe),o=e.inject(xe),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Bt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=Z.cloneDeep(e.unref(a));l.push({keyValue:ke(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0,activeOperateKey:1}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=Z.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=Z.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),dm="",Yu={class:"variable-group"},Wu={class:"variable-group-header"},qu={class:"variable-group-content"};function Ku(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Yu,[e.createElementVNode("div",Wu,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const Qu=oe(Hu,[["render",Ku],["__scopeId","data-v-fd60cd09"]]),Xu=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:w,builtInCalcWay:f,formula:C,conditions:_,aggregate:k}=s;let x;return _&&(x=r(_)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:w,builtInCalcWay:f,formula:C,conditions:x}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:w=[],seriesList:f=[],leftAxisList:C=[],rightAxisList:_=[],queryColumnList:k=[],indicators:x=[],dataSourceId:h,idxLibMode:A,preview:L=!1}=s||{};m==null&&(ge(d,"table")?m="1":m="2");let O;if(Array.isArray(w)&&w.length>0){const F=w.length;for(let H=0;H<F;H++){const P=w[H]||{},{label:S="",name:I="",show:E=!1,sort:v,customGroup:j,conditions:y}=P;if(E||F===1){O={label:S.trim(),columnName:I,show:E,sort:v,customGroup:j,conditions:r(y)};break}}}let N;if(Array.isArray(f)&&f.length>0){const F=f.length;for(let H=0;H<F;H++){const P=f[H]||{},{label:S="",name:I="",show:E=!1,sort:v,customGroup:j,conditions:y}=P;if(E||F===1){N={label:S.trim(),columnName:I,show:E,sort:v,customGroup:j,conditions:r(y)};break}}}const V=[];k==null||k.forEach(F=>{V.push(o(F))});const B=[];if(C==null||C.forEach(F=>{F.location="LEFT",B.push(i(F))}),_==null||_.forEach(F=>{F.location="RIGHT",B.push(i(F))}),x==null||x.forEach(F=>{F.location="LEFT",B.push(i(F))}),!(m==="1"&&V.length===0)&&!(m==="2"&&B.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:g,classification:O,series:N,indicatorList:B,queryColumns:V,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:A,preview:L})}catch(F){console.error(F)}}},qa=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let m=0;m<u.length;m++){const g=u[m],w=i[g];w!=null&&(c=c.replace(g,w))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=qa(c,n)),t=t.replace(l,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,"&nbsp;&nbsp;")),t},Ut=(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 i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=qa(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},Ju=(t,o,n)=>{switch(t.type){case"bar":return Zu(t,o,n);case"line":return ef(t,o,n);case"pie":return tf(t,o,n);case"comboGraph":return of(t,o,n);default:return{}}},Zu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let m=0;m<p;m++){const g={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.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="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:w,seriesName:f,name:C,value:_,data:k}=c[g]||{};g===0&&(u+=`${C}<br/>`),u+=fo(m,{textData:{marker:w,name:C,value:_,a:f,b:C,c:_,...k}},{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(l),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 Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i: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 Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},ef=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[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="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:w,seriesName:f,name:C,value:_,data:k}=c[g]||{};g===0&&(u+=`${C}<br/>`),u+=fo(m,{textData:{marker:w,name:C,value:_,a:f,b:C,c:_,...k}},{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 Ut(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 Ut(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(l)}},tf=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,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:As(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:{}}}]}},of=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ut(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:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<c;g++){const w=m[g],{tooltipFormatter:f}=w||{},{marker:C,seriesName:_,name:k,value:x,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fo(f||u,{textData:{marker:C,name:k,value:x,seriesName:_,a:_,b:k,c:x,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),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(s)}},nf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:w,value:f}=g,C={...t[0],value:t[0][f]};r.add(w),p.push(C)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],m=u[n];r.add(m);for(let g=0;g<d;g++){const w=a[g],{label:f,value:C}=w,_={...u,value:u[C]};if(i.has(f)){const k=i.get(f);k.push(_),i.set(f,k)}else i.set(f,[_])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},af=(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 i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[n]||"",g=u[a]||"",w=u[r]||"";if(i.add(m),s.has(w)){const f=s.get(w);f.push({name:m,value:g,...u}),s.set(w,f)}else s.set(w,[{name:m,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},rf=e.defineComponent({name:"ChartGraph",components:{ASpin:$.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Me);let i=null;const s=e.inject(ve)||"",d=e.inject(fe)||{},l=e.inject(Gt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),w=e.computed(()=>g.value?ar:12),f=e.ref({}),C=e.ref(),_=e.computed(()=>{const V=e.unref(n.value);if((V==null?void 0:V.type)==="customGraph")return C.value;const B=Ju(V,e.unref(f),w.value);return{toolbox:{show:V.toolboxShow,left:V.toolboxLeft,top:V.toolboxTop,itemSize:V.toolboxItemSize,itemGap:V.toolboxItemGap,feature:{myDataZoom:{show:g.value?!1:V.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:V.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:V.titleText,subtext:V.titleSubtext,left:"center"},grid:{top:V.gridTop,bottom:V.gridBottom,left:V.gridLeft,right:V.gridRight,containLabel:V.gridContainLabel},color:V.colors,...B}}),k=(V=[],B,F=!1)=>{const H=F?B:null;f.value=nf(V,H)},x=(V=[],B)=>{f.value=af(V,B)},h=async()=>{var V,B,F;try{const H=Xu({graphicConfig:e.unref(a.value),type:(V=e.unref(n.value))==null?void 0:V.type,request:r,indicatorToken:s});m.value=!0;const P=await H(),{columns:S=[],rows:I=[]}=((B=P==null?void 0:P.data)==null?void 0:B.data)??{};if(((F=e.unref(n.value))==null?void 0:F.type)==="pie"){let E=[];if(S.length>0){const v=S[0],j=S[1];E=I.map(y=>({name:y[v],value:y[j]}))}x(E)}else{let E;S.length>0&&(E={name:S[0],types:S.slice(1).map(v=>({label:v,value:v}))}),k(I,E,!0)}}catch(H){console.error(H)}finally{m.value=!1}},A={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},L=()=>{e.unref(f).dataset.length===0?u.value.setOption(A):u.value.setOption(_.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&h()},N=()=>{var V;(V=u.value)==null||V.resize()};return e.watch(_,()=>{L()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,V=>{try{const B=eval;C.value=B(V)}catch(B){console.error(B)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(N),i.observe(p.value)),u.value=nr.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:O}),{echartRef:c,loading:m}}}),pm="",lf={class:"ecan-chart-graph",ref:"chartWrapRef"},sf={style:{width:"100%",height:"100%"},ref:"echartRef"};function cf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",lf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",sf,null,512)]),_:1},8,["spinning"])],512)}const Ka=oe(rf,[["render",cf],["__scopeId","data-v-8049fed2"]]),df=e.defineComponent({name:"DataConfig",components:{DataGroup:Xc,StyleGroup:Cu,ChartGraph:Ka,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:Mu,VariableGroup:Qu,AButton:$.Button,ReloadOutlined:ri},setup(){var O;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(fn),i=e.inject(fe),s=e.inject(Pe),d=e.inject(Cn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const N=Z.cloneDeep(e.unref(a));p(N);const V=Z.pick(N,Z.without(Object.keys(N),"position","top","left","width","height"));ge(N.type,l)?(V.height=N.height,V.width=N.width):V.height="290px";const B=Z.cloneDeep(e.unref(i));return B.pageMode="design",B.componentList=s,B.preview=!0,B.pageConfig=d,{...V,graphicConfig:B,toolboxShow:!1,sourceLeft:N.left,sourceTop:N.top}});function p(N){var V,B,F,H;["#ffffff","#fff"].includes((V=N==null?void 0:N.color)==null?void 0:V.toLowerCase())&&(N.color="#000"),["#ffffff","#fff"].includes((B=N==null?void 0:N.variableColor)==null?void 0:B.toLowerCase())&&(N.variableColor="#000"),["#ffffff","#fff"].includes((F=N==null?void 0:N.increaseColor)==null?void 0:F.toLowerCase())&&(N.increaseColor="#000"),["#ffffff","#fff"].includes((H=N==null?void 0:N.declineColor)==null?void 0:H.toLowerCase())&&(N.declineColor="#000")}const u=e.computed(()=>{let N=!0;return ge(e.unref(c).type,l)&&(N=!1),N}),m=e.computed(()=>{var N;return(N=e.unref(c))==null?void 0:N.type}),g=e.computed(()=>{var N;return!!((N=e.unref(c))!=null&&N.isGroupTable)}),w=N=>{const V=N==="1";V&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(V),N==="3"&&x()},f=e.ref(),C=e.inject(Me),_=e.unref(e.inject(ve)),k=(O=window==null?void 0:window.config)==null?void 0:O.pageId;function x(){var S;const{leftAxisList:N=[],rightAxisList:V=[],queryColumnList:B=[],indicators:F=[]}=e.unref(i),H=[...N,...V,...B,...F],P={};for(const I of H){const{id:E="",indexCode:v=""}=I;E&&!gt(I,"calcType")&&!P[E]&&(P[E]=v)}if((S=Object.keys(P))!=null&&S.length){const I=[];for(const E in P)I.push(new Promise((v,j)=>{C.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:E,indexCode:P[E],dataSourceId:""},{headers:{Authentication:_,operateContext:"ygt"}}).then(y=>{var D;const{success:b,data:T=[]}=y.data;b&&((D=T==null?void 0:T.dataViewColumns)!=null&&D.length)?v(T.dataViewColumns):j(T)}).catch(y=>{j(y)})}));Promise.all(I).then(E=>{if(E!=null&&E.length){const v=E.reduce((j,y)=>j.filter(b=>y.find(T=>T.typeGuid===b.typeGuid)));f.value=v.filter(j=>j.typeGuid)}})}}const h=()=>{var V;let N;r&&m.value==="table"?N=window.updateConfig:N=(V=e.unref(n))==null?void 0:V.refreshData,typeof N=="function"&&N()},A=e.inject(xe),L=()=>{var N;A({variableConditions:Bt(((N=e.unref(i))==null?void 0:N.variableList)||[],s)})};return e.provide(mn,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:g,onChange:w,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:h,refreshAction:L}}}),um="",pf={class:"data-config"},uf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function ff(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),w=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",pf,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshAction},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),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(l,{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),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_: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",uf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(w,{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 mf=oe(df,[["render",ff],["__scopeId","data-v-d85f4e1e"]]),hf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:mf},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),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var A;return((A=e.unref(s))==null?void 0:A.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?Z.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?Z.cloneDeep(e.unref(s).chartsOptions):e.ref(Z.cloneDeep(wn.line));p=e.ref(p);let u=e.unref(s).tableOptions?Z.cloneDeep(e.unref(s).tableOptions):e.ref(Z.cloneDeep(rr));u=e.ref(u);const m=e.ref([]),g=A=>{m.value=A},w=A=>{c.value={...e.unref(c),...e.unref(A)}},f=(A,L=!0)=>{L?p.value={...e.unref(p),...e.unref(A)}:p.value={...e.unref(A)}},C=A=>{u.value={...e.unref(u),...e.unref(A)}},_=()=>m,k=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=Z.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=Z.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},x=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=x,t.request&&e.provide(Me,t.request),e.provide(un,{setDataList:g,getDataList:_});const h=A=>{n("updateUsedComponent",A)};return e.provide(Ye,s),e.provide(fe,c),e.provide(Gt,p),e.provide(hn,u),e.provide(go,r),e.provide(fn,l),e.provide(ve,i),e.provide(xe,w),e.provide(ho,f),e.provide(yo,C),e.provide(Pe,t.renderUsedComponentList),e.provide(zt,h),e.provide(bn,t.mapAttributeProps),e.provide(Cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),fm="",yf={key:0,class:"config-modal"},gf={class:"config-modal-left"},bf={class:"config-modal-right"};function Cf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",yf,[e.createElementVNode("div",gf,[e.createVNode(s)]),e.createElementVNode("div",bf,[e.createVNode(d)])]))}const Qa=pn(oe(hf,[["render",Cf],["__scopeId","data-v-23d542ce"]])),Xa=pn(Ka),Ja=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Xa,EcanIndicatorLibrary:Qa},Symbol.toStringTag,{value:"Module"})),wf={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)})}};we.EcanChartGraph=Xa,we.EcanIndicatorLibrary=Qa,we.default=wf,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
56
+ `,Dn=!1,vr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$r;e.nextTick(function(){Dn||(typeof window<"u"&&window.document&&window.document.documentElement&&Or(o,{prepend:!0}),Dn=!0)})},Mr=["icon","primaryColor","secondaryColor"];function Pr(t,o){if(t==null)return{};var n=jr(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function jr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function qt(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){Rr(t,r,n[r])})}return t}function Rr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vt={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Ur(t){var o=t.primaryColor,n=t.secondaryColor;Vt.primaryColor=o,Vt.secondaryColor=n||In(o),Vt.calculated=!!n}function Gr(){return qt({},Vt)}var ht=function(o,n){var a=qt({},o,n.attrs),r=a.icon,i=a.primaryColor,s=a.secondaryColor,d=Pr(a,Mr),l=Vt;if(i&&(l={primaryColor:i,secondaryColor:s||In(i)}),vr(),Dr(On(r),"icon should be icon definiton, but got ".concat(r)),!On(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=qt({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),Ao(c.icon,"svg-".concat(c.name),qt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};ht.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},ht.inheritAttrs=!1,ht.displayName="IconBase",ht.getTwoToneColors=Gr,ht.setTwoToneColors=Ur;const To=ht;function zr(t,o){return qr(t)||Wr(t,o)||Yr(t,o)||Hr()}function Hr(){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 Yr(t,o){if(t){if(typeof t=="string")return $n(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 $n(t,o)}}function $n(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 Wr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function qr(t){if(Array.isArray(t))return t}function vn(t){var o=Fn(t),n=zr(o,2),a=n[0],r=n[1];return To.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Kr(){var t=To.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Qr=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Xr(t,o){return tl(t)||el(t,o)||Zr(t,o)||Jr()}function Jr(){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 Zr(t,o){if(t){if(typeof t=="string")return Mn(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 Mn(t,o)}}function Mn(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 el(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,i=!1,s,d;try{for(n=n.call(t);!(r=(s=n.next()).done)&&(a.push(s.value),!(o&&a.length===o));r=!0);}catch(l){i=!0,d=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw d}}return a}}function tl(t){if(Array.isArray(t))return t}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){Eo(t,r,n[r])})}return t}function Eo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function ol(t,o){if(t==null)return{};var n=nl(t,o),a,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)a=i[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function nl(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,i;for(i=0;i<a.length;i++)r=a[i],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}vn("#1890ff");var yt=function(o,n){var a,r=Pn({},o,n.attrs),i=r.class,s=r.icon,d=r.spin,l=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,m=ol(r,Qr),g=(a={anticon:!0},Eo(a,"anticon-".concat(s.name),!!s.name),Eo(a,i,i),a),C=d===""||d||s.name==="loading"?"anticon-spin":"",f=c;f===void 0&&u&&(f=-1,m.tabindex=f);var w=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,_=Fn(p),k=Xr(_,2),x=k[0],h=k[1];return e.createVNode("span",Pn({role:"img","aria-label":s.name},m,{onClick:u,class:g}),[e.createVNode(To,{class:C,icon:s,primaryColor:x,secondaryColor:h,style:w},null)])};yt.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},yt.displayName="AntdIcon",yt.inheritAttrs=!1,yt.getTwoToneColor=Kr,yt.setTwoToneColor=vn;const ge=yt;var al={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 rl=al;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){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 Lo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(ge,jn({},a,{icon:rl}),null)};Lo.displayName="AppstoreAddOutlined",Lo.inheritAttrs=!1;const Vo=Lo;var il={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 sl=il;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){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 Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ge,Rn({},a,{icon:sl}),null)};Bo.displayName="CaretDownOutlined",Bo.inheritAttrs=!1;const dl=Bo;var pl={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 ul=pl;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){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 Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ge,Un({},a,{icon:ul}),null)};Oo.displayName="CaretRightOutlined",Oo.inheritAttrs=!1;const ml=Oo;var hl={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 yl=hl;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){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 Io=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ge,Gn({},a,{icon:yl}),null)};Io.displayName="CloseOutlined",Io.inheritAttrs=!1;const Kt=Io;var bl={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 Cl=bl;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){wl(t,r,n[r])})}return t}function wl(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=zn({},o,n.attrs);return e.createVNode(ge,zn({},a,{icon:Cl}),null)};Fo.displayName="CopyOutlined",Fo.inheritAttrs=!1;const kl=Fo;var _l={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 xl=_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){Sl(t,r,n[r])})}return t}function Sl(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=Hn({},o,n.attrs);return e.createVNode(ge,Hn({},a,{icon:xl}),null)};Do.displayName="DeleteOutlined",Do.inheritAttrs=!1;const Yn=Do;var Nl={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 Al=Nl;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){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 $o=function(o,n){var a=Wn({},o,n.attrs);return e.createVNode(ge,Wn({},a,{icon:Al}),null)};$o.displayName="DoubleRightOutlined",$o.inheritAttrs=!1;const El=$o;var Ll={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 Vl=Ll;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){Bl(t,r,n[r])})}return t}function Bl(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=qn({},o,n.attrs);return e.createVNode(ge,qn({},a,{icon:Vl}),null)};vo.displayName="DownOutlined",vo.inheritAttrs=!1;const Ol=vo;var Il={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 Fl=Il;function Kn(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){Dl(t,r,n[r])})}return t}function Dl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Mo=function(o,n){var a=Kn({},o,n.attrs);return e.createVNode(ge,Kn({},a,{icon:Fl}),null)};Mo.displayName="InfoCircleOutlined",Mo.inheritAttrs=!1;const $l=Mo;var vl={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};const Ml=vl;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){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 Po=function(o,n){var a=Qn({},o,n.attrs);return e.createVNode(ge,Qn({},a,{icon:Ml}),null)};Po.displayName="MenuOutlined",Po.inheritAttrs=!1;const Xn=Po;var jl={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 Rl=jl;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){Ul(t,r,n[r])})}return t}function Ul(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var jo=function(o,n){var a=Jn({},o,n.attrs);return e.createVNode(ge,Jn({},a,{icon:Rl}),null)};jo.displayName="MinusCircleOutlined",jo.inheritAttrs=!1;const Gl=jo;var zl={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 Hl=zl;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){Yl(t,r,n[r])})}return t}function Yl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ro=function(o,n){var a=Zn({},o,n.attrs);return e.createVNode(ge,Zn({},a,{icon:Hl}),null)};Ro.displayName="PlusCircleOutlined",Ro.inheritAttrs=!1;const Wl=Ro;var ql={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 Kl=ql;function ea(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 Uo=function(o,n){var a=ea({},o,n.attrs);return e.createVNode(ge,ea({},a,{icon:Kl}),null)};Uo.displayName="PlusOutlined",Uo.inheritAttrs=!1;const Xl=Uo;var Jl={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 Zl=Jl;function ta(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){ei(t,r,n[r])})}return t}function ei(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Go=function(o,n){var a=ta({},o,n.attrs);return e.createVNode(ge,ta({},a,{icon:Zl}),null)};Go.displayName="QuestionCircleOutlined",Go.inheritAttrs=!1;const ti=Go;var oi={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 ni=oi;function oa(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){ai(t,r,n[r])})}return t}function ai(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var zo=function(o,n){var a=oa({},o,n.attrs);return e.createVNode(ge,oa({},a,{icon:ni}),null)};zo.displayName="ReloadOutlined",zo.inheritAttrs=!1;const ri=zo;var li={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 ii=li;function na(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){si(t,r,n[r])})}return t}function si(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ho=function(o,n){var a=na({},o,n.attrs);return e.createVNode(ge,na({},a,{icon:ii}),null)};Ho.displayName="SettingOutlined",Ho.inheritAttrs=!1;const ci=Ho,di=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:ml,CaretDownOutlined:dl,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:Tt},setup(){var L;const t=(L=window==null?void 0:window.config)==null?void 0:L.pageId,o=e.inject(ve),n=e.unref(e.inject(Me)),a=e.inject(Ye),r=e.computed(()=>{var B;return(B=e.unref(a))==null?void 0:B.graphicConfig}),i=e.computed(()=>{var B;return(B=e.unref(r))==null?void 0:B.dataSourceId}),s=e.ref([]),d=e.ref(!1),l=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const B={source:"INDICATOR_LIB",queryRequest:{pageSize:l.pageSize,pageNum:l.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(i)};try{const I=await o.post(`${Ve}/diagram/sourceList`,B,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:A,data:E={}}=I.data;if(A){const{rows:N=[],total:O=0}=E;N==null||N.forEach(M=>{var P;M.show=!1,(P=M.dataViewColumns)==null||P.forEach(S=>{S.show=!0,S.edit=!1,S.title&&(S.label=S.title)})}),s.value=N,l.totalResult=+O}}catch{d.value=!1}},u=B=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[B],m=B=>{s.value[B].show=!s.value[B].show},g=()=>{l.currentPage=1,p()},C=J.debounce(()=>{l.currentPage=1,p()},200),f=(B,I)=>{l.pageSize=I,l.currentPage=B,p()};e.onMounted(()=>{p()});const w=e.inject(me),_=e.computed(()=>{const B=["classificationList","rowHeaderList","dimensionList"];let I=[];for(const A in e.unref(w))if(Object.prototype.hasOwnProperty.call(e.unref(w),A)&&B.includes(A)){const E=e.unref(w)[A];Array.isArray(E)&&(I=I.concat(E))}return I});return{dataSourceList:s,dataSourceLoading:d,pagination:l,onToggleGroup:m,mapScope:u,onSearch:g,onChange:C,onPaginationChange:f,searchText:c,setItemDisabled:(B=[])=>{let I=!1;for(const A of e.unref(_))if(!B.find(N=>N.typeGuid===A.typeGuid)){I=!0;break}return I},onDragStart:(B,I)=>{const A=I.dataViewColumns[B.oldIndex];A&&(sessionStorage.setItem("indicator-list-item",JSON.stringify({...A,dataTo:I.dataTo})),I!=null&&I.hrpIndexVariates&&sessionStorage.setItem("indicator-variates",JSON.stringify(I.hrpIndexVariates)))},getSourceType:B=>B==="0"?"【指标库】":B==="1"?"【视图】":"【其他】"}}}),If="",pi={class:"data-source-list"},ui={class:"columns"},fi={class:"column-item"},mi=["onClick"],hi={key:0},yi={class:"column-child-item"},gi={class:"column-child-item-name"};function bi(t,o,n,a,r,i){const s=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),l=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",pi,[e.createVNode(s,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=m=>t.searchText=m),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",ui,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(m,g)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:e.normalizeClass(t.setItemDisabled(m.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",fi,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:C=>t.onToggleGroup(g)},[m.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(l,{key:1})),e.createTextVNode(" "+e.toDisplayString(m.indexCode+" "+m.name)+e.toDisplayString(t.getSourceType(m.dataTo)),1)],8,mi)]),m.show?(e.openBlock(),e.createElementBlock("div",hi,[e.createVNode(c,{modelValue:m.dataViewColumns,"onUpdate:modelValue":C=>m.dataViewColumns=C,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(m.dataViewColumns),onStart:C=>t.onDragStart(C,m)},{item:e.withCtx(({element:C})=>[e.createElementVNode("div",yi,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(C.scope))+"】 ",1),e.createElementVNode("span",gi,e.toDisplayString(C.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]=m=>t.pagination.pageSize=m),total:t.pagination.totalResult,"show-total":m=>`共 ${m} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=m=>t.pagination.currentPage=m),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Ci=oe(di,[["render",bi],["__scopeId","data-v-056d1f48"]]),wi=e.defineComponent({name:"DataList",components:{DataSourceList:Ci,DataViewList:fr},setup(){return{source:e.inject(go)}}});function ki(t,o,n,a,r,i){const s=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(s,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const _i=oe(wi,[["render",ki]]),aa={mounted(t){t.focus()}},xi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},sortList:{type:Array,default:()=>[]}},components:{Draggable:Tt,AModal:$.Modal,AButton:$.Button,ASelect:$.Select,ASelectOption:$.SelectOption,DeleteOutlined:Yn},setup(t,{expose:o}){var E;const n=(E=window==null?void 0:window.config)==null?void 0:E.pageId,a=e.inject(ve),r=e.unref(e.inject(Me)),i=e.inject(me),s=e.inject(xe),d=e.computed(()=>e.unref(i).source),l=e.computed(()=>e.unref(i).dataViewId),c=e.ref([]),p=e.ref("1"),u=e.ref([]),m=N=>t.sortList.filter(O=>!e.unref(u).find(M=>M.columnName===O.name)||N.columnName===O.name),g=async()=>{try{const N=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(l),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:O,data:M=[]}=N.data;O&&(c.value=M==null?void 0:M.slice(0,200))}catch(N){console.error(N)}},C=()=>{var S,F;const N=((S=e.unref(i)[t.type])==null?void 0:S.slice())||[],O=N[t.index],{label:M,name:P}=t.item;e.unref(p)==="2"?O.sort={label:M,columnName:P,type:"CUSTOM",customOrderColumns:e.unref(c)}:e.unref(p)==="1"&&((F=e.unref(u))!=null&&F.length?O.sort=J.cloneDeep(e.unref(u)):delete O.sort),s({[t.type]:N})};let f=!1;const w=()=>{f=!0},_=e.ref(!1),k=N=>{var M;const{sort:O}=N;O?Array.isArray(O)?(p.value=((M=O[0])==null?void 0:M.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=J.cloneDeep(O):u.value=[]):(p.value=(O==null?void 0:O.type)==="CUSTOM"?"2":"1",e.unref(p)==="1"?u.value=[J.cloneDeep(O)]:u.value=[]):u.value=[],_.value=!0},x=()=>{_.value=!1},h=()=>{e.unref(p)==="2"?(f&&C(),f=!1):C(),x()};return o({showModal:k}),e.watch(_,N=>{var O,M;if(N){const P=(M=(O=t.item)==null?void 0:O.sort)==null?void 0:M.customOrderColumns;P==null?g():c.value=P}else c.value=[];window.changeShowTable&&window.changeShowTable(!N)},{flush:"post"}),{visible:_,customSortList:c,activeKey:p,combSortList:u,getSortOptions:m,onChange:w,onDeleteConfig:()=>{var M;const N=((M=e.unref(i)[t.type])==null?void 0:M.slice())||[],O=N[t.index];delete O.sort,s({[t.type]:N}),x()},onCancel:h,onAddSort:()=>{e.unref(u).push({label:"",columnName:null,type:"COMBINATION",order:null})},handleDeleteSort:N=>{u.value.splice(N,1)},onColumnChange:N=>{const O=e.unref(u).find(M=>M.columnName===N);if(O){const M=t.sortList.find(P=>P.name===N);M&&(O.label=M.label,M.defaultCode?O.defaultCode=M.defaultCode:delete O.defaultCode)}}}}}),Ff="",Si={class:"button-wrapper"},Ni={class:"list-wrapper"},Ai={class:"button-wrapper"},Ti={class:"sort-item"};function Ei(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("delete-outlined"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("draggable"),m=e.resolveComponent("a-tabs"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(g,{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.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[1]||(o[1]=C=>t.activeKey=C)},{default:e.withCtx(()=>[e.createVNode(p,{key:"1",tab:"组合排序"},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[e.createVNode(s,{primary:"",onClick:t.onAddSort},{default:e.withCtx(()=>[e.createTextVNode(" 新增 ")]),_:1},8,["onClick"])]),e.createElementVNode("div",Ni,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.combSortList,(C,f)=>(e.openBlock(),e.createElementBlock("div",{class:"sort-row",key:f},[e.createVNode(d,{value:C.columnName,"onUpdate:value":w=>C.columnName=w,style:{width:"200px"},placeholder:"维度/指标",options:t.getSortOptions(C),fieldNames:{label:"label",value:"name"},onChange:t.onColumnChange},null,8,["value","onUpdate:value","options","onChange"]),e.createVNode(d,{value:C.order,"onUpdate:value":w=>C.order=w,style:{"margin-left":"10px",width:"100px"},placeholder:"升/降序"},{default:e.withCtx(()=>[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})]),_:2},1032,["value","onUpdate:value"]),e.createVNode(c,{style:{color:"red","margin-left":"10px"},onClick:w=>t.handleDeleteSort(f)},null,8,["onClick"])]))),128))])]),_:1}),e.createVNode(p,{key:"2",tab:"自定义排序","force-render":""},{default:e.withCtx(()=>[e.createElementVNode("div",Ai,[e.createVNode(s,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(u,{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",Ti,e.toDisplayString(C),1)]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1},8,["activeKey"])]),_:1},8,["visible","onCancel"])}const Li=oe(xi,[["render",Ei],["__scopeId","data-v-4cf86bd7"]]),Vi=e.defineComponent({name:"CustomGroupModal",directives:{focus:aa},components:{CloseOutlined:Kt,AModal:$.Modal,ASelect:$.Select,ASelectOption:$.SelectOption,AButton:$.Button,AInput:$.Input,ACheckbox:$.Checkbox,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ATag:$.Tag,ACheckableTag:$.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var R;const n=e.inject(ve),a=(R=window==null?void 0:window.config)==null?void 0:R.pageId,r=e.unref(e.inject(Me));let i=!1;const s=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),l=e.ref([]),c=e.ref([]),p=e.computed(()=>{const y=e.unref(c).map(b=>b.title);return new Set(y)}),u=e.ref([]);e.watch(()=>e.unref(c).length,y=>{u.value=new Array(y).fill(!1)});const m=e.computed(()=>{let y=0;return e.unref(c).forEach(b=>{var T;(T=b.data)==null||T.forEach(D=>{D.checked&&y++})}),y}),g=()=>{const y=e.unref(d);if(!y){$.message.error("创建分组名不能空");return}e.unref(p).has(y)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:y,data:[]}),i=!0)},C=y=>{e.unref(c).splice(y,1),i=!0},f=e.ref(null),w=()=>{if(e.unref(m)===0){$.message.error("当前移入分组已选个数为0");return}const y=e.unref(f);if(y==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[y]){$.message.error("移入分组不存在,请重新选择");return}const b=[],T=e.unref(c).length;for(let D=0;D<T;D++){const v=e.unref(c)[D];e.unref(c)[D].data=v.data.filter(G=>(G.checked&&b.push({...G,checked:!1}),!G.checked))}e.unref(c)[y].data=[...b,...e.unref(c)[y].data],i=!0},_=y=>{e.unref(u)[y]=!0},k=y=>{e.unref(u)[y]=!1},x=(y,b)=>{const T=y.target.value;e.unref(p).has(T)&&$.message.error("组名不能相同,请修改"),e.unref(c)[b].title=T,i=!0},h=e.inject(me),L=e.inject(xe),B=e.computed(()=>e.unref(h).source),I=e.computed(()=>e.unref(h).dataViewId),A=e.ref(!1),E=()=>{var K,Q;const y=e.unref(c);let b="";e.unref(A)&&(b=(K=y[0])==null?void 0:K.title);const T=y==null?void 0:y.length,D={};for(let ee=1;ee<T;ee++){const ae=y[ee]||{},{title:ye,data:he}=ae;D[ye]=(he==null?void 0:he.map(Ee=>Ee.label))||[]}const v=((Q=e.unref(h)[t.type])==null?void 0:Q.slice())||[],G=v[t.index];G.customGroup={groupInfoMap:D,otherGroupName:b},L({[t.type]:v})},N=e.ref(!1),O=()=>{N.value=!0},M=()=>{N.value=!1},P=()=>{M(),i&&E(),i=!1},S=()=>{i=!0},F=new Set,V=async()=>{const y=t.item.customGroup||{},b=y.otherGroupName,T=y.groupInfoMap;(b===""||b==null)&&(A.value=!1),e.unref(c)[0]={title:b||"未分组",data:[]};let D=1;for(const v in T)if(Object.prototype.hasOwnProperty.call(T,v)){const K=T[v].map(Q=>(F.add(Q),{label:Q,checked:!1}));e.unref(c)[D]={title:v,data:K},D++}await j()},j=async()=>{var y;try{const b=await n.post(`${Ve}/diagram/groupvalue`,{source:e.unref(B),dataViewId:e.unref(I),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:T,data:D=[]}=b.data;if(T){const v=[];(y=D==null?void 0:D.slice(0,200))==null||y.forEach(G=>{F.has(G)||v.push({label:G,checked:!1})}),e.unref(c)[0].data=v}}catch(b){console.error(b)}};return e.watch(N,y=>{y&&V(),window.changeShowTable&&window.changeShowTable(!y)},{flush:"post"}),o({showModal:O}),{visible:N,title:s,activeKey:l,customGroupList:c,onCancel:P,useOtherGroup:A,selectCount:m,createGroupTitle:d,onAddGroup:g,onDeleteGroup:C,onMoveInGroup:w,selectGroupIndex:f,onEditTitle:_,onTitleChange:x,onFinishEditTitle:k,onUseOtherGroup:S,customGroupEditTitleList:u}}}),Df="",$f="",Bi={class:"custom-group-header"},Oi={class:"move-and-create"},Ii={class:"select-tip"},Fi={class:"select-count"},Di={class:"create-group"},$i={class:"custom-group-content"},vi=["onClick"],Mi={class:"extra"},Pi={class:"custom-group-list"},ji={class:"text"};function Ri(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),m=e.resolveComponent("close-outlined"),g=e.resolveComponent("a-checkable-tag"),C=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("a-collapse"),w=e.resolveComponent("a-modal"),_=e.resolveDirective("focus");return e.openBlock(),e.createBlock(w,{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",Bi,[e.createElementVNode("div",Oi,[e.createElementVNode("div",null,[e.createElementVNode("span",Ii,[e.createTextVNode(" 已选"),e.createElementVNode("span",Fi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=k=>t.selectGroupIndex=k),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(s,{key:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(l,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",Di,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=k=>t.createGroupTitle=k),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=k=>t.useOtherGroup=k),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",$i,[e.createVNode(f,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=k=>t.activeKey=k),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(k,x)=>(e.openBlock(),e.createBlock(C,{key:x},{header:e.withCtx(()=>[t.customGroupEditTitleList[x]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:k.title,size:"small",onChange:h=>t.onTitleChange(h,x),onBlur:h=>t.onFinishEditTitle(x),onPressEnter:h=>t.onFinishEditTitle(x)},null,8,["value","onChange","onBlur","onPressEnter"])),[[_]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(x),["prevent","stop"])},e.toDisplayString(k.title),9,vi))]),extra:e.withCtx(()=>[e.createElementVNode("div",Mi,[x===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),x!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(m,{onClick:e.withModifiers(h=>t.onDeleteGroup(x),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.data,(h,L)=>(e.openBlock(),e.createBlock(g,{color:"red",checked:h.checked,"onUpdate:checked":B=>h.checked=B,class:"custom-group",key:L},{default:e.withCtx(()=>[e.createElementVNode("span",ji,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Ui=oe(Vi,[["render",Ri],["__scopeId","data-v-7e3049d2"]]);let ke=(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};var Gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo={},zi={get exports(){return Yo},set exports(t){Yo=t}};(function(t,o){(function(n,a){t.exports=a()})(Gi,function(){var n="month",a="quarter";return function(r,i){var s=i.prototype;s.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=s.add;s.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var l=s.startOf;s.startOf=function(c,p){var u=this.$utils(),m=!!u.u(p)||p;if(u.p(c)===a){var g=this.quarter()-1;return m?this.month(3*g).startOf(n).startOf("day"):this.month(3*g+2).endOf(n).endOf("day")}return l.bind(this)(c,p)}}})})(zi);const Hi=Yo;se.extend(Hi);const Yi=e.defineComponent({name:"Condition",components:{CloseOutlined:Kt,DownOutlined:Ol,AppstoreAddOutlined:Vo,ASelect:$.Select,AInput:$.Input,ADatePicker:$.DatePicker,AButton:$.Button,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem,ASubMenu:$.SubMenu,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,ARadioGroup:$.RadioGroup,ARadio:$.Radio,AInputNumber:$.InputNumber,ASelectOption:$.SelectOption,MenuOutlined:Xn},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},setup(t){var st,ct,At,dt,Le,Qe,tt,ot,ze,pt,ut,ft,nt;const o=(st=window==null?void 0:window.config)==null?void 0:st.pageId,n=e.inject(me),a=e.inject(ve),r=e.unref(e.inject(Me)),i=e.inject(gn),s=e.inject(Pe),d=e.ref(!1),l=se(),c=e.computed(()=>{var Y;const z=[];return(Y=e.unref(s))==null||Y.forEach(X=>{const{keyName:ne="",id:Z="",type:ce}=X;ce==="ecanRangePicker"?z.push({value:`${Z}-startTime`,label:`${ne||Z}-开始时间值`,keyName:`${ne||Z}-startTime`,id:Z},{value:`${Z}-endTime`,label:`${ne||Z}-结束时间值`,keyName:`${ne||Z}-endTime`,id:Z}):z.push({value:Z,label:`${ne||Z}`,keyName:`${ne||Z}`,id:Z})}),z}),p=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.dataViewId}),u=e.computed(()=>{var z;return(z=e.unref(n))==null?void 0:z.source}),m=e.ref(!1),g={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},C=[{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=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),w=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:""}]),_=[{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"}],k=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],x=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(ct=t.data)==null?void 0:ct.fieldName,fieldType:(At=t.data)==null?void 0:At.fieldType,rule:(dt=t.data)==null?void 0:dt.rule,id:(Le=t.data)==null?void 0:Le.id,fieldValue:L(),label:(Qe=t.data)==null?void 0:Qe.label,targetSource:"",typeGuid:(tt=t.data)==null?void 0:tt.typeGuid,indexCode:(ot=t.data)==null?void 0:ot.indexCode,indexCodeNum:(ze=t.data)==null?void 0:ze.indexCodeNum,dataType:((pt=t.data)==null?void 0:pt.dataType)||"",componentId:((ut=t.data)==null?void 0:ut.componentId)||"",useCurrentTime:!!((ft=t.data)!=null&&ft.useCurrentTime),keyValue:(nt=t.data)==null?void 0:nt.keyValue});function L(){const{fieldType:z="",dataType:Y="",fieldValue:X=""}=t.data;if(z==="DATE"&&Y==="time")return X&&se(X);if(Y==="component"){const ne=e.unref(c).find(Z=>Z.keyName===X);return ne?ne.value:X}else return X}const B=e.ref(!1),I=e.computed(()=>h.value.fieldType==="DATE"),A=e.computed(()=>{const z=t.type;let Y=[];const X=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],ne=["controlList","sqlConditions","variableList","variableConditions"];if(X.includes(z)){let Z=[];for(const ce in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ce)&&!ne.includes(ce)){const _e=e.unref(n)[ce];Array.isArray(_e)&&(X.includes(ce)?Z=Z.concat(_e.filter(at=>at.show)):Z=Z.concat(_e))}Y=Z}else["leftAxisList","rightAxisList","indicators"].includes(z)&&(Y=e.unref(i));return Y.map(Z=>({...Z,label:Z.title||Z.label,value:Z.name}))}),{updateCondition:E,deleteCondition:N,addCondition:O}=e.inject(yn,{updateCondition:(z,Y,X)=>{},deleteCondition:(z,Y)=>{},addCondition:(z,Y,X)=>{}}),M=()=>{N(t.index,t.path)};e.watch(h,z=>{const Y=J.cloneDeep(z);z.fieldType==="DATE"&&z.dataType!=="component"&&z.fieldValue&&(Y.fieldValue=z.fieldValue.format(z.dateFormat)),E(Y,t.index,t.path)},{deep:!0}),e.watch(d,z=>{h.value.fieldValue="",h.value.useCurrentTime=z});const P=z=>{var H;const Y=e.unref(A).find(W=>W.value===z)||{},{name:X,genericType:ne,id:Z,label:ce,typeGuid:_e,indexCode:at,indexCodeNum:U}=Y;h.value={id:Z,fieldName:X,fieldType:ne,label:ce,rule:"",fieldValue:ne==="DATE"?null:void 0,targetSource:"",typeGuid:_e,indexCode:at,indexCodeNum:U,dataType:"",useCurrentTime:!1,keyValue:((H=e.unref(h))==null?void 0:H.keyValue)||ke()}},S=z=>{const Y=e.unref(c).find(X=>X.value===z)||{};e.unref(h).componentId=Y.id||""},F=e.computed(()=>{const z=e.unref(h).fieldType;return console.log("unref(condition)",e.unref(h)),z==="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:"NOT_EQUAL"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"}]:z==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:z==="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"}]:[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]}),V=e.computed(()=>{let z="";const Y=e.unref(F).find(X=>X.value===e.unref(h).rule);return Y&&(z=Y.label),z}),j=e.computed(()=>{let z={fontSize:"12px"};return e.unref(V)||(z={...z,position:"absolute",right:"11px",top:"9px"}),z}),R=e.ref([]),y=async()=>{var z;if(!(e.unref(R).length>0))try{const Y=await a.post(`${Ve}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(h).fieldName,hrpIndexTypeGuid:e.unref(h).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:X,data:ne=[]}=Y.data;X&&(R.value=(z=ne==null?void 0:ne.slice(0,200))==null?void 0:z.map(Z=>({label:Z,value:Z})))}catch(Y){console.error(Y)}},b=z=>{e.unref(h).rule=z,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(z)&&y()},T=z=>{e.unref(h).dataType=z,e.unref(h).fieldValue=""},D=e.ref(),v=z=>{D.value=z,e.unref(h).fieldValue=(z==null?void 0:z.join(","))||""},G=z=>{const{keyPath:Y}=z;e.unref(h).rule=Y[0],e.unref(h).dataType=Y[1],e.unref(h).dateFormat=Y[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var ne,Z,ce,_e,at,U,H,W;if(h.value.dataType=((ne=t.data)==null?void 0:ne.dataType)||"",h.value.componentId=((Z=t.data)==null?void 0:Z.componentId)||"",h.value.keyValue=(ce=t.data)==null?void 0:ce.keyValue,e.unref(h).fieldType==="DATE"){const{activeKey:q,dateCalcTypes:ie=[]}=t.data||{};if(e.unref(h).dateFormat=(_e=t.data)==null?void 0:_e.dateFormat,e.unref(h).activeKey=q,e.unref(h).calcWays=((at=t.data)==null?void 0:at.calcWays)||[],e.unref(h).dateCalcTypes=ie,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),q===5){const re=e.unref(h).calcWays[0];if(re){const te=re.split("-");e.unref(f).expression=te[0],e.unref(f).around=te[1]}e.unref(f).unit=ie[0]||"YEAR"}else{e.unref(h).radioValue=((U=t.data)==null?void 0:U.radioValue)||"";const re=e.unref(w).find(te=>{var le;return te.key===((le=t.data)==null?void 0:le.activeKey)});re&&Ee(re,t.data)}}else D.value=((W=(H=t.data)==null?void 0:H.fieldValue)==null?void 0:W.split(","))||[];const{fieldType:z,fieldName:Y,rule:X}=h.value;z!=="DATE"&&Y&&X&&["IN","NOT_IN"].includes(X)&&y()});const K=z=>{if(e.unref(h).activeKey===z){e.unref(w)[z].radioValue=e.unref(h).radioValue,e.unref(w)[e.unref(h).activeKey]&&(e.unref(w)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(w)[z].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(w)[z].afterNum=e.unref(h).calcWays[0]));return}e.unref(w).forEach(Y=>{Y.beforeNum=0,Y.afterNum=0,Y.radioValue="1",Y.value=""})},Q=(z,Y)=>{m.value=!0;const X=z.target.value,ne=Y.type,Z=e.unref(h).dateFormat,ce=Math.abs(Y.beforeNum),_e=Y.afterNum;Y.value=pe(X,ne,Z,ce,_e)},ee=z=>{const Y=e.unref(h).activeKey;if(z!==Y)return;let X="";Y===0?X="years":Y===1?X="quarters":Y===2?X="months":Y===3?X="weeks":Y===4&&(X="days");const ne=e.unref(h).dateFormat,Z=e.unref(h).radioValue;let ce=0,_e=0;return Z==="1"?ce=Math.abs(e.unref(h).calcWays[0]):Z==="2"&&(_e=e.unref(h).calcWays[0]),pe(Z,X,ne,ce,_e)},ae=(z,Y,X,ne)=>{if(m.value=!0,Y.radioValue===ne){const Z=z.target.value;X==="+"?Y.value=se().add(Z,Y.type).format(e.unref(h).dateFormat):Y.value=se().subtract(Z,Y.type).format(e.unref(h).dateFormat)}},ye=(z,Y)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=Y,e.unref(h).radioValue=z.radioValue,z.radioValue==="1"?e.unref(h).calcWays[0]="-"+z.beforeNum:z.radioValue==="2"?e.unref(h).calcWays[0]=z.afterNum:z.radioValue==="3"?Y===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":z.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),Y===0?e.unref(h).dateCalcTypes=["YEAR"]:Y===1?e.unref(h).dateCalcTypes=["QUARTER"]:Y===2?e.unref(h).dateCalcTypes=["MONTH"]:Y===3?e.unref(h).dateCalcTypes=["WEEK"]:Y===4&&(e.unref(h).dateCalcTypes=["DAY"]),B.value=!1},he=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(f).unit],e.unref(h).calcWays[0]=`${e.unref(f).expression}-${e.unref(f).around}`,B.value=!1};function Ee(z,Y){const{radioValue:X="",calcWays:ne=[]}=Y;z.radioValue=X,ne!=null&&ne.length&&(X==="1"?z.beforeNum=Math.abs(ne[0]):X==="2"&&(z.afterNum=ne[0]))}function pe(z,Y,X,ne,Z){if(z==="1")return se().subtract(ne,Y).format(X);if(z==="2")return se().add(Z,Y).format(X);if(z==="3"){if(Y==="years")return se().startOf("year").format(X);if(Y==="quarters")return se().startOf("quarter").format(X);if(Y==="months")return se().startOf("month").format(X);if(Y==="days")return se().format(X)}else if(z==="4"){if(Y==="years")return se().endOf("year").format(X);if(Y==="quarters")return se().endOf("quarter").format(X);if(Y==="months")return se().endOf("month").format(X)}return""}const $e=(z,Y)=>Y.label.toLowerCase().indexOf(z.toLowerCase())>=0,et=e.computed(()=>!["IN","NOT_IN"].includes(e.unref(h).rule));return{fieldOptions:A,ruleOptions:F,onFieldChange:P,condition:h,valueOptions:R,onRuleChange:b,onDataTypeChange:T,onFieldValueSelectChange:v,fieldValues:D,onDelete:M,isDateType:I,formatList:C,tabDateList:w,compareList:_,menuRule:k,dateBtnLabel:V,downIconStyle:j,popoverVisible:B,dateRadioStyle:g,showTime:m,controlList:c,dataTypeList:x,customTabData:f,isUseCurrentTime:d,currentTime:l,isShowCustomDataType:et,handleMenuClick:G,changeTabInitDate:K,changeRadioValue:Q,getFieldValue:ee,blurCompare:ae,okDatePickConfig:ye,onChangeComponent:S,filterOption:$e,okCustomConfig:he,clickConditionMenu:({key:z})=>{O(t.path,t.index,z==="2"?"||":"&&")}}}}),vf="",Mf="",Wi={class:"condition"},qi=["title"],Ki={class:"rule"},Qi={class:"data-type"},Xi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Ji={class:"popover-content-wrap"},Zi={key:0,class:"use-current-time"},es={class:"tabFilterRadio"},ts={key:0},os={key:1},ns={style:{"margin-left":"10px"}},as={style:{"margin-left":"10px"}},rs={style:{position:"absolute",bottom:"10px"}},ls={style:{display:"flex"}},is={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function ss(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-dropdown"),C=e.resolveComponent("a-date-picker"),f=e.resolveComponent("a-checkbox"),w=e.resolveComponent("a-input-number"),_=e.resolveComponent("a-radio"),k=e.resolveComponent("a-radio-group"),x=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),L=e.resolveComponent("appstore-add-outlined"),B=e.resolveComponent("a-popover"),I=e.resolveComponent("a-input"),A=e.resolveComponent("menu-outlined"),E=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Wi,[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,(N,O)=>(e.openBlock(),e.createBlock(s,{key:O,value:N.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:N.label},e.toDisplayString(N.label),9,qi)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Ki,[t.isDateType?(e.openBlock(),e.createBlock(g,{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,N=>(e.openBlock(),e.createBlock(c,{key:N.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value?"color: #1890FF;":"")},e.toDisplayString(N.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,O=>{var M;return e.openBlock(),e.createBlock(c,{key:O.value,disabled:O.value==="component"&&!((M=t.controlList)!=null&&M.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value&&t.condition.dataType===O.value?"color: #1890FF;":"")},e.toDisplayString(O.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,P=>(e.openBlock(),e.createBlock(l,{key:P.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===N.value&&t.condition.dataType===O.value&&t.condition.dateFormat===P.value?"color: #1890FF;":"")},e.toDisplayString(P.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(m,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",Qi,[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,(N,O)=>(e.openBlock(),e.createBlock(s,{key:O,value:N.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,(!t.condition.fieldType||["TEXT","NUMBER"].includes(t.condition.fieldType))&&t.isShowCustomDataType]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Xi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(C,{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(C,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=N=>t.condition.fieldValue=N),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]=N=>t.condition.fieldValue=N),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(B,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=N=>t.popoverVisible=N),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Ji,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Zi,[e.createVNode(f,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=N=>t.isUseCurrentTime=N)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(N,O)=>(e.openBlock(),e.createBlock(x,{key:O,tab:N.label},{default:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(k,{value:N.radioValue,"onUpdate:value":M=>N.radioValue=M,onChange:M=>t.changeRadioValue(M,N)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",ts,"相对当前时间:"+e.toDisplayString(N.value),1)):(e.openBlock(),e.createElementBlock("div",os,"相对当前时间:"+e.toDisplayString(t.getFieldValue(O)),1)),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(w,{value:N.beforeNum,"onUpdate:value":M=>N.beforeNum=M,min:0,onBlur:M=>t.blurCompare(M,N,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ns,e.toDisplayString(N.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(_,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(w,{value:N.afterNum,"onUpdate:value":M=>N.afterNum=M,min:0,onBlur:M=>t.blurCompare(M,N,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",as,e.toDisplayString(N.afterLabel),1)]),_:2},1032,["style"]),N.beforeText?(e.openBlock(),e.createBlock(_,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),N.afterText?(e.openBlock(),e.createBlock(_,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",rs,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=M=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{onClick:M=>t.okDatePickConfig(N,O)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(x,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",ls,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=N=>t.customTabData.expression=N),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=N=>t.customTabData.unit=N),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=N=>t.customTabData.around=N)},{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"])]),e.createElementVNode("div",is,[e.createVNode(m,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=N=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(m,{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]=N=>{t.popoverVisible=!0})},[e.createVNode(L)])]),_: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"])):(!t.condition.fieldType||["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]=N=>t.condition.fieldValue=N),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(I,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=N=>t.condition.fieldValue=N)},null,8,["value"])),e.createVNode(g,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(l,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(l,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(A,{class:"more-icon"})]),_:1}),e.createVNode(E,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const cs=oe(Yi,[["render",ss],["__scopeId","data-v-d10a7ca9"]]),ds=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""},path:{type:String,default:""}},components:{Condition:cs}}),Pf="",ps={key:0,class:"condition-list"},us={key:0,class:"condition-container"},fs={key:0,class:"condition-text"},ms={key:1,class:"condition-text"},hs={class:"conditions"};function ys(t,o,n,a,r,i){const s=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",us,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",fs,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",ms,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",hs,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,type:t.type},null,8,["level","path","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,data:l,level:t.level,index:c,path:t.path||"",type:t.type},null,8,["data","level","index","path","type"]))],64))),128))])):e.createCommentVNode("",!0)}const gs=oe(ds,[["render",ys],["__scopeId","data-v-553c1496"]]),bs=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:$.Select,AInput:$.Input,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,i=>{i!=null&&i.length&&o("update",i)},{deep:!0}),e.onMounted(()=>{var i;(i=t.list)!=null&&i.length?a.value=J.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:i=>{i.rule="",i.num=0,i.name=""}}}}),jf="",ra=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Cs={class:"truncations"},ws={class:"rule"},ks={class:"field-value"},_s={class:"field-value"},xs=ra(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Ss=ra(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),Ns=["onClick"];function As(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),l=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Cs,[(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",ws,[e.createVNode(s,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ks,[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",_s,[xs,e.createVNode(l,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Ss]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,Ns)]))),128))])}const Ts=oe(bs,[["render",As],["__scopeId","data-v-f543c690"]]),be=(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},Es=t=>t.replace(/\\n/g,`
59
+ `),gt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Je=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Je(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},la=(t,o)=>{var f;const n=J.cloneDeep((t==null?void 0:t.controlList)||[]),{classificationList:a=[],rowHeaderList:r=[],dimensionList:i=[],seriesList:s=[],leftAxisList:d=[],rightAxisList:l=[],queryColumnList:c=[],indicators:p=[]}=t;sa(n,o);const u=n,m=[...a,...r,...i,...s,...d,...l,...c,...p],g=[];for(const w of m){const _=Je((w==null?void 0:w.conditions)||[]);if(_!=null&&_.length){const k=_.filter(x=>ca(x,o)?(x==null?void 0:x.dataType)==="component":!1).map(x=>{const h=ca(x,o),L={};return x!=null&&x.dateFormat&&(L.format=x.dateFormat),{conditionKey:x.fieldName,conditionLabel:x.fieldName,conditionName:x.fieldName,conditionValueType:x.fieldType,id:h.id,keyName:x.fieldValue,rule:x.rule,notGlobal:!0,indexCode:x.indexCode,typeGuid:x.typeGuid,indexCodeNum:x.indexCodeNum,...L}});if(k!=null&&k.length)for(const x of k)g.find(h=>h.keyName===x.keyName)||g.push(x)}}const C=g.length;for(let w=0;w<C;w++){const _=g[w];if(_&&!((f=Object.keys(_))!=null&&f.length)||(_==null?void 0:_.conditionKey)==="parentCode")continue;const{id:k,keyName:x,prop:h,format:L,dataType:B="component",customValue:I}=_,A=ia(_);Wo({sqlCondition:A,renderUsedComponents:o,id:k,dateFormat:L,prop:h,keyName:x,dataType:B,customValue:I}),u.push(A)}for(let w=u.length-1;w>=0;w--){const _=u[w];_.globalCondition||Je(u).find(x=>x.alias===_.alias&&x.globalCondition)&&u.splice(w,1)}return u},Bt=(t,o)=>{const n=[];if(t!=null&&t.length){for(const a of t)if(a.variableName){const r={variateName:a.variableName,globalCondition:!1,valueType:a.variableType,alias:a.keyName||""};Wo({sqlCondition:r,renderUsedComponents:o,id:a.id,dateFormat:a.format,prop:a.dateTypeValue,keyName:a.keyName,dataType:a.dataType,customValue:a.variableValue,operateType:a.operateType,operateMode:a.operateMode,operateValue:a.operateValue}),a.format&&(r.dateFormat=a.format),a.label&&(r.label=a.label),n.push(r)}}return n};function ia(t){const{id:o,keyName:n,conditionLabel:a,conditionKey:r,conditionValueType:i,prop:s,rule:d="NONE",notGlobal:l=!1,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m="component"}=t;let g=n||o;return g&&s&&(g+=`-${s}`),{rule:d,label:a,fieldName:r,fieldValue:"",valueType:i,alias:g,globalCondition:!l,indexCode:c,indexCodeNum:p,typeGuid:u,dataType:m}}const Ls=["keyValue","conditionKey","conditionLabel","conditionName","conditionValueType","customValue","id","keyName"];function sa(t,o){if(t!=null&&t.length)for(const n of t)if(n!=null&&n.conditions)sa(n.conditions,o);else{const{id:a,keyName:r,prop:i,format:s,dataType:d="component",customValue:l}=n,c=ia(n);Wo({sqlCondition:c,renderUsedComponents:o,id:a,dateFormat:s,prop:i,keyName:r,dataType:d,customValue:l});for(const p in c)n[p]=c[p];for(const p of Ls)delete n[p]}}function Wo(t){const{sqlCondition:o,renderUsedComponents:n,id:a,dateFormat:r,prop:i,keyName:s,dataType:d,customValue:l,operateValue:c,operateMode:p,operateType:u}=t,m=n.find(x=>x.id===a),{value:g,format:C="YYYY-MM-DD",operate:f,type:w="",useCurrentTime:_}=m||{},k=r||C;if(be(w,"date")){let x;if(_?x=se():x=se(g),f&&g){const{mode:h,type:L,value:B}=f;if(B)switch(L){case"add":x=x.add(B,h);break;case"minus":x=x.subtract(B,h);break}}if(c&&p&&u)switch(u){case"add":x=x.add(c,p);break;case"minus":x=x.subtract(c,p);break}o.fieldValue=(x==null?void 0:x.format(k))||"",o.dateFormat=k}else if(w==="ecanRangePicker"){const{interval:x,intervalUnit:h,startTime:L,endTime:B}=m||{};let I=i;if(!i){const E=s==null?void 0:s.split("-");E!=null&&E.length&&(I=E[E.length-1])}if(!I)return;let A=null;if(_&&(I==="startTime"?A=se().subtract(x,h):I==="endTime"&&(A=se())),m[I]&&(A=se(m[I])),f){const{type:E,value:N,mode:O}=f;switch(E){case"add":A=A&&A.add(N,O);break;case"minus":A=A&&A.subtract(N,O)}}if(c&&p&&u){if(c==="rangeValue"){if(L&&B){const E=se(B).diff(se(L),p)+1;switch(u){case"add":A=A&&A.add(E,p);break;case"minus":A=A&&A.subtract(E,p)}}}else if(!isNaN(+c))switch(u){case"add":A=A&&A.add(c,p);break;case"minus":A=A&&A.subtract(c,p)}}if(A&&(o.fieldValue=A==null?void 0:A.format(k)),I==="rangeValue"&&L&&B){const E=Vs(k);E&&(o.fieldValue=se(B).diff(se(L),E)+1)}o.dateFormat=k}else{const x=g&&g.match(/\{(.+?)\}/g);x!=null&&x.length?o.fieldValue="":o.fieldValue=g}d===""&&(o.fieldValue=l||"")}const Qt=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 ca(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}function Vs(t){const o=t.split("-");let n="";if(o!=null&&o.length)switch(o[o.length-1]){case"YYYY":n="year";break;case"MM":n="month";break;case"DD":n="day";break}return n}const Bs=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:gs,TruncationList:Ts,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var P;const n=e.ref("1"),a=()=>{var S;return`添加过滤条件-${((S=t.item)==null?void 0:S.label)||""}`},r=e.inject(me),i=e.inject(xe),s=e.inject(Pe),d=e.computed(()=>{var S;return(S=e.unref(r))==null?void 0:S.dataSourceId}),l=e.inject(Ye),c=e.inject(zt),p=e.ref([]),u=e.ref([]),m=e.ref(!1),g=S=>{var F;for(const V of S)(F=V.conditions)!=null&&F.length?g(V.conditions):V.keyValue=ke()};e.watch(m,S=>{var F,V,j,R;if(S){if(Array.isArray((F=t.item)==null?void 0:F.conditions)){const y=J.cloneDeep(((V=t.item)==null?void 0:V.conditions)||[]);g(y),p.value=y}Array.isArray((j=t.item)==null?void 0:j.truncations)?u.value=J.cloneDeep((R=t.item)==null?void 0:R.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]}window.changeShowTable&&window.changeShowTable(!S)},{flush:"post"});let C=!1;const f=S=>{var F;C=!0,e.unref(p)==null||((F=e.unref(p))==null?void 0:F.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==S?p.value=[{join:S,conditions:[e.unref(p)[0],{keyValue:ke()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===S&&p.value[0].conditions.push({keyValue:ke()}))};e.provide(yn,{updateCondition(S,F,V){var y;C=!0;let j=e.unref(p);const R=V.split("-");if(R!=null&&R.length)for(const b of R)if(j[b])j=(y=j[b])==null?void 0:y.conditions;else break;Array.isArray(j)&&j[F]&&(j[F]=S)},deleteCondition(S,F){var R,y,b;C=!0;let V=e.unref(p);const j=F.split("-");if(j!=null&&j.length){for(const T of j)if(V[T])V=(R=V[T])==null?void 0:R.conditions;else break;if(Array.isArray(V)&&V[S])if(V.splice(S,1),V.length===1){if(j.length>0){const T=j.length-1,D=j[T],v=j.slice(0,T);let G=e.unref(p),K="";for(const Q of v)if(G[Q])K=(y=G[Q])==null?void 0:y.join,G=(b=G[Q])==null?void 0:b.conditions;else break;if(K===V[0].join){if(Array.isArray(V[0].conditions)){const Q=J.cloneDeep(V[0].conditions);G.splice(+D,1),G.splice(+D,0,...Q)}}else G[D]=V[0]}}else V.length===0&&(p.value=[])}},addCondition(S,F,V){var b,T;C=!0;let j=e.unref(p),R="";const y=S.split("-");if(y!=null&&y.length){for(const D of y)if(j[D])R=(b=j[D])==null?void 0:b.join,j=(T=j[D])==null?void 0:T.conditions;else break;if(R===V)j.splice(F+1,0,{keyValue:ke()});else{const D=J.cloneDeep(j[F]);j[F]={join:V,conditions:[D,{keyValue:ke()}]}}}}});const w=S=>{C=!0,u.value=S},_=e.computed(()=>{var F;const S=[];return(F=e.unref(s))==null||F.forEach(V=>{const{keyName:j="",id:R="",type:y}=V;y==="ecanRangePicker"?S.push({value:`${R}-startTime`,label:`${j||R}-开始时间值`,keyName:`${j||R}-startTime`},{value:`${R}-endTime`,label:`${j||R}-结束时间值`,keyName:`${j||R}-endTime`}):S.push({value:R,label:`${j||R}`,keyName:`${j||R}`})}),S}),k=()=>{var b,T,D;const S=Je(((b=e.unref(r))==null?void 0:b.controlList)||[]),F=((T=e.unref(r)[t.type])==null?void 0:T.slice())||[],V=Je(J.cloneDeep(F[t.index].conditions));F[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((D=e.unref(u))!=null&&D.length)&&(F[t.index].truncations=e.unref(u));const j=Je(e.unref(p));for(const v of j)if(v.dataType==="component"&&v.fieldValue){const G=e.unref(_).find(K=>K.value===v.fieldValue);G&&(v.fieldValue=G.keyName)}const R=V.filter(v=>!j.find(G=>G.componentId===v.componentId)).filter(v=>!S.find(G=>G.id===v.componentId)),y=j.filter(v=>!V.find(G=>G.componentId===v.componentId));x(R,y),i({[t.type]:F,sqlConditions:la({...e.unref(r),[t.type]:F},e.unref(s))})};function x(S,F){var j;const V=S.map(R=>({...R,delete:!0})).concat(F.map(R=>({...R,add:!0})));for(const R of V){const y=e.unref(s).find(b=>b.id===R.componentId);if(y){const{type:b,id:T,events:D=[]}=y,v=Qt(b);if(R.add)D.find(G=>{var K;return G.on===v&&G.target===((K=e.unref(l))==null?void 0:K.id)&&G.emit==="refreshData"})||c({id:T,events:[...D,{on:v,target:(j=e.unref(l))==null?void 0:j.id,emit:"refreshData"}].reverse()});else if(R.delete){const G=D.findIndex(K=>{var Q;return K.on===v&&K.target===((Q=e.unref(l))==null?void 0:Q.id)&&K.emit==="refreshData"});G!==-1&&(D.splice(G,1),c({id:T,events:D}))}}}}const h=()=>{m.value=!0},L=()=>{p.value=[],m.value=!1},B=()=>{C&&k(),C=!1,L()},I=()=>{L()},A=e.inject(ve),E=e.unref(e.inject(Me)),N=(P=window==null?void 0:window.config)==null?void 0:P.pageId,O=e.ref([]);e.provide(gn,O);const M=async S=>{var F;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:V,indexCode:j}=S,R=await A.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:N,dataSourceId:e.unref(d),indexGuid:V,indexCode:j},{headers:{Authentication:E,operateContext:"ygt"}}),{success:y,data:b=[]}=R.data;y&&((F=b==null?void 0:b.dataViewColumns)!=null&&F.length)&&(O.value=b.dataViewColumns.map(T=>({...T,label:T.title||T.label})))}catch(V){console.error(V)}};return e.watch(()=>t.item,S=>{S&&m.value&&M(S)}),o({showModal:h}),{visible:m,onOk:B,onCancel:I,handleTitle:a,conditionList:p,truncationList:u,addCondition:f,onUpdatetruncation:w,activeKey:n}}}),Rf="",Os={class:"header"},Is={class:"header"};function Fs(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),l=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]=m=>t.activeKey=m)},{default:e.withCtx(()=>[e.createVNode(l,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[0]||(o[0]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[1]||(o[1]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=m=>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(l,{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",Is,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{class:"add-and-condition",onClick:o[4]||(o[4]=m=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(s,{class:"add-or-condition",onClick:o[5]||(o[5]=m=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[6]||(o[6]=m=>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 Ds=oe(Bs,[["render",Fs],["__scopeId","data-v-498bb1e7"]]),$s=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:$.Input,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(xe),i=e.ref(),s=p=>{const{showLabel:u="",label:m=""}=p;i.value=u||m||"",n.value=!0},d=()=>{n.value=!1},l=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=i.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:s}),{visible:n,onOk:l,onCancel:c,fieldName:i}}}),Uf="",vs=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),Ms={class:"config-name"},Ps=vs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function js(t,o,n,a,r,i){const s=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",Ms,[Ps,e.createVNode(s,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const Rs=oe($s,[["render",js],["__scopeId","data-v-de6a1755"]]),Us=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(xe),i=e.inject(Pe),s=e.inject(Ye),d=e.inject(zt),l=e.ref(),c=e.computed(()=>{var _;return(_=e.unref(i))==null?void 0:_.filter(k=>k.keyName!=="")});let p=[];const u=_=>{const{sortCpnts:k=[]}=_;p=J.cloneDeep(k),l.value=J.cloneDeep(k),n.value=!0},m=()=>{n.value=!1},g=()=>{var L,B;const _=Je(((L=e.unref(a))==null?void 0:L.controlList)||[]),k=p.filter(I=>!e.unref(l).includes(I)).filter(I=>!_.find(A=>A.id===I)),x=e.unref(l).filter(I=>!p.includes(I)).filter(I=>!_.find(A=>A.id===I)),h=k.map(I=>({componentId:I,delete:!0})).concat(x.map(I=>({componentId:I,add:!0})));for(const I of h){const A=e.unref(i).find(E=>E.id===I.componentId);if(A){const{type:E,id:N,events:O=[]}=A,M=Qt(E);if(I.add)O.find(P=>{var S;return P.on===M&&P.target===((S=e.unref(s))==null?void 0:S.id)&&P.emit==="refreshData"})||d({id:N,events:[...O,{on:M,target:(B=e.unref(s))==null?void 0:B.id,emit:"refreshData"}].reverse()});else if(I.delete){const P=O.findIndex(S=>{var F;return S.on===M&&S.target===((F=e.unref(s))==null?void 0:F.id)&&S.emit==="refreshData"});P!==-1&&(O.splice(P,1),d({id:N,events:O}))}}}},C=()=>{var k;g();const _=((k=e.unref(a)[t.type])==null?void 0:k.slice())||[];_[t.index].sortCpnts=l.value,r({[t.type]:_}),m()},f=()=>{m()},w=(_,k)=>{var x;return(x=k==null?void 0:k.keyName)==null?void 0:x.toLowerCase().includes(_==null?void 0:_.toLowerCase())};return o({showModal:u}),{visible:n,onOk:C,onCancel:f,idFilterOption:w,fieldName:l,usedComponentList:c}}}),Gf="",Gs=t=>(e.pushScopeId("data-v-08af1ef8"),t=t(),e.popScopeId(),t),zs={class:"sort-by-cpnt"},Hs=Gs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function Ys(t,o,n,a,r,i){const s=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",zs,[Hs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),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 Ws=oe(Us,[["render",Ys],["__scopeId","data-v-08af1ef8"]]),qs=e.defineComponent({name:"DimByCount",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:$.Select,AModal:$.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(me),r=e.inject(xe),i=e.ref(),s=e.ref([]),d=(m,g)=>{const{dimByCount:C=""}=m;i.value=C,s.value=g.filter(f=>["DIM","BUILT_IN_DIM"].includes(f.scope)).map(f=>({label:f.title||f.name,value:f.typeGuid})),n.value=!0},l=()=>{n.value=!1},c=()=>{var g;const m=((g=e.unref(a)[t.type])==null?void 0:g.slice())||[];m[t.index].dimByCount=i.value,r({[t.type]:m}),l()},p=()=>{l()},u=(m,g)=>{var C;return(C=g==null?void 0:g.label)==null?void 0:C.toLowerCase().includes(m==null?void 0:m.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:i,dimensionList:s}}}),zf="",Ks=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),Qs={class:"dim-by-count"},Xs=Ks(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Js(t,o,n,a,r,i){const s=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",Qs,[Xs,e.createVNode(s,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=l=>t.fieldName=l),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Zs=oe(qs,[["render",Js],["__scopeId","data-v-e8608437"]]),qo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(i=>i.key===t)?n=r.key:qo(t,r.children)&&(n=qo(t,r.children)))}return n},ec=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:$.Row,ACol:$.Col,ATextarea:$.Textarea,APopover:$.Popover,AInputSearch:$.InputSearch,ATree:$.Tree,ARadioGroup:$.RadioGroup,ARadioButton:$.RadioButton,DoubleRightOutlined:El},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(ve),a=e.unref(e.inject(Me)),r=e.inject(me),i=e.computed(()=>e.unref(r).leftAxisList||[]),s=e.computed(()=>e.unref(r).variableList||[]),d=e.computed(()=>e.unref(r).rightAxisList||[]),l=e.computed(()=>e.unref(r).indicators||[]),c=e.computed(()=>e.unref(r).queryColumnList||[]),p=e.computed(()=>{const E=e.unref(i).concat(e.unref(d)).concat(e.unref(l)).concat(e.unref(c));return t.mode==="edit"?(E==null?void 0:E.filter(N=>{var O;return N.id!==((O=t.item)==null?void 0:O.id)}))||[]:E||[]}),u=e.computed(()=>s.value.filter(E=>!E.randomKey)),m=e.computed({get:()=>t.value||"",set:E=>{o("update:value",E),o("change",E)}}),g=e.ref("1"),C=e.ref(""),f=E=>{const N=document.getElementById("calTextArea");let O=m.value;if(document.selection){const M=document.selection.createRange();M.text=E}else if(typeof N.selectionStart=="number"&&typeof N.selectionEnd=="number"){const M=N.selectionStart,P=N.selectionEnd;let S=M;O=O.substring(0,M)+E+O.substring(P,O.length),S+=E.length,N.selectionStart=N.selectionEnd=S}else O+=E;m.value=O},w=["+","-","*","/","(",")"],_=(E,N)=>{let O="";switch(N){case"name":{O="${"+E+"}";break}case"function":{O=E+"()";break}default:O=E}f(O)},k=[],x=e.ref([]),h=e.ref(!0),L=e.ref([]),B=E=>{var N;for(const O of E)(N=O==null?void 0:O.children)!=null&&N.length?B(O.children):k.push({key:O.key,title:O.title})},I=async()=>{try{const E=await n.get(`${Ve}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:N,data:O=[]}=E.data;N&&(O!=null&&O.length)&&(B(O),L.value=O)}catch(E){console.error(E)}},A=E=>{x.value=E,h.value=!1};return e.watch(C,E=>{const N=k.map(O=>O.title.indexOf(E)>-1?qo(O.key,L.value):null).filter((O,M,P)=>O&&P.indexOf(O)===M);x.value=N,C.value=E,h.value=!0}),e.onMounted(()=>{I()}),{fieldList:p,varList:u,myValue:m,calculMethods:w,funcDescsData:L,searchFuncValue:C,expandedKeys:x,autoExpandParent:h,activeKey:g,selectedElem:_,onExpand:A}}}),Hf="",Yf="",tc={class:"formula-calculation"},oc={class:"field-area"},nc={style:{"text-align":"center",padding:"10px 0"}},ac=["onClick"],rc=["onClick"],lc={class:"cal_right_bottom"},ic={class:"cal_fu"},sc=["onClick"],cc={class:"function-wrap"},dc={class:"wrap-search"},pc={class:"tree-box"},uc={key:0},fc={style:{color:"#f50"}},mc={key:1},hc=["onClick"],yc={class:"cal_a"};function gc(t,o,n,a,r,i){const s=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group"),l=e.resolveComponent("a-col"),c=e.resolveComponent("a-textarea"),p=e.resolveComponent("a-input-search"),u=e.resolveComponent("a-tree"),m=e.resolveComponent("double-right-outlined"),g=e.resolveComponent("a-popover"),C=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",tc,[e.createVNode(C,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(l,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",oc,[e.createElementVNode("div",nc,[e.createVNode(d,{value:t.activeKey,"onUpdate:value":o[0]||(o[0]=f=>t.activeKey=f),size:"small"},{default:e.withCtx(()=>[e.createVNode(s,{value:"1"},{default:e.withCtx(()=>[e.createTextVNode("数值字段("+e.toDisplayString(t.fieldList.length)+")",1)]),_:1}),e.createVNode(s,{value:"2"},{default:e.withCtx(()=>[e.createTextVNode("全局变量("+e.toDisplayString(t.varList.length)+")",1)]),_:1})]),_:1},8,["value"])]),t.activeKey==="1"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.fieldList,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:_=>t.selectedElem(f.label,"name")},e.toDisplayString(f.label),9,ac))),128)):e.createCommentVNode("",!0),t.activeKey==="2"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.varList,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:w,onClick:_=>t.selectedElem(f.variableName,"name")},e.toDisplayString(f.variableName),9,rc))),128)):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(l,{span:18},{default:e.withCtx(()=>[e.createVNode(c,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[1]||(o[1]=f=>t.myValue=f),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",lc,[e.createElementVNode("ul",ic,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(f,w)=>(e.openBlock(),e.createElementBlock("li",{onClick:_=>t.selectedElem(f,"symbol"),key:w},e.toDisplayString(f),9,sc))),128))]),e.createVNode(g,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",cc,[e.createElementVNode("div",dc,[e.createVNode(p,{value:t.searchFuncValue,"onUpdate:value":o[2]||(o[2]=f=>t.searchFuncValue=f),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",pc,[e.createVNode(u,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:f,leaf:w})=>[f.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",uc,[e.createTextVNode(e.toDisplayString(f.substr(0,f.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",fc,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(f.substr(f.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",mc,e.toDisplayString(f),1)),w?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:_=>t.selectedElem(f,"function")},"插入",8,hc)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",yc,[e.createTextVNode(" 更多函数 "),e.createVNode(m,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const bc=oe(ec,[["render",gc],["__scopeId","data-v-ba051d9b"]]),Cc=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:bc,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:ti},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(Pe),a=e.inject(me),r=e.inject(xe),i=e.computed(()=>e.unref(n)),s=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const P=["leftAxisList","rightAxisList","queryColumnList","indicators"];let S=[];for(const F of P)Object.prototype.hasOwnProperty.call(e.unref(a),F)&&(S=S.concat(e.unref(a)[F]));return S}),l={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"},m=e.ref({}),g=e.ref(),C=e.ref(!1),f=e.ref();e.watch(C,P=>{if(P)if(t.mode==="edit"){const{label:S,calcType:F,formula:V,builtInValueSource:j,builtInFormula:R,builtInCalcWay:y}=t.item;if(f.value={label:S,calcType:F,formula:V,builtInValueSource:j,builtInFormula:R,builtInCalcWay:y},R==="DATE_OFFSET"){const b=y.split("-");(b==null?void 0:b.length)===3&&(m.value={value:b[0],unit:b[1],around:b[2]})}}else t.mode==="add"&&(f.value=J.cloneDeep(p),m.value=J.cloneDeep(u));else f.value=J.cloneDeep(p),m.value=J.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!P)},{immediate:!0,deep:!0});let w=!1;const _=()=>{w=!0},k=P=>{const S=e.unref(i).find(F=>F.id===P);S&&(f.value.builtInCalcWay=S.keyName),w=!0},x=()=>{var j;const P=((j=e.unref(a)[t.type])==null?void 0:j.slice())||[],{label:S,builtInFormula:F}=e.unref(f)||{},V={};if(F==="DATE_OFFSET"&&(V.builtInCalcWay=`${e.unref(m).value}-${e.unref(m).unit}-${e.unref(m).around}`),t.mode==="add"){const R=ke();P.push({...e.unref(f),...V,id:R,show:!0,name:S})}else t.mode==="edit"&&(P[t.index]={...P[t.index],...e.unref(f),...V,name:S});r({[t.type]:P})},h=()=>{C.value=!0},L=()=>{C.value=!1},B=async(P,S)=>{if(S==="")return Promise.reject(new Error("请输入指标名"));{const F=e.unref(d).find(V=>V.label===S);return F?F.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},I=e.computed(()=>{let P={label:[{required:!0,validator:B,trigger:"change"}]};return f.value.calcType==="BUILT_IN"&&(P={...P,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),P}),A=()=>{g.value.validate().then(()=>{w&&x(),w=!1,L()})},E=()=>{g.value.clearValidate(),L()},N=()=>{w=!0,e.unref(f).builtInCalcWay=""},O=e.computed(()=>{let P="";const S=e.unref(f).builtInCalcWay,F=e.unref(f).builtInValueSource;if(!F||!S)return P;switch(e.unref(f).builtInFormula){case"BUILT_IN_RANK":{S==="ASC"?P="【"+F+"】由小到大在所有值中的排名":P="【"+F+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{P=`所有【】的
60
+ `,S==="ASC"?P=P+"【"+F+"】由小到大的组内的排名":P=P+"【"+F+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let V="";switch(S){case"SUM":{V="求和";break}case"AVG":{V="求平均值";break}case"MIN":{V="求最小值";break}case"MAX":{V="求最大值";break}}P="将所有【"+F+"】"+V;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let V="";switch(P=`所有【】的
61
+ `,S){case"SUM":{V="求和";break}case"AVG":{V="求平均值";break}case"MIN":{V="求最小值";break}case"MAX":{V="求最大值";break}}P=P+"将所有【"+F+"】"+V;break}}return P}),M=(P,S)=>S.keyName.toLowerCase().indexOf(P.toLowerCase())>=0;return o({showModal:h}),{visible:C,onCancel:E,labelCol:l,wrapperCol:c,formState:f,builtInValueSourceList:s,onOK:A,onChange:_,formRules:I,accessLogic:O,formRef:g,onChangeBuiltInFormula:N,componentList:i,onChangeComponent:k,filterOption:M,offsetConfig:m}}}),Wf="",qf="",wc={key:0,class:"accesstip"},kc={style:{display:"flex","align-items":"center"}};function _c(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),m=e.resolveComponent("a-input-number"),g=e.resolveComponent("question-circle-outlined"),C=e.resolveComponent("a-tooltip"),f=e.resolveComponent("a-form"),w=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(w,{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(f,{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(s,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=_=>t.formState.label=_),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]=_=>t.formState.calcType=_),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(l,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(l,{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]=_=>t.formState.formula=_),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]=_=>t.formState.builtInFormula=_),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(l,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(l,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(l,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(l,{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]=_=>t.formState.builtInValueSource=_),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(_,k)=>(e.openBlock(),e.createBlock(l,{key:k,value:_.label,disabled:t.mode==="edit"&&t.item.label===_.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.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]=_=>t.formState.builtInCalcWay=_),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(l,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(l,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(l,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(l,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(l,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(l,{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",wc," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+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]=_=>t.formState.builtInValueSource=_),"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",kc,[e.createVNode(m,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=_=>t.offsetConfig.value=_),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]=_=>t.offsetConfig.unit=_),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{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]=_=>t.offsetConfig.around=_),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(l,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(C,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(g,{class:"icon",style:{color:"#40a9ff","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 xc=oe(Cc,[["render",_c],["__scopeId","data-v-33575cd9"]]),Sc=e.defineComponent({name:"DataConfigCard",directives:{focus:aa},components:{CalculationModal:xc,FilterModal:Ds,CustomGroupModal:Ui,SettingOutlined:ci,DeleteOutlined:Yn,CopyOutlined:kl,InfoCircleOutlined:$l,CustomSortModal:Li,PlusOutlined:Xl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:Tt,ConfigName:Rs,SortByCpnt:Ws,DimByCount:Zs},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(me),a=e.inject(xe),r=e.inject(Pe),i=["leftAxisList","rightAxisList","indicators"],s=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],d=e.inject(go),l=e.ref(),c=(U={})=>{var q;const{type:H}=t;if(e.unref(d)==="SQL_VIEW")return!0;let W=!1;if(["IDX","BUILT_IN_IDX"].includes(U.scope)?i.includes(H)&&(W=!0):["DIM","BUILT_IN_DIM"].includes(U.scope)&&s.includes(H)&&(W=!0),H==="dimensionList"){const ie=((q=e.unref(n)[H])==null?void 0:q.slice())||[];(ie==null?void 0:ie.length)===1&&(W=!1)}return W},p=e.computed(()=>e.unref(ce).type==="ecanDataSelect"&&t.type==="indicators"),u=(U="{}")=>{var H,W;try{const q=JSON.parse(U);if(!c(q))return;const ie=((H=e.unref(n)[t.type])==null?void 0:H.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!be(e.unref(ce).type,["list","circulate"])||e.unref(p))&&ie.forEach(te=>{te.show=!1}),g(ie,q),q.randomKey=ke(),ie.push(q);const re={};if(["IDX","BUILT_IN_IDX"].includes(q.scope)){let te=[];const le=sessionStorage.getItem("indicator-variates");if(le){const ue=JSON.parse(le);if(ue!=null&&ue.length){te=((W=e.unref(n))==null?void 0:W.variableList)||[];for(const de of ue)te.unshift({...de,dataType:"",id:null,dateTypeValue:null,format:de.valueFormat&&de.valueFormat.toUpperCase()||null,variableName:de.name,variableType:de.valueType,label:q.label,randomKey:q.randomKey,keyValue:ke()})}}re.variableList=te,re.variableConditions=Bt(te,r)}a({[t.type]:ie,...re}),sessionStorage.setItem("indicator-list-item",""),sessionStorage.setItem("indicator-variates","")}catch(q){console.error(q)}},m=(U="{}")=>{var H;try{const{cardItem:W,type:q,index:ie}=JSON.parse(U);if(!c(W)||q===t.type)return;const re=((H=e.unref(n)[t.type])==null?void 0:H.slice())||[];g(re,W),re.push(W);const te=e.unref(n)[q].slice()||[];te.splice(ie,1),a({[t.type]:re,[q]:te})}catch(W){console.error(W)}};function g(U,H){const W=[];if(U.forEach(q=>{q.label.includes(H.label)&&W.push(q.label.split(H.label)[1])}),W.length>=1){for(let q=1;q<=W.length;q++)if(!W.includes(q+"")){H.label=H.label+q;break}}}const C=(U,H)=>{var ie,re;const W=(ie=U.target)==null?void 0:ie.checked,q=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[];(t.type==="seriesList"||t.type==="classificationList"&&!be(e.unref(ce).type,["list","circulate"])||e.unref(p))&&q.forEach(te=>{te.show=!1}),q[H].show=W,a({[t.type]:q})},f=U=>{var W;const H=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];H.splice(U,1),a({[t.type]:H})},w=()=>{sessionStorage.setItem("indicator-card-item","")},_=()=>{const U=sessionStorage.getItem("indicator-list-item"),H=sessionStorage.getItem("indicator-card-item");U?u(U):H&&m(H)},k=U=>{var le,ue;const{newIndex:H,oldIndex:W,from:q,to:ie}=U,re=q.id,te=ie.id;if(H>=0&&W>=0){if(re===te){const de=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],He=de.splice(W,1)[0];He&&(de.splice(H,0,He),a({[t.type]:de}))}else if(t.type===te){const de=((ue=e.unref(n)[te])==null?void 0:ue.slice())||[];if(de!=null&&de.length){const He=de.splice(de.length-1,1)[0];He&&(de.splice(H,0,He),a({[t.type]:de}))}}}},x=(U,H)=>{const W=U.oldIndex,q=H[W];q&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:q,type:t.type,index:W}))},h=e.computed(()=>e.unref(n)[t.type]||[]),L=e.ref([]);let B=!1;e.watch(()=>e.unref(h).length,U=>{L.value=new Array(U).fill(!1)},{flush:"post",immediate:!0});const I=U=>{var W,q,ie;const H=((W=e.unref(n)[t.type])==null?void 0:W.slice())||[];if((q=H[U])!=null&&q.randomKey){const re=((ie=e.unref(n))==null?void 0:ie.variableList)||[];for(let te=re.length-1;te>=0;te--)re[te].randomKey===H[U].randomKey&&re.splice(te,1);a({variableConditions:Bt(re,r),variableList:re})}H.splice(U,1),a({[t.type]:H})},A=U=>{L.value[U]=!0},E=()=>{B=!0},N=(U,H,W)=>{var q,ie,re,te;if(L.value[H]=!1,B){const le=(q=U.target)==null?void 0:q.value,ue=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[],de=ue.filter(fe=>{var Ce;return(Ce=fe==null?void 0:fe.formula)==null?void 0:Ce.includes(W)}).map(fe=>fe.id),He=ue.filter(fe=>{var Ce;return(Ce=fe==null?void 0:fe.builtInValueSource)==null?void 0:Ce.includes(W)}).map(fe=>fe.id);if(de!=null&&de.length)for(const fe of de){const Ce=ue.find(mt=>mt.id===fe);Ce.formula=Ce.formula.replaceAll(W,le)}if(He!=null&&He.length)for(const fe of He){const Ce=ue.find(mt=>mt.id===fe);Ce.builtInValueSource=Ce.builtInValueSource.replaceAll(W,le)}if(ue[H].label=le,(re=ue[H])!=null&&re.randomKey){const fe=((te=e.unref(n))==null?void 0:te.variableList)||[],Ce=fe.filter(mt=>mt.randomKey===ue[H].randomKey);Ce!=null&&Ce.length&&Ce.forEach(mt=>{mt.label=le}),a({variableConditions:Bt(fe,r),variableList:fe})}a({[t.type]:ue})}B=!1},O="DEFAULT",M=e.computed(()=>{const U=[],{scope:H,label:W}=e.unref(l)||{};let q=e.unref(n)[t.type]||[];if(["DIM","BUILT_IN_DIM"].includes(H)&&(q=q.filter(le=>le.label===W)),H==="DIM"&&!e.unref(l).typeGuid.includes("_code")){const le=J.cloneDeep(e.unref(l));delete le.show,delete le.truncations,delete le.conditions,le.hrpIndexComplexid+="_code",le.id+="_code",le.typeGuid+="_code",le.label=le.name+"_编码",le.name=le.typeGuid,le.defaultCode=le.typeGuid,U.push(le)}const{leftAxisList:ie=[],rightAxisList:re=[],indicators:te=[]}=e.unref(n)||{};return[...q,...U,...ie,...re,...te]}),P=(U={},H,W="ASC")=>{var ue;const{label:q,name:ie,id:re,defaultCode:te}=U,le=((ue=e.unref(n)[t.type])==null?void 0:ue.slice())||[];re===O?delete le[H].sort:le[H].sort={label:q,columnName:ie,type:"NORMAL",order:W,defaultCode:te},a({[t.type]:le})},S=(U={},H="ASC")=>{const q={ASC:"升序",DESC:"降序"}[H],{sort:ie}=U,{label:re,order:te}=ie||{};return re&&te===H?`${q}(${re})`:q},F=e.ref(),V=e.ref(),j=e.ref(),R=e.ref(),y=(U={},H)=>{var W;F.value=U,V.value=H,(W=e.unref(j))==null||W.showModal(U)},b=U=>"排序"+(U!=null&&U.sort?"(已配置)":""),T=(U={},H)=>{var W;F.value=U,V.value=H,(W=e.unref(R))==null||W.showModal()},D=U=>"自定义分组"+((U==null?void 0:U.customGroup)!=null?"(已配置)":""),v=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],G=[{name:"是",value:1},{name:"否",value:0}],K=(U,H)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[H].aggregate=U,a({[t.type]:W})},Q=(U,H)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[H].distinct=U,a({[t.type]:W})},ee=(U,H)=>{var q;const W=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];W[H].dateFormat=U,a({[t.type]:W})},ae=(U="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[U]})`,ye=U=>`是否去重(${{0:"否",1:"是"}[U]||"否"})`,he=(U={})=>{var H;return"过滤"+(U!=null&&U.conditions&&((H=U==null?void 0:U.conditions)==null?void 0:H.length)>0?"(已配置)":"")},Ee=e.ref(),pe=e.ref(),$e=e.ref(),et=e.ref(),mo=(U={},H)=>{F.value=U,V.value=H,e.unref(Ee).showModal()},st=(U={},H)=>{F.value=U,V.value=H,e.unref(pe).showModal(U)},ct=(U={},H)=>{F.value=U,V.value=H,e.unref($e).showModal(U)},At=(U={},H)=>{F.value=U,V.value=H,e.unref(et).showModal(U,e.unref(Y))},dt=e.ref(),Le=e.ref("add"),Qe=(U,H,W)=>{var q;Le.value=U,U==="edit"&&(F.value=H,V.value=W),(q=e.unref(dt))==null||q.showModal()},tt=e.inject(ve),ot=e.unref(e.inject(Me)),ze=e.ref([]),pt=e.computed(()=>e.unref(n)[t.type]||{}),ut=async()=>{try{const U=await tt.post(`${Ve}/diagram/dimFields`,{},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:H,data:W=[]}=U.data;H&&(ze.value=W)}catch(U){console.error(U)}},ft=(U,H)=>{const W=e.unref(n)[t.type]||{};W[H]=U,a({[t.type]:W})},nt=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],z=e.ref({}),Y=e.ref([]),X=async(U,H)=>{var q;const{name:W}=H;if(!nt.includes(t.type)&&U&&gt(H,"indexCode")){const ie=await tt.post(`${Ve}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:H.id,indexCode:H.indexCode,pageId:(q=window==null?void 0:window.config)==null?void 0:q.pageId},{headers:{Authentication:ot,operateContext:"ygt"}}),{success:re,data:te}=ie.data;re&&te&&(Y.value=(te==null?void 0:te.dataViewColumns)||[],z.value[W]={name:te.name,code:te.indexCode})}},ne=U=>{l.value=U},Z=U=>{const H=document.createElement("input");document.body.appendChild(H),H.setAttribute("value",U),H.select(),document.execCommand("copy"),document.body.removeChild(H),$.message.success("复制成功")},ce=e.inject(Ye),_e=e.computed(()=>t.type==="indicators"&&e.unref(ce).type==="ecanTable"),at=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(ce).type==="ecanDataSelect"?ze.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:ut())}),{onCheckboxChange:C,onDropEnd:f,onDragItemEnd:w,onDragItemAdd:_,onDragItemSort:k,onDragItemStart:x,cardItemList:h,onDelete:I,onEdit:A,onCommitLabelChange:N,sortList:M,onSort:P,handleSortTitle:S,showCustomSortModal:y,customSortModalRef:j,currentItem:F,currentIndex:V,handleCustomSortTitle:b,handleCustomGroupTitle:D,customGroupModalRef:R,showCustomGroupModal:T,editLabelList:L,onLabelChange:E,aggregateList:v,distinctList:G,onAggregateChange:K,onDistinctChange:Q,onDateFormatChange:ee,handleAggregateTitle:ae,handleDistinctTitle:ye,onShowCalculationModal:Qe,handleFilterTitle:he,filterModalRef:Ee,configNameRef:pe,sortByCpntRef:$e,dimByCountRef:et,showFilterModal:mo,calculationModalRef:dt,calculationModalMode:Le,formatList:o,fieldOptions:ze,fieldData:pt,onFieldChange:ft,onVisibleChange:X,onClickSetting:ne,copyDataViewName:Z,dataViewMap:z,isShowConfigName:_e,showConfigNameModal:st,dimensionType:nt,isShowSortByCpnt:at,showSortByCpntModal:ct,dataSelectIndicators:p,showDimByCountModal:At}}}),Kf="",Qf="",bt=t=>(e.pushScopeId("data-v-8b897719"),t=t(),e.popScopeId(),t),Nc={class:"title"},Ac={class:"title-text"},Tc={class:"field-wrap"},Ec={class:"field-item"},Lc=bt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Vc={class:"field-item"},Bc=bt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Oc={class:"title"},Ic={class:"title-text"},Fc=bt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),Dc=bt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),$c={class:"card-item-wrap"},vc={class:"card-item-inner"},Mc=["onClick"],Pc=["onClick"],jc=["onClick"],Rc={style:{display:"flex","align-items":"center"}},Uc=["title"],Gc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),zc={style:{display:"flex","align-items":"center"}},Hc=["title"],Yc=bt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function Wc(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),l=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),m=e.resolveComponent("setting-outlined"),g=e.resolveComponent("a-menu-item"),C=e.resolveComponent("a-menu-divider"),f=e.resolveComponent("a-sub-menu"),w=e.resolveComponent("copy-outlined"),_=e.resolveComponent("a-menu"),k=e.resolveComponent("a-dropdown"),x=e.resolveComponent("delete-outlined"),h=e.resolveComponent("a-checkbox"),L=e.resolveComponent("draggable"),B=e.resolveComponent("custom-sort-modal"),I=e.resolveComponent("custom-group-modal"),A=e.resolveComponent("filter-modal"),E=e.resolveComponent("config-name"),N=e.resolveComponent("sort-by-cpnt"),O=e.resolveComponent("dim-by-count"),M=e.resolveComponent("calculation-modal"),P=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",Nc,[e.createElementVNode("div",Ac,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Tc,[e.createElementVNode("div",Ec,[Lc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=S=>t.onFieldChange(S,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Vc,[Bc,e.createVNode(s,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=S=>t.onFieldChange(S,"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",Oc,[e.createElementVNode("div",Ic,[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(l,{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(S=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),Dc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(L,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=S=>t.cardItemList=S),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]=S=>t.onDragItemStart(S,t.cardItemList))},{item:e.withCtx(({element:S,index:F})=>[e.createElementVNode("div",$c,[e.createVNode(h,{class:"card-item",checked:S.show,onChange:V=>t.onCheckboxChange(V,F)},{default:e.withCtx(()=>[e.createElementVNode("div",vc,[!t.editLabelList[F]&&S.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(V=>t.onEdit(F),["prevent","stop"])},e.toDisplayString(S.label),9,Mc)):e.createCommentVNode("",!0),!t.editLabelList[F]&&!S.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(V=>t.onEdit(F),["prevent","stop"])}," 请点击填入名字 ",8,Pc)):e.createCommentVNode("",!0),t.editLabelList[F]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":S.label,size:"small",onBlur:V=>t.onCommitLabelChange(V,F,S.label),onPressEnter:V=>t.onCommitLabelChange(V,F,S.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[P]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(S.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(V=>t.onShowCalculationModal("edit",S,F),["prevent","stop"])}," fx ",8,jc)):e.createCommentVNode("",!0),e.createVNode(k,{trigger:["click"],onVisibleChange:V=>t.onVisibleChange(V,S)},{overlay:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(g,{onClick:V=>t.showCustomSortModal(S,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(C),e.createVNode(g,{onClick:V=>t.showCustomGroupModal(S,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(C),S.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(f,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,V=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:V.value,onClick:j=>t.onDateFormatChange(V.value,F)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(S.dateFormat===V.value||!S.dateFormat&&V.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(V.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(C)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(g,{onClick:V=>t.showFilterModal(S,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(S)),1)]),_:2},1032,["onClick"]),e.createVNode(C),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{title:t.handleAggregateTitle(S.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,V=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:V.value,onClick:j=>t.onAggregateChange(V.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(C)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(g,{onClick:V=>t.showConfigNameModal(S,F)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(C)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(g,{onClick:V=>t.showSortByCpntModal(S,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(C)],64)):e.createCommentVNode("",!0),S.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(g,{onClick:V=>t.showDimByCountModal(S,F)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(C),e.createVNode(f,{title:t.handleDistinctTitle(S.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,V=>(e.openBlock(),e.createBlock(g,{style:{"white-space":"nowrap"},key:V.value,onClick:j=>t.onDistinctChange(V.value,F)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(C)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:0,onClick:V=>t.copyDataViewName(t.dataViewMap[S.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Rc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].name},[Gc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].name),1)],8,Uc),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[S.name]?(e.openBlock(),e.createBlock(g,{key:1,onClick:V=>t.copyDataViewName(t.dataViewMap[S.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",zc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[S.name].code},[Yc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[S.name].code),1)],8,Hc),e.createVNode(w,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(m,{class:"setting-icon",onClick:V=>t.onClickSetting(S)},null,8,["onClick"])]),_:2},1032,["onVisibleChange"]),e.createVNode(x,{class:"delete-icon",onClick:e.withModifiers(V=>t.onDelete(F),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(B,{item:t.currentItem,index:t.currentIndex,type:t.type,sortList:t.sortList,ref:"customSortModalRef"},null,8,["item","index","type","sortList"]),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(A,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(E,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(N,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(O,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(M,{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 qc=oe(Sc,[["render",Wc],["__scopeId","data-v-8b897719"]]),Kc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},Qc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:qc},setup(){const t=e.inject(Ye),o=e.computed(()=>{var l;return(l=e.unref(t))==null?void 0:l.type}),n=e.computed(()=>{var l;return!!((l=e.unref(t))!=null&&l.isGroupTable)}),a=e.ref({}),r=e.reactive([]),i=e.inject(xe),s=(l,c)=>Object.prototype.hasOwnProperty.call(l,c);return(()=>{var w,_;const l=J.cloneDeep((w=e.unref(t))==null?void 0:w.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 m=e.unref(o);if(m.startsWith(u)){const k=u.length;m=((_=m.slice(k,k+1))==null?void 0:_.toLowerCase())+m.slice(k+1)}const g=p[m],C=Kc,f=(g==null?void 0:g.length)||0;for(let k=0;k<f;k++){const x=g[k];if(!x)break;r.push({...C[x],type:x})}for(const k of c)s(l,k)&&!g.find(x=>x===k)&&(l[k]=[]);i(l)})(),{cardsMap:a,cards:r}}}),Xf="",Jf="",Xc={class:"data-group"};function Jc(t,o,n,a,r,i){const s=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Xc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Zc=oe(Qc,[["render",Jc],["__scopeId","data-v-64cc2643"]]),ed=[{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"]}],td={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"}},od=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:$.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function nd(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const ad=oe(od,[["render",nd]]),rd=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:$.InputNumber,ASelect:$.Select,ASelectOption:$.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")),i=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const m=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)}):m===""||u==null?o("change",u):o("change",`${u}${m}`)},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:i,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(i)})}}}});function ld(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(l,{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(s,{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(s,{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 da=oe(rd,[["render",ld]]),id=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:$.RadioGroup,ARadioButton:$.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function sd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const cd=oe(id,[["render",sd]]),dd=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:$.Select,ASelectOption:$.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function pd(t,o,n,a,r,i){const s=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,l=>(e.openBlock(),e.createBlock(s,{key:l.value,value:l.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const ud=oe(dd,[["render",pd]]),fd=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:$.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function md(t,o,n,a,r,i){const s=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(s,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const hd=oe(fd,[["render",md]]);var Se="top",Oe="bottom",Ie="right",Ne="left",Ko="auto",Ot=[Se,Oe,Ie,Ne],Ct="start",It="end",yd="clippingParents",pa="viewport",Ft="popper",gd="reference",ua=Ot.reduce(function(t,o){return t.concat([o+"-"+Ct,o+"-"+It])},[]),fa=[].concat(Ot,[Ko]).reduce(function(t,o){return t.concat([o,o+"-"+Ct,o+"-"+It])},[]),bd="beforeRead",Cd="read",wd="afterRead",kd="beforeMain",_d="main",xd="afterMain",Sd="beforeWrite",Nd="write",Ad="afterWrite",Td=[bd,Cd,wd,kd,_d,xd,Sd,Nd,Ad];function Re(t){return t?(t.nodeName||"").toLowerCase():null}function Te(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function rt(t){var o=Te(t).Element;return t instanceof o||t instanceof Element}function Fe(t){var o=Te(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Qo(t){if(typeof ShadowRoot>"u")return!1;var o=Te(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function Ed(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},i=o.elements[n];!Fe(i)||!Re(i)||(Object.assign(i.style,a),Object.keys(r).forEach(function(s){var d=r[s];d===!1?i.removeAttribute(s):i.setAttribute(s,d===!0?"":d)}))})}function Ld(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],i=o.attributes[a]||{},s=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=s.reduce(function(l,c){return l[c]="",l},{});!Fe(r)||!Re(r)||(Object.assign(r.style,d),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Vd={name:"applyStyles",enabled:!0,phase:"write",fn:Ed,effect:Ld,requires:["computeStyles"]};function Ue(t){return t.split("-")[0]}var lt=Math.max,Xt=Math.min,wt=Math.round;function Xo(){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 ma(){return!/^((?!chrome|android).)*safari/i.test(Xo())}function kt(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,i=1;o&&Fe(t)&&(r=t.offsetWidth>0&&wt(a.width)/t.offsetWidth||1,i=t.offsetHeight>0&&wt(a.height)/t.offsetHeight||1);var s=rt(t)?Te(t):window,d=s.visualViewport,l=!ma()&&n,c=(a.left+(l&&d?d.offsetLeft:0))/r,p=(a.top+(l&&d?d.offsetTop:0))/i,u=a.width/r,m=a.height/i;return{width:u,height:m,top:p,right:c+u,bottom:p+m,left:c,x:c,y:p}}function Jo(t){var o=kt(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 ha(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Qo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function qe(t){return Te(t).getComputedStyle(t)}function Bd(t){return["table","td","th"].indexOf(Re(t))>=0}function Ze(t){return((rt(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jt(t){return Re(t)==="html"?t:t.assignedSlot||t.parentNode||(Qo(t)?t.host:null)||Ze(t)}function ya(t){return!Fe(t)||qe(t).position==="fixed"?null:t.offsetParent}function Od(t){var o=/firefox/i.test(Xo()),n=/Trident/i.test(Xo());if(n&&Fe(t)){var a=qe(t);if(a.position==="fixed")return null}var r=Jt(t);for(Qo(r)&&(r=r.host);Fe(r)&&["html","body"].indexOf(Re(r))<0;){var i=qe(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||o&&i.willChange==="filter"||o&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Dt(t){for(var o=Te(t),n=ya(t);n&&Bd(n)&&qe(n).position==="static";)n=ya(n);return n&&(Re(n)==="html"||Re(n)==="body"&&qe(n).position==="static")?o:n||Od(t)||o}function Zo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function $t(t,o,n){return lt(t,Xt(o,n))}function Id(t,o,n){var a=$t(t,o,n);return a>n?n:a}function ga(){return{top:0,right:0,bottom:0,left:0}}function ba(t){return Object.assign({},ga(),t)}function Ca(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,ba(typeof o!="number"?o:Ca(o,Ot))};function Dd(t){var o,n=t.state,a=t.name,r=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,d=Ue(n.placement),l=Zo(d),c=[Ne,Ie].indexOf(d)>=0,p=c?"height":"width";if(!(!i||!s)){var u=Fd(r.padding,n),m=Jo(i),g=l==="y"?Se:Ne,C=l==="y"?Oe:Ie,f=n.rects.reference[p]+n.rects.reference[l]-s[l]-n.rects.popper[p],w=s[l]-n.rects.reference[l],_=Dt(i),k=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,x=f/2-w/2,h=u[g],L=k-m[p]-u[C],B=k/2-m[p]/2+x,I=$t(h,B,L),A=l;n.modifiersData[a]=(o={},o[A]=I,o.centerOffset=I-B,o)}}function $d(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)||ha(o.elements.popper,r)&&(o.elements.arrow=r))}const vd={name:"arrow",enabled:!0,phase:"main",fn:Dd,effect:$d,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _t(t){return t.split("-")[1]}var Md={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Pd(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:wt(n*r)/r||0,y:wt(a*r)/r||0}}function wa(t){var o,n=t.popper,a=t.popperRect,r=t.placement,i=t.variation,s=t.offsets,d=t.position,l=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,m=s.x,g=m===void 0?0:m,C=s.y,f=C===void 0?0:C,w=typeof p=="function"?p({x:g,y:f}):{x:g,y:f};g=w.x,f=w.y;var _=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),x=Ne,h=Se,L=window;if(c){var B=Dt(n),I="clientHeight",A="clientWidth";if(B===Te(n)&&(B=Ze(n),qe(B).position!=="static"&&d==="absolute"&&(I="scrollHeight",A="scrollWidth")),B=B,r===Se||(r===Ne||r===Ie)&&i===It){h=Oe;var E=u&&B===L&&L.visualViewport?L.visualViewport.height:B[I];f-=E-a.height,f*=l?1:-1}if(r===Ne||(r===Se||r===Oe)&&i===It){x=Ie;var N=u&&B===L&&L.visualViewport?L.visualViewport.width:B[A];g-=N-a.width,g*=l?1:-1}}var O=Object.assign({position:d},c&&Md),M=p===!0?Pd({x:g,y:f},Te(n)):{x:g,y:f};if(g=M.x,f=M.y,l){var P;return Object.assign({},O,(P={},P[h]=k?"0":"",P[x]=_?"0":"",P.transform=(L.devicePixelRatio||1)<=1?"translate("+g+"px, "+f+"px)":"translate3d("+g+"px, "+f+"px, 0)",P))}return Object.assign({},O,(o={},o[h]=k?f+"px":"",o[x]=_?g+"px":"",o.transform="",o))}function jd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,i=n.adaptive,s=i===void 0?!0:i,d=n.roundOffsets,l=d===void 0?!0:d,c={placement:Ue(o.placement),variation:_t(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,wa(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:s,roundOffsets:l})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,wa(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Rd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jd,data:{}};var Zt={passive:!0};function Ud(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,i=r===void 0?!0:r,s=a.resize,d=s===void 0?!0:s,l=Te(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return i&&c.forEach(function(p){p.addEventListener("scroll",n.update,Zt)}),d&&l.addEventListener("resize",n.update,Zt),function(){i&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Zt)}),d&&l.removeEventListener("resize",n.update,Zt)}}const Gd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ud,data:{}};var zd={left:"right",right:"left",bottom:"top",top:"bottom"};function eo(t){return t.replace(/left|right|bottom|top/g,function(o){return zd[o]})}var Hd={start:"end",end:"start"};function ka(t){return t.replace(/start|end/g,function(o){return Hd[o]})}function en(t){var o=Te(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function tn(t){return kt(Ze(t)).left+en(t).scrollLeft}function Yd(t,o){var n=Te(t),a=Ze(t),r=n.visualViewport,i=a.clientWidth,s=a.clientHeight,d=0,l=0;if(r){i=r.width,s=r.height;var c=ma();(c||!c&&o==="fixed")&&(d=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:d+tn(t),y:l}}function Wd(t){var o,n=Ze(t),a=en(t),r=(o=t.ownerDocument)==null?void 0:o.body,i=lt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=lt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+tn(t),l=-a.scrollTop;return qe(r||n).direction==="rtl"&&(d+=lt(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:s,x:d,y:l}}function on(t){var o=qe(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function _a(t){return["html","body","#document"].indexOf(Re(t))>=0?t.ownerDocument.body:Fe(t)&&on(t)?t:_a(Jt(t))}function vt(t,o){var n;o===void 0&&(o=[]);var a=_a(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),i=Te(a),s=r?[i].concat(i.visualViewport||[],on(a)?a:[]):a,d=o.concat(s);return r?d:d.concat(vt(Jt(s)))}function nn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function qd(t,o){var n=kt(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 xa(t,o,n){return o===pa?nn(Yd(t,n)):rt(o)?qd(o,n):nn(Wd(Ze(t)))}function Kd(t){var o=vt(Jt(t)),n=["absolute","fixed"].indexOf(qe(t).position)>=0,a=n&&Fe(t)?Dt(t):t;return rt(a)?o.filter(function(r){return rt(r)&&ha(r,a)&&Re(r)!=="body"}):[]}function Qd(t,o,n,a){var r=o==="clippingParents"?Kd(t):[].concat(o),i=[].concat(r,[n]),s=i[0],d=i.reduce(function(l,c){var p=xa(t,c,a);return l.top=lt(p.top,l.top),l.right=Xt(p.right,l.right),l.bottom=Xt(p.bottom,l.bottom),l.left=lt(p.left,l.left),l},xa(t,s,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function Sa(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ue(a):null,i=a?_t(a):null,s=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,l;switch(r){case Se:l={x:s,y:o.y-n.height};break;case Oe:l={x:s,y:o.y+o.height};break;case Ie:l={x:o.x+o.width,y:d};break;case Ne:l={x:o.x-n.width,y:d};break;default:l={x:o.x,y:o.y}}var c=r?Zo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(i){case Ct:l[c]=l[c]-(o[p]/2-n[p]/2);break;case It:l[c]=l[c]+(o[p]/2-n[p]/2);break}}return l}function Mt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,i=n.strategy,s=i===void 0?t.strategy:i,d=n.boundary,l=d===void 0?yd:d,c=n.rootBoundary,p=c===void 0?pa:c,u=n.elementContext,m=u===void 0?Ft:u,g=n.altBoundary,C=g===void 0?!1:g,f=n.padding,w=f===void 0?0:f,_=ba(typeof w!="number"?w:Ca(w,Ot)),k=m===Ft?gd:Ft,x=t.rects.popper,h=t.elements[C?k:m],L=Qd(rt(h)?h:h.contextElement||Ze(t.elements.popper),l,p,s),B=kt(t.elements.reference),I=Sa({reference:B,element:x,strategy:"absolute",placement:r}),A=nn(Object.assign({},x,I)),E=m===Ft?A:B,N={top:L.top-E.top+_.top,bottom:E.bottom-L.bottom+_.bottom,left:L.left-E.left+_.left,right:E.right-L.right+_.right},O=t.modifiersData.offset;if(m===Ft&&O){var M=O[r];Object.keys(N).forEach(function(P){var S=[Ie,Oe].indexOf(P)>=0?1:-1,F=[Se,Oe].indexOf(P)>=0?"y":"x";N[P]+=M[F]*S})}return N}function Xd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,i=n.rootBoundary,s=n.padding,d=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?fa:l,p=_t(a),u=p?d?ua:ua.filter(function(C){return _t(C)===p}):Ot,m=u.filter(function(C){return c.indexOf(C)>=0});m.length===0&&(m=u);var g=m.reduce(function(C,f){return C[f]=Mt(t,{placement:f,boundary:r,rootBoundary:i,padding:s})[Ue(f)],C},{});return Object.keys(g).sort(function(C,f){return g[C]-g[f]})}function Jd(t){if(Ue(t)===Ko)return[];var o=eo(t);return[ka(t),o,ka(o)]}function Zd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,C=g===void 0?!0:g,f=n.allowedAutoPlacements,w=o.options.placement,_=Ue(w),k=_===w,x=l||(k||!C?[eo(w)]:Jd(w)),h=[w].concat(x).reduce(function(G,K){return G.concat(Ue(K)===Ko?Xd(o,{placement:K,boundary:p,rootBoundary:u,padding:c,flipVariations:C,allowedAutoPlacements:f}):K)},[]),L=o.rects.reference,B=o.rects.popper,I=new Map,A=!0,E=h[0],N=0;N<h.length;N++){var O=h[N],M=Ue(O),P=_t(O)===Ct,S=[Se,Oe].indexOf(M)>=0,F=S?"width":"height",V=Mt(o,{placement:O,boundary:p,rootBoundary:u,altBoundary:m,padding:c}),j=S?P?Ie:Ne:P?Oe:Se;L[F]>B[F]&&(j=eo(j));var R=eo(j),y=[];if(i&&y.push(V[M]<=0),d&&y.push(V[j]<=0,V[R]<=0),y.every(function(G){return G})){E=O,A=!1;break}I.set(O,y)}if(A)for(var b=C?3:1,T=function(K){var Q=h.find(function(ee){var ae=I.get(ee);if(ae)return ae.slice(0,K).every(function(ye){return ye})});if(Q)return E=Q,"break"},D=b;D>0;D--){var v=T(D);if(v==="break")break}o.placement!==E&&(o.modifiersData[a]._skip=!0,o.placement=E,o.reset=!0)}}const ep={name:"flip",enabled:!0,phase:"main",fn:Zd,requiresIfExists:["offset"],data:{_skip:!1}};function Na(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 Aa(t){return[Se,Ie,Oe,Ne].some(function(o){return t[o]>=0})}function tp(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,i=o.modifiersData.preventOverflow,s=Mt(o,{elementContext:"reference"}),d=Mt(o,{altBoundary:!0}),l=Na(s,a),c=Na(d,r,i),p=Aa(l),u=Aa(c);o.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const op={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tp};function np(t,o,n){var a=Ue(t),r=[Ne,Se].indexOf(a)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,s=i[0],d=i[1];return s=s||0,d=(d||0)*r,[Ne,Ie].indexOf(a)>=0?{x:d,y:s}:{x:s,y:d}}function ap(t){var o=t.state,n=t.options,a=t.name,r=n.offset,i=r===void 0?[0,0]:r,s=fa.reduce(function(p,u){return p[u]=np(u,o.rects,i),p},{}),d=s[o.placement],l=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=s}const rp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ap};function lp(t){var o=t.state,n=t.name;o.modifiersData[n]=Sa({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const ip={name:"popperOffsets",enabled:!0,phase:"read",fn:lp,data:{}};function sp(t){return t==="x"?"y":"x"}function cp(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,i=r===void 0?!0:r,s=n.altAxis,d=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,m=n.tether,g=m===void 0?!0:m,C=n.tetherOffset,f=C===void 0?0:C,w=Mt(o,{boundary:l,rootBoundary:c,padding:u,altBoundary:p}),_=Ue(o.placement),k=_t(o.placement),x=!k,h=Zo(_),L=sp(h),B=o.modifiersData.popperOffsets,I=o.rects.reference,A=o.rects.popper,E=typeof f=="function"?f(Object.assign({},o.rects,{placement:o.placement})):f,N=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,M={x:0,y:0};if(B){if(i){var P,S=h==="y"?Se:Ne,F=h==="y"?Oe:Ie,V=h==="y"?"height":"width",j=B[h],R=j+w[S],y=j-w[F],b=g?-A[V]/2:0,T=k===Ct?I[V]:A[V],D=k===Ct?-A[V]:-I[V],v=o.elements.arrow,G=g&&v?Jo(v):{width:0,height:0},K=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:ga(),Q=K[S],ee=K[F],ae=$t(0,I[V],G[V]),ye=x?I[V]/2-b-ae-Q-N.mainAxis:T-ae-Q-N.mainAxis,he=x?-I[V]/2+b+ae+ee+N.mainAxis:D+ae+ee+N.mainAxis,Ee=o.elements.arrow&&Dt(o.elements.arrow),pe=Ee?h==="y"?Ee.clientTop||0:Ee.clientLeft||0:0,$e=(P=O==null?void 0:O[h])!=null?P:0,et=j+ye-$e-pe,mo=j+he-$e,st=$t(g?Xt(R,et):R,j,g?lt(y,mo):y);B[h]=st,M[h]=st-j}if(d){var ct,At=h==="x"?Se:Ne,dt=h==="x"?Oe:Ie,Le=B[L],Qe=L==="y"?"height":"width",tt=Le+w[At],ot=Le-w[dt],ze=[Se,Ne].indexOf(_)!==-1,pt=(ct=O==null?void 0:O[L])!=null?ct:0,ut=ze?tt:Le-I[Qe]-A[Qe]-pt+N.altAxis,ft=ze?Le+I[Qe]+A[Qe]-pt-N.altAxis:ot,nt=g&&ze?Id(ut,Le,ft):$t(g?ut:tt,Le,g?ft:ot);B[L]=nt,M[L]=nt-Le}o.modifiersData[a]=M}}const dp={name:"preventOverflow",enabled:!0,phase:"main",fn:cp,requiresIfExists:["offset"]};function pp(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function up(t){return t===Te(t)||!Fe(t)?en(t):pp(t)}function fp(t){var o=t.getBoundingClientRect(),n=wt(o.width)/t.offsetWidth||1,a=wt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function mp(t,o,n){n===void 0&&(n=!1);var a=Fe(o),r=Fe(o)&&fp(o),i=Ze(o),s=kt(t,r,n),d={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&((Re(o)!=="body"||on(i))&&(d=up(o)),Fe(o)?(l=kt(o,!0),l.x+=o.clientLeft,l.y+=o.clientTop):i&&(l.x=tn(i))),{x:s.left+d.scrollLeft-l.x,y:s.top+d.scrollTop-l.y,width:s.width,height:s.height}}function hp(t){var o=new Map,n=new Set,a=[];t.forEach(function(i){o.set(i.name,i)});function r(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(d){if(!n.has(d)){var l=o.get(d);l&&r(l)}}),a.push(i)}return t.forEach(function(i){n.has(i.name)||r(i)}),a}function yp(t){var o=hp(t);return Td.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function gp(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function bp(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 Ta={placement:"bottom",modifiers:[],strategy:"absolute"};function Ea(){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 Cp(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,i=r===void 0?Ta:r;return function(d,l,c){c===void 0&&(c=i);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ta,i),modifiersData:{},elements:{reference:d,popper:l},attributes:{},styles:{}},u=[],m=!1,g={state:p,setOptions:function(_){var k=typeof _=="function"?_(p.options):_;f(),p.options=Object.assign({},i,p.options,k),p.scrollParents={reference:rt(d)?vt(d):d.contextElement?vt(d.contextElement):[],popper:vt(l)};var x=yp(bp([].concat(a,p.options.modifiers)));return p.orderedModifiers=x.filter(function(h){return h.enabled}),C(),g.update()},forceUpdate:function(){if(!m){var _=p.elements,k=_.reference,x=_.popper;if(Ea(k,x)){p.rects={reference:mp(k,Dt(x),p.options.strategy==="fixed"),popper:Jo(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(N){return p.modifiersData[N.name]=Object.assign({},N.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var L=p.orderedModifiers[h],B=L.fn,I=L.options,A=I===void 0?{}:I,E=L.name;typeof B=="function"&&(p=B({state:p,options:A,name:E,instance:g})||p)}}}},update:gp(function(){return new Promise(function(w){g.forceUpdate(),w(p)})}),destroy:function(){f(),m=!0}};if(!Ea(d,l))return g;g.setOptions(c).then(function(w){!m&&c.onFirstUpdate&&c.onFirstUpdate(w)});function C(){p.orderedModifiers.forEach(function(w){var _=w.name,k=w.options,x=k===void 0?{}:k,h=w.effect;if(typeof h=="function"){var L=h({state:p,name:_,instance:g,options:x}),B=function(){};u.push(L||B)}})}function f(){u.forEach(function(w){return w()}),u=[]}return g}}var wp=[Gd,ip,Rd,Vd,rp,ep,dp,vd,op],kp=Cp({defaultModifiers:wp});function an(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 La(t,o){if(t){if(typeof t=="string")return an(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)?an(t,o):void 0}}function _p(t){return function(o){if(Array.isArray(o))return an(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||La(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 xt(t){return xt=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},xt(t)}function Va(t,o,n,a,r,i,s){try{var d=t[i](s),l=d.value}catch(c){return void n(c)}d.done?o(l):Promise.resolve(l).then(a,r)}function Ba(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var i=t.apply(o,n);function s(l){Va(i,a,r,s,d,"next",l)}function d(l){Va(i,a,r,s,d,"throw",l)}s(void 0)})}}var Oa={exports:{}},Ia={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})(Ia),function(t){var o=Ia.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},i=Object.prototype,s=i.hasOwnProperty,d=Object.defineProperty||function(y,b,T){y[b]=T.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",p=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function m(y,b,T){return Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}),y[b]}try{m({},"")}catch{m=function(b,T,D){return b[T]=D}}function g(y,b,T,D){var v=b&&b.prototype instanceof h?b:h,G=Object.create(v.prototype),K=new j(D||[]);return d(G,"_invoke",{value:P(y,T,K)}),G}function C(y,b,T){try{return{type:"normal",arg:y.call(b,T)}}catch(D){return{type:"throw",arg:D}}}r.wrap=g;var f="suspendedStart",w="suspendedYield",_="executing",k="completed",x={};function h(){}function L(){}function B(){}var I={};m(I,c,function(){return this});var A=Object.getPrototypeOf,E=A&&A(A(R([])));E&&E!==i&&s.call(E,c)&&(I=E);var N=B.prototype=h.prototype=Object.create(I);function O(y){["next","throw","return"].forEach(function(b){m(y,b,function(T){return this._invoke(b,T)})})}function M(y,b){function T(v,G,K,Q){var ee=C(y[v],y,G);if(ee.type!=="throw"){var ae=ee.arg,ye=ae.value;return ye&&o(ye)=="object"&&s.call(ye,"__await")?b.resolve(ye.__await).then(function(he){T("next",he,K,Q)},function(he){T("throw",he,K,Q)}):b.resolve(ye).then(function(he){ae.value=he,K(ae)},function(he){return T("throw",he,K,Q)})}Q(ee.arg)}var D;d(this,"_invoke",{value:function(v,G){function K(){return new b(function(Q,ee){T(v,G,Q,ee)})}return D=D?D.then(K,K):K()}})}function P(y,b,T){var D=f;return function(v,G){if(D===_)throw new Error("Generator is already running");if(D===k){if(v==="throw")throw G;return{value:a,done:!0}}for(T.method=v,T.arg=G;;){var K=T.delegate;if(K){var Q=S(K,T);if(Q){if(Q===x)continue;return Q}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(D===f)throw D=k,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);D=_;var ee=C(y,b,T);if(ee.type==="normal"){if(D=T.done?k:w,ee.arg===x)continue;return{value:ee.arg,done:T.done}}ee.type==="throw"&&(D=k,T.method="throw",T.arg=ee.arg)}}}function S(y,b){var T=b.method,D=y.iterator[T];if(D===a)return b.delegate=null,T==="throw"&&y.iterator.return&&(b.method="return",b.arg=a,S(y,b),b.method==="throw")||T!=="return"&&(b.method="throw",b.arg=new TypeError("The iterator does not provide a '"+T+"' method")),x;var v=C(D,y.iterator,b.arg);if(v.type==="throw")return b.method="throw",b.arg=v.arg,b.delegate=null,x;var G=v.arg;return G?G.done?(b[y.resultName]=G.value,b.next=y.nextLoc,b.method!=="return"&&(b.method="next",b.arg=a),b.delegate=null,x):G:(b.method="throw",b.arg=new TypeError("iterator result is not an object"),b.delegate=null,x)}function F(y){var b={tryLoc:y[0]};1 in y&&(b.catchLoc=y[1]),2 in y&&(b.finallyLoc=y[2],b.afterLoc=y[3]),this.tryEntries.push(b)}function V(y){var b=y.completion||{};b.type="normal",delete b.arg,y.completion=b}function j(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(F,this),this.reset(!0)}function R(y){if(y||y===""){var b=y[c];if(b)return b.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var T=-1,D=function v(){for(;++T<y.length;)if(s.call(y,T))return v.value=y[T],v.done=!1,v;return v.value=a,v.done=!0,v};return D.next=D}}throw new TypeError(o(y)+" is not iterable")}return L.prototype=B,d(N,"constructor",{value:B,configurable:!0}),d(B,"constructor",{value:L,configurable:!0}),L.displayName=m(B,u,"GeneratorFunction"),r.isGeneratorFunction=function(y){var b=typeof y=="function"&&y.constructor;return!!b&&(b===L||(b.displayName||b.name)==="GeneratorFunction")},r.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,B):(y.__proto__=B,m(y,u,"GeneratorFunction")),y.prototype=Object.create(N),y},r.awrap=function(y){return{__await:y}},O(M.prototype),m(M.prototype,p,function(){return this}),r.AsyncIterator=M,r.async=function(y,b,T,D,v){v===void 0&&(v=Promise);var G=new M(g(y,b,T,D),v);return r.isGeneratorFunction(b)?G:G.next().then(function(K){return K.done?K.value:G.next()})},O(N),m(N,u,"Generator"),m(N,c,function(){return this}),m(N,"toString",function(){return"[object Generator]"}),r.keys=function(y){var b=Object(y),T=[];for(var D in b)T.push(D);return T.reverse(),function v(){for(;T.length;){var G=T.pop();if(G in b)return v.value=G,v.done=!1,v}return v.done=!0,v}},r.values=R,j.prototype={constructor:j,reset:function(y){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(V),!y)for(var b in this)b.charAt(0)==="t"&&s.call(this,b)&&!isNaN(+b.slice(1))&&(this[b]=a)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if(y.type==="throw")throw y.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var b=this;function T(ee,ae){return G.type="throw",G.arg=y,b.next=ee,ae&&(b.method="next",b.arg=a),!!ae}for(var D=this.tryEntries.length-1;D>=0;--D){var v=this.tryEntries[D],G=v.completion;if(v.tryLoc==="root")return T("end");if(v.tryLoc<=this.prev){var K=s.call(v,"catchLoc"),Q=s.call(v,"finallyLoc");if(K&&Q){if(this.prev<v.catchLoc)return T(v.catchLoc,!0);if(this.prev<v.finallyLoc)return T(v.finallyLoc)}else if(K){if(this.prev<v.catchLoc)return T(v.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return T(v.finallyLoc)}}}},abrupt:function(y,b){for(var T=this.tryEntries.length-1;T>=0;--T){var D=this.tryEntries[T];if(D.tryLoc<=this.prev&&s.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var v=D;break}}v&&(y==="break"||y==="continue")&&v.tryLoc<=b&&b<=v.finallyLoc&&(v=null);var G=v?v.completion:{};return G.type=y,G.arg=b,v?(this.method="next",this.next=v.finallyLoc,x):this.complete(G)},complete:function(y,b){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&b&&(this.next=b),x},finish:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.finallyLoc===y)return this.complete(T.completion,T.afterLoc),V(T),x}},catch:function(y){for(var b=this.tryEntries.length-1;b>=0;--b){var T=this.tryEntries[b];if(T.tryLoc===y){var D=T.completion;if(D.type==="throw"){var v=D.arg;V(T)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(y,b,T){return this.delegate={iterator:R(y),resultName:b,nextLoc:T},this.method==="next"&&(this.arg=a),x}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(Oa);var to=Oa.exports(),oo=to;try{regeneratorRuntime=to}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=to:Function("r","regeneratorRuntime = r")(to)}function xp(t){var o=function(n,a){if(xt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var i=r.call(n,a||"default");if(xt(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return xt(o)==="symbol"?o:String(o)}function rn(t,o,n){return(o=xp(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var no=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 i=r.target.getBoundingClientRect(),s=i.left,d=i.top,l=function(c){var p=c.clientX,u=c.clientY,m=p-s,g=u-d;m<0&&(m=0),g<0&&(g=0),m>t.size&&(m=t.size),g>t.size&&(g=t.size);var C=m/t.size*100,f=100-g/t.size*100;n("change",C,f)};l(r),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Fa=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Sp=Fa(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Np=Fa(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ke(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))}}Ke(".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}"),no.render=function(t,o,n,a,r,i){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"]))},[Sp,Np,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},no.__scopeId="data-v-24517fec",no.__file="src/picker/Saturation.vue";var ao=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 i=r.value.getContext("2d"),s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(0,"#FF0000"),s.addColorStop(.17,"#FF00FF"),s.addColorStop(.34,"#0000FF"),s.addColorStop(.51,"#00FFFF"),s.addColorStop(.68,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(i){var s=i.target.getBoundingClientRect().top,d=function(l){var c=l.clientY-s;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(i),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function l(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",l)})}}}}),Ap={ref:"canvas"};Ke(".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}"),ao.render=function(t,o,n,a,r,i){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",Ap,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ao.__scopeId="data-v-78b9f4f0",ao.__file="src/picker/Hue.vue";var ro=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(),i=function(){var s=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"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);s.fillStyle=s.createPattern(d,"repeat"),s.fillRect(0,0,t.width,t.height);var l=s.createLinearGradient(0,0,0,t.height);l.addColorStop(.01,"rgba(255,255,255,0)"),l.addColorStop(.99,t.color),s.fillStyle=l,s.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){i()}),e.onMounted(function(){i()}),{canvas:r,sliderStyle:a,onSelect:function(s){var d=s.target.getBoundingClientRect().top,l=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)};l(s),document.addEventListener("mousemove",l),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",c)})}}}}),Tp={ref:"canvas"};Ke(".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}"),ro.render=function(t,o,n,a,r,i){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",Tp,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},ro.__scopeId="data-v-24dc9656",ro.__file="src/picker/Alpha.vue";var lo=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")}}}}),Ep={class:"input"},Lp={class:"label"},Vp=[".value"];function Pt(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 i,s,d,l,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=(i=d.call(r)).done)&&(c.push(i.value),c.length!==a);p=!0);}catch(m){u=!0,s=m}finally{try{if(!p&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw s}}return c}}(t,o)||La(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 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 De(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){rn(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}Ke(".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}"),lo.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",Ep,[e.createElementVNode("span",Lp,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,Vp)])},lo.__scopeId="data-v-d52a4d02",lo.__file="src/picker/InputValue.vue";var $a=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},va={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},io=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(va[o]||o).concat(va[n]||n)},Ma=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(io(o)).concat(io(n)).concat(io(a))},St=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)},jt=function(t,o,n){t=6*St(t,360),o=St(o,100),n=St(n,100);var a=Math.floor(t),r=t-a,i=n*(1-o),s=n*(1-r*o),d=n*(1-(1-r)*o),l=a%6,c=[n,s,i,i,d,n][l],p=[d,n,n,s,i,i][l],u=[i,i,d,n,n,s][l];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},Pa=function(t,o,n){var a=t.h,r=t.s,i=t.v,s=t.a;if(n)switch(o){case"hsl":var d=$a(a,r/100,i/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(s,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%, ").concat(s,")");case"rgb":var l=jt(a,r,i),c=l.r,p=l.g,u=l.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(s,")");default:return"".concat(Ma(jt(a,r,i))).concat(io(255*s))}else switch(o){case"hsl":var m=$a(a,r/100,i/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*m[1]),"%, ").concat(Math.round(100*m[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(i),"%)");case"rgb":var g=jt(a,r,i),C=g.r,f=g.g,w=g.b;return"rgb(".concat(C,", ").concat(f,", ").concat(w,")");default:return Ma(jt(a,r,i))}},so=function(t){var o=t.r,n=t.g,a=t.b;o=St(o,255),n=St(n,255),a=St(a,255);var r,i=Math.max(o,n,a),s=Math.min(o,n,a),d=i,l=i-s,c=i===0?0:l/i;if(i===s)r=0;else{switch(i){case o:r=(n-a)/l+(n<a?6:0);break;case n:r=(a-o)/l+2;break;case a:r=(o-n)/l+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ja=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,i=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=i<=1?i:2-i,{h:+o,s:100*(a===0?2*r/(i+r):2*n/(a+n)),v:100*((a+n)/2)}},Ra=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]}},ln=function(t,o,n){if(typeof t=="string"&&t!==""){var a=sn(t,cn(t),n),r=Ha(a);return Pa(r,o,n)}return""},Ua=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ga=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:i}},za=function(t){var o=Pt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],i=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(i)}},sn=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ua(t),a=n.r,r=n.g,i=n.b,s=n.a;return De(De({},so({r:a,g:r,b:i})),{},{a:+s});case"hsv":var d=za(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var l=Ga(t),c=l.h,p=l.s,u=l.l,m=l.a;return De(De({},ja({h:c,s:p,l:u})),{},{a:+m});default:var g=Ra(t),C=g.r,f=g.g,w=g.b,_=g.a;return De(De({},so({r:C,g:f,b:w})),{},{a:_/255})}else switch(o){case"rgb":return De(De({},so(Ua(t))),{},{a:1});case"hsv":var k=za(t);return{h:k.h,s:k.s,v:k.v,a:1};case"hsl":return De(De({},ja(Ga(t))),{},{a:1});default:return De(De({},so(Ra(t))),{},{a:1})}},cn=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Ha=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}},Rt=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)+"")}),i=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"):""}}),s=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var l=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),m=2*c;return p.width=m,p.height=m,u.fillStyle="#ffffff",u.fillRect(0,0,m,m),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(l,"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(){s()}),e.onMounted(function(){s()}),{canvas:o,colorItemStyle:i}}}),Bp=["draggable"];Ke(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Rt.render=function(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,Bp)},Rt.__scopeId="data-v-02da71fd",Rt.__file="src/color-item/ColorItem.vue";var co=e.defineComponent({name:"Colors",components:{ColorItem:Rt},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 ln(a,"hex",!0)})})}}}),Op={class:"colors"};function Ya(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 Ge(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Ya(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),co.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Op,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,l){return e.openBlock(),e.createBlock(s,{key:l,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===l,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+l)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},co.__scopeId="data-v-0f8b52a8",co.__file="src/picker/Colors.vue";var po=e.defineComponent({name:"Picker",components:{Colors:co,Saturation:no,Hue:ao,Alpha:ro,InputValue:lo},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 Ge(Ge({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),i=e.ref(),s=e.ref(),d=e.ref(),l=function(){var k,x=(k=t.value)===null||k===void 0?void 0:k.trim();if(x!=null&&x!==""){var h=cn(x);return Ha(sn(x,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(i.value=l())},{immediate:!0}),e.watch(i,function(k,x){var h="";k!=null?(h=Pa(Ge({},k),t.format,t.showAlpha),s.value=Ge({},k)):s.value=null,d.value=h;var L=l();JSON.stringify(k)!==JSON.stringify(L)&&JSON.stringify(k)!==JSON.stringify(x)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.h)||0}),p=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.s)||0}),u=e.computed(function(){var k;return((k=e.unref(i))===null||k===void 0?void 0:k.v)||0}),m=e.computed(function(){var k,x;return((k=e.unref(i))===null||k===void 0?void 0:k.a)!=null?(x=e.unref(i))===null||x===void 0?void 0:x.a:1}),g=e.computed(function(){return jt(e.unref(c),e.unref(p),e.unref(u))}),C=e.computed(function(){return"rgb(".concat(e.unref(g).r,", ").concat(e.unref(g).g,", ").concat(e.unref(g).b,")")}),f=e.computed(function(){var k=t.format;if(t.showAlpha)switch(k){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(k){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),w=e.ref(-1),_=function(k,x,h){if(k.length!==0){var L=sn(k,x,h),B=L.h,I=L.s,A=L.v;if(!(isNaN(B)||isNaN(I)||isNaN(A))){var E=1,N=L.a;isNaN(N)||(E=N),i.value={h:B,s:I,v:A,a:E}}}};return{h:c,s:p,v:u,a:m,rgbStr:C,onSelectSaturation:function(k,x){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:k,v:x,a:e.unref(m)}:i.value=Ge(Ge({},e.unref(i)),{},{s:k,v:x})},onSelectHue:function(k){w.value=-1,e.unref(i)==null&&(i.value={h:k,s:e.unref(p),v:e.unref(u),a:e.unref(m)}),i.value=Ge(Ge({},e.unref(i)),{},{h:k})},onSelectAlpha:function(k){w.value=-1,e.unref(i)==null?i.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:k}:i.value=Ge(Ge({},e.unref(i)),{},{a:k})},label:f,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(k){w.value=-1,d.value=k},handleChange:function(){var k,x=(k=e.unref(d))===null||k===void 0?void 0:k.trim();if(x!==""){var h=t.showAlpha,L=t.format,B=function(I,A,E){if(E)switch(A){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(I);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(I);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(I);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(I)}else switch(A){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(I);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(I);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(I);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(I)}}(x,L,h);B?_(x,L,h):e.unref(s)!=null?i.value=e.unref(s):d.value=""}else i.value=null},selectColorIndex:w,onSelectColor:function(k,x){if(w.value=x,(k=k.trim())==="")i.value=null;else{var h=cn(k);h?_(k,h,!0):i.value=null}}}}}),Ip={class:"picker-inner"},Fp={class:"picker-header"};Ke(".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}"),po.render=function(t,o,n,a,r,i){var s=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),l=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",Ip,[e.createElementVNode("div",Fp,[e.createVNode(s,{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(l,{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)},po.__scopeId="data-v-6ceadec6",po.__file="src/picker/Picker.vue";var uo=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"):""}})}}}),Dp=[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 Wa(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 dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Wa(Object(n),!0).forEach(function(a){rn(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ke(".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}"),uo.render=function(t,o,n,a,r,i){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(Dp),4)},uo.__scopeId="data-v-ceb1719c",uo.__file="src/add-color-item/AddColorItem.vue";var it=null,Nt=e.defineComponent({name:"ColorPicker",components:{ColorItem:Rt,Picker:po,AddColorItem:uo},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(S){return ln(S,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var S=t.value||"",F=Array.isArray(S)?S:[S];a.value=F.map(function(V){return ln(V,t.format,t.showAlpha)})},{immediate:!0});var i=e.ref(void 0),s=e.computed(function(){return e.unref(a)[e.unref(i)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var l,c,p,u,m,g,C,f=e.ref(null),w=e.ref(null),_=(l=f,c=w,p={zIndex:t.zIndex},u=e.ref({}),m={strategy:"absolute",placement:"auto",onFirstUpdate:function(){it.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(S){var F=S.state,V=F.styles,j=F.placement,R=V.popper;u.value=dn(dn(dn({},R),p),{},{transformOrigin:j==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(l),e.unref(c)]},function(S,F){var V,j=Pt(S,2),R=j[0],y=j[1],b=Pt(F,2),T=b[0],D=b[1];if(R&&y&&(T!==R||D!==T)){(V=it)===null||V===void 0||V.destroy();var v=R.$el||R,G=y.$el||y;e.nextTick(function(){it=kp(v,G,m)})}}),e.onBeforeUnmount(function(){var S;it&&((S=it)===null||S===void 0||S.destroy(),it=null)}),{instance:it,style:u}),k=_.style,x=function(){e.unref(f)==null&&(f.value=e.unref(P)[0],i.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){i.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]))},L=e.ref(),B=function(){var S=Ba(oo.mark(function F(V){var j,R,y,b;return oo.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(R=V.target,(y=(j=R.dataset)===null||j===void 0?void 0:j.index)!=null&&y!==""){T.next=4;break}return T.abrupt("return");case 4:if(b=+y,e.unref(i)!==b){T.next=7;break}return T.abrupt("return");case 7:e.unref(i)!=null&&e.unref(i)!==b?(h(),g&&clearTimeout(g),g=setTimeout(function(){x(),clearTimeout(g)},100)):x(),i.value=b,f.value=R;case 10:case"end":return T.stop()}},F)}));return function(F){return S.apply(this,arguments)}}(),I=function(){var S=Ba(oo.mark(function F(V){var j,R,y,b,T;return oo.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(b=V.target,!(!((j=e.unref(L))!==null&&j!==void 0&&j.isEqualNode(b))&&(!((R=e.unref(L))===null||R===void 0)&&R.contains(b)))){D.next=4;break}return D.abrupt("return");case 4:if(T=(y=e.unref(w))===null||y===void 0?void 0:y.$el,!(T!=null&&T.contains(b))){D.next=8;break}return D.abrupt("return");case 8:C&&clearTimeout(C),C=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return D.stop()}},F)}));return function(F){return S.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(x(),clearTimeout(C))});var A,E=e.ref(t.max>e.unref(a).length),N=e.computed(function(){return typeof t.popupContainer=="string"||xt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),O=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),M=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(w)]},function(){e.nextTick(function(){var S,F;(S=e.unref(L))===null||S===void 0||S.setAttribute("pick-colors-theme",e.unref(M)),(F=e.unref(w))===null||F===void 0||(F=F.$el)===null||F===void 0||F.setAttribute("pick-colors-theme",e.unref(M))})},{immediate:!0}),e.provide("theme",{theme:M});var P=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",I,!1),t.showPicker&&x()}),e.onUnmounted(function(){document.removeEventListener("mouseup",I,!1),g&&(clearTimeout(g),g=null),C&&(clearTimeout(C),C=null)}),{valueList:a,colorItemSelected:function(S){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(i)===S},selectedColor:s,selectedIndex:i,isShowPicker:d,addColorItemShow:E,onPickerChange:function(S){var F=e.unref(i),V=e.unref(a).slice(),j=e.unref(a).length;if(F!=null){F>=0?V[F]=S:(i.value=j,V.push(S));var R="";R=Array.isArray(t.value)||t.addColor?V:S,t.value===void 0?a.value=Array.isArray(R)?R:[R]:(n("update:value",R),n("change",R,S,F)),t.addColor&&j>=t.max&&(E.value=!1,n("overflowMax"))}},colorPicker:L,onColorClick:B,pickerRef:w,onColorItemDragStart:function(S){S.dataTransfer.effectAllowed="move";var F=S.target;A=+F.dataset.index},onColorItemDragOver:function(S){},onColorItemDrop:function(S){var F=+S.target.dataset.index,V=_p(e.unref(a)),j=V[A];V.splice(A,1);var R=V.slice(0,F),y=V.splice(F),b=R.concat([j]).concat(y);n("update:value",b),n("change",b,b[A],A)},colorItemsRef:P,pickerStyle:k,values:r,teleportDisabled:O,toPopupContainer:N}}});Ke(".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)}"),Nt.render=function(t,o,n,a,r,i){var s=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),l=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(s,{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(l,{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)},Nt.__scopeId="data-v-3c43ade8",Nt.__file="src/ColorPicker.vue";const $p=e.defineComponent({name:"ColorPick",components:{PickColors:Nt,AInput:$.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}}}}),Zf="",vp={class:"color-pick"};function Mp(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",vp,[e.createVNode(s,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=l=>t.colorValue=l)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=l=>t.colorValue=l),size:25},null,8,["value"])])}const Pp=oe($p,[["render",Mp],["__scopeId","data-v-e2113f43"]]),jp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:Nt},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=i=>{o("change",i)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),em="",Rp={class:"color-group-pick"};function Up(t,o,n,a,r,i){const s=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Rp,[e.createVNode(s,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Gp=oe(jp,[["render",Up],["__scopeId","data-v-b2be8322"]]),zp=e.defineComponent({name:"FormGroup",components:{Draggable:Tt,AppstoreAddOutlined:Vo,MinusCircleOutlined:Gl,PickColors:Nt,InputNumber:da,PlusCircleOutlined:Wl},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 m=c[0];if(Object.prototype.toString.call(m)==="[object Object]"){const g=Object.keys(m),C={};g.forEach(f=>{C[f]=""}),c.push(C)}else typeof m=="string"&&c.push(m);n.value=c}else $.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,u)=>{var g;const m=(g=t.value)==null?void 0:g.slice();if(Array.isArray(m)){const C=c==null?void 0:c.target,f=(C==null?void 0:C.value)!=null?C==null?void 0:C.value:c;u?m[p][u]=f:m[p]=f,n.value=m}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),tm="",Hp={class:"form-group"},Yp={class:"form-row"},Wp={key:0,class:"label"},qp={key:1,class:"label"},Kp={class:"icon-group"};function Qp(t,o,n,a,r,i){const s=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),l=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",Hp,[e.createVNode(s,{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",Yp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:m},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",Wp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",qp,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:g=>t.onValueChange(g,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",Kp,[(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(l,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Xp=oe(zp,[["render",Qp],["__scopeId","data-v-f0c0ab4d"]]),Jp=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:$.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function Zp(t,o,n,a,r,i){const s=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(s,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const eu=oe(Jp,[["render",Zp]]),tu=e.defineComponent({name:"PropsToForm",components:{Input:ad,InputNumber:da,RadioGroup:cd,Select:ud,Switch:hd,ColorPick:Pp,ColorGroupPick:Gp,FormGroup:Xp,Textarea:eu},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Gt),n=e.inject(ho),a=e.inject(yo),r=e.computed(()=>{var l;return(l=e.unref(o))==null?void 0:l.type}),i=l=>{t.componentType&&t.componentType==="table"?a(l):n(l)},s=l=>{const{result:c,mapAttributeProp:p,key:u,value:m}=l;if(c==null||typeof c!="object")return;const{valueProp:g="value",changeValueEventName:C="change",events:f}=p;c[u]={...p,valueProp:g,value:m,events:{[C]:(w,_=!0)=>{i(_?{[u]:w}:{})},...f}}};return{formProps:e.computed(()=>{const l=t.props;return l==null||typeof l!="object"?{}:J.reduce(l,(c,p,u)=>{const m=td[u];if(Array.isArray(m)){const g=m.find(C=>{const{onlyType:f,excludeType:w}=C;return f==null&&w==null?!0:f?be(e.unref(r),f):w?!be(e.unref(r),w):!1});g&&s({result:c,value:p,key:u,mapAttributeProp:g})}else s({result:c,value:p,key:u,mapAttributeProp:m});return c},{})}),lowerCaseIncludes:be}}}),om="",ou={class:"props-to-form"},nu={class:"label"},au={class:"component-wrapper"};function ru(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",nu,e.toDisplayString(s.label),1),e.createElementVNode("div",au,[Array.isArray(s)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s,(l,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),e.mergeProps({key:c,class:"component",style:l.style,disabled:t.disabled},l.props,e.toHandlers(l.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(s)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:0,class:"component",[s.valueProp||""]:s.value,style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const lu=oe(tu,[["render",ru],["__scopeId","data-v-c6fb2484"]]);function iu(){return new Worker("/assets/editor.worker-02df2e61.js")}function su(){return new Worker("/assets/json.worker-867823a6.js")}function cu(){return new Worker("/assets/ts.worker-7254b425.js")}const du=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(i,s){return s==="json"?new su:s==="typescript"||s==="javascript"?new cu:new iu}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=tr.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(J.debounce(()=>{const i=a==null?void 0:a.getValue();o("change",i)},300)),a.onDidBlurEditorText(()=>{const i=a==null?void 0:a.getValue();o("update:valueData",i)})}),e.watch(()=>t.valueData,i=>{if(a){const s=a.getPosition();a.setValue(i),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),s!=null&&a.setPosition(s)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),nm="",pu={class:"editor",ref:"dom"};function uu(t,o,n,a,r,i){return e.openBlock(),e.createElementBlock("div",pu,null,512)}const qa=oe(du,[["render",uu],["__scopeId","data-v-71e88372"]]),fu=[{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}],mu=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:qa},setup(){const t=e.inject(Ye),o=e.computed(()=>{var f;return!!((f=e.unref(t))!=null&&f.isGroupTable)}),n=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.graphicConfig)||{}}),a=e.computed(()=>{var f;return((f=e.unref(t))==null?void 0:f.tableColumns)||[]}),r=e.ref([]);let i=null,s="";const d=e.ref(""),l=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var w,_,k;let f=[];if(r.value=[],!o.value)f=((w=e.unref(n))==null?void 0:w.queryColumnList)||[];else{const x=((_=e.unref(n))==null?void 0:_.rowHeaderList)||[],h=((k=e.unref(n))==null?void 0:k.indicators)||[];f=[...x,...h]}f.forEach(x=>{var L;let h=(L=e.unref(a))==null?void 0:L.find(B=>B.prop===x.name);h||(h={label:x.label,prop:x.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(h)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:fu,configData:r,editorTitle:l,editorVisible:c,optionCode:d,handleOk:()=>{i&&s&&(i[s]=d.value),d.value="",c.value=!1},renderSave:(f,w,_)=>{f&&w&&(i=f,s=w,d.value=f[w]||"",c.value=!0,l.value=_)},onEditorChange:f=>{try{d.value=f}catch(w){console.error(w)}},changeRenderBool:(f,w)=>{f.style=w.target.checked,f.style?f.renderBool===void 0&&(f.renderBool=!1):delete f.renderBool}}}}),am="",hu={class:"table-column-config"};function yu(t,o,n,a,r,i){const s=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",hu,[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:C,text:f,record:w})=>[C.dataIndex==="style"?(e.openBlock(),e.createBlock(s,{key:0,onChange:_=>t.changeRenderBool(w,_),checked:w.style},null,8,["onChange","checked"])):C.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:w.width,"onUpdate:value":_=>w.width=_,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):C.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.renderText,"onUpdate:value":_=>w.renderText=_,readOnly:!0,onClick:_=>t.renderSave(w,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[w.style?(e.openBlock(),e.createBlock(d,{key:1,value:w.headerTemplate,"onUpdate:value":_=>w.headerTemplate=_,readOnly:!0,onClick:_=>t.renderSave(w,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(f),1)],64))],64)):C.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:w.headerAlign,"onUpdate:value":_=>w.headerAlign=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:w.align,"onUpdate:value":_=>w.align=_},{default:e.withCtx(()=>[e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(l,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:w.fixed,"onUpdate:value":_=>w.fixed=_},{default:e.withCtx(()=>[e.createVNode(l,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(l,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(l,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:w.dataFormat,"onUpdate:value":_=>w.dataFormat=_,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(l,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(l,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(l,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):C.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[w.dataFormat&&w.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:w.retentiondigit,"onUpdate:value":_=>w.retentiondigit=_,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(g,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=C=>t.editorVisible=C),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(m,{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 gu=oe(mu,[["render",yu],["__scopeId","data-v-afebddc0"]]),bu=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:lu,TableColumnConfig:gu,Editor:qa,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Gt),r=e.inject(hn),i=e.inject(ho),s=e.inject(yo),d=e.inject(mn),l=L=>{i({...wn[L]},!1),d()},c=e.computed(()=>{var L;return(L=e.unref(a))==null?void 0:L.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>ed.map(L=>{const{props:B,title:I,enableProps:A,onlyType:E,excludeType:N}=L,O=[];B.forEach(S=>{typeof S=="string"&&(p.includes(S)?t.isGroupTable&&O.push(S):O.push(S))});let M,P;return t.componentType==="table"&&(E!=null&&E.includes(t.componentType))?(M=typeof A=="string"&&r.value?r.value[A]:void 0,P=J.pick(e.unref(r),O)):(M=typeof A=="string"&&a.value?a.value[A]:void 0,P=J.pick(e.unref(a),O)),{title:I,enableProps:M,enablePropsName:A,onlyType:E,excludeType:N,props:P}}).filter(({props:L})=>Object.keys(L).length>0)),m=(L,B)=>{const{onlyType:I,excludeType:A}=L;return I==null&&A==null?!0:I?be(B,I):A?!be(B,A):!1},g=(L,B)=>(B==null||B.stopPropagation(),L),C=(L,B)=>{B!=null&&i({[B]:L})},f=e.computed(()=>JSON.stringify(e.unref(a),null,2)),w=L=>{try{const B=JSON.parse(L||"{}");i(B,!1)}catch(B){console.error(B)}},_=e.ref(""),k=L=>{try{_.value=L}catch(B){console.error(B)}},x=(L,B)=>{try{s({[B]:L})}catch(I){console.error(I)}},h=e.computed(()=>{var L;return["customGraph"].includes((L=e.unref(a))==null?void 0:L.type)});return{type:c,handleChangeType:l,activePanel:o,tablePanel:n,ComponentString:f,updateComponentOptions:w,tableOptions:r,optionCode:_,onEditorChange:k,tableEditorChange:x,onSwitchClick:g,onSwitchChange:C,detailPropsGroups:u,isRenderForm:m,isShowOptionEditor:h}}}),rm="",lm="",Cu={class:"style-group"};function wu(t,o,n,a,r,i){const s=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("editor"),g=e.resolveComponent("a-collapse"),C=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Cu,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(l,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=f=>t.type=f),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(s,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(s,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(s,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(s,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(s,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(g,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=f=>t.activePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[t.isRenderForm(f,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[f.title?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{extra:e.withCtx(()=>[typeof f.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:f.enableProps,onChange:w=>t.onSwitchChange(w,f.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:f.props,disabled:typeof f.enableProps=="boolean"?!f.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(m,{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(g,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=f=>t.tablePanel=f)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,f=>{var w;return e.openBlock(),e.createElementBlock(e.Fragment,{key:f.title},[f.title&&((w=f.onlyType)!=null&&w.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:f.title,key:f.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:f.props,disabled:typeof f.enableProps=="boolean"?!f.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(C)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=f=>t.tableEditorChange(f,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(m,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=f=>t.tableEditorChange(f,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const ku=oe(bu,[["render",wu],["__scopeId","data-v-2fb3e2ad"]]),_u=e.defineComponent({name:"Card",components:{CloseOutlined:Kt,MenuOutlined:Xn,ADropdown:$.Dropdown,AMenu:$.Menu,AMenuItem:$.MenuItem},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]},path:{type:String,default:""}},emits:["delete","update"],setup(t){const o=e.inject(Pe),n=e.inject(zt),a=e.inject(bn),{onUpdateControl:r,onDeleteControl:i,onAddMenuControl:s}=e.inject("CHANGE_CONTROL",{onUpdateControl:y=>{},onDeleteControl:y=>{},onAddMenuControl:(y,b,T)=>{}}),d=e.computed(()=>{var y;return(y=e.unref(o))==null?void 0:y.filter(b=>b.keyName!=="")}),l=e.computed(()=>{var T,D;const y=[],b=(T=e.unref(d))==null?void 0:T.find(v=>{var G;return v.id===((G=t.control)==null?void 0:G.id)});if(b){const v=b.type,G=J.pick(b,["value","startTime","endTime"]);(D=Object.keys(G))!=null&&D.length||(G.value="");for(const K in G)if(Object.prototype.hasOwnProperty.call(G,K)){const Q=e.unref(a)[K];if(Array.isArray(Q)){const ee=Q.find(ae=>be(v,ae.onlyType));ee&&y.push({label:ee.label,value:K})}else y.push({label:Q.label,value:K})}}return y}),c=()=>{i({index:t.index,path:t.path}),u(t.control.id)},p=({key:y})=>{s(t.path,t.index,y==="2"?"||":"&&")};function u(y){const b=e.unref(d).find(T=>T.id===y);if(b){const{type:T,id:D,events:v=[]}=b,G=Qt(T),K=v.findIndex(Q=>{var ee;return Q.on===G&&Q.target===((ee=e.unref(h))==null?void 0:ee.id)&&Q.emit==="refreshData"});K!==-1&&(v.splice(K,1),n({id:D,events:v}))}}const m=y=>{const b={...t.control};if(b.id=y,b.customValue="",y){const T=e.unref(d).find(D=>D.id===y);T&&(b.keyName=T.keyName,I(T,y))}delete b.prop,r({control:b,index:t.index,path:t.path})},g=e.ref(""),C=()=>{g.value=t.control.id},f=y=>{r({control:{...t.control,prop:y},index:t.index,path:t.path})},w=y=>{r({control:{...t.control,rule:y},index:t.index,path:t.path})},_=y=>{const b={...t.control};b.modelKey&&(b.modelKey=""),b.prop&&(b.prop=""),b.format&&(b.format=""),r({control:{...b,dataType:y,customValue:"",id:"",keyName:""},index:t.index,path:t.path})},k=y=>{r({control:{...t.control,customValue:y.target.value},index:t.index,path:t.path})},x=y=>{const b={...t.control};y==null?delete b.mode:b.mode=y,delete b.conditionLabel,delete b.conditionName,delete b.conditionKey,delete b.conditionValueType,r({control:b,index:t.index,path:t.path})},h=e.inject(Ye),L=e.inject(me),B=e.computed(()=>{var Ee;const{classificationList:y=[],seriesList:b=[],leftAxisList:T=[],rightAxisList:D=[],indicators:v=[],rowHeaderList:G=[],queryColumnList:K=[]}=e.unref(L),Q=J.cloneDeep([...y,...b,...T,...D,...v,...G,...K]);if(Q!=null&&Q.length)for(const pe of Q)pe.id=pe.name;const ee=[{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(pe=>({...pe,id:pe.name,label:pe.title||pe.label})),...Q];((Ee=e.unref(h))==null?void 0:Ee.type)==="ecanSelect"&&ee.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const ae=new Map,ye=ee.length;for(let pe=0;pe<ye;pe++){const $e=ee[pe],{id:et}=$e||{};ae.set(et,$e)}return[...ae].map(([pe,$e])=>$e)});function I(y,b){var K,Q;const{type:T,id:D,events:v=[]}=y,G=Qt(T);e.unref(g)&&b!==e.unref(g)&&(Je(((K=e.unref(L))==null?void 0:K.controlList)||[]).find(ae=>ae.id===e.unref(g))||u(e.unref(g))),v.find(ee=>{var ae;return ee.on===G&&ee.target===((ae=e.unref(h))==null?void 0:ae.id)&&ee.emit==="refreshData"})||n({id:D,events:[...v,{on:G,target:(Q=e.unref(h))==null?void 0:Q.id,emit:"refreshData"}].reverse()})}const A=(y,b)=>{if(y){const{label:T,name:D,id:v,genericType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee}=b||{},ae={...t.control,conditionKey:v,conditionLabel:T,conditionName:D,conditionValueType:G,indexCode:K,typeGuid:Q,indexCodeNum:ee};gt(ae,"rule")||(ae.rule="EQUAL"),gt(ae,"dataType")||(ae.dataType="component"),r({control:ae,index:t.index,path:t.path})}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,r({control:T,index:t.index,path:t.path})}},E=(y,b)=>{var T;return(T=b==null?void 0:b.keyName)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},N=(y,b)=>{var T;return(T=b==null?void 0:b.label)==null?void 0:T.toLowerCase().includes(y==null?void 0:y.toLowerCase())},O=e.computed(()=>{const y=e.unref(B).find(T=>T.id===t.control.conditionKey);let b="";return y&&(b=(y==null?void 0:y.genericType)||""),b==="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"}]:b==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:b==="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"}]:[]}),M=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],P=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(G=>G.id===b),v=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];be(D==null?void 0:D.type,v)&&(y=!0)}return y}),S=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(v=>v.id===b);(D==null?void 0:D.type)==="ecanRangePicker"&&(y=!0)}return y}),F=e.computed(()=>{let y=!1;const{id:b="",dataType:T="component"}=t.control;if(b&&T==="component"){const D=e.unref(d).find(v=>v.id===b);["ecanDatePicker","ecanRangePicker"].includes(D==null?void 0:D.type)&&(y=!0)}return y});return{propOptions:l,usedComponentList:d,onDelete:c,onIdChange:m,onIdFocus:C,onPropChange:f,onModeChange:x,onRuleChange:w,onDataTypeChange:_,onCustomValueChange:k,conditionKeyOptions:B,onConditionKeyChange:A,idFilterOption:E,filterOption:N,onFormatChange:y=>{r({control:{...t.control,format:y},index:t.index,path:t.path})},onModelPropChange:y=>{r({control:{...t.control,modelKey:y.target.value},index:t.index,path:t.path})},clickConditionMenu:p,ruleOption:O,dataTypeOption:M,isShowProp:S,isShowFormat:F,isShowModelProp:P,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"}]}}}),im="",sm="",xu={class:"control-card"};function Su(t,o,n,a,r,i){const s=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),l=e.resolveComponent("menu-outlined"),c=e.resolveComponent("a-menu-item"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("a-dropdown"),m=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",xu,[e.createVNode(s,{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(s,{class:"field-name",value:t.control.rule,options:t.ruleOption,style:{"max-width":"100px"},onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(s,{class:"field-name",value:t.control.dataType,options:t.dataTypeOption,style:{"max-width":"100px"},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,style:{"max-width":"180px"},onInput:t.onCustomValueChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.control.dataType==="component"?(e.openBlock(),e.createBlock(s,{key:1,class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},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(s,{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(s,{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(u,{trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.clickConditionMenu},{default:e.withCtx(()=>[e.createVNode(c,{key:"1"},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(c,{key:"2"},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(l,{class:"more-icon"})]),_:1}),e.createVNode(m,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Nu=oe(_u,[["render",Su],["__scopeId","data-v-d25f813a"]]),Au=e.defineComponent({name:"ControlList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},path:{type:String,default:""},intersection:{type:Array,default:()=>[]}},components:{ControlCard:Nu}}),cm="",Tu={key:0,class:"condition-list"},Eu={key:0,class:"condition-container"},Lu={key:0,class:"condition-text"},Vu={key:1,class:"condition-text"},Bu={class:"conditions"};function Ou(t,o,n,a,r,i){const s=e.resolveComponent("control-list",!0),d=e.resolveComponent("control-card");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Tu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(l,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[l.join&&l.conditions&&Array.isArray(l.conditions)?(e.openBlock(),e.createElementBlock("div",Eu,[l.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.join==="||"?(e.openBlock(),e.createElementBlock("div",Lu,"或")):e.createCommentVNode("",!0),l.join==="&&"?(e.openBlock(),e.createElementBlock("div",Vu,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Bu,[l.conditions.length>0?(e.openBlock(),e.createBlock(s,{key:0,level:t.level+1,path:`${t.path?t.path+"-":""}${c}`,list:l.conditions,intersection:t.intersection},null,8,["level","path","list","intersection"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:l.keyValue||`${t.level}-${c}`,control:l,index:c,path:t.path||"",intersection:t.intersection},null,8,["control","index","path","intersection"]))],64))),128))])):e.createCommentVNode("",!0)}const Iu=oe(Au,[["render",Ou],["__scopeId","data-v-916ff9bd"]]),Fu=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlList:Iu,AButton:$.Button},setup(){const t=e.inject(Pe),o=e.inject(me),n=e.inject(xe),a=e.computed(()=>{var u,m;const p=((u=e.unref(o))==null?void 0:u.controlList)||[];for(const g of p)g.conditionKey&&(gt(g,"rule")||(g.prop==="startTime"?g.rule="GREATER_EQUAL":g.prop==="endTime"?g.rule="LESS_EQUAL":g.rule="EQUAL"),gt(g,"dataType")||(g.dataType="component"));return(p==null?void 0:p.length)>1&&!((m=p[0])!=null&&m.join)?[{join:"&&",conditions:p}]:p}),r=e.ref(null),i=p=>{const u={...e.unref(o),...p,sqlConditions:la({...e.unref(o),...p},e.unref(t))};n(u)},s=p=>{var m;const u=(m=e.unref(a))==null?void 0:m.slice();u==null||(u==null?void 0:u.length)===0?i({controlList:[{keyValue:ke()}]}):u[0]!=null&&(u[0].conditions==null||u[0].join!==p?i({controlList:[{join:p,conditions:[u[0],{keyValue:ke()}]}]}):u[0].conditions.length>1&&u[0].join===p&&(u[0].conditions.push({keyValue:ke()}),i({controlList:u})))},d=p=>{var w,_,k,x;const{index:u,path:m}=p;let g=J.cloneDeep((w=e.unref(a))==null?void 0:w.slice()),C=g;const f=m.split("-");if(f!=null&&f.length){for(const h of f)if(C[h])C=(_=C[h])==null?void 0:_.conditions;else break;if(Array.isArray(C)&&C[u])if(C.splice(u,1),C.length===1){if(f.length>0){const h=f.length-1,L=f[h],B=f.slice(0,h);let I=g,A="";for(const E of B)if(I[E])A=(k=I[E])==null?void 0:k.join,I=(x=I[E])==null?void 0:x.conditions;else break;if(A===C[0].join){if(Array.isArray(C[0].conditions)){const E=J.cloneDeep(C[0].conditions);I.splice(+L,1),I.splice(+L,0,...E)}}else I[L]=C[0]}}else C.length===0&&(g=[]);i({controlList:g})}},l=p=>{var _,k;const{control:u,index:m,path:g}=p,C=J.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let f=C;const w=g.split("-");if(w!=null&&w.length)for(const x of w)if(f[x])f=(k=f[x])==null?void 0:k.conditions;else break;Array.isArray(f)&&f[m]&&(f[m]=u),i({controlList:C})},c=(p,u,m)=>{var _,k,x;const g=J.cloneDeep((_=e.unref(a))==null?void 0:_.slice());let C=g,f="";const w=p.split("-");if(w!=null&&w.length){for(const h of w)if(C[h])f=(k=C[h])==null?void 0:k.join,C=(x=C[h])==null?void 0:x.conditions;else break;if(f===m)C.splice(u+1,0,{keyValue:ke()});else{const h=J.cloneDeep(C[u]);C[u]={join:m,conditions:[h,{keyValue:ke()}]}}i({controlList:g})}};return e.provide("CHANGE_CONTROL",{onDeleteControl:d,onUpdateControl:l,onAddMenuControl:c}),{controlList:a,bindComponentId:r,onAddControl:s}}}),dm="",Du={class:"control-group"},$u={class:"control-group-header"},vu={class:"control-group-content"};function Mu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("control-list");return e.openBlock(),e.createElementBlock("div",Du,[e.createElementVNode("div",$u,[Array.isArray(t.controlList)&&t.controlList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{onClick:o[0]||(o[0]=l=>t.onAddControl("&&"))},{default:e.withCtx(()=>[e.createTextVNode("添加且条件")]),_:1}),e.createVNode(s,{onClick:o[1]||(o[1]=l=>t.onAddControl("||")),style:{"margin-left":"15px"}},{default:e.withCtx(()=>[e.createTextVNode("添加或条件")]),_:1})],64)):(e.openBlock(),e.createBlock(s,{key:1,onClick:o[2]||(o[2]=l=>t.onAddControl())},{default:e.withCtx(()=>[e.createTextVNode("添加条件")]),_:1}))]),e.createElementVNode("div",vu,[e.createVNode(d,{class:"condition-list",list:t.controlList,level:0,intersection:t.intersection},null,8,["list","intersection"])])])}const Pu=oe(Fu,[["render",Mu],["__scopeId","data-v-1e37d2d3"]]),ju=e.defineComponent({name:"VariableCard",props:{item:{type:Object,default:()=>({})},index:{type:Number,require:!0},label:String},components:{CloseOutlined:Kt,AppstoreAddOutlined:Vo,ASelect:$.Select,ASelectOption:$.SelectOption,AInput:$.Input,APopover:$.Popover,ATabs:$.Tabs,ATabPane:$.TabPane,AInputNumber:$.InputNumber},setup(t,{emit:o}){const n=e.ref(!1),a=e.inject(Pe),r=e.computed(()=>{var h;return(h=e.unref(a))==null?void 0:h.filter(L=>L.keyName!=="")}),i=[{label:"TEXT",value:"TEXT"},{label:"NUMBER",value:"NUMBER"},{label:"DATE",value:"DATE"}],s=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],d=[{label:"间隔值",value:"rangeValue"},{label:"开始时间",value:"startTime"},{label:"结束时间",value:"endTime"}],l=e.ref(J.cloneDeep(t.item));e.watch(l,h=>{o("update",{...h,label:t.label},t.index)},{deep:!0});const c=e.computed(()=>{var L;let h=null;if(((L=e.unref(l))==null?void 0:L.dataType)==="component"){const B=e.unref(r).find(I=>{var A;return I.id===((A=e.unref(l))==null?void 0:A.id)});B&&(h=B)}return h}),p=e.computed(()=>{var L;let h=!1;return((L=e.unref(l))==null?void 0:L.variableType)==="DATE"&&(h=!0),h}),u=e.computed(()=>{let h=!1;return e.unref(c)&&(h=be(e.unref(c).type,"range")),h}),m=e.computed(()=>{let h=!1;return e.unref(c)&&(be(e.unref(c).type,"range")?["startTime","endTime"].includes(e.unref(l).dateTypeValue)&&(h=!0):be(e.unref(c).type,"date")&&(h=!0)),h}),g=(h,L)=>{h&&(e.unref(l).keyName=L.keyName)},C=()=>{o("delete",t.index)},f=e.computed(()=>e.unref(p)?[{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"}]:[]),w=()=>{e.unref(l).id=null,e.unref(l).keyName="",e.unref(l).dateTypeValue=null,e.unref(l).variableValue=""},_=()=>{e.unref(l).format=null},k=(h,L)=>{var B;return(B=L==null?void 0:L.keyName)==null?void 0:B.toLowerCase().includes(h==null?void 0:h.toLowerCase())};return e.watch(m,h=>{h&&(e.unref(l).operateType||(e.unref(l).operateType="add"),e.unref(l).operateMode||(e.unref(l).operateMode="year"),e.unref(l).operateValue||(e.unref(l).operateValue=0),e.unref(l).activeOperateKey||(e.unref(l).activeOperateKey=1))},{immediate:!0}),{variableData:l,typeOption:i,dataTypeOption:s,usedComponentList:r,formatOptions:f,rangeTypeOptions:d,isShowFormat:p,isDateRangeComponent:u,isShowDateOperate:m,popoverVisible:n,idFilterOption:k,onChangeComponent:g,onDelete:C,onChangeDataType:w,onChangeVariableType:_,changeTab:h=>{e.unref(l).activeOperateKey=h,h===1?e.unref(l).operateValue=0:h===2&&(e.unref(l).operateValue="rangeValue")}}}}),pm="",Ru={class:"variable-item"},Uu=["title"],Gu={class:"popover-content-wrap"},zu={style:{display:"flex"}};function Hu(t,o,n,a,r,i){const s=e.resolveComponent("a-input"),d=e.resolveComponent("a-select"),l=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-input-number"),p=e.resolveComponent("a-tab-pane"),u=e.resolveComponent("a-tabs"),m=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),C=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Ru,[t.variableData.randomKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"var-indicator",title:t.label},e.toDisplayString(t.label),9,Uu)):e.createCommentVNode("",!0),e.createVNode(s,{class:"field-name",value:t.variableData.variableName,"onUpdate:value":o[0]||(o[0]=f=>t.variableData.variableName=f),placeholder:"请输入变量名",disabled:!!t.variableData.randomKey},null,8,["value","disabled"]),e.createVNode(d,{class:"field-name",value:t.variableData.variableType,"onUpdate:value":o[1]||(o[1]=f=>t.variableData.variableType=f),options:t.typeOption,style:{"max-width":"120px"},placeholder:"请选择变量类型",onChange:t.onChangeVariableType},null,8,["value","options","onChange"]),e.createVNode(d,{class:"field-name",value:t.variableData.dataType,"onUpdate:value":o[2]||(o[2]=f=>t.variableData.dataType=f),options:t.dataTypeOption,style:{"max-width":"120px"},onChange:t.onChangeDataType},null,8,["value","options","onChange"]),t.variableData.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:1,class:"field-name",value:t.variableData.id,"onUpdate:value":o[3]||(o[3]=f=>t.variableData.id=f),options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,style:{"max-width":"180px"},placeholder:"请选择组件",onChange:t.onChangeComponent},null,8,["value","options","filter-option","onChange"])):(e.openBlock(),e.createBlock(s,{key:2,class:"field-name",style:{"max-width":"180px"},value:t.variableData.variableValue,"onUpdate:value":o[4]||(o[4]=f=>t.variableData.variableValue=f),placeholder:"请输入变量值"},null,8,["value"])),t.isDateRangeComponent?(e.openBlock(),e.createBlock(d,{key:3,class:"field-name",value:t.variableData.dateTypeValue,"onUpdate:value":o[5]||(o[5]=f=>t.variableData.dateTypeValue=f),options:t.rangeTypeOptions,placeholder:"请选择取值类型"},null,8,["value","options"])):e.createCommentVNode("",!0),e.createVNode(d,{class:"field-name",value:t.variableData.format,"onUpdate:value":o[6]||(o[6]=f=>t.variableData.format=f),options:t.formatOptions,placeholder:"请选择值格式"},null,8,["value","options"]),t.isShowDateOperate?(e.openBlock(),e.createBlock(g,{key:4,visible:t.popoverVisible,"onUpdate:visible":o[14]||(o[14]=f=>t.popoverVisible=f),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Gu,[e.createVNode(u,{defaultActiveKey:t.variableData.activeOperateKey,onChange:t.changeTab},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(p,{tab:"日期偏移",key:1},{default:e.withCtx(()=>[e.createVNode(c,{class:"field-name",min:"0",value:t.variableData.operateValue,"onUpdate:value":o[9]||(o[9]=f=>t.variableData.operateValue=f),style:{"max-width":"180px",flex:"auto"}},{addonBefore:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[7]||(o[7]=f=>t.variableData.operateType=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("加")]),_:1}),e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("减")]),_:1})]),_:1},8,["value"])]),addonAfter:e.withCtx(()=>[e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[8]||(o[8]=f=>t.variableData.operateMode=f),style:{width:"60px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"])]),_:1},8,["value"])]),_:1})),t.isDateRangeComponent?(e.openBlock(),e.createBlock(p,{tab:"自定义",key:2},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(d,{value:t.variableData.operateValue,"onUpdate:value":o[10]||(o[10]=f=>t.variableData.operateValue=f),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateMode,"onUpdate:value":o[11]||(o[11]=f=>t.variableData.operateMode=f),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(l,{value:"year"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(l,{value:"month"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(l,{value:"week"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(l,{value:"day"},{default:e.withCtx(()=>[e.createTextVNode("日")]),_:1}),e.createVNode(l,{value:"hour"},{default:e.withCtx(()=>[e.createTextVNode("时")]),_:1}),e.createVNode(l,{value:"minute"},{default:e.withCtx(()=>[e.createTextVNode("分")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.variableData.operateType,"onUpdate:value":o[12]||(o[12]=f=>t.variableData.operateType=f)},{default:e.withCtx(()=>[e.createVNode(l,{value:"minus"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(l,{value:"add"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[13]||(o[13]=f=>{t.popoverVisible=!0})},[e.createVNode(m)])]),_:1},8,["visible"])):e.createCommentVNode("",!0),t.variableData.randomKey?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C,{key:5,class:"delete-icon",onClick:t.onDelete},null,8,["onClick"]))])}const Yu=oe(ju,[["render",Hu],["__scopeId","data-v-1d5b6ae6"]]),Wu=e.defineComponent({name:"VariableGroup",components:{VariableItem:Yu},setup(){const t=e.inject(me),o=e.inject(xe),n=e.inject(Pe),a=e.computed(()=>{var c;return((c=e.unref(t))==null?void 0:c.variableList)||[]}),r=l=>{o({...e.unref(t),variableConditions:Bt(l,n),variableList:l})};return{variableList:a,onAddVariable:()=>{const l=J.cloneDeep(e.unref(a));l.push({keyValue:ke(),variableType:"TEXT",dataType:"",id:null,dateTypeValue:null,format:null,operateType:"add",operateMode:"year",operateValue:0,activeOperateKey:1}),r(l)},onUpdateItem:(l,c)=>{if(c>=0){const p=J.cloneDeep(e.unref(a));p[c]=l,r(p)}},onDeleteItem:l=>{if(l>=0){const c=J.cloneDeep(e.unref(a));c.splice(l,1),r(c)}}}}}),um="",qu={class:"variable-group"},Ku={class:"variable-group-header"},Qu={class:"variable-group-content"};function Xu(t,o,n,a,r,i){const s=e.resolveComponent("a-button"),d=e.resolveComponent("variable-item");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",qu,[e.createElementVNode("div",Ku,[e.createVNode(s,{onClick:t.onAddVariable},{default:e.withCtx(()=>[e.createTextVNode("添加变量")]),_:1},8,["onClick"])])]),e.createElementVNode("div",Qu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.variableList,(l,c)=>(e.openBlock(),e.createBlock(d,{key:l.keyValue,item:l,index:c,label:l.label,onUpdate:t.onUpdateItem,onDelete:t.onDeleteItem},null,8,["item","index","label","onUpdate","onDelete"]))),128))])],64)}const Ju=oe(Wu,[["render",Xu],["__scopeId","data-v-fd60cd09"]]),Zu=(t={})=>{const o=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u}=s;return{label:d,columnName:l,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(s,d)=>Object.prototype.hasOwnProperty.call(s,d),a=s=>{n(s,"dataType")&&(s.fieldType==="DATE"&&(s.label=s.fieldName,s.dataType==="component"&&(s.fieldValue="${"+s.fieldValue+"}")),delete s.dataType),n(s,"activeKey")&&delete s.activeKey,n(s,"radioValue")&&delete s.radioValue},r=s=>{const d=[];return s!=null&&s.length&&s.forEach(l=>{if(l.join&&l.conditions){const c=!l.conditions.some(p=>p.join&&p.conditions);l.conditions.forEach((p,u)=>{a(p),c?u<l.conditions.length-1?d.push({join:l.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:l.join}):d.push(p)})}else a(l),d.push(l)}),d},i=(s={})=>{const{label:d,name:l,location:c,show:p,indexCode:u,calcType:m="COLUMN",builtInFormula:g,builtInValueSource:C,builtInCalcWay:f,formula:w,conditions:_,aggregate:k}=s;let x;return _&&(x=r(_)),{label:d.trim(),columnName:l,location:c,show:p,calcType:m,hrpIndexCode:u,aggregate:k,builtInFormula:g,builtInValueSource:C,builtInCalcWay:f,formula:w,conditions:x}};return async()=>{const{graphicConfig:s,type:d,request:l}=t;let{source:c,dataViewId:p,plugin:u="1",layer:m,chartType:g,classificationList:C=[],seriesList:f=[],leftAxisList:w=[],rightAxisList:_=[],queryColumnList:k=[],indicators:x=[],dataSourceId:h,idxLibMode:L,preview:B=!1}=s||{};m==null&&(be(d,"table")?m="1":m="2");let I;if(Array.isArray(C)&&C.length>0){const O=C.length;for(let M=0;M<O;M++){const P=C[M]||{},{label:S="",name:F="",show:V=!1,sort:j,customGroup:R,conditions:y}=P;if(V||O===1){I={label:S.trim(),columnName:F,show:V,sort:j,customGroup:R,conditions:r(y)};break}}}let A;if(Array.isArray(f)&&f.length>0){const O=f.length;for(let M=0;M<O;M++){const P=f[M]||{},{label:S="",name:F="",show:V=!1,sort:j,customGroup:R,conditions:y}=P;if(V||O===1){A={label:S.trim(),columnName:F,show:V,sort:j,customGroup:R,conditions:r(y)};break}}}const E=[];k==null||k.forEach(O=>{E.push(o(O))});const N=[];if(w==null||w.forEach(O=>{O.location="LEFT",N.push(i(O))}),_==null||_.forEach(O=>{O.location="RIGHT",N.push(i(O))}),x==null||x.forEach(O=>{O.location="LEFT",N.push(i(O))}),!(m==="1"&&E.length===0)&&!(m==="2"&&N.length===0))try{return await l.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:m,chartType:g,classification:I,series:A,indicatorList:N,queryColumns:E,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:L,preview:B})}catch(O){console.error(O)}}},Ka=(t,o)=>{const n={dayjs:se,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const i=`function (${a}){return ${t}}`;let s;try{s=Function(`"use strict";return (${i})`)()(...r)}catch{return t}return s},fo=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const i={...o},s=t.match(/\{(.+?)\}/g);if(s==null||s.length===0)return t;for(let d=0;d<s.length;d++){const l=s[d];let c=l.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let m=0;m<u.length;m++){const g=u[m],C=i[g];C!=null&&(c=c.replace(g,C))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Ka(c,n)),t=t.replace(l,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,"&nbsp;&nbsp;")),t},Ut=(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 i=0;i<a;i++){const s=n[i];if(s==null||s==="")break;let d=(r=s.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let l=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(l=Ka(d)),t=t.replace(s,l)}catch{t=t.replace(s,d)}}return t},ef=(t,o,n)=>{switch(t.type){case"bar":return tf(t,o,n);case"line":return of(t,o,n);case"pie":return nf(t,o,n);case"comboGraph":return af(t,o,n);default:return{}}},tf=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>{const c=s,p=c.length,u=[];for(let m=0;m<p;m++){const g={...c[m],type:"bar",barWidth:t.barWidth};t.isStack&&(g.stack="stack"),g.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(g)}return u}),l=e.computed(()=>i.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="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:C,seriesName:f,name:w,value:_,data:k}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(m,{textData:{marker:C,name:w,value:_,a:f,b:w,c:_,...k}},{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(l),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 Ut(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?i: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 Ut(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},of=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:i=[],dataset:s=[]}=o,d=e.computed(()=>i.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),l=e.computed(()=>{const c=[],p=s.length;for(let u=0;u<p;u++)c.push({type:"line",...s[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="",m=t.tooltipFormatter;m===""&&(m="{marker} {a} {c}");for(let g=0;g<p;g++){const{marker:C,seriesName:f,name:w,value:_,data:k}=c[g]||{};g===0&&(u+=`${w}<br/>`),u+=fo(m,{textData:{marker:C,name:w,value:_,a:f,b:w,c:_,...k}},{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 Ut(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 Ut(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(l)}},nf=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const i=t.isUseLabelColors,s=t.colors;r=r.map((d,l)=>({label:i?{color:s[l]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:i=>{const{marker:s,seriesName:d,name:l,value:c,percent:p,data:u}=i||{};return fo(t.tooltipFormatter,{textData:{marker:s,name:l,value:c,percent:p,a:d,b:l,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:Es(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:{}}}]}},af=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,i=e.computed(()=>a.map(l=>{let c={};return l&&typeof l=="object"?c={...l,textStyle:{fontSize:n}}:c={value:l,textStyle:{fontSize:n}},c})),s=e.computed(()=>{const l=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const m=p[u];l.push({type:m==null?void 0:m.type,yAxisIndex:m==null?void 0:m.axisIndex,...r[u]})}return l}),d=e.computed(()=>{const l=t.yAxis;return l==null?void 0:l.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Ut(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:l=>{const c=l.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const m=t.seriesTypes;for(let g=0;g<c;g++){const C=m[g],{tooltipFormatter:f}=C||{},{marker:w,seriesName:_,name:k,value:x,data:h}=l[g]||{};g===0&&(p+=`${k}<br/>`),p+=fo(f||u,{textData:{marker:w,name:k,value:x,seriesName:_,a:_,b:k,c:x,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(i),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(s)}},rf=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,i=new Map,s=t.length,d=a.length;if(s===1){const p=[];for(let m=0;m<d;m++){const g=a[m],{label:C,value:f}=g,w={...t[0],value:t[0][f]};r.add(C),p.push(w)}const u=t[0][n]||"";i.set(u,p)}else for(let p=0;p<s;p++){const u=t[p],m=u[n];r.add(m);for(let g=0;g<d;g++){const C=a[g],{label:f,value:w}=C,_={...u,value:u[w]};if(i.has(f)){const k=i.get(f);k.push(_),i.set(f,k)}else i.set(f,[_])}}const l=Array.from(r),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:l,dataset:c}},lf=(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 i=new Set,s=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],m=u[n]||"",g=u[a]||"",C=u[r]||"";if(i.add(m),s.has(C)){const f=s.get(C);f.push({name:m,value:g,...u}),s.set(C,f)}else s.set(C,[{name:m,value:g,...u}])}const l=Array.from(i),c=[];for(const[p,u]of s)c.push({name:p,data:u});return{dimensions:l,dataset:c}},sf=e.defineComponent({name:"ChartGraph",components:{ASpin:$.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):l),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(ve);let i=null;const s=e.inject(Me)||"",d=e.inject(me)||{},l=e.inject(Gt)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),m=e.ref(!1),g=e.ref(!1),C=e.computed(()=>g.value?rr:12),f=e.ref({}),w=e.ref(),_=e.computed(()=>{const E=e.unref(n.value);if((E==null?void 0:E.type)==="customGraph")return w.value;const N=ef(E,e.unref(f),C.value);return{toolbox:{show:E.toolboxShow,left:E.toolboxLeft,top:E.toolboxTop,itemSize:E.toolboxItemSize,itemGap:E.toolboxItemGap,feature:{myDataZoom:{show:g.value?!1:E.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:E.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:E.titleText,subtext:E.titleSubtext,left:"center"},grid:{top:E.gridTop,bottom:E.gridBottom,left:E.gridLeft,right:E.gridRight,containLabel:E.gridContainLabel},color:E.colors,...N}}),k=(E=[],N,O=!1)=>{const M=O?N:null;f.value=rf(E,M)},x=(E=[],N)=>{f.value=lf(E,N)},h=async()=>{var E,N,O;try{const M=Zu({graphicConfig:e.unref(a.value),type:(E=e.unref(n.value))==null?void 0:E.type,request:r,indicatorToken:s});m.value=!0;const P=await M(),{columns:S=[],rows:F=[]}=((N=P==null?void 0:P.data)==null?void 0:N.data)??{};if(((O=e.unref(n.value))==null?void 0:O.type)==="pie"){let V=[];if(S.length>0){const j=S[0],R=S[1];V=F.map(y=>({name:y[j],value:y[R]}))}x(V)}else{let V;S.length>0&&(V={name:S[0],types:S.slice(1).map(j=>({label:j,value:j}))}),k(F,V,!0)}}catch(M){console.error(M)}finally{m.value=!1}},L={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},B=()=>{e.unref(f).dataset.length===0?u.value.setOption(L):u.value.setOption(_.value)},I=()=>{e.unref(n.value).type!=="customGraph"&&h()},A=()=>{var E;(E=u.value)==null||E.resize()};return e.watch(_,()=>{B()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,E=>{try{const N=eval;w.value=N(E)}catch(N){console.error(N)}},{immediate:!0}),e.onMounted(()=>{p.value&&(i=new ResizeObserver(A),i.observe(p.value)),u.value=ar.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),i&&(i.disconnect(),i=null)}),o({refreshData:I}),{echartRef:c,loading:m}}}),fm="",cf={class:"ecan-chart-graph",ref:"chartWrapRef"},df={style:{width:"100%",height:"100%"},ref:"echartRef"};function pf(t,o,n,a,r,i){const s=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",cf,[e.createVNode(s,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",df,null,512)]),_:1},8,["spinning"])],512)}const Qa=oe(sf,[["render",pf],["__scopeId","data-v-8049fed2"]]),uf=e.defineComponent({name:"DataConfig",components:{DataGroup:Zc,StyleGroup:ku,ChartGraph:Qa,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:Pu,VariableGroup:Ju,AButton:$.Button,ReloadOutlined:ri},setup(){var I;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Ye),r=e.inject(fn),i=e.inject(me),s=e.inject(Pe),d=e.inject(Cn),l=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const A=J.cloneDeep(e.unref(a));p(A);const E=J.pick(A,J.without(Object.keys(A),"position","top","left","width","height"));be(A.type,l)?(E.height=A.height,E.width=A.width):E.height="290px";const N=J.cloneDeep(e.unref(i));return N.pageMode="design",N.componentList=s,N.preview=!0,N.pageConfig=d,{...E,graphicConfig:N,toolboxShow:!1,sourceLeft:A.left,sourceTop:A.top}});function p(A){var E,N,O,M;["#ffffff","#fff"].includes((E=A==null?void 0:A.color)==null?void 0:E.toLowerCase())&&(A.color="#000"),["#ffffff","#fff"].includes((N=A==null?void 0:A.variableColor)==null?void 0:N.toLowerCase())&&(A.variableColor="#000"),["#ffffff","#fff"].includes((O=A==null?void 0:A.increaseColor)==null?void 0:O.toLowerCase())&&(A.increaseColor="#000"),["#ffffff","#fff"].includes((M=A==null?void 0:A.declineColor)==null?void 0:M.toLowerCase())&&(A.declineColor="#000")}const u=e.computed(()=>{let A=!0;return be(e.unref(c).type,l)&&(A=!1),A}),m=e.computed(()=>{var A;return(A=e.unref(c))==null?void 0:A.type}),g=e.computed(()=>{var A;return!!((A=e.unref(c))!=null&&A.isGroupTable)}),C=A=>{const E=A==="1";E&&m.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(E),A==="3"&&x()},f=e.ref(),w=e.inject(ve),_=e.unref(e.inject(Me)),k=(I=window==null?void 0:window.config)==null?void 0:I.pageId;function x(){var S;const{leftAxisList:A=[],rightAxisList:E=[],queryColumnList:N=[],indicators:O=[]}=e.unref(i),M=[...A,...E,...N,...O],P={};for(const F of M){const{id:V="",indexCode:j=""}=F;V&&!gt(F,"calcType")&&!P[V]&&(P[V]=j)}if((S=Object.keys(P))!=null&&S.length){const F=[];for(const V in P)F.push(new Promise((j,R)=>{w.post(`${Ve}/diagram/hrpIndexWithComplex`,{pageId:k,indexGuid:V,indexCode:P[V],dataSourceId:""},{headers:{Authentication:_,operateContext:"ygt"}}).then(y=>{var D;const{success:b,data:T=[]}=y.data;b&&((D=T==null?void 0:T.dataViewColumns)!=null&&D.length)?j(T.dataViewColumns):R(T)}).catch(y=>{R(y)})}));Promise.all(F).then(V=>{if(V!=null&&V.length){const j=V.reduce((R,y)=>R.filter(b=>y.find(T=>T.typeGuid===b.typeGuid)));f.value=j.filter(R=>R.typeGuid)}})}}const h=()=>{var E;let A;r&&m.value==="table"?A=window.updateConfig:A=(E=e.unref(n))==null?void 0:E.refreshData,typeof A=="function"&&A()},L=e.inject(xe),B=()=>{var A;L({variableConditions:Bt(((A=e.unref(i))==null?void 0:A.variableList)||[],s)})};return e.provide(mn,h),e.watch(i,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:m,isGroupTable:g,onChange:C,component:c,fullWidth:u,renderUsedComponents:s,intersection:f,refreshData:h,refreshAction:B}}}),mm="",ff={class:"data-config"},mf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function hf(t,o,n,a,r,i){const s=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),l=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("variable-group"),u=e.resolveComponent("reload-outlined"),m=e.resolveComponent("a-button"),g=e.resolveComponent("a-tabs"),C=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",ff,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{rightExtra:e.withCtx(()=>[e.createVNode(m,{onClick:t.refreshAction},{icon:e.withCtx(()=>[e.createVNode(u)]),default:e.withCtx(()=>[e.createTextVNode(" 刷新 ")]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(s),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(l,{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),e.createVNode(d,{key:"4",tab:"全局变量","force-render":""},{default:e.withCtx(()=>[e.createVNode(p)]),_:1})]),_: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",mf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(C,{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 yf=oe(uf,[["render",hf],["__scopeId","data-v-d85f4e1e"]]),gf=e.defineComponent({name:"IndicatorLibrary",components:{DataList:_i,DataConfig:yf},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),i=e.computed(()=>t.indicatorToken||""),s=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var L;return((L=e.unref(s))==null?void 0:L.tableColumns)||[]}),l=e.computed(()=>t.isShowStyleConfig);let c=e.unref(s).graphicConfig?J.cloneDeep(e.unref(s).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(s).chartsOptions?J.cloneDeep(e.unref(s).chartsOptions):e.ref(J.cloneDeep(wn.line));p=e.ref(p);let u=e.unref(s).tableOptions?J.cloneDeep(e.unref(s).tableOptions):e.ref(J.cloneDeep(lr));u=e.ref(u);const m=e.ref([]),g=L=>{m.value=L},C=L=>{c.value={...e.unref(c),...e.unref(L)}},f=(L,B=!0)=>{B?p.value={...e.unref(p),...e.unref(L)}:p.value={...e.unref(L)}},w=L=>{u.value={...e.unref(u),...e.unref(L)}},_=()=>m,k=()=>{a.value=!0,e.unref(s).graphicConfig&&(c.value=J.cloneDeep(e.unref(s).graphicConfig)),e.unref(s).chartsOptions&&(p.value=J.cloneDeep(e.unref(s).chartsOptions)),e.nextTick(()=>{a.value=!1})},x=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=x,t.request&&e.provide(ve,t.request),e.provide(un,{setDataList:g,getDataList:_});const h=L=>{n("updateUsedComponent",L)};return e.provide(Ye,s),e.provide(me,c),e.provide(Gt,p),e.provide(hn,u),e.provide(go,r),e.provide(fn,l),e.provide(Me,i),e.provide(xe,C),e.provide(ho,f),e.provide(yo,w),e.provide(Pe,t.renderUsedComponentList),e.provide(zt,h),e.provide(bn,t.mapAttributeProps),e.provide(Cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:k}),{isUpdate:a}}}),hm="",bf={key:0,class:"config-modal"},Cf={class:"config-modal-left"},wf={class:"config-modal-right"};function kf(t,o,n,a,r,i){const s=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",bf,[e.createElementVNode("div",Cf,[e.createVNode(s)]),e.createElementVNode("div",wf,[e.createVNode(d)])]))}const Xa=pn(oe(gf,[["render",kf],["__scopeId","data-v-23d542ce"]])),Ja=pn(Qa),Za=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:Ja,EcanIndicatorLibrary:Xa},Symbol.toStringTag,{value:"Module"})),_f={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Za).forEach(a=>{const r=Za[a];r.install&&t.use(r)})}};we.EcanChartGraph=Ja,we.EcanIndicatorLibrary=Xa,we.default=_f,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
64
64
  //# sourceMappingURL=index.umd.js.map