import{_ as z,aF as U,aG as I,aH as P,a4 as oe,r as s,o as l,d as u,w as d,f as a,b as r,c as p,t as O,u as _,m as E,D as C,v as ae,ab as se,ac as ie,j as le,C as re,a as T,F as j,k as ce,l as y,E as he,G as de}from"./index-f87df9cc.js";import{M as B}from"./monaco-editor-f9caa2e2.js";const ue={inject:["contain"],components:{AvueEchartCommon:U,AvueEchartVue:I,AvueEchartHtml:P,MonacoEditor:B},watch:{"form.content"(t){this.handleOption()},modelValue:{handler(t){this.form=t},deep:!0},form:{handler(t){this.$emit("update:modelValue",t)},deep:!0}},props:{modelValue:{}},data(){return{common:oe,error:"",vueOption:"",box:!1,reload:!1,options:{height:600,language:"javascript"},form:{}}},methods:{errorChange(t){this.error=t},handleOpen(){this.form=this.modelValue,this.box=!0,this.$nextTick(()=>{this.handleOption()})},handleClose(){this.$emit("update:modelValue",this.form),this.box=!1},handleOption(){this.reload=!1,this.vueOption=this.deepClone(this.form),this.$nextTick(()=>{this.reload=!0})}}},pe={class:"code-edit"},_e={class:"left"},me={key:0,class:"right"},ge={key:0,class:"tip"};function ve(t,n,c,h,e,i){const w=s("monaco-editor"),m=s("avue-echart-vue"),x=s("avue-echart-common"),D=s("avue-echart-html"),S=s("el-dialog");return l(),u(S,{title:"代码编辑",fullscreen:"","modal-append-to-body":"",modelValue:e.box,"onUpdate:modelValue":n[1]||(n[1]=f=>e.box=f),"append-to-body":"","close-on-click-modal":!1,width:"100%"},{default:d(()=>[a("div",pe,[a("div",_e,[r(w,{modelValue:e.form.content,"onUpdate:modelValue":n[0]||(n[0]=f=>e.form.content=f),language:e.options.language,height:e.options.height,options:e.options},null,8,["modelValue","language","height","options"])]),e.reload?(l(),p("div",me,[e.error?(l(),p("div",ge,O(e.error),1)):_("",!0),e.form.type==0?(l(),u(m,E({key:1},i.contain&&i.contain.activeObj,{option:e.vueOption,onErrorChange:i.errorChange,width:"100%",height:"100%"}),null,16,["option","onErrorChange"])):e.form.type==1?(l(),u(x,E({key:2},i.contain&&i.contain.activeObj,{"echart-formatter-str":e.vueOption.content,onErrorChange:i.errorChange,width:"100%"}),null,16,["echart-formatter-str","onErrorChange"])):e.form.type==2?(l(),u(D,E({key:3},i.contain&&i.contain.activeObj,{option:e.vueOption,onErrorChange:i.errorChange,width:"100%"}),null,16,["option","onErrorChange"])):_("",!0)])):_("",!0)])]),_:1},8,["modelValue"])}const fe=z(ue,[["render",ve],["__scopeId","data-v-b4a49101"]]),k=ae+"/component",be=t=>C({url:k+"/list",method:"get",params:t}),L=t=>C({url:k+"/detail",method:"get",params:{id:t}}),ye=t=>C({url:k+"/save",method:"post",data:t}),Ce=t=>C({url:k+"/update",method:"post",data:t}),ke=t=>C({url:k+"/remove",method:"post",params:{ids:t}});const V=[{label:"vue组件",value:0,content:`