@ecan-bi/indicator-library 1.0.52 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/editor.worker-02df2e61.js +1 -1
- package/dist/assets/json.worker-867823a6.js +1 -1
- package/dist/assets/ts.worker-7254b425.js +1 -1
- package/dist/index.es.js +4633 -4440
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/DataConfigCard.vue.d.ts +10 -0
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/dim-by-count/DimByCount.vue.d.ts +32 -0
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/dim-by-count/index.d.ts +2 -0
- package/types/indicator/indicator-library/data-config/data-config-group/data-config-card/filter-modal/Condition.vue.d.ts +1 -0
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @ecan-bi/indicator-library@1.0.
|
|
2
|
-
(function(fe,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):(fe=typeof globalThis<"u"?globalThis:fe||self,e(fe["@ecan-bi/indicator-library"]={},fe.Vue,fe.LodashEs,fe.AntDesignVue,fe.Draggable,null,null,fe.Dayjs,null,fe.MonacoEditor,null,fe.Echarts))})(this,function(fe,e,oe,v,ft,pf,ff,ie,uf,Va,mf,Ia){var Oa;"use strict";function Fa(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 $a=Fa(Ia),Yo=(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},Te="$request",we=((Oa=window==null?void 0:window.config)==null?void 0:Oa.indicatorURL)||"",Ee="INDICATOR_TOKEN",qo="DATA_LIST",ve="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",Le="UPDATE_GRAPHIC_CONFIG",Ko="SHOW_STYLE_CONFIG",Xo="REFRESH_DATA",Et="CHARTS_OPTIONS",Qo="TABLE_OPTIONS",Da=18,Jt="UPDATE_CHARTS_OPTIONS",Zt="UPDATE_TABLE_OPTIONS",eo="SOURCE_TYPE",Jo="CHANGE_CONDITION",Zo="DATA_VIEW_COLUMNS",Ue="RENDER_USED_COMPONENTS",Lt="UPDATE_USED_COMPONENT",en="MAP_ATTRIBUTE_PROPS",tn="PAGE_CONFIG",on={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%"}},va={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Pa=e.defineComponent({name:"DataViewList",components:{ASpin:v.Spin,ATreeSelect:v.TreeSelect,Draggable:ft},setup(){var O;const t=e.inject(Te),o=e.unref(e.inject(Ee)),n=e.inject(pe),a=e.inject(Le),r=e.computed(()=>{var h;return((h=e.unref(n))==null?void 0:h.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(O=window==null?void 0:window.config)==null?void 0:O.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var N,g;const h=r.value;l.value=!0;try{const{data:L}=await t.post(`${we}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,L.success&&((N=i.value)==null||N.push(s),i.value=(g=i.value)==null?void 0:g.concat(p([L.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(h=[],N)=>{const g=[];return h.forEach(L=>{g.push({id:L.id,pId:N??L.parentId,value:L.id,title:L.name,isLeaf:L.leaf||!1,nature:L.nature,selectable:L.leaf||!1})}),g},f=async(h,N)=>{var I;let g=0;if(h){const{value:T}=h.dataRef;g=T}const{data:L}=await t.post(`${we}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:g},{headers:{Authentication:o,operateContext:"ygt"}});L.success&&(i.value=(I=e.unref(i))==null?void 0:I.concat(p(L.data)),N&&e.unref(r)&&await c())},u=h=>{_(h),a({dataViewId:h,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:y}=e.inject(qo,{setDataList:h=>h}),A=e.ref(!1),m=e.ref([]),_=async h=>{if(h){m.value=[],A.value=!0;try{const N=await t.post(`${we}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:h,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:g,data:L={}}=N.data;if(A.value=!1,g){const{rows:I=[]}=L;I==null||I.forEach(T=>{var M;const P=((M=T==null?void 0:T.dataViewColumns)==null?void 0:M.map(W=>({...W,show:!0})))||[];m.value=[...e.unref(m),...P]}),y(e.unref(m))}}catch{A.value=!1}}},E=h=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[h],x=(h,N)=>{const g=N[h.oldIndex];if(g){const L={...g,label:g.name,name:g.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(L))}};return e.onMounted(async()=>{await f(void 0,!0),_(e.unref(r))}),{dataViewId:r,handleLoadData:f,treeSelectData:i,treeSelectLoading:l,dataViewList:m,dataViewLoading:A,onDataViewIdChange:u,mapGenericType:E,onDragStart:x}}}),wf="",ee=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},Ma={class:"data-view-list"},ja={class:"columns"},Ra={class:"column-item"},Ua={class:"column-item-name"};function Ga(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",Ma,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",ja,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ra,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Ua,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const za=ee(Pa,[["render",Ga],["__scopeId","data-v-4a66f7d2"]]);function xe(t,o){Ha(t)&&(t="100%");var n=Wa(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 Ha(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Wa(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Ya(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Bt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function to(t){return t.length===1?"0"+t:String(t)}function qa(t,o,n){return{r:xe(t,255)*255,g:xe(o,255)*255,b:xe(n,255)*255}}function oo(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 Ka(t,o,n){var a,r,l;if(t=xe(t,360),o=xe(o,100),n=xe(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=oo(d,i,t+1/3),r=oo(d,i,t),l=oo(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function Xa(t,o,n){t=xe(t,255),o=xe(o,255),n=xe(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function Qa(t,o,n){t=xe(t,360)*6,o=xe(o,100),n=xe(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:f*255}}function Ja(t,o,n,a){var r=[to(Math.round(t).toString(16)),to(Math.round(o).toString(16)),to(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 nn(t){return he(t)/255}function he(t){return parseInt(t,16)}var an={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 ut(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=tr(t)),typeof t=="object"&&(Pe(t.r)&&Pe(t.g)&&Pe(t.b)?(o=qa(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Pe(t.h)&&Pe(t.s)&&Pe(t.v)?(a=Bt(t.s),r=Bt(t.v),o=Qa(t.h,a,r),i=!0,d="hsv"):Pe(t.h)&&Pe(t.s)&&Pe(t.l)&&(a=Bt(t.s),l=Bt(t.l),o=Ka(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=Ya(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var Za="[-\\+]?\\d+%?",er="[-\\+]?\\d*\\.\\d+%?",Ge="(?:".concat(er,")|(?:").concat(Za,")"),no="[\\s|\\(]+(".concat(Ge,")[,|\\s]+(").concat(Ge,")[,|\\s]+(").concat(Ge,")\\s*\\)?"),ao="[\\s|\\(]+(".concat(Ge,")[,|\\s]+(").concat(Ge,")[,|\\s]+(").concat(Ge,")[,|\\s]+(").concat(Ge,")\\s*\\)?"),Be={CSS_UNIT:new RegExp(Ge),rgb:new RegExp("rgb"+no),rgba:new RegExp("rgba"+ao),hsl:new RegExp("hsl"+no),hsla:new RegExp("hsla"+ao),hsv:new RegExp("hsv"+no),hsva:new RegExp("hsva"+ao),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 tr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(an[t])t=an[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Be.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Be.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Be.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Be.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Be.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Be.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Be.hex8.exec(t),n?{r:he(n[1]),g:he(n[2]),b:he(n[3]),a:nn(n[4]),format:o?"name":"hex8"}:(n=Be.hex6.exec(t),n?{r:he(n[1]),g:he(n[2]),b:he(n[3]),format:o?"name":"hex"}:(n=Be.hex4.exec(t),n?{r:he(n[1]+n[1]),g:he(n[2]+n[2]),b:he(n[3]+n[3]),a:nn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Be.hex3.exec(t),n?{r:he(n[1]+n[1]),g:he(n[2]+n[2]),b:he(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function Pe(t){return!!Be.CSS_UNIT.exec(String(t))}var Ot=2,rn=.16,or=.05,nr=.05,ar=.15,ln=5,sn=4,rr=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function cn(t){var o=t.r,n=t.g,a=t.b,r=Xa(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Vt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(Ja(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 dn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-Ot*o:Math.round(t.h)+Ot*o:a=n?Math.round(t.h)+Ot*o:Math.round(t.h)-Ot*o,a<0?a+=360:a>=360&&(a-=360),a}function pn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-rn*o:o===sn?a=t.s+rn:a=t.s+or*o,a>1&&(a=1),n&&o===ln&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function fn(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 ro(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=ut(t),r=ln;r>0;r-=1){var l=cn(a),i=Vt(ut({h:dn(l,r,!0),s:pn(l,r,!0),v:fn(l,r,!0)}));n.push(i)}n.push(Vt(a));for(var d=1;d<=sn;d+=1){var s=cn(a),c=Vt(ut({h:dn(s,d),s:pn(s,d),v:fn(s,d)}));n.push(c)}return o.theme==="dark"?rr.map(function(p){var f=p.index,u=p.opacity,y=Vt(lr(ut(o.backgroundColor||"#141414"),ut(n[f]),u*100));return y}):n}var lo={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"},io={},so={};Object.keys(lo).forEach(function(t){io[t]=ro(lo[t]),io[t].primary=io[t][5],so[t]=ro(lo[t],{theme:"dark",backgroundColor:"#141414"}),so[t].primary=so[t][5]});var un=[],mt=[],ir="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function sr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function cr(t,o){if(o=o||{},t===void 0)throw new Error(ir);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=un.indexOf(a);r===-1&&(r=un.push(a)-1,mt[r]={});var l;return mt[r]!==void 0&&mt[r][n]!==void 0?l=mt[r][n]:(l=mt[r][n]=sr(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function mn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){dr(t,r,n[r])})}return t}function dr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function pr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function fr(t,o){pr(t,"[@ant-design/icons-vue] ".concat(o))}function hn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function co(t,o,n){return n?e.h(t.tag,mn({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return co(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,mn({key:o},t.attrs),(t.children||[]).map(function(a,r){return co(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function yn(t){return ro(t)[0]}function gn(t){return t?Array.isArray(t)?t:[t]:[]}var ur=`
|
|
1
|
+
/*! @ecan-bi/indicator-library@1.0.54 */
|
|
2
|
+
(function(me,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):(me=typeof globalThis<"u"?globalThis:me||self,e(me["@ecan-bi/indicator-library"]={},me.Vue,me.LodashEs,me.AntDesignVue,me.Draggable,null,null,me.Dayjs,null,me.MonacoEditor,null,me.Echarts))})(this,function(me,e,oe,$,bt,Eu,Lu,ce,Bu,ja,Ou,Ra){var Ma;"use strict";function Ua(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 Ga=Ua(Ra),en=(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},Le="$request",xe=((Ma=window==null?void 0:window.config)==null?void 0:Ma.indicatorURL)||"",Be="INDICATOR_TOKEN",tn="DATA_LIST",Me="SELECTED_COMPONENT",pe="GRAPHIC_CONFIG",ke="UPDATE_GRAPHIC_CONFIG",on="SHOW_STYLE_CONFIG",nn="REFRESH_DATA",Ft="CHARTS_OPTIONS",an="TABLE_OPTIONS",za=18,ao="UPDATE_CHARTS_OPTIONS",ro="UPDATE_TABLE_OPTIONS",lo="SOURCE_TYPE",rn="CHANGE_CONDITION",ln="DATA_VIEW_COLUMNS",ze="RENDER_USED_COMPONENTS",$t="UPDATE_USED_COMPONENT",sn="MAP_ATTRIBUTE_PROPS",cn="PAGE_CONFIG",dn={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%"}},Ha={name:"表格",type:"table",size:"medium",allOverflow:"title",hoverRow:!0,hoverColor:"#f5f7fa",headerCellStyleMethod:"",rowStyleMethod:"",boderList:[],columnDropEnable:!0,showTotalBool:!1,totalName:"",expandAll:!1},Wa=e.defineComponent({name:"DataViewList",components:{ASpin:$.Spin,ATreeSelect:$.TreeSelect,Draggable:bt},setup(){var V;const t=e.inject(Le),o=e.unref(e.inject(Be)),n=e.inject(pe),a=e.inject(ke),r=e.computed(()=>{var m;return((m=e.unref(n))==null?void 0:m.dataViewId)||null}),l=e.ref(!1),i=e.ref([]),d=(V=window==null?void 0:window.config)==null?void 0:V.pageId,s=e.reactive({title:"已选",value:"YXJG",id:"YXJG",pId:"0",disabled:!0,selectable:!1,isLeaf:!0}),c=async()=>{var E,b;const m=r.value;l.value=!0;try{const{data:O}=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}});l.value=!1,O.success&&((E=i.value)==null||E.push(s),i.value=(b=i.value)==null?void 0:b.concat(p([O.data.rows[0]],"YXJG")))}catch{l.value=!1}},p=(m=[],E)=>{const b=[];return m.forEach(O=>{b.push({id:O.id,pId:E??O.parentId,value:O.id,title:O.name,isLeaf:O.leaf||!1,nature:O.nature,selectable:O.leaf||!1})}),b},u=async(m,E)=>{var I;let b=0;if(m){const{value:L}=m.dataRef;b=L}const{data:O}=await t.post(`${xe}/dataview/treetable`,{pageFlag:!0,pageId:d,parentId:b},{headers:{Authentication:o,operateContext:"ygt"}});O.success&&(i.value=(I=e.unref(i))==null?void 0:I.concat(p(O.data)),E&&e.unref(r)&&await c())},f=m=>{x(m),a({dataViewId:m,classificationList:[],seriesList:[],leftAxisList:[],rightAxisList:[],indicators:[],controlList:[]})},{setDataList:h}=e.inject(tn,{setDataList:m=>m}),A=e.ref(!1),g=e.ref([]),x=async m=>{if(m){g.value=[],A.value=!0;try{const E=await t.post(`${xe}/diagram/sourceList`,{source:"SQL_VIEW",dataViewId:m,pageId:d,pageFlag:!0},{headers:{Authentication:o,operateContext:"ygt"}}),{success:b,data:O={}}=E.data;if(A.value=!1,b){const{rows:I=[]}=O;I==null||I.forEach(L=>{var v;const D=((v=L==null?void 0:L.dataViewColumns)==null?void 0:v.map(W=>({...W,show:!0})))||[];g.value=[...e.unref(g),...D]}),h(e.unref(g))}}catch{A.value=!1}}},S=m=>({TEXT:"字符",NUMBER:"数字",DATE:"时间"})[m],w=(m,E)=>{const b=E[m.oldIndex];if(b){const O={...b,label:b.name,name:b.label};sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}};return e.onMounted(async()=>{await u(void 0,!0),x(e.unref(r))}),{dataViewId:r,handleLoadData:u,treeSelectData:i,treeSelectLoading:l,dataViewList:g,dataViewLoading:A,onDataViewIdChange:f,mapGenericType:S,onDragStart:w}}}),vu="",te=(t,o)=>{const n=t.__vccOpts||t;for(const[a,r]of o)n[a]=r;return n},qa={class:"data-view-list"},Ya={class:"columns"},Ka={class:"column-item"},Qa={class:"column-item-name"};function Xa(t,o,n,a,r,l){const i=e.resolveComponent("a-tree-select"),d=e.resolveComponent("a-spin"),s=e.resolveComponent("draggable");return e.openBlock(),e.createElementBlock("div",qa,[e.createVNode(d,{"wrapper-class-name":"tree-spin",spinning:t.treeSelectLoading,tip:"视图加载中..."},{default:e.withCtx(()=>[e.createVNode(i,{value:t.dataViewId,style:{width:"100%"},placeholder:"请选择视图","dropdown-style":{maxHeight:"400px",overflow:"auto"},"tree-data":t.treeSelectData,"load-data":t.handleLoadData,"tree-data-simple-mode":"",onChange:t.onDataViewIdChange},null,8,["value","tree-data","load-data","onChange"])]),_:1},8,["spinning"]),e.createElementVNode("div",Ya,[e.createVNode(d,{spinning:t.dataViewLoading,tip:"数据加载中..."},{default:e.withCtx(()=>[e.createVNode(s,{modelValue:t.dataViewList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.dataViewList=c),group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,onStart:o[1]||(o[1]=c=>t.onDragStart(c,t.dataViewList))},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Ka,[e.createTextVNode(" 【"+e.toDisplayString(t.mapGenericType(c.genericType))+"】 ",1),e.createElementVNode("span",Qa,e.toDisplayString(c.name),1)])]),_:1},8,["modelValue"])]),_:1},8,["spinning"])])])}const Ja=te(Wa,[["render",Xa],["__scopeId","data-v-4a66f7d2"]]);function Se(t,o){Za(t)&&(t="100%");var n=er(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 Za(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function er(t){return typeof t=="string"&&t.indexOf("%")!==-1}function tr(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Dt(t){return t<=1?"".concat(Number(t)*100,"%"):t}function io(t){return t.length===1?"0"+t:String(t)}function or(t,o,n){return{r:Se(t,255)*255,g:Se(o,255)*255,b:Se(n,255)*255}}function so(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 nr(t,o,n){var a,r,l;if(t=Se(t,360),o=Se(o,100),n=Se(n,100),o===0)r=n,l=n,a=n;else{var i=n<.5?n*(1+o):n+o-n*o,d=2*n-i;a=so(d,i,t+1/3),r=so(d,i,t),l=so(d,i,t-1/3)}return{r:a*255,g:r*255,b:l*255}}function ar(t,o,n){t=Se(t,255),o=Se(o,255),n=Se(n,255);var a=Math.max(t,o,n),r=Math.min(t,o,n),l=0,i=a,d=a-r,s=a===0?0:d/a;if(a===r)l=0;else{switch(a){case t:l=(o-n)/d+(o<n?6:0);break;case o:l=(n-t)/d+2;break;case n:l=(t-o)/d+4;break}l/=6}return{h:l,s,v:i}}function rr(t,o,n){t=Se(t,360)*6,o=Se(o,100),n=Se(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:c*255,g:p*255,b:u*255}}function lr(t,o,n,a){var r=[io(Math.round(t).toString(16)),io(Math.round(o).toString(16)),io(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 pn(t){return Ce(t)/255}function Ce(t){return parseInt(t,16)}var un={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 Ct(t){var o={r:0,g:0,b:0},n=1,a=null,r=null,l=null,i=!1,d=!1;return typeof t=="string"&&(t=cr(t)),typeof t=="object"&&(je(t.r)&&je(t.g)&&je(t.b)?(o=or(t.r,t.g,t.b),i=!0,d=String(t.r).substr(-1)==="%"?"prgb":"rgb"):je(t.h)&&je(t.s)&&je(t.v)?(a=Dt(t.s),r=Dt(t.v),o=rr(t.h,a,r),i=!0,d="hsv"):je(t.h)&&je(t.s)&&je(t.l)&&(a=Dt(t.s),l=Dt(t.l),o=nr(t.h,a,l),i=!0,d="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=tr(n),{ok:i,format:t.format||d,r:Math.min(255,Math.max(o.r,0)),g:Math.min(255,Math.max(o.g,0)),b:Math.min(255,Math.max(o.b,0)),a:n}}var ir="[-\\+]?\\d+%?",sr="[-\\+]?\\d*\\.\\d+%?",He="(?:".concat(sr,")|(?:").concat(ir,")"),co="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),po="[\\s|\\(]+(".concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")[,|\\s]+(").concat(He,")\\s*\\)?"),Oe={CSS_UNIT:new RegExp(He),rgb:new RegExp("rgb"+co),rgba:new RegExp("rgba"+po),hsl:new RegExp("hsl"+co),hsla:new RegExp("hsla"+po),hsv:new RegExp("hsv"+co),hsva:new RegExp("hsva"+po),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 cr(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var o=!1;if(un[t])t=un[t],o=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Oe.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Oe.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Oe.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Oe.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Oe.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Oe.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Oe.hex8.exec(t),n?{r:Ce(n[1]),g:Ce(n[2]),b:Ce(n[3]),a:pn(n[4]),format:o?"name":"hex8"}:(n=Oe.hex6.exec(t),n?{r:Ce(n[1]),g:Ce(n[2]),b:Ce(n[3]),format:o?"name":"hex"}:(n=Oe.hex4.exec(t),n?{r:Ce(n[1]+n[1]),g:Ce(n[2]+n[2]),b:Ce(n[3]+n[3]),a:pn(n[4]+n[4]),format:o?"name":"hex8"}:(n=Oe.hex3.exec(t),n?{r:Ce(n[1]+n[1]),g:Ce(n[2]+n[2]),b:Ce(n[3]+n[3]),format:o?"name":"hex"}:!1)))))))))}function je(t){return!!Oe.CSS_UNIT.exec(String(t))}var vt=2,fn=.16,dr=.05,pr=.05,ur=.15,mn=5,hn=4,fr=[{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 yn(t){var o=t.r,n=t.g,a=t.b,r=ar(o,n,a);return{h:r.h*360,s:r.s,v:r.v}}function Pt(t){var o=t.r,n=t.g,a=t.b;return"#".concat(lr(o,n,a,!1))}function mr(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 gn(t,o,n){var a;return Math.round(t.h)>=60&&Math.round(t.h)<=240?a=n?Math.round(t.h)-vt*o:Math.round(t.h)+vt*o:a=n?Math.round(t.h)+vt*o:Math.round(t.h)-vt*o,a<0?a+=360:a>=360&&(a-=360),a}function bn(t,o,n){if(t.h===0&&t.s===0)return t.s;var a;return n?a=t.s-fn*o:o===hn?a=t.s+fn:a=t.s+dr*o,a>1&&(a=1),n&&o===mn&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2))}function Cn(t,o,n){var a;return n?a=t.v+pr*o:a=t.v-ur*o,a>1&&(a=1),Number(a.toFixed(2))}function uo(t){for(var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],a=Ct(t),r=mn;r>0;r-=1){var l=yn(a),i=Pt(Ct({h:gn(l,r,!0),s:bn(l,r,!0),v:Cn(l,r,!0)}));n.push(i)}n.push(Pt(a));for(var d=1;d<=hn;d+=1){var s=yn(a),c=Pt(Ct({h:gn(s,d),s:bn(s,d),v:Cn(s,d)}));n.push(c)}return o.theme==="dark"?fr.map(function(p){var u=p.index,f=p.opacity,h=Pt(mr(Ct(o.backgroundColor||"#141414"),Ct(n[u]),f*100));return h}):n}var fo={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"},mo={},ho={};Object.keys(fo).forEach(function(t){mo[t]=uo(fo[t]),mo[t].primary=mo[t][5],ho[t]=uo(fo[t],{theme:"dark",backgroundColor:"#141414"}),ho[t].primary=ho[t][5]});var wn=[],wt=[],hr="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function yr(){var t=document.createElement("style");return t.setAttribute("type","text/css"),t}function gr(t,o){if(o=o||{},t===void 0)throw new Error(hr);var n=o.prepend===!0?"prepend":"append",a=o.container!==void 0?o.container:document.querySelector("head"),r=wn.indexOf(a);r===-1&&(r=wn.push(a)-1,wt[r]={});var l;return wt[r]!==void 0&&wt[r][n]!==void 0?l=wt[r][n]:(l=wt[r][n]=yr(),n==="prepend"?a.insertBefore(l,a.childNodes[0]):a.appendChild(l)),t.charCodeAt(0)===65279&&(t=t.substr(1,t.length)),l.styleSheet?l.styleSheet.cssText+=t:l.textContent+=t,l}function _n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){br(t,r,n[r])})}return t}function br(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Cr(t,o){process.env.NODE_ENV!=="production"&&!t&&console!==void 0&&console.error("Warning: ".concat(o))}function wr(t,o){Cr(t,"[@ant-design/icons-vue] ".concat(o))}function xn(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}function yo(t,o,n){return n?e.h(t.tag,_n({key:o},n,t.attrs),(t.children||[]).map(function(a,r){return yo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))})):e.h(t.tag,_n({key:o},t.attrs),(t.children||[]).map(function(a,r){return yo(a,"".concat(o,"-").concat(t.tag,"-").concat(r))}))}function kn(t){return uo(t)[0]}function Sn(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
|
-
`,
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Br(t,o){if(t){if(typeof t=="string")return xn(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 xn(t,o)}}function xn(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 Or(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function Vr(t){if(Array.isArray(t))return t}function 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){fo(t,r,n[r])})}return t}function fo(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){if(t==null)return{};var n=Fr(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Fr(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}wn("#1890ff");var et=function(o,n){var a,r=kn({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,f=r.onClick,u=Ir(r,Tr),y=(a={anticon:!0},fo(a,"anticon-".concat(i.name),!!i.name),fo(a,l,l),a),A=d===""||d||i.name==="loading"?"anticon-spin":"",m=c;m===void 0&&f&&(m=-1,u.tabindex=m);var _=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,E=gn(p),x=Er(E,2),O=x[0],h=x[1];return e.createVNode("span",kn({role:"img","aria-label":i.name},u,{onClick:f,class:y}),[e.createVNode(po,{class:A,icon:i,primaryColor:O,secondaryColor:h,style:_},null)])};et.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},et.displayName="AntdIcon",et.inheritAttrs=!1,et.getTwoToneColor=Nr,et.setTwoToneColor=wn;const ye=et;var $r={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 Dr=$r;function _n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){vr(t,r,n[r])})}return t}function vr(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=_n({},o,n.attrs);return e.createVNode(ye,_n({},a,{icon:Dr}),null)};uo.displayName="AppstoreAddOutlined",uo.inheritAttrs=!1;const Sn=uo;var Pr={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 Mr=Pr;function An(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 mo=function(o,n){var a=An({},o,n.attrs);return e.createVNode(ye,An({},a,{icon:Mr}),null)};mo.displayName="CaretDownOutlined",mo.inheritAttrs=!1;const Rr=mo;var Ur={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 Gr=Ur;function Nn(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){zr(t,r,n[r])})}return t}function zr(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=Nn({},o,n.attrs);return e.createVNode(ye,Nn({},a,{icon:Gr}),null)};ho.displayName="CaretRightOutlined",ho.inheritAttrs=!1;const Hr=ho;var Wr={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 Yr=Wr;function Tn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){qr(t,r,n[r])})}return t}function qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var yo=function(o,n){var a=Tn({},o,n.attrs);return e.createVNode(ye,Tn({},a,{icon:Yr}),null)};yo.displayName="CloseOutlined",yo.inheritAttrs=!1;const go=yo;var Kr={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 Xr=Kr;function En(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Qr(t,r,n[r])})}return t}function Qr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var bo=function(o,n){var a=En({},o,n.attrs);return e.createVNode(ye,En({},a,{icon:Xr}),null)};bo.displayName="CopyOutlined",bo.inheritAttrs=!1;const Jr=bo;var Zr={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 el=Zr;function Ln(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 Co=function(o,n){var a=Ln({},o,n.attrs);return e.createVNode(ye,Ln({},a,{icon:el}),null)};Co.displayName="DeleteOutlined",Co.inheritAttrs=!1;const ol=Co;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 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){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 wo=function(o,n){var a=Bn({},o,n.attrs);return e.createVNode(ye,Bn({},a,{icon:al}),null)};wo.displayName="DoubleRightOutlined",wo.inheritAttrs=!1;const ll=wo;var il={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 sl=il;function On(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 xo=function(o,n){var a=On({},o,n.attrs);return e.createVNode(ye,On({},a,{icon:sl}),null)};xo.displayName="DownOutlined",xo.inheritAttrs=!1;const dl=xo;var pl={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=pl;function Vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 ko=function(o,n){var a=Vn({},o,n.attrs);return e.createVNode(ye,Vn({},a,{icon:fl}),null)};ko.displayName="InfoCircleOutlined",ko.inheritAttrs=!1;const ml=ko;var hl={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 yl=hl;function In(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 _o=function(o,n){var a=In({},o,n.attrs);return e.createVNode(ye,In({},a,{icon:yl}),null)};_o.displayName="MinusCircleOutlined",_o.inheritAttrs=!1;const bl=_o;var Cl={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 wl=Cl;function Fn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 So=function(o,n){var a=Fn({},o,n.attrs);return e.createVNode(ye,Fn({},a,{icon:wl}),null)};So.displayName="PlusCircleOutlined",So.inheritAttrs=!1;const kl=So;var _l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const Sl=_l;function $n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Al(t,r,n[r])})}return t}function Al(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ao=function(o,n){var a=$n({},o,n.attrs);return e.createVNode(ye,$n({},a,{icon:Sl}),null)};Ao.displayName="PlusOutlined",Ao.inheritAttrs=!1;const Nl=Ao;var Tl={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 El=Tl;function Dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 No=function(o,n){var a=Dn({},o,n.attrs);return e.createVNode(ye,Dn({},a,{icon:El}),null)};No.displayName="SettingOutlined",No.inheritAttrs=!1;const Bl=No,Ol=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Hr,CaretDownOutlined:Rr,AInputSearch:v.InputSearch,ASpin:v.Spin,APagination:v.Pagination,Draggable:ft},setup(){var h;const t=(h=window==null?void 0:window.config)==null?void 0:h.pageId,o=e.inject(Te),n=e.unref(e.inject(Ee)),a=e.inject(ve),r=e.computed(()=>{var N;return(N=e.unref(a))==null?void 0:N.graphicConfig}),l=e.computed(()=>{var N;return(N=e.unref(r))==null?void 0:N.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const N={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const g=await o.post(`${we}/diagram/sourceList`,N,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:L,data:I={}}=g.data;if(L){const{rows:T=[],total:P=0}=I;T==null||T.forEach(M=>{var W;M.show=!1,(W=M.dataViewColumns)==null||W.forEach(b=>{b.show=!0,b.edit=!1,b.title&&(b.label=b.title)})}),i.value=T,s.totalResult=+P}}catch{d.value=!1}},f=N=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标"})[N],u=N=>{i.value[N].show=!i.value[N].show},y=()=>{s.currentPage=1,p()},A=oe.debounce(()=>{s.currentPage=1,p()},200),m=(N,g)=>{s.pageSize=g,s.currentPage=N,p()};e.onMounted(()=>{p()});const _=e.inject(pe),E=e.computed(()=>{const N=["classificationList","rowHeaderList","dimensionList"];let g=[];for(const L in e.unref(_))if(Object.prototype.hasOwnProperty.call(e.unref(_),L)&&N.includes(L)){const I=e.unref(_)[L];Array.isArray(I)&&(g=g.concat(I))}return g});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:u,mapScope:f,onSearch:y,onChange:A,onPaginationChange:m,searchText:c,setItemDisabled:(N=[])=>{let g=!1;for(const L of e.unref(E))if(!N.find(T=>T.typeGuid===L.typeGuid)){g=!0;break}return g},onDragStart:(N,g)=>{const L=g[N.oldIndex];L&&sessionStorage.setItem("indicator-list-item",JSON.stringify(L))}}}}),xf="",Vl={class:"data-source-list"},Il={class:"columns"},Fl={class:"column-item"},$l=["onClick"],Dl={key:0},vl={class:"column-child-item"},Pl={class:"column-child-item-name"};function Ml(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),f=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",Vl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=u=>t.searchText=u),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Il,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(u,y)=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:e.normalizeClass(t.setItemDisabled(u.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Fl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:A=>t.onToggleGroup(y)},[u.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(u.indexCode+" "+u.name),1)],8,$l)]),u.show?(e.openBlock(),e.createElementBlock("div",Dl,[e.createVNode(c,{modelValue:u.dataViewColumns,"onUpdate:modelValue":A=>u.dataViewColumns=A,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(u.dataViewColumns),onStart:A=>t.onDragStart(A,u.dataViewColumns)},{item:e.withCtx(({element:A})=>[e.createElementVNode("div",vl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(A.scope))+"】 ",1),e.createElementVNode("span",Pl,e.toDisplayString(A.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(f,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=u=>t.pagination.pageSize=u),total:t.pagination.totalResult,"show-total":u=>`共 ${u} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=u=>t.pagination.currentPage=u),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const jl=ee(Ol,[["render",Ml],["__scopeId","data-v-dfb51d34"]]),Rl=e.defineComponent({name:"DataList",components:{DataSourceList:jl,DataViewList:za},setup(){return{source:e.inject(eo)}}});function Ul(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const Gl=ee(Rl,[["render",Ul]]),vn={mounted(t){t.focus()}},zl=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:ft,AModal:v.Modal,AButton:v.Button},setup(t,{expose:o}){var O;const n=(O=window==null?void 0:window.config)==null?void 0:O.pageId,a=e.inject(Te),r=e.unref(e.inject(Ee)),l=e.inject(pe),i=e.inject(Le),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const h=await a.post(`${we}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:N,data:g=[]}=h.data;N&&(c.value=g==null?void 0:g.slice(0,200))}catch(h){console.error(h)}},f=()=>{var I;const h=((I=e.unref(l)[t.type])==null?void 0:I.slice())||[],N=h[t.index],{label:g,name:L}=t.item;N.sort={label:g,columnName:L,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:h})};let u=!1;const y=()=>{u=!0},A=e.ref(!1),m=()=>{A.value=!0},_=()=>{A.value=!1},E=()=>{u&&f(),u=!1,_()};return o({showModal:m}),e.watch(A,h=>{var N,g;if(h){const L=(g=(N=t.item)==null?void 0:N.sort)==null?void 0:g.customOrderColumns;L==null?p():c.value=L}else c.value=[];window.changeShowTable&&window.changeShowTable(!h)},{flush:"post"}),{visible:A,onCancel:E,customSortList:c,onChange:y,onDeleteConfig:()=>{var I;const h=((I=e.unref(l)[t.type])==null?void 0:I.slice())||[],N=h[t.index],{label:g,name:L}=t.item;N.sort={label:g,columnName:L},i({[t.type]:h}),_()}}}}),kf="",Hl={class:"button-wrapper"},Wl={class:"sort-item"};function Yl(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",Hl,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",Wl,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const ql=ee(zl,[["render",Yl],["__scopeId","data-v-8e16d201"]]),Kl=e.defineComponent({name:"CustomGroupModal",directives:{focus:vn},components:{CloseOutlined:go,AModal:v.Modal,ASelect:v.Select,ASelectOption:v.SelectOption,AButton:v.Button,AInput:v.Input,ACheckbox:v.Checkbox,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ATag:v.Tag,ACheckableTag:v.CheckableTag},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},setup(t,{expose:o}){var R;const n=e.inject(Te),a=(R=window==null?void 0:window.config)==null?void 0:R.pageId,r=e.unref(e.inject(Ee));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const w=e.unref(c).map(S=>S.title);return new Set(w)}),f=e.ref([]);e.watch(()=>e.unref(c).length,w=>{f.value=new Array(w).fill(!1)});const u=e.computed(()=>{let w=0;return e.unref(c).forEach(S=>{var B;(B=S.data)==null||B.forEach(j=>{j.checked&&w++})}),w}),y=()=>{const w=e.unref(d);if(!w){v.message.error("创建分组名不能空");return}e.unref(p).has(w)?v.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:w,data:[]}),l=!0)},A=w=>{e.unref(c).splice(w,1),l=!0},m=e.ref(null),_=()=>{if(e.unref(u)===0){v.message.error("当前移入分组已选个数为0");return}const w=e.unref(m);if(w==null){v.message.error("请选择移入分组");return}if(!e.unref(c)[w]){v.message.error("移入分组不存在,请重新选择");return}const S=[],B=e.unref(c).length;for(let j=0;j<B;j++){const D=e.unref(c)[j];e.unref(c)[j].data=D.data.filter(Y=>(Y.checked&&S.push({...Y,checked:!1}),!Y.checked))}e.unref(c)[w].data=[...S,...e.unref(c)[w].data],l=!0},E=w=>{e.unref(f)[w]=!0},x=w=>{e.unref(f)[w]=!1},O=(w,S)=>{const B=w.target.value;e.unref(p).has(B)&&v.message.error("组名不能相同,请修改"),e.unref(c)[S].title=B,l=!0},h=e.inject(pe),N=e.inject(Le),g=e.computed(()=>e.unref(h).source),L=e.computed(()=>e.unref(h).dataViewId),I=e.ref(!1),T=()=>{var Q,q;const w=e.unref(c);let S="";e.unref(I)&&(S=(Q=w[0])==null?void 0:Q.title);const B=w==null?void 0:w.length,j={};for(let Z=1;Z<B;Z++){const ae=w[Z]||{},{title:ce,data:de}=ae;j[ce]=(de==null?void 0:de.map($e=>$e.label))||[]}const D=((q=e.unref(h)[t.type])==null?void 0:q.slice())||[],Y=D[t.index];Y.customGroup={groupInfoMap:j,otherGroupName:S},N({[t.type]:D})},P=e.ref(!1),M=()=>{P.value=!0},W=()=>{P.value=!1},b=()=>{W(),l&&T(),l=!1},C=()=>{l=!0},k=new Set,V=async()=>{const w=t.item.customGroup||{},S=w.otherGroupName,B=w.groupInfoMap;(S===""||S==null)&&(I.value=!1),e.unref(c)[0]={title:S||"未分组",data:[]};let j=1;for(const D in B)if(Object.prototype.hasOwnProperty.call(B,D)){const Q=B[D].map(q=>(k.add(q),{label:q,checked:!1}));e.unref(c)[j]={title:D,data:Q},j++}await $()},$=async()=>{var w;try{const S=await n.post(`${we}/diagram/groupvalue`,{source:e.unref(g),dataViewId:e.unref(L),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:B,data:j=[]}=S.data;if(B){const D=[];(w=j==null?void 0:j.slice(0,200))==null||w.forEach(Y=>{k.has(Y)||D.push({label:Y,checked:!1})}),e.unref(c)[0].data=D}}catch(S){console.error(S)}};return e.watch(P,w=>{w&&V(),window.changeShowTable&&window.changeShowTable(!w)},{flush:"post"}),o({showModal:M}),{visible:P,title:i,activeKey:s,customGroupList:c,onCancel:b,useOtherGroup:I,selectCount:u,createGroupTitle:d,onAddGroup:y,onDeleteGroup:A,onMoveInGroup:_,selectGroupIndex:m,onEditTitle:E,onTitleChange:O,onFinishEditTitle:x,onUseOtherGroup:C,customGroupEditTitleList:f}}}),_f="",Sf="",Xl={class:"custom-group-header"},Ql={class:"move-and-create"},Jl={class:"select-tip"},Zl={class:"select-count"},ei={class:"create-group"},ti={class:"custom-group-content"},oi=["onClick"],ni={class:"extra"},ai={class:"custom-group-list"},ri={class:"text"};function li(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),f=e.resolveComponent("a-tag"),u=e.resolveComponent("close-outlined"),y=e.resolveComponent("a-checkable-tag"),A=e.resolveComponent("a-collapse-panel"),m=e.resolveComponent("a-collapse"),_=e.resolveComponent("a-modal"),E=e.resolveDirective("focus");return e.openBlock(),e.createBlock(_,{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",Xl,[e.createElementVNode("div",Ql,[e.createElementVNode("div",null,[e.createElementVNode("span",Jl,[e.createTextVNode(" 已选"),e.createElementVNode("span",Zl,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=x=>t.selectGroupIndex=x),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(x,O)=>(e.openBlock(),e.createBlock(i,{key:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(x.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",ei,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=x=>t.createGroupTitle=x),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=x=>t.useOtherGroup=x),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",ti,[e.createVNode(m,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=x=>t.activeKey=x),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(x,O)=>(e.openBlock(),e.createBlock(A,{key:O},{header:e.withCtx(()=>[t.customGroupEditTitleList[O]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:x.title,size:"small",onChange:h=>t.onTitleChange(h,O),onBlur:h=>t.onFinishEditTitle(O),onPressEnter:h=>t.onFinishEditTitle(O)},null,8,["value","onChange","onBlur","onPressEnter"])),[[E]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(h=>t.onEditTitle(O),["prevent","stop"])},e.toDisplayString(x.title),9,oi))]),extra:e.withCtx(()=>[e.createElementVNode("div",ni,[O===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(f,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),O!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(f,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(u,{onClick:e.withModifiers(h=>t.onDeleteGroup(O),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.data,(h,N)=>(e.openBlock(),e.createBlock(y,{color:"red",checked:h.checked,"onUpdate:checked":g=>h.checked=g,class:"custom-group",key:N},{default:e.withCtx(()=>[e.createElementVNode("span",ri,e.toDisplayString(h.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const ii=ee(Kl,[["render",li],["__scopeId","data-v-7e3049d2"]]);var si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},To={},ci={get exports(){return To},set exports(t){To=t}};(function(t,o){(function(n,a){t.exports=a()})(si,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var f=this.$utils(),u=!!f.u(p)||p;if(f.p(c)===a){var y=this.quarter()-1;return u?this.month(3*y).startOf(n).startOf("day"):this.month(3*y+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(ci);const di=To;ie.extend(di);const pi=e.defineComponent({name:"Condition",components:{CloseOutlined:go,DownOutlined:dl,AppstoreAddOutlined:Sn,ASelect:v.Select,AInput:v.Input,ADatePicker:v.DatePicker,AButton:v.Button,ADropdown:v.Dropdown,AMenu:v.Menu,AMenuItem:v.MenuItem,ASubMenu:v.SubMenu,APopover:v.Popover,ATabs:v.Tabs,ATabPane:v.TabPane,ARadioGroup:v.RadioGroup,ARadio:v.Radio,AInputNumber:v.InputNumber,ASelectOption:v.SelectOption},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var He,ct,Qe,We,Re,dt,pt,Ne,De,Ye,Je;const o=(He=window==null?void 0:window.config)==null?void 0:He.pageId,n=e.inject(pe),a=e.inject(Te),r=e.unref(e.inject(Ee)),l=e.inject(Zo),i=e.inject(Ue),d=e.ref(!1),s=ie(),c=e.computed(()=>{var z;const G=[];return(z=e.unref(i))==null||z.forEach(X=>{const{keyName:J="",id:F="",type:U}=X;U==="ecanRangePicker"?G.push({value:`${F}-startTime`,label:`${J||F}-开始时间值`,keyName:`${J||F}-startTime`,id:F},{value:`${F}-endTime`,label:`${J||F}-结束时间值`,keyName:`${J||F}-endTime`,id:F}):G.push({value:F,label:`${J||F}`,keyName:`${J||F}`,id:F})}),G}),p=e.computed(()=>{var G;return(G=e.unref(n))==null?void 0:G.dataViewId}),f=e.computed(()=>{var G;return(G=e.unref(n))==null?void 0:G.source}),u=e.ref(!1),y={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},A=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],m=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),_=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:""}]),E=[{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"}],x=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],O=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],h=e.ref({fieldName:(ct=t.data)==null?void 0:ct.fieldName,fieldType:(Qe=t.data)==null?void 0:Qe.fieldType,rule:(We=t.data)==null?void 0:We.rule,id:(Re=t.data)==null?void 0:Re.id,fieldValue:N(),label:(dt=t.data)==null?void 0:dt.label,targetSource:"",typeGuid:(pt=t.data)==null?void 0:pt.typeGuid,indexCode:(Ne=t.data)==null?void 0:Ne.indexCode,dataType:((De=t.data)==null?void 0:De.dataType)||"",componentId:((Ye=t.data)==null?void 0:Ye.componentId)||"",useCurrentTime:!!((Je=t.data)!=null&&Je.useCurrentTime)});function N(){const{fieldType:G="",dataType:z="",fieldValue:X=""}=t.data;if(G==="DATE"&&z==="time")return X&&ie(X);if(z==="component"){const J=e.unref(c).find(F=>F.keyName===X);return J?J.value:X}else return X}const g=e.ref(!1),L=e.computed(()=>h.value.fieldType==="DATE"),I=e.computed(()=>{const G=t.type;let z=[];const X=["classificationList","seriesList","rowHeaderList","dimensionList"];if(X.includes(G)){let J=[];for(const F in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),F)&&!["controlList","sqlConditions"].includes(F)){const U=e.unref(n)[F];Array.isArray(U)&&(X.includes(F)?J=J.concat(U.filter(H=>H.show)):J=J.concat(U))}z=J}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(G)&&(z=e.unref(l));return z.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:T,deleteCondition:P}=e.inject(Jo,{updateCondition:(G,z,X)=>{},deleteCondition:(G,z)=>{}}),M=()=>{P(t.level,t.index)};e.watch(h,G=>{const z=oe.cloneDeep(G);G.fieldType==="DATE"&&G.dataType!=="component"&&G.fieldValue&&(z.fieldValue=G.fieldValue.format(G.dateFormat)),T(z,t.level,t.index)},{deep:!0}),e.watch(d,G=>{h.value.fieldValue="",h.value.useCurrentTime=G});const W=G=>{const z=e.unref(I).find(re=>re.value===G)||{},{name:X,genericType:J,id:F,label:U,typeGuid:H,indexCode:K}=z;h.value={id:F,fieldName:X,fieldType:J,label:U,rule:"",fieldValue:J==="DATE"?null:void 0,targetSource:"",typeGuid:H,indexCode:K,dataType:"",useCurrentTime:!1}},b=G=>{const z=e.unref(c).find(X=>X.value===G)||{};e.unref(h).componentId=z.id||""},C=e.computed(()=>{const G=e.unref(h).fieldType;return G==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:G==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:G==="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"}]:[]}),k=e.computed(()=>{let G="";const z=e.unref(C).find(X=>X.value===e.unref(h).rule);return z&&(G=z.label),G}),V=e.computed(()=>{let G={fontSize:"12px"};return e.unref(k)||(G={...G,position:"absolute",right:"11px",top:"9px"}),G}),$=e.ref([]),R=async()=>{var G;if(!(e.unref($).length>0))try{const z=await a.post(`${we}/diagram/groupvalue`,{source:e.unref(f),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:J=[]}=z.data;X&&($.value=(G=J==null?void 0:J.slice(0,200))==null?void 0:G.map(F=>({label:F,value:F})))}catch(z){console.error(z)}},w=G=>{e.unref(h).rule=G,e.unref(h).fieldValue=e.unref(h).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(G)&&R()},S=G=>{e.unref(h).dataType=G,e.unref(h).fieldValue=""},B=e.ref(),j=G=>{B.value=G,e.unref(h).fieldValue=(G==null?void 0:G.join(","))||""},D=G=>{const{keyPath:z}=G;e.unref(h).rule=z[0],e.unref(h).dataType=z[1],e.unref(h).dateFormat=z[2],e.unref(h).fieldValue=""};e.onMounted(()=>{var J,F,U,H,K,re,le;if(h.value.dataType=((J=t.data)==null?void 0:J.dataType)||"",h.value.componentId=((F=t.data)==null?void 0:F.componentId)||"",e.unref(h).fieldType==="DATE"){const{activeKey:ne,dateCalcTypes:be=[]}=t.data||{};if(e.unref(h).dateFormat=(U=t.data)==null?void 0:U.dateFormat,e.unref(h).activeKey=ne,e.unref(h).calcWays=((H=t.data)==null?void 0:H.calcWays)||[],e.unref(h).dateCalcTypes=be,e.unref(h).useCurrentTime&&e.unref(h).dataType!=="component"&&(d.value=!0),ne===5){const Ce=e.unref(h).calcWays[0];if(Ce){const te=Ce.split("-");e.unref(m).expression=te[0],e.unref(m).around=te[1]}e.unref(m).unit=be[0]||"YEAR"}else{e.unref(h).radioValue=((K=t.data)==null?void 0:K.radioValue)||"";const Ce=e.unref(_).find(te=>{var se;return te.key===((se=t.data)==null?void 0:se.activeKey)});Ce&&de(Ce,t.data)}}else B.value=((le=(re=t.data)==null?void 0:re.fieldValue)==null?void 0:le.split(","))||[];const{fieldType:G,fieldName:z,rule:X}=h.value;G!=="DATE"&&z&&X&&["IN","NOT_IN"].includes(X)&&R()});const Y=G=>{if(e.unref(h).activeKey===G){e.unref(_)[G].radioValue=e.unref(h).radioValue,e.unref(_)[e.unref(h).activeKey]&&(e.unref(_)[e.unref(h).activeKey].radioValue=e.unref(h).radioValue,e.unref(h).radioValue==="1"?e.unref(_)[G].beforeNum=e.unref(h).calcWays[0]:e.unref(h).radioValue==="2"&&(e.unref(_)[G].afterNum=e.unref(h).calcWays[0]));return}e.unref(_).forEach(z=>{z.beforeNum=0,z.afterNum=0,z.radioValue="1",z.value=""})},Q=(G,z)=>{u.value=!0;const X=G.target.value,J=z.type,F=e.unref(h).dateFormat,U=Math.abs(z.beforeNum),H=z.afterNum;z.value=$e(X,J,F,U,H)},q=G=>{const z=e.unref(h).activeKey;if(G!==z)return;let X="";z===0?X="years":z===1?X="quarters":z===2?X="months":z===3?X="weeks":z===4&&(X="days");const J=e.unref(h).dateFormat,F=e.unref(h).radioValue;let U=0,H=0;return F==="1"?U=Math.abs(e.unref(h).calcWays[0]):F==="2"&&(H=e.unref(h).calcWays[0]),$e(F,X,J,U,H)},Z=(G,z,X,J)=>{if(u.value=!0,z.radioValue===J){const F=G.target.value;X==="+"?z.value=ie().add(F,z.type).format(e.unref(h).dateFormat):z.value=ie().subtract(F,z.type).format(e.unref(h).dateFormat)}},ae=(G,z)=>{e.unref(h).calcWays||(e.unref(h).calcWays=[]),e.unref(h).activeKey=z,e.unref(h).radioValue=G.radioValue,G.radioValue==="1"?e.unref(h).calcWays[0]="-"+G.beforeNum:G.radioValue==="2"?e.unref(h).calcWays[0]=G.afterNum:G.radioValue==="3"?z===4?e.unref(h).calcWays[0]="0":e.unref(h).calcWays[0]="BEGIN":G.radioValue==="4"&&(e.unref(h).calcWays[0]="END"),z===0?e.unref(h).dateCalcTypes=["YEAR"]:z===1?e.unref(h).dateCalcTypes=["QUARTER"]:z===2?e.unref(h).dateCalcTypes=["MONTH"]:z===3?e.unref(h).dateCalcTypes=["WEEK"]:z===4&&(e.unref(h).dateCalcTypes=["DAY"]),g.value=!1},ce=()=>{e.unref(h).activeKey=5,e.unref(h).dateCalcTypes=[e.unref(m).unit],e.unref(h).calcWays[0]=`${e.unref(m).expression}-${e.unref(m).around}`,g.value=!1};function de(G,z){const{radioValue:X="",calcWays:J=[]}=z;G.radioValue=X,J!=null&&J.length&&(X==="1"?G.beforeNum=Math.abs(J[0]):X==="2"&&(G.afterNum=J[0]))}function $e(G,z,X,J,F){if(G==="1")return ie().subtract(J,z).format(X);if(G==="2")return ie().add(F,z).format(X);if(G==="3"){if(z==="years")return ie().startOf("year").format(X);if(z==="quarters")return ie().startOf("quarter").format(X);if(z==="months")return ie().startOf("month").format(X);if(z==="days")return ie().format(X)}else if(G==="4"){if(z==="years")return ie().endOf("year").format(X);if(z==="quarters")return ie().endOf("quarter").format(X);if(z==="months")return ie().endOf("month").format(X)}return""}return{fieldOptions:I,ruleOptions:C,onFieldChange:W,condition:h,valueOptions:$,onRuleChange:w,onDataTypeChange:S,onFieldValueSelectChange:j,fieldValues:B,onDelete:M,isDateType:L,formatList:A,tabDateList:_,compareList:E,menuRule:x,dateBtnLabel:k,downIconStyle:V,popoverVisible:g,dateRadioStyle:y,showTime:u,controlList:c,dataTypeList:O,customTabData:m,isUseCurrentTime:d,currentTime:s,handleMenuClick:D,changeTabInitDate:Y,changeRadioValue:Q,getFieldValue:q,blurCompare:Z,okDatePickConfig:ae,onChangeComponent:b,filterOption:(G,z)=>z.label.toLowerCase().indexOf(G.toLowerCase())>=0,okCustomConfig:ce}}}),Af="",Nf="",fi={class:"condition"},ui=["title"],mi={class:"rule"},hi={class:"data-type"},yi={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},gi={class:"popover-content-wrap"},bi={key:0,class:"use-current-time"},Ci={class:"tabFilterRadio"},wi={key:0},xi={key:1},ki={style:{"margin-left":"10px"}},_i={style:{"margin-left":"10px"}},Si={style:{position:"absolute",bottom:"10px"}},Ai={style:{display:"flex"}},Ni={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function Ti(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),f=e.resolveComponent("DownOutlined"),u=e.resolveComponent("a-button"),y=e.resolveComponent("a-dropdown"),A=e.resolveComponent("a-date-picker"),m=e.resolveComponent("a-checkbox"),_=e.resolveComponent("a-input-number"),E=e.resolveComponent("a-radio"),x=e.resolveComponent("a-radio-group"),O=e.resolveComponent("a-tab-pane"),h=e.resolveComponent("a-tabs"),N=e.resolveComponent("appstore-add-outlined"),g=e.resolveComponent("a-popover"),L=e.resolveComponent("a-input"),I=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(d,{class:"field-name",value:t.condition.fieldName,onChange:t.onFieldChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldOptions,(T,P)=>(e.openBlock(),e.createBlock(i,{key:P,value:T.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:T.label},e.toDisplayString(T.label),9,ui)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",mi,[t.isDateType?(e.openBlock(),e.createBlock(y,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,T=>(e.openBlock(),e.createBlock(c,{key:T.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value?"color: #1890FF;":"")},e.toDisplayString(T.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,P=>{var M;return e.openBlock(),e.createBlock(c,{key:P.value,disabled:P.value==="component"&&!((M=t.controlList)!=null&&M.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===P.value?"color: #1890FF;":"")},e.toDisplayString(P.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,W=>(e.openBlock(),e.createBlock(s,{key:W.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===T.value&&t.condition.dataType===P.value&&t.condition.dateFormat===W.value?"color: #1890FF;":"")},e.toDisplayString(W.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(f,{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",hi,[e.createVNode(d,{style:{width:"100%"},value:t.condition.dataType,onChange:t.onDataTypeChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataTypeList,(T,P)=>(e.openBlock(),e.createBlock(i,{key:P,value:T.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",yi,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(A,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(A,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=T=>t.condition.fieldValue=T),format:t.condition.dateFormat},null,8,["value","format"]))],64)):typeof t.condition.fieldValue=="string"?(e.openBlock(),e.createBlock(d,{key:1,"show-search":"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[1]||(o[1]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(g,{visible:t.popoverVisible,"onUpdate:visible":o[9]||(o[9]=T=>t.popoverVisible=T),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",gi,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(m,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=T=>t.isUseCurrentTime=T)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(h,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(T,P)=>(e.openBlock(),e.createBlock(O,{key:P,tab:T.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(x,{value:T.radioValue,"onUpdate:value":M=>T.radioValue=M,onChange:M=>t.changeRadioValue(M,T)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",wi,"相对当前时间:"+e.toDisplayString(T.value),1)):(e.openBlock(),e.createElementBlock("div",xi,"相对当前时间:"+e.toDisplayString(t.getFieldValue(P)),1)),e.createVNode(E,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(_,{value:T.beforeNum,"onUpdate:value":M=>T.beforeNum=M,min:0,onBlur:M=>t.blurCompare(M,T,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",ki,e.toDisplayString(T.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(E,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(_,{value:T.afterNum,"onUpdate:value":M=>T.afterNum=M,min:0,onBlur:M=>t.blurCompare(M,T,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",_i,e.toDisplayString(T.afterLabel),1)]),_:2},1032,["style"]),T.beforeText?(e.openBlock(),e.createBlock(E,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),T.afterText?(e.openBlock(),e.createBlock(E,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",Si,[e.createVNode(u,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=M=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(u,{onClick:M=>t.okDatePickConfig(T,P)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(O,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",Ai,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=T=>t.customTabData.expression=T),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=T=>t.customTabData.unit=T),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=T=>t.customTabData.around=T)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",Ni,[e.createVNode(u,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=T=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(u,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=T=>{t.popoverVisible=!0})},[e.createVNode(N)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=T=>t.condition.fieldValue=T),"filter-option":t.filterOption,options:t.controlList,onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])):(e.openBlock(),e.createBlock(L,{key:3,class:"field-value",value:t.condition.fieldValue,"onUpdate:value":o[11]||(o[11]=T=>t.condition.fieldValue=T)},null,8,["value"])),e.createVNode(I,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Ei=ee(pi,[["render",Ti],["__scopeId","data-v-6789ff39"]]),Li=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:Ei}}),Tf="",Bi={key:0,class:"condition-list"},Oi={key:0,class:"condition-container"},Vi={key:0,class:"condition-text"},Ii={key:1,class:"condition-text"},Fi={class:"conditions"};function $i(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Bi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Oi,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",Vi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Ii,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Fi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Di=ee(Li,[["render",$i],["__scopeId","data-v-86c0c5aa"]]),vi=e.defineComponent({name:"TruncationList",props:{list:{type:Array,default:()=>[]}},components:{ASelect:v.Select,AInput:v.Input,AInputNumber:v.InputNumber},setup(t,{emit:o}){const n=[{label:"前N个",value:"TOP"},{label:"后N个",value:"BOTTOM"}],a=e.ref([]);return e.watch(a,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=oe.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Ef="",Pn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Pi={class:"truncations"},Mi={class:"rule"},ji={class:"field-value"},Ri={class:"field-value"},Ui=Pn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),Gi=Pn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),zi=["onClick"];function Hi(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Pi,[(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",Mi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":f=>c.rule=f,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",ji,[e.createTextVNode(" N= "),e.createVNode(d,{value:c.num,"onUpdate:value":f=>c.num=f,min:0},null,8,["value","onUpdate:value"])]),e.createElementVNode("div",Ri,[Ui,e.createVNode(s,{value:c.name,"onUpdate:value":f=>c.name=f,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),Gi]),e.createElementVNode("div",{class:"clear-truncation",onClick:f=>t.clearData(c)},"清空",8,zi)]))),128))])}const Wi=ee(vi,[["render",Hi],["__scopeId","data-v-f543c690"]]),Oe=(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},Yi=t=>t.replace(/\\n/g,`
|
|
59
|
-
`),Eo=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Ft=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...Ft(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},Mn=(t,o)=>{var _;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,f=[],u=[...a,...r,...l,...i,...d,...s,...c,...p],y=[];for(const E of u){const x=Ft((E==null?void 0:E.conditions)||[]);if(x!=null&&x.length){const O=x.filter(h=>jn(h,o)?(h==null?void 0:h.dataType)==="component":!1).map(h=>{const N=jn(h,o),g={};return h!=null&&h.dateFormat&&(g.format=h.dateFormat),{conditionKey:h.fieldName,conditionLabel:h.fieldName,conditionName:h.fieldName,conditionValueType:h.fieldType,id:N.id,keyName:h.fieldValue,rule:h.rule,notGlobal:!0,indexCode:h.indexCode,typeGuid:h.typeGuid,...g}});if(O!=null&&O.length)for(const h of O)y.find(N=>N.keyName===h.keyName)||y.push(h)}}const A=n.concat(y),m=A.length;for(let E=0;E<m;E++){const x=A[E];if(x&&!((_=Object.keys(x))!=null&&_.length)||(x==null?void 0:x.conditionKey)==="parentCode")continue;const{id:O,keyName:h,conditionLabel:N,conditionKey:g,conditionValueType:L,prop:I,rule:T="NONE",notGlobal:P=!1,format:M,indexCode:W,typeGuid:b}=x;let C=h||O;C&&I&&(C+=`-${I}`);const k=o.find(D=>D.id===O),V={rule:T,label:N,fieldName:g,fieldValue:"",valueType:L,alias:C,globalCondition:!P,indexCode:W,typeGuid:b},{value:$,format:R="YYYY-MM-DD",operate:w,type:S="",useCurrentTime:B}=k||{},j=M||R;if(Oe(S,"date")){let D;if(B?D=ie():D=ie($),w&&$){const{mode:Y,type:Q,value:q}=w;if(q)switch(Q){case"add":D=D.add(q,Y);break;case"minus":D=D.subtract(q,Y);break}}V.fieldValue=(D==null?void 0:D.format(j))||"",V.dateFormat=j}else if(S==="ecanRangePicker"){const{interval:D,intervalUnit:Y}=k||{};let Q=I;if(!I){const Z=h==null?void 0:h.split("-");Z!=null&&Z.length&&(Q=Z[Z.length-1])}if(!Q)return;let q=null;if(B&&(Q==="startTime"?q=ie().subtract(D,Y):Q==="endTime"&&(q=ie())),k[Q]&&(q=ie(k[Q])),w){const{type:Z,value:ae,mode:ce}=w;switch(Z){case"add":q=q&&q.add(ae,ce);break;case"minus":q=q&&q.subtract(ae,ce)}}q&&(V.fieldValue=q==null?void 0:q.format(j)),V.dateFormat=j}else{const D=$&&$.match(/\{(.+?)\}/g);D!=null&&D.length?V.fieldValue="":V.fieldValue=$}f.push(V)}for(let E=f.length-1;E>=0;E--){const x=f[E];x.globalCondition||f.find(h=>h.alias===x.alias&&h.globalCondition)&&f.splice(E,1)}return f},$t=t=>{let o="";switch(t){case"ecanDatePicker":case"ecanRangePicker":o="dateChange";break;case"ecanTimeDisplay":o="timeChange";break;case"ecanSelect":case"ecanTreeSelect":o="selectChange";break;case"ecanTabs":o="tabChange";break;case"ecanInput":o="inputChange";break;case"ecanCheckbox":case"ecanRadio":o="checkboxChange";break;case"ecanText":o="valueChange";break;case"ecanImage":o="click";break}return o};function jn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let Lo=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const qi=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Di,TruncationList:Wi,AModal:v.Modal,AButton:v.Button,ATabs:v.Tabs,ATabPane:v.TabPane},setup(t,{expose:o}){var W;const n=e.ref("1"),a=()=>{var b;return`添加过滤条件-${((b=t.item)==null?void 0:b.label)||""}`},r=e.inject(pe),l=e.inject(Le),i=e.inject(Ue),d=e.computed(()=>{var b;return(b=e.unref(r))==null?void 0:b.dataSourceId}),s=e.inject(ve),c=e.inject(Lt),p=e.ref([]),f=e.ref([]),u=e.ref(!1);e.watch(u,b=>{var C,k,V,$;b&&(Array.isArray((C=t.item)==null?void 0:C.conditions)&&(p.value=oe.cloneDeep((k=t.item)==null?void 0:k.conditions)||[]),Array.isArray((V=t.item)==null?void 0:V.truncations)?f.value=oe.cloneDeep(($=t.item)==null?void 0:$.truncations)||[]:f.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!b)},{flush:"post"});let y=!1;const A=b=>{var C;y=!0,e.unref(p)==null||((C=e.unref(p))==null?void 0:C.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==b?p.value=[{join:b,conditions:[e.unref(p)[0],{keyValue:Lo()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===b&&p.value[0].conditions.push({keyValue:Lo()}))};e.provide(Jo,{updateCondition(b,C,k){var $;y=!0;let V=e.unref(p);for(let R=0;R<C&&V[0];R++)V=($=V[0])==null?void 0:$.conditions;Array.isArray(V)&&V[k]&&(V[k]=b)},deleteCondition(b,C){var V,$;y=!0;let k=e.unref(p);for(let R=0;R<b&&k[0];R++)k=(V=k[0])==null?void 0:V.conditions;if(Array.isArray(k)&&k[C]&&(k.splice(C,1),k.length===1)){let R=e.unref(p);const w=b-2>0?b-2:0;for(let S=0;S<w&&R[0];S++)R=($=R[0])==null?void 0:$.conditions;R[0].join===k[0].join?R[0].conditions=[...k[0].conditions,...R[0].conditions.slice(1)]:R[0]=k[0]}}});const m=b=>{y=!0,f.value=b},_=e.computed(()=>{var C;const b=[];return(C=e.unref(i))==null||C.forEach(k=>{const{keyName:V="",id:$="",type:R}=k;R==="ecanRangePicker"?b.push({value:`${$}-startTime`,label:`${V||$}-开始时间值`,keyName:`${V||$}-startTime`},{value:`${$}-endTime`,label:`${V||$}-结束时间值`,keyName:`${V||$}-endTime`}):b.push({value:$,label:`${V||$}`,keyName:`${V||$}`})}),b}),E=()=>{var w,S;const{controlList:b=[]}=e.unref(r),C=((w=e.unref(r)[t.type])==null?void 0:w.slice())||[],k=Ft(oe.cloneDeep(C[t.index].conditions));C[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((S=e.unref(f))!=null&&S.length)&&(C[t.index].truncations=e.unref(f));const V=Ft(e.unref(p));for(const B of V)if(B.dataType==="component"&&B.fieldValue){const j=e.unref(_).find(D=>D.value===B.fieldValue);j&&(B.fieldValue=j.keyName)}const $=k.filter(B=>!V.find(j=>j.componentId===B.componentId)).filter(B=>!b.find(j=>j.id===B.componentId)),R=V.filter(B=>!k.find(j=>j.componentId===B.componentId));x($,R),l({[t.type]:C,sqlConditions:Mn({...e.unref(r),[t.type]:C},e.unref(i))})};function x(b,C){var V;const k=b.map($=>({...$,delete:!0})).concat(C.map($=>({...$,add:!0})));for(const $ of k){const R=e.unref(i).find(w=>w.id===$.componentId);if(R){const{type:w,id:S,events:B=[]}=R,j=$t(w);if($.add)B.find(D=>{var Y;return D.on===j&&D.target===((Y=e.unref(s))==null?void 0:Y.id)&&D.emit==="refreshData"})||c({id:S,events:[...B,{on:j,target:(V=e.unref(s))==null?void 0:V.id,emit:"refreshData"}].reverse()});else if($.delete){const D=B.findIndex(Y=>{var Q;return Y.on===j&&Y.target===((Q=e.unref(s))==null?void 0:Q.id)&&Y.emit==="refreshData"});D!==-1&&(B.splice(D,1),c({id:S,events:B}))}}}}const O=()=>{u.value=!0},h=()=>{p.value=[],u.value=!1},N=()=>{y&&E(),y=!1,h()},g=()=>{h()},L=e.inject(Te),I=e.unref(e.inject(Ee)),T=(W=window==null?void 0:window.config)==null?void 0:W.pageId,P=e.ref([]);e.provide(Zo,P);const M=async b=>{var C;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:k,indexCode:V}=b,$=await L.post(`${we}/diagram/hrpIndexWithComplex`,{pageId:T,dataSourceId:e.unref(d),indexGuid:k,indexCode:V},{headers:{Authentication:I,operateContext:"ygt"}}),{success:R,data:w=[]}=$.data;R&&((C=w==null?void 0:w.dataViewColumns)!=null&&C.length)&&(P.value=w.dataViewColumns)}catch(k){console.error(k)}};return e.watch(()=>t.item,b=>{b&&u.value&&M(b)}),o({showModal:O}),{visible:u,onOk:N,onCancel:g,handleTitle:a,conditionList:p,truncationList:f,addCondition:A,onUpdatetruncation:m,activeKey:n}}}),Lf="",Ki={class:"header"},Xi={class:"header"};function Qi(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(f,{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]=u=>t.activeKey=u)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",Ki,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=u=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=u=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=u=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Xi,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=u=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=u=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=u=>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 Ji=ee(qi,[["render",Qi],["__scopeId","data-v-f61fc948"]]),Zi=e.defineComponent({name:"ConfigName",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{AInput:v.Input,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Le),l=e.ref(),i=p=>{const{showLabel:f="",label:u=""}=p;l.value=f||u||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var f;const p=((f=e.unref(a)[t.type])==null?void 0:f.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),Bf="",es=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),ts={class:"config-name"},os=es(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function ns(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[os,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const as=ee(Zi,[["render",ns],["__scopeId","data-v-de6a1755"]]),rs=e.defineComponent({name:"SortByCpnt",props:{index:{type:Number,default:0},type:{type:String,default:""}},components:{ASelect:v.Select,AModal:v.Modal},setup(t,{expose:o}){const n=e.ref(!1),a=e.inject(pe),r=e.inject(Le),l=e.inject(Ue),i=e.inject(ve),d=e.inject(Lt),s=e.ref(),c=e.computed(()=>{var E;return(E=e.unref(l))==null?void 0:E.filter(x=>x.keyName!=="")});let p=[];const f=E=>{const{sortCpnts:x=[]}=E;p=oe.cloneDeep(x),s.value=oe.cloneDeep(x),n.value=!0},u=()=>{n.value=!1},y=()=>{var N;const{controlList:E=[]}=e.unref(a),x=p.filter(g=>!e.unref(s).includes(g)).filter(g=>!E.find(L=>L.id===g)),O=e.unref(s).filter(g=>!p.includes(g)).filter(g=>!E.find(L=>L.id===g)),h=x.map(g=>({componentId:g,delete:!0})).concat(O.map(g=>({componentId:g,add:!0})));for(const g of h){const L=e.unref(l).find(I=>I.id===g.componentId);if(L){const{type:I,id:T,events:P=[]}=L,M=$t(I);if(g.add)P.find(W=>{var b;return W.on===M&&W.target===((b=e.unref(i))==null?void 0:b.id)&&W.emit==="refreshData"})||d({id:T,events:[...P,{on:M,target:(N=e.unref(i))==null?void 0:N.id,emit:"refreshData"}].reverse()});else if(g.delete){const W=P.findIndex(b=>{var C;return b.on===M&&b.target===((C=e.unref(i))==null?void 0:C.id)&&b.emit==="refreshData"});W!==-1&&(P.splice(W,1),d({id:T,events:P}))}}}},A=()=>{var x;y();const E=((x=e.unref(a)[t.type])==null?void 0:x.slice())||[];E[t.index].sortCpnts=s.value,r({[t.type]:E}),u()},m=()=>{u()},_=(E,x)=>{var O;return(O=x==null?void 0:x.keyName)==null?void 0:O.toLowerCase().includes(E==null?void 0:E.toLowerCase())};return o({showModal:f}),{visible:n,onOk:A,onCancel:m,idFilterOption:_,fieldName:s,usedComponentList:c}}}),Of="",ls=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),is={class:"sort-by-cpnt"},ss=ls(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function cs(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",is,[ss,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const ds=ee(rs,[["render",cs],["__scopeId","data-v-2943f455"]]),Bo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:Bo(t,r.children)&&(n=Bo(t,r.children)))}return n},ps=e.defineComponent({name:"FormulaCalculation",props:{value:{type:String,default:""},item:{type:Object,default:()=>({})},mode:{type:String,default:"add"}},components:{ARow:v.Row,ACol:v.Col,ATextarea:v.Textarea,APopover:v.Popover,AInputSearch:v.InputSearch,ATree:v.Tree,DoubleRightOutlined:ll},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Te),a=e.unref(e.inject(Ee)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{console.log("graphicConfig",r);const g=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return t.mode==="edit"?(g==null?void 0:g.filter(L=>{var I;return L.id!==((I=t.item)==null?void 0:I.id)}))||[]:g||[]}),p=e.computed({get:()=>t.value||"",set:g=>{o("update:value",g),o("change",g)}}),f=e.ref(""),u=g=>{const L=document.getElementById("calTextArea");let I=p.value;if(document.selection){const T=document.selection.createRange();T.text=g}else if(typeof L.selectionStart=="number"&&typeof L.selectionEnd=="number"){const T=L.selectionStart,P=L.selectionEnd;let M=T;I=I.substring(0,T)+g+I.substring(P,I.length),M+=g.length,L.selectionStart=L.selectionEnd=M}else I+=g;p.value=I},y=["+","-","*","/","(",")"],A=(g,L)=>{let I="";switch(L){case"name":{I="${"+g+"}";break}case"function":{I=g+"()";break}default:I=g}u(I)},m=[],_=e.ref([]),E=e.ref(!0),x=e.ref([]),O=g=>{var L;for(const I of g)(L=I==null?void 0:I.children)!=null&&L.length?O(I.children):m.push({key:I.key,title:I.title})},h=async()=>{try{const g=await n.get(`${we}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:L,data:I=[]}=g.data;L&&(I!=null&&I.length)&&(O(I),x.value=I)}catch(g){console.error(g)}},N=g=>{_.value=g,E.value=!1};return e.watch(f,g=>{const L=m.map(I=>I.title.indexOf(g)>-1?Bo(I.key,x.value):null).filter((I,T,P)=>I&&P.indexOf(I)===T);_.value=L,f.value=g,E.value=!0}),e.onMounted(()=>{h()}),{fieldList:c,myValue:p,calculMethods:y,funcDescsData:x,searchFuncValue:f,expandedKeys:_,autoExpandParent:E,selectedElem:A,onExpand:N}}}),Vf="",If="",fs={class:"formula-calculation"},us={class:"field-area"},ms=["onClick"],hs={class:"cal_right_bottom"},ys={class:"cal_fu"},gs=["onClick"],bs={class:"function-wrap"},Cs={class:"wrap-search"},ws={class:"tree-box"},xs={key:0},ks={style:{color:"#f50"}},_s={key:1},Ss=["onClick"],As={class:"cal_a"};function Ns(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),f=e.resolveComponent("a-popover"),u=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",fs,[e.createVNode(u,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",us,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(y,A)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:A,onClick:m=>t.selectedElem(y.label,"name")},e.toDisplayString(y.label),9,ms))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=y=>t.myValue=y),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",hs,[e.createElementVNode("ul",ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(y,A)=>(e.openBlock(),e.createElementBlock("li",{onClick:m=>t.selectedElem(y,"symbol"),key:A},e.toDisplayString(y),9,gs))),128))]),e.createVNode(f,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",bs,[e.createElementVNode("div",Cs,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=y=>t.searchFuncValue=y),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",ws,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:y,leaf:A})=>[y.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",xs,[e.createTextVNode(e.toDisplayString(y.substr(0,y.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",ks,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(y.substr(y.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",_s,e.toDisplayString(y),1)),A?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:m=>t.selectedElem(y,"function")},"插入",8,Ss)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",As,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Ts=ee(ps,[["render",Ns],["__scopeId","data-v-d5a15c98"]]),Es=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Ts,AForm:v.Form,AModal:v.Modal,AFormItem:v.FormItem,AInput:v.Input,ASelect:v.Select,ASelectOption:v.SelectOption,ATextarea:v.Textarea,AInputNumber:v.InputNumber},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(Ue),a=e.inject(pe),r=e.inject(Le),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const b=["leftAxisList","rightAxisList","queryColumnList","indicators"];let C=[];for(const k of b)Object.prototype.hasOwnProperty.call(e.unref(a),k)&&(C=C.concat(e.unref(a)[k]));return C}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},f={value:0,unit:"YEAR",around:"before"},u=e.ref({}),y=e.ref(),A=e.ref(!1),m=e.ref();e.watch(A,b=>{if(b)if(t.mode==="edit"){const{label:C,calcType:k,formula:V,builtInValueSource:$,builtInFormula:R,builtInCalcWay:w}=t.item;if(m.value={label:C,calcType:k,formula:V,builtInValueSource:$,builtInFormula:R,builtInCalcWay:w},R==="DATE_OFFSET"){const S=w.split("-");(S==null?void 0:S.length)===3&&(u.value={value:S[0],unit:S[1],around:S[2]})}}else t.mode==="add"&&(m.value=oe.cloneDeep(p),u.value=oe.cloneDeep(f));else m.value=oe.cloneDeep(p),u.value=oe.cloneDeep(f);window.changeShowTable&&window.changeShowTable(!b)},{immediate:!0,deep:!0});let _=!1;const E=()=>{_=!0},x=b=>{const C=e.unref(l).find(k=>k.id===b);C&&(m.value.builtInCalcWay=C.keyName),_=!0},O=()=>{var $;const b=(($=e.unref(a)[t.type])==null?void 0:$.slice())||[],{label:C,builtInFormula:k}=e.unref(m)||{},V={};if(k==="DATE_OFFSET"&&(V.builtInCalcWay=`${e.unref(u).value}-${e.unref(u).unit}-${e.unref(u).around}`),t.mode==="add"){const R=Lo();b.push({...e.unref(m),...V,id:R,show:!0,name:C})}else t.mode==="edit"&&(b[t.index]={...b[t.index],...e.unref(m),...V,name:C});r({[t.type]:b})},h=()=>{A.value=!0},N=()=>{A.value=!1},g=async(b,C)=>{if(C==="")return Promise.reject(new Error("请输入指标名"));{const k=e.unref(d).find(V=>V.label===C);return k?k.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},L=e.computed(()=>{let b={label:[{required:!0,validator:g,trigger:"change"}]};return m.value.calcType==="BUILT_IN"&&(b={...b,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),b}),I=()=>{y.value.validate().then(()=>{_&&O(),_=!1,N()})},T=()=>{y.value.clearValidate(),N()},P=()=>{_=!0,e.unref(m).builtInCalcWay=""},M=e.computed(()=>{let b="";const C=e.unref(m).builtInCalcWay,k=e.unref(m).builtInValueSource;if(!k||!C)return b;switch(e.unref(m).builtInFormula){case"BUILT_IN_RANK":{C==="ASC"?b="【"+k+"】由小到大在所有值中的排名":b="【"+k+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{b=`所有【】的
|
|
60
|
-
`,
|
|
61
|
-
`,C){case"SUM":{V="求和";break}case"AVG":{V="求平均值";break}case"MIN":{V="求最小值";break}case"MAX":{V="求最大值";break}}b=b+"将所有【"+k+"】"+V;break}}return b}),W=(b,C)=>C.keyName.toLowerCase().indexOf(b.toLowerCase())>=0;return o({showModal:h}),{visible:A,onCancel:T,labelCol:s,wrapperCol:c,formState:m,builtInValueSourceList:i,onOK:I,onChange:E,formRules:L,accessLogic:M,formRef:y,onChangeBuiltInFormula:P,componentList:l,onChangeComponent:x,filterOption:W,offsetConfig:u}}}),Ff="",Ls={key:0,class:"accesstip"},Bs={style:{display:"flex"}};function Os(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),f=e.resolveComponent("a-textarea"),u=e.resolveComponent("a-input-number"),y=e.resolveComponent("a-form"),A=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(A,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(y,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=m=>t.formState.label=m),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]=m=>t.formState.calcType=m),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=m=>t.formState.formula=m),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]=m=>t.formState.builtInFormula=m),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(s,{value:"DATE_OFFSET"},{default:e.withCtx(()=>[e.createTextVNode("日期偏移")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=m=>t.formState.builtInValueSource=m),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(m,_)=>(e.openBlock(),e.createBlock(s,{key:_,value:m.label,disabled:t.item.label===m.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.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]=m=>t.formState.builtInCalcWay=m),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",Ls," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(f,{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]=m=>t.formState.builtInValueSource=m),"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",Bs,[e.createVNode(u,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=m=>t.offsetConfig.value=m),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]=m=>t.offsetConfig.unit=m),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=m=>t.offsetConfig.around=m),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"])])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const Vs=ee(Es,[["render",Os],["__scopeId","data-v-5db4b3d8"]]),Is=e.defineComponent({name:"DataConfigCard",directives:{focus:vn},components:{CalculationModal:Vs,FilterModal:Ji,CustomGroupModal:ii,SettingOutlined:Bl,DeleteOutlined:ol,CopyOutlined:Jr,InfoCircleOutlined:ml,CustomSortModal:ql,PlusOutlined:Nl,ACard:v.Card,ACheckbox:v.Checkbox,AInput:v.Input,ADropdown:v.Dropdown,AMenu:v.Menu,ASubMenu:v.SubMenu,AMenuItem:v.MenuItem,AMenuDivider:v.MenuDivider,ASelect:v.Select,APopover:v.Popover,Draggable:ft,ConfigName:as,SortByCpnt:ds},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(pe),a=e.inject(Le),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(eo),d=(F={})=>{var K;const{type:U}=t;if(e.unref(i)==="SQL_VIEW")return!0;let H=!1;if(F.scope==="IDX"?r.includes(U)&&(H=!0):["DIM","BUILT_IN_DIM"].includes(F.scope)&&l.includes(U)&&(H=!0),U==="dimensionList"){const re=((K=e.unref(n)[U])==null?void 0:K.slice())||[];(re==null?void 0:re.length)===1&&(H=!1)}return H},s=e.computed(()=>e.unref(z).type==="ecanDataSelect"&&t.type==="indicators"),c=(F="{}")=>{var U;try{const H=JSON.parse(F);if(!d(H))return;const K=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(s))&&K.forEach(re=>{re.show=!1}),f(K,H),K.push(H),a({[t.type]:K}),sessionStorage.setItem("indicator-list-item","")}catch(H){console.error(H)}},p=(F="{}")=>{var U;try{const{cardItem:H,type:K,index:re}=JSON.parse(F);if(!d(H)||K===t.type)return;const le=((U=e.unref(n)[t.type])==null?void 0:U.slice())||[];f(le,H),le.push(H);const ne=e.unref(n)[K].slice()||[];ne.splice(re,1),a({[t.type]:le,[K]:ne})}catch(H){console.error(H)}};function f(F,U){const H=[];if(F.forEach(K=>{K.label.includes(U.label)&&H.push(K.label.split(U.label)[1])}),H.length>=1){for(let K=1;K<=H.length;K++)if(!H.includes(K+"")){U.label=U.label+K;break}}}const u=(F,U)=>{var re,le;const H=(re=F.target)==null?void 0:re.checked,K=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(s))&&K.forEach(ne=>{ne.show=!1}),K[U].show=H,a({[t.type]:K})},y=F=>{var H;const U=((H=e.unref(n)[t.type])==null?void 0:H.slice())||[];U.splice(F,1),a({[t.type]:U})},A=()=>{sessionStorage.setItem("indicator-card-item","")},m=()=>{const F=sessionStorage.getItem("indicator-list-item"),U=sessionStorage.getItem("indicator-card-item");F?c(F):U&&p(U)},_=F=>{var be,Ce;const{newIndex:U,oldIndex:H,from:K,to:re}=F,le=K.id,ne=re.id;if(U>=0&&H>=0){if(le===ne){const te=((be=e.unref(n)[t.type])==null?void 0:be.slice())||[],se=te.splice(H,1)[0];se&&(te.splice(U,0,se),a({[t.type]:te}))}else if(t.type===ne){const te=((Ce=e.unref(n)[ne])==null?void 0:Ce.slice())||[];if(te!=null&&te.length){const se=te.splice(te.length-1,1)[0];se&&(te.splice(U,0,se),a({[t.type]:te}))}}}},E=(F,U)=>{const H=F.oldIndex,K=U[H];K&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:K,type:t.type,index:H}))},x=e.computed(()=>e.unref(n)[t.type]||[]),O=e.ref([]);let h=!1;e.watch(()=>e.unref(x).length,F=>{O.value=new Array(F).fill(!1)},{flush:"post",immediate:!0});const N=F=>{var H;const U=((H=e.unref(n)[t.type])==null?void 0:H.slice())||[];U.splice(F,1),a({[t.type]:U})},g=F=>{O.value[F]=!0},L=()=>{h=!0},I=(F,U,H)=>{var K,re;if(O.value[U]=!1,h){const le=(K=F.target)==null?void 0:K.value,ne=((re=e.unref(n)[t.type])==null?void 0:re.slice())||[],be=ne.filter(te=>{var se;return(se=te==null?void 0:te.formula)==null?void 0:se.includes(H)}).map(te=>te.id),Ce=ne.filter(te=>{var se;return(se=te==null?void 0:te.builtInValueSource)==null?void 0:se.includes(H)}).map(te=>te.id);if(be!=null&&be.length)for(const te of be){const se=ne.find(Wo=>Wo.id===te);se.formula=se.formula.replaceAll(H,le)}if(Ce!=null&&Ce.length)for(const te of Ce){const se=ne.find(Wo=>Wo.id===te);se.builtInValueSource=se.builtInValueSource.replaceAll(H,le)}ne[U].label=le,a({[t.type]:ne})}h=!1},T="DEFAULT",P=e.computed(()=>{const F=e.unref(n)[t.type]||[],{leftAxisList:U=[],rightAxisList:H=[],indicators:K=[]}=e.unref(n)||{};return[{id:T,label:"默认",name:"默认"},...F,...U,...H,...K]}),M=(F={},U,H="ASC")=>{var be;const{label:K,name:re,id:le}=F,ne=((be=e.unref(n)[t.type])==null?void 0:be.slice())||[];le===T?delete ne[U].sort:ne[U].sort={label:K,columnName:re,type:"NORMAL",order:H},a({[t.type]:ne})},W=(F={},U="ASC")=>{const K={ASC:"升序",DESC:"降序"}[U],{sort:re}=F,{label:le,order:ne}=re||{};return le&&ne===U?`${K}(${le})`:K},b=e.ref(),C=e.ref(),k=e.ref(),V=e.ref(),$=(F={},U)=>{var H;b.value=F,C.value=U,(H=e.unref(k))==null||H.showModal()},R=F=>{var U;return"自定义排序"+(((U=F==null?void 0:F.sort)==null?void 0:U.type)==="CUSTOM"?"(已配置)":"")},w=(F={},U)=>{var H;b.value=F,C.value=U,(H=e.unref(V))==null||H.showModal()},S=F=>"自定义分组"+((F==null?void 0:F.customGroup)!=null?"(已配置)":""),B=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],j=(F,U)=>{var K;const H=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];H[U].aggregate=F,a({[t.type]:H})},D=(F,U)=>{var K;const H=((K=e.unref(n)[t.type])==null?void 0:K.slice())||[];H[U].dateFormat=F,a({[t.type]:H})},Y=(F="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[F]})`,Q=(F={})=>{var U;return"过滤"+(F!=null&&F.conditions&&((U=F==null?void 0:F.conditions)==null?void 0:U.length)>0?"(已配置)":"")},q=e.ref(),Z=e.ref(),ae=e.ref(),ce=(F={},U)=>{b.value=F,C.value=U,e.unref(q).showModal()},de=(F={},U)=>{b.value=F,C.value=U,e.unref(Z).showModal(F)},$e=(F={},U)=>{b.value=F,C.value=U,e.unref(ae).showModal(F)},Tt=e.ref(),He=e.ref("add"),ct=(F,U,H)=>{var K;He.value=F,F==="edit"&&(b.value=U,C.value=H),(K=e.unref(Tt))==null||K.showModal()},Qe=e.inject(Te),We=e.unref(e.inject(Ee)),Re=e.ref([]),dt=e.computed(()=>e.unref(n)[t.type]||{}),pt=async()=>{try{const F=await Qe.post(`${we}/diagram/dimFields`,{},{headers:{Authentication:We,operateContext:"ygt"}}),{success:U,data:H=[]}=F.data;U&&(Re.value=H)}catch(F){console.error(F)}},Ne=(F,U)=>{const H=e.unref(n)[t.type]||{};H[U]=F,a({[t.type]:H})},De=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],Ye=e.ref({}),Je=async(F,U)=>{var K;const{name:H}=U;if(!De.includes(t.type)&&F&&Eo(U,"indexCode")){const re=await Qe.post(`${we}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:U.id,indexCode:U.indexCode,pageId:(K=window==null?void 0:window.config)==null?void 0:K.pageId},{headers:{Authentication:We,operateContext:"ygt"}}),{success:le,data:ne}=re.data;le&&ne&&(Ye.value[H]={name:ne.name,code:ne.indexCode})}},G=F=>{const U=document.createElement("input");document.body.appendChild(U),U.setAttribute("value",F),U.select(),document.execCommand("copy"),document.body.removeChild(U),v.message.success("复制成功")},z=e.inject(ve),X=e.computed(()=>t.type==="indicators"&&e.unref(z).type==="ecanTable"),J=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(z).type==="ecanDataSelect"?Re.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:pt())}),{onCheckboxChange:u,onDropEnd:y,onDragItemEnd:A,onDragItemAdd:m,onDragItemSort:_,onDragItemStart:E,cardItemList:x,onDelete:N,onEdit:g,onCommitLabelChange:I,sortList:P,onSort:M,handleSortTitle:W,showCustomSortModal:$,customSortModalRef:k,currentItem:b,currentIndex:C,handleCustomSortTitle:R,handleCustomGroupTitle:S,customGroupModalRef:V,showCustomGroupModal:w,editLabelList:O,onLabelChange:L,aggregateList:B,onAggregateChange:j,onDateFormatChange:D,handleAggregateTitle:Y,onShowCalculationModal:ct,handleFilterTitle:Q,filterModalRef:q,configNameRef:Z,sortByCpntRef:ae,showFilterModal:ce,calculationModalRef:Tt,calculationModalMode:He,formatList:o,fieldOptions:Re,fieldData:dt,onFieldChange:Ne,onVisibleChange:Je,copyDataViewName:G,dataViewMap:Ye,isShowConfigName:X,showConfigNameModal:de,dimensionType:De,isShowSortByCpnt:J,showSortByCpntModal:$e,dataSelectIndicators:s}}}),$f="",Df="",tt=t=>(e.pushScopeId("data-v-9fbb7a14"),t=t(),e.popScopeId(),t),Fs={class:"title"},$s={class:"title-text"},Ds={class:"field-wrap"},vs={class:"field-item"},Ps=tt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),Ms={class:"field-item"},js=tt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),Rs={class:"title"},Us={class:"title-text"},Gs=tt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),zs=tt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),Hs={class:"card-item-wrap"},Ws={class:"card-item-inner"},Ys=["onClick"],qs=["onClick"],Ks=["onClick"],Xs={style:{display:"flex","align-items":"center"}},Qs=["title"],Js=tt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),Zs={style:{display:"flex","align-items":"center"}},ec=["title"],tc=tt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function oc(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),f=e.resolveComponent("a-input"),u=e.resolveComponent("setting-outlined"),y=e.resolveComponent("a-menu-item"),A=e.resolveComponent("a-sub-menu"),m=e.resolveComponent("a-menu-divider"),_=e.resolveComponent("copy-outlined"),E=e.resolveComponent("a-menu"),x=e.resolveComponent("a-dropdown"),O=e.resolveComponent("delete-outlined"),h=e.resolveComponent("a-checkbox"),N=e.resolveComponent("draggable"),g=e.resolveComponent("custom-sort-modal"),L=e.resolveComponent("custom-group-modal"),I=e.resolveComponent("filter-modal"),T=e.resolveComponent("config-name"),P=e.resolveComponent("sort-by-cpnt"),M=e.resolveComponent("calculation-modal"),W=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",Fs,[e.createElementVNode("div",$s,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",Ds,[e.createElementVNode("div",vs,[Ps,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=b=>t.onFieldChange(b,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",Ms,[js,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=b=>t.onFieldChange(b,"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",Rs,[e.createElementVNode("div",Us,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[Gs]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(b=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),zs])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(N,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=b=>t.cardItemList=b),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]=b=>t.onDragItemStart(b,t.cardItemList))},{item:e.withCtx(({element:b,index:C})=>[e.createElementVNode("div",Hs,[e.createVNode(h,{class:"card-item",checked:b.show,onChange:k=>t.onCheckboxChange(k,C)},{default:e.withCtx(()=>[e.createElementVNode("div",Ws,[!t.editLabelList[C]&&b.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(k=>t.onEdit(C),["prevent","stop"])},e.toDisplayString(b.label),9,Ys)):e.createCommentVNode("",!0),!t.editLabelList[C]&&!b.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(k=>t.onEdit(C),["prevent","stop"])}," 请点击填入名字 ",8,qs)):e.createCommentVNode("",!0),t.editLabelList[C]?e.withDirectives((e.openBlock(),e.createBlock(f,{key:2,"default-value":b.label,size:"small",onBlur:k=>t.onCommitLabelChange(k,C,b.label),onPressEnter:k=>t.onCommitLabelChange(k,C,b.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[W]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(b.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(k=>t.onShowCalculationModal("edit",b,C),["prevent","stop"])}," fx ",8,Ks)):e.createCommentVNode("",!0),e.createVNode(x,{trigger:["click"],onVisibleChange:k=>t.onVisibleChange(k,b)},{overlay:e.withCtx(()=>[e.createVNode(E,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:t.handleSortTitle(b,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,k=>(e.openBlock(),e.createBlock(y,{style:{"white-space":"nowrap"},key:k.id,onClick:V=>t.onSort(k,C,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(A,{title:t.handleSortTitle(b,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,k=>(e.openBlock(),e.createBlock(y,{class:"menu-item",style:{"white-space":"nowrap"},key:k.id,onClick:V=>t.onSort(k,C,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(y,{onClick:k=>t.showCustomSortModal(b,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(b)),1)]),_:2},1032,["onClick"]),e.createVNode(m),e.createVNode(y,{onClick:k=>t.showCustomGroupModal(b,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(b)),1)]),_:2},1032,["onClick"]),e.createVNode(m),b.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,k=>(e.openBlock(),e.createBlock(y,{style:{"white-space":"nowrap"},key:k.value,onClick:V=>t.onDateFormatChange(k.value,C)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(b.dateFormat===k.value||!b.dateFormat&&k.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(k.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(m)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(y,{onClick:k=>t.showFilterModal(b,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(b)),1)]),_:2},1032,["onClick"]),e.createVNode(m),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(A,{title:t.handleAggregateTitle(b.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,k=>(e.openBlock(),e.createBlock(y,{style:{"white-space":"nowrap"},key:k.value,onClick:V=>t.onAggregateChange(k.value,C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(m)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(y,{onClick:k=>t.showConfigNameModal(b,C)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(m)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(y,{onClick:k=>t.showSortByCpntModal(b,C)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(m)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[t.dataViewMap[b.name]?(e.openBlock(),e.createBlock(y,{key:0,onClick:k=>t.copyDataViewName(t.dataViewMap[b.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",Xs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[b.name].name},[Js,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[b.name].name),1)],8,Qs),e.createVNode(_,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[b.name]?(e.openBlock(),e.createBlock(y,{key:1,onClick:k=>t.copyDataViewName(t.dataViewMap[b.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[b.name].code},[tc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[b.name].code),1)],8,ec),e.createVNode(_,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(u,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(O,{class:"delete-icon",onClick:e.withModifiers(k=>t.onDelete(C),["prevent"])},null,8,["onClick"])])]),_:2},1032,["checked","onChange"])])]),_:1},8,["modelValue","id","onAdd","onSort","onEnd"])],2),e.createVNode(g,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customSortModalRef"},null,8,["item","index","type"]),e.createVNode(L,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"customGroupModalRef"},null,8,["item","index","type"]),e.createVNode(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(T,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(P,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},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 nc=ee(Is,[["render",oc],["__scopeId","data-v-9fbb7a14"]]),ac={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},rc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:nc},setup(){const t=e.inject(ve),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(Le),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var _,E;const s=oe.cloneDeep((_=e.unref(t))==null?void 0:_.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"]},f="ecan";let u=e.unref(o);if(u.startsWith(f)){const x=f.length;u=((E=u.slice(x,x+1))==null?void 0:E.toLowerCase())+u.slice(x+1)}const y=p[u],A=ac,m=(y==null?void 0:y.length)||0;for(let x=0;x<m;x++){const O=y[x];if(!O)break;r.push({...A[O],type:O})}for(const x of c)i(s,x)&&!y.find(O=>O===x)&&(s[x]=[]);l(s)})(),{cardsMap:a,cards:r}}}),vf="",Pf="",lc={class:"data-group"};function ic(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const sc=ee(rc,[["render",ic],["__scopeId","data-v-dad9b990"]]),cc=[{title:"基本属性",props:["name","width","height","colors"]},{title:"系列",props:["seriesTypes"]},{title:"表格",onlyType:["table"],props:["size","allOverflow","hoverRow","hoverColor","boderList","columnDropEnable","showTotalBool","totalName","expandAll"]},{title:"折线图",onlyType:["line","comboGraph"],props:["areaStyleOpacity","smooth","lineStyleWidth","symbolSize"]},{title:"柱状图",onlyType:["bar","comboGraph"],props:["barWidth","isUseHorizontalAxis","axisInverse","isStack","labelShow"]},{title:"饼图",onlyType:"pie",props:["centerTop","centerLeft","innerRadius","outerRadius","roseType","minAngle"]},{title:"布局",props:["gridTop","gridBottom","gridLeft","gridRight","gridContainLabel"]},{title:"x轴",props:["xAxisLabelColor","xAxisLineStyleColor","xAxisLabelWidth","xAxisLabelOverflow","xAxisLabelRotate","xAxisTickShow","xAxisSplitLineShow","xAxisSplitLineStyleColor","xAxisLabelFormatter","xAxisInverse","xAxisMinInterval","xAxisLabelInterval"]},{title:"y轴",props:["yAxisLabelColor","yAxisLineStyleColor","yAxisLineAlwaysDisplay","yAxisLabelWidth","yAxisLabelOverflow","yAxisLabelRotate","yAxisSplitLineShow","yAxisSplitLineStyleColor","yAxisLabelFormatter","yAxisInverse","yAxisMinInterval","yAxis"]},{title:"标签",enableProps:"labelShow",props:["labelFormatter","labelColor","isUseLabelColors","labelFontSize","labelPosition"]},{title:"标签引导线",enableProps:"labelLineShow",props:["labelLineLength","labelLineLength2"]},{title:"图例",enableProps:"legendShow",props:["legendTextStyleColor","legendTop","legendLeft","legendOrient"]},{title:"提示框",enableProps:"tooltipShow",props:["tooltipTrigger","tooltipFormatter","tooltipTextStyleColor"]},{title:"工具栏",enableProps:"toolboxShow",props:["toolboxOrient","toolboxItemSize","toolboxItemGap","toolboxLeft","toolboxTop","toolboxDataZoomShow","toolboxInfoShow"]}],dc={name:{label:"控件别名",component:"input"},title:{label:"标题",component:"input"},width:{label:"宽度",component:"input-number",props:{suffix:"px",min:0}},height:{label:"高度",component:"input-number",props:{suffix:"px",min:10}},colors:{label:"颜色",component:"color-group-pick"},centerLeft:{label:"水平位置",component:"input-number",props:{suffix:"%",min:0,max:100}},centerTop:{label:"垂直位置",component:"input-number",props:{suffix:"%",min:0,max:100}},innerRadius:{label:"内半径",component:"input-number",props:{suffix:"%",min:0,max:100}},outerRadius:{label:"外半径",component:"input-number",props:{suffix:"%",min:0,max:100}},tooltipTrigger:{label:"触发条件",component:"radio-group",props:{options:[{label:"图形",value:"item"},{label:"坐标轴",value:"axis"},{label:"无",value:"none"}]}},tooltipTextStyleColor:{label:"颜色",component:"color-pick"},tooltipFormatter:{label:"格式化",component:"textarea"},legendTextStyleColor:{label:"颜色",component:"color-pick"},legendTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"上",value:"top"},{label:"中",value:"middle"},{label:"下",value:"bottom"}]}},legendLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"左",value:"left"},{label:"中",value:"center"},{label:"右",value:"right"}]}},legendOrient:{label:"布局",component:"radio-group",props:{options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]}},labelFormatter:{label:"格式化",component:"input"},labelColor:{label:"标签颜色",component:"color-pick"},isUseLabelColors:{label:"系列色",component:"switch"},labelFontSize:{label:"字体大小",component:"input-number",props:{min:12,suffix:"px"}},labelPosition:[{label:"位置",component:"radio-group",onlyType:"pie",props:{options:[{label:"外侧",value:"outside"},{label:"内侧",value:"inside"},{label:"中心",value:"center"}]}},{label:"位置",component:"select",onlyType:"bar",props:{options:[{label:"上",value:"top"},{label:"中",value:"inside"},{label:"下",value:"bottom"},{label:"右",value:"right"},{label:"左",value:"left"}]}}],labelLineLength:{label:"第一段",component:"input-number",props:{min:0}},labelLineLength2:{label:"第二段",component:"input-number",props:{min:0}},symbolSize:{label:"标记点尺寸",component:"input-number",props:{min:0}},smooth:{label:"线条光滑",component:"switch"},lineStyleWidth:{label:"线条宽度",component:"input-number",props:{min:0}},xAxisSplitLineShow:{label:"分割线",component:"switch"},xAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},xAxisLabelColor:{label:"名称颜色",component:"color-pick"},xAxisLineStyleColor:{label:"横边颜色",component:"color-pick"},xAxisTickShow:{label:"显示刻度",component:"switch"},xAxisLabelFormatter:{label:"格式化",component:"input"},yAxisSplitLineShow:{label:"分割线",component:"switch"},yAxisLineAlwaysDisplay:{label:"显示竖边",component:"switch"},yAxisSplitLineStyleColor:{label:"分割线颜色",component:"color-pick"},yAxisLabelColor:{label:"名称颜色",component:"color-pick"},yAxisLineStyleColor:{label:"竖边颜色",component:"color-pick"},yAxisLabelFormatter:{label:"格式化",component:"input"},roseType:{label:"玫瑰图",component:"radio-group",props:{options:[{label:"不展示",value:""},{label:"圆心角",value:"area"},{label:"半径",value:"radius"}]}},yAxis:{label:"系列",component:"form-group",layout:"vertical",props:{max:2,format:[{label:["左轴","右轴"],type:"input",value:"axisLabelFormatter",props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}}]}},seriesTypes:{label:"系列",component:"form-group",layout:"vertical",props:{format:[{label:"系列",type:"select",value:"type",useLabelIndex:!0,props:{options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"}]}},{label:"对应轴",type:"select",value:"axisIndex",props:{options:[{label:"左轴",value:0},{label:"右轴",value:1}]}},{label:"提示框格式化",type:"input",value:"tooltipFormatter"}]}},barWidth:{label:"宽度",component:"input-number",props:{suffix:"%",min:0}},gridTop:{label:"上侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridBottom:{label:"下侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridLeft:{label:"左侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridRight:{label:"右侧距离",component:"input-number",props:{suffix:"%",min:0,max:100}},gridContainLabel:{label:"包含刻度标签",component:"switch"},toolboxOrient:{label:"排版",component:"radio-group",props:{options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]}},toolboxItemSize:{label:"图标大小",component:"input-number"},toolboxItemGap:{label:"图标间距",component:"input-number"},toolboxLeft:{label:"水平位置",component:"radio-group",props:{options:[{label:"居左",value:"left"},{label:"居中",value:"center"},{label:"居右",value:"right"}]}},toolboxTop:{label:"垂直位置",component:"radio-group",props:{options:[{label:"顶部",value:"top"},{label:"居中",value:"middle"},{label:"底部",value:"bottom"}]}},toolboxDownloadUrl:{label:"下载文件地址",component:"input"},toolboxInfoText:{label:"说明信息内容",component:"input"},isUseHorizontalAxis:{label:"横向排列",component:"switch"},axisInverse:{label:"倒叙排列",component:"switch"},xAxisInverse:{label:"图形反转",component:"switch"},yAxisInverse:{label:"图形反转",component:"switch"},areaStyleOpacity:{label:"面积透明度",component:"input-number",props:{step:.1,min:0,max:1}},xAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},xAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},xAxisLabelRotate:{label:"名称旋转",component:"input-number"},yAxisLabelWidth:{label:"名称宽度",component:"input-number",props:{min:0}},yAxisLabelOverflow:{label:"名称溢出",component:"radio-group",props:{optionType:"button",options:[{label:"无",value:"none"},{label:"换行",value:"break"},{label:"省略号",value:"truncate"}]}},yAxisLabelRotate:{label:"名称旋转",component:"input-number"},isStack:{label:"是否堆叠",component:"switch"},labelShow:{label:"展示标签",component:"switch"},xAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},yAxisMinInterval:{label:"最小间距",component:"input-number",props:{min:0}},minAngle:{label:"最小角度",component:"input-number",props:{min:0,max:360}},xAxisLabelInterval:{label:"标签间隔",component:"input-number",props:{min:-1}},toolboxLocation:{label:"快速定位",component:"switch"},toolboxDownloadShow:{label:"使用数据下载",component:"switch"},toolboxDataZoomShow:{label:"使用放大",component:"switch"},toolboxInfoShow:{label:"指标信息",component:"switch"},size:{label:"尺寸",onlyType:"table",component:"radio-group",props:{options:[{label:"大",value:"medium"},{label:"中",value:"small"},{label:"小",value:"mini"}]}},allOverflow:{label:"表内容超出",onlyType:"table",component:"radio-group",props:{options:[{label:"换行",value:"false"},{label:"省略号",value:"ellipsis"},{label:"省略号+title显示",value:"title"},{label:"省略号+tooltip显示",value:"tooltip"}]}},hoverRow:{onlyType:"table",label:"点击行高亮",component:"switch"},hoverColor:{onlyType:"table",label:"hover行颜色",component:"color-pick"},boderList:{label:"边框不显示",component:"select",onlyType:"table",props:{mode:"multiple",options:[{label:"表格上边框",value:"top"},{label:"表格下边框",value:"bottom"},{label:"表格左边框",value:"left"},{label:"表格右边框",value:"right"},{label:"表格内容边框",value:"middle"},{label:"列按钮边框",value:"button"}]}},columnDropEnable:{onlyType:"table",label:"列拖拽",component:"switch"},showTotalBool:{onlyType:"table",label:"显示汇总行",component:"switch"},totalName:{onlyType:"table",label:"汇总行名",component:"input"},expandAll:{onlyType:"table",label:"展开所有节点",component:"switch"}},pc=e.defineComponent({name:"Input",directives:{focus},props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{AInput:v.Input},emits:["change"],setup(t,{emit:o}){return{onInputChange:a=>{o("change",a.target.value)}}}});function fc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const uc=ee(pc,[["render",fc]]),mc=e.defineComponent({name:"InputNumber",props:{value:{type:[String,Number,Object],default:""},valueKey:{type:String,default:"value"},prefixValueKey:{type:String,default:"prefix"},prefix:{type:[String,Array],default:""},suffixValueKey:{type:String,default:"suffix"},suffix:{type:[String,Array],default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:[String,Number],default:1},useBlurEvent:{type:Boolean,default:!0}},components:{AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){const n=e.computed(()=>{const f=t.value;return typeof f=="string"?parseFloat(f):typeof f=="object"&&f!=null?f[t.valueKey]:f}),a=f=>t.value!=null&&typeof t.value=="object"?t.value[t[`${f}ValueKey`]]:Array.isArray(t[f])?t[f][0]&&t[f][0].value:null,r=e.ref(a("prefix")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:f=>{const u=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:f,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):u===""||f==null?o("change",f):o("change",`${f}${u}`)},parser:f=>typeof t.suffix=="string"?f.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?f.replace(t.value[t.suffixValueKey],""):f,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function hc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},f)=>(e.openBlock(),e.createBlock(i,{key:f,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},f)=>(e.openBlock(),e.createBlock(i,{key:f,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 Rn=ee(mc,[["render",hc]]),yc=e.defineComponent({name:"RadioGroup",props:{value:{type:[String,Number],default:""},options:{type:Array,default:()=>[]},optionType:{type:String,default:"default"},size:{type:String,default:"default"}},components:{ARadioGroup:v.RadioGroup,ARadioButton:v.RadioButton},emits:["change"],setup(t,{emit:o}){return{onRadioChange:a=>{o("change",a.target.value)}}}});function gc(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const bc=ee(yc,[["render",gc]]),Cc=e.defineComponent({name:"Select",props:{value:{type:[String,Number,Array,Array],default:""},options:{type:Array,default:()=>[]}},components:{ASelect:v.Select,ASelectOption:v.SelectOption},emits:["change"],setup(t,{emit:o}){return{onSelectChange:a=>{o("change",a)}}}});function wc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const xc=ee(Cc,[["render",wc]]),kc=e.defineComponent({name:"Switch",props:{value:{type:Boolean,default:!1},width:{type:[String,Number],default:150},disabled:{type:Boolean,default:!1}},components:{ASwitch:v.Switch},emit:["change"],setup(t,{emit:o}){return{onSwitchChange:a=>{o("change",a)}}}});function _c(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const Sc=ee(kc,[["render",_c]]);var ue="top",ke="bottom",_e="right",me="left",Oo="auto",yt=[ue,ke,_e,me],ot="start",gt="end",Ac="clippingParents",Un="viewport",bt="popper",Nc="reference",Gn=yt.reduce(function(t,o){return t.concat([o+"-"+ot,o+"-"+gt])},[]),zn=[].concat(yt,[Oo]).reduce(function(t,o){return t.concat([o,o+"-"+ot,o+"-"+gt])},[]),Tc="beforeRead",Ec="read",Lc="afterRead",Bc="beforeMain",Oc="main",Vc="afterMain",Ic="beforeWrite",Fc="write",$c="afterWrite",Dc=[Tc,Ec,Lc,Bc,Oc,Vc,Ic,Fc,$c];function Ve(t){return t?(t.nodeName||"").toLowerCase():null}function ge(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function qe(t){var o=ge(t).Element;return t instanceof o||t instanceof Element}function Se(t){var o=ge(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Vo(t){if(typeof ShadowRoot>"u")return!1;var o=ge(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function vc(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Se(l)||!Ve(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function Pc(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Se(r)||!Ve(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const Mc={name:"applyStyles",enabled:!0,phase:"write",fn:vc,effect:Pc,requires:["computeStyles"]};function Ie(t){return t.split("-")[0]}var Ke=Math.max,Dt=Math.min,nt=Math.round;function Io(){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 Hn(){return!/^((?!chrome|android).)*safari/i.test(Io())}function at(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Se(t)&&(r=t.offsetWidth>0&&nt(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&nt(a.height)/t.offsetHeight||1);var i=qe(t)?ge(t):window,d=i.visualViewport,s=!Hn()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,f=a.width/r,u=a.height/l;return{width:f,height:u,top:p,right:c+f,bottom:p+u,left:c,x:c,y:p}}function Fo(t){var o=at(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 Wn(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Vo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Me(t){return ge(t).getComputedStyle(t)}function jc(t){return["table","td","th"].indexOf(Ve(t))>=0}function ze(t){return((qe(t)?t.ownerDocument:t.document)||window.document).documentElement}function vt(t){return Ve(t)==="html"?t:t.assignedSlot||t.parentNode||(Vo(t)?t.host:null)||ze(t)}function Yn(t){return!Se(t)||Me(t).position==="fixed"?null:t.offsetParent}function Rc(t){var o=/firefox/i.test(Io()),n=/Trident/i.test(Io());if(n&&Se(t)){var a=Me(t);if(a.position==="fixed")return null}var r=vt(t);for(Vo(r)&&(r=r.host);Se(r)&&["html","body"].indexOf(Ve(r))<0;){var l=Me(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function Ct(t){for(var o=ge(t),n=Yn(t);n&&jc(n)&&Me(n).position==="static";)n=Yn(n);return n&&(Ve(n)==="html"||Ve(n)==="body"&&Me(n).position==="static")?o:n||Rc(t)||o}function $o(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wt(t,o,n){return Ke(t,Dt(o,n))}function Uc(t,o,n){var a=wt(t,o,n);return a>n?n:a}function qn(){return{top:0,right:0,bottom:0,left:0}}function Kn(t){return Object.assign({},qn(),t)}function Xn(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var Gc=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,Kn(typeof o!="number"?o:Xn(o,yt))};function zc(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=Ie(n.placement),s=$o(d),c=[me,_e].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var f=Gc(r.padding,n),u=Fo(l),y=s==="y"?ue:me,A=s==="y"?ke:_e,m=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],_=i[s]-n.rects.reference[s],E=Ct(l),x=E?s==="y"?E.clientHeight||0:E.clientWidth||0:0,O=m/2-_/2,h=f[y],N=x-u[p]-f[A],g=x/2-u[p]/2+O,L=wt(h,g,N),I=s;n.modifiersData[a]=(o={},o[I]=L,o.centerOffset=L-g,o)}}function Hc(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)||Wn(o.elements.popper,r)&&(o.elements.arrow=r))}const Wc={name:"arrow",enabled:!0,phase:"main",fn:zc,effect:Hc,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rt(t){return t.split("-")[1]}var Yc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function qc(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:nt(n*r)/r||0,y:nt(a*r)/r||0}}function Qn(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,f=t.isFixed,u=i.x,y=u===void 0?0:u,A=i.y,m=A===void 0?0:A,_=typeof p=="function"?p({x:y,y:m}):{x:y,y:m};y=_.x,m=_.y;var E=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),O=me,h=ue,N=window;if(c){var g=Ct(n),L="clientHeight",I="clientWidth";if(g===ge(n)&&(g=ze(n),Me(g).position!=="static"&&d==="absolute"&&(L="scrollHeight",I="scrollWidth")),g=g,r===ue||(r===me||r===_e)&&l===gt){h=ke;var T=f&&g===N&&N.visualViewport?N.visualViewport.height:g[L];m-=T-a.height,m*=s?1:-1}if(r===me||(r===ue||r===ke)&&l===gt){O=_e;var P=f&&g===N&&N.visualViewport?N.visualViewport.width:g[I];y-=P-a.width,y*=s?1:-1}}var M=Object.assign({position:d},c&&Yc),W=p===!0?qc({x:y,y:m},ge(n)):{x:y,y:m};if(y=W.x,m=W.y,s){var b;return Object.assign({},M,(b={},b[h]=x?"0":"",b[O]=E?"0":"",b.transform=(N.devicePixelRatio||1)<=1?"translate("+y+"px, "+m+"px)":"translate3d("+y+"px, "+m+"px, 0)",b))}return Object.assign({},M,(o={},o[h]=x?m+"px":"",o[O]=E?y+"px":"",o.transform="",o))}function Kc(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:Ie(o.placement),variation:rt(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,Qn(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,Qn(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const Xc={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kc,data:{}};var Pt={passive:!0};function Qc(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=ge(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,Pt)}),d&&s.addEventListener("resize",n.update,Pt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,Pt)}),d&&s.removeEventListener("resize",n.update,Pt)}}const Jc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Qc,data:{}};var Zc={left:"right",right:"left",bottom:"top",top:"bottom"};function Mt(t){return t.replace(/left|right|bottom|top/g,function(o){return Zc[o]})}var ed={start:"end",end:"start"};function Jn(t){return t.replace(/start|end/g,function(o){return ed[o]})}function Do(t){var o=ge(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function vo(t){return at(ze(t)).left+Do(t).scrollLeft}function td(t,o){var n=ge(t),a=ze(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Hn();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+vo(t),y:s}}function od(t){var o,n=ze(t),a=Do(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=Ke(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Ke(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+vo(t),s=-a.scrollTop;return Me(r||n).direction==="rtl"&&(d+=Ke(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Po(t){var o=Me(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Zn(t){return["html","body","#document"].indexOf(Ve(t))>=0?t.ownerDocument.body:Se(t)&&Po(t)?t:Zn(vt(t))}function xt(t,o){var n;o===void 0&&(o=[]);var a=Zn(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=ge(a),i=r?[l].concat(l.visualViewport||[],Po(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(xt(vt(i)))}function Mo(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nd(t,o){var n=at(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 ea(t,o,n){return o===Un?Mo(td(t,n)):qe(o)?nd(o,n):Mo(od(ze(t)))}function ad(t){var o=xt(vt(t)),n=["absolute","fixed"].indexOf(Me(t).position)>=0,a=n&&Se(t)?Ct(t):t;return qe(a)?o.filter(function(r){return qe(r)&&Wn(r,a)&&Ve(r)!=="body"}):[]}function rd(t,o,n,a){var r=o==="clippingParents"?ad(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=ea(t,c,a);return s.top=Ke(p.top,s.top),s.right=Dt(p.right,s.right),s.bottom=Dt(p.bottom,s.bottom),s.left=Ke(p.left,s.left),s},ea(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function ta(t){var o=t.reference,n=t.element,a=t.placement,r=a?Ie(a):null,l=a?rt(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case ue:s={x:i,y:o.y-n.height};break;case ke:s={x:i,y:o.y+o.height};break;case _e:s={x:o.x+o.width,y:d};break;case me:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?$o(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case ot:s[c]=s[c]-(o[p]/2-n[p]/2);break;case gt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function kt(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?Ac:d,c=n.rootBoundary,p=c===void 0?Un:c,f=n.elementContext,u=f===void 0?bt:f,y=n.altBoundary,A=y===void 0?!1:y,m=n.padding,_=m===void 0?0:m,E=Kn(typeof _!="number"?_:Xn(_,yt)),x=u===bt?Nc:bt,O=t.rects.popper,h=t.elements[A?x:u],N=rd(qe(h)?h:h.contextElement||ze(t.elements.popper),s,p,i),g=at(t.elements.reference),L=ta({reference:g,element:O,strategy:"absolute",placement:r}),I=Mo(Object.assign({},O,L)),T=u===bt?I:g,P={top:N.top-T.top+E.top,bottom:T.bottom-N.bottom+E.bottom,left:N.left-T.left+E.left,right:T.right-N.right+E.right},M=t.modifiersData.offset;if(u===bt&&M){var W=M[r];Object.keys(P).forEach(function(b){var C=[_e,ke].indexOf(b)>=0?1:-1,k=[ue,ke].indexOf(b)>=0?"y":"x";P[b]+=W[k]*C})}return P}function ld(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?zn:s,p=rt(a),f=p?d?Gn:Gn.filter(function(A){return rt(A)===p}):yt,u=f.filter(function(A){return c.indexOf(A)>=0});u.length===0&&(u=f);var y=u.reduce(function(A,m){return A[m]=kt(t,{placement:m,boundary:r,rootBoundary:l,padding:i})[Ie(m)],A},{});return Object.keys(y).sort(function(A,m){return y[A]-y[m]})}function id(t){if(Ie(t)===Oo)return[];var o=Mt(t);return[Jn(t),o,Jn(o)]}function sd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,f=n.rootBoundary,u=n.altBoundary,y=n.flipVariations,A=y===void 0?!0:y,m=n.allowedAutoPlacements,_=o.options.placement,E=Ie(_),x=E===_,O=s||(x||!A?[Mt(_)]:id(_)),h=[_].concat(O).reduce(function(Y,Q){return Y.concat(Ie(Q)===Oo?ld(o,{placement:Q,boundary:p,rootBoundary:f,padding:c,flipVariations:A,allowedAutoPlacements:m}):Q)},[]),N=o.rects.reference,g=o.rects.popper,L=new Map,I=!0,T=h[0],P=0;P<h.length;P++){var M=h[P],W=Ie(M),b=rt(M)===ot,C=[ue,ke].indexOf(W)>=0,k=C?"width":"height",V=kt(o,{placement:M,boundary:p,rootBoundary:f,altBoundary:u,padding:c}),$=C?b?_e:me:b?ke:ue;N[k]>g[k]&&($=Mt($));var R=Mt($),w=[];if(l&&w.push(V[W]<=0),d&&w.push(V[$]<=0,V[R]<=0),w.every(function(Y){return Y})){T=M,I=!1;break}L.set(M,w)}if(I)for(var S=A?3:1,B=function(Q){var q=h.find(function(Z){var ae=L.get(Z);if(ae)return ae.slice(0,Q).every(function(ce){return ce})});if(q)return T=q,"break"},j=S;j>0;j--){var D=B(j);if(D==="break")break}o.placement!==T&&(o.modifiersData[a]._skip=!0,o.placement=T,o.reset=!0)}}const cd={name:"flip",enabled:!0,phase:"main",fn:sd,requiresIfExists:["offset"],data:{_skip:!1}};function oa(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[ue,_e,ke,me].some(function(o){return t[o]>=0})}function dd(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=kt(o,{elementContext:"reference"}),d=kt(o,{altBoundary:!0}),s=oa(i,a),c=oa(d,r,l),p=na(s),f=na(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:f},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}const pd={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dd};function fd(t,o,n){var a=Ie(t),r=[me,ue].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[me,_e].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function ud(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=zn.reduce(function(p,f){return p[f]=fd(f,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const md={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ud};function hd(t){var o=t.state,n=t.name;o.modifiersData[n]=ta({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const yd={name:"popperOffsets",enabled:!0,phase:"read",fn:hd,data:{}};function gd(t){return t==="x"?"y":"x"}function bd(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,f=n.padding,u=n.tether,y=u===void 0?!0:u,A=n.tetherOffset,m=A===void 0?0:A,_=kt(o,{boundary:s,rootBoundary:c,padding:f,altBoundary:p}),E=Ie(o.placement),x=rt(o.placement),O=!x,h=$o(E),N=gd(h),g=o.modifiersData.popperOffsets,L=o.rects.reference,I=o.rects.popper,T=typeof m=="function"?m(Object.assign({},o.rects,{placement:o.placement})):m,P=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),M=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,W={x:0,y:0};if(g){if(l){var b,C=h==="y"?ue:me,k=h==="y"?ke:_e,V=h==="y"?"height":"width",$=g[h],R=$+_[C],w=$-_[k],S=y?-I[V]/2:0,B=x===ot?L[V]:I[V],j=x===ot?-I[V]:-L[V],D=o.elements.arrow,Y=y&&D?Fo(D):{width:0,height:0},Q=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:qn(),q=Q[C],Z=Q[k],ae=wt(0,L[V],Y[V]),ce=O?L[V]/2-S-ae-q-P.mainAxis:B-ae-q-P.mainAxis,de=O?-L[V]/2+S+ae+Z+P.mainAxis:j+ae+Z+P.mainAxis,$e=o.elements.arrow&&Ct(o.elements.arrow),Tt=$e?h==="y"?$e.clientTop||0:$e.clientLeft||0:0,He=(b=M==null?void 0:M[h])!=null?b:0,ct=$+ce-He-Tt,Qe=$+de-He,We=wt(y?Dt(R,ct):R,$,y?Ke(w,Qe):w);g[h]=We,W[h]=We-$}if(d){var Re,dt=h==="x"?ue:me,pt=h==="x"?ke:_e,Ne=g[N],De=N==="y"?"height":"width",Ye=Ne+_[dt],Je=Ne-_[pt],G=[ue,me].indexOf(E)!==-1,z=(Re=M==null?void 0:M[N])!=null?Re:0,X=G?Ye:Ne-L[De]-I[De]-z+P.altAxis,J=G?Ne+L[De]+I[De]-z-P.altAxis:Je,F=y&&G?Uc(X,Ne,J):wt(y?X:Ye,Ne,y?J:Je);g[N]=F,W[N]=F-Ne}o.modifiersData[a]=W}}const Cd={name:"preventOverflow",enabled:!0,phase:"main",fn:bd,requiresIfExists:["offset"]};function wd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function xd(t){return t===ge(t)||!Se(t)?Do(t):wd(t)}function kd(t){var o=t.getBoundingClientRect(),n=nt(o.width)/t.offsetWidth||1,a=nt(o.height)/t.offsetHeight||1;return n!==1||a!==1}function _d(t,o,n){n===void 0&&(n=!1);var a=Se(o),r=Se(o)&&kd(o),l=ze(o),i=at(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((Ve(o)!=="body"||Po(l))&&(d=xd(o)),Se(o)?(s=at(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=vo(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function Sd(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function Ad(t){var o=Sd(t);return Dc.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function Nd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Td(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 ra(){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 Ed(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?aa:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},aa,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},f=[],u=!1,y={state:p,setOptions:function(E){var x=typeof E=="function"?E(p.options):E;m(),p.options=Object.assign({},l,p.options,x),p.scrollParents={reference:qe(d)?xt(d):d.contextElement?xt(d.contextElement):[],popper:xt(s)};var O=Ad(Td([].concat(a,p.options.modifiers)));return p.orderedModifiers=O.filter(function(h){return h.enabled}),A(),y.update()},forceUpdate:function(){if(!u){var E=p.elements,x=E.reference,O=E.popper;if(ra(x,O)){p.rects={reference:_d(x,Ct(O),p.options.strategy==="fixed"),popper:Fo(O)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(P){return p.modifiersData[P.name]=Object.assign({},P.data)});for(var h=0;h<p.orderedModifiers.length;h++){if(p.reset===!0){p.reset=!1,h=-1;continue}var N=p.orderedModifiers[h],g=N.fn,L=N.options,I=L===void 0?{}:L,T=N.name;typeof g=="function"&&(p=g({state:p,options:I,name:T,instance:y})||p)}}}},update:Nd(function(){return new Promise(function(_){y.forceUpdate(),_(p)})}),destroy:function(){m(),u=!0}};if(!ra(d,s))return y;y.setOptions(c).then(function(_){!u&&c.onFirstUpdate&&c.onFirstUpdate(_)});function A(){p.orderedModifiers.forEach(function(_){var E=_.name,x=_.options,O=x===void 0?{}:x,h=_.effect;if(typeof h=="function"){var N=h({state:p,name:E,instance:y,options:O}),g=function(){};f.push(N||g)}})}function m(){f.forEach(function(_){return _()}),f=[]}return y}}var Ld=[Jc,yd,Xc,Mc,md,cd,Cd,Wc,pd],Bd=Ed({defaultModifiers:Ld});function jo(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 jo(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)?jo(t,o):void 0}}function Od(t){return function(o){if(Array.isArray(o))return jo(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 lt(t){return lt=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},lt(t)}function ia(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function sa(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){ia(l,a,r,i,d,"next",s)}function d(s){ia(l,a,r,i,d,"throw",s)}i(void 0)})}}var ca={exports:{}},da={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})(da),function(t){var o=da.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(w,S,B){w[S]=B.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function u(w,S,B){return Object.defineProperty(w,S,{value:B,enumerable:!0,configurable:!0,writable:!0}),w[S]}try{u({},"")}catch{u=function(S,B,j){return S[B]=j}}function y(w,S,B,j){var D=S&&S.prototype instanceof h?S:h,Y=Object.create(D.prototype),Q=new $(j||[]);return d(Y,"_invoke",{value:b(w,B,Q)}),Y}function A(w,S,B){try{return{type:"normal",arg:w.call(S,B)}}catch(j){return{type:"throw",arg:j}}}r.wrap=y;var m="suspendedStart",_="suspendedYield",E="executing",x="completed",O={};function h(){}function N(){}function g(){}var L={};u(L,c,function(){return this});var I=Object.getPrototypeOf,T=I&&I(I(R([])));T&&T!==l&&i.call(T,c)&&(L=T);var P=g.prototype=h.prototype=Object.create(L);function M(w){["next","throw","return"].forEach(function(S){u(w,S,function(B){return this._invoke(S,B)})})}function W(w,S){function B(D,Y,Q,q){var Z=A(w[D],w,Y);if(Z.type!=="throw"){var ae=Z.arg,ce=ae.value;return ce&&o(ce)=="object"&&i.call(ce,"__await")?S.resolve(ce.__await).then(function(de){B("next",de,Q,q)},function(de){B("throw",de,Q,q)}):S.resolve(ce).then(function(de){ae.value=de,Q(ae)},function(de){return B("throw",de,Q,q)})}q(Z.arg)}var j;d(this,"_invoke",{value:function(D,Y){function Q(){return new S(function(q,Z){B(D,Y,q,Z)})}return j=j?j.then(Q,Q):Q()}})}function b(w,S,B){var j=m;return function(D,Y){if(j===E)throw new Error("Generator is already running");if(j===x){if(D==="throw")throw Y;return{value:a,done:!0}}for(B.method=D,B.arg=Y;;){var Q=B.delegate;if(Q){var q=C(Q,B);if(q){if(q===O)continue;return q}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(j===m)throw j=x,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);j=E;var Z=A(w,S,B);if(Z.type==="normal"){if(j=B.done?x:_,Z.arg===O)continue;return{value:Z.arg,done:B.done}}Z.type==="throw"&&(j=x,B.method="throw",B.arg=Z.arg)}}}function C(w,S){var B=S.method,j=w.iterator[B];if(j===a)return S.delegate=null,B==="throw"&&w.iterator.return&&(S.method="return",S.arg=a,C(w,S),S.method==="throw")||B!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+B+"' method")),O;var D=A(j,w.iterator,S.arg);if(D.type==="throw")return S.method="throw",S.arg=D.arg,S.delegate=null,O;var Y=D.arg;return Y?Y.done?(S[w.resultName]=Y.value,S.next=w.nextLoc,S.method!=="return"&&(S.method="next",S.arg=a),S.delegate=null,O):Y:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,O)}function k(w){var S={tryLoc:w[0]};1 in w&&(S.catchLoc=w[1]),2 in w&&(S.finallyLoc=w[2],S.afterLoc=w[3]),this.tryEntries.push(S)}function V(w){var S=w.completion||{};S.type="normal",delete S.arg,w.completion=S}function $(w){this.tryEntries=[{tryLoc:"root"}],w.forEach(k,this),this.reset(!0)}function R(w){if(w||w===""){var S=w[c];if(S)return S.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var B=-1,j=function D(){for(;++B<w.length;)if(i.call(w,B))return D.value=w[B],D.done=!1,D;return D.value=a,D.done=!0,D};return j.next=j}}throw new TypeError(o(w)+" is not iterable")}return N.prototype=g,d(P,"constructor",{value:g,configurable:!0}),d(g,"constructor",{value:N,configurable:!0}),N.displayName=u(g,f,"GeneratorFunction"),r.isGeneratorFunction=function(w){var S=typeof w=="function"&&w.constructor;return!!S&&(S===N||(S.displayName||S.name)==="GeneratorFunction")},r.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,g):(w.__proto__=g,u(w,f,"GeneratorFunction")),w.prototype=Object.create(P),w},r.awrap=function(w){return{__await:w}},M(W.prototype),u(W.prototype,p,function(){return this}),r.AsyncIterator=W,r.async=function(w,S,B,j,D){D===void 0&&(D=Promise);var Y=new W(y(w,S,B,j),D);return r.isGeneratorFunction(S)?Y:Y.next().then(function(Q){return Q.done?Q.value:Y.next()})},M(P),u(P,f,"Generator"),u(P,c,function(){return this}),u(P,"toString",function(){return"[object Generator]"}),r.keys=function(w){var S=Object(w),B=[];for(var j in S)B.push(j);return B.reverse(),function D(){for(;B.length;){var Y=B.pop();if(Y in S)return D.value=Y,D.done=!1,D}return D.done=!0,D}},r.values=R,$.prototype={constructor:$,reset:function(w){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),!w)for(var S in this)S.charAt(0)==="t"&&i.call(this,S)&&!isNaN(+S.slice(1))&&(this[S]=a)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var S=this;function B(Z,ae){return Y.type="throw",Y.arg=w,S.next=Z,ae&&(S.method="next",S.arg=a),!!ae}for(var j=this.tryEntries.length-1;j>=0;--j){var D=this.tryEntries[j],Y=D.completion;if(D.tryLoc==="root")return B("end");if(D.tryLoc<=this.prev){var Q=i.call(D,"catchLoc"),q=i.call(D,"finallyLoc");if(Q&&q){if(this.prev<D.catchLoc)return B(D.catchLoc,!0);if(this.prev<D.finallyLoc)return B(D.finallyLoc)}else if(Q){if(this.prev<D.catchLoc)return B(D.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return B(D.finallyLoc)}}}},abrupt:function(w,S){for(var B=this.tryEntries.length-1;B>=0;--B){var j=this.tryEntries[B];if(j.tryLoc<=this.prev&&i.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var D=j;break}}D&&(w==="break"||w==="continue")&&D.tryLoc<=S&&S<=D.finallyLoc&&(D=null);var Y=D?D.completion:{};return Y.type=w,Y.arg=S,D?(this.method="next",this.next=D.finallyLoc,O):this.complete(Y)},complete:function(w,S){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&S&&(this.next=S),O},finish:function(w){for(var S=this.tryEntries.length-1;S>=0;--S){var B=this.tryEntries[S];if(B.finallyLoc===w)return this.complete(B.completion,B.afterLoc),V(B),O}},catch:function(w){for(var S=this.tryEntries.length-1;S>=0;--S){var B=this.tryEntries[S];if(B.tryLoc===w){var j=B.completion;if(j.type==="throw"){var D=j.arg;V(B)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(w,S,B){return this.delegate={iterator:R(w),resultName:S,nextLoc:B},this.method==="next"&&(this.arg=a),O}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(ca);var jt=ca.exports(),Rt=jt;try{regeneratorRuntime=jt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=jt:Function("r","regeneratorRuntime = r")(jt)}function Vd(t){var o=function(n,a){if(lt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(lt(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return lt(o)==="symbol"?o:String(o)}function Ro(t,o,n){return(o=Vd(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Ut=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,f=c.clientY,u=p-i,y=f-d;u<0&&(u=0),y<0&&(y=0),u>t.size&&(u=t.size),y>t.size&&(y=t.size);var A=u/t.size*100,m=100-y/t.size*100;n("change",A,m)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),pa=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Id=pa(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Fd=pa(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function je(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))}}je(".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}"),Ut.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[Id,Fd,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Ut.__scopeId="data-v-24517fec",Ut.__file="src/picker/Saturation.vue";var Gt=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),$d={ref:"canvas"};je(".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}"),Gt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",$d,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Gt.__scopeId="data-v-78b9f4f0",Gt.__file="src/picker/Hue.vue";var zt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),u=2*c;return p.width=u,p.height=u,f.fillStyle="#ffffff",f.fillRect(0,0,u,u),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var f=parseFloat((p/t.height).toFixed(2));n("change",f)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Dd={ref:"canvas"};je(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),zt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Dd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},zt.__scopeId="data-v-24dc9656",zt.__file="src/picker/Alpha.vue";var Ht=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")}}}}),vd={class:"input"},Pd={class:"label"},Md=[".value"];function _t(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,f=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(u){f=!0,i=u}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}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 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 Ae(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){Ro(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}je(".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}"),Ht.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",vd,[e.createElementVNode("span",Pd,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,Md)])},Ht.__scopeId="data-v-d52a4d02",Ht.__file="src/picker/InputValue.vue";var ua=function(t,o,n){return[t,o*n/((t=(2-o)*n)<1?t:2-t)||0,t/2]},ma={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Wt=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(ma[o]||o).concat(ma[n]||n)},ha=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Wt(o)).concat(Wt(n)).concat(Wt(a))},it=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)},St=function(t,o,n){t=6*it(t,360),o=it(o,100),n=it(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],f=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*f)}},ya=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=ua(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=St(a,r,l),c=s.r,p=s.g,f=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(f,", ").concat(i,")");default:return"".concat(ha(St(a,r,l))).concat(Wt(255*i))}else switch(o){case"hsl":var u=ua(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*u[1]),"%, ").concat(Math.round(100*u[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var y=St(a,r,l),A=y.r,m=y.g,_=y.b;return"rgb(".concat(A,", ").concat(m,", ").concat(_,")");default:return ha(St(a,r,l))}},Yt=function(t){var o=t.r,n=t.g,a=t.b;o=it(o,255),n=it(n,255),a=it(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},ga=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},ba=function(t){var o=[];if(t.match(/^#([0-9a-fA-f]{3,4})$/g))for(var n=1;n<t.length;n++)o.push(parseInt("0x"+t[n].repeat(2)));else if(t.match(/^#([0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/g))for(var a=1;a<t.length;a+=2)o.push(parseInt("0x"+t.slice(a,a+2)));return{r:o[0],g:o[1],b:o[2],a:o[3]}},Uo=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Go(t,zo(t),n),r=ka(a);return ya(r,o,n)}return""},Ca=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},wa=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},xa=function(t){var o=_t(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Go=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ca(t),a=n.r,r=n.g,l=n.b,i=n.a;return Ae(Ae({},Yt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=xa(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=wa(t),c=s.h,p=s.s,f=s.l,u=s.a;return Ae(Ae({},ga({h:c,s:p,l:f})),{},{a:+u});default:var y=ba(t),A=y.r,m=y.g,_=y.b,E=y.a;return Ae(Ae({},Yt({r:A,g:m,b:_})),{},{a:E/255})}else switch(o){case"rgb":return Ae(Ae({},Yt(Ca(t))),{},{a:1});case"hsv":var x=xa(t);return{h:x.h,s:x.s,v:x.v,a:1};case"hsl":return Ae(Ae({},ga(wa(t))),{},{a:1});default:return Ae(Ae({},Yt(ba(t))),{},{a:1})}},zo=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},ka=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}},At=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),f=p.getContext("2d"),u=2*c;return p.width=u,p.height=u,f.fillStyle="#ffffff",f.fillRect(0,0,u,u),f.fillStyle="#ccd5db",f.fillRect(0,0,c,c),f.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),jd=["draggable"];je(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),At.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,jd)},At.__scopeId="data-v-02da71fd",At.__file="src/color-item/ColorItem.vue";var qt=e.defineComponent({name:"Colors",components:{ColorItem:At},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 Uo(a,"hex",!0)})})}}}),Rd={class:"colors"};function _a(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Fe(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?_a(Object(n),!0).forEach(function(a){Ro(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_a(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),qt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",Rd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},qt.__scopeId="data-v-0f8b52a8",qt.__file="src/picker/Colors.vue";var Kt=e.defineComponent({name:"Picker",components:{Colors:qt,Saturation:Ut,Hue:Gt,Alpha:zt,InputValue:Ht},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 Fe(Fe({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var x,O=(x=t.value)===null||x===void 0?void 0:x.trim();if(O!=null&&O!==""){var h=zo(O);return ka(Go(O,h,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(x,O){var h="";x!=null?(h=ya(Fe({},x),t.format,t.showAlpha),i.value=Fe({},x)):i.value=null,d.value=h;var N=s();JSON.stringify(x)!==JSON.stringify(N)&&JSON.stringify(x)!==JSON.stringify(O)&&n("change",h)},{immediate:!0});var c=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.h)||0}),p=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.s)||0}),f=e.computed(function(){var x;return((x=e.unref(l))===null||x===void 0?void 0:x.v)||0}),u=e.computed(function(){var x,O;return((x=e.unref(l))===null||x===void 0?void 0:x.a)!=null?(O=e.unref(l))===null||O===void 0?void 0:O.a:1}),y=e.computed(function(){return St(e.unref(c),e.unref(p),e.unref(f))}),A=e.computed(function(){return"rgb(".concat(e.unref(y).r,", ").concat(e.unref(y).g,", ").concat(e.unref(y).b,")")}),m=e.computed(function(){var x=t.format;if(t.showAlpha)switch(x){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(x){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),_=e.ref(-1),E=function(x,O,h){if(x.length!==0){var N=Go(x,O,h),g=N.h,L=N.s,I=N.v;if(!(isNaN(g)||isNaN(L)||isNaN(I))){var T=1,P=N.a;isNaN(P)||(T=P),l.value={h:g,s:L,v:I,a:T}}}};return{h:c,s:p,v:f,a:u,rgbStr:A,onSelectSaturation:function(x,O){_.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:x,v:O,a:e.unref(u)}:l.value=Fe(Fe({},e.unref(l)),{},{s:x,v:O})},onSelectHue:function(x){_.value=-1,e.unref(l)==null&&(l.value={h:x,s:e.unref(p),v:e.unref(f),a:e.unref(u)}),l.value=Fe(Fe({},e.unref(l)),{},{h:x})},onSelectAlpha:function(x){_.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(f),a:x}:l.value=Fe(Fe({},e.unref(l)),{},{a:x})},label:m,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(x){_.value=-1,d.value=x},handleChange:function(){var x,O=(x=e.unref(d))===null||x===void 0?void 0:x.trim();if(O!==""){var h=t.showAlpha,N=t.format,g=function(L,I,T){if(T)switch(I){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(L);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(L);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(L);default:return/^#([0-9a-fA-f]{4}|[0-9a-fA-F]{8})$/g.test(L)}else switch(I){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(L);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(L);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(L);default:return/^#([0-9a-fA-f]{3}|[0-9a-fA-F]{6})$/g.test(L)}}(O,N,h);g?E(O,N,h):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:_,onSelectColor:function(x,O){if(_.value=O,(x=x.trim())==="")l.value=null;else{var h=zo(x);h?E(x,h,!0):l.value=null}}}}}),Ud={class:"picker-inner"},Gd={class:"picker-header"};je(".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}"),Kt.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",Ud,[e.createElementVNode("div",Gd,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},Kt.__scopeId="data-v-6ceadec6",Kt.__file="src/picker/Picker.vue";var Xt=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"):""}})}}}),zd=[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 Sa(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);o&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,a)}return n}function Ho(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Sa(Object(n),!0).forEach(function(a){Ro(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}je(".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}"),Xt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(zd),4)},Xt.__scopeId="data-v-ceb1719c",Xt.__file="src/add-color-item/AddColorItem.vue";var Xe=null,st=e.defineComponent({name:"ColorPicker",components:{ColorItem:At,Picker:Kt,AddColorItem:Xt},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(C){return Uo(C,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var C=t.value||"",k=Array.isArray(C)?C:[C];a.value=k.map(function(V){return Uo(V,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,f,u,y,A,m=e.ref(null),_=e.ref(null),E=(s=m,c=_,p={zIndex:t.zIndex},f=e.ref({}),u={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Xe.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(C){var k=C.state,V=k.styles,$=k.placement,R=V.popper;f.value=Ho(Ho(Ho({},R),p),{},{transformOrigin:$==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(C,k){var V,$=_t(C,2),R=$[0],w=$[1],S=_t(k,2),B=S[0],j=S[1];if(R&&w&&(B!==R||j!==B)){(V=Xe)===null||V===void 0||V.destroy();var D=R.$el||R,Y=w.$el||w;e.nextTick(function(){Xe=Bd(D,Y,u)})}}),e.onBeforeUnmount(function(){var C;Xe&&((C=Xe)===null||C===void 0||C.destroy(),Xe=null)}),{instance:Xe,style:f}),x=E.style,O=function(){e.unref(m)==null&&(m.value=e.unref(b)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},h=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},N=e.ref(),g=function(){var C=sa(Rt.mark(function k(V){var $,R,w,S;return Rt.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(R=V.target,(w=($=R.dataset)===null||$===void 0?void 0:$.index)!=null&&w!==""){B.next=4;break}return B.abrupt("return");case 4:if(S=+w,e.unref(l)!==S){B.next=7;break}return B.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==S?(h(),y&&clearTimeout(y),y=setTimeout(function(){O(),clearTimeout(y)},100)):O(),l.value=S,m.value=R;case 10:case"end":return B.stop()}},k)}));return function(k){return C.apply(this,arguments)}}(),L=function(){var C=sa(Rt.mark(function k(V){var $,R,w,S,B;return Rt.wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(S=V.target,!(!(($=e.unref(N))!==null&&$!==void 0&&$.isEqualNode(S))&&(!((R=e.unref(N))===null||R===void 0)&&R.contains(S)))){j.next=4;break}return j.abrupt("return");case 4:if(B=(w=e.unref(_))===null||w===void 0?void 0:w.$el,!(B!=null&&B.contains(S))){j.next=8;break}return j.abrupt("return");case 8:A&&clearTimeout(A),A=setTimeout(function(){e.unref(d)&&h()},0);case 10:case"end":return j.stop()}},k)}));return function(k){return C.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(O(),clearTimeout(A))});var I,T=e.ref(t.max>e.unref(a).length),P=e.computed(function(){return typeof t.popupContainer=="string"||lt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),M=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),W=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(_)]},function(){e.nextTick(function(){var C,k;(C=e.unref(N))===null||C===void 0||C.setAttribute("pick-colors-theme",e.unref(W)),(k=e.unref(_))===null||k===void 0||(k=k.$el)===null||k===void 0||k.setAttribute("pick-colors-theme",e.unref(W))})},{immediate:!0}),e.provide("theme",{theme:W});var b=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",L,!1),t.showPicker&&O()}),e.onUnmounted(function(){document.removeEventListener("mouseup",L,!1),y&&(clearTimeout(y),y=null),A&&(clearTimeout(A),A=null)}),{valueList:a,colorItemSelected:function(C){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===C},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:T,onPickerChange:function(C){var k=e.unref(l),V=e.unref(a).slice(),$=e.unref(a).length;if(k!=null){k>=0?V[k]=C:(l.value=$,V.push(C));var R="";R=Array.isArray(t.value)||t.addColor?V:C,t.value===void 0?a.value=Array.isArray(R)?R:[R]:(n("update:value",R),n("change",R,C,k)),t.addColor&&$>=t.max&&(T.value=!1,n("overflowMax"))}},colorPicker:N,onColorClick:g,pickerRef:_,onColorItemDragStart:function(C){C.dataTransfer.effectAllowed="move";var k=C.target;I=+k.dataset.index},onColorItemDragOver:function(C){},onColorItemDrop:function(C){var k=+C.target.dataset.index,V=Od(e.unref(a)),$=V[I];V.splice(I,1);var R=V.slice(0,k),w=V.splice(k),S=R.concat([$]).concat(w);n("update:value",S),n("change",S,S[I],I)},colorItemsRef:b,pickerStyle:x,values:r,teleportDisabled:M,toPopupContainer:P}}});je(".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)}"),st.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(f){return t.colorItemsRef[p]=f},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},st.__scopeId="data-v-3c43ade8",st.__file="src/ColorPicker.vue";const Hd=e.defineComponent({name:"ColorPick",components:{PickColors:st,AInput:v.Input},props:{value:{type:String,require:!0}},emits:["change"],setup(t,o){const n=e.computed({get:()=>t.value,set:r=>{o.emit("change",r)}});return{colorValue:n,onChangColor:r=>{n.value=r.hex}}}}),Mf="",Wd={class:"color-pick"};function Yd(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Wd,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const qd=ee(Hd,[["render",Yd],["__scopeId","data-v-e2113f43"]]),Kd=e.defineComponent({name:"ColorGroupPick",components:{PickColors:st},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{v.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),jf="",Xd={class:"color-group-pick"};function Qd(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",Xd,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const Jd=ee(Kd,[["render",Qd],["__scopeId","data-v-b2be8322"]]),Zd=e.defineComponent({name:"FormGroup",components:{Draggable:ft,AppstoreAddOutlined:Sn,MinusCircleOutlined:bl,PickColors:st,InputNumber:Rn,PlusCircleOutlined:kl},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 f;const c=(f=t.value)==null?void 0:f.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const u=c[0];if(Object.prototype.toString.call(u)==="[object Object]"){const y=Object.keys(u),A={};y.forEach(m=>{A[m]=""}),c.push(A)}else typeof u=="string"&&c.push(u);n.value=c}else v.message.warn("已达到最大上限")},useComponentType:c=>({input:"aInput",select:"aSelect",color:"pickColors","input-number":"inputNumber",switch:"aSwitch"})[c],onValueChange:(c,p,f)=>{var y;const u=(y=t.value)==null?void 0:y.slice();if(Array.isArray(u)){const A=c==null?void 0:c.target,m=(A==null?void 0:A.value)!=null?A==null?void 0:A.value:c;f?u[p][f]=m:u[p]=m,n.value=u}},onDelete:c=>{var f;const p=(f=t.value)==null?void 0:f.slice();if(Array.isArray(p)){if(p.length===1){v.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),Rf="",ep={class:"form-group"},tp={class:"form-row"},op={key:0,class:"label"},np={key:1,class:"label"},ap={class:"icon-group"};function rp(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",ep,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:u},[Array.isArray(f.label)?(e.openBlock(),e.createElementBlock("span",op,e.toDisplayString(f.useLabelIndex?f.label[p]+(p+1):f.label[p]),1)):(e.openBlock(),e.createElementBlock("span",np,e.toDisplayString(f.useLabelIndex?f.label+(p+1):f.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(f.type)),e.mergeProps({class:"value",[t.formatTypeValue(f.typeValue)||""]:typeof c=="string"?c:c[f.value]??f.defaultValue,style:{width:!["color","switch"].includes(f.type)&&t.format.length>1?"110px":""}},f.props,{theme:t.theme,"use-blur-event":!1,onChange:y=>t.onValueChange(y,p,f.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",ap,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:f=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const lp=ee(Zd,[["render",rp],["__scopeId","data-v-f0c0ab4d"]]),ip=e.defineComponent({name:"Textarea",props:{value:{type:String,default:""},disabled:{type:Boolean,default:!1}},components:{ATextarea:v.Textarea},emits:["change"],setup(t,{emit:o}){return{onTextareaChange:a=>{o("change",a.target.value)}}}});function sp(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const cp=ee(ip,[["render",sp]]),dp=e.defineComponent({name:"PropsToForm",components:{Input:uc,InputNumber:Rn,RadioGroup:bc,Select:xc,Switch:Sc,ColorPick:qd,ColorGroupPick:Jd,FormGroup:lp,Textarea:cp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Et),n=e.inject(Jt),a=e.inject(Zt),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:f,value:u}=s;if(c==null||typeof c!="object")return;const{valueProp:y="value",changeValueEventName:A="change",events:m}=p;c[f]={...p,valueProp:y,value:u,events:{[A]:(_,E=!0)=>{l(E?{[f]:_}:{})},...m}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:oe.reduce(s,(c,p,f)=>{const u=dc[f];if(Array.isArray(u)){const y=u.find(A=>{const{onlyType:m,excludeType:_}=A;return m==null&&_==null?!0:m?Oe(e.unref(r),m):_?!Oe(e.unref(r),_):!1});y&&i({result:c,value:p,key:f,mapAttributeProp:y})}else i({result:c,value:p,key:f,mapAttributeProp:u});return c},{})}),lowerCaseIncludes:Oe}}}),Uf="",pp={class:"props-to-form"},fp={class:"label"},up={class:"component-wrapper"};function mp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",fp,e.toDisplayString(i.label),1),e.createElementVNode("div",up,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const hp=ee(dp,[["render",mp],["__scopeId","data-v-c6fb2484"]]);function yp(){return new Worker("/assets/editor.worker-02df2e61.js")}function gp(){return new Worker("/assets/json.worker-867823a6.js")}function bp(){return new Worker("/assets/ts.worker-7254b425.js")}const Cp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new gp:i==="typescript"||i==="javascript"?new bp:new yp}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=Va.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(oe.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),Gf="",wp={class:"editor",ref:"dom"};function xp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",wp,null,512)}const Aa=ee(Cp,[["render",xp],["__scopeId","data-v-71e88372"]]),kp=[{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}],_p=e.defineComponent({name:"TableColumnConfig",components:{ATable:v.Table,AModal:v.Modal,ACheckbox:v.Checkbox,AInput:v.Input,AInputNumber:v.InputNumber,ASelect:v.Select,ASelectOption:v.SelectOption,Editor:Aa},setup(){const t=e.inject(ve),o=e.computed(()=>{var m;return!!((m=e.unref(t))!=null&&m.isGroupTable)}),n=e.computed(()=>{var m;return((m=e.unref(t))==null?void 0:m.graphicConfig)||{}}),a=e.computed(()=>{var m;return((m=e.unref(t))==null?void 0:m.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var _,E,x;let m=[];if(r.value=[],!o.value)m=((_=e.unref(n))==null?void 0:_.queryColumnList)||[];else{const O=((E=e.unref(n))==null?void 0:E.rowHeaderList)||[],h=((x=e.unref(n))==null?void 0:x.indicators)||[];m=[...O,...h]}m.forEach(O=>{var N;let h=(N=e.unref(a))==null?void 0:N.find(g=>g.prop===O.name);h||(h={label:O.label,prop:O.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:kp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(m,_,E)=>{m&&_&&(l=m,i=_,d.value=m[_]||"",c.value=!0,s.value=E)},onEditorChange:m=>{try{d.value=m}catch(_){console.error(_)}},changeRenderBool:(m,_)=>{m.style=_.target.checked,m.style?m.renderBool===void 0&&(m.renderBool=!1):delete m.renderBool}}}}),zf="",Sp={class:"table-column-config"};function Ap(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),f=e.resolveComponent("a-table"),u=e.resolveComponent("editor"),y=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Sp,[e.createVNode(f,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:A,text:m,record:_})=>[A.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:E=>t.changeRenderBool(_,E),checked:_.style},null,8,["onChange","checked"])):A.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:_.width,"onUpdate:value":E=>_.width=E,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):A.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[_.style?(e.openBlock(),e.createBlock(d,{key:1,value:_.renderText,"onUpdate:value":E=>_.renderText=E,readOnly:!0,onClick:E=>t.renderSave(_,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):A.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[_.style?(e.openBlock(),e.createBlock(d,{key:1,value:_.headerTemplate,"onUpdate:value":E=>_.headerTemplate=E,readOnly:!0,onClick:E=>t.renderSave(_,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(m),1)],64))],64)):A.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:_.headerAlign,"onUpdate:value":E=>_.headerAlign=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:_.align,"onUpdate:value":E=>_.align=E},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:_.fixed,"onUpdate:value":E=>_.fixed=E},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:_.dataFormat,"onUpdate:value":E=>_.dataFormat=E,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[_.dataFormat&&_.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:_.retentiondigit,"onUpdate:value":E=>_.retentiondigit=E,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(y,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=A=>t.editorVisible=A),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(u,{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 Np=ee(_p,[["render",Ap],["__scopeId","data-v-afebddc0"]]),Tp=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:hp,TableColumnConfig:Np,Editor:Aa,AFormItem:v.FormItem,ASelect:v.Select,ASelectOption:v.SelectOption,ACollapse:v.Collapse,ACollapsePanel:v.CollapsePanel,ASwitch:v.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Et),r=e.inject(Qo),l=e.inject(Jt),i=e.inject(Zt),d=e.inject(Xo),s=N=>{l({...on[N]},!1),d()},c=e.computed(()=>{var N;return(N=e.unref(a))==null?void 0:N.type}),p=["showTotalBool","totalName","expandAll"],f=e.computed(()=>cc.map(N=>{const{props:g,title:L,enableProps:I,onlyType:T,excludeType:P}=N,M=[];g.forEach(C=>{typeof C=="string"&&(p.includes(C)?t.isGroupTable&&M.push(C):M.push(C))});let W,b;return t.componentType==="table"&&(T!=null&&T.includes(t.componentType))?(W=typeof I=="string"&&r.value?r.value[I]:void 0,b=oe.pick(e.unref(r),M)):(W=typeof I=="string"&&a.value?a.value[I]:void 0,b=oe.pick(e.unref(a),M)),{title:L,enableProps:W,enablePropsName:I,onlyType:T,excludeType:P,props:b}}).filter(({props:N})=>Object.keys(N).length>0)),u=(N,g)=>{const{onlyType:L,excludeType:I}=N;return L==null&&I==null?!0:L?Oe(g,L):I?!Oe(g,I):!1},y=(N,g)=>(g==null||g.stopPropagation(),N),A=(N,g)=>{g!=null&&l({[g]:N})},m=e.computed(()=>JSON.stringify(e.unref(a),null,2)),_=N=>{try{const g=JSON.parse(N||"{}");l(g,!1)}catch(g){console.error(g)}},E=e.ref(""),x=N=>{try{E.value=N}catch(g){console.error(g)}},O=(N,g)=>{try{i({[g]:N})}catch(L){console.error(L)}},h=e.computed(()=>{var N;return["customGraph"].includes((N=e.unref(a))==null?void 0:N.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:m,updateComponentOptions:_,tableOptions:r,optionCode:E,onEditorChange:x,tableEditorChange:O,onSwitchClick:y,onSwitchChange:A,detailPropsGroups:f,isRenderForm:u,isShowOptionEditor:h}}}),Hf="",Wf="",Ep={class:"style-group"};function Lp(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),f=e.resolveComponent("a-collapse-panel"),u=e.resolveComponent("editor"),y=e.resolveComponent("a-collapse"),A=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Ep,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=m=>t.type=m),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(y,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=m=>t.activePanel=m)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,m=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[t.isRenderForm(m,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[m.title?(e.openBlock(),e.createBlock(f,{header:m.title,key:m.title},{extra:e.withCtx(()=>[typeof m.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:m.enableProps,onChange:_=>t.onSwitchChange(_,m.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:m.props,disabled:typeof m.enableProps=="boolean"?!m.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(f,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(u,{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(y,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=m=>t.tablePanel=m)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,m=>{var _;return e.openBlock(),e.createElementBlock(e.Fragment,{key:m.title},[m.title&&((_=m.onlyType)!=null&&_.includes(t.componentType))?(e.openBlock(),e.createBlock(f,{header:m.title,key:m.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:m.props,disabled:typeof m.enableProps=="boolean"?!m.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(f,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(A)]),_:1}),e.createVNode(f,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(u,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=m=>t.tableEditorChange(m,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(f,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(u,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=m=>t.tableEditorChange(m,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Bp=ee(Tp,[["render",Lp],["__scopeId","data-v-2fb3e2ad"]]),Op=e.defineComponent({name:"Card",components:{CloseOutlined:go},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(Ue),a=e.inject(Lt),r=e.inject(en),l=e.computed(()=>{var b;return(b=e.unref(n))==null?void 0:b.filter(C=>C.keyName!=="")}),i=e.computed(()=>{var k,V;const b=[],C=(k=e.unref(l))==null?void 0:k.find($=>{var R;return $.id===((R=t.control)==null?void 0:R.id)});if(C){const $=C.type,R=oe.pick(C,["value","startTime","endTime"]);(V=Object.keys(R))!=null&&V.length||(R.value="");for(const w in R)if(Object.prototype.hasOwnProperty.call(R,w)){const S=e.unref(r)[w];if(Array.isArray(S)){const B=S.find(j=>Oe($,j.onlyType));B&&b.push({label:B.label,value:w})}else b.push({label:S.label,value:w})}}return b}),d=()=>{o("delete",t.index),s(t.control.id)};function s(b){const C=e.unref(l).find(k=>k.id===b);if(C){const{type:k,id:V,events:$=[]}=C,R=$t(k),w=$.findIndex(S=>{var B;return S.on===R&&S.target===((B=e.unref(m))==null?void 0:B.id)&&S.emit==="refreshData"});w!==-1&&($.splice(w,1),a({id:V,events:$}))}}const c=b=>{const C={...t.control};if(C.id=b,b){const k=e.unref(l).find(V=>V.id===b);k&&(C.keyName=k.keyName,x(k,b))}delete C.prop,o("update",C,t.index)},p=e.ref(""),f=()=>{p.value=t.control.id},u=b=>{o("update",{...t.control,prop:b},t.index)},y=b=>{o("update",{...t.control,rule:b},t.index)},A=b=>{const C={...t.control};b==null?delete C.mode:C.mode=b,delete C.conditionLabel,delete C.conditionName,delete C.conditionKey,delete C.conditionValueType,o("update",C,t.index)},m=e.inject(ve),_=e.inject(pe),E=e.computed(()=>{var Q;const{classificationList:b=[],seriesList:C=[],leftAxisList:k=[],rightAxisList:V=[],indicators:$=[],rowHeaderList:R=[],queryColumnList:w=[]}=e.unref(_),S=oe.cloneDeep([...b,...C,...k,...V,...$,...R,...w]);if(S!=null&&S.length)for(const q of S)q.id=q.name;const B=[{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(q=>({...q,id:q.name,label:q.title||q.label})),...S];((Q=e.unref(m))==null?void 0:Q.type)==="ecanSelect"&&B.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const j=new Map,D=B.length;for(let q=0;q<D;q++){const Z=B[q],{id:ae}=Z||{};j.set(ae,Z)}return[...j].map(([q,Z])=>Z)});function x(b,C){var w;const{type:k,id:V,events:$=[]}=b,R=$t(k);if(e.unref(p)&&C!==e.unref(p)){const{controlList:S=[]}=e.unref(_);S.find(B=>B.id===e.unref(p))||s(e.unref(p))}$.find(S=>{var B;return S.on===R&&S.target===((B=e.unref(m))==null?void 0:B.id)&&S.emit==="refreshData"})||a({id:V,events:[...$,{on:R,target:(w=e.unref(m))==null?void 0:w.id,emit:"refreshData"}].reverse()})}const O=(b,C)=>{if(b){const{label:k,name:V,id:$,genericType:R,indexCode:w,typeGuid:S}=C||{};o("update",{...t.control,conditionKey:$,conditionLabel:k,conditionName:V,conditionValueType:R,indexCode:w,typeGuid:S},t.index)}else{const k={...t.control};delete k.conditionLabel,delete k.conditionName,delete k.conditionKey,delete k.conditionValueType,o("update",k,t.index)}},h=(b,C)=>{var k;return(k=C==null?void 0:C.keyName)==null?void 0:k.toLowerCase().includes(b==null?void 0:b.toLowerCase())},N=(b,C)=>{var k;return(k=C==null?void 0:C.label)==null?void 0:k.toLowerCase().includes(b==null?void 0:b.toLowerCase())},g=e.computed(()=>{const b=e.unref(E).find(k=>k.id===t.control.conditionKey);let C="";return b&&(C=(b==null?void 0:b.genericType)||""),C==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:C==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:C==="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"}]:[]}),L=e.computed(()=>{let b=!1;const{id:C=""}=t.control;if(C){const k=e.unref(l).find($=>$.id===C),V=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];Oe(k==null?void 0:k.type,V)&&(b=!0)}return b}),I=e.computed(()=>{let b=!1;const{id:C=""}=t.control;if(C){const k=e.unref(l).find(V=>V.id===C);(k==null?void 0:k.type)==="ecanRangePicker"&&(b=!0)}return b}),T=e.computed(()=>{let b=!1;const{id:C=""}=t.control;if(C){const k=e.unref(l).find(V=>V.id===C);["ecanDatePicker","ecanRangePicker"].includes(k==null?void 0:k.type)&&(b=!0)}return b});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:f,onPropChange:u,onModeChange:A,onRuleChange:y,conditionKeyOptions:E,onConditionKeyChange:O,idFilterOption:h,filterOption:N,onFormatChange:b=>{o("update",{...t.control,format:b},t.index)},onModelPropChange:b=>{o("update",{...t.control,modelKey:b.target.value},t.index)},ruleOption:g,isShowProp:I,isShowFormat:T,isShowModelProp:L,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"}]}}}),Yf="",qf="",Vp={class:"control-card"};function Ip(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Vp,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:2,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Fp=ee(Op,[["render",Ip],["__scopeId","data-v-963d6c0e"]]),$p=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:Fp,AButton:v.Button},setup(t,{expose:o}){const n=e.inject(Ue),a=e.inject(pe),r=e.inject(Le),l=e.computed(()=>{var u;const f=((u=e.unref(a))==null?void 0:u.controlList)||[];for(const y of f)y.conditionKey&&!Eo(y,"rule")&&(y.prop==="startTime"?y.rule="GREATER_EQUAL":y.prop==="endTime"?y.rule="LESS_EQUAL":y.rule="EQUAL");return f}),i=e.ref(null),d=f=>{const u={...e.unref(a),...f,sqlConditions:Mn({...e.unref(a),...f},e.unref(n))};r(u)},s=()=>{var u;const f=(u=e.unref(l))==null?void 0:u.slice();f.push({}),d({controlList:f})},c=f=>{var y;const u=(y=e.unref(l))==null?void 0:y.slice();u.splice(f,1),d({controlList:u})},p=(f,u)=>{var A;const y=(A=e.unref(l))==null?void 0:A.slice();y[u]=f,d({controlList:y})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),Kf="",Dp={class:"control-group"},vp={class:"control-group-header"},Pp={class:"control-group-content"};function Mp(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",Dp,[e.createElementVNode("div",vp,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",Pp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const jp=ee($p,[["render",Mp],["__scopeId","data-v-365e5dd8"]]),Rp=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:f}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,f)=>{a(p),c?f<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:f,calcType:u="COLUMN",builtInFormula:y,builtInValueSource:A,builtInCalcWay:m,formula:_,conditions:E,aggregate:x}=i;let O;return E&&(O=r(E)),{label:d.trim(),columnName:s,location:c,show:p,calcType:u,hrpIndexCode:f,aggregate:x,builtInFormula:y,builtInValueSource:A,builtInCalcWay:m,formula:_,conditions:O}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:f="1",layer:u,chartType:y,classificationList:A=[],seriesList:m=[],leftAxisList:_=[],rightAxisList:E=[],queryColumnList:x=[],indicators:O=[],dataSourceId:h,idxLibMode:N,preview:g=!1}=i||{};u==null&&(Oe(d,"table")?u="1":u="2");let L;if(Array.isArray(A)&&A.length>0){const M=A.length;for(let W=0;W<M;W++){const b=A[W]||{},{label:C="",name:k="",show:V=!1,sort:$,customGroup:R,conditions:w}=b;if(V||M===1){L={label:C.trim(),columnName:k,show:V,sort:$,customGroup:R,conditions:r(w)};break}}}let I;if(Array.isArray(m)&&m.length>0){const M=m.length;for(let W=0;W<M;W++){const b=m[W]||{},{label:C="",name:k="",show:V=!1,sort:$,customGroup:R,conditions:w}=b;if(V||M===1){I={label:C.trim(),columnName:k,show:V,sort:$,customGroup:R,conditions:r(w)};break}}}const T=[];x==null||x.forEach(M=>{T.push(o(M))});const P=[];if(_==null||_.forEach(M=>{M.location="LEFT",P.push(l(M))}),E==null||E.forEach(M=>{M.location="RIGHT",P.push(l(M))}),O==null||O.forEach(M=>{M.location="LEFT",P.push(l(M))}),!(u==="1"&&T.length===0)&&!(u==="2"&&P.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:f,layer:u,chartType:y,classification:L,series:I,indicatorList:P,queryColumns:T,pageFlag:!0,sqlConditions:[],dataSourceId:h,idxLibMode:N,preview:g})}catch(M){console.error(M)}}},Na=(t,o)=>{const n={dayjs:ie,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},Qt=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,f=c.match(p);for(let u=0;u<f.length;u++){const y=f[u],A=l[y];A!=null&&(c=c.replace(y,A))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Na(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},Nt=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Na(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},Up=(t,o,n)=>{switch(t.type){case"bar":return Gp(t,o,n);case"line":return zp(t,o,n);case"pie":return Hp(t,o,n);case"comboGraph":return Wp(t,o,n);default:return{}}},Gp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,f=[];for(let u=0;u<p;u++){const y={...c[u],type:"bar",barWidth:t.barWidth};t.isStack&&(y.stack="stack"),y.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},f.push(y)}return f}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let f="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");for(let y=0;y<p;y++){const{marker:A,seriesName:m,name:_,value:E,data:x}=c[y]||{};y===0&&(f+=`${_}<br/>`),f+=Qt(u,{textData:{marker:A,name:_,value:E,a:m,b:_,c:E,...x}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Nt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},zp=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let f=0;f<p;f++)c.push({type:"line",...i[f],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 f="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");for(let y=0;y<p;y++){const{marker:A,seriesName:m,name:_,value:E,data:x}=c[y]||{};y===0&&(f+=`${_}<br/>`),f+=Qt(u,{textData:{marker:A,name:_,value:E,a:m,b:_,c:E,...x}},{useNewline:!0,useSpace:!0}),f+="<br/>"}return f}},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 Nt(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 Nt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},Hp=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:f}=l||{};return Qt(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...f}},{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:Yi(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:{}}}]}},Wp=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let f=0;f<c;f++){const u=p[f];s.push({type:u==null?void 0:u.type,yAxisIndex:u==null?void 0:u.axisIndex,...r[f]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Nt(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");const u=t.seriesTypes;for(let y=0;y<c;y++){const A=u[y],{tooltipFormatter:m}=A||{},{marker:_,seriesName:E,name:x,value:O,data:h}=s[y]||{};y===0&&(p+=`${x}<br/>`),p+=Qt(m||f,{textData:{marker:_,name:x,value:O,seriesName:E,a:E,b:x,c:O,...h}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},Yp=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let u=0;u<d;u++){const y=a[u],{label:A,value:m}=y,_={...t[0],value:t[0][m]};r.add(A),p.push(_)}const f=t[0][n]||"";l.set(f,p)}else for(let p=0;p<i;p++){const f=t[p],u=f[n];r.add(u);for(let y=0;y<d;y++){const A=a[y],{label:m,value:_}=A,E={...f,value:f[_]};if(l.has(m)){const x=l.get(m);x.push(E),l.set(m,x)}else l.set(m,[E])}}const s=Array.from(r),c=[];for(const[p,f]of l)c.push({name:p,data:f});return{dimensions:s,dataset:c}},qp=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const f=t[p],u=f[n]||"",y=f[a]||"",A=f[r]||"";if(l.add(u),i.has(A)){const m=i.get(A);m.push({name:u,value:y,...f}),i.set(A,m)}else i.set(A,[{name:u,value:y,...f}])}const s=Array.from(l),c=[];for(const[p,f]of i)c.push({name:p,data:f});return{dimensions:s,dataset:c}},Kp=e.defineComponent({name:"ChartGraph",components:{ASpin:v.Spin},props:{graphicConfig:{type:Object,default:()=>{}},chartsOptions:{type:Object,default:()=>{}}},setup(t,{expose:o}){const n=e.computed(()=>t.chartsOptions?e.unref(t.chartsOptions):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Te);let l=null;const i=e.inject(Ee)||"",d=e.inject(pe)||{},s=e.inject(Et)||{},c=e.ref(null),p=e.ref(null),f=e.ref(),u=e.ref(!1),y=e.ref(!1),A=e.computed(()=>y.value?Da:12),m=e.ref({}),_=e.ref(),E=e.computed(()=>{const T=e.unref(n.value);if((T==null?void 0:T.type)==="customGraph")return _.value;const P=Up(T,e.unref(m),A.value);return{toolbox:{show:T.toolboxShow,left:T.toolboxLeft,top:T.toolboxTop,itemSize:T.toolboxItemSize,itemGap:T.toolboxItemGap,feature:{myDataZoom:{show:y.value?!1:T.toolboxDataZoomShow,title:"放大",icon:"path://M932.42 902.246667L792 761.793333A403.84 403.84 0 0 0 896 490.666667c0-223.86-181.473333-405.333333-405.333333-405.333334S85.333333 266.806667 85.333333 490.666667s181.473333 405.333333 405.333334 405.333333a403.84 403.84 0 0 0 271.126666-104l140.453334 140.453333a21.333333 21.333333 0 0 0 30.173333-30.173333zM128 490.666667c0-200.293333 162.373333-362.666667 362.666667-362.666667s362.666667 162.373333 362.666666 362.666667-162.373333 362.666667-362.666666 362.666666-362.666667-162.373333-362.666667-362.666666z m512 0a21.333333 21.333333 0 0 1-21.333333 21.333333H512v106.666667a21.333333 21.333333 0 0 1-42.666667 0V512H362.666667a21.333333 21.333333 0 0 1 0-42.666667h106.666666V362.666667a21.333333 21.333333 0 0 1 42.666667 0v106.666666h106.666667a21.333333 21.333333 0 0 1 21.333333 21.333334z",onclick(){}},myInfo:{show:T.toolboxInfoShow,title:"说明信息",icon:"path://M512.50142 958.397886c-119.320573 0-231.499491-46.465265-315.871087-130.837884C112.258737 743.188406 65.792449 631.010511 65.792449 511.688915c0-119.319549 46.466288-231.499491 130.837884-315.871087C281.002952 111.445208 393.180847 64.979944 512.50142 64.979944s231.499491 46.465265 315.871087 130.837884c84.372619 84.372619 130.837884 196.551538 130.837884 315.871087 0 119.321596-46.465265 231.499491-130.837884 315.871087C744.000911 911.932622 631.821993 958.397886 512.50142 958.397886zM512.50142 105.962334c-223.718271 0-405.726581 182.00831-405.726581 405.726581s182.00831 405.726581 405.726581 405.726581c223.718271 0 405.727605-182.00831 405.727605-405.726581S736.220714 105.962334 512.50142 105.962334z M510.150886 775.953647c-18.107403 0-32.745798-14.678304-32.745798-32.785707L477.405087 452.191846c0-18.108426 14.638395-32.785707 32.745798-32.785707 18.107403 0 32.745798 14.678304 32.745798 32.785707l0 290.976094C542.896684 761.275343 528.258289 775.953647 510.150886 775.953647z M511.357364 296.458969m-45.080731 0a44.054 44.054 0 1 0 90.161463 0 44.054 44.054 0 1 0-90.161463 0Z",onclick(){}}}},title:{text:T.titleText,subtext:T.titleSubtext,left:"center"},grid:{top:T.gridTop,bottom:T.gridBottom,left:T.gridLeft,right:T.gridRight,containLabel:T.gridContainLabel},color:T.colors,...P}}),x=(T=[],P,M=!1)=>{const W=M?P:null;m.value=Yp(T,W)},O=(T=[],P)=>{m.value=qp(T,P)},h=async()=>{var T,P,M;try{const W=Rp({graphicConfig:e.unref(a.value),type:(T=e.unref(n.value))==null?void 0:T.type,request:r,indicatorToken:i});u.value=!0;const b=await W(),{columns:C=[],rows:k=[]}=((P=b==null?void 0:b.data)==null?void 0:P.data)??{};if(((M=e.unref(n.value))==null?void 0:M.type)==="pie"){let V=[];if(C.length>0){const $=C[0],R=C[1];V=k.map(w=>({name:w[$],value:w[R]}))}O(V)}else{let V;C.length>0&&(V={name:C[0],types:C.slice(1).map($=>({label:$,value:$}))}),x(k,V,!0)}}catch(W){console.error(W)}finally{u.value=!1}},N={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},g=()=>{e.unref(m).dataset.length===0?f.value.setOption(N):f.value.setOption(E.value)},L=()=>{e.unref(n.value).type!=="customGraph"&&h()},I=()=>{var T;(T=f.value)==null||T.resize()};return e.watch(E,()=>{g()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,T=>{try{const P=eval;_.value=P(T)}catch(P){console.error(P)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(I),l.observe(p.value)),f.value=$a.init(c.value)}),e.onBeforeUnmount(()=>{f.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:L}),{echartRef:c,loading:u}}}),Xf="",Xp={class:"ecan-chart-graph",ref:"chartWrapRef"},Qp={style:{width:"100%",height:"100%"},ref:"echartRef"};function Jp(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",Xp,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",Qp,null,512)]),_:1},8,["spinning"])],512)}const Ta=ee(Kp,[["render",Jp],["__scopeId","data-v-8049fed2"]]),Zp=e.defineComponent({name:"DataConfig",components:{DataGroup:sc,StyleGroup:Bp,ChartGraph:Ta,ATabs:v.Tabs,ATabPane:v.TabPane,ControlGroup:jp},setup(){var N;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(ve),r=e.inject(Ko),l=e.inject(pe),i=e.inject(Ue),d=e.inject(tn),s=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const g=oe.cloneDeep(e.unref(a));p(g);const L=oe.pick(g,oe.without(Object.keys(g),"position","top","left","width","height"));Oe(g.type,s)?(L.height=g.height,L.width=g.width):L.height="290px";const I=oe.cloneDeep(e.unref(l));return I.pageMode="design",I.componentList=i,I.preview=!0,I.pageConfig=d,{...L,graphicConfig:I,toolboxShow:!1,sourceLeft:g.left,sourceTop:g.top}});function p(g){var L,I,T,P;["#ffffff","#fff"].includes((L=g==null?void 0:g.color)==null?void 0:L.toLowerCase())&&(g.color="#000"),["#ffffff","#fff"].includes((I=g==null?void 0:g.variableColor)==null?void 0:I.toLowerCase())&&(g.variableColor="#000"),["#ffffff","#fff"].includes((T=g==null?void 0:g.increaseColor)==null?void 0:T.toLowerCase())&&(g.increaseColor="#000"),["#ffffff","#fff"].includes((P=g==null?void 0:g.declineColor)==null?void 0:P.toLowerCase())&&(g.declineColor="#000")}const f=e.computed(()=>{let g=!0;return Oe(e.unref(c).type,s)&&(g=!1),g}),u=e.computed(()=>{var g;return(g=e.unref(c))==null?void 0:g.type}),y=e.computed(()=>{var g;return!!((g=e.unref(c))!=null&&g.isGroupTable)}),A=g=>{const L=g==="1";L&&u.value==="table"&&h(),window.changeShowTable&&window.changeShowTable(L),g==="3"&&O()},m=e.ref(),_=e.inject(Te),E=e.unref(e.inject(Ee)),x=(N=window==null?void 0:window.config)==null?void 0:N.pageId;function O(){var W;const{leftAxisList:g=[],rightAxisList:L=[],queryColumnList:I=[],indicators:T=[]}=e.unref(l),P=[...g,...L,...I,...T],M={};for(const b of P){const{id:C="",indexCode:k=""}=b;C&&!Eo(b,"calcType")&&!M[C]&&(M[C]=k)}if((W=Object.keys(M))!=null&&W.length){const b=[];for(const C in M)b.push(new Promise((k,V)=>{_.post(`${we}/diagram/hrpIndexWithComplex`,{pageId:x,indexGuid:C,indexCode:M[C],dataSourceId:""},{headers:{Authentication:E,operateContext:"ygt"}}).then($=>{var S;const{success:R,data:w=[]}=$.data;R&&((S=w==null?void 0:w.dataViewColumns)!=null&&S.length)?k(w.dataViewColumns):V(w)}).catch($=>{V($)})}));Promise.all(b).then(C=>{if(C!=null&&C.length){const k=C.reduce((V,$)=>V.filter(R=>$.find(w=>w.typeGuid===R.typeGuid)));m.value=k.filter(V=>V.typeGuid)}})}}const h=()=>{var L;let g;r&&u.value==="table"?g=window.updateConfig:g=(L=e.unref(n))==null?void 0:L.refreshData,typeof g=="function"&&g()};return e.provide(Xo,h),e.watch(l,()=>{h()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:u,isGroupTable:y,onChange:A,component:c,fullWidth:f,renderUsedComponents:i,intersection:m}}}),Qf="",ef={class:"data-config"},tf={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function of(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),f=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",ef,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=u=>t.activeKey=u),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",tf,null,512)):e.withDirectives((e.openBlock(),e.createBlock(f,{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 nf=ee(Zp,[["render",of],["__scopeId","data-v-37d75328"]]),af=e.defineComponent({name:"IndicatorLibrary",components:{DataList:Gl,DataConfig:nf},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var N;return((N=e.unref(i))==null?void 0:N.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?oe.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?oe.cloneDeep(e.unref(i).chartsOptions):e.ref(oe.cloneDeep(on.line));p=e.ref(p);let f=e.unref(i).tableOptions?oe.cloneDeep(e.unref(i).tableOptions):e.ref(oe.cloneDeep(va));f=e.ref(f);const u=e.ref([]),y=N=>{u.value=N},A=N=>{c.value={...e.unref(c),...e.unref(N)}},m=(N,g=!0)=>{g?p.value={...e.unref(p),...e.unref(N)}:p.value={...e.unref(N)}},_=N=>{f.value={...e.unref(f),...e.unref(N)}},E=()=>u,x=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=oe.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=oe.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},O=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(f),tableColumns:e.unref(d)});window.getIndicatorData=O,t.request&&e.provide(Te,t.request),e.provide(qo,{setDataList:y,getDataList:E});const h=N=>{n("updateUsedComponent",N)};return e.provide(ve,i),e.provide(pe,c),e.provide(Et,p),e.provide(Qo,f),e.provide(eo,r),e.provide(Ko,s),e.provide(Ee,l),e.provide(Le,A),e.provide(Jt,m),e.provide(Zt,_),e.provide(Ue,t.renderUsedComponentList),e.provide(Lt,h),e.provide(en,t.mapAttributeProps),e.provide(tn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:x}),{isUpdate:a}}}),Jf="",rf={key:0,class:"config-modal"},lf={class:"config-modal-left"},sf={class:"config-modal-right"};function cf(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",rf,[e.createElementVNode("div",lf,[e.createVNode(i)]),e.createElementVNode("div",sf,[e.createVNode(d)])]))}const Ea=Yo(ee(af,[["render",cf],["__scopeId","data-v-23d542ce"]])),La=Yo(Ta),Ba=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:La,EcanIndicatorLibrary:Ea},Symbol.toStringTag,{value:"Module"})),df={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Ba).forEach(a=>{const r=Ba[a];r.install&&t.use(r)})}};fe.EcanChartGraph=La,fe.EcanIndicatorLibrary=Ea,fe.default=df,Object.defineProperties(fe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
56
|
+
`,An=!1,xr=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_r;e.nextTick(function(){An||(typeof window<"u"&&window.document&&window.document.documentElement&&gr(o,{prepend:!0}),An=!0)})},kr=["icon","primaryColor","secondaryColor"];function Sr(t,o){if(t==null)return{};var n=Ar(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Ar(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Mt(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){Nr(t,r,n[r])})}return t}function Nr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var _t={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Tr(t){var o=t.primaryColor,n=t.secondaryColor;_t.primaryColor=o,_t.secondaryColor=n||kn(o),_t.calculated=!!n}function Er(){return Mt({},_t)}var nt=function(o,n){var a=Mt({},o,n.attrs),r=a.icon,l=a.primaryColor,i=a.secondaryColor,d=Sr(a,kr),s=_t;if(l&&(s={primaryColor:l,secondaryColor:i||kn(l)}),xr(),wr(xn(r),"icon should be icon definiton, but got ".concat(r)),!xn(r))return null;var c=r;return c&&typeof c.icon=="function"&&(c=Mt({},c,{icon:c.icon(s.primaryColor,s.secondaryColor)})),yo(c.icon,"svg-".concat(c.name),Mt({},d,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};nt.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},nt.inheritAttrs=!1,nt.displayName="IconBase",nt.getTwoToneColors=Er,nt.setTwoToneColors=Tr;const go=nt;function Lr(t,o){return Ir(t)||Vr(t,o)||Or(t,o)||Br()}function Br(){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 Or(t,o){if(t){if(typeof t=="string")return Nn(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 Nn(t,o)}}function Nn(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 Vr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function Ir(t){if(Array.isArray(t))return t}function Tn(t){var o=Sn(t),n=Lr(o,2),a=n[0],r=n[1];return go.setTwoToneColors({primaryColor:a,secondaryColor:r})}function Fr(){var t=go.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var $r=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function Dr(t,o){return jr(t)||Mr(t,o)||Pr(t,o)||vr()}function vr(){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 Pr(t,o){if(t){if(typeof t=="string")return En(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 En(t,o)}}function En(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 Mr(t,o){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var a=[],r=!0,l=!1,i,d;try{for(n=n.call(t);!(r=(i=n.next()).done)&&(a.push(i.value),!(o&&a.length===o));r=!0);}catch(s){l=!0,d=s}finally{try{!r&&n.return!=null&&n.return()}finally{if(l)throw d}}return a}}function jr(t){if(Array.isArray(t))return t}function Ln(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){bo(t,r,n[r])})}return t}function bo(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}function Rr(t,o){if(t==null)return{};var n=Ur(t,o),a,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],!(o.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function Ur(t,o){if(t==null)return{};var n={},a=Object.keys(t),r,l;for(l=0;l<a.length;l++)r=a[l],!(o.indexOf(r)>=0)&&(n[r]=t[r]);return n}Tn("#1890ff");var at=function(o,n){var a,r=Ln({},o,n.attrs),l=r.class,i=r.icon,d=r.spin,s=r.rotate,c=r.tabindex,p=r.twoToneColor,u=r.onClick,f=Rr(r,$r),h=(a={anticon:!0},bo(a,"anticon-".concat(i.name),!!i.name),bo(a,l,l),a),A=d===""||d||i.name==="loading"?"anticon-spin":"",g=c;g===void 0&&u&&(g=-1,f.tabindex=g);var x=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,S=Sn(p),w=Dr(S,2),V=w[0],m=w[1];return e.createVNode("span",Ln({role:"img","aria-label":i.name},f,{onClick:u,class:h}),[e.createVNode(go,{class:A,icon:i,primaryColor:V,secondaryColor:m,style:x},null)])};at.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String},at.displayName="AntdIcon",at.inheritAttrs=!1,at.getTwoToneColor=Fr,at.setTwoToneColor=Tn;const ye=at;var Gr={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 zr=Gr;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){Hr(t,r,n[r])})}return t}function Hr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Co=function(o,n){var a=Bn({},o,n.attrs);return e.createVNode(ye,Bn({},a,{icon:zr}),null)};Co.displayName="AppstoreAddOutlined",Co.inheritAttrs=!1;const On=Co;var Wr={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 qr=Wr;function Vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){Yr(t,r,n[r])})}return t}function Yr(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var wo=function(o,n){var a=Vn({},o,n.attrs);return e.createVNode(ye,Vn({},a,{icon:qr}),null)};wo.displayName="CaretDownOutlined",wo.inheritAttrs=!1;const Kr=wo;var Qr={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 Xr=Qr;function In(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 _o=function(o,n){var a=In({},o,n.attrs);return e.createVNode(ye,In({},a,{icon:Xr}),null)};_o.displayName="CaretRightOutlined",_o.inheritAttrs=!1;const Zr=_o;var el={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 tl=el;function Fn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){ol(t,r,n[r])})}return t}function ol(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var xo=function(o,n){var a=Fn({},o,n.attrs);return e.createVNode(ye,Fn({},a,{icon:tl}),null)};xo.displayName="CloseOutlined",xo.inheritAttrs=!1;const ko=xo;var nl={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 al=nl;function $n(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 So=function(o,n){var a=$n({},o,n.attrs);return e.createVNode(ye,$n({},a,{icon:al}),null)};So.displayName="CopyOutlined",So.inheritAttrs=!1;const ll=So;var il={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 sl=il;function Dn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 Ao=function(o,n){var a=Dn({},o,n.attrs);return e.createVNode(ye,Dn({},a,{icon:sl}),null)};Ao.displayName="DeleteOutlined",Ao.inheritAttrs=!1;const dl=Ao;var pl={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 ul=pl;function vn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){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 No=function(o,n){var a=vn({},o,n.attrs);return e.createVNode(ye,vn({},a,{icon:ul}),null)};No.displayName="DoubleRightOutlined",No.inheritAttrs=!1;const ml=No;var hl={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 yl=hl;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){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 To=function(o,n){var a=Pn({},o,n.attrs);return e.createVNode(ye,Pn({},a,{icon:yl}),null)};To.displayName="DownOutlined",To.inheritAttrs=!1;const bl=To;var Cl={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 wl=Cl;function Mn(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?Object(arguments[o]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),a.forEach(function(r){_l(t,r,n[r])})}return t}function _l(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Eo=function(o,n){var a=Mn({},o,n.attrs);return e.createVNode(ye,Mn({},a,{icon:wl}),null)};Eo.displayName="InfoCircleOutlined",Eo.inheritAttrs=!1;const xl=Eo;var kl={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 Sl=kl;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){Al(t,r,n[r])})}return t}function Al(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Lo=function(o,n){var a=jn({},o,n.attrs);return e.createVNode(ye,jn({},a,{icon:Sl}),null)};Lo.displayName="MinusCircleOutlined",Lo.inheritAttrs=!1;const Nl=Lo;var Tl={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 El=Tl;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){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 Bo=function(o,n){var a=Rn({},o,n.attrs);return e.createVNode(ye,Rn({},a,{icon:El}),null)};Bo.displayName="PlusCircleOutlined",Bo.inheritAttrs=!1;const Bl=Bo;var Ol={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 Vl=Ol;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){Il(t,r,n[r])})}return t}function Il(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Oo=function(o,n){var a=Un({},o,n.attrs);return e.createVNode(ye,Un({},a,{icon:Vl}),null)};Oo.displayName="PlusOutlined",Oo.inheritAttrs=!1;const Fl=Oo;var $l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"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 Dl=$l;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){vl(t,r,n[r])})}return t}function vl(t,o,n){return o in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Vo=function(o,n){var a=Gn({},o,n.attrs);return e.createVNode(ye,Gn({},a,{icon:Dl}),null)};Vo.displayName="QuestionCircleOutlined",Vo.inheritAttrs=!1;const Pl=Vo;var Ml={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 jl=Ml;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){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 Io=function(o,n){var a=zn({},o,n.attrs);return e.createVNode(ye,zn({},a,{icon:jl}),null)};Io.displayName="SettingOutlined",Io.inheritAttrs=!1;const Ul=Io,Gl=e.defineComponent({name:"DataSourceList",components:{CaretRightOutlined:Zr,CaretDownOutlined:Kr,AInputSearch:$.InputSearch,ASpin:$.Spin,APagination:$.Pagination,Draggable:bt},setup(){var m;const t=(m=window==null?void 0:window.config)==null?void 0:m.pageId,o=e.inject(Le),n=e.unref(e.inject(Be)),a=e.inject(Me),r=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.graphicConfig}),l=e.computed(()=>{var E;return(E=e.unref(r))==null?void 0:E.dataSourceId}),i=e.ref([]),d=e.ref(!1),s=e.reactive({pageSize:20,currentPage:1,totalResult:0}),c=e.ref(""),p=async()=>{d.value=!0;const E={source:"INDICATOR_LIB",queryRequest:{pageSize:s.pageSize,pageNum:s.currentPage},indexName:e.unref(c),pageId:t,dataSourceId:e.unref(l)};try{const b=await o.post(`${xe}/diagram/sourceList`,E,{headers:{Authentication:n,operateContext:"ygt"}});d.value=!1;const{success:O,data:I={}}=b.data;if(O){const{rows:L=[],total:D=0}=I;L==null||L.forEach(v=>{var W;v.show=!1,(W=v.dataViewColumns)==null||W.forEach(_=>{_.show=!0,_.edit=!1,_.title&&(_.label=_.title)})}),i.value=L,s.totalResult=+D}}catch{d.value=!1}},u=E=>({DIM:"维度",BUILT_IN_DIM:"维度",IDX:"指标",BUILT_IN_IDX:"指标"})[E],f=E=>{i.value[E].show=!i.value[E].show},h=()=>{s.currentPage=1,p()},A=oe.debounce(()=>{s.currentPage=1,p()},200),g=(E,b)=>{s.pageSize=b,s.currentPage=E,p()};e.onMounted(()=>{p()});const x=e.inject(pe),S=e.computed(()=>{const E=["classificationList","rowHeaderList","dimensionList"];let b=[];for(const O in e.unref(x))if(Object.prototype.hasOwnProperty.call(e.unref(x),O)&&E.includes(O)){const I=e.unref(x)[O];Array.isArray(I)&&(b=b.concat(I))}return b});return{dataSourceList:i,dataSourceLoading:d,pagination:s,onToggleGroup:f,mapScope:u,onSearch:h,onChange:A,onPaginationChange:g,searchText:c,setItemDisabled:(E=[])=>{let b=!1;for(const O of e.unref(S))if(!E.find(L=>L.typeGuid===O.typeGuid)){b=!0;break}return b},onDragStart:(E,b)=>{const O=b[E.oldIndex];O&&sessionStorage.setItem("indicator-list-item",JSON.stringify(O))}}}}),Pu="",zl={class:"data-source-list"},Hl={class:"columns"},Wl={class:"column-item"},ql=["onClick"],Yl={key:0},Kl={class:"column-child-item"},Ql={class:"column-child-item-name"};function Xl(t,o,n,a,r,l){const i=e.resolveComponent("a-input-search"),d=e.resolveComponent("caret-down-outlined"),s=e.resolveComponent("caret-right-outlined"),c=e.resolveComponent("draggable"),p=e.resolveComponent("a-spin"),u=e.resolveComponent("a-pagination");return e.openBlock(),e.createElementBlock("div",zl,[e.createVNode(i,{value:t.searchText,"onUpdate:value":o[0]||(o[0]=f=>t.searchText=f),placeholder:"请输入关键字",style:{width:"100%"},onChange:t.onChange,onSearch:t.onSearch},null,8,["value","onChange","onSearch"]),e.createElementVNode("div",Hl,[e.createVNode(p,{spinning:t.dataSourceLoading,tip:"数据源加载中..."},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataSourceList,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(t.setItemDisabled(f.dataViewColumns)?"column-disabled":"")},[e.createElementVNode("div",Wl,[e.createElementVNode("span",{style:{cursor:"pointer"},onClick:A=>t.onToggleGroup(h)},[f.show?(e.openBlock(),e.createBlock(d,{key:0})):(e.openBlock(),e.createBlock(s,{key:1})),e.createTextVNode(" "+e.toDisplayString(f.indexCode+" "+f.name),1)],8,ql)]),f.show?(e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(c,{modelValue:f.dataViewColumns,"onUpdate:modelValue":A=>f.dataViewColumns=A,group:{name:"cardItem",pull:"clone",put:!1},"item-key":"id",sort:!1,disabled:t.setItemDisabled(f.dataViewColumns),onStart:A=>t.onDragStart(A,f.dataViewColumns)},{item:e.withCtx(({element:A})=>[e.createElementVNode("div",Kl,[e.createTextVNode(" 【"+e.toDisplayString(t.mapScope(A.scope))+"】 ",1),e.createElementVNode("span",Ql,e.toDisplayString(A.label),1)])]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onStart"])])):e.createCommentVNode("",!0)],2))),128))]),_:1},8,["spinning"])]),e.createVNode(u,{size:"small","show-quick-jumper":"",pageSize:t.pagination.pageSize,"onUpdate:pageSize":o[1]||(o[1]=f=>t.pagination.pageSize=f),total:t.pagination.totalResult,"show-total":f=>`共 ${f} 条`,current:t.pagination.currentPage,"onUpdate:current":o[2]||(o[2]=f=>t.pagination.currentPage=f),onChange:t.onPaginationChange},null,8,["pageSize","total","show-total","current","onChange"])])}const Jl=te(Gl,[["render",Xl],["__scopeId","data-v-c4000c1e"]]),Zl=e.defineComponent({name:"DataList",components:{DataSourceList:Jl,DataViewList:Ja},setup(){return{source:e.inject(lo)}}});function ei(t,o,n,a,r,l){const i=e.resolveComponent("data-view-list"),d=e.resolveComponent("data-source-list");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.source==="SQL_VIEW"?(e.openBlock(),e.createBlock(i,{key:0})):e.createCommentVNode("",!0),t.source==="INDICATOR_LIB"?(e.openBlock(),e.createBlock(d,{key:1})):e.createCommentVNode("",!0)],64)}const ti=te(Zl,[["render",ei]]),Hn={mounted(t){t.focus()}},oi=e.defineComponent({name:"CustomSortModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{Draggable:bt,AModal:$.Modal,AButton:$.Button},setup(t,{expose:o}){var V;const n=(V=window==null?void 0:window.config)==null?void 0:V.pageId,a=e.inject(Le),r=e.unref(e.inject(Be)),l=e.inject(pe),i=e.inject(ke),d=e.computed(()=>e.unref(l).source),s=e.computed(()=>e.unref(l).dataViewId),c=e.ref([]),p=async()=>{try{const m=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(d),dataViewId:e.unref(s),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:n,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:E,data:b=[]}=m.data;E&&(c.value=b==null?void 0:b.slice(0,200))}catch(m){console.error(m)}},u=()=>{var I;const m=((I=e.unref(l)[t.type])==null?void 0:I.slice())||[],E=m[t.index],{label:b,name:O}=t.item;E.sort={label:b,columnName:O,type:"CUSTOM",customOrderColumns:e.unref(c)},i({[t.type]:m})};let f=!1;const h=()=>{f=!0},A=e.ref(!1),g=()=>{A.value=!0},x=()=>{A.value=!1},S=()=>{f&&u(),f=!1,x()};return o({showModal:g}),e.watch(A,m=>{var E,b;if(m){const O=(b=(E=t.item)==null?void 0:E.sort)==null?void 0:b.customOrderColumns;O==null?p():c.value=O}else c.value=[];window.changeShowTable&&window.changeShowTable(!m)},{flush:"post"}),{visible:A,onCancel:S,customSortList:c,onChange:h,onDeleteConfig:()=>{var I;const m=((I=e.unref(l)[t.type])==null?void 0:I.slice())||[],E=m[t.index],{label:b,name:O}=t.item;E.sort={label:b,columnName:O},i({[t.type]:m}),x()}}}}),Mu="",ni={class:"button-wrapper"},ai={class:"sort-item"};function ri(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("draggable"),s=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(s,{title:"进行拖拽排序",visible:t.visible,"destroy-on-close":"",width:"50%",onCancel:t.onCancel,bodyStyle:{height:"70vh",overflow:"auto",padding:"10px 24px"},footer:null},{default:e.withCtx(()=>[e.createElementVNode("div",ni,[e.createVNode(i,{danger:"",onClick:t.onDeleteConfig},{default:e.withCtx(()=>[e.createTextVNode(" 删除配置 ")]),_:1},8,["onClick"])]),e.createVNode(d,{modelValue:t.customSortList,"onUpdate:modelValue":o[0]||(o[0]=c=>t.customSortList=c),class:"custom-sort-list","item-key":"id",put:!1,onChange:t.onChange},{item:e.withCtx(({element:c})=>[e.createElementVNode("div",ai,e.toDisplayString(c),1)]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible","onCancel"])}const li=te(oi,[["render",ri],["__scopeId","data-v-8e16d201"]]),ii=e.defineComponent({name:"CustomGroupModal",directives:{focus:Hn},components:{CloseOutlined:ko,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 P;const n=e.inject(Le),a=(P=window==null?void 0:window.config)==null?void 0:P.pageId,r=e.unref(e.inject(Be));let l=!1;const i=e.computed(()=>`自定义分组-${t.item.label}`),d=e.ref(null),s=e.ref([]),c=e.ref([]),p=e.computed(()=>{const C=e.unref(c).map(k=>k.title);return new Set(C)}),u=e.ref([]);e.watch(()=>e.unref(c).length,C=>{u.value=new Array(C).fill(!1)});const f=e.computed(()=>{let C=0;return e.unref(c).forEach(k=>{var B;(B=k.data)==null||B.forEach(M=>{M.checked&&C++})}),C}),h=()=>{const C=e.unref(d);if(!C){$.message.error("创建分组名不能空");return}e.unref(p).has(C)?$.message.error("分组名已存在,请重新命名"):(e.unref(c).push({title:C,data:[]}),l=!0)},A=C=>{e.unref(c).splice(C,1),l=!0},g=e.ref(null),x=()=>{if(e.unref(f)===0){$.message.error("当前移入分组已选个数为0");return}const C=e.unref(g);if(C==null){$.message.error("请选择移入分组");return}if(!e.unref(c)[C]){$.message.error("移入分组不存在,请重新选择");return}const k=[],B=e.unref(c).length;for(let M=0;M<B;M++){const j=e.unref(c)[M];e.unref(c)[M].data=j.data.filter(H=>(H.checked&&k.push({...H,checked:!1}),!H.checked))}e.unref(c)[C].data=[...k,...e.unref(c)[C].data],l=!0},S=C=>{e.unref(u)[C]=!0},w=C=>{e.unref(u)[C]=!1},V=(C,k)=>{const B=C.target.value;e.unref(p).has(B)&&$.message.error("组名不能相同,请修改"),e.unref(c)[k].title=B,l=!0},m=e.inject(pe),E=e.inject(ke),b=e.computed(()=>e.unref(m).source),O=e.computed(()=>e.unref(m).dataViewId),I=e.ref(!1),L=()=>{var Z,Q;const C=e.unref(c);let k="";e.unref(I)&&(k=(Z=C[0])==null?void 0:Z.title);const B=C==null?void 0:C.length,M={};for(let X=1;X<B;X++){const ne=C[X]||{},{title:de,data:se}=ne;M[de]=(se==null?void 0:se.map(Ie=>Ie.label))||[]}const j=((Q=e.unref(m)[t.type])==null?void 0:Q.slice())||[],H=j[t.index];H.customGroup={groupInfoMap:M,otherGroupName:k},E({[t.type]:j})},D=e.ref(!1),v=()=>{D.value=!0},W=()=>{D.value=!1},_=()=>{W(),l&&L(),l=!1},y=()=>{l=!0},T=new Set,N=async()=>{const C=t.item.customGroup||{},k=C.otherGroupName,B=C.groupInfoMap;(k===""||k==null)&&(I.value=!1),e.unref(c)[0]={title:k||"未分组",data:[]};let M=1;for(const j in B)if(Object.prototype.hasOwnProperty.call(B,j)){const Z=B[j].map(Q=>(T.add(Q),{label:Q,checked:!1}));e.unref(c)[M]={title:j,data:Z},M++}await F()},F=async()=>{var C;try{const k=await n.post(`${xe}/diagram/groupvalue`,{source:e.unref(b),dataViewId:e.unref(O),groupColumn:t.item.name,hrpIndexTypeGuid:t.item.typeGuid,pageId:a,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:B,data:M=[]}=k.data;if(B){const j=[];(C=M==null?void 0:M.slice(0,200))==null||C.forEach(H=>{T.has(H)||j.push({label:H,checked:!1})}),e.unref(c)[0].data=j}}catch(k){console.error(k)}};return e.watch(D,C=>{C&&N(),window.changeShowTable&&window.changeShowTable(!C)},{flush:"post"}),o({showModal:v}),{visible:D,title:i,activeKey:s,customGroupList:c,onCancel:_,useOtherGroup:I,selectCount:f,createGroupTitle:d,onAddGroup:h,onDeleteGroup:A,onMoveInGroup:x,selectGroupIndex:g,onEditTitle:S,onTitleChange:V,onFinishEditTitle:w,onUseOtherGroup:y,customGroupEditTitleList:u}}}),ju="",Ru="",si={class:"custom-group-header"},ci={class:"move-and-create"},di={class:"select-tip"},pi={class:"select-count"},ui={class:"create-group"},fi={class:"custom-group-content"},mi=["onClick"],hi={class:"extra"},yi={class:"custom-group-list"},gi={class:"text"};function bi(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-button"),c=e.resolveComponent("a-input"),p=e.resolveComponent("a-checkbox"),u=e.resolveComponent("a-tag"),f=e.resolveComponent("close-outlined"),h=e.resolveComponent("a-checkable-tag"),A=e.resolveComponent("a-collapse-panel"),g=e.resolveComponent("a-collapse"),x=e.resolveComponent("a-modal"),S=e.resolveDirective("focus");return e.openBlock(),e.createBlock(x,{title:t.title,visible:t.visible,"destroy-on-close":"",width:"50%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column"},footer:null,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",null,[e.createElementVNode("span",di,[e.createTextVNode(" 已选"),e.createElementVNode("span",pi,e.toDisplayString(t.selectCount),1),e.createTextVNode("个 ")]),e.createVNode(d,{value:t.selectGroupIndex,"onUpdate:value":o[0]||(o[0]=w=>t.selectGroupIndex=w),class:"select-group",placeholder:"请选择移入分组"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,V)=>(e.openBlock(),e.createBlock(i,{key:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.title),1)]),_:2},1024))),128))]),_:1},8,["value"]),e.createVNode(s,{onClick:t.onMoveInGroup},{default:e.withCtx(()=>[e.createTextVNode("移入分组")]),_:1},8,["onClick"])]),e.createElementVNode("div",ui,[e.createTextVNode(" 创建分组: "),e.createVNode(c,{class:"create-group-name",value:t.createGroupTitle,"onUpdate:value":o[1]||(o[1]=w=>t.createGroupTitle=w),placeholder:"请输入创建分组名",onPressEnter:t.onAddGroup},null,8,["value","onPressEnter"])])]),e.createElementVNode("div",null,[e.createVNode(p,{checked:t.useOtherGroup,"onUpdate:checked":o[2]||(o[2]=w=>t.useOtherGroup=w),onChange:t.onUseOtherGroup},{default:e.withCtx(()=>[e.createTextVNode(" 将未分组设为其他分组 ")]),_:1},8,["checked","onChange"])])]),e.createElementVNode("div",fi,[e.createVNode(g,{activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=w=>t.activeKey=w),ghost:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customGroupList,(w,V)=>(e.openBlock(),e.createBlock(A,{key:V},{header:e.withCtx(()=>[t.customGroupEditTitleList[V]?e.withDirectives((e.openBlock(),e.createBlock(c,{key:1,class:"edit-title-input",value:w.title,size:"small",onChange:m=>t.onTitleChange(m,V),onBlur:m=>t.onFinishEditTitle(V),onPressEnter:m=>t.onFinishEditTitle(V)},null,8,["value","onChange","onBlur","onPressEnter"])),[[S]]):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:e.withModifiers(m=>t.onEditTitle(V),["prevent","stop"])},e.toDisplayString(w.title),9,mi))]),extra:e.withCtx(()=>[e.createElementVNode("div",hi,[V===0&&t.useOtherGroup?(e.openBlock(),e.createBlock(u,{key:0,class:"tag",color:"blue"},{default:e.withCtx(()=>[e.createTextVNode(" 其他组 ")]),_:1})):e.createCommentVNode("",!0),V!==0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(u,{class:"tag",color:"green"},{default:e.withCtx(()=>[e.createTextVNode(" 自定义组 ")]),_:1}),e.createVNode(f,{onClick:e.withModifiers(m=>t.onDeleteGroup(V),["prevent","stop"])},null,8,["onClick"])],64)):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.data,(m,E)=>(e.openBlock(),e.createBlock(h,{color:"red",checked:m.checked,"onUpdate:checked":b=>m.checked=b,class:"custom-group",key:E},{default:e.withCtx(()=>[e.createElementVNode("span",gi,e.toDisplayString(m.label),1)]),_:2},1032,["checked","onUpdate:checked"]))),128))])]),_:2},1024))),128))]),_:1},8,["activeKey"])])]),_:1},8,["title","visible","onCancel"])}const Ci=te(ii,[["render",bi],["__scopeId","data-v-7e3049d2"]]);var wi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fo={},_i={get exports(){return Fo},set exports(t){Fo=t}};(function(t,o){(function(n,a){t.exports=a()})(wi,function(){var n="month",a="quarter";return function(r,l){var i=l.prototype;i.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var d=i.add;i.add=function(c,p){return c=Number(c),this.$utils().p(p)===a?this.add(3*c,n):d.bind(this)(c,p)};var s=i.startOf;i.startOf=function(c,p){var u=this.$utils(),f=!!u.u(p)||p;if(u.p(c)===a){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return s.bind(this)(c,p)}}})})(_i);const xi=Fo;ce.extend(xi);const ki=e.defineComponent({name:"Condition",components:{CloseOutlined:ko,DownOutlined:bl,AppstoreAddOutlined:On,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},props:{data:{type:Object,default:()=>({})},level:{type:Number,default:0},index:{type:Number,default:0},type:{type:String,default:""}},setup(t){var Je,ft,mt,Ze,qe,et,ht,_e,ve,Ge,tt,Ye;const o=(Je=window==null?void 0:window.config)==null?void 0:Je.pageId,n=e.inject(pe),a=e.inject(Le),r=e.unref(e.inject(Be)),l=e.inject(ln),i=e.inject(ze),d=e.ref(!1),s=ce(),c=e.computed(()=>{var z;const R=[];return(z=e.unref(i))==null||z.forEach(K=>{const{keyName:J="",id:ee="",type:ue}=K;ue==="ecanRangePicker"?R.push({value:`${ee}-startTime`,label:`${J||ee}-开始时间值`,keyName:`${J||ee}-startTime`,id:ee},{value:`${ee}-endTime`,label:`${J||ee}-结束时间值`,keyName:`${J||ee}-endTime`,id:ee}):R.push({value:ee,label:`${J||ee}`,keyName:`${J||ee}`,id:ee})}),R}),p=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.dataViewId}),u=e.computed(()=>{var R;return(R=e.unref(n))==null?void 0:R.source}),f=e.ref(!1),h={display:"block",height:"34px",lineHeight:"34px",marginTop:"3px"},A=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"},{label:"年月日时",value:"YYYY-MM-DD HH"},{label:"年月日时分",value:"YYYY-MM-DD HH:mm"},{label:"年月日时分秒",value:"YYYY-MM-DD HH:mm:ss"}],g=e.ref({expression:"rangeValue",unit:"YEAR",around:"before"}),x=e.ref([{key:0,value:"",label:"年",type:"years",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"年前",afterLabel:"年后",beforeText:"年初",afterText:"年末"},{key:1,value:"",label:"季度",type:"quarters",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个季度前",afterLabel:"个季度后",beforeText:"季度初",afterText:"季度末"},{key:2,value:"",label:"月",type:"months",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"个月前",afterLabel:"个月后",beforeText:"月初",afterText:"月末"},{key:3,value:"",label:"周",type:"weeks",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"周前",afterLabel:"周后",beforeText:"",afterText:""},{key:4,value:"",label:"天",type:"days",radioValue:"1",beforeNum:0,afterNum:0,beforeLabel:"天前",afterLabel:"天后",beforeText:"今天",afterText:""}]),S=[{label:"年份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"季的季度",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"月的月份",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"周的周",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"},{label:"天的日期",text:"年",yearNum:0,yearRule:"before",otherNum:0,otherRule:"before"}],w=[{label:"时间值",value:"time"},{label:"过滤组件值",value:"component"}],V=[{label:"自定义值",value:""},{label:"组件值",value:"component"}],m=e.ref({fieldName:(ft=t.data)==null?void 0:ft.fieldName,fieldType:(mt=t.data)==null?void 0:mt.fieldType,rule:(Ze=t.data)==null?void 0:Ze.rule,id:(qe=t.data)==null?void 0:qe.id,fieldValue:E(),label:(et=t.data)==null?void 0:et.label,targetSource:"",typeGuid:(ht=t.data)==null?void 0:ht.typeGuid,indexCode:(_e=t.data)==null?void 0:_e.indexCode,indexCodeNum:(ve=t.data)==null?void 0:ve.indexCodeNum,dataType:((Ge=t.data)==null?void 0:Ge.dataType)||"",componentId:((tt=t.data)==null?void 0:tt.componentId)||"",useCurrentTime:!!((Ye=t.data)!=null&&Ye.useCurrentTime)});function E(){const{fieldType:R="",dataType:z="",fieldValue:K=""}=t.data;if(R==="DATE"&&z==="time")return K&&ce(K);if(z==="component"){const J=e.unref(c).find(ee=>ee.keyName===K);return J?J.value:K}else return K}const b=e.ref(!1),O=e.computed(()=>m.value.fieldType==="DATE"),I=e.computed(()=>{const R=t.type;let z=[];const K=["classificationList","seriesList","rowHeaderList","dimensionList"];if(K.includes(R)){let J=[];for(const ee in e.unref(n))if(Object.prototype.hasOwnProperty.call(e.unref(n),ee)&&!["controlList","sqlConditions"].includes(ee)){const ue=e.unref(n)[ee];Array.isArray(ue)&&(K.includes(ee)?J=J.concat(ue.filter(he=>he.show)):J=J.concat(ue))}z=J}else["leftAxisList","rightAxisList","queryColumnList","indicators"].includes(R)&&(z=e.unref(l));return z.map(J=>({...J,label:J.title||J.label,value:J.name}))}),{updateCondition:L,deleteCondition:D}=e.inject(rn,{updateCondition:(R,z,K)=>{},deleteCondition:(R,z)=>{}}),v=()=>{D(t.level,t.index)};e.watch(m,R=>{const z=oe.cloneDeep(R);R.fieldType==="DATE"&&R.dataType!=="component"&&R.fieldValue&&(z.fieldValue=R.fieldValue.format(R.dateFormat)),L(z,t.level,t.index)},{deep:!0}),e.watch(d,R=>{m.value.fieldValue="",m.value.useCurrentTime=R});const W=R=>{const z=e.unref(I).find(U=>U.value===R)||{},{name:K,genericType:J,id:ee,label:ue,typeGuid:he,indexCode:yt,indexCodeNum:gt}=z;m.value={id:ee,fieldName:K,fieldType:J,label:ue,rule:"",fieldValue:J==="DATE"?null:void 0,targetSource:"",typeGuid:he,indexCode:yt,indexCodeNum:gt,dataType:"",useCurrentTime:!1}},_=R=>{const z=e.unref(c).find(K=>K.value===R)||{};e.unref(m).componentId=z.id||""},y=e.computed(()=>{const R=e.unref(m).fieldType;return R==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:R==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:R==="DATE"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:[]}),T=e.computed(()=>{let R="";const z=e.unref(y).find(K=>K.value===e.unref(m).rule);return z&&(R=z.label),R}),N=e.computed(()=>{let R={fontSize:"12px"};return e.unref(T)||(R={...R,position:"absolute",right:"11px",top:"9px"}),R}),F=e.ref([]),P=async()=>{var R;if(!(e.unref(F).length>0))try{const z=await a.post(`${xe}/diagram/groupvalue`,{source:e.unref(u),dataViewId:e.unref(p),groupColumn:e.unref(m).fieldName,hrpIndexTypeGuid:e.unref(m).typeGuid,pageId:o,pageFlag:!0},{headers:{Authentication:r,operateContext:"ygt"}}),{success:K,data:J=[]}=z.data;K&&(F.value=(R=J==null?void 0:J.slice(0,200))==null?void 0:R.map(ee=>({label:ee,value:ee})))}catch(z){console.error(z)}},C=R=>{e.unref(m).rule=R,e.unref(m).fieldValue=e.unref(m).fieldType==="DATE"?null:void 0,["IN","NOT_IN"].includes(R)&&P()},k=R=>{e.unref(m).dataType=R,e.unref(m).fieldValue=""},B=e.ref(),M=R=>{B.value=R,e.unref(m).fieldValue=(R==null?void 0:R.join(","))||""},j=R=>{const{keyPath:z}=R;e.unref(m).rule=z[0],e.unref(m).dataType=z[1],e.unref(m).dateFormat=z[2],e.unref(m).fieldValue=""};e.onMounted(()=>{var J,ee,ue,he,yt,gt,U;if(m.value.dataType=((J=t.data)==null?void 0:J.dataType)||"",m.value.componentId=((ee=t.data)==null?void 0:ee.componentId)||"",e.unref(m).fieldType==="DATE"){const{activeKey:G,dateCalcTypes:q=[]}=t.data||{};if(e.unref(m).dateFormat=(ue=t.data)==null?void 0:ue.dateFormat,e.unref(m).activeKey=G,e.unref(m).calcWays=((he=t.data)==null?void 0:he.calcWays)||[],e.unref(m).dateCalcTypes=q,e.unref(m).useCurrentTime&&e.unref(m).dataType!=="component"&&(d.value=!0),G===5){const Y=e.unref(m).calcWays[0];if(Y){const le=Y.split("-");e.unref(g).expression=le[0],e.unref(g).around=le[1]}e.unref(g).unit=q[0]||"YEAR"}else{e.unref(m).radioValue=((yt=t.data)==null?void 0:yt.radioValue)||"";const Y=e.unref(x).find(le=>{var ie;return le.key===((ie=t.data)==null?void 0:ie.activeKey)});Y&&se(Y,t.data)}}else B.value=((U=(gt=t.data)==null?void 0:gt.fieldValue)==null?void 0:U.split(","))||[];const{fieldType:R,fieldName:z,rule:K}=m.value;R!=="DATE"&&z&&K&&["IN","NOT_IN"].includes(K)&&P()});const H=R=>{if(e.unref(m).activeKey===R){e.unref(x)[R].radioValue=e.unref(m).radioValue,e.unref(x)[e.unref(m).activeKey]&&(e.unref(x)[e.unref(m).activeKey].radioValue=e.unref(m).radioValue,e.unref(m).radioValue==="1"?e.unref(x)[R].beforeNum=e.unref(m).calcWays[0]:e.unref(m).radioValue==="2"&&(e.unref(x)[R].afterNum=e.unref(m).calcWays[0]));return}e.unref(x).forEach(z=>{z.beforeNum=0,z.afterNum=0,z.radioValue="1",z.value=""})},Z=(R,z)=>{f.value=!0;const K=R.target.value,J=z.type,ee=e.unref(m).dateFormat,ue=Math.abs(z.beforeNum),he=z.afterNum;z.value=Ie(K,J,ee,ue,he)},Q=R=>{const z=e.unref(m).activeKey;if(R!==z)return;let K="";z===0?K="years":z===1?K="quarters":z===2?K="months":z===3?K="weeks":z===4&&(K="days");const J=e.unref(m).dateFormat,ee=e.unref(m).radioValue;let ue=0,he=0;return ee==="1"?ue=Math.abs(e.unref(m).calcWays[0]):ee==="2"&&(he=e.unref(m).calcWays[0]),Ie(ee,K,J,ue,he)},X=(R,z,K,J)=>{if(f.value=!0,z.radioValue===J){const ee=R.target.value;K==="+"?z.value=ce().add(ee,z.type).format(e.unref(m).dateFormat):z.value=ce().subtract(ee,z.type).format(e.unref(m).dateFormat)}},ne=(R,z)=>{e.unref(m).calcWays||(e.unref(m).calcWays=[]),e.unref(m).activeKey=z,e.unref(m).radioValue=R.radioValue,R.radioValue==="1"?e.unref(m).calcWays[0]="-"+R.beforeNum:R.radioValue==="2"?e.unref(m).calcWays[0]=R.afterNum:R.radioValue==="3"?z===4?e.unref(m).calcWays[0]="0":e.unref(m).calcWays[0]="BEGIN":R.radioValue==="4"&&(e.unref(m).calcWays[0]="END"),z===0?e.unref(m).dateCalcTypes=["YEAR"]:z===1?e.unref(m).dateCalcTypes=["QUARTER"]:z===2?e.unref(m).dateCalcTypes=["MONTH"]:z===3?e.unref(m).dateCalcTypes=["WEEK"]:z===4&&(e.unref(m).dateCalcTypes=["DAY"]),b.value=!1},de=()=>{e.unref(m).activeKey=5,e.unref(m).dateCalcTypes=[e.unref(g).unit],e.unref(m).calcWays[0]=`${e.unref(g).expression}-${e.unref(g).around}`,b.value=!1};function se(R,z){const{radioValue:K="",calcWays:J=[]}=z;R.radioValue=K,J!=null&&J.length&&(K==="1"?R.beforeNum=Math.abs(J[0]):K==="2"&&(R.afterNum=J[0]))}function Ie(R,z,K,J,ee){if(R==="1")return ce().subtract(J,z).format(K);if(R==="2")return ce().add(ee,z).format(K);if(R==="3"){if(z==="years")return ce().startOf("year").format(K);if(z==="quarters")return ce().startOf("quarter").format(K);if(z==="months")return ce().startOf("month").format(K);if(z==="days")return ce().format(K)}else if(R==="4"){if(z==="years")return ce().endOf("year").format(K);if(z==="quarters")return ce().endOf("quarter").format(K);if(z==="months")return ce().endOf("month").format(K)}return""}return{fieldOptions:I,ruleOptions:y,onFieldChange:W,condition:m,valueOptions:F,onRuleChange:C,onDataTypeChange:k,onFieldValueSelectChange:M,fieldValues:B,onDelete:v,isDateType:O,formatList:A,tabDateList:x,compareList:S,menuRule:w,dateBtnLabel:T,downIconStyle:N,popoverVisible:b,dateRadioStyle:h,showTime:f,controlList:c,dataTypeList:V,customTabData:g,isUseCurrentTime:d,currentTime:s,handleMenuClick:j,changeTabInitDate:H,changeRadioValue:Z,getFieldValue:Q,blurCompare:X,okDatePickConfig:ne,onChangeComponent:_,filterOption:(R,z)=>z.label.toLowerCase().indexOf(R.toLowerCase())>=0,okCustomConfig:de}}}),Uu="",Gu="",Si={class:"condition"},Ai=["title"],Ni={class:"rule"},Ti={class:"data-type"},Ei={key:0,class:"field-value",style:{display:"flex","align-items":"center"}},Li={class:"popover-content-wrap"},Bi={key:0,class:"use-current-time"},Oi={class:"tabFilterRadio"},Vi={key:0},Ii={key:1},Fi={style:{"margin-left":"10px"}},$i={style:{"margin-left":"10px"}},Di={style:{position:"absolute",bottom:"10px"}},vi={style:{display:"flex"}},Pi={style:{position:"absolute",bottom:"10px",left:"0","text-align":"center",width:"100%"}};function Mi(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-menu-item"),c=e.resolveComponent("a-sub-menu"),p=e.resolveComponent("a-menu"),u=e.resolveComponent("DownOutlined"),f=e.resolveComponent("a-button"),h=e.resolveComponent("a-dropdown"),A=e.resolveComponent("a-date-picker"),g=e.resolveComponent("a-checkbox"),x=e.resolveComponent("a-input-number"),S=e.resolveComponent("a-radio"),w=e.resolveComponent("a-radio-group"),V=e.resolveComponent("a-tab-pane"),m=e.resolveComponent("a-tabs"),E=e.resolveComponent("appstore-add-outlined"),b=e.resolveComponent("a-popover"),O=e.resolveComponent("a-input"),I=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Si,[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,(L,D)=>(e.openBlock(),e.createBlock(i,{key:D,value:L.value},{default:e.withCtx(()=>[e.createElementVNode("span",{title:L.label},e.toDisplayString(L.label),9,Ai)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"]),e.createElementVNode("div",Ni,[t.isDateType?(e.openBlock(),e.createBlock(h,{key:0,class:"dropdown",trigger:["click"]},{overlay:e.withCtx(()=>[e.createVNode(p,{onClick:t.handleMenuClick},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ruleOptions,L=>(e.openBlock(),e.createBlock(c,{key:L.value},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===L.value?"color: #1890FF;":"")},e.toDisplayString(L.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuRule,D=>{var v;return e.openBlock(),e.createBlock(c,{key:D.value,disabled:D.value==="component"&&!((v=t.controlList)!=null&&v.length)},{title:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===L.value&&t.condition.dataType===D.value?"color: #1890FF;":"")},e.toDisplayString(D.label),5)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,W=>(e.openBlock(),e.createBlock(s,{key:W.value},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(t.condition.rule===L.value&&t.condition.dataType===D.value&&t.condition.dateFormat===W.value?"color: #1890FF;":"")},e.toDisplayString(W.label),5)]),_:2},1024))),128))]),_:2},1032,["disabled"])}),128))]),_:2},1024))),128))]),_:1},8,["onClick"])]),default:e.withCtx(()=>[e.createVNode(f,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.dateBtnLabel)+" ",1),e.createVNode(u,{style:e.normalizeStyle(t.downIconStyle)},null,8,["style"])]),_:1})]),_:1})):(e.openBlock(),e.createBlock(d,{key:1,style:{width:"100%"},value:t.condition.rule,options:t.ruleOptions,onChange:t.onRuleChange},null,8,["value","options","onChange"]))]),e.withDirectives(e.createElementVNode("div",Ti,[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,(L,D)=>(e.openBlock(),e.createBlock(i,{key:D,value:L.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])],512),[[e.vShow,["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"]]),t.isDateType?(e.openBlock(),e.createElementBlock("div",Ei,[t.condition.dataType==="time"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.isUseCurrentTime?(e.openBlock(),e.createBlock(A,{key:0,disabled:"",style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.currentTime,format:t.condition.dateFormat},null,8,["value","format"])):(e.openBlock(),e.createBlock(A,{key:1,style:{width:"calc(100% - 35px)","margin-right":"10px"},value:t.condition.fieldValue,"onUpdate:value":o[0]||(o[0]=L=>t.condition.fieldValue=L),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]=L=>t.condition.fieldValue=L),"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]=L=>t.popoverVisible=L),trigger:"click",placement:"bottomRight"},{content:e.withCtx(()=>[e.createElementVNode("div",Li,[t.condition.dataType!=="component"?(e.openBlock(),e.createElementBlock("div",Bi,[e.createVNode(g,{checked:t.isUseCurrentTime,"onUpdate:checked":o[2]||(o[2]=L=>t.isUseCurrentTime=L)},{default:e.withCtx(()=>[e.createTextVNode("使用当前时间")]),_:1},8,["checked"])])):e.createCommentVNode("",!0),e.createVNode(m,{defaultActiveKey:t.condition.activeKey,onChange:t.changeTabInitDate},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.tabDateList,(L,D)=>(e.openBlock(),e.createBlock(V,{key:D,tab:L.label},{default:e.withCtx(()=>[e.createElementVNode("div",Oi,[e.createVNode(w,{value:L.radioValue,"onUpdate:value":v=>L.radioValue=v,onChange:v=>t.changeRadioValue(v,L)},{default:e.withCtx(()=>[t.showTime?(e.openBlock(),e.createElementBlock("div",Vi,"相对当前时间:"+e.toDisplayString(L.value),1)):(e.openBlock(),e.createElementBlock("div",Ii,"相对当前时间:"+e.toDisplayString(t.getFieldValue(D)),1)),e.createVNode(S,{style:e.normalizeStyle(t.dateRadioStyle),value:"1"},{default:e.withCtx(()=>[e.createVNode(x,{value:L.beforeNum,"onUpdate:value":v=>L.beforeNum=v,min:0,onBlur:v=>t.blurCompare(v,L,"-","1")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",Fi,e.toDisplayString(L.beforeLabel),1)]),_:2},1032,["style"]),e.createVNode(S,{style:e.normalizeStyle(t.dateRadioStyle),value:"2"},{default:e.withCtx(()=>[e.createVNode(x,{value:L.afterNum,"onUpdate:value":v=>L.afterNum=v,min:0,onBlur:v=>t.blurCompare(v,L,"+","2")},null,8,["value","onUpdate:value","onBlur"]),e.createElementVNode("span",$i,e.toDisplayString(L.afterLabel),1)]),_:2},1032,["style"]),L.beforeText?(e.openBlock(),e.createBlock(S,{key:2,style:e.normalizeStyle(t.dateRadioStyle),value:"3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.beforeText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0),L.afterText?(e.openBlock(),e.createBlock(S,{key:3,style:e.normalizeStyle(t.dateRadioStyle),value:"4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L.afterText),1)]),_:2},1032,["style"])):e.createCommentVNode("",!0)]),_:2},1032,["value","onUpdate:value","onChange"]),e.createElementVNode("div",Di,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[3]||(o[3]=v=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:v=>t.okDatePickConfig(L,D)},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:2},1032,["onClick"])])])]),_:2},1032,["tab"]))),128)),(e.openBlock(),e.createBlock(V,{tab:"自定义",key:5},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[e.createVNode(d,{value:t.customTabData.expression,"onUpdate:value":o[4]||(o[4]=L=>t.customTabData.expression=L),allowClear:"",style:{width:"120px","margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"rangeValue"},{default:e.withCtx(()=>[e.createTextVNode("范围差值")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.unit,"onUpdate:value":o[5]||(o[5]=L=>t.customTabData.unit=L),style:{"margin-right":"10px"}},{default:e.withCtx(()=>[e.createVNode(i,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(i,{value:"QUARTER"},{default:e.withCtx(()=>[e.createTextVNode("季度")]),_:1}),e.createVNode(i,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(i,{value:"WEEK"},{default:e.withCtx(()=>[e.createTextVNode("周")]),_:1}),e.createVNode(i,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value"]),e.createVNode(d,{value:t.customTabData.around,"onUpdate:value":o[6]||(o[6]=L=>t.customTabData.around=L)},{default:e.withCtx(()=>[e.createVNode(i,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(i,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value"])]),e.createElementVNode("div",Pi,[e.createVNode(f,{style:{"margin-right":"12px"},onClick:o[7]||(o[7]=L=>t.popoverVisible=!1)},{default:e.withCtx(()=>[e.createTextVNode("取消")]),_:1}),e.createVNode(f,{onClick:t.okCustomConfig},{default:e.withCtx(()=>[e.createTextVNode("确定")]),_:1},8,["onClick"])])]),_:1}))]),_:1},8,["defaultActiveKey","onChange"])])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:"calendar-wrap",onClick:o[8]||(o[8]=L=>{t.popoverVisible=!0})},[e.createVNode(E)])]),_:1},8,["visible"])])):["IN","NOT_IN"].includes(t.condition.rule||"")?(e.openBlock(),e.createBlock(d,{key:1,class:"field-value",value:t.fieldValues,mode:"multiple",options:t.valueOptions,onChange:t.onFieldValueSelectChange},null,8,["value","options","onChange"])):["TEXT","NUMBER"].includes(t.condition.fieldType)&&t.condition.rule==="EQUAL"&&t.condition.dataType==="component"?(e.openBlock(),e.createBlock(d,{key:2,class:"field-value","show-search":"",value:t.condition.fieldValue,"onUpdate:value":o[10]||(o[10]=L=>t.condition.fieldValue=L),"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]=L=>t.condition.fieldValue=L)},null,8,["value"])),e.createVNode(I,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const ji=te(ki,[["render",Mi],["__scopeId","data-v-cbf4fda1"]]),Ri=e.defineComponent({name:"ConditionList",props:{list:{type:Array,default:()=>[]},level:{type:Number,default:0},type:{type:String,default:""}},components:{Condition:ji}}),zu="",Ui={key:0,class:"condition-list"},Gi={key:0,class:"condition-container"},zi={key:0,class:"condition-text"},Hi={key:1,class:"condition-text"},Wi={class:"conditions"};function qi(t,o,n,a,r,l){const i=e.resolveComponent("condition-list",!0),d=e.resolveComponent("condition");return Array.isArray(t.list)?(e.openBlock(),e.createElementBlock("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.list,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[s.join&&s.conditions&&Array.isArray(s.conditions)?(e.openBlock(),e.createElementBlock("div",Gi,[s.conditions.length>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.join==="||"?(e.openBlock(),e.createElementBlock("div",zi,"或")):e.createCommentVNode("",!0),s.join==="&&"?(e.openBlock(),e.createElementBlock("div",Hi,"且")):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createElementVNode("div",Wi,[s.conditions.length>0?(e.openBlock(),e.createBlock(i,{key:0,level:t.level+1,list:s.conditions,type:t.type},null,8,["level","list","type"])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createBlock(d,{class:"condition",key:s.keyValue,data:s,level:t.level,index:c,type:t.type},null,8,["data","level","index","type"]))],64))),128))])):e.createCommentVNode("",!0)}const Yi=te(Ri,[["render",qi],["__scopeId","data-v-86c0c5aa"]]),Ki=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,l=>{l!=null&&l.length&&o("update",l)},{deep:!0}),e.onMounted(()=>{var l;(l=t.list)!=null&&l.length?a.value=oe.cloneDeep(t.list):a.value=[{num:0,rule:"",name:"其他"}]}),{ruleOptions:n,truncationList:a,clearData:l=>{l.rule="",l.num=0,l.name=""}}}}),Hu="",Wn=t=>(e.pushScopeId("data-v-f543c690"),t=t(),e.popScopeId(),t),Qi={class:"truncations"},Xi={class:"rule"},Ji={class:"field-value"},Zi={class:"field-value"},es=Wn(()=>e.createElementVNode("div",{class:"text"},"将其余项设为",-1)),ts=Wn(()=>e.createElementVNode("div",{class:"text"},"分组",-1)),os=["onClick"];function ns(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input-number"),s=e.resolveComponent("a-input");return e.openBlock(),e.createElementBlock("div",Qi,[(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",Xi,[e.createVNode(i,{style:{width:"100%"},value:c.rule,"onUpdate:value":u=>c.rule=u,options:t.ruleOptions},null,8,["value","onUpdate:value","options"])]),e.createElementVNode("div",Ji,[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",Zi,[es,e.createVNode(s,{value:c.name,"onUpdate:value":u=>c.name=u,style:{width:"100px",margin:"0 10px"}},null,8,["value","onUpdate:value"]),ts]),e.createElementVNode("div",{class:"clear-truncation",onClick:u=>t.clearData(c)},"清空",8,os)]))),128))])}const as=te(Ki,[["render",ns],["__scopeId","data-v-f543c690"]]),Ve=(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},rs=t=>t.replace(/\\n/g,`
|
|
59
|
+
`),$o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),jt=t=>{const o=[];if(t!=null&&t.length)for(const n of t)n.conditions?o.push(...jt(n.conditions)):(n==null?void 0:n.dataType)==="component"&&o.push(n);return o},qn=(t,o)=>{var x;const{controlList:n=[],classificationList:a=[],rowHeaderList:r=[],dimensionList:l=[],seriesList:i=[],leftAxisList:d=[],rightAxisList:s=[],queryColumnList:c=[],indicators:p=[]}=t,u=[],f=[...a,...r,...l,...i,...d,...s,...c,...p],h=[];for(const S of f){const w=jt((S==null?void 0:S.conditions)||[]);if(w!=null&&w.length){const V=w.filter(m=>Yn(m,o)?(m==null?void 0:m.dataType)==="component":!1).map(m=>{const E=Yn(m,o),b={};return m!=null&&m.dateFormat&&(b.format=m.dateFormat),{conditionKey:m.fieldName,conditionLabel:m.fieldName,conditionName:m.fieldName,conditionValueType:m.fieldType,id:E.id,keyName:m.fieldValue,rule:m.rule,notGlobal:!0,indexCode:m.indexCode,typeGuid:m.typeGuid,indexCodeNum:m.indexCodeNum,...b}});if(V!=null&&V.length)for(const m of V)h.find(E=>E.keyName===m.keyName)||h.push(m)}}const A=n.concat(h),g=A.length;for(let S=0;S<g;S++){const w=A[S];if(w&&!((x=Object.keys(w))!=null&&x.length)||(w==null?void 0:w.conditionKey)==="parentCode")continue;const{id:V,keyName:m,conditionLabel:E,conditionKey:b,conditionValueType:O,prop:I,rule:L="NONE",notGlobal:D=!1,format:v,indexCode:W,indexCodeNum:_,typeGuid:y}=w;let T=m||V;T&&I&&(T+=`-${I}`);const N=o.find(H=>H.id===V),F={rule:L,label:E,fieldName:b,fieldValue:"",valueType:O,alias:T,globalCondition:!D,indexCode:W,indexCodeNum:_,typeGuid:y},{value:P,format:C="YYYY-MM-DD",operate:k,type:B="",useCurrentTime:M}=N||{},j=v||C;if(Ve(B,"date")){let H;if(M?H=ce():H=ce(P),k&&P){const{mode:Z,type:Q,value:X}=k;if(X)switch(Q){case"add":H=H.add(X,Z);break;case"minus":H=H.subtract(X,Z);break}}F.fieldValue=(H==null?void 0:H.format(j))||"",F.dateFormat=j}else if(B==="ecanRangePicker"){const{interval:H,intervalUnit:Z}=N||{};let Q=I;if(!I){const ne=m==null?void 0:m.split("-");ne!=null&&ne.length&&(Q=ne[ne.length-1])}if(!Q)return;let X=null;if(M&&(Q==="startTime"?X=ce().subtract(H,Z):Q==="endTime"&&(X=ce())),N[Q]&&(X=ce(N[Q])),k){const{type:ne,value:de,mode:se}=k;switch(ne){case"add":X=X&&X.add(de,se);break;case"minus":X=X&&X.subtract(de,se)}}X&&(F.fieldValue=X==null?void 0:X.format(j)),F.dateFormat=j}else{const H=P&&P.match(/\{(.+?)\}/g);H!=null&&H.length?F.fieldValue="":F.fieldValue=P}u.push(F)}for(let S=u.length-1;S>=0;S--){const w=u[S];w.globalCondition||u.find(m=>m.alias===w.alias&&m.globalCondition)&&u.splice(S,1)}return u},Rt=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 Yn(t,o){var n;if(t.componentId)return o.find(a=>a.id===t.componentId);if(t.dataType==="component")if(t.fieldType==="DATE"){const a=(n=t.fieldValue)==null?void 0:n.split("-");return a!=null&&a.length?a[0]:null}else return o.find(a=>a.keyName===t.fieldValue);else return null}let Do=(t=21)=>{let o="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let a=n[t]&63;a<36?o+=a.toString(36):a<62?o+=(a-26).toString(36).toUpperCase():a<63?o+="_":o+="-"}return o};const ls=e.defineComponent({name:"FilterModal",props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""}},components:{ConditionList:Yi,TruncationList:as,AModal:$.Modal,AButton:$.Button,ATabs:$.Tabs,ATabPane:$.TabPane},setup(t,{expose:o}){var W;const n=e.ref("1"),a=()=>{var _;return`添加过滤条件-${((_=t.item)==null?void 0:_.label)||""}`},r=e.inject(pe),l=e.inject(ke),i=e.inject(ze),d=e.computed(()=>{var _;return(_=e.unref(r))==null?void 0:_.dataSourceId}),s=e.inject(Me),c=e.inject($t),p=e.ref([]),u=e.ref([]),f=e.ref(!1);e.watch(f,_=>{var y,T,N,F;_&&(Array.isArray((y=t.item)==null?void 0:y.conditions)&&(p.value=oe.cloneDeep((T=t.item)==null?void 0:T.conditions)||[]),Array.isArray((N=t.item)==null?void 0:N.truncations)?u.value=oe.cloneDeep((F=t.item)==null?void 0:F.truncations)||[]:u.value=[{rule:"",num:0,name:"其他"}]),window.changeShowTable&&window.changeShowTable(!_)},{flush:"post"});let h=!1;const A=_=>{var y;h=!0,e.unref(p)==null||((y=e.unref(p))==null?void 0:y.length)===0?p.value=[{}]:e.unref(p)[0]!=null&&(e.unref(p)[0].conditions==null||e.unref(p)[0].join!==_?p.value=[{join:_,conditions:[e.unref(p)[0],{keyValue:Do()}]}]:e.unref(p)[0].conditions.length>1&&e.unref(p)[0].join===_&&p.value[0].conditions.push({keyValue:Do()}))};e.provide(rn,{updateCondition(_,y,T){var F;h=!0;let N=e.unref(p);for(let P=0;P<y&&N[0];P++)N=(F=N[0])==null?void 0:F.conditions;Array.isArray(N)&&N[T]&&(N[T]=_)},deleteCondition(_,y){var N,F;h=!0;let T=e.unref(p);for(let P=0;P<_&&T[0];P++)T=(N=T[0])==null?void 0:N.conditions;if(Array.isArray(T)&&T[y]&&(T.splice(y,1),T.length===1)){let P=e.unref(p);const C=_-2>0?_-2:0;for(let k=0;k<C&&P[0];k++)P=(F=P[0])==null?void 0:F.conditions;P[0].join===T[0].join?P[0].conditions=[...T[0].conditions,...P[0].conditions.slice(1)]:P[0]=T[0]}}});const g=_=>{h=!0,u.value=_},x=e.computed(()=>{var y;const _=[];return(y=e.unref(i))==null||y.forEach(T=>{const{keyName:N="",id:F="",type:P}=T;P==="ecanRangePicker"?_.push({value:`${F}-startTime`,label:`${N||F}-开始时间值`,keyName:`${N||F}-startTime`},{value:`${F}-endTime`,label:`${N||F}-结束时间值`,keyName:`${N||F}-endTime`}):_.push({value:F,label:`${N||F}`,keyName:`${N||F}`})}),_}),S=()=>{var C,k;const{controlList:_=[]}=e.unref(r),y=((C=e.unref(r)[t.type])==null?void 0:C.slice())||[],T=jt(oe.cloneDeep(y[t.index].conditions));y[t.index].conditions=e.unref(p),["classificationList","rowHeaderList","dimensionList"].includes(t.type)&&((k=e.unref(u))!=null&&k.length)&&(y[t.index].truncations=e.unref(u));const N=jt(e.unref(p));for(const B of N)if(B.dataType==="component"&&B.fieldValue){const M=e.unref(x).find(j=>j.value===B.fieldValue);M&&(B.fieldValue=M.keyName)}const F=T.filter(B=>!N.find(M=>M.componentId===B.componentId)).filter(B=>!_.find(M=>M.id===B.componentId)),P=N.filter(B=>!T.find(M=>M.componentId===B.componentId));w(F,P),l({[t.type]:y,sqlConditions:qn({...e.unref(r),[t.type]:y},e.unref(i))})};function w(_,y){var N;const T=_.map(F=>({...F,delete:!0})).concat(y.map(F=>({...F,add:!0})));for(const F of T){const P=e.unref(i).find(C=>C.id===F.componentId);if(P){const{type:C,id:k,events:B=[]}=P,M=Rt(C);if(F.add)B.find(j=>{var H;return j.on===M&&j.target===((H=e.unref(s))==null?void 0:H.id)&&j.emit==="refreshData"})||c({id:k,events:[...B,{on:M,target:(N=e.unref(s))==null?void 0:N.id,emit:"refreshData"}].reverse()});else if(F.delete){const j=B.findIndex(H=>{var Z;return H.on===M&&H.target===((Z=e.unref(s))==null?void 0:Z.id)&&H.emit==="refreshData"});j!==-1&&(B.splice(j,1),c({id:k,events:B}))}}}}const V=()=>{f.value=!0},m=()=>{p.value=[],f.value=!1},E=()=>{h&&S(),h=!1,m()},b=()=>{m()},O=e.inject(Le),I=e.unref(e.inject(Be)),L=(W=window==null?void 0:window.config)==null?void 0:W.pageId,D=e.ref([]);e.provide(ln,D);const v=async _=>{var y;if(["leftAxisList","rightAxisList","indicators","queryColumnList"].includes(t.type))try{const{id:T,indexCode:N}=_,F=await O.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:L,dataSourceId:e.unref(d),indexGuid:T,indexCode:N},{headers:{Authentication:I,operateContext:"ygt"}}),{success:P,data:C=[]}=F.data;P&&((y=C==null?void 0:C.dataViewColumns)!=null&&y.length)&&(D.value=C.dataViewColumns)}catch(T){console.error(T)}};return e.watch(()=>t.item,_=>{_&&f.value&&v(_)}),o({showModal:V}),{visible:f,onOk:E,onCancel:b,handleTitle:a,conditionList:p,truncationList:u,addCondition:A,onUpdatetruncation:g,activeKey:n}}}),Wu="",is={class:"header"},ss={class:"header"};function cs(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("condition-list"),s=e.resolveComponent("a-tab-pane"),c=e.resolveComponent("truncation-list"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(u,{title:t.handleTitle(),visible:t.visible,"destroy-on-close":"",width:"55%",bodyStyle:{height:"70vh",overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[["classificationList","rowHeaderList","dimensionList"].includes(t.type)?(e.openBlock(),e.createBlock(p,{key:0,activeKey:t.activeKey,"onUpdate:activeKey":o[3]||(o[3]=f=>t.activeKey=f)},{default:e.withCtx(()=>[e.createVNode(s,{key:"1",tab:"过滤条件",style:{overflow:"auto"}},{default:e.withCtx(()=>[e.createElementVNode("div",is,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[0]||(o[0]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[1]||(o[1]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[2]||(o[2]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])]),_:1}),e.createVNode(s,{key:"2",tab:"截断配置"},{default:e.withCtx(()=>[e.createVNode(c,{list:t.truncationList,onUpdate:t.onUpdatetruncation},null,8,["list","onUpdate"])]),_:1})]),_:1},8,["activeKey"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ss,[Array.isArray(t.conditionList)&&t.conditionList.length>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(i,{class:"add-and-condition",onClick:o[4]||(o[4]=f=>t.addCondition("&&"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加且条件 ")]),_:1}),e.createVNode(i,{class:"add-or-condition",onClick:o[5]||(o[5]=f=>t.addCondition("||"))},{default:e.withCtx(()=>[e.createTextVNode(" 添加或条件 ")]),_:1})],64)):(e.openBlock(),e.createBlock(i,{key:1,onClick:o[6]||(o[6]=f=>t.addCondition())},{default:e.withCtx(()=>[e.createTextVNode(" 添加条件 ")]),_:1}))]),e.createVNode(d,{class:"condition-list",list:t.conditionList,level:0,type:t.type},null,8,["list","type"])],64))]),_:1},8,["title","visible","onOk","onCancel"])}const ds=te(ls,[["render",cs],["__scopeId","data-v-f61fc948"]]),ps=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(pe),r=e.inject(ke),l=e.ref(),i=p=>{const{showLabel:u="",label:f=""}=p;l.value=u||f||"",n.value=!0},d=()=>{n.value=!1},s=()=>{var u;const p=((u=e.unref(a)[t.type])==null?void 0:u.slice())||[];p[t.index].showLabel=l.value,r({[t.type]:p}),d()},c=()=>{d()};return o({showModal:i}),{visible:n,onOk:s,onCancel:c,fieldName:l}}}),qu="",us=t=>(e.pushScopeId("data-v-de6a1755"),t=t(),e.popScopeId(),t),fs={class:"config-name"},ms=us(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"名称:",-1));function hs(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置展示名称",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",fs,[ms,e.createVNode(i,{value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s)},null,8,["value"])])]),_:1},8,["visible","onOk","onCancel"])}const ys=te(ps,[["render",hs],["__scopeId","data-v-de6a1755"]]),gs=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(pe),r=e.inject(ke),l=e.inject(ze),i=e.inject(Me),d=e.inject($t),s=e.ref(),c=e.computed(()=>{var S;return(S=e.unref(l))==null?void 0:S.filter(w=>w.keyName!=="")});let p=[];const u=S=>{const{sortCpnts:w=[]}=S;p=oe.cloneDeep(w),s.value=oe.cloneDeep(w),n.value=!0},f=()=>{n.value=!1},h=()=>{var E;const{controlList:S=[]}=e.unref(a),w=p.filter(b=>!e.unref(s).includes(b)).filter(b=>!S.find(O=>O.id===b)),V=e.unref(s).filter(b=>!p.includes(b)).filter(b=>!S.find(O=>O.id===b)),m=w.map(b=>({componentId:b,delete:!0})).concat(V.map(b=>({componentId:b,add:!0})));for(const b of m){const O=e.unref(l).find(I=>I.id===b.componentId);if(O){const{type:I,id:L,events:D=[]}=O,v=Rt(I);if(b.add)D.find(W=>{var _;return W.on===v&&W.target===((_=e.unref(i))==null?void 0:_.id)&&W.emit==="refreshData"})||d({id:L,events:[...D,{on:v,target:(E=e.unref(i))==null?void 0:E.id,emit:"refreshData"}].reverse()});else if(b.delete){const W=D.findIndex(_=>{var y;return _.on===v&&_.target===((y=e.unref(i))==null?void 0:y.id)&&_.emit==="refreshData"});W!==-1&&(D.splice(W,1),d({id:L,events:D}))}}}},A=()=>{var w;h();const S=((w=e.unref(a)[t.type])==null?void 0:w.slice())||[];S[t.index].sortCpnts=s.value,r({[t.type]:S}),f()},g=()=>{f()},x=(S,w)=>{var V;return(V=w==null?void 0:w.keyName)==null?void 0:V.toLowerCase().includes(S==null?void 0:S.toLowerCase())};return o({showModal:u}),{visible:n,onOk:A,onCancel:g,idFilterOption:x,fieldName:s,usedComponentList:c}}}),Yu="",bs=t=>(e.pushScopeId("data-v-2943f455"),t=t(),e.popScopeId(),t),Cs={class:"sort-by-cpnt"},ws=bs(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"控件:",-1));function _s(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联组件排序",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",Cs,[ws,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),mode:"multiple",style:{width:"100%"},options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const xs=te(gs,[["render",_s],["__scopeId","data-v-2943f455"]]),ks=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(pe),r=e.inject(ke),l=e.ref(),i=e.ref([]),d=(f,h)=>{const{dimByCount:A=""}=f;l.value=A,i.value=h.filter(g=>["DIM","BUILT_IN_DIM"].includes(g.scope)).map(g=>({label:g.title||g.name,value:g.typeGuid})),n.value=!0},s=()=>{n.value=!1},c=()=>{var h;const f=((h=e.unref(a)[t.type])==null?void 0:h.slice())||[];f[t.index].dimByCount=l.value,r({[t.type]:f}),s()},p=()=>{s()},u=(f,h)=>{var A;return(A=h==null?void 0:h.label)==null?void 0:A.toLowerCase().includes(f==null?void 0:f.toLowerCase())};return o({showModal:d}),{visible:n,onOk:c,onCancel:p,idFilterOption:u,fieldName:l,dimensionList:i}}}),Ku="",Ss=t=>(e.pushScopeId("data-v-e8608437"),t=t(),e.popScopeId(),t),As={class:"dim-by-count"},Ns=Ss(()=>e.createElementVNode("div",{style:{"word-break":"keep-all"}},"维度:",-1));function Ts(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(d,{title:"配置关联维度",visible:t.visible,"destroy-on-close":"",width:"30%",bodyStyle:{overflow:"auto",display:"flex",flexDirection:"column",position:"relative",paddingTop:"10px"},closable:!1,onOk:t.onOk,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createElementVNode("div",As,[Ns,e.createVNode(i,{class:"field-name",value:t.fieldName,"onUpdate:value":o[0]||(o[0]=s=>t.fieldName=s),style:{width:"100%"},options:t.dimensionList,"show-search":"","filter-option":t.idFilterOption},null,8,["value","options","filter-option"])])]),_:1},8,["visible","onOk","onCancel"])}const Es=te(ks,[["render",Ts],["__scopeId","data-v-e8608437"]]),vo=(t,o)=>{let n;for(let a=0;a<o.length;a++){const r=o[a];r.children&&(r.children.some(l=>l.key===t)?n=r.key:vo(t,r.children)&&(n=vo(t,r.children)))}return n},Ls=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,DoubleRightOutlined:ml},emits:["update:value","change"],setup(t,{emit:o}){const n=e.inject(Le),a=e.unref(e.inject(Be)),r=e.inject(pe),l=e.computed(()=>e.unref(r).leftAxisList||[]),i=e.computed(()=>e.unref(r).rightAxisList||[]),d=e.computed(()=>e.unref(r).indicators||[]),s=e.computed(()=>e.unref(r).queryColumnList||[]),c=e.computed(()=>{console.log("graphicConfig",r);const b=e.unref(l).concat(e.unref(i)).concat(e.unref(d)).concat(e.unref(s));return t.mode==="edit"?(b==null?void 0:b.filter(O=>{var I;return O.id!==((I=t.item)==null?void 0:I.id)}))||[]:b||[]}),p=e.computed({get:()=>t.value||"",set:b=>{o("update:value",b),o("change",b)}}),u=e.ref(""),f=b=>{const O=document.getElementById("calTextArea");let I=p.value;if(document.selection){const L=document.selection.createRange();L.text=b}else if(typeof O.selectionStart=="number"&&typeof O.selectionEnd=="number"){const L=O.selectionStart,D=O.selectionEnd;let v=L;I=I.substring(0,L)+b+I.substring(D,I.length),v+=b.length,O.selectionStart=O.selectionEnd=v}else I+=b;p.value=I},h=["+","-","*","/","(",")"],A=(b,O)=>{let I="";switch(O){case"name":{I="${"+b+"}";break}case"function":{I=b+"()";break}default:I=b}f(I)},g=[],x=e.ref([]),S=e.ref(!0),w=e.ref([]),V=b=>{var O;for(const I of b)(O=I==null?void 0:I.children)!=null&&O.length?V(I.children):g.push({key:I.key,title:I.title})},m=async()=>{try{const b=await n.get(`${xe}/diagram/funcdescs`,{},{headers:{Authentication:a,operateContext:"ygt"}}),{success:O,data:I=[]}=b.data;O&&(I!=null&&I.length)&&(V(I),w.value=I)}catch(b){console.error(b)}},E=b=>{x.value=b,S.value=!1};return e.watch(u,b=>{const O=g.map(I=>I.title.indexOf(b)>-1?vo(I.key,w.value):null).filter((I,L,D)=>I&&D.indexOf(I)===L);x.value=O,u.value=b,S.value=!0}),e.onMounted(()=>{m()}),{fieldList:c,myValue:p,calculMethods:h,funcDescsData:w,searchFuncValue:u,expandedKeys:x,autoExpandParent:S,selectedElem:A,onExpand:E}}}),Qu="",Xu="",Bs={class:"formula-calculation"},Os={class:"field-area"},Vs=["onClick"],Is={class:"cal_right_bottom"},Fs={class:"cal_fu"},$s=["onClick"],Ds={class:"function-wrap"},vs={class:"wrap-search"},Ps={class:"tree-box"},Ms={key:0},js={style:{color:"#f50"}},Rs={key:1},Us=["onClick"],Gs={class:"cal_a"};function zs(t,o,n,a,r,l){const i=e.resolveComponent("a-col"),d=e.resolveComponent("a-textarea"),s=e.resolveComponent("a-input-search"),c=e.resolveComponent("a-tree"),p=e.resolveComponent("double-right-outlined"),u=e.resolveComponent("a-popover"),f=e.resolveComponent("a-row");return e.openBlock(),e.createElementBlock("div",Bs,[e.createVNode(f,{style:{height:"100%"}},{default:e.withCtx(()=>[e.createVNode(i,{span:6},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[e.createElementVNode("div",null,"数值字段("+e.toDisplayString(t.fieldList.length)+")",1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,(h,A)=>(e.openBlock(),e.createElementBlock("div",{class:"field",key:A,onClick:g=>t.selectedElem(h.label,"name")},e.toDisplayString(h.label),9,Vs))),128))])]),_:1}),e.createVNode(i,{span:18},{default:e.withCtx(()=>[e.createVNode(d,{class:"textarea",id:"calTextArea",value:t.myValue,"onUpdate:value":o[0]||(o[0]=h=>t.myValue=h),autoSize:{minRows:13,maxRows:13},placeholder:"示例: ${指标} * 3"},null,8,["value"]),e.createElementVNode("div",Is,[e.createElementVNode("ul",Fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calculMethods,(h,A)=>(e.openBlock(),e.createElementBlock("li",{onClick:g=>t.selectedElem(h,"symbol"),key:A},e.toDisplayString(h),9,$s))),128))]),e.createVNode(u,{placement:"topRight",trigger:"click",overlayClassName:"func-popover"},{content:e.withCtx(()=>[e.createElementVNode("div",Ds,[e.createElementVNode("div",vs,[e.createVNode(s,{value:t.searchFuncValue,"onUpdate:value":o[1]||(o[1]=h=>t.searchFuncValue=h),style:{"margin-bottom":"8px"},placeholder:"请输入关键字搜索"},null,8,["value"])]),e.createElementVNode("div",Ps,[e.createVNode(c,{"expanded-keys":t.expandedKeys,"auto-expand-parent":t.autoExpandParent,"tree-data":t.funcDescsData,onExpand:t.onExpand},{title:e.withCtx(({title:h,leaf:A})=>[h.indexOf(t.searchFuncValue)>-1?(e.openBlock(),e.createElementBlock("span",Ms,[e.createTextVNode(e.toDisplayString(h.substr(0,h.indexOf(t.searchFuncValue)))+" ",1),e.createElementVNode("span",js,e.toDisplayString(t.searchFuncValue),1),e.createTextVNode(" "+e.toDisplayString(h.substr(h.indexOf(t.searchFuncValue)+t.searchFuncValue.length)),1)])):(e.openBlock(),e.createElementBlock("span",Rs,e.toDisplayString(h),1)),A?(e.openBlock(),e.createElementBlock("span",{key:2,class:"insertsty",onClick:g=>t.selectedElem(h,"function")},"插入",8,Us)):e.createCommentVNode("",!0)]),_:1},8,["expanded-keys","auto-expand-parent","tree-data","onExpand"])])])]),default:e.withCtx(()=>[e.createElementVNode("span",Gs,[e.createTextVNode(" 更多函数 "),e.createVNode(p,{style:{"font-size":"12px",margin:"2px 0 0 2px",color:"#1890ff"}})])]),_:1})])]),_:1})]),_:1})])}const Hs=te(Ls,[["render",zs],["__scopeId","data-v-d5a15c98"]]),Ws=e.defineComponent({name:"CalculationModal",components:{FormulaCalculation:Hs,AForm:$.Form,AModal:$.Modal,AFormItem:$.FormItem,AInput:$.Input,ASelect:$.Select,ASelectOption:$.SelectOption,ATextarea:$.Textarea,AInputNumber:$.InputNumber,ATooltip:$.Tooltip,QuestionCircleOutlined:Pl},props:{item:{type:Object,default:()=>({})},index:{type:Number,default:0},type:{type:String,default:""},mode:{type:String,default:"add"}},setup(t,{expose:o}){const n=e.inject(ze),a=e.inject(pe),r=e.inject(ke),l=e.computed(()=>e.unref(n)),i=e.computed(()=>e.unref(a)[t.type]||[]),d=e.computed(()=>{const _=["leftAxisList","rightAxisList","queryColumnList","indicators"];let y=[];for(const T of _)Object.prototype.hasOwnProperty.call(e.unref(a),T)&&(y=y.concat(e.unref(a)[T]));return y}),s={span:4},c={span:18},p={label:"",calcType:"FORMULA",formula:void 0,builtInValueSource:void 0,builtInFormula:void 0,builtInCalcWay:void 0},u={value:0,unit:"YEAR",around:"before"},f=e.ref({}),h=e.ref(),A=e.ref(!1),g=e.ref();e.watch(A,_=>{if(_)if(t.mode==="edit"){const{label:y,calcType:T,formula:N,builtInValueSource:F,builtInFormula:P,builtInCalcWay:C}=t.item;if(g.value={label:y,calcType:T,formula:N,builtInValueSource:F,builtInFormula:P,builtInCalcWay:C},P==="DATE_OFFSET"){const k=C.split("-");(k==null?void 0:k.length)===3&&(f.value={value:k[0],unit:k[1],around:k[2]})}}else t.mode==="add"&&(g.value=oe.cloneDeep(p),f.value=oe.cloneDeep(u));else g.value=oe.cloneDeep(p),f.value=oe.cloneDeep(u);window.changeShowTable&&window.changeShowTable(!_)},{immediate:!0,deep:!0});let x=!1;const S=()=>{x=!0},w=_=>{const y=e.unref(l).find(T=>T.id===_);y&&(g.value.builtInCalcWay=y.keyName),x=!0},V=()=>{var F;const _=((F=e.unref(a)[t.type])==null?void 0:F.slice())||[],{label:y,builtInFormula:T}=e.unref(g)||{},N={};if(T==="DATE_OFFSET"&&(N.builtInCalcWay=`${e.unref(f).value}-${e.unref(f).unit}-${e.unref(f).around}`),t.mode==="add"){const P=Do();_.push({...e.unref(g),...N,id:P,show:!0,name:y})}else t.mode==="edit"&&(_[t.index]={..._[t.index],...e.unref(g),...N,name:y});r({[t.type]:_})},m=()=>{A.value=!0},E=()=>{A.value=!1},b=async(_,y)=>{if(y==="")return Promise.reject(new Error("请输入指标名"));{const T=e.unref(d).find(N=>N.label===y);return T?T.id===t.item.id?Promise.resolve():Promise.reject(new Error("指标名不能重复")):Promise.resolve()}},O=e.computed(()=>{let _={label:[{required:!0,validator:b,trigger:"change"}]};return g.value.calcType==="BUILT_IN"&&(_={..._,builtInFormula:[{required:!0,message:"请选择内置公式"}],builtInValueSource:[{required:!0,message:"请选择数值来自"}],builtInCalcWay:[{required:!0,message:"请选择取数原则"}]}),_}),I=()=>{h.value.validate().then(()=>{x&&V(),x=!1,E()})},L=()=>{h.value.clearValidate(),E()},D=()=>{x=!0,e.unref(g).builtInCalcWay=""},v=e.computed(()=>{let _="";const y=e.unref(g).builtInCalcWay,T=e.unref(g).builtInValueSource;if(!T||!y)return _;switch(e.unref(g).builtInFormula){case"BUILT_IN_RANK":{y==="ASC"?_="【"+T+"】由小到大在所有值中的排名":_="【"+T+"】由大到小在所有值中的排名";break}case"BUILT_IN_RANK_IN_GROUPO":{_=`所有【】的
|
|
60
|
+
`,y==="ASC"?_=_+"【"+T+"】由小到大的组内的排名":_=_+"【"+T+"】由大到小的组内的排名";break}case"BUILT_IN_ALL_VALUE":{let N="";switch(y){case"SUM":{N="求和";break}case"AVG":{N="求平均值";break}case"MIN":{N="求最小值";break}case"MAX":{N="求最大值";break}}_="将所有【"+T+"】"+N;break}case"BUILT_IN_ALL_VALUE_IN_GROUPO":{let N="";switch(_=`所有【】的
|
|
61
|
+
`,y){case"SUM":{N="求和";break}case"AVG":{N="求平均值";break}case"MIN":{N="求最小值";break}case"MAX":{N="求最大值";break}}_=_+"将所有【"+T+"】"+N;break}}return _}),W=(_,y)=>y.keyName.toLowerCase().indexOf(_.toLowerCase())>=0;return o({showModal:m}),{visible:A,onCancel:L,labelCol:s,wrapperCol:c,formState:g,builtInValueSourceList:i,onOK:I,onChange:S,formRules:O,accessLogic:v,formRef:h,onChangeBuiltInFormula:D,componentList:l,onChangeComponent:w,filterOption:W,offsetConfig:f}}}),Ju="",Zu="",qs={key:0,class:"accesstip"},Ys={style:{display:"flex","align-items":"center"}};function Ks(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("a-form-item"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("formula-calculation"),u=e.resolveComponent("a-textarea"),f=e.resolveComponent("a-input-number"),h=e.resolveComponent("question-circle-outlined"),A=e.resolveComponent("a-tooltip"),g=e.resolveComponent("a-form"),x=e.resolveComponent("a-modal");return e.openBlock(),e.createBlock(x,{title:`${t.mode==="add"?"新增":"编辑"}计算指标`,visible:t.visible,width:"50%",bodyStyle:{height:"55vh",overflow:"auto",display:"flex",flexDirection:"column"},closable:!1,onOk:t.onOK,onCancel:t.onCancel},{default:e.withCtx(()=>[e.createVNode(g,{model:t.formState,rules:t.formRules,ref:"formRef"},{default:e.withCtx(()=>[e.createVNode(d,{label:"指标名","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"label"},{default:e.withCtx(()=>[e.createVNode(i,{value:t.formState.label,"onUpdate:value":o[0]||(o[0]=S=>t.formState.label=S),onChange:t.onChange},null,8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"计算方式","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.calcType,"onUpdate:value":o[1]||(o[1]=S=>t.formState.calcType=S),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"FORMULA"},{default:e.withCtx(()=>[e.createTextVNode("公式")]),_:1}),e.createVNode(s,{value:"BUILT_IN"},{default:e.withCtx(()=>[e.createTextVNode("内置公式")]),_:1}),e.createVNode(s,{value:"COMPONENT"},{default:e.withCtx(()=>[e.createTextVNode("固定值")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),t.formState.calcType==="FORMULA"?(e.openBlock(),e.createBlock(p,{key:0,value:t.formState.formula,"onUpdate:value":o[2]||(o[2]=S=>t.formState.formula=S),item:t.item,mode:t.mode,onChange:t.onChange},null,8,["value","item","mode","onChange"])):e.createCommentVNode("",!0),t.formState.calcType==="BUILT_IN"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(d,{label:"内置公式","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInFormula"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInFormula,"onUpdate:value":o[3]||(o[3]=S=>t.formState.builtInFormula=S),onChange:t.onChangeBuiltInFormula},{default:e.withCtx(()=>[e.createVNode(s,{value:"BUILT_IN_ALL_VALUE"},{default:e.withCtx(()=>[e.createTextVNode("所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_ALL_VALUE_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内所有值")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK"},{default:e.withCtx(()=>[e.createTextVNode("排名")]),_:1}),e.createVNode(s,{value:"BUILT_IN_RANK_IN_GROUPO"},{default:e.withCtx(()=>[e.createTextVNode("组内排名")]),_:1}),e.createVNode(s,{value:"FIRST_ROW_RATE"},{default:e.withCtx(()=>[e.createTextVNode("首行占比")]),_:1}),e.createVNode(s,{value:"DATE_OFFSET"},{default:e.withCtx(()=>[e.createTextVNode("日期偏移")]),_:1})]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),e.createVNode(d,{label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInValueSource,"onUpdate:value":o[4]||(o[4]=S=>t.formState.builtInValueSource=S),onChange:t.onChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.builtInValueSourceList,(S,w)=>(e.openBlock(),e.createBlock(s,{key:w,value:S.label,disabled:t.item.label===S.name},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"]),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:0,label:"取数原则","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{value:t.formState.builtInCalcWay,"onUpdate:value":o[5]||(o[5]=S=>t.formState.builtInCalcWay=S),onChange:t.onChange},{default:e.withCtx(()=>[["BUILT_IN_ALL_VALUE","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula||"")?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{value:"SUM"},{default:e.withCtx(()=>[e.createTextVNode("求和")]),_:1}),e.createVNode(s,{value:"AVG"},{default:e.withCtx(()=>[e.createTextVNode("求平均")]),_:1}),e.createVNode(s,{value:"MAX"},{default:e.withCtx(()=>[e.createTextVNode("求最大值")]),_:1}),e.createVNode(s,{value:"MIN"},{default:e.withCtx(()=>[e.createTextVNode("求最小值")]),_:1})],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(s,{value:"ASC"},{default:e.withCtx(()=>[e.createTextVNode("升序")]),_:1}),e.createVNode(s,{value:"DESC"},{default:e.withCtx(()=>[e.createTextVNode("降序")]),_:1})],64))]),_:1},8,["value","onChange"])]),_:1},8,["label-col","wrapper-col"])),["FIRST_ROW_RATE","DATE_OFFSET"].includes(t.formState.builtInFormula)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,{key:1,label:"取数逻辑","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[["BUILT_IN_RANK_IN_GROUPO","BUILT_IN_ALL_VALUE_IN_GROUPO"].includes(t.formState.builtInFormula)&&t.formState.builtInValueSource?(e.openBlock(),e.createElementBlock("div",qs," 蓝色字段跟随您后续维度设置的顺序而变化,以获取相应的"+e.toDisplayString(t.formState.builtInValueSource),1)):e.createCommentVNode("",!0),e.createVNode(u,{value:t.accessLogic,rows:6,disabled:""},null,8,["value"])]),_:1},8,["label-col","wrapper-col"]))],64)):e.createCommentVNode("",!0),t.formState.calcType==="COMPONENT"?(e.openBlock(),e.createBlock(d,{key:2,label:"数值来自","label-col":t.labelCol,"wrapper-col":t.wrapperCol,name:"builtInValueSource"},{default:e.withCtx(()=>[e.createVNode(c,{"show-search":"",value:t.formState.builtInValueSource,"onUpdate:value":o[6]||(o[6]=S=>t.formState.builtInValueSource=S),"filter-option":t.filterOption,options:t.componentList,fieldNames:{value:"id",label:"keyName"},onChange:t.onChangeComponent},null,8,["value","filter-option","options","onChange"])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0),t.formState.builtInFormula==="DATE_OFFSET"?(e.openBlock(),e.createBlock(d,{key:3,label:"偏移设置","label-col":t.labelCol,"wrapper-col":t.wrapperCol},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[e.createVNode(f,{value:t.offsetConfig.value,"onUpdate:value":o[7]||(o[7]=S=>t.offsetConfig.value=S),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},null,8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.unit,"onUpdate:value":o[8]||(o[8]=S=>t.offsetConfig.unit=S),style:{width:"120px","margin-right":"10px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"YEAR"},{default:e.withCtx(()=>[e.createTextVNode("年")]),_:1}),e.createVNode(s,{value:"MONTH"},{default:e.withCtx(()=>[e.createTextVNode("月")]),_:1}),e.createVNode(s,{value:"DAY"},{default:e.withCtx(()=>[e.createTextVNode("天")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(c,{value:t.offsetConfig.around,"onUpdate:value":o[9]||(o[9]=S=>t.offsetConfig.around=S),style:{width:"120px"},onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(s,{value:"before"},{default:e.withCtx(()=>[e.createTextVNode("前")]),_:1}),e.createVNode(s,{value:"after"},{default:e.withCtx(()=>[e.createTextVNode("后")]),_:1})]),_:1},8,["value","onChange"]),e.createVNode(A,{title:"内置公式【日期偏移】,依赖于【全局过滤】中的时间条件,若没有配置则不会进行偏移计算",overlayClassName:"question-tooltip",color:"#fff"},{default:e.withCtx(()=>[e.createVNode(h,{class:"icon",style:{color:"#989898","font-size":"18px",cursor:"pointer","margin-left":"10px"}})]),_:1})])]),_:1},8,["label-col","wrapper-col"])):e.createCommentVNode("",!0)]),_:1},8,["model","rules"])]),_:1},8,["title","visible","onOk","onCancel"])}const Qs=te(Ws,[["render",Ks],["__scopeId","data-v-c0f3affa"]]),Xs=e.defineComponent({name:"DataConfigCard",directives:{focus:Hn},components:{CalculationModal:Qs,FilterModal:ds,CustomGroupModal:Ci,SettingOutlined:Ul,DeleteOutlined:dl,CopyOutlined:ll,InfoCircleOutlined:xl,CustomSortModal:li,PlusOutlined:Fl,ACard:$.Card,ACheckbox:$.Checkbox,AInput:$.Input,ADropdown:$.Dropdown,AMenu:$.Menu,ASubMenu:$.SubMenu,AMenuItem:$.MenuItem,AMenuDivider:$.MenuDivider,ASelect:$.Select,APopover:$.Popover,Draggable:bt,ConfigName:ys,SortByCpnt:xs,DimByCount:Es},props:{title:{type:String,default:""},type:{type:String,default:""}},setup(t){const o=[{label:"年",value:"YYYY"},{label:"年月",value:"YYYY-MM"},{label:"年月日",value:"YYYY-MM-DD"}],n=e.inject(pe),a=e.inject(ke),r=["leftAxisList","rightAxisList","indicators"],l=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],i=e.inject(lo),d=(U={})=>{var Y;const{type:G}=t;if(e.unref(i)==="SQL_VIEW")return!0;let q=!1;if(["IDX","BUILT_IN_IDX"].includes(U.scope)?r.includes(G)&&(q=!0):["DIM","BUILT_IN_DIM"].includes(U.scope)&&l.includes(G)&&(q=!0),G==="dimensionList"){const le=((Y=e.unref(n)[G])==null?void 0:Y.slice())||[];(le==null?void 0:le.length)===1&&(q=!1)}return q},s=e.computed(()=>e.unref(he).type==="ecanDataSelect"&&t.type==="indicators"),c=(U="{}")=>{var G;try{const q=JSON.parse(U);if(!d(q))return;const Y=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(s))&&Y.forEach(le=>{le.show=!1}),u(Y,q),Y.push(q),a({[t.type]:Y}),sessionStorage.setItem("indicator-list-item","")}catch(q){console.error(q)}},p=(U="{}")=>{var G;try{const{cardItem:q,type:Y,index:le}=JSON.parse(U);if(!d(q)||Y===t.type)return;const ie=((G=e.unref(n)[t.type])==null?void 0:G.slice())||[];u(ie,q),ie.push(q);const ae=e.unref(n)[Y].slice()||[];ae.splice(le,1),a({[t.type]:ie,[Y]:ae})}catch(q){console.error(q)}};function u(U,G){const q=[];if(U.forEach(Y=>{Y.label.includes(G.label)&&q.push(Y.label.split(G.label)[1])}),q.length>=1){for(let Y=1;Y<=q.length;Y++)if(!q.includes(Y+"")){G.label=G.label+Y;break}}}const f=(U,G)=>{var le,ie;const q=(le=U.target)==null?void 0:le.checked,Y=((ie=e.unref(n)[t.type])==null?void 0:ie.slice())||[];(["classificationList","seriesList"].includes(t.type)||e.unref(s))&&Y.forEach(ae=>{ae.show=!1}),Y[G].show=q,a({[t.type]:Y})},h=U=>{var q;const G=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];G.splice(U,1),a({[t.type]:G})},A=()=>{sessionStorage.setItem("indicator-card-item","")},g=()=>{const U=sessionStorage.getItem("indicator-list-item"),G=sessionStorage.getItem("indicator-card-item");U?c(U):G&&p(G)},x=U=>{var Pe,ot;const{newIndex:G,oldIndex:q,from:Y,to:le}=U,ie=Y.id,ae=le.id;if(G>=0&&q>=0){if(ie===ae){const re=((Pe=e.unref(n)[t.type])==null?void 0:Pe.slice())||[],fe=re.splice(q,1)[0];fe&&(re.splice(G,0,fe),a({[t.type]:re}))}else if(t.type===ae){const re=((ot=e.unref(n)[ae])==null?void 0:ot.slice())||[];if(re!=null&&re.length){const fe=re.splice(re.length-1,1)[0];fe&&(re.splice(G,0,fe),a({[t.type]:re}))}}}},S=(U,G)=>{const q=U.oldIndex,Y=G[q];Y&&sessionStorage.setItem("indicator-card-item",JSON.stringify({cardItem:Y,type:t.type,index:q}))},w=e.computed(()=>e.unref(n)[t.type]||[]),V=e.ref([]);let m=!1;e.watch(()=>e.unref(w).length,U=>{V.value=new Array(U).fill(!1)},{flush:"post",immediate:!0});const E=U=>{var q;const G=((q=e.unref(n)[t.type])==null?void 0:q.slice())||[];G.splice(U,1),a({[t.type]:G})},b=U=>{V.value[U]=!0},O=()=>{m=!0},I=(U,G,q)=>{var Y,le;if(V.value[G]=!1,m){const ie=(Y=U.target)==null?void 0:Y.value,ae=((le=e.unref(n)[t.type])==null?void 0:le.slice())||[],Pe=ae.filter(re=>{var fe;return(fe=re==null?void 0:re.formula)==null?void 0:fe.includes(q)}).map(re=>re.id),ot=ae.filter(re=>{var fe;return(fe=re==null?void 0:re.builtInValueSource)==null?void 0:fe.includes(q)}).map(re=>re.id);if(Pe!=null&&Pe.length)for(const re of Pe){const fe=ae.find(Zo=>Zo.id===re);fe.formula=fe.formula.replaceAll(q,ie)}if(ot!=null&&ot.length)for(const re of ot){const fe=ae.find(Zo=>Zo.id===re);fe.builtInValueSource=fe.builtInValueSource.replaceAll(q,ie)}ae[G].label=ie,a({[t.type]:ae})}m=!1},L="DEFAULT",D=e.computed(()=>{const U=e.unref(n)[t.type]||[],{leftAxisList:G=[],rightAxisList:q=[],indicators:Y=[]}=e.unref(n)||{};return[{id:L,label:"默认",name:"默认"},...U,...G,...q,...Y]}),v=(U={},G,q="ASC")=>{var Pe;const{label:Y,name:le,id:ie}=U,ae=((Pe=e.unref(n)[t.type])==null?void 0:Pe.slice())||[];ie===L?delete ae[G].sort:ae[G].sort={label:Y,columnName:le,type:"NORMAL",order:q},a({[t.type]:ae})},W=(U={},G="ASC")=>{const Y={ASC:"升序",DESC:"降序"}[G],{sort:le}=U,{label:ie,order:ae}=le||{};return ie&&ae===G?`${Y}(${ie})`:Y},_=e.ref(),y=e.ref(),T=e.ref(),N=e.ref(),F=(U={},G)=>{var q;_.value=U,y.value=G,(q=e.unref(T))==null||q.showModal()},P=U=>{var G;return"自定义排序"+(((G=U==null?void 0:U.sort)==null?void 0:G.type)==="CUSTOM"?"(已配置)":"")},C=(U={},G)=>{var q;_.value=U,y.value=G,(q=e.unref(N))==null||q.showModal()},k=U=>"自定义分组"+((U==null?void 0:U.customGroup)!=null?"(已配置)":""),B=[{name:"总和",value:"SUM"},{name:"平均数",value:"AVG"},{name:"最小值",value:"MIN"},{name:"最大值",value:"MAX"},{name:"计数",value:"COUNT"}],M=[{name:"是",value:1},{name:"否",value:0}],j=(U,G)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[G].aggregate=U,a({[t.type]:q})},H=(U,G)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[G].distinct=U,a({[t.type]:q})},Z=(U,G)=>{var Y;const q=((Y=e.unref(n)[t.type])==null?void 0:Y.slice())||[];q[G].dateFormat=U,a({[t.type]:q})},Q=(U="SUM")=>`汇总方式(${{SUM:"总和",AVG:"平均数",MIN:"最小值",MAX:"最大值",COUNT:"计数"}[U]})`,X=U=>`是否去重(${{0:"否",1:"是"}[U]||"否"})`,ne=(U={})=>{var G;return"过滤"+(U!=null&&U.conditions&&((G=U==null?void 0:U.conditions)==null?void 0:G.length)>0?"(已配置)":"")},de=e.ref(),se=e.ref(),Ie=e.ref(),It=e.ref(),Je=(U={},G)=>{_.value=U,y.value=G,e.unref(de).showModal()},ft=(U={},G)=>{_.value=U,y.value=G,e.unref(se).showModal(U)},mt=(U={},G)=>{_.value=U,y.value=G,e.unref(Ie).showModal(U)},Ze=(U={},G)=>{_.value=U,y.value=G,e.unref(It).showModal(U,e.unref(J))},qe=e.ref(),et=e.ref("add"),ht=(U,G,q)=>{var Y;et.value=U,U==="edit"&&(_.value=G,y.value=q),(Y=e.unref(qe))==null||Y.showModal()},_e=e.inject(Le),ve=e.unref(e.inject(Be)),Ge=e.ref([]),tt=e.computed(()=>e.unref(n)[t.type]||{}),Ye=async()=>{try{const U=await _e.post(`${xe}/diagram/dimFields`,{},{headers:{Authentication:ve,operateContext:"ygt"}}),{success:G,data:q=[]}=U.data;G&&(Ge.value=q)}catch(U){console.error(U)}},R=(U,G)=>{const q=e.unref(n)[t.type]||{};q[G]=U,a({[t.type]:q})},z=["classificationList","seriesList","rowHeaderList","queryColumnList","dimensionList"],K=e.ref({}),J=e.ref([]),ee=async(U,G)=>{var Y;const{name:q}=G;if(!z.includes(t.type)&&U&&$o(G,"indexCode")){const le=await _e.post(`${xe}/diagram/hrpIndexWithComplex`,{dataSourceId:"",indexGuid:G.id,indexCode:G.indexCode,pageId:(Y=window==null?void 0:window.config)==null?void 0:Y.pageId},{headers:{Authentication:ve,operateContext:"ygt"}}),{success:ie,data:ae}=le.data;ie&&ae&&(J.value=(ae==null?void 0:ae.dataViewColumns)||[],K.value[q]={name:ae.name,code:ae.indexCode})}},ue=U=>{const G=document.createElement("input");document.body.appendChild(G),G.setAttribute("value",U),G.select(),document.execCommand("copy"),document.body.removeChild(G),$.message.success("复制成功")},he=e.inject(Me),yt=e.computed(()=>t.type==="indicators"&&e.unref(he).type==="ecanTable"),gt=e.computed(()=>!!["indicators","classificationList","leftAxisList","rightAxisList"].includes(t.type));return e.onMounted(()=>{t.type==="formFields"&&(e.unref(he).type==="ecanDataSelect"?Ge.value=[{label:"维度编码",value:"_code"},{label:"维度值",value:"_value"}]:Ye())}),{onCheckboxChange:f,onDropEnd:h,onDragItemEnd:A,onDragItemAdd:g,onDragItemSort:x,onDragItemStart:S,cardItemList:w,onDelete:E,onEdit:b,onCommitLabelChange:I,sortList:D,onSort:v,handleSortTitle:W,showCustomSortModal:F,customSortModalRef:T,currentItem:_,currentIndex:y,handleCustomSortTitle:P,handleCustomGroupTitle:k,customGroupModalRef:N,showCustomGroupModal:C,editLabelList:V,onLabelChange:O,aggregateList:B,distinctList:M,onAggregateChange:j,onDistinctChange:H,onDateFormatChange:Z,handleAggregateTitle:Q,handleDistinctTitle:X,onShowCalculationModal:ht,handleFilterTitle:ne,filterModalRef:de,configNameRef:se,sortByCpntRef:Ie,dimByCountRef:It,showFilterModal:Je,calculationModalRef:qe,calculationModalMode:et,formatList:o,fieldOptions:Ge,fieldData:tt,onFieldChange:R,onVisibleChange:ee,copyDataViewName:ue,dataViewMap:K,isShowConfigName:yt,showConfigNameModal:ft,dimensionType:z,isShowSortByCpnt:gt,showSortByCpntModal:mt,dataSelectIndicators:s,showDimByCountModal:Ze}}}),ef="",tf="",rt=t=>(e.pushScopeId("data-v-eaf71f1f"),t=t(),e.popScopeId(),t),Js={class:"title"},Zs={class:"title-text"},ec={class:"field-wrap"},tc={class:"field-item"},oc=rt(()=>e.createElementVNode("div",{class:"item-label"},"名称:",-1)),nc={class:"field-item"},ac=rt(()=>e.createElementVNode("div",{class:"item-label"},"值:",-1)),rc={class:"title"},lc={class:"title-text"},ic=rt(()=>e.createElementVNode("p",null,"配置了维度后,会使用返回数据的第一条中以【维度名】为key的值作为显示值",-1)),sc=rt(()=>e.createElementVNode("span",null,"添加计算指标",-1)),cc={class:"card-item-wrap"},dc={class:"card-item-inner"},pc=["onClick"],uc=["onClick"],fc=["onClick"],mc={style:{display:"flex","align-items":"center"}},hc=["title"],yc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标名:",-1)),gc={style:{display:"flex","align-items":"center"}},bc=["title"],Cc=rt(()=>e.createElementVNode("span",{style:{"font-weight":"bold"}},"指标编码:",-1));function wc(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-card"),s=e.resolveComponent("info-circle-outlined"),c=e.resolveComponent("a-popover"),p=e.resolveComponent("plus-outlined"),u=e.resolveComponent("a-input"),f=e.resolveComponent("setting-outlined"),h=e.resolveComponent("a-menu-item"),A=e.resolveComponent("a-sub-menu"),g=e.resolveComponent("a-menu-divider"),x=e.resolveComponent("copy-outlined"),S=e.resolveComponent("a-menu"),w=e.resolveComponent("a-dropdown"),V=e.resolveComponent("delete-outlined"),m=e.resolveComponent("a-checkbox"),E=e.resolveComponent("draggable"),b=e.resolveComponent("custom-sort-modal"),O=e.resolveComponent("custom-group-modal"),I=e.resolveComponent("filter-modal"),L=e.resolveComponent("config-name"),D=e.resolveComponent("sort-by-cpnt"),v=e.resolveComponent("dim-by-count"),W=e.resolveComponent("calculation-modal"),_=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",Js,[e.createElementVNode("div",Zs,e.toDisplayString(t.title),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",ec,[e.createElementVNode("div",tc,[oc,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.labelField,options:t.fieldOptions,onChange:o[0]||(o[0]=y=>t.onFieldChange(y,"labelField"))},null,8,["value","options"])]),e.createElementVNode("div",nc,[ac,e.createVNode(i,{style:{width:"70%"},class:"item-select",value:t.fieldData.valueField,options:t.fieldOptions,onChange:o[1]||(o[1]=y=>t.onFieldChange(y,"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",rc,[e.createElementVNode("div",lc,[e.createTextVNode(e.toDisplayString(t.title)+" ",1),t.type==="dimensionList"?(e.openBlock(),e.createBlock(c,{key:0,title:"提示",placement:"topLeft"},{content:e.withCtx(()=>[ic]),default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#919191",cursor:"pointer"}})]),_:1})):e.createCommentVNode("",!0)]),!t.dimensionType.includes(t.type)&&!t.dataSelectIndicators?(e.openBlock(),e.createElementBlock("div",{key:0,class:"add-calculation",onClick:o[2]||(o[2]=e.withModifiers(y=>t.onShowCalculationModal("add"),["prevent","stop"]))},[e.createVNode(p,{class:"add-calculation-icon"}),sc])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(t.type+"-list"),style:{height:"100%",padding:"10px"}},[e.createVNode(E,{modelValue:t.cardItemList,"onUpdate:modelValue":o[3]||(o[3]=y=>t.cardItemList=y),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]=y=>t.onDragItemStart(y,t.cardItemList))},{item:e.withCtx(({element:y,index:T})=>[e.createElementVNode("div",cc,[e.createVNode(m,{class:"card-item",checked:y.show,onChange:N=>t.onCheckboxChange(N,T)},{default:e.withCtx(()=>[e.createElementVNode("div",dc,[!t.editLabelList[T]&&y.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"name",onClick:e.withModifiers(N=>t.onEdit(T),["prevent","stop"])},e.toDisplayString(y.label),9,pc)):e.createCommentVNode("",!0),!t.editLabelList[T]&&!y.label?(e.openBlock(),e.createElementBlock("div",{key:1,class:"name placeholder",onClick:e.withModifiers(N=>t.onEdit(T),["prevent","stop"])}," 请点击填入名字 ",8,uc)):e.createCommentVNode("",!0),t.editLabelList[T]?e.withDirectives((e.openBlock(),e.createBlock(u,{key:2,"default-value":y.label,size:"small",onBlur:N=>t.onCommitLabelChange(N,T,y.label),onPressEnter:N=>t.onCommitLabelChange(N,T,y.label),onChange:t.onLabelChange},null,8,["default-value","onBlur","onPressEnter","onChange"])),[[_]]):e.createCommentVNode("",!0),["FORMULA","BUILT_IN","COMPONENT"].includes(y.calcType)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"calculation-icon",onClick:e.withModifiers(N=>t.onShowCalculationModal("edit",y,T),["prevent","stop"])}," fx ",8,fc)):e.createCommentVNode("",!0),e.createVNode(w,{trigger:["click"],onVisibleChange:N=>t.onVisibleChange(N,y)},{overlay:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[t.dimensionType.includes(t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:t.handleSortTitle(y,"ASC"),key:"0"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,N=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:N.id,onClick:F=>t.onSort(N,T,"ASC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(A,{title:t.handleSortTitle(y,"DESC"),key:"1"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.sortList,N=>(e.openBlock(),e.createBlock(h,{class:"menu-item",style:{"white-space":"nowrap"},key:N.id,onClick:F=>t.onSort(N,T,"DESC")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.label),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(h,{onClick:N=>t.showCustomSortModal(y,T)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomSortTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(g),e.createVNode(h,{onClick:N=>t.showCustomGroupModal(y,T)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleCustomGroupTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(g),y.genericType==="DATE"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(A,{title:"日期格式化"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formatList,N=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:N.value,onClick:F=>t.onDateFormatChange(N.value,T)},{default:e.withCtx(()=>[e.createElementVNode("span",{style:e.normalizeStyle(y.dateFormat===N.value||!y.dateFormat&&N.value==="YYYY-MM"?"color: #1890FF;":"")},e.toDisplayString(N.label),5)]),_:2},1032,["onClick"]))),128))]),_:2},1024),e.createVNode(g)],64)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(h,{onClick:N=>t.showFilterModal(y,T)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.handleFilterTitle(y)),1)]),_:2},1032,["onClick"]),e.createVNode(g),["classificationList","seriesList"].includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(A,{title:t.handleAggregateTitle(y.aggregate)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.aggregateList,N=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:N.value,onClick:F=>t.onAggregateChange(N.value,T)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g)],64)),t.isShowConfigName?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createVNode(h,{onClick:N=>t.showConfigNameModal(y,T)},{default:e.withCtx(()=>[e.createTextVNode(" 修改展示名称 ")]),_:2},1032,["onClick"]),e.createVNode(g)],64)):e.createCommentVNode("",!0),t.isShowSortByCpnt?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createVNode(h,{onClick:N=>t.showSortByCpntModal(y,T)},{default:e.withCtx(()=>[e.createTextVNode(" 关联组件排序 ")]),_:2},1032,["onClick"]),e.createVNode(g)],64)):e.createCommentVNode("",!0),y.name==="the_count"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createVNode(h,{onClick:N=>t.showDimByCountModal(y,T)},{default:e.withCtx(()=>[e.createTextVNode(" 关联维度 ")]),_:2},1032,["onClick"]),e.createVNode(g),e.createVNode(A,{title:t.handleDistinctTitle(y.distinct)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.distinctList,N=>(e.openBlock(),e.createBlock(h,{style:{"white-space":"nowrap"},key:N.value,onClick:F=>t.onDistinctChange(N.value,T)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.name),1)]),_:2},1032,["onClick"]))),128))]),_:2},1032,["title"]),e.createVNode(g)],64)):e.createCommentVNode("",!0),t.dimensionType.includes(t.type)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:0,onClick:N=>t.copyDataViewName(t.dataViewMap[y.name].name)},{default:e.withCtx(()=>[e.createElementVNode("div",mc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].name},[yc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].name),1)],8,hc),e.createVNode(x,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0),t.dataViewMap[y.name]?(e.openBlock(),e.createBlock(h,{key:1,onClick:N=>t.copyDataViewName(t.dataViewMap[y.name].code)},{default:e.withCtx(()=>[e.createElementVNode("div",gc,[e.createElementVNode("span",{class:"data-view-name",title:t.dataViewMap[y.name].code},[Cc,e.createTextVNode(" "+e.toDisplayString(t.dataViewMap[y.name].code),1)],8,bc),e.createVNode(x,{style:{color:"#52C41A","margin-left":"10px"},title:"点击复制"})])]),_:2},1032,["onClick"])):e.createCommentVNode("",!0)],64))]),_:2},1024)]),default:e.withCtx(()=>[e.createVNode(f,{class:"setting-icon"})]),_:2},1032,["onVisibleChange"]),e.createVNode(V,{class:"delete-icon",onClick:e.withModifiers(N=>t.onDelete(T),["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,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(I,{item:t.currentItem,index:t.currentIndex,type:t.type,ref:"filterModalRef"},null,8,["item","index","type"]),e.createVNode(L,{index:t.currentIndex,type:t.type,ref:"configNameRef"},null,8,["index","type"]),e.createVNode(D,{index:t.currentIndex,type:t.type,ref:"sortByCpntRef"},null,8,["index","type"]),e.createVNode(v,{index:t.currentIndex,type:t.type,ref:"dimByCountRef"},null,8,["index","type"]),e.createVNode(W,{type:t.type,item:t.currentItem,index:t.currentIndex,mode:t.calculationModalMode,ref:"calculationModalRef"},null,8,["type","item","index","mode"])]),_:1},8,["head-style"]))}const _c=te(Xs,[["render",wc],["__scopeId","data-v-eaf71f1f"]]),xc={classificationList:{title:"分类"},seriesList:{title:"系列"},leftAxisList:{title:"左值轴"},rightAxisList:{title:"右值轴"},indicators:{title:"数值"},queryColumnList:{title:"查询列"},rowHeaderList:{title:"行表头"},formFields:{title:"字段"},dimensionList:{title:"维度"}},kc=e.defineComponent({name:"DataConfigGroup",components:{DataConfigCard:_c},setup(){const t=e.inject(Me),o=e.computed(()=>{var s;return(s=e.unref(t))==null?void 0:s.type}),n=e.computed(()=>{var s;return!!((s=e.unref(t))!=null&&s.isGroupTable)}),a=e.ref({}),r=e.reactive([]),l=e.inject(ke),i=(s,c)=>Object.prototype.hasOwnProperty.call(s,c);return(()=>{var x,S;const s=oe.cloneDeep((x=e.unref(t))==null?void 0:x.graphicConfig),c=["classificationList","seriesList","leftAxisList","rightAxisList","indicators","rowHeaderList","queryColumnList"],p={pie:["classificationList","indicators"],circulate:["classificationList","indicators"],bar:["classificationList","seriesList","leftAxisList"],line:["classificationList","seriesList","leftAxisList"],comboGraph:["classificationList","seriesList","leftAxisList","rightAxisList"],radar:["classificationList","seriesList","leftAxisList"],table:n.value?["rowHeaderList","indicators"]:["queryColumnList","indicators"],text:["dimensionList","indicators"],proportion:["indicators"],select:["classificationList","formFields"],dataSelect:["classificationList","indicators","formFields"],checkbox:["classificationList","formFields"],radio:["classificationList","formFields"],list:["classificationList","indicators"]},u="ecan";let f=e.unref(o);if(f.startsWith(u)){const w=u.length;f=((S=f.slice(w,w+1))==null?void 0:S.toLowerCase())+f.slice(w+1)}const h=p[f],A=xc,g=(h==null?void 0:h.length)||0;for(let w=0;w<g;w++){const V=h[w];if(!V)break;r.push({...A[V],type:V})}for(const w of c)i(s,w)&&!h.find(V=>V===w)&&(s[w]=[]);l(s)})(),{cardsMap:a,cards:r}}}),of="",nf="",Sc={class:"data-group"};function Ac(t,o,n,a,r,l){const i=e.resolveComponent("data-config-card");return e.openBlock(),e.createElementBlock("div",Sc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.cards,d=>(e.openBlock(),e.createBlock(i,e.mergeProps({key:d.type,class:"data-config-card",type:d.type},d),null,16,["type"]))),128))])}const Nc=te(kc,[["render",Ac],["__scopeId","data-v-dad9b990"]]),Tc=[{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"]}],Ec={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"}},Lc=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 Bc(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveDirective("focus");return e.withDirectives((e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,onChange:t.onInputChange},null,8,["value","disabled","onChange"])),[[d]])}const Oc=te(Lc,[["render",Bc]]),Vc=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")),l=e.ref(a("suffix"));return{inputValue:n,onInputChange:u=>{const f=t.suffix;Array.isArray(t.prefix)||Array.isArray(t.suffix)?o("change",{[t.valueKey]:u,[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)}):f===""||u==null?o("change",u):o("change",`${u}${f}`)},parser:u=>typeof t.suffix=="string"?u.replace(t.suffix,""):Array.isArray(t.suffix)&&t.value!=null&&typeof t.value=="object"?u.replace(t.value[t.suffixValueKey],""):u,onInputBlur:()=>{t.useBlurEvent&&o("change",null,!1)},prefixValue:r,suffixValue:l,onPrefixChange:()=>{Array.isArray(t.prefix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})},onSuffixChange:()=>{Array.isArray(t.suffix)&&o("change",{[t.valueKey]:e.unref(n),[t.prefixValueKey]:e.unref(r),[t.suffixValueKey]:e.unref(l)})}}}});function Ic(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-input-number");return e.openBlock(),e.createBlock(s,{value:t.inputValue,min:t.min,max:t.max,step:t.step,parser:t.parser,"addon-before":Array.isArray(t.prefix)?void 0:t.prefix,"addon-after":Array.isArray(t.suffix)?void 0:t.prefix,onChange:t.onInputChange,onBlur:t.onInputBlur},e.createSlots({_:2},[Array.isArray(t.prefix)&&t.prefix.length>0?{name:"addonBefore",fn:e.withCtx(()=>[e.createVNode(d,{value:t.prefixValue,"onUpdate:value":o[0]||(o[0]=c=>t.prefixValue=c),onChange:t.onPrefixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.prefix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"0"}:void 0,Array.isArray(t.suffix)&&t.suffix.length>0?{name:"addonAfter",fn:e.withCtx(()=>[e.createVNode(d,{value:t.suffixValue,"onUpdate:value":o[1]||(o[1]=c=>t.suffixValue=c),onChange:t.onSuffixChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.suffix,({label:c,value:p},u)=>(e.openBlock(),e.createBlock(i,{key:u,value:p},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])]),key:"1"}:void 0]),1032,["value","min","max","step","parser","addon-before","addon-after","onChange","onBlur"])}const Kn=te(Vc,[["render",Ic]]),Fc=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 $c(t,o,n,a,r,l){const i=e.resolveComponent("a-radio-button"),d=e.resolveComponent("a-radio-group");return e.openBlock(),e.createBlock(d,{value:t.value,optionType:t.optionType,onChange:t.onRadioChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","optionType","onChange"])}const Dc=te(Fc,[["render",$c]]),vc=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 Pc(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select");return e.openBlock(),e.createBlock(d,{value:t.value,onChange:t.onSelectChange},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,s=>(e.openBlock(),e.createBlock(i,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","onChange"])}const Mc=te(vc,[["render",Pc]]),jc=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 Rc(t,o,n,a,r,l){const i=e.resolveComponent("a-switch");return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:`${t.width}px`})},[e.createVNode(i,{disabled:t.disabled,checked:t.value,onChange:t.onSwitchChange},null,8,["disabled","checked","onChange"])],4)}const Uc=te(jc,[["render",Rc]]);var ge="top",Ae="bottom",Ne="right",be="left",Po="auto",xt=[ge,Ae,Ne,be],lt="start",kt="end",Gc="clippingParents",Qn="viewport",St="popper",zc="reference",Xn=xt.reduce(function(t,o){return t.concat([o+"-"+lt,o+"-"+kt])},[]),Jn=[].concat(xt,[Po]).reduce(function(t,o){return t.concat([o,o+"-"+lt,o+"-"+kt])},[]),Hc="beforeRead",Wc="read",qc="afterRead",Yc="beforeMain",Kc="main",Qc="afterMain",Xc="beforeWrite",Jc="write",Zc="afterWrite",ed=[Hc,Wc,qc,Yc,Kc,Qc,Xc,Jc,Zc];function Fe(t){return t?(t.nodeName||"").toLowerCase():null}function we(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var o=t.ownerDocument;return o&&o.defaultView||window}return t}function Ke(t){var o=we(t).Element;return t instanceof o||t instanceof Element}function Te(t){var o=we(t).HTMLElement;return t instanceof o||t instanceof HTMLElement}function Mo(t){if(typeof ShadowRoot>"u")return!1;var o=we(t).ShadowRoot;return t instanceof o||t instanceof ShadowRoot}function td(t){var o=t.state;Object.keys(o.elements).forEach(function(n){var a=o.styles[n]||{},r=o.attributes[n]||{},l=o.elements[n];!Te(l)||!Fe(l)||(Object.assign(l.style,a),Object.keys(r).forEach(function(i){var d=r[i];d===!1?l.removeAttribute(i):l.setAttribute(i,d===!0?"":d)}))})}function od(t){var o=t.state,n={popper:{position:o.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(o.elements.popper.style,n.popper),o.styles=n,o.elements.arrow&&Object.assign(o.elements.arrow.style,n.arrow),function(){Object.keys(o.elements).forEach(function(a){var r=o.elements[a],l=o.attributes[a]||{},i=Object.keys(o.styles.hasOwnProperty(a)?o.styles[a]:n[a]),d=i.reduce(function(s,c){return s[c]="",s},{});!Te(r)||!Fe(r)||(Object.assign(r.style,d),Object.keys(l).forEach(function(s){r.removeAttribute(s)}))})}}const nd={name:"applyStyles",enabled:!0,phase:"write",fn:td,effect:od,requires:["computeStyles"]};function $e(t){return t.split("-")[0]}var Qe=Math.max,Ut=Math.min,it=Math.round;function jo(){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 Zn(){return!/^((?!chrome|android).)*safari/i.test(jo())}function st(t,o,n){o===void 0&&(o=!1),n===void 0&&(n=!1);var a=t.getBoundingClientRect(),r=1,l=1;o&&Te(t)&&(r=t.offsetWidth>0&&it(a.width)/t.offsetWidth||1,l=t.offsetHeight>0&&it(a.height)/t.offsetHeight||1);var i=Ke(t)?we(t):window,d=i.visualViewport,s=!Zn()&&n,c=(a.left+(s&&d?d.offsetLeft:0))/r,p=(a.top+(s&&d?d.offsetTop:0))/l,u=a.width/r,f=a.height/l;return{width:u,height:f,top:p,right:c+u,bottom:p+f,left:c,x:c,y:p}}function Ro(t){var o=st(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 ea(t,o){var n=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(n&&Mo(n)){var a=o;do{if(a&&t.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Re(t){return we(t).getComputedStyle(t)}function ad(t){return["table","td","th"].indexOf(Fe(t))>=0}function We(t){return((Ke(t)?t.ownerDocument:t.document)||window.document).documentElement}function Gt(t){return Fe(t)==="html"?t:t.assignedSlot||t.parentNode||(Mo(t)?t.host:null)||We(t)}function ta(t){return!Te(t)||Re(t).position==="fixed"?null:t.offsetParent}function rd(t){var o=/firefox/i.test(jo()),n=/Trident/i.test(jo());if(n&&Te(t)){var a=Re(t);if(a.position==="fixed")return null}var r=Gt(t);for(Mo(r)&&(r=r.host);Te(r)&&["html","body"].indexOf(Fe(r))<0;){var l=Re(r);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||o&&l.willChange==="filter"||o&&l.filter&&l.filter!=="none")return r;r=r.parentNode}return null}function At(t){for(var o=we(t),n=ta(t);n&&ad(n)&&Re(n).position==="static";)n=ta(n);return n&&(Fe(n)==="html"||Fe(n)==="body"&&Re(n).position==="static")?o:n||rd(t)||o}function Uo(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Nt(t,o,n){return Qe(t,Ut(o,n))}function ld(t,o,n){var a=Nt(t,o,n);return a>n?n:a}function oa(){return{top:0,right:0,bottom:0,left:0}}function na(t){return Object.assign({},oa(),t)}function aa(t,o){return o.reduce(function(n,a){return n[a]=t,n},{})}var id=function(o,n){return o=typeof o=="function"?o(Object.assign({},n.rects,{placement:n.placement})):o,na(typeof o!="number"?o:aa(o,xt))};function sd(t){var o,n=t.state,a=t.name,r=t.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,d=$e(n.placement),s=Uo(d),c=[be,Ne].indexOf(d)>=0,p=c?"height":"width";if(!(!l||!i)){var u=id(r.padding,n),f=Ro(l),h=s==="y"?ge:be,A=s==="y"?Ae:Ne,g=n.rects.reference[p]+n.rects.reference[s]-i[s]-n.rects.popper[p],x=i[s]-n.rects.reference[s],S=At(l),w=S?s==="y"?S.clientHeight||0:S.clientWidth||0:0,V=g/2-x/2,m=u[h],E=w-f[p]-u[A],b=w/2-f[p]/2+V,O=Nt(m,b,E),I=s;n.modifiersData[a]=(o={},o[I]=O,o.centerOffset=O-b,o)}}function cd(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)||ea(o.elements.popper,r)&&(o.elements.arrow=r))}const dd={name:"arrow",enabled:!0,phase:"main",fn:sd,effect:cd,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ct(t){return t.split("-")[1]}var pd={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ud(t,o){var n=t.x,a=t.y,r=o.devicePixelRatio||1;return{x:it(n*r)/r||0,y:it(a*r)/r||0}}function ra(t){var o,n=t.popper,a=t.popperRect,r=t.placement,l=t.variation,i=t.offsets,d=t.position,s=t.gpuAcceleration,c=t.adaptive,p=t.roundOffsets,u=t.isFixed,f=i.x,h=f===void 0?0:f,A=i.y,g=A===void 0?0:A,x=typeof p=="function"?p({x:h,y:g}):{x:h,y:g};h=x.x,g=x.y;var S=i.hasOwnProperty("x"),w=i.hasOwnProperty("y"),V=be,m=ge,E=window;if(c){var b=At(n),O="clientHeight",I="clientWidth";if(b===we(n)&&(b=We(n),Re(b).position!=="static"&&d==="absolute"&&(O="scrollHeight",I="scrollWidth")),b=b,r===ge||(r===be||r===Ne)&&l===kt){m=Ae;var L=u&&b===E&&E.visualViewport?E.visualViewport.height:b[O];g-=L-a.height,g*=s?1:-1}if(r===be||(r===ge||r===Ae)&&l===kt){V=Ne;var D=u&&b===E&&E.visualViewport?E.visualViewport.width:b[I];h-=D-a.width,h*=s?1:-1}}var v=Object.assign({position:d},c&&pd),W=p===!0?ud({x:h,y:g},we(n)):{x:h,y:g};if(h=W.x,g=W.y,s){var _;return Object.assign({},v,(_={},_[m]=w?"0":"",_[V]=S?"0":"",_.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",_))}return Object.assign({},v,(o={},o[m]=w?g+"px":"",o[V]=S?h+"px":"",o.transform="",o))}function fd(t){var o=t.state,n=t.options,a=n.gpuAcceleration,r=a===void 0?!0:a,l=n.adaptive,i=l===void 0?!0:l,d=n.roundOffsets,s=d===void 0?!0:d,c={placement:$e(o.placement),variation:ct(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,ra(Object.assign({},c,{offsets:o.modifiersData.popperOffsets,position:o.options.strategy,adaptive:i,roundOffsets:s})))),o.modifiersData.arrow!=null&&(o.styles.arrow=Object.assign({},o.styles.arrow,ra(Object.assign({},c,{offsets:o.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-placement":o.placement})}const md={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:fd,data:{}};var zt={passive:!0};function hd(t){var o=t.state,n=t.instance,a=t.options,r=a.scroll,l=r===void 0?!0:r,i=a.resize,d=i===void 0?!0:i,s=we(o.elements.popper),c=[].concat(o.scrollParents.reference,o.scrollParents.popper);return l&&c.forEach(function(p){p.addEventListener("scroll",n.update,zt)}),d&&s.addEventListener("resize",n.update,zt),function(){l&&c.forEach(function(p){p.removeEventListener("scroll",n.update,zt)}),d&&s.removeEventListener("resize",n.update,zt)}}const yd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:hd,data:{}};var gd={left:"right",right:"left",bottom:"top",top:"bottom"};function Ht(t){return t.replace(/left|right|bottom|top/g,function(o){return gd[o]})}var bd={start:"end",end:"start"};function la(t){return t.replace(/start|end/g,function(o){return bd[o]})}function Go(t){var o=we(t),n=o.pageXOffset,a=o.pageYOffset;return{scrollLeft:n,scrollTop:a}}function zo(t){return st(We(t)).left+Go(t).scrollLeft}function Cd(t,o){var n=we(t),a=We(t),r=n.visualViewport,l=a.clientWidth,i=a.clientHeight,d=0,s=0;if(r){l=r.width,i=r.height;var c=Zn();(c||!c&&o==="fixed")&&(d=r.offsetLeft,s=r.offsetTop)}return{width:l,height:i,x:d+zo(t),y:s}}function wd(t){var o,n=We(t),a=Go(t),r=(o=t.ownerDocument)==null?void 0:o.body,l=Qe(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Qe(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),d=-a.scrollLeft+zo(t),s=-a.scrollTop;return Re(r||n).direction==="rtl"&&(d+=Qe(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:i,x:d,y:s}}function Ho(t){var o=Re(t),n=o.overflow,a=o.overflowX,r=o.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function ia(t){return["html","body","#document"].indexOf(Fe(t))>=0?t.ownerDocument.body:Te(t)&&Ho(t)?t:ia(Gt(t))}function Tt(t,o){var n;o===void 0&&(o=[]);var a=ia(t),r=a===((n=t.ownerDocument)==null?void 0:n.body),l=we(a),i=r?[l].concat(l.visualViewport||[],Ho(a)?a:[]):a,d=o.concat(i);return r?d:d.concat(Tt(Gt(i)))}function Wo(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _d(t,o){var n=st(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 sa(t,o,n){return o===Qn?Wo(Cd(t,n)):Ke(o)?_d(o,n):Wo(wd(We(t)))}function xd(t){var o=Tt(Gt(t)),n=["absolute","fixed"].indexOf(Re(t).position)>=0,a=n&&Te(t)?At(t):t;return Ke(a)?o.filter(function(r){return Ke(r)&&ea(r,a)&&Fe(r)!=="body"}):[]}function kd(t,o,n,a){var r=o==="clippingParents"?xd(t):[].concat(o),l=[].concat(r,[n]),i=l[0],d=l.reduce(function(s,c){var p=sa(t,c,a);return s.top=Qe(p.top,s.top),s.right=Ut(p.right,s.right),s.bottom=Ut(p.bottom,s.bottom),s.left=Qe(p.left,s.left),s},sa(t,i,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function ca(t){var o=t.reference,n=t.element,a=t.placement,r=a?$e(a):null,l=a?ct(a):null,i=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,s;switch(r){case ge:s={x:i,y:o.y-n.height};break;case Ae:s={x:i,y:o.y+o.height};break;case Ne:s={x:o.x+o.width,y:d};break;case be:s={x:o.x-n.width,y:d};break;default:s={x:o.x,y:o.y}}var c=r?Uo(r):null;if(c!=null){var p=c==="y"?"height":"width";switch(l){case lt:s[c]=s[c]-(o[p]/2-n[p]/2);break;case kt:s[c]=s[c]+(o[p]/2-n[p]/2);break}}return s}function Et(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=a===void 0?t.placement:a,l=n.strategy,i=l===void 0?t.strategy:l,d=n.boundary,s=d===void 0?Gc:d,c=n.rootBoundary,p=c===void 0?Qn:c,u=n.elementContext,f=u===void 0?St:u,h=n.altBoundary,A=h===void 0?!1:h,g=n.padding,x=g===void 0?0:g,S=na(typeof x!="number"?x:aa(x,xt)),w=f===St?zc:St,V=t.rects.popper,m=t.elements[A?w:f],E=kd(Ke(m)?m:m.contextElement||We(t.elements.popper),s,p,i),b=st(t.elements.reference),O=ca({reference:b,element:V,strategy:"absolute",placement:r}),I=Wo(Object.assign({},V,O)),L=f===St?I:b,D={top:E.top-L.top+S.top,bottom:L.bottom-E.bottom+S.bottom,left:E.left-L.left+S.left,right:L.right-E.right+S.right},v=t.modifiersData.offset;if(f===St&&v){var W=v[r];Object.keys(D).forEach(function(_){var y=[Ne,Ae].indexOf(_)>=0?1:-1,T=[ge,Ae].indexOf(_)>=0?"y":"x";D[_]+=W[T]*y})}return D}function Sd(t,o){o===void 0&&(o={});var n=o,a=n.placement,r=n.boundary,l=n.rootBoundary,i=n.padding,d=n.flipVariations,s=n.allowedAutoPlacements,c=s===void 0?Jn:s,p=ct(a),u=p?d?Xn:Xn.filter(function(A){return ct(A)===p}):xt,f=u.filter(function(A){return c.indexOf(A)>=0});f.length===0&&(f=u);var h=f.reduce(function(A,g){return A[g]=Et(t,{placement:g,boundary:r,rootBoundary:l,padding:i})[$e(g)],A},{});return Object.keys(h).sort(function(A,g){return h[A]-h[g]})}function Ad(t){if($e(t)===Po)return[];var o=Ht(t);return[la(t),o,la(o)]}function Nd(t){var o=t.state,n=t.options,a=t.name;if(!o.modifiersData[a]._skip){for(var r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!0:i,s=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,A=h===void 0?!0:h,g=n.allowedAutoPlacements,x=o.options.placement,S=$e(x),w=S===x,V=s||(w||!A?[Ht(x)]:Ad(x)),m=[x].concat(V).reduce(function(H,Z){return H.concat($e(Z)===Po?Sd(o,{placement:Z,boundary:p,rootBoundary:u,padding:c,flipVariations:A,allowedAutoPlacements:g}):Z)},[]),E=o.rects.reference,b=o.rects.popper,O=new Map,I=!0,L=m[0],D=0;D<m.length;D++){var v=m[D],W=$e(v),_=ct(v)===lt,y=[ge,Ae].indexOf(W)>=0,T=y?"width":"height",N=Et(o,{placement:v,boundary:p,rootBoundary:u,altBoundary:f,padding:c}),F=y?_?Ne:be:_?Ae:ge;E[T]>b[T]&&(F=Ht(F));var P=Ht(F),C=[];if(l&&C.push(N[W]<=0),d&&C.push(N[F]<=0,N[P]<=0),C.every(function(H){return H})){L=v,I=!1;break}O.set(v,C)}if(I)for(var k=A?3:1,B=function(Z){var Q=m.find(function(X){var ne=O.get(X);if(ne)return ne.slice(0,Z).every(function(de){return de})});if(Q)return L=Q,"break"},M=k;M>0;M--){var j=B(M);if(j==="break")break}o.placement!==L&&(o.modifiersData[a]._skip=!0,o.placement=L,o.reset=!0)}}const Td={name:"flip",enabled:!0,phase:"main",fn:Nd,requiresIfExists:["offset"],data:{_skip:!1}};function da(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 pa(t){return[ge,Ne,Ae,be].some(function(o){return t[o]>=0})}function Ed(t){var o=t.state,n=t.name,a=o.rects.reference,r=o.rects.popper,l=o.modifiersData.preventOverflow,i=Et(o,{elementContext:"reference"}),d=Et(o,{altBoundary:!0}),s=da(i,a),c=da(d,r,l),p=pa(s),u=pa(c);o.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},o.attributes.popper=Object.assign({},o.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}const Ld={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ed};function Bd(t,o,n){var a=$e(t),r=[be,ge].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},o,{placement:t})):n,i=l[0],d=l[1];return i=i||0,d=(d||0)*r,[be,Ne].indexOf(a)>=0?{x:d,y:i}:{x:i,y:d}}function Od(t){var o=t.state,n=t.options,a=t.name,r=n.offset,l=r===void 0?[0,0]:r,i=Jn.reduce(function(p,u){return p[u]=Bd(u,o.rects,l),p},{}),d=i[o.placement],s=d.x,c=d.y;o.modifiersData.popperOffsets!=null&&(o.modifiersData.popperOffsets.x+=s,o.modifiersData.popperOffsets.y+=c),o.modifiersData[a]=i}const Vd={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Od};function Id(t){var o=t.state,n=t.name;o.modifiersData[n]=ca({reference:o.rects.reference,element:o.rects.popper,strategy:"absolute",placement:o.placement})}const Fd={name:"popperOffsets",enabled:!0,phase:"read",fn:Id,data:{}};function $d(t){return t==="x"?"y":"x"}function Dd(t){var o=t.state,n=t.options,a=t.name,r=n.mainAxis,l=r===void 0?!0:r,i=n.altAxis,d=i===void 0?!1:i,s=n.boundary,c=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,h=f===void 0?!0:f,A=n.tetherOffset,g=A===void 0?0:A,x=Et(o,{boundary:s,rootBoundary:c,padding:u,altBoundary:p}),S=$e(o.placement),w=ct(o.placement),V=!w,m=Uo(S),E=$d(m),b=o.modifiersData.popperOffsets,O=o.rects.reference,I=o.rects.popper,L=typeof g=="function"?g(Object.assign({},o.rects,{placement:o.placement})):g,D=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),v=o.modifiersData.offset?o.modifiersData.offset[o.placement]:null,W={x:0,y:0};if(b){if(l){var _,y=m==="y"?ge:be,T=m==="y"?Ae:Ne,N=m==="y"?"height":"width",F=b[m],P=F+x[y],C=F-x[T],k=h?-I[N]/2:0,B=w===lt?O[N]:I[N],M=w===lt?-I[N]:-O[N],j=o.elements.arrow,H=h&&j?Ro(j):{width:0,height:0},Z=o.modifiersData["arrow#persistent"]?o.modifiersData["arrow#persistent"].padding:oa(),Q=Z[y],X=Z[T],ne=Nt(0,O[N],H[N]),de=V?O[N]/2-k-ne-Q-D.mainAxis:B-ne-Q-D.mainAxis,se=V?-O[N]/2+k+ne+X+D.mainAxis:M+ne+X+D.mainAxis,Ie=o.elements.arrow&&At(o.elements.arrow),It=Ie?m==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,Je=(_=v==null?void 0:v[m])!=null?_:0,ft=F+de-Je-It,mt=F+se-Je,Ze=Nt(h?Ut(P,ft):P,F,h?Qe(C,mt):C);b[m]=Ze,W[m]=Ze-F}if(d){var qe,et=m==="x"?ge:be,ht=m==="x"?Ae:Ne,_e=b[E],ve=E==="y"?"height":"width",Ge=_e+x[et],tt=_e-x[ht],Ye=[ge,be].indexOf(S)!==-1,R=(qe=v==null?void 0:v[E])!=null?qe:0,z=Ye?Ge:_e-O[ve]-I[ve]-R+D.altAxis,K=Ye?_e+O[ve]+I[ve]-R-D.altAxis:tt,J=h&&Ye?ld(z,_e,K):Nt(h?z:Ge,_e,h?K:tt);b[E]=J,W[E]=J-_e}o.modifiersData[a]=W}}const vd={name:"preventOverflow",enabled:!0,phase:"main",fn:Dd,requiresIfExists:["offset"]};function Pd(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Md(t){return t===we(t)||!Te(t)?Go(t):Pd(t)}function jd(t){var o=t.getBoundingClientRect(),n=it(o.width)/t.offsetWidth||1,a=it(o.height)/t.offsetHeight||1;return n!==1||a!==1}function Rd(t,o,n){n===void 0&&(n=!1);var a=Te(o),r=Te(o)&&jd(o),l=We(o),i=st(t,r,n),d={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&((Fe(o)!=="body"||Ho(l))&&(d=Md(o)),Te(o)?(s=st(o,!0),s.x+=o.clientLeft,s.y+=o.clientTop):l&&(s.x=zo(l))),{x:i.left+d.scrollLeft-s.x,y:i.top+d.scrollTop-s.y,width:i.width,height:i.height}}function Ud(t){var o=new Map,n=new Set,a=[];t.forEach(function(l){o.set(l.name,l)});function r(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(d){if(!n.has(d)){var s=o.get(d);s&&r(s)}}),a.push(l)}return t.forEach(function(l){n.has(l.name)||r(l)}),a}function Gd(t){var o=Ud(t);return ed.reduce(function(n,a){return n.concat(o.filter(function(r){return r.phase===a}))},[])}function zd(t){var o;return function(){return o||(o=new Promise(function(n){Promise.resolve().then(function(){o=void 0,n(t())})})),o}}function Hd(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 ua={placement:"bottom",modifiers:[],strategy:"absolute"};function fa(){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 Wd(t){t===void 0&&(t={});var o=t,n=o.defaultModifiers,a=n===void 0?[]:n,r=o.defaultOptions,l=r===void 0?ua:r;return function(d,s,c){c===void 0&&(c=l);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},ua,l),modifiersData:{},elements:{reference:d,popper:s},attributes:{},styles:{}},u=[],f=!1,h={state:p,setOptions:function(S){var w=typeof S=="function"?S(p.options):S;g(),p.options=Object.assign({},l,p.options,w),p.scrollParents={reference:Ke(d)?Tt(d):d.contextElement?Tt(d.contextElement):[],popper:Tt(s)};var V=Gd(Hd([].concat(a,p.options.modifiers)));return p.orderedModifiers=V.filter(function(m){return m.enabled}),A(),h.update()},forceUpdate:function(){if(!f){var S=p.elements,w=S.reference,V=S.popper;if(fa(w,V)){p.rects={reference:Rd(w,At(V),p.options.strategy==="fixed"),popper:Ro(V)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(D){return p.modifiersData[D.name]=Object.assign({},D.data)});for(var m=0;m<p.orderedModifiers.length;m++){if(p.reset===!0){p.reset=!1,m=-1;continue}var E=p.orderedModifiers[m],b=E.fn,O=E.options,I=O===void 0?{}:O,L=E.name;typeof b=="function"&&(p=b({state:p,options:I,name:L,instance:h})||p)}}}},update:zd(function(){return new Promise(function(x){h.forceUpdate(),x(p)})}),destroy:function(){g(),f=!0}};if(!fa(d,s))return h;h.setOptions(c).then(function(x){!f&&c.onFirstUpdate&&c.onFirstUpdate(x)});function A(){p.orderedModifiers.forEach(function(x){var S=x.name,w=x.options,V=w===void 0?{}:w,m=x.effect;if(typeof m=="function"){var E=m({state:p,name:S,instance:h,options:V}),b=function(){};u.push(E||b)}})}function g(){u.forEach(function(x){return x()}),u=[]}return h}}var qd=[yd,Fd,md,nd,Vd,Td,vd,dd,Ld],Yd=Wd({defaultModifiers:qd});function qo(t,o){(o==null||o>t.length)&&(o=t.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=t[n];return a}function ma(t,o){if(t){if(typeof t=="string")return qo(t,o);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qo(t,o):void 0}}function Kd(t){return function(o){if(Array.isArray(o))return qo(o)}(t)||function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}(t)||ma(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 dt(t){return dt=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},dt(t)}function ha(t,o,n,a,r,l,i){try{var d=t[l](i),s=d.value}catch(c){return void n(c)}d.done?o(s):Promise.resolve(s).then(a,r)}function ya(t){return function(){var o=this,n=arguments;return new Promise(function(a,r){var l=t.apply(o,n);function i(s){ha(l,a,r,i,d,"next",s)}function d(s){ha(l,a,r,i,d,"throw",s)}i(void 0)})}}var ga={exports:{}},ba={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})(ba),function(t){var o=ba.exports.default;function n(){t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var a,r={},l=Object.prototype,i=l.hasOwnProperty,d=Object.defineProperty||function(C,k,B){C[k]=B.value},s=typeof Symbol=="function"?Symbol:{},c=s.iterator||"@@iterator",p=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(C,k,B){return Object.defineProperty(C,k,{value:B,enumerable:!0,configurable:!0,writable:!0}),C[k]}try{f({},"")}catch{f=function(k,B,M){return k[B]=M}}function h(C,k,B,M){var j=k&&k.prototype instanceof m?k:m,H=Object.create(j.prototype),Z=new F(M||[]);return d(H,"_invoke",{value:_(C,B,Z)}),H}function A(C,k,B){try{return{type:"normal",arg:C.call(k,B)}}catch(M){return{type:"throw",arg:M}}}r.wrap=h;var g="suspendedStart",x="suspendedYield",S="executing",w="completed",V={};function m(){}function E(){}function b(){}var O={};f(O,c,function(){return this});var I=Object.getPrototypeOf,L=I&&I(I(P([])));L&&L!==l&&i.call(L,c)&&(O=L);var D=b.prototype=m.prototype=Object.create(O);function v(C){["next","throw","return"].forEach(function(k){f(C,k,function(B){return this._invoke(k,B)})})}function W(C,k){function B(j,H,Z,Q){var X=A(C[j],C,H);if(X.type!=="throw"){var ne=X.arg,de=ne.value;return de&&o(de)=="object"&&i.call(de,"__await")?k.resolve(de.__await).then(function(se){B("next",se,Z,Q)},function(se){B("throw",se,Z,Q)}):k.resolve(de).then(function(se){ne.value=se,Z(ne)},function(se){return B("throw",se,Z,Q)})}Q(X.arg)}var M;d(this,"_invoke",{value:function(j,H){function Z(){return new k(function(Q,X){B(j,H,Q,X)})}return M=M?M.then(Z,Z):Z()}})}function _(C,k,B){var M=g;return function(j,H){if(M===S)throw new Error("Generator is already running");if(M===w){if(j==="throw")throw H;return{value:a,done:!0}}for(B.method=j,B.arg=H;;){var Z=B.delegate;if(Z){var Q=y(Z,B);if(Q){if(Q===V)continue;return Q}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(M===g)throw M=w,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);M=S;var X=A(C,k,B);if(X.type==="normal"){if(M=B.done?w:x,X.arg===V)continue;return{value:X.arg,done:B.done}}X.type==="throw"&&(M=w,B.method="throw",B.arg=X.arg)}}}function y(C,k){var B=k.method,M=C.iterator[B];if(M===a)return k.delegate=null,B==="throw"&&C.iterator.return&&(k.method="return",k.arg=a,y(C,k),k.method==="throw")||B!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+B+"' method")),V;var j=A(M,C.iterator,k.arg);if(j.type==="throw")return k.method="throw",k.arg=j.arg,k.delegate=null,V;var H=j.arg;return H?H.done?(k[C.resultName]=H.value,k.next=C.nextLoc,k.method!=="return"&&(k.method="next",k.arg=a),k.delegate=null,V):H:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,V)}function T(C){var k={tryLoc:C[0]};1 in C&&(k.catchLoc=C[1]),2 in C&&(k.finallyLoc=C[2],k.afterLoc=C[3]),this.tryEntries.push(k)}function N(C){var k=C.completion||{};k.type="normal",delete k.arg,C.completion=k}function F(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(T,this),this.reset(!0)}function P(C){if(C||C===""){var k=C[c];if(k)return k.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var B=-1,M=function j(){for(;++B<C.length;)if(i.call(C,B))return j.value=C[B],j.done=!1,j;return j.value=a,j.done=!0,j};return M.next=M}}throw new TypeError(o(C)+" is not iterable")}return E.prototype=b,d(D,"constructor",{value:b,configurable:!0}),d(b,"constructor",{value:E,configurable:!0}),E.displayName=f(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(C){var k=typeof C=="function"&&C.constructor;return!!k&&(k===E||(k.displayName||k.name)==="GeneratorFunction")},r.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,b):(C.__proto__=b,f(C,u,"GeneratorFunction")),C.prototype=Object.create(D),C},r.awrap=function(C){return{__await:C}},v(W.prototype),f(W.prototype,p,function(){return this}),r.AsyncIterator=W,r.async=function(C,k,B,M,j){j===void 0&&(j=Promise);var H=new W(h(C,k,B,M),j);return r.isGeneratorFunction(k)?H:H.next().then(function(Z){return Z.done?Z.value:H.next()})},v(D),f(D,u,"Generator"),f(D,c,function(){return this}),f(D,"toString",function(){return"[object Generator]"}),r.keys=function(C){var k=Object(C),B=[];for(var M in k)B.push(M);return B.reverse(),function j(){for(;B.length;){var H=B.pop();if(H in k)return j.value=H,j.done=!1,j}return j.done=!0,j}},r.values=P,F.prototype={constructor:F,reset:function(C){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(N),!C)for(var k in this)k.charAt(0)==="t"&&i.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=a)},stop:function(){this.done=!0;var C=this.tryEntries[0].completion;if(C.type==="throw")throw C.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var k=this;function B(X,ne){return H.type="throw",H.arg=C,k.next=X,ne&&(k.method="next",k.arg=a),!!ne}for(var M=this.tryEntries.length-1;M>=0;--M){var j=this.tryEntries[M],H=j.completion;if(j.tryLoc==="root")return B("end");if(j.tryLoc<=this.prev){var Z=i.call(j,"catchLoc"),Q=i.call(j,"finallyLoc");if(Z&&Q){if(this.prev<j.catchLoc)return B(j.catchLoc,!0);if(this.prev<j.finallyLoc)return B(j.finallyLoc)}else if(Z){if(this.prev<j.catchLoc)return B(j.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return B(j.finallyLoc)}}}},abrupt:function(C,k){for(var B=this.tryEntries.length-1;B>=0;--B){var M=this.tryEntries[B];if(M.tryLoc<=this.prev&&i.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var j=M;break}}j&&(C==="break"||C==="continue")&&j.tryLoc<=k&&k<=j.finallyLoc&&(j=null);var H=j?j.completion:{};return H.type=C,H.arg=k,j?(this.method="next",this.next=j.finallyLoc,V):this.complete(H)},complete:function(C,k){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&k&&(this.next=k),V},finish:function(C){for(var k=this.tryEntries.length-1;k>=0;--k){var B=this.tryEntries[k];if(B.finallyLoc===C)return this.complete(B.completion,B.afterLoc),N(B),V}},catch:function(C){for(var k=this.tryEntries.length-1;k>=0;--k){var B=this.tryEntries[k];if(B.tryLoc===C){var M=B.completion;if(M.type==="throw"){var j=M.arg;N(B)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(C,k,B){return this.delegate={iterator:P(C),resultName:k,nextLoc:B},this.method==="next"&&(this.arg=a),V}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(ga);var Wt=ga.exports(),qt=Wt;try{regeneratorRuntime=Wt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Wt:Function("r","regeneratorRuntime = r")(Wt)}function Qd(t){var o=function(n,a){if(dt(n)!=="object"||n===null)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var l=r.call(n,a||"default");if(dt(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}(t,"string");return dt(o)==="symbol"?o:String(o)}function Yo(t,o,n){return(o=Qd(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}var Yt=e.defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{width:"".concat(t.size,"px"),height:"".concat(t.size,"px"),background:"hsl(".concat(t.hue,", 100%, 50%)")}});return{saturationStyle:a,sliderStyle:e.computed(function(){return{top:"".concat((100-t.value)/100*t.size-5,"px"),left:"".concat(t.saturation*t.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(r){var l=r.target.getBoundingClientRect(),i=l.left,d=l.top,s=function(c){var p=c.clientX,u=c.clientY,f=p-i,h=u-d;f<0&&(f=0),h<0&&(h=0),f>t.size&&(f=t.size),h>t.size&&(h=t.size);var A=f/t.size*100,g=100-h/t.size*100;n("change",A,g)};s(r),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),Ca=function(t){return e.pushScopeId("data-v-24517fec"),t=t(),e.popScopeId(),t},Xd=Ca(function(){return e.createElementVNode("div",{class:"saturation-white"},null,-1)}),Jd=Ca(function(){return e.createElementVNode("div",{class:"saturation-black"},null,-1)});function Ue(t,o){o===void 0&&(o={});var n=o.insertAt;if(t&&typeof document<"u"){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}Ue(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),Yt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"saturation",style:e.normalizeStyle(t.saturationStyle),onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[Xd,Jd,e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],36)},Yt.__scopeId="data-v-24517fec",Yt.__file="src/picker/Saturation.vue";var Kt=e.defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat((1-t.hue/360)*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref();return e.onMounted(function(){(function(){r.value.width=t.width,r.value.height=t.height;var l=r.value.getContext("2d"),i=l.createLinearGradient(0,0,0,t.height);i.addColorStop(0,"#FF0000"),i.addColorStop(.17,"#FF00FF"),i.addColorStop(.34,"#0000FF"),i.addColorStop(.51,"#00FFFF"),i.addColorStop(.68,"#00FF00"),i.addColorStop(.17*5,"#FFFF00"),i.addColorStop(1,"#FF0000"),l.fillStyle=i,l.fillRect(0,0,t.width,t.height)})()}),{canvas:r,sliderStyle:a,onSelect:function(l){var i=l.target.getBoundingClientRect().top,d=function(s){var c=s.clientY-i;c<0&&(c=0),c>t.height&&(c=t.height);var p=-100*c/t.height+100;n("change",360*p/100)};d(l),document.addEventListener("mousemove",d),document.addEventListener("mouseup",function s(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",s)})}}}}),Zd={ref:"canvas"};Ue(".hue[data-v-78b9f4f0]{position:relative}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Kt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"hue",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",Zd,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Kt.__scopeId="data-v-78b9f4f0",Kt.__file="src/picker/Hue.vue";var Qt=e.defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(t,o){var n=o.emit,a=e.computed(function(){return{top:"".concat(t.alpha*t.height-2,"px"),height:"".concat(4,"px")}}),r=e.ref(),l=function(){var i=r.value.getContext("2d");r.value.width=t.width,r.value.height=t.height;var d=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);i.fillStyle=i.createPattern(d,"repeat"),i.fillRect(0,0,t.width,t.height);var s=i.createLinearGradient(0,0,0,t.height);s.addColorStop(.01,"rgba(255,255,255,0)"),s.addColorStop(.99,t.color),i.fillStyle=s,i.fillRect(0,0,t.width,t.height)};return e.watch(function(){return t.color},function(){l()}),e.onMounted(function(){l()}),{canvas:r,sliderStyle:a,onSelect:function(i){var d=i.target.getBoundingClientRect().top,s=function(c){var p=c.clientY-d;p<0&&(p=0),p>t.height&&(p=t.height);var u=parseFloat((p/t.height).toFixed(2));n("change",u)};s(i),document.addEventListener("mousemove",s),document.addEventListener("mouseup",function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)})}}}}),ep={ref:"canvas"};Ue(".alpha[data-v-24dc9656]{position:relative}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Qt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",{class:"alpha",onMousedown:o[0]||(o[0]=e.withModifiers(function(){return t.onSelect&&t.onSelect.apply(t,arguments)},["prevent","stop"]))},[e.createElementVNode("canvas",ep,null,512),e.createElementVNode("div",{class:"slider",style:e.normalizeStyle(t.sliderStyle)},null,4)],32)},Qt.__scopeId="data-v-24dc9656",Qt.__file="src/picker/Alpha.vue";var Xt=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")}}}}),tp={class:"input"},op={class:"label"},np=[".value"];function Lt(t,o){return function(n){if(Array.isArray(n))return n}(t)||function(n,a){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var l,i,d,s,c=[],p=!0,u=!1;try{if(d=(r=r.call(n)).next,a===0){if(Object(r)!==r)return;p=!1}else for(;!(p=(l=d.call(r)).done)&&(c.push(l.value),c.length!==a);p=!0);}catch(f){u=!0,i=f}finally{try{if(!p&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw i}}return c}}(t,o)||ma(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 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 Ee(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){Yo(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}Ue(".input[data-v-d52a4d02]{display:inline-block;font-size:12px}.label[data-v-d52a4d02]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;width:45px}[pick-colors-theme=dark] .label[data-v-d52a4d02]{background:#252930;color:#999}.value[data-v-d52a4d02]{background:#eceef0;border:1px solid #eceef0;box-sizing:border-box;color:#666;flex:1;height:30px;text-align:center}[pick-colors-theme=dark] .value[data-v-d52a4d02]{background:#2e333a;border:1px solid #2e333a;color:#fff}.value[data-v-d52a4d02]:focus{border:1px solid #1890ff;outline:none}"),Xt.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",tp,[e.createElementVNode("span",op,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,np)])},Xt.__scopeId="data-v-d52a4d02",Xt.__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]},xa={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Jt=function(t){t=Math.min(Math.round(t),255);var o=Math.floor(t/16),n=t%16;return"".concat(xa[o]||o).concat(xa[n]||n)},ka=function(t){var o=t.r,n=t.g,a=t.b;return isNaN(o)||isNaN(n)||isNaN(a)?"":"#".concat(Jt(o)).concat(Jt(n)).concat(Jt(a))},pt=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)},Bt=function(t,o,n){t=6*pt(t,360),o=pt(o,100),n=pt(n,100);var a=Math.floor(t),r=t-a,l=n*(1-o),i=n*(1-r*o),d=n*(1-(1-r)*o),s=a%6,c=[n,i,l,l,d,n][s],p=[d,n,n,i,l,l][s],u=[l,l,d,n,n,i][s];return{r:Math.round(255*c),g:Math.round(255*p),b:Math.round(255*u)}},Sa=function(t,o,n){var a=t.h,r=t.s,l=t.v,i=t.a;if(n)switch(o){case"hsl":var d=_a(a,r/100,l/100);return"hsla(".concat(a.toFixed(0),", ").concat(Math.round(100*d[1]),"%, ").concat(Math.round(100*d[2]),"%, ").concat(i,")");case"hsv":return"hsva(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%, ").concat(i,")");case"rgb":var s=Bt(a,r,l),c=s.r,p=s.g,u=s.b;return"rgba(".concat(c,", ").concat(p,", ").concat(u,", ").concat(i,")");default:return"".concat(ka(Bt(a,r,l))).concat(Jt(255*i))}else switch(o){case"hsl":var f=_a(a,r/100,l/100);return"hsl(".concat(a.toFixed(0),", ").concat(Math.round(100*f[1]),"%, ").concat(Math.round(100*f[2]),"%)");case"hsv":return"hsv(".concat(a.toFixed(0),", ").concat(Math.round(r),"%, ").concat(Math.round(l),"%)");case"rgb":var h=Bt(a,r,l),A=h.r,g=h.g,x=h.b;return"rgb(".concat(A,", ").concat(g,", ").concat(x,")");default:return ka(Bt(a,r,l))}},Zt=function(t){var o=t.r,n=t.g,a=t.b;o=pt(o,255),n=pt(n,255),a=pt(a,255);var r,l=Math.max(o,n,a),i=Math.min(o,n,a),d=l,s=l-i,c=l===0?0:s/l;if(l===i)r=0;else{switch(l){case o:r=(n-a)/s+(n<a?6:0);break;case n:r=(a-o)/s+2;break;case a:r=(o-n)/s+4}r/=6}return{h:360*r,s:100*c,v:100*d}},Aa=function(t){var o=t.h,n=t.s,a=t.l;a/=100;var r=n/=100,l=Math.max(a,.01);return n*=(a*=2)<=1?a:2-a,r*=l<=1?l:2-l,{h:+o,s:100*(a===0?2*r/(l+r):2*n/(a+n)),v:100*((a+n)/2)}},Na=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]}},Ko=function(t,o,n){if(typeof t=="string"&&t!==""){var a=Qo(t,Xo(t),n),r=Ba(a);return Sa(r,o,n)}return""},Ta=function(t){var o=Lt(t.match(/(\d(\.\d+)?)+/g),4);return{r:o[0],g:o[1],b:o[2],a:o[3]}},Ea=function(t){var o=Lt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:n,s:parseFloat(a),l:parseFloat(r),a:l}},La=function(t){var o=Lt(t.match(/(\d(\.\d+)?)+/g),4),n=o[0],a=o[1],r=o[2],l=o[3];return{h:parseFloat(n),s:parseFloat(a),v:parseFloat(r),a:parseFloat(l)}},Qo=function(t,o){if(!(arguments.length>2&&arguments[2]!==void 0)||arguments[2])switch(o){case"rgb":var n=Ta(t),a=n.r,r=n.g,l=n.b,i=n.a;return Ee(Ee({},Zt({r:a,g:r,b:l})),{},{a:+i});case"hsv":var d=La(t);return{h:d.h,s:d.s,v:d.v,a:d.a};case"hsl":var s=Ea(t),c=s.h,p=s.s,u=s.l,f=s.a;return Ee(Ee({},Aa({h:c,s:p,l:u})),{},{a:+f});default:var h=Na(t),A=h.r,g=h.g,x=h.b,S=h.a;return Ee(Ee({},Zt({r:A,g,b:x})),{},{a:S/255})}else switch(o){case"rgb":return Ee(Ee({},Zt(Ta(t))),{},{a:1});case"hsv":var w=La(t);return{h:w.h,s:w.s,v:w.v,a:1};case"hsl":return Ee(Ee({},Aa(Ea(t))),{},{a:1});default:return Ee(Ee({},Zt(Na(t))),{},{a:1})}},Xo=function(t){return t.match(/^#/)?"hex":t.match(/^rgb/)?"rgb":t.match(/^hsl/)?"hsl":t.match(/^hsv/)?"hsv":"hex"},Ba=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}},Ot=e.defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(t){var o=e.ref(),n=e.inject("theme",{theme:"light"}).theme,a=e.computed(function(){return parseFloat((t.width||t.size)+"")}),r=e.computed(function(){return parseFloat((t.height||t.size)+"")}),l=e.computed(function(){return{width:"".concat(e.unref(a),"px"),height:"".concat(e.unref(r),"px"),border:t.border?"1px solid ".concat(e.unref(n)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(t.borderRadius,"px"),boxShadow:t.selected?"0 0 3px 2px ".concat(e.unref(n)==="dark"?"#2681ff":"#1890ff"):""}}),i=function(){var d=o.value.getContext("2d");o.value.width=e.unref(a),o.value.height=e.unref(r);var s=function(c){var p=document.createElement("canvas"),u=p.getContext("2d"),f=2*c;return p.width=f,p.height=f,u.fillStyle="#ffffff",u.fillRect(0,0,f,f),u.fillStyle="#ccd5db",u.fillRect(0,0,c,c),u.fillRect(c,c,c,c),p}(5);d.fillStyle=d.createPattern(s,"repeat"),d.fillRect(0,0,e.unref(a),e.unref(r)),d.fillStyle=t.value,d.fillRect(0,0,e.unref(a),e.unref(r))};return e.watch(function(){return t.value},function(){i()}),e.onMounted(function(){i()}),{canvas:o,colorItemStyle:l}}}),ap=["draggable"];Ue(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Ot.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("canvas",{class:"color-item",style:e.normalizeStyle(t.colorItemStyle),ref:"canvas",draggable:t.draggable},null,12,ap)},Ot.__scopeId="data-v-02da71fd",Ot.__file="src/color-item/ColorItem.vue";var eo=e.defineComponent({name:"Colors",components:{ColorItem:Ot},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 Ko(a,"hex",!0)})})}}}),rp={class:"colors"};function Oa(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?Oa(Object(n),!0).forEach(function(a){Yo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oa(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".colors[data-v-0f8b52a8]{align-items:center;display:flex;flex-wrap:wrap;margin-top:5px}.color-item[data-v-0f8b52a8]{margin:5px}"),eo.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item");return e.openBlock(),e.createElementBlock("div",rp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.useColors,function(d,s){return e.openBlock(),e.createBlock(i,{key:s,class:"color-item",size:16,value:d,border:!1,"border-radius":3,selected:t.selectedIndex===s,onClick:e.withModifiers(function(c){return t.onSelectColor(d,+s)},["stop","prevent"])},null,8,["value","selected","onClick"])}),128))])},eo.__scopeId="data-v-0f8b52a8",eo.__file="src/picker/Colors.vue";var to=e.defineComponent({name:"Picker",components:{Colors:eo,Saturation:Yt,Hue:Kt,Alpha:Qt,InputValue:Xt},props:{format:{type:String,default:"hex"},showAlpha:{type:Boolean,default:!1},value:{type:String,default:""},colors:{type:Array,default:function(){return[]}},style:{type:Object,default:function(){return{}}}},emits:["change","update:value"],setup:function(t,o){var n=o.emit,a=e.computed(function(){return De(De({},t.style),{},{width:t.showAlpha?"230px":"205px"})}),r=e.computed(function(){return t.showAlpha?165:140}),l=e.ref(),i=e.ref(),d=e.ref(),s=function(){var w,V=(w=t.value)===null||w===void 0?void 0:w.trim();if(V!=null&&V!==""){var m=Xo(V);return Ba(Qo(V,m,t.showAlpha))}return null};e.watch(function(){return t.value},function(){t.value!==e.unref(d)&&(l.value=s())},{immediate:!0}),e.watch(l,function(w,V){var m="";w!=null?(m=Sa(De({},w),t.format,t.showAlpha),i.value=De({},w)):i.value=null,d.value=m;var E=s();JSON.stringify(w)!==JSON.stringify(E)&&JSON.stringify(w)!==JSON.stringify(V)&&n("change",m)},{immediate:!0});var c=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.h)||0}),p=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.s)||0}),u=e.computed(function(){var w;return((w=e.unref(l))===null||w===void 0?void 0:w.v)||0}),f=e.computed(function(){var w,V;return((w=e.unref(l))===null||w===void 0?void 0:w.a)!=null?(V=e.unref(l))===null||V===void 0?void 0:V.a:1}),h=e.computed(function(){return Bt(e.unref(c),e.unref(p),e.unref(u))}),A=e.computed(function(){return"rgb(".concat(e.unref(h).r,", ").concat(e.unref(h).g,", ").concat(e.unref(h).b,")")}),g=e.computed(function(){var w=t.format;if(t.showAlpha)switch(w){case"hsv":return"HSVA";case"hsl":return"HSLA";case"rgb":return"RGBA";default:return"HEX"}else switch(w){case"hsv":return"HSV";case"hsl":return"HSL";case"rgb":return"RGB";default:return"HEX"}}),x=e.ref(-1),S=function(w,V,m){if(w.length!==0){var E=Qo(w,V,m),b=E.h,O=E.s,I=E.v;if(!(isNaN(b)||isNaN(O)||isNaN(I))){var L=1,D=E.a;isNaN(D)||(L=D),l.value={h:b,s:O,v:I,a:L}}}};return{h:c,s:p,v:u,a:f,rgbStr:A,onSelectSaturation:function(w,V){x.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:w,v:V,a:e.unref(f)}:l.value=De(De({},e.unref(l)),{},{s:w,v:V})},onSelectHue:function(w){x.value=-1,e.unref(l)==null&&(l.value={h:w,s:e.unref(p),v:e.unref(u),a:e.unref(f)}),l.value=De(De({},e.unref(l)),{},{h:w})},onSelectAlpha:function(w){x.value=-1,e.unref(l)==null?l.value={h:e.unref(c),s:e.unref(p),v:e.unref(u),a:w}:l.value=De(De({},e.unref(l)),{},{a:w})},label:g,colorValue:d,pickerStyle:a,inputWidth:r,onInputChange:function(w){x.value=-1,d.value=w},handleChange:function(){var w,V=(w=e.unref(d))===null||w===void 0?void 0:w.trim();if(V!==""){var m=t.showAlpha,E=t.format,b=function(O,I,L){if(L)switch(I){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(I){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)}}(V,E,m);b?S(V,E,m):e.unref(i)!=null?l.value=e.unref(i):d.value=""}else l.value=null},selectColorIndex:x,onSelectColor:function(w,V){if(x.value=V,(w=w.trim())==="")l.value=null;else{var m=Xo(w);m?S(w,m,!0):l.value=null}}}}}),lp={class:"picker-inner"},ip={class:"picker-header"};Ue(".picker[data-v-6ceadec6]{background:#f7f8f9;border-radius:4px;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-inner[data-v-6ceadec6]{padding:10px}[pick-colors-theme=dark] .picker-inner[data-v-6ceadec6]{background:#1d2024;box-shadow:0 0 16px 0 rgba(0,0,0,.16)}.picker-header[data-v-6ceadec6]{display:flex;margin-bottom:5px}.alpha[data-v-6ceadec6],.hue[data-v-6ceadec6]{margin-left:10px}.colors[data-v-6ceadec6]{margin-top:5px}"),to.render=function(t,o,n,a,r,l){var i=e.resolveComponent("saturation"),d=e.resolveComponent("hue"),s=e.resolveComponent("alpha"),c=e.resolveComponent("input-value"),p=e.resolveComponent("Colors");return e.openBlock(),e.createElementBlock("div",{class:"picker",style:e.normalizeStyle(t.pickerStyle)},[e.createElementVNode("div",lp,[e.createElementVNode("div",ip,[e.createVNode(i,{class:"saturation",hue:t.h,saturation:t.s,value:t.v,onChange:t.onSelectSaturation},null,8,["hue","saturation","value","onChange"]),e.createVNode(d,{class:"hue",hue:t.h,onChange:t.onSelectHue},null,8,["hue","onChange"]),t.showAlpha?(e.openBlock(),e.createBlock(s,{key:0,class:"alpha",alpha:t.a,color:t.rgbStr,onChange:t.onSelectAlpha},null,8,["alpha","color","onChange"])):e.createCommentVNode("v-if",!0)]),e.createVNode(c,{label:t.label,value:t.colorValue,width:t.inputWidth,onChange:t.onInputChange,onBlur:t.handleChange,onEnter:t.handleChange},null,8,["label","value","width","onChange","onBlur","onEnter"]),t.colors.length>0?(e.openBlock(),e.createBlock(p,{key:0,class:"colors",colors:t.colors,"selected-index":t.selectColorIndex,onChange:t.onSelectColor},null,8,["colors","selected-index","onChange"])):e.createCommentVNode("v-if",!0)])],4)},to.__scopeId="data-v-6ceadec6",to.__file="src/picker/Picker.vue";var oo=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"):""}})}}}),sp=[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 Va(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 Jo(t){for(var o=1;o<arguments.length;o++){var n=arguments[o]!=null?arguments[o]:{};o%2?Va(Object(n),!0).forEach(function(a){Yo(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Va(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}Ue(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),oo.render=function(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("svg",{style:e.normalizeStyle(t.addColorItemStyle),class:"add-color-item",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[].concat(sp),4)},oo.__scopeId="data-v-ceb1719c",oo.__file="src/add-color-item/AddColorItem.vue";var Xe=null,ut=e.defineComponent({name:"ColorPicker",components:{ColorItem:Ot,Picker:to,AddColorItem:oo},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(y){return Ko(y,"hex",t.showAlpha)})});e.watch(function(){return t.value},function(){var y=t.value||"",T=Array.isArray(y)?y:[y];a.value=T.map(function(N){return Ko(N,t.format,t.showAlpha)})},{immediate:!0});var l=e.ref(void 0),i=e.computed(function(){return e.unref(a)[e.unref(l)]}),d=e.ref(!1);e.watch(function(){return t.showPicker},function(){d.value=t.showPicker},{immediate:!0});var s,c,p,u,f,h,A,g=e.ref(null),x=e.ref(null),S=(s=g,c=x,p={zIndex:t.zIndex},u=e.ref({}),f={strategy:"absolute",placement:"auto",onFirstUpdate:function(){Xe.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(y){var T=y.state,N=T.styles,F=T.placement,P=N.popper;u.value=Jo(Jo(Jo({},P),p),{},{transformOrigin:F==="top"?"center bottom":""})}}]},e.watch(function(){return[e.unref(s),e.unref(c)]},function(y,T){var N,F=Lt(y,2),P=F[0],C=F[1],k=Lt(T,2),B=k[0],M=k[1];if(P&&C&&(B!==P||M!==B)){(N=Xe)===null||N===void 0||N.destroy();var j=P.$el||P,H=C.$el||C;e.nextTick(function(){Xe=Yd(j,H,f)})}}),e.onBeforeUnmount(function(){var y;Xe&&((y=Xe)===null||y===void 0||y.destroy(),Xe=null)}),{instance:Xe,style:u}),w=S.style,V=function(){e.unref(g)==null&&(g.value=e.unref(_)[0],l.value=0),t.showPicker===void 0?d.value=!0:n("update:showPicker",!0)},m=function(){l.value=void 0,t.showPicker===void 0?d.value=!1:n("update:showPicker",!1),n("closePicker",e.toRaw(Array.isArray(t.value)||t.addColor?e.unref(a):e.unref(a)[0]))},E=e.ref(),b=function(){var y=ya(qt.mark(function T(N){var F,P,C,k;return qt.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(P=N.target,(C=(F=P.dataset)===null||F===void 0?void 0:F.index)!=null&&C!==""){B.next=4;break}return B.abrupt("return");case 4:if(k=+C,e.unref(l)!==k){B.next=7;break}return B.abrupt("return");case 7:e.unref(l)!=null&&e.unref(l)!==k?(m(),h&&clearTimeout(h),h=setTimeout(function(){V(),clearTimeout(h)},100)):V(),l.value=k,g.value=P;case 10:case"end":return B.stop()}},T)}));return function(T){return y.apply(this,arguments)}}(),O=function(){var y=ya(qt.mark(function T(N){var F,P,C,k,B;return qt.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(k=N.target,!(!((F=e.unref(E))!==null&&F!==void 0&&F.isEqualNode(k))&&(!((P=e.unref(E))===null||P===void 0)&&P.contains(k)))){M.next=4;break}return M.abrupt("return");case 4:if(B=(C=e.unref(x))===null||C===void 0?void 0:C.$el,!(B!=null&&B.contains(k))){M.next=8;break}return M.abrupt("return");case 8:A&&clearTimeout(A),A=setTimeout(function(){e.unref(d)&&m()},0);case 10:case"end":return M.stop()}},T)}));return function(T){return y.apply(this,arguments)}}();e.watch(d,function(){e.unref(d)&&(V(),clearTimeout(A))});var I,L=e.ref(t.max>e.unref(a).length),D=e.computed(function(){return typeof t.popupContainer=="string"||dt(t.popupContainer)==="object"&&t.popupContainer!=null?t.popupContainer:"body"}),v=e.computed(function(){return typeof t.popupContainer=="boolean"&&t.popupContainer===!1}),W=e.computed(function(){return t.theme});e.watch(function(){return[t.theme,e.unref(x)]},function(){e.nextTick(function(){var y,T;(y=e.unref(E))===null||y===void 0||y.setAttribute("pick-colors-theme",e.unref(W)),(T=e.unref(x))===null||T===void 0||(T=T.$el)===null||T===void 0||T.setAttribute("pick-colors-theme",e.unref(W))})},{immediate:!0}),e.provide("theme",{theme:W});var _=e.ref([]);return e.onMounted(function(){document.addEventListener("mouseup",O,!1),t.showPicker&&V()}),e.onUnmounted(function(){document.removeEventListener("mouseup",O,!1),h&&(clearTimeout(h),h=null),A&&(clearTimeout(A),A=null)}),{valueList:a,colorItemSelected:function(y){return(t.addColor?e.unref(a).length>0:e.unref(a).length>1)&&e.unref(l)===y},selectedColor:i,selectedIndex:l,isShowPicker:d,addColorItemShow:L,onPickerChange:function(y){var T=e.unref(l),N=e.unref(a).slice(),F=e.unref(a).length;if(T!=null){T>=0?N[T]=y:(l.value=F,N.push(y));var P="";P=Array.isArray(t.value)||t.addColor?N:y,t.value===void 0?a.value=Array.isArray(P)?P:[P]:(n("update:value",P),n("change",P,y,T)),t.addColor&&F>=t.max&&(L.value=!1,n("overflowMax"))}},colorPicker:E,onColorClick:b,pickerRef:x,onColorItemDragStart:function(y){y.dataTransfer.effectAllowed="move";var T=y.target;I=+T.dataset.index},onColorItemDragOver:function(y){},onColorItemDrop:function(y){var T=+y.target.dataset.index,N=Kd(e.unref(a)),F=N[I];N.splice(I,1);var P=N.slice(0,T),C=N.splice(T),k=P.concat([F]).concat(C);n("update:value",k),n("change",k,k[I],I)},colorItemsRef:_,pickerStyle:w,values:r,teleportDisabled:v,toPopupContainer:D}}});Ue(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),ut.render=function(t,o,n,a,r,l){var i=e.resolveComponent("color-item"),d=e.resolveComponent("add-color-item"),s=e.resolveComponent("picker");return e.openBlock(),e.createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:o[0]||(o[0]=e.withModifiers(function(){return t.onColorItemDragStart&&t.onColorItemDragStart.apply(t,arguments)},["stop"])),onDragover:o[1]||(o[1]=e.withModifiers(function(){return t.onColorItemDragOver&&t.onColorItemDragOver.apply(t,arguments)},["prevent","stop"])),onDrop:o[2]||(o[2]=e.withModifiers(function(){return t.onColorItemDrop&&t.onColorItemDrop.apply(t,arguments)},["prevent","stop"])),onClick:o[3]||(o[3]=e.withModifiers(function(){return t.onColorClick&&t.onColorClick.apply(t,arguments)},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.values,function(c,p){return e.openBlock(),e.createBlock(i,{class:"color-item",key:p,ref_for:!0,ref:function(u){return t.colorItemsRef[p]=u},size:t.size,width:t.width,height:t.height,value:c,selected:t.colorItemSelected(p),"data-index":p,draggable:t.valueList.length>1,format:t.format},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),t.addColor&&t.addColorItemShow?(e.openBlock(),e.createBlock(d,{key:0,class:"add-color-item",ref:"addColorItem",selected:t.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:t.toPopupContainer,disabled:t.teleportDisabled},[e.createVNode(e.Transition,null,{default:e.withCtx(function(){return[t.isShowPicker?(e.openBlock(),e.createBlock(s,{key:0,class:"picker",style:e.normalizeStyle(t.pickerStyle),ref:"pickerRef",value:t.selectedColor,format:t.format,"show-alpha":t.showAlpha,colors:t.colors,onChange:t.onPickerChange},null,8,["style","value","format","show-alpha","colors","onChange"])):e.createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},ut.__scopeId="data-v-3c43ade8",ut.__file="src/ColorPicker.vue";const cp=e.defineComponent({name:"ColorPick",components:{PickColors:ut,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}}}}),af="",dp={class:"color-pick"};function pp(t,o,n,a,r,l){const i=e.resolveComponent("a-input"),d=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",dp,[e.createVNode(i,{class:"input",value:t.colorValue,"onUpdate:value":o[0]||(o[0]=s=>t.colorValue=s)},null,8,["value"]),e.createVNode(d,{class:"pick-colors",value:t.colorValue,"onUpdate:value":o[1]||(o[1]=s=>t.colorValue=s),size:25},null,8,["value"])])}const up=te(cp,[["render",pp],["__scopeId","data-v-e2113f43"]]),fp=e.defineComponent({name:"ColorGroupPick",components:{PickColors:ut},props:{value:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:o}){const n=l=>{o("change",l)},a=e.ref(13);return{onColorsChange:n,max:a,onOverflowMax:()=>{$.message.warn(`已经超出最大添加个数:${a.value}`)}}}}),rf="",mp={class:"color-group-pick"};function hp(t,o,n,a,r,l){const i=e.resolveComponent("pick-colors");return e.openBlock(),e.createElementBlock("div",mp,[e.createVNode(i,{value:t.value,"add-color":"",max:t.max,onChange:t.onColorsChange,onOverflowMax:t.onOverflowMax},null,8,["value","max","onChange","onOverflowMax"])])}const yp=te(fp,[["render",hp],["__scopeId","data-v-b2be8322"]]),gp=e.defineComponent({name:"FormGroup",components:{Draggable:bt,AppstoreAddOutlined:On,MinusCircleOutlined:Nl,PickColors:ut,InputNumber:Kn,PlusCircleOutlined:Bl},props:{value:{type:Array,default:()=>[]},format:{type:Array,default:()=>[]},useLabelIndex:{type:Boolean,default:!1},max:{type:Number,default:-1}},emits:["change"],setup(t,{emit:o}){const n=e.computed({get:()=>t.value,set:c=>{o("change",c)}});return{myValue:n,onAdd:()=>{var u;const c=(u=t.value)==null?void 0:u.slice();if(!Array.isArray(c))return;const p=c.length;if(t.max===-1||t.max>p){const f=c[0];if(Object.prototype.toString.call(f)==="[object Object]"){const h=Object.keys(f),A={};h.forEach(g=>{A[g]=""}),c.push(A)}else typeof f=="string"&&c.push(f);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 h;const f=(h=t.value)==null?void 0:h.slice();if(Array.isArray(f)){const A=c==null?void 0:c.target,g=(A==null?void 0:A.value)!=null?A==null?void 0:A.value:c;u?f[p][u]=g:f[p]=g,n.value=f}},onDelete:c=>{var u;const p=(u=t.value)==null?void 0:u.slice();if(Array.isArray(p)){if(p.length===1){$.message.warn("已经是最后一条数据,无法删除");return}p.splice(c,1),n.value=p}},theme:"light",formatTypeValue:c=>c||"value"}}}),lf="",bp={class:"form-group"},Cp={class:"form-row"},wp={key:0,class:"label"},_p={key:1,class:"label"},xp={class:"icon-group"};function kp(t,o,n,a,r,l){const i=e.resolveComponent("appstore-add-outlined"),d=e.resolveComponent("draggable"),s=e.resolveComponent("minus-circle-outlined");return e.openBlock(),e.createElementBlock("div",bp,[e.createVNode(i,{class:"icon add",onClick:t.onAdd},null,8,["onClick"]),e.createVNode(d,{class:"form",modelValue:t.myValue,"onUpdate:modelValue":o[0]||(o[0]=c=>t.myValue=c),"item-key":"id"},{item:e.withCtx(({element:c,index:p})=>[e.createElementVNode("div",Cp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.format,(u,f)=>(e.openBlock(),e.createElementBlock("div",{class:"form-item",key:f},[Array.isArray(u.label)?(e.openBlock(),e.createElementBlock("span",wp,e.toDisplayString(u.useLabelIndex?u.label[p]+(p+1):u.label[p]),1)):(e.openBlock(),e.createElementBlock("span",_p,e.toDisplayString(u.useLabelIndex?u.label+(p+1):u.label),1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.useComponentType(u.type)),e.mergeProps({class:"value",[t.formatTypeValue(u.typeValue)||""]:typeof c=="string"?c:c[u.value]??u.defaultValue,style:{width:!["color","switch"].includes(u.type)&&t.format.length>1?"110px":""}},u.props,{theme:t.theme,"use-blur-event":!1,onChange:h=>t.onValueChange(h,p,u.value)}),null,16,["style","theme","onChange"]))]))),128))])]),_:1},8,["modelValue"]),e.createElementVNode("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.myValue,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"icon-item",key:p},[e.createVNode(s,{class:"icon delete",onClick:u=>t.onDelete(p)},null,8,["onClick"])]))),128))])])}const Sp=te(gp,[["render",kp],["__scopeId","data-v-f0c0ab4d"]]),Ap=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 Np(t,o,n,a,r,l){const i=e.resolveComponent("a-textarea");return e.openBlock(),e.createBlock(i,{value:t.value,disabled:t.disabled,autoSize:{minRows:3},onChange:t.onTextareaChange},null,8,["value","disabled","onChange"])}const Tp=te(Ap,[["render",Np]]),Ep=e.defineComponent({name:"PropsToForm",components:{Input:Oc,InputNumber:Kn,RadioGroup:Dc,Select:Mc,Switch:Uc,ColorPick:up,ColorGroupPick:yp,FormGroup:Sp,Textarea:Tp},props:{props:{type:Object,require:!0},disabled:{type:Boolean,default:!1},componentType:{type:String,default:""}},setup(t){const o=e.inject(Ft),n=e.inject(ao),a=e.inject(ro),r=e.computed(()=>{var s;return(s=e.unref(o))==null?void 0:s.type}),l=s=>{t.componentType&&t.componentType==="table"?a(s):n(s)},i=s=>{const{result:c,mapAttributeProp:p,key:u,value:f}=s;if(c==null||typeof c!="object")return;const{valueProp:h="value",changeValueEventName:A="change",events:g}=p;c[u]={...p,valueProp:h,value:f,events:{[A]:(x,S=!0)=>{l(S?{[u]:x}:{})},...g}}};return{formProps:e.computed(()=>{const s=t.props;return s==null||typeof s!="object"?{}:oe.reduce(s,(c,p,u)=>{const f=Ec[u];if(Array.isArray(f)){const h=f.find(A=>{const{onlyType:g,excludeType:x}=A;return g==null&&x==null?!0:g?Ve(e.unref(r),g):x?!Ve(e.unref(r),x):!1});h&&i({result:c,value:p,key:u,mapAttributeProp:h})}else i({result:c,value:p,key:u,mapAttributeProp:f});return c},{})}),lowerCaseIncludes:Ve}}}),sf="",Lp={class:"props-to-form"},Bp={class:"label"},Op={class:"component-wrapper"};function Vp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Lp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.formProps,(i,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"prop-item"},[e.createElementVNode("span",Bp,e.toDisplayString(i.label),1),e.createElementVNode("div",Op,[Array.isArray(i)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i,(s,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.component),e.mergeProps({key:c,class:"component",style:s.style,disabled:t.disabled},s.props,e.toHandlers(s.events)),null,16,["style","disabled"]))),128)):e.createCommentVNode("",!0),Array.isArray(i)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({key:0,class:"component",[i.valueProp||""]:i.value,style:i.style,disabled:t.disabled},i.props,e.toHandlers(i.events)),null,16,["style","disabled"])):e.createCommentVNode("",!0)],64))])]))),128))])}const Ip=te(Ep,[["render",Vp],["__scopeId","data-v-c6fb2484"]]);function Fp(){return new Worker("/assets/editor.worker-02df2e61.js")}function $p(){return new Worker("/assets/json.worker-867823a6.js")}function Dp(){return new Worker("/assets/ts.worker-7254b425.js")}const vp=e.defineComponent({name:"Editor",props:{valueData:{type:String,default:""},options:{type:Object,default:()=>({})},language:{type:String,default:"json"},isUseMinimap:{type:Boolean,default:!1},UseSuggestions:{type:Boolean,default:!1},autoFormat:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["change","update:valueData"],setup(t,{emit:o}){window.MonacoEnvironment={getWorker(l,i){return i==="json"?new $p:i==="typescript"||i==="javascript"?new Dp:new Fp}};const n=e.ref();let a=null;const r={light:"vs",dark:"vs-dark"};return e.onMounted(()=>{a=ja.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(oe.debounce(()=>{const l=a==null?void 0:a.getValue();o("change",l)},300)),a.onDidBlurEditorText(()=>{const l=a==null?void 0:a.getValue();o("update:valueData",l)})}),e.watch(()=>t.valueData,l=>{if(a){const i=a.getPosition();a.setValue(l),t.autoFormat&&a.getAction("editor.action.formatDocument").run(),i!=null&&a.setPosition(i)}}),e.onUnmounted(()=>{a==null||a.dispose()}),{dom:n}}}),cf="",Pp={class:"editor",ref:"dom"};function Mp(t,o,n,a,r,l){return e.openBlock(),e.createElementBlock("div",Pp,null,512)}const Ia=te(vp,[["render",Mp],["__scopeId","data-v-71e88372"]]),jp=[{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}],Rp=e.defineComponent({name:"TableColumnConfig",components:{ATable:$.Table,AModal:$.Modal,ACheckbox:$.Checkbox,AInput:$.Input,AInputNumber:$.InputNumber,ASelect:$.Select,ASelectOption:$.SelectOption,Editor:Ia},setup(){const t=e.inject(Me),o=e.computed(()=>{var g;return!!((g=e.unref(t))!=null&&g.isGroupTable)}),n=e.computed(()=>{var g;return((g=e.unref(t))==null?void 0:g.graphicConfig)||{}}),a=e.computed(()=>{var g;return((g=e.unref(t))==null?void 0:g.tableColumns)||[]}),r=e.ref([]);let l=null,i="";const d=e.ref(""),s=e.ref(""),c=e.ref(!1);e.watch(n,()=>{p()},{deep:!0,flush:"post"});const p=()=>{var x,S,w;let g=[];if(r.value=[],!o.value)g=((x=e.unref(n))==null?void 0:x.queryColumnList)||[];else{const V=((S=e.unref(n))==null?void 0:S.rowHeaderList)||[],m=((w=e.unref(n))==null?void 0:w.indicators)||[];g=[...V,...m]}g.forEach(V=>{var E;let m=(E=e.unref(a))==null?void 0:E.find(b=>b.prop===V.name);m||(m={label:V.label,prop:V.name,style:!1,width:"",renderText:"",headerTemplate:"",headerAlign:"left",align:"left",fixed:"",dataFormat:[],retentiondigit:null}),r.value.push(m)}),t.value.tableColumns=r.value};return e.onMounted(()=>{p()}),{configColumns:jp,configData:r,editorTitle:s,editorVisible:c,optionCode:d,handleOk:()=>{l&&i&&(l[i]=d.value),d.value="",c.value=!1},renderSave:(g,x,S)=>{g&&x&&(l=g,i=x,d.value=g[x]||"",c.value=!0,s.value=S)},onEditorChange:g=>{try{d.value=g}catch(x){console.error(x)}},changeRenderBool:(g,x)=>{g.style=x.target.checked,g.style?g.renderBool===void 0&&(g.renderBool=!1):delete g.renderBool}}}}),df="",Up={class:"table-column-config"};function Gp(t,o,n,a,r,l){const i=e.resolveComponent("a-checkbox"),d=e.resolveComponent("a-input"),s=e.resolveComponent("a-select-option"),c=e.resolveComponent("a-select"),p=e.resolveComponent("a-input-number"),u=e.resolveComponent("a-table"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-modal");return e.openBlock(),e.createElementBlock("div",Up,[e.createVNode(u,{class:"column-table",columns:t.configColumns,"data-source":t.configData,scroll:{x:"100%",y:400},pagination:!1,bordered:""},{bodyCell:e.withCtx(({column:A,text:g,record:x})=>[A.dataIndex==="style"?(e.openBlock(),e.createBlock(i,{key:0,onChange:S=>t.changeRenderBool(x,S),checked:x.style},null,8,["onChange","checked"])):A.dataIndex==="width"?(e.openBlock(),e.createBlock(d,{key:1,value:x.width,"onUpdate:value":S=>x.width=S,valueModifiers:{trim:!0}},null,8,["value","onUpdate:value"])):A.dataIndex==="renderText"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[x.style?(e.openBlock(),e.createBlock(d,{key:1,value:x.renderText,"onUpdate:value":S=>x.renderText=S,readOnly:!0,onClick:S=>t.renderSave(x,"renderText","列自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(g),1)],64))],64)):A.dataIndex==="headerTemplate"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[x.style?(e.openBlock(),e.createBlock(d,{key:1,value:x.headerTemplate,"onUpdate:value":S=>x.headerTemplate=S,readOnly:!0,onClick:S=>t.renderSave(x,"headerTemplate","列表头自定义函数")},null,8,["value","onUpdate:value","onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(g),1)],64))],64)):A.dataIndex==="headerAlign"?(e.openBlock(),e.createBlock(c,{key:4,style:{width:"100%"},size:"small",value:x.headerAlign,"onUpdate:value":S=>x.headerAlign=S},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="align"?(e.openBlock(),e.createBlock(c,{key:5,style:{width:"100%"},size:"small",value:x.align,"onUpdate:value":S=>x.align=S},{default:e.withCtx(()=>[e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("左对齐")]),_:1}),e.createVNode(s,{value:"center"},{default:e.withCtx(()=>[e.createTextVNode("居中")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("右对齐")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="fixed"?(e.openBlock(),e.createBlock(c,{key:6,style:{width:"100%"},size:"small",value:x.fixed,"onUpdate:value":S=>x.fixed=S},{default:e.withCtx(()=>[e.createVNode(s,{value:""},{default:e.withCtx(()=>[e.createTextVNode("不固定")]),_:1}),e.createVNode(s,{value:"left"},{default:e.withCtx(()=>[e.createTextVNode("靠左")]),_:1}),e.createVNode(s,{value:"right"},{default:e.withCtx(()=>[e.createTextVNode("靠右")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="dataFormat"?(e.openBlock(),e.createBlock(c,{key:7,value:x.dataFormat,"onUpdate:value":S=>x.dataFormat=S,style:{width:"100%"},mode:"multiple",allowClear:"",maxTagCount:1},{default:e.withCtx(()=>[e.createVNode(s,{value:"#,000"},{default:e.withCtx(()=>[e.createTextVNode("千分位")]),_:1}),e.createVNode(s,{value:"#.00"},{default:e.withCtx(()=>[e.createTextVNode("保留小数")]),_:1}),e.createVNode(s,{value:"#"},{default:e.withCtx(()=>[e.createTextVNode("保留有效位")]),_:1})]),_:2},1032,["value","onUpdate:value"])):A.dataIndex==="retentiondigit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:8},[x.dataFormat&&x.dataFormat.includes("#.00")?(e.openBlock(),e.createBlock(p,{key:0,value:x.retentiondigit,"onUpdate:value":S=>x.retentiondigit=S,min:0,max:10},null,8,["value","onUpdate:value"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),_:1},8,["columns","data-source"]),e.createVNode(h,{title:t.editorTitle,visible:t.editorVisible,"onUpdate:visible":o[0]||(o[0]=A=>t.editorVisible=A),"destroy-on-close":"",width:"700px",bodyStyle:{height:"500px",overflow:"auto"},centered:"",zIndex:1020,okText:"保存",cancelText:"取消",onOk:t.handleOk},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1},8,["title","visible","onOk"])])}const zp=te(Rp,[["render",Gp],["__scopeId","data-v-afebddc0"]]),Hp=e.defineComponent({name:"StyleConfigGroup",props:{componentType:{type:String,default:""},isGroupTable:{type:Boolean,default:!1}},components:{PropsToForm:Ip,TableColumnConfig:zp,Editor:Ia,AFormItem:$.FormItem,ASelect:$.Select,ASelectOption:$.SelectOption,ACollapse:$.Collapse,ACollapsePanel:$.CollapsePanel,ASwitch:$.Switch},setup(t){const o=e.ref([]),n=e.ref(["表格"]),a=e.inject(Ft),r=e.inject(an),l=e.inject(ao),i=e.inject(ro),d=e.inject(nn),s=E=>{l({...dn[E]},!1),d()},c=e.computed(()=>{var E;return(E=e.unref(a))==null?void 0:E.type}),p=["showTotalBool","totalName","expandAll"],u=e.computed(()=>Tc.map(E=>{const{props:b,title:O,enableProps:I,onlyType:L,excludeType:D}=E,v=[];b.forEach(y=>{typeof y=="string"&&(p.includes(y)?t.isGroupTable&&v.push(y):v.push(y))});let W,_;return t.componentType==="table"&&(L!=null&&L.includes(t.componentType))?(W=typeof I=="string"&&r.value?r.value[I]:void 0,_=oe.pick(e.unref(r),v)):(W=typeof I=="string"&&a.value?a.value[I]:void 0,_=oe.pick(e.unref(a),v)),{title:O,enableProps:W,enablePropsName:I,onlyType:L,excludeType:D,props:_}}).filter(({props:E})=>Object.keys(E).length>0)),f=(E,b)=>{const{onlyType:O,excludeType:I}=E;return O==null&&I==null?!0:O?Ve(b,O):I?!Ve(b,I):!1},h=(E,b)=>(b==null||b.stopPropagation(),E),A=(E,b)=>{b!=null&&l({[b]:E})},g=e.computed(()=>JSON.stringify(e.unref(a),null,2)),x=E=>{try{const b=JSON.parse(E||"{}");l(b,!1)}catch(b){console.error(b)}},S=e.ref(""),w=E=>{try{S.value=E}catch(b){console.error(b)}},V=(E,b)=>{try{i({[b]:E})}catch(O){console.error(O)}},m=e.computed(()=>{var E;return["customGraph"].includes((E=e.unref(a))==null?void 0:E.type)});return{type:c,handleChangeType:s,activePanel:o,tablePanel:n,ComponentString:g,updateComponentOptions:x,tableOptions:r,optionCode:S,onEditorChange:w,tableEditorChange:V,onSwitchClick:h,onSwitchChange:A,detailPropsGroups:u,isRenderForm:f,isShowOptionEditor:m}}}),pf="",uf="",Wp={class:"style-group"};function qp(t,o,n,a,r,l){const i=e.resolveComponent("a-select-option"),d=e.resolveComponent("a-select"),s=e.resolveComponent("a-form-item"),c=e.resolveComponent("a-switch"),p=e.resolveComponent("props-to-form"),u=e.resolveComponent("a-collapse-panel"),f=e.resolveComponent("editor"),h=e.resolveComponent("a-collapse"),A=e.resolveComponent("table-column-config");return e.openBlock(),e.createElementBlock("div",Wp,[t.componentType!=="table"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(s,{label:"图表类型"},{default:e.withCtx(()=>[e.createVNode(d,{value:t.type,"onUpdate:value":o[0]||(o[0]=g=>t.type=g),style:{width:"100%"},onChange:t.handleChangeType},{default:e.withCtx(()=>[e.createVNode(i,{value:"line"},{default:e.withCtx(()=>[e.createTextVNode("折线图")]),_:1}),e.createVNode(i,{value:"bar"},{default:e.withCtx(()=>[e.createTextVNode("柱状图")]),_:1}),e.createVNode(i,{value:"pie"},{default:e.withCtx(()=>[e.createTextVNode("饼图")]),_:1}),e.createVNode(i,{value:"comboGraph"},{default:e.withCtx(()=>[e.createTextVNode("组合图表")]),_:1}),e.createVNode(i,{value:"customGraph"},{default:e.withCtx(()=>[e.createTextVNode("自定义图表")]),_:1})]),_:1},8,["value","onChange"])]),_:1}),e.createVNode(h,{activeKey:t.activePanel,"onUpdate:activeKey":o[1]||(o[1]=g=>t.activePanel=g)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.title},[t.isRenderForm(g,t.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.title?(e.openBlock(),e.createBlock(u,{header:g.title,key:g.title},{extra:e.withCtx(()=>[typeof g.enableProps=="boolean"?(e.openBlock(),e.createBlock(c,{key:0,checked:g.enableProps,onChange:x=>t.onSwitchChange(x,g.enablePropsName),onClick:t.onSwitchClick},null,8,["checked","onChange","onClick"])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createVNode(p,{props:g.props,disabled:typeof g.enableProps=="boolean"?!g.enableProps:!1},null,8,["props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),128)),t.isShowOptionEditor?(e.openBlock(),e.createBlock(u,{key:"custom-option",header:"自定义option配置"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"typescript",valueData:t.optionCode,onChange:t.onEditorChange},null,8,["valueData","onChange"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey"])],64)):(e.openBlock(),e.createBlock(h,{key:1,activeKey:t.tablePanel,"onUpdate:activeKey":o[4]||(o[4]=g=>t.tablePanel=g)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.detailPropsGroups,g=>{var x;return e.openBlock(),e.createElementBlock(e.Fragment,{key:g.title},[g.title&&((x=g.onlyType)!=null&&x.includes(t.componentType))?(e.openBlock(),e.createBlock(u,{header:g.title,key:g.title},{default:e.withCtx(()=>[e.createVNode(p,{componentType:t.componentType,props:g.props,disabled:typeof g.enableProps=="boolean"?!g.enableProps:!1},null,8,["componentType","props","disabled"])]),_:2},1032,["header"])):e.createCommentVNode("",!0)],64)}),128)),e.createVNode(u,{key:"tableColumn",header:"表格列配置"},{default:e.withCtx(()=>[e.createVNode(A)]),_:1}),e.createVNode(u,{key:"headerCellStyleMethod",header:"表头单元格样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.headerCellStyleMethod,onChange:o[2]||(o[2]=g=>t.tableEditorChange(g,"headerCellStyleMethod"))},null,8,["valueData"])]),_:1}),e.createVNode(u,{key:"rowStyleMethod",header:"行样式"},{default:e.withCtx(()=>[e.createVNode(f,{class:"option-editor",language:"javascript",options:{fontSize:16,lineHeight:18},valueData:t.tableOptions.rowStyleMethod,onChange:o[3]||(o[3]=g=>t.tableEditorChange(g,"rowStyleMethod"))},null,8,["valueData"])]),_:1})]),_:1},8,["activeKey"]))])}const Yp=te(Hp,[["render",qp],["__scopeId","data-v-2fb3e2ad"]]),Kp=e.defineComponent({name:"Card",components:{CloseOutlined:ko},props:{index:{type:Number,require:!0},control:{type:Object,default:()=>({})},intersection:{type:Array,default:()=>[]}},emits:["delete","update"],setup(t,{emit:o}){const n=e.inject(ze),a=e.inject($t),r=e.inject(sn),l=e.computed(()=>{var _;return(_=e.unref(n))==null?void 0:_.filter(y=>y.keyName!=="")}),i=e.computed(()=>{var T,N;const _=[],y=(T=e.unref(l))==null?void 0:T.find(F=>{var P;return F.id===((P=t.control)==null?void 0:P.id)});if(y){const F=y.type,P=oe.pick(y,["value","startTime","endTime"]);(N=Object.keys(P))!=null&&N.length||(P.value="");for(const C in P)if(Object.prototype.hasOwnProperty.call(P,C)){const k=e.unref(r)[C];if(Array.isArray(k)){const B=k.find(M=>Ve(F,M.onlyType));B&&_.push({label:B.label,value:C})}else _.push({label:k.label,value:C})}}return _}),d=()=>{o("delete",t.index),s(t.control.id)};function s(_){const y=e.unref(l).find(T=>T.id===_);if(y){const{type:T,id:N,events:F=[]}=y,P=Rt(T),C=F.findIndex(k=>{var B;return k.on===P&&k.target===((B=e.unref(g))==null?void 0:B.id)&&k.emit==="refreshData"});C!==-1&&(F.splice(C,1),a({id:N,events:F}))}}const c=_=>{const y={...t.control};if(y.id=_,_){const T=e.unref(l).find(N=>N.id===_);T&&(y.keyName=T.keyName,w(T,_))}delete y.prop,o("update",y,t.index)},p=e.ref(""),u=()=>{p.value=t.control.id},f=_=>{o("update",{...t.control,prop:_},t.index)},h=_=>{o("update",{...t.control,rule:_},t.index)},A=_=>{const y={...t.control};_==null?delete y.mode:y.mode=_,delete y.conditionLabel,delete y.conditionName,delete y.conditionKey,delete y.conditionValueType,o("update",y,t.index)},g=e.inject(Me),x=e.inject(pe),S=e.computed(()=>{var Z;const{classificationList:_=[],seriesList:y=[],leftAxisList:T=[],rightAxisList:N=[],indicators:F=[],rowHeaderList:P=[],queryColumnList:C=[]}=e.unref(x),k=oe.cloneDeep([..._,...y,...T,...N,...F,...P,...C]);if(k!=null&&k.length)for(const Q of k)Q.id=Q.name;const B=[{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(Q=>({...Q,id:Q.name,label:Q.title||Q.label})),...k];((Z=e.unref(g))==null?void 0:Z.type)==="ecanSelect"&&B.unshift({label:"上级编码",name:"上级编码",id:"parentCode",genericType:"TEXT"});const M=new Map,j=B.length;for(let Q=0;Q<j;Q++){const X=B[Q],{id:ne}=X||{};M.set(ne,X)}return[...M].map(([Q,X])=>X)});function w(_,y){var C;const{type:T,id:N,events:F=[]}=_,P=Rt(T);if(e.unref(p)&&y!==e.unref(p)){const{controlList:k=[]}=e.unref(x);k.find(B=>B.id===e.unref(p))||s(e.unref(p))}F.find(k=>{var B;return k.on===P&&k.target===((B=e.unref(g))==null?void 0:B.id)&&k.emit==="refreshData"})||a({id:N,events:[...F,{on:P,target:(C=e.unref(g))==null?void 0:C.id,emit:"refreshData"}].reverse()})}const V=(_,y)=>{if(_){const{label:T,name:N,id:F,genericType:P,indexCode:C,typeGuid:k,indexCodeNum:B}=y||{};o("update",{...t.control,conditionKey:F,conditionLabel:T,conditionName:N,conditionValueType:P,indexCode:C,typeGuid:k,indexCodeNum:B},t.index)}else{const T={...t.control};delete T.conditionLabel,delete T.conditionName,delete T.conditionKey,delete T.conditionValueType,o("update",T,t.index)}},m=(_,y)=>{var T;return(T=y==null?void 0:y.keyName)==null?void 0:T.toLowerCase().includes(_==null?void 0:_.toLowerCase())},E=(_,y)=>{var T;return(T=y==null?void 0:y.label)==null?void 0:T.toLowerCase().includes(_==null?void 0:_.toLowerCase())},b=e.computed(()=>{const _=e.unref(S).find(T=>T.id===t.control.conditionKey);let y="";return _&&(y=(_==null?void 0:_.genericType)||""),y==="TEXT"?[{label:"属于",value:"IN"},{label:"不属于",value:"NOT_IN"},{label:"包含",value:"LIKE"},{label:"不包含",value:"NOT_LIKE"},{label:"开头是",value:"LIKE%"},{label:"结尾是",value:"%LIKE"},{label:"等于",value:"EQUAL"}]:y==="NUMBER"?[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}]:y==="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"}]:[]}),O=e.computed(()=>{let _=!1;const{id:y=""}=t.control;if(y){const T=e.unref(l).find(F=>F.id===y),N=["table","bar","combograph","line","pie","radar","scatter","list","circulate"];Ve(T==null?void 0:T.type,N)&&(_=!0)}return _}),I=e.computed(()=>{let _=!1;const{id:y=""}=t.control;if(y){const T=e.unref(l).find(N=>N.id===y);(T==null?void 0:T.type)==="ecanRangePicker"&&(_=!0)}return _}),L=e.computed(()=>{let _=!1;const{id:y=""}=t.control;if(y){const T=e.unref(l).find(N=>N.id===y);["ecanDatePicker","ecanRangePicker"].includes(T==null?void 0:T.type)&&(_=!0)}return _});return{propOptions:i,usedComponentList:l,onDelete:d,onIdChange:c,onIdFocus:u,onPropChange:f,onModeChange:A,onRuleChange:h,conditionKeyOptions:S,onConditionKeyChange:V,idFilterOption:m,filterOption:E,onFormatChange:_=>{o("update",{...t.control,format:_},t.index)},onModelPropChange:_=>{o("update",{...t.control,modelKey:_.target.value},t.index)},ruleOption:b,isShowProp:I,isShowFormat:L,isShowModelProp:O,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"}]}}}),ff="",mf="",Qp={class:"control-card"};function Xp(t,o,n,a,r,l){const i=e.resolveComponent("a-select"),d=e.resolveComponent("a-input"),s=e.resolveComponent("close-outlined");return e.openBlock(),e.createElementBlock("div",Qp,[e.createVNode(i,{class:"field-name",value:t.control.conditionKey,options:t.conditionKeyOptions,fieldNames:{value:"id"},"allow-clear":"","show-search":"",onChange:t.onConditionKeyChange,"filter-option":t.filterOption},null,8,["value","options","onChange","filter-option"]),e.createVNode(i,{class:"field-name",value:t.control.rule,options:t.ruleOption,onChange:t.onRuleChange},null,8,["value","options","onChange"]),e.createVNode(i,{class:"field-name",value:t.control.id,options:t.usedComponentList,fieldNames:{label:"keyName",value:"id"},"show-search":"","filter-option":t.idFilterOption,onChange:t.onIdChange,onClick:t.onIdFocus},null,8,["value","options","filter-option","onChange","onClick"]),t.isShowModelProp?(e.openBlock(),e.createBlock(d,{key:0,class:"field-name",value:t.control.modelKey,onInput:t.onModelPropChange},null,8,["value","onInput"])):e.createCommentVNode("",!0),t.isShowProp?(e.openBlock(),e.createBlock(i,{key:1,class:"field-name",value:t.control.prop,options:t.propOptions,onChange:t.onPropChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),t.isShowFormat?(e.openBlock(),e.createBlock(i,{key:2,class:"field-name",value:t.control.format,options:t.formatOptions,onChange:t.onFormatChange},null,8,["value","options","onChange"])):e.createCommentVNode("",!0),e.createVNode(s,{class:"delete-icon",onClick:t.onDelete},null,8,["onClick"])])}const Jp=te(Kp,[["render",Xp],["__scopeId","data-v-d9ba198c"]]),Zp=e.defineComponent({name:"ControlGroup",props:{intersection:{type:Array,default:()=>[]}},components:{ControlCard:Jp,AButton:$.Button},setup(t,{expose:o}){const n=e.inject(ze),a=e.inject(pe),r=e.inject(ke),l=e.computed(()=>{var f;const u=((f=e.unref(a))==null?void 0:f.controlList)||[];for(const h of u)h.conditionKey&&!$o(h,"rule")&&(h.prop==="startTime"?h.rule="GREATER_EQUAL":h.prop==="endTime"?h.rule="LESS_EQUAL":h.rule="EQUAL");return u}),i=e.ref(null),d=u=>{const f={...e.unref(a),...u,sqlConditions:qn({...e.unref(a),...u},e.unref(n))};r(f)},s=()=>{var f;const u=(f=e.unref(l))==null?void 0:f.slice();u.push({}),d({controlList:u})},c=u=>{var h;const f=(h=e.unref(l))==null?void 0:h.slice();f.splice(u,1),d({controlList:f})},p=(u,f)=>{var A;const h=(A=e.unref(l))==null?void 0:A.slice();h[f]=u,d({controlList:h})};return o({onAddControl:s}),{controlList:l,bindComponentId:i,onAddControl:s,onDeleteControl:c,onUpdateControl:p}}}),hf="",eu={class:"control-group"},tu={class:"control-group-header"},ou={class:"control-group-content"};function nu(t,o,n,a,r,l){const i=e.resolveComponent("a-button"),d=e.resolveComponent("control-card");return e.openBlock(),e.createElementBlock("div",eu,[e.createElementVNode("div",tu,[e.createVNode(i,{onClick:t.onAddControl},{default:e.withCtx(()=>[e.createTextVNode("添加")]),_:1},8,["onClick"])]),e.createElementVNode("div",ou,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.controlList,(s,c)=>(e.openBlock(),e.createBlock(d,{key:c,index:c,control:s,intersection:t.intersection,onDelete:t.onDeleteControl,onUpdate:t.onUpdateControl},null,8,["index","control","intersection","onDelete","onUpdate"]))),128))])])}const au=te(Zp,[["render",nu],["__scopeId","data-v-365e5dd8"]]),ru=(t={})=>{const o=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u}=i;return{label:d,columnName:s,location:c,show:p,calcType:"COLUMN",hrpIndexCode:u}},n=(i,d)=>Object.prototype.hasOwnProperty.call(i,d),a=i=>{n(i,"dataType")&&(i.fieldType==="DATE"&&(i.label=i.fieldName,i.dataType==="component"&&(i.fieldValue="${"+i.fieldValue+"}")),delete i.dataType),n(i,"activeKey")&&delete i.activeKey,n(i,"radioValue")&&delete i.radioValue},r=i=>{const d=[];return i!=null&&i.length&&i.forEach(s=>{if(s.join&&s.conditions){const c=!s.conditions.some(p=>p.join&&p.conditions);s.conditions.forEach((p,u)=>{a(p),c?u<s.conditions.length-1?d.push({join:s.join,...p}):d.push(p):p.join&&p.conditions?d.push({conditions:r([p]),join:s.join}):d.push(p)})}else a(s),d.push(s)}),d},l=(i={})=>{const{label:d,name:s,location:c,show:p,indexCode:u,calcType:f="COLUMN",builtInFormula:h,builtInValueSource:A,builtInCalcWay:g,formula:x,conditions:S,aggregate:w}=i;let V;return S&&(V=r(S)),{label:d.trim(),columnName:s,location:c,show:p,calcType:f,hrpIndexCode:u,aggregate:w,builtInFormula:h,builtInValueSource:A,builtInCalcWay:g,formula:x,conditions:V}};return async()=>{const{graphicConfig:i,type:d,request:s}=t;let{source:c,dataViewId:p,plugin:u="1",layer:f,chartType:h,classificationList:A=[],seriesList:g=[],leftAxisList:x=[],rightAxisList:S=[],queryColumnList:w=[],indicators:V=[],dataSourceId:m,idxLibMode:E,preview:b=!1}=i||{};f==null&&(Ve(d,"table")?f="1":f="2");let O;if(Array.isArray(A)&&A.length>0){const v=A.length;for(let W=0;W<v;W++){const _=A[W]||{},{label:y="",name:T="",show:N=!1,sort:F,customGroup:P,conditions:C}=_;if(N||v===1){O={label:y.trim(),columnName:T,show:N,sort:F,customGroup:P,conditions:r(C)};break}}}let I;if(Array.isArray(g)&&g.length>0){const v=g.length;for(let W=0;W<v;W++){const _=g[W]||{},{label:y="",name:T="",show:N=!1,sort:F,customGroup:P,conditions:C}=_;if(N||v===1){I={label:y.trim(),columnName:T,show:N,sort:F,customGroup:P,conditions:r(C)};break}}}const L=[];w==null||w.forEach(v=>{L.push(o(v))});const D=[];if(x==null||x.forEach(v=>{v.location="LEFT",D.push(l(v))}),S==null||S.forEach(v=>{v.location="RIGHT",D.push(l(v))}),V==null||V.forEach(v=>{v.location="LEFT",D.push(l(v))}),!(f==="1"&&L.length===0)&&!(f==="2"&&D.length===0))try{return await s.post("/diagram",{source:c,dataViewId:p,plugin:u,layer:f,chartType:h,classification:O,series:I,indicatorList:D,queryColumns:L,pageFlag:!0,sqlConditions:[],dataSourceId:m,idxLibMode:E,preview:b})}catch(v){console.error(v)}}},Fa=(t,o)=>{const n={dayjs:ce,...o};let a="";const r=[];for(const d in n)a+=`${d},`,r.push(n[d]);a=a.replace(/,$/,"");const l=`function (${a}){return ${t}}`;let i;try{i=Function(`"use strict";return (${l})`)()(...r)}catch{return t}return i},no=(t="",{textData:o,codeData:n}={},{useNewline:a=!1,useSpace:r=!1}={})=>{const l={...o},i=t.match(/\{(.+?)\}/g);if(i==null||i.length===0)return t;for(let d=0;d<i.length;d++){const s=i[d];let c=s.slice(1,-1).trim();const p=/[\u4e00-\u9fa5a-z-_A-Z0-9]*/g,u=c.match(p);for(let f=0;f<u.length;f++){const h=u[f],A=l[h];A!=null&&(c=c.replace(h,A))}(/\(.*\)/g.test(c)||/[+/\\*]/g.test(c))&&(c=Fa(c,n)),t=t.replace(s,c)}return a&&(t=t==null?void 0:t.replace(/\n|\\n/g,"<br/>")),r&&(t=t==null?void 0:t.replace(/\s{2,}?/g," ")),t},Vt=(t,o)=>{var r;if(t==null)return o;const n=t.match(/\{.*\}/g);if(n==null||n.length===0)return o;const a=n.length;for(let l=0;l<a;l++){const i=n[l];if(i==null||i==="")break;let d=(r=i.slice(1,-1))==null?void 0:r.trim();d=d==null?void 0:d.replace(/value/g,o);try{let s=d;(/\(.*\)/g.test(d)||/[+/\\*]/g.test(d))&&(s=Fa(d)),t=t.replace(i,s)}catch{t=t.replace(i,d)}}return t},lu=(t,o,n)=>{switch(t.type){case"bar":return iu(t,o,n);case"line":return su(t,o,n);case"pie":return cu(t,o,n);case"comboGraph":return du(t,o,n);default:return{}}},iu=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>{const c=i,p=c.length,u=[];for(let f=0;f<p;f++){const h={...c[f],type:"bar",barWidth:t.barWidth};t.isStack&&(h.stack="stack"),h.label={show:t.labelShow,fontSize:t.labelFontSize,position:t.labelPosition,color:t.labelColor},u.push(h)}return u}),s=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p}));return{tooltip:{trigger:"axis",show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:A,seriesName:g,name:x,value:S,data:w}=c[h]||{};h===0&&(u+=`${x}<br/>`),u+=no(f,{textData:{marker:A,name:x,value:S,a:g,b:x,c:S,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},xAxis:{type:t.isUseHorizontalAxis?"value":"category",data:t.isUseHorizontalAxis?null:e.unref(s),inverse:t.isUseHorizontalAxis?t.xAxisInverse:t.axisInverse,minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Vt(r,c)}},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:{type:t.isUseHorizontalAxis?"category":"value",data:t.isUseHorizontalAxis?l:null,inverse:t.isUseHorizontalAxis?t.axisInverse:t.yAxisInverse,minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,rotate:t.yAxisLabelRotate,width:t.yAxisLabelWidth,overflow:t.yAxisLabelOverflow,formatter(c){return Vt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},series:e.unref(d)}},su=(t,o,n)=>{const a=t.yAxisLabelFormatter,r=t.xAxisLabelFormatter,{dimensions:l=[],dataset:i=[]}=o,d=e.computed(()=>l.map(c=>{let p={};return c&&typeof c=="object"?p={...c,textStyle:{fontSize:n}}:p={value:c,textStyle:{fontSize:n}},p})),s=e.computed(()=>{const c=[],p=i.length;for(let u=0;u<p;u++)c.push({type:"line",...i[u],symbolSize:t.symbolSize,smooth:t.smooth,lineStyle:{width:t.lineStyleWidth}});return c});return{tooltip:{trigger:"axis",textStyle:{fontSize:n},show:t.tooltipShow,formatter:c=>{const p=c.length;let u="",f=t.tooltipFormatter;f===""&&(f="{marker} {a} {c}");for(let h=0;h<p;h++){const{marker:A,seriesName:g,name:x,value:S,data:w}=c[h]||{};h===0&&(u+=`${x}<br/>`),u+=no(f,{textData:{marker:A,name:x,value:S,a:g,b:x,c:S,...w}},{useNewline:!0,useSpace:!0}),u+="<br/>"}return u}},xAxis:{type:"category",data:e.unref(d),minInterval:t.xAxisMinInterval,splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow,formatter(c){return Vt(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 Vt(a,c)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{fontSize:n}},series:e.unref(s)}},cu=(t,o,n)=>{const{dataset:a=[]}=o;let{data:r=[]}=a[0]||{};if(Array.isArray(t.colors)){const l=t.isUseLabelColors,i=t.colors;r=r.map((d,s)=>({label:l?{color:i[s]}:{},...d}))}return{tooltip:{show:t.tooltipShow,trigger:t.tooltipTrigger,formatter:l=>{const{marker:i,seriesName:d,name:s,value:c,percent:p,data:u}=l||{};return no(t.tooltipFormatter,{textData:{marker:i,name:s,value:c,percent:p,a:d,b:s,c,d:p,...u}},{useNewline:!0,useSpace:!0})},textStyle:{color:t.tooltipTextStyleColor}},legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n===18?n:t.labelFontSize}},series:[{data:r,type:"pie",radius:[t.innerRadius,t.outerRadius],center:[t.centerLeft,t.centerTop],roseType:t.roseType,avoidLabelOverlap:!1,minAngle:t.minAngle,label:{show:t.labelPosition!=="center"&&t.labelShow,color:t.labelColor,fontSize:n===18?n:t.labelFontSize,position:t.labelPosition,formatter:rs(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:{}}}]}},du=(t,o,n)=>{const{dimensions:a=[],dataset:r=[]}=o,l=e.computed(()=>a.map(s=>{let c={};return s&&typeof s=="object"?c={...s,textStyle:{fontSize:n}}:c={value:s,textStyle:{fontSize:n}},c})),i=e.computed(()=>{const s=[],c=r.length,p=t.seriesTypes;for(let u=0;u<c;u++){const f=p[u];s.push({type:f==null?void 0:f.type,yAxisIndex:f==null?void 0:f.axisIndex,...r[u]})}return s}),d=e.computed(()=>{const s=t.yAxis;return s==null?void 0:s.map(c=>({type:"value",minInterval:t.yAxisMinInterval,splitLine:{show:t.yAxisSplitLineShow,lineStyle:{color:t.yAxisSplitLineStyleColor}},axisLabel:{fontSize:n,color:t.yAxisLabelColor,formatter(p){return Vt(c.axisLabelFormatter,p)}},axisLine:{show:t.yAxisLineAlwaysDisplay,lineStyle:{color:t.yAxisLineStyleColor}}}))});return{legend:{show:t.legendShow,orient:t.legendOrient,top:t.legendTop,left:t.legendLeft,textStyle:{color:t.legendTextStyleColor,fontSize:n}},tooltip:{trigger:"axis",show:t.tooltipShow,formatter:s=>{const c=s.length;let p="",u=t.tooltipFormatter;u===""&&(u="{marker} {a} {c}");const f=t.seriesTypes;for(let h=0;h<c;h++){const A=f[h],{tooltipFormatter:g}=A||{},{marker:x,seriesName:S,name:w,value:V,data:m}=s[h]||{};h===0&&(p+=`${w}<br/>`),p+=no(g||u,{textData:{marker:x,name:w,value:V,seriesName:S,a:S,b:w,c:V,...m}},{useNewline:!0,useSpace:!0}),p+="<br/>"}return p},textStyle:{color:t.tooltipTextStyleColor,fontSize:n}},xAxis:{minInterval:t.xAxisMinInterval,type:"category",data:e.unref(l),splitLine:{show:t.xAxisSplitLineShow,lineStyle:{color:t.xAxisSplitLineStyleColor}},axisLabel:{color:t.xAxisLabelColor,interval:t.xAxisLabelInterval||0,rotate:t.xAxisLabelRotate,width:t.xAxisLabelWidth,overflow:t.xAxisLabelOverflow},axisLine:{lineStyle:{color:t.xAxisLineStyleColor}},axisTick:{show:t.xAxisTickShow}},yAxis:e.unref(d),series:e.unref(i)}},pu=(t=[],o)=>{let{name:n="name",types:a=[]}=o||{};n=(n==null?void 0:n.trim())||n;const r=new Set,l=new Map,i=t.length,d=a.length;if(i===1){const p=[];for(let f=0;f<d;f++){const h=a[f],{label:A,value:g}=h,x={...t[0],value:t[0][g]};r.add(A),p.push(x)}const u=t[0][n]||"";l.set(u,p)}else for(let p=0;p<i;p++){const u=t[p],f=u[n];r.add(f);for(let h=0;h<d;h++){const A=a[h],{label:g,value:x}=A,S={...u,value:u[x]};if(l.has(g)){const w=l.get(g);w.push(S),l.set(g,w)}else l.set(g,[S])}}const s=Array.from(r),c=[];for(const[p,u]of l)c.push({name:p,data:u});return{dimensions:s,dataset:c}},uu=(t,o)=>{let{name:n="name",value:a="value",type:r="type"}=o||{};n=n==null?void 0:n.trim(),a=a==null?void 0:a.trim(),r=r==null?void 0:r.trim();const l=new Set,i=new Map,d=t.length;for(let p=0;p<d;p++){const u=t[p],f=u[n]||"",h=u[a]||"",A=u[r]||"";if(l.add(f),i.has(A)){const g=i.get(A);g.push({name:f,value:h,...u}),i.set(A,g)}else i.set(A,[{name:f,value:h,...u}])}const s=Array.from(l),c=[];for(const[p,u]of i)c.push({name:p,data:u});return{dimensions:s,dataset:c}},fu=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):s),a=e.computed(()=>t.graphicConfig?e.unref(t.graphicConfig):d),r=e.inject(Le);let l=null;const i=e.inject(Be)||"",d=e.inject(pe)||{},s=e.inject(Ft)||{},c=e.ref(null),p=e.ref(null),u=e.ref(),f=e.ref(!1),h=e.ref(!1),A=e.computed(()=>h.value?za:12),g=e.ref({}),x=e.ref(),S=e.computed(()=>{const L=e.unref(n.value);if((L==null?void 0:L.type)==="customGraph")return x.value;const D=lu(L,e.unref(g),A.value);return{toolbox:{show:L.toolboxShow,left:L.toolboxLeft,top:L.toolboxTop,itemSize:L.toolboxItemSize,itemGap:L.toolboxItemGap,feature:{myDataZoom:{show:h.value?!1:L.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:L.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:L.titleText,subtext:L.titleSubtext,left:"center"},grid:{top:L.gridTop,bottom:L.gridBottom,left:L.gridLeft,right:L.gridRight,containLabel:L.gridContainLabel},color:L.colors,...D}}),w=(L=[],D,v=!1)=>{const W=v?D:null;g.value=pu(L,W)},V=(L=[],D)=>{g.value=uu(L,D)},m=async()=>{var L,D,v;try{const W=ru({graphicConfig:e.unref(a.value),type:(L=e.unref(n.value))==null?void 0:L.type,request:r,indicatorToken:i});f.value=!0;const _=await W(),{columns:y=[],rows:T=[]}=((D=_==null?void 0:_.data)==null?void 0:D.data)??{};if(((v=e.unref(n.value))==null?void 0:v.type)==="pie"){let N=[];if(y.length>0){const F=y[0],P=y[1];N=T.map(C=>({name:C[F],value:C[P]}))}V(N)}else{let N;y.length>0&&(N={name:y[0],types:y.slice(1).map(F=>({label:F,value:F}))}),w(T,N,!0)}}catch(W){console.error(W)}finally{f.value=!1}},E={title:{text:"暂无数据",x:"center",y:"center",textStyle:{fontSize:14,fontWeight:"normal"}}},b=()=>{e.unref(g).dataset.length===0?u.value.setOption(E):u.value.setOption(S.value)},O=()=>{e.unref(n.value).type!=="customGraph"&&m()},I=()=>{var L;(L=u.value)==null||L.resize()};return e.watch(S,()=>{b()},{deep:!0}),e.watch(()=>e.unref(n.value).optionCode,L=>{try{const D=eval;x.value=D(L)}catch(D){console.error(D)}},{immediate:!0}),e.onMounted(()=>{p.value&&(l=new ResizeObserver(I),l.observe(p.value)),u.value=Ga.init(c.value)}),e.onBeforeUnmount(()=>{u.value.dispose(),l&&(l.disconnect(),l=null)}),o({refreshData:O}),{echartRef:c,loading:f}}}),yf="",mu={class:"ecan-chart-graph",ref:"chartWrapRef"},hu={style:{width:"100%",height:"100%"},ref:"echartRef"};function yu(t,o,n,a,r,l){const i=e.resolveComponent("a-spin");return e.openBlock(),e.createElementBlock("div",mu,[e.createVNode(i,{spinning:t.loading,wrapperClassName:"chart-spin",tip:"数据加载中..."},{default:e.withCtx(()=>[e.createElementVNode("div",hu,null,512)]),_:1},8,["spinning"])],512)}const $a=te(fu,[["render",yu],["__scopeId","data-v-8049fed2"]]),gu=e.defineComponent({name:"DataConfig",components:{DataGroup:Nc,StyleGroup:Yp,ChartGraph:$a,ATabs:$.Tabs,ATabPane:$.TabPane,ControlGroup:au},setup(){var E;const t=e.ref("1"),o=e.ref([0,1,2]),n=e.ref(),a=e.inject(Me),r=e.inject(on),l=e.inject(pe),i=e.inject(ze),d=e.inject(cn),s=["text","proportion","select","checkbox","radio","radar","circulate"],c=e.computed(()=>{const b=oe.cloneDeep(e.unref(a));p(b);const O=oe.pick(b,oe.without(Object.keys(b),"position","top","left","width","height"));Ve(b.type,s)?(O.height=b.height,O.width=b.width):O.height="290px";const I=oe.cloneDeep(e.unref(l));return I.pageMode="design",I.componentList=i,I.preview=!0,I.pageConfig=d,{...O,graphicConfig:I,toolboxShow:!1,sourceLeft:b.left,sourceTop:b.top}});function p(b){var O,I,L,D;["#ffffff","#fff"].includes((O=b==null?void 0:b.color)==null?void 0:O.toLowerCase())&&(b.color="#000"),["#ffffff","#fff"].includes((I=b==null?void 0:b.variableColor)==null?void 0:I.toLowerCase())&&(b.variableColor="#000"),["#ffffff","#fff"].includes((L=b==null?void 0:b.increaseColor)==null?void 0:L.toLowerCase())&&(b.increaseColor="#000"),["#ffffff","#fff"].includes((D=b==null?void 0:b.declineColor)==null?void 0:D.toLowerCase())&&(b.declineColor="#000")}const u=e.computed(()=>{let b=!0;return Ve(e.unref(c).type,s)&&(b=!1),b}),f=e.computed(()=>{var b;return(b=e.unref(c))==null?void 0:b.type}),h=e.computed(()=>{var b;return!!((b=e.unref(c))!=null&&b.isGroupTable)}),A=b=>{const O=b==="1";O&&f.value==="table"&&m(),window.changeShowTable&&window.changeShowTable(O),b==="3"&&V()},g=e.ref(),x=e.inject(Le),S=e.unref(e.inject(Be)),w=(E=window==null?void 0:window.config)==null?void 0:E.pageId;function V(){var W;const{leftAxisList:b=[],rightAxisList:O=[],queryColumnList:I=[],indicators:L=[]}=e.unref(l),D=[...b,...O,...I,...L],v={};for(const _ of D){const{id:y="",indexCode:T=""}=_;y&&!$o(_,"calcType")&&!v[y]&&(v[y]=T)}if((W=Object.keys(v))!=null&&W.length){const _=[];for(const y in v)_.push(new Promise((T,N)=>{x.post(`${xe}/diagram/hrpIndexWithComplex`,{pageId:w,indexGuid:y,indexCode:v[y],dataSourceId:""},{headers:{Authentication:S,operateContext:"ygt"}}).then(F=>{var k;const{success:P,data:C=[]}=F.data;P&&((k=C==null?void 0:C.dataViewColumns)!=null&&k.length)?T(C.dataViewColumns):N(C)}).catch(F=>{N(F)})}));Promise.all(_).then(y=>{if(y!=null&&y.length){const T=y.reduce((N,F)=>N.filter(P=>F.find(C=>C.typeGuid===P.typeGuid)));g.value=T.filter(N=>N.typeGuid)}})}}const m=()=>{var O;let b;r&&f.value==="table"?b=window.updateConfig:b=(O=e.unref(n))==null?void 0:O.refreshData,typeof b=="function"&&b()};return e.provide(nn,m),e.watch(l,()=>{m()},{deep:!0,flush:"post"}),{isShowStyleConfig:r,activeKey:t,activePanel:o,componentRef:n,type:f,isGroupTable:h,onChange:A,component:c,fullWidth:u,renderUsedComponents:i,intersection:g}}}),gf="",bu={class:"data-config"},Cu={key:0,id:"table-wrap",class:"chart-component",ref:"tableWrapRef",style:{width:"100%",height:"290px"}};function wu(t,o,n,a,r,l){const i=e.resolveComponent("data-group"),d=e.resolveComponent("a-tab-pane"),s=e.resolveComponent("style-group"),c=e.resolveComponent("control-group"),p=e.resolveComponent("a-tabs"),u=e.resolveComponent("chart-graph");return e.openBlock(),e.createElementBlock("div",bu,[e.createVNode(p,{activeKey:t.activeKey,"onUpdate:activeKey":o[0]||(o[0]=f=>t.activeKey=f),onChange:t.onChange},{default:e.withCtx(()=>[e.createVNode(d,{key:"1",tab:"数据配置"},{default:e.withCtx(()=>[e.createVNode(i),t.isShowStyleConfig?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.type),e.mergeProps({key:0,class:["chart-component",t.fullWidth?"full-width":""]},t.component,{ref:"componentRef"}),null,16,["class"]))]),_:1}),t.isShowStyleConfig?(e.openBlock(),e.createBlock(d,{key:"2",tab:"样式配置","force-render":""},{default:e.withCtx(()=>[e.createVNode(s,{componentType:t.type,isGroupTable:t.isGroupTable},null,8,["componentType","isGroupTable"])]),_:1})):e.createCommentVNode("",!0),t.renderUsedComponents?(e.openBlock(),e.createBlock(d,{key:"3",tab:"全局过滤","force-render":""},{default:e.withCtx(()=>[e.createVNode(c,{ref:"controlGroup",intersection:t.intersection},null,8,["intersection"])]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["activeKey","onChange"]),t.isShowStyleConfig?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.type==="table"&&t.activeKey==="1"?(e.openBlock(),e.createElementBlock("div",Cu,null,512)):e.withDirectives((e.openBlock(),e.createBlock(u,{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 _u=te(gu,[["render",wu],["__scopeId","data-v-37d75328"]]),xu=e.defineComponent({name:"IndicatorLibrary",components:{DataList:ti,DataConfig:_u},props:{isShowStyleConfig:{type:Boolean,default:!1},sourceType:{type:String,default:""},indicatorToken:{type:String,default:""},selectedComponent:{type:Object,default:()=>{}},request:{default:null},renderUsedComponentList:{type:Array,default:()=>[]},mapAttributeProps:{type:Object,default:()=>{}},pageConfig:{type:Object,default:()=>{}}},setup(t,{expose:o,emit:n}){const a=e.ref(!1),r=e.computed(()=>t.sourceType),l=e.computed(()=>t.indicatorToken||""),i=e.computed(()=>t.selectedComponent),d=e.computed(()=>{var E;return((E=e.unref(i))==null?void 0:E.tableColumns)||[]}),s=e.computed(()=>t.isShowStyleConfig);let c=e.unref(i).graphicConfig?oe.cloneDeep(e.unref(i).graphicConfig):e.ref({});c=e.ref(c);let p=e.unref(i).chartsOptions?oe.cloneDeep(e.unref(i).chartsOptions):e.ref(oe.cloneDeep(dn.line));p=e.ref(p);let u=e.unref(i).tableOptions?oe.cloneDeep(e.unref(i).tableOptions):e.ref(oe.cloneDeep(Ha));u=e.ref(u);const f=e.ref([]),h=E=>{f.value=E},A=E=>{c.value={...e.unref(c),...e.unref(E)}},g=(E,b=!0)=>{b?p.value={...e.unref(p),...e.unref(E)}:p.value={...e.unref(E)}},x=E=>{u.value={...e.unref(u),...e.unref(E)}},S=()=>f,w=()=>{a.value=!0,e.unref(i).graphicConfig&&(c.value=oe.cloneDeep(e.unref(i).graphicConfig)),e.unref(i).chartsOptions&&(p.value=oe.cloneDeep(e.unref(i).chartsOptions)),e.nextTick(()=>{a.value=!1})},V=()=>({graphicConfig:e.unref(c),chartsOptions:e.unref(p),tableOptions:e.unref(u),tableColumns:e.unref(d)});window.getIndicatorData=V,t.request&&e.provide(Le,t.request),e.provide(tn,{setDataList:h,getDataList:S});const m=E=>{n("updateUsedComponent",E)};return e.provide(Me,i),e.provide(pe,c),e.provide(Ft,p),e.provide(an,u),e.provide(lo,r),e.provide(on,s),e.provide(Be,l),e.provide(ke,A),e.provide(ao,g),e.provide(ro,x),e.provide(ze,t.renderUsedComponentList),e.provide($t,m),e.provide(sn,t.mapAttributeProps),e.provide(cn,t.pageConfig),o({graphicConfig:c,chartsOptions:p,updateIndicatorData:w}),{isUpdate:a}}}),bf="",ku={key:0,class:"config-modal"},Su={class:"config-modal-left"},Au={class:"config-modal-right"};function Nu(t,o,n,a,r,l){const i=e.resolveComponent("data-list"),d=e.resolveComponent("data-config");return t.isUpdate?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ku,[e.createElementVNode("div",Su,[e.createVNode(i)]),e.createElementVNode("div",Au,[e.createVNode(d)])]))}const Da=en(te(xu,[["render",Nu],["__scopeId","data-v-23d542ce"]])),va=en($a),Pa=Object.freeze(Object.defineProperty({__proto__:null,EcanChartGraph:va,EcanIndicatorLibrary:Da},Symbol.toStringTag,{value:"Module"})),Tu={install:(t,o)=>{const{request:n}=o;t.provide("$request",n),Object.keys(Pa).forEach(a=>{const r=Pa[a];r.install&&t.use(r)})}};me.EcanChartGraph=va,me.EcanIndicatorLibrary=Da,me.default=Tu,Object.defineProperties(me,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
64
64
|
//# sourceMappingURL=index.umd.js.map
|