import{_ as A,__tla as F}from"./Dialog-1050d437.js";import{d as G,n as H,r as c,B as K,P as Q,o as S,c as b,i as a,w as e,g as p,j as d,a as r,t as $,C as W,a2 as X,y as q,F as Y,du as Z,dX as aa,aW as ea,J as ta,E as la,s as ra,aQ as sa,_ as na,__tla as oa}from"./index-2c56227b.js";import{_ as ua,__tla as ia}from"./ContentWrap-f1610353.js";import{F as ca,__tla as _a}from"./index.es-4c5471da.js";import{H as g,j as ma,__tla as fa}from"./java-c407ef1c.js";import{u as pa,__tla as da}from"./useMessage-96878a4a.js";import{__tla as ya}from"./el-card-9c148b4f.js";let J,ga=Promise.all([(()=>{try{return F}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})()]).then(async()=>{function M(n){const s=["true","false","null"],_={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",keywords:{literal:s},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},n.QUOTE_STRING_MODE,_,n.C_NUMBER_MODE,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}let v,h,O;v={class:"float-right mb-2"},h={key:0,ref:"editor"},O={class:"hljs"},J=na(G({name:"InfraBuild",__name:"index",setup(n){const{t:s}=H(),_=pa(),o=c(),u=c(!1),C=c(""),m=c(-1),i=c(""),y=t=>{u.value=!0,C.value=t},k=()=>{y("\u751F\u6210 JSON"),m.value=0,i.value=o.value.getRule()},x=()=>{y("\u751F\u6210 Options"),m.value=1,i.value=o.value.getOption()},j=()=>{y("\u751F\u6210\u7EC4\u4EF6"),m.value=2,i.value=w()},w=()=>{const t=o.value.getRule(),l=o.value.getOption();return`<template>
    <form-create
      v-model="fapi"
      :rule="rule"
      :option="option"
      @submit="onSubmit"
    ></form-create>
  </template>
  <script setup lang=ts>
    import formCreate from "@form-create/element-ui";
    const faps = ref(null)
    const rule = ref('')
    const option = ref('')
    const init = () => {
      rule.value = formCreate.parseJson('${Z.toJson(t).replaceAll("\\","\\\\")}')
      option.value = formCreate.parseJson('${JSON.stringify(l)}')
    }
    const onSubmit = (formData) => {
      //todo \u63D0\u4EA4\u8868\u5355
    }
    init()
  <\/script>`},D=t=>{let l="json";return m.value===2&&(l="xml"),ea(t)||(t=JSON.stringify(t)),g.highlight(l,t,!0).value||"&nbsp;"};return K(async()=>{g.registerLanguage("xml",ma),g.registerLanguage("json",M)}),(t,l)=>{const f=ta,E=la,R=ra,B=ua,L=sa,T=A,z=Q("dompurify-html");return S(),b(Y,null,[a(B,null,{default:e(()=>[a(R,null,{default:e(()=>[a(E,null,{default:e(()=>[p("div",v,[a(f,{size:"small",type:"primary",onClick:k},{default:e(()=>[d("\u751F\u6210 JSON")]),_:1}),a(f,{size:"small",type:"success",onClick:x},{default:e(()=>[d("\u751F\u6210 Options")]),_:1}),a(f,{size:"small",type:"danger",onClick:j},{default:e(()=>[d("\u751F\u6210\u7EC4\u4EF6")]),_:1})])]),_:1}),a(E,null,{default:e(()=>[a(r(ca),{ref_key:"designer",ref:o,height:"780px"},null,512)]),_:1})]),_:1})]),_:1}),a(T,{modelValue:r(u),"onUpdate:modelValue":l[1]||(l[1]=N=>q(u)?u.value=N:null),title:r(C),"max-height":"600"},{default:e(()=>[r(u)?(S(),b("div",h,[a(f,{style:{float:"right"},onClick:l[0]||(l[0]=N=>(async I=>{const{copy:P,copied:U,isSupported:V}=aa({source:I});V?(await P(),r(U)&&_.success(s("common.copySuccess"))):_.error(s("common.copyError"))})(r(i)))},{default:e(()=>[d($(r(s)("common.copy")),1)]),_:1}),a(L,{height:"580"},{default:e(()=>[p("div",null,[p("pre",null,[W(p("code",O,null,512),[[z,D(r(i))]])])])]),_:1})],512)):X("",!0)]),_:1},8,["modelValue","title"])],64)}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/views/infra/build/index.vue"]])});export{ga as __tla,J as default};
