import{k as e,ax as l,d as a,L as o,$ as t}from"./utils-lib.js?v=1761009159";import{c as s,H as p,v as r,x as d,I as n,y as i,N as m,B as u,e as c,z as h,$ as f,Q as b,ab as _,az as y,a9 as x}from"./base-lib.js?v=1761009159";import{o as V,f as g,u as j,t as v,s as w,a as k,h as T,b as U,c as C,d as F,e as I,g as $}from"./useController14.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useStore4.js?v=1761009159";const z={class:"p-[20px]"},H={class:"flex items-center"},L=s({__name:"add-url-proxy",setup:(s,{expose:L})=>(L({onConfirm:V}),(s,V)=>{const L=e,R=_,B=l,N=a,Q=o,S=y,q=x,A=t,D=p("bt-loading");return r(),d("div",z,[n((r(),m(q,{ref_key:"proxyFormRef",ref:C,model:i(j),rules:i(F),"label-width":"100px",disabled:i(I)},{default:u(()=>[c(R,{label:"代理目录",prop:"path"},{default:u(()=>[c(L,{modelValue:i(j).path,"onUpdate:modelValue":V[0]||(V[0]=e=>i(j).path=e),placeholder:"请输入代理目录，例如：/web",width:"42rem"},null,8,["modelValue"])]),_:1}),c(R,{label:"目标",prop:"proxysite"},{default:u(()=>[h("div",H,[c(R,null,{default:u(()=>[c(B,{class:"!w-[16rem]",modelValue:i(j).targetType,"onUpdate:modelValue":V[1]||(V[1]=e=>i(j).targetType=e),placeholder:"请选择",options:i(v),onChange:i(w)},null,8,["modelValue","options","onChange"])]),_:1}),c(L,{modelValue:i(j).proxysite,"onUpdate:modelValue":V[2]||(V[2]=e=>i(j).proxysite=e),placeholder:"http"===i(j).targetType?"请输入目标地址":"请选择sock文件",class:"!ml-[1rem]",width:"24rem",iconType:"http"!==i(j).targetType&&"folder",onFolder:i(k),onInput:i(T)},f({_:2},["http"!==i(j).targetType?{name:"append",fn:u(()=>[c(Q,{onClick:i(k)},{default:u(()=>[c(N,{icon:"el-folder-opened",class:"cursor-pointer"})]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","placeholder","iconType","onFolder","onInput"])])]),_:1}),c(R,{label:"发送域名(host)",prop:"todomain","label-width":"100px"},{default:u(()=>[c(S,{placement:"top-start",effect:"dark",title:"",content:"请求转发到后端服务器时的主机名，一般为$http_host，如果目标URL是域名，则需要改为域名",width:"400",visible:i(U),"onUpdate:visible":V[5]||(V[5]=e=>b(U)?U.value=e:null),"trigger-keys":[],trigger:"focus"},{reference:u(()=>[c(L,{modelValue:i(j).todomain,"onUpdate:modelValue":V[3]||(V[3]=e=>i(j).todomain=e),onFocus:V[4]||(V[4]=e=>U.value=!0),placeholder:"请输入发送域名",width:"42rem"},null,8,["modelValue"])]),_:1},8,["visible"])]),_:1}),c(R,{label:"备注"},{default:u(()=>[c(L,{modelValue:i(j).ps,"onUpdate:modelValue":V[6]||(V[6]=e=>i(j).ps=e),placeholder:"请输入备注,可为空",width:"42rem"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules","disabled"])),[[D,i(g)]]),c(A,{options:i($),class:"mt-2rem ml-[20px]"},null,8,["options"])])})});export{L as default};
