import{c as e,v as a,N as s,B as l,e as o,y as t,x as r,Q as d,C as n,z as m,A as u,D as p,ab as i,U as _,ae as f,a9 as c}from"./base-lib.js?v=1761009159";import{k as b}from"./utils-lib.js?v=1761009159";import{k as w,l as j,m as h,p as v,r as V,n as C,q as k,v as x,e as I,w as U}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 g={key:0},y={class:"mt-[1.6rem]"},q=e({__name:"setting-replace-add",setup:(e,{expose:q})=>(q({onConfirm:w}),(e,w)=>{const q=b,z=i,A=_,B=f,D=c;return a(),s(D,{ref_key:"replaceFormRef",ref:x,disabled:t(I),model:t(j),class:"p-[2rem] addfrom",rules:t(U),"label-width":"5rem"},{default:l(()=>[o(z,{label:"原关键词",prop:"oldstr"},{default:l(()=>[o(q,{modelValue:t(j).oldstr,"onUpdate:modelValue":w[0]||(w[0]=e=>t(j).oldstr=e),width:"40rem",placeholder:"请输入要被替换的内容，如：http://www.bt.cn",onInput:t(h)},null,8,["modelValue","onInput"])]),_:1}),o(z,{label:"替换词",prop:"newstr"},{default:l(()=>[o(q,{modelValue:t(j).newstr,"onUpdate:modelValue":w[1]||(w[1]=e=>t(j).newstr=e),width:"40rem",placeholder:"新的内容，如：https://www.bt.cn",onInput:t(h)},null,8,["modelValue","onInput"]),t(v).subs_filter?(a(),r("div",g,[o(B,{class:"mt-[1.6rem]",modelValue:t(V),"onUpdate:modelValue":w[2]||(w[2]=e=>d(V)?V.value=e:null),onChange:t(C)},{default:l(()=>[o(A,{value:"i"},{default:l(()=>w[3]||(w[3]=[n("不区分大小写(",-1),m("span",{class:"font-bold"},"i",-1),n(")",-1)])),_:1,__:[3]}),o(A,{value:"o"},{default:l(()=>w[4]||(w[4]=[n("只替换第一个(",-1),m("span",{class:"font-bold"},"o",-1),n(")",-1)])),_:1,__:[4]}),o(A,{value:"r"},{default:l(()=>w[5]||(w[5]=[n("正则表达式(",-1),m("span",{class:"font-bold"},"r",-1),n(")",-1)])),_:1,__:[5]})]),_:1},8,["modelValue","onChange"]),m("div",y,u(t(k)),1)])):p("",!0)]),_:1})]),_:1},8,["disabled","model","rules"])})});export{q as default};
