System.register(["./public-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy.js?v=1753954525509","./index.vue_vue_type_script_setup_true_lang-legacy9.js?v=1753954525509","./index-legacy100.js?v=1753954525509","./page_layout-legacy.js?v=1753954525509","./site-legacy.js?v=1753954525509","./vue-legacy.js?v=1753954525509","./naive-legacy.js?v=1753954525509","./common-legacy.js?v=1753954525509","./__commonjsHelpers__-legacy.js?v=1753954525509","./index-legacy96.js?v=1753954525509"],(function(e,t){"use strict";var l,r,a,s,i,o,n,u,d,_,p,x,y,c,h,v,g,m,P,f,S,$,b,j,k;return{setters:[e=>{l=e._},e=>{r=e._},e=>{a=e._},e=>{s=e._},e=>{i=e.aP},e=>{o=e.bb},e=>{n=e.k,u=e.P,d=e.r,_=e.e,p=e.o,x=e.U,y=e.V,c=e.Q,h=e.a2,v=e.W,g=e.X,m=e.a3,P=e.a1,f=e.j},e=>{S=e.cA,$=e.cG,b=e.aq,j=e.bY,k=e.bX},null,null,null],execute:function(){const t={class:"m-15px"},w={class:"w-440px"},H={class:"list-none!"},U={class:"list-none!"},q={class:"list-none!"};e("default",n({__name:"index",emits:["refresh"],setup(e,{expose:n,emit:E}){const{t:C}=u(),X=E,A=()=>{"2"===Q.proxy_type?Q.proxy_host="$http_host":Q.proxy_host=""},G=e=>{if("2"===Q.proxy_type)return void(Q.proxy_host="$http_host");let t=e.replace(/^http[s]?:\/\//,"");t=t.replace(/(:|\?|\/|\\)(.*)$/,""),Q.proxy_host=t},I=d(null),N=[{label:C("Site.Proxy.index_11"),value:"1"},{label:C("Site.Proxy.index_12"),value:"2"}],Q=_({domains:"",proxy_type:"1",url:"http://",unx:"",proxy_host:"$http_host",remark:""}),R={domains:{required:!0,trigger:["blur","change"],validator:(e,t)=>{if(""===t.trim())return new Error(C("Site.PHP.add_site_23"));const l=t.trim().split("\n")[0].split(":")[1];return!(l&&(!i(l)||Number(l)<100))||new Error(C("Site.Proxy.index_13"))}},url:{required:!0,trigger:["blur","change"],validator:(e,t)=>{if(!t.replace(/^http[s]?:\/\//,""))return new Error(C("Site.Proxy.index_14"));let l=t.replace(/^http[s]?:\/\//,"");return l=l.replace(/(:|\?|\/|\\)(.*)$/,""),/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(l)?Q.proxy_host="$http_host":Q.proxy_host=l,!0}},unx:{required:!0,message:C("Site.PHP.add_site_26"),trigger:["blur","change"]},proxy_host:{required:!0,message:C("Site.PHP.add_site_26"),trigger:["blur","change"]}},V=e=>{const t=e.trim().split("\n")[0].split(":")[0];t&&(Q.remark=t)};return p((()=>{})),n({onConfirm:async()=>{await(I.value?.validate());let e={remark:Q.remark,proxy_type:"1"==Q.proxy_type,proxy_pass:"1"==Q.proxy_type?Q.url:Q.unx,domains:Q.domains,proxy_host:Q.proxy_host};await o(e),X("refresh")}}),(e,i)=>{const o=s,n=S,u=$,d=b,_=a,p=j,E=k,C=r,X=l;return x(),y("div",t,[c(C,{ref_key:"formRef",ref:I,model:g(Q),rules:R},{default:h((()=>[c(n,{label:e.$t("Site.PHP.add_site_4"),path:"domains"},{default:h((()=>[v("div",w,[c(o,{value:g(Q).domains,"onUpdate:value":[i[0]||(i[0]=e=>g(Q).domains=e),V]},{default:h((()=>[v("p",null,m(e.$t("Site.PHP.add_site_5")),1),v("p",null,m(e.$t("Site.PHP.add_site_6")),1),v("p",null,m(e.$t("Site.PHP.add_site_7")),1)])),_:1},8,["value"])])])),_:1},8,["label"]),c(p,null,{default:h((()=>[c(n,{label:e.$t("Site.Proxy.index_1")},{default:h((()=>[c(u,{value:g(Q).proxy_type,"onUpdate:value":[i[1]||(i[1]=e=>g(Q).proxy_type=e),A],options:N,class:"w-120px"},null,8,["value"])])),_:1},8,["label"]),"1"==g(Q).proxy_type?(x(),P(n,{key:0,path:"url",class:"w-310px"},{default:h((()=>[c(d,{value:g(Q).url,"onUpdate:value":i[2]||(i[2]=e=>g(Q).url=e),onInput:G},null,8,["value"])])),_:1})):(x(),P(n,{key:1,path:"unx",class:"w-310px"},{default:h((()=>[c(_,{"checked-type":["dir","file"],value:g(Q).unx,"onUpdate:value":i[3]||(i[3]=e=>g(Q).unx=e),onChange:G},null,8,["value"])])),_:1}))])),_:1}),c(n,{label:e.$t("Site.Proxy.index_2"),path:"proxy_host",class:"w-570px"},{default:h((()=>[c(E,{trigger:"hover"},{trigger:h((()=>[c(d,{value:g(Q).proxy_host,"onUpdate:value":i[4]||(i[4]=e=>g(Q).proxy_host=e)},null,8,["value"])])),default:h((()=>[f(" "+m(e.$t("Site.Proxy.index_4")),1)])),_:1})])),_:1},8,["label"]),c(n,{label:e.$t("Site.Proxy.index_3"),class:"w-570px"},{default:h((()=>[c(d,{value:g(Q).remark,"onUpdate:value":i[5]||(i[5]=e=>g(Q).remark=e),placeholder:e.$t("Site.Proxy.index_5")},null,8,["value","placeholder"])])),_:1},8,["label"])])),_:1},8,["model"]),c(X,{class:"mt-16px"},{default:h((()=>[v("li",null,m(e.$t("Site.Proxy.index_6")),1),v("li",null,m(e.$t("Site.Proxy.index_7")),1),v("li",H,m(e.$t("Site.Proxy.index_8")),1),v("li",U,m(e.$t("Site.Proxy.index_9")),1),v("li",q,m(e.$t("Site.Proxy.index_10")),1)])),_:1})])}}}))}}}));
