System.register(["./public-legacy.js?v=1764830988434","./vue-legacy.js?v=1764830988434","./page_layout-legacy.js?v=1764830988434","./setting-legacy.js?v=1764830988434","./index-legacy97.js?v=1764830988434","./naive-legacy.js?v=1764830988434","./common-legacy.js?v=1764830988434","./__commonjsHelpers__-legacy.js?v=1764830988434"],function(t,a){"use strict";var e,n,l,i,o,c,u,s,r,d,f,g,p,_,m,v,y,x,w,S,j,W,b,h,C,k,P,$,B,U,E;return{setters:[t=>{e=t.c,n=t.f,l=t.h,i=t._,o=t.u,c=t.a},t=>{u=t.k,s=t.P,r=t.r,d=t.R,f=t.V,g=t.S,p=t.W,_=t.aj,m=t.ak,v=t.U,y=t.a3,x=t.j,w=t.a4},t=>{S=t.d,j=t.m,W=t.h6},t=>{b=t.P,h=t.g,C=t.Q,k=t.R,P=t.S},t=>{$=t._},t=>{B=t.au,U=t.aC,E=t.da},null,null],execute:function(){const a={class:"p-20px"},R={class:"flex mb-16px"},A={class:"flex-1 mr-16px"};t("default",u({__name:"config",setup(t){const{t:u}=s(),D=r(""),H=async()=>{""!==D.value.trim()?(await C({text:D.value}),D.value="",z()):j.error(u("Waf.Setting.config_176"))},I=()=>{const t=r("");o({title:u("Waf.Setting.config_187"),width:440,footer:!0,content:()=>p("div",{class:"p-20px"},[p($,{value:t.value,"onUpdate:value":a=>t.value=a,rows:14,placeholder:u("Waf.Setting.config_188")},null)]),onConfirm:async()=>{if(""===t.value.trim())return j.error(u("Waf.Setting.config_179")),!1;await k({text:t.value}),z()}})},K=()=>{const t=r(Q.data.map(t=>t.word).join("\n"));o({title:u("Waf.Setting.config_177"),width:440,footer:!0,content:()=>p("div",{class:"p-20px"},[p($,{value:t.value,"onUpdate:value":a=>t.value=a,rows:14,readonly:!0},null)]),onConfirm:()=>(W(t.value,"body_intercept.json"),!1)})},L=()=>{c({title:u("Waf.Setting.config_180"),content:u("Waf.Setting.config_181"),onConfirm:async()=>{await P(),z()}})},{table:Q,columns:V,setLoading:q}=e([{key:"word",title:u("Waf.Setting.config_184")},n({width:80,options:t=>[{label:u("Public.Btn.Del"),onClick:async()=>{await b({text:t.word}),z()}}]})]),z=async()=>{try{q(!0);const{message:t}=await h();S(t)&&(Q.data=t.body_intercept.map(t=>({word:t})))}finally{q(!1)}};return z(),(t,e)=>{const n=B,o=U,c=l,u=E,s=i;return f(),d("div",a,[g("div",R,[g("div",A,[p(n,{value:v(D),"onUpdate:value":e[0]||(e[0]=t=>m(D)?D.value=t:null),placeholder:t.$t("Waf.Setting.config_184"),onKeyup:_(H,["enter"])},null,8,["value","placeholder"])]),p(o,{type:"primary",onClick:H},{default:y(()=>[x(w(t.$t("Public.Btn.Add")),1)]),_:1})]),p(c,{"max-height":258,loading:v(Q).loading,data:v(Q).data,columns:v(V)},null,8,["loading","data","columns"]),p(u,{class:"mt-16px"},{default:y(()=>[p(o,{onClick:I},{default:y(()=>[x(w(t.$t("Public.Btn.Import")),1)]),_:1}),p(o,{onClick:K},{default:y(()=>[x(w(t.$t("Public.Btn.Export")),1)]),_:1}),p(o,{onClick:L},{default:y(()=>[x(w(t.$t("Public.Btn.Empty")),1)]),_:1})]),_:1}),p(s,{class:"mt-16px"},{default:y(()=>[g("li",null,w(t.$t("Waf.Setting.config_185")),1),g("li",null,w(t.$t("Waf.Setting.config_186")),1)]),_:1})])}}}))}}});
