Files
yakpanel-core/YakPanel/static/vite/js/index-DiJQ42Fa.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2026-04-07 02:04:22 +05:30
import{c as G,ao as ne,n as q,l as le,m as pe}from"./index-BTglIPU2.js?v=1773287522785";import{c as fe}from"./copy-D-wIKr0q.js?v=1773287522785";import{u as te,e as _e,a as ve}from"./custom-W85Jyu3e.js?v=1773287522785";import{aH as ae,B as Y,a6 as I,a1 as ie,o as re,b as ce,p as N,a7 as me}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as J,an as Z,r as X,$ as g,a8 as D,a9 as y,a0 as p,j as T,aa as F,s as K,S as d,R as ue,c as P,Z as E,F as Q,_ as v,l as he,v as ge,ak as H,au as we,ao as de,P as oe,ay as ee,t as be,e as ye,X as xe,n as $e}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const Ce=J({__name:"site-select",props:{value:{},valueModifiers:{}},emits:["update:value"],setup(x){const f=Z(x,"value"),k=te(),o=X([]),$=()=>{f.value=o.value.map(n=>n.value)},S=()=>{f.value=[]};return(async()=>o.value=Object.entries(k.config.sitemap).map(([n,O])=>({label:n,value:O})))(),(n,O)=>{const w=Y,j=ae,m=I;return g(),D(m,K(n.$attrs,{value:f.value,"onUpdate:value":O[0]||(O[0]=h=>f.value=h),multiple:"",filterable:"",options:d(o),"max-tag-count":"responsive","consistent-menu-width":!1,placeholder:n.$t("Waf.Custom.index_25")}),{header:y(()=>[p(j,{class:"w-full"},{default:y(()=>[p(w,{class:"flex-1",onClick:$},{default:y(()=>[T(F(n.$t("Public.All")),1)]),_:1}),p(w,{class:"flex-1",onClick:S},{default:y(()=>[T(F(n.$t("Public.Btn.Cancel")),1)]),_:1})]),_:1})]),_:1},16,["value","options","placeholder"])}}}),Fe={class:"w-320px"},ke={class:"w-320px"},Ue=J({__name:"action",props:{action:{default:""},actionModifiers:{},response:{},responseModifiers:{}},emits:["update:action","update:response"],setup(x){const{t:f}=ue(),k=te(),o=Z(x,"action"),$=Z(x,"response"),S=X([]),U=P(()=>{let m="";switch(o.value){case"deny":m=f("Waf.Custom.index_21");break;case"validate":m=f("Waf.Custom.index_32");break}return m}),n=P(()=>O(o.value).map(h=>({label:h.text,value:h.type,data:h}))),O=m=>{const h=k.config.action.filter(W=>W.type===m);return h.length>0?h[0].response:[]},w=m=>{const h=O(m);h.length>0?$.value=h[0].type:$.value=null};return S.value=k.config.action.map(m=>({label:m.text,value:m.type,data:m})),$.value===null&&w(o.value),(m,h)=>{const W=I,A=ie;return g(),E(Q,null,[p(A,{label:m.$t("Waf.Custom.index_20")},{default:y(()=>[v("div",Fe,[p(W,{value:o.value,"onUpdate:value":[h[0]||(h[0]=M=>o.value=M),w],options:d(S)},null,8,["value","options"])])]),_:1},8,["label"]),he(p(A,{label:d(U),"show-feedback":!1},{default:y(()=>[v("div",ke,[p(W,{value:$.value,"onUpdate:value":h[1]||(h[1]=M=>$.value=M),options:d(n)},null,8,["value","options"])])]),_:1},8,["label"]),[[ge,d(n).length>0]])],64)}}}),We={},Re={class:"my-18px"};function Oe(x,f){const k=re;return g(),E("div",Re,[p(k,{class:"w-38px justify-center"},{default:y(()=>[T(F(x.$t("Waf.Custom.index_31")),1)]),_:1})])}const Se=G(We,[["render",Oe]]),Le={},Ee={class:"flex flex-center flex-col w-38px"};function Be(x,f){const k=re;return g(),E("div",Ee,[f[0]||(f[0]=v("div",{class:"seg"},null,-1)),p(k,{class:"w-38px justify-center"},{default:y(()=>[T(F(x.$t("Waf.Custom.index_30")),1)]),_:1}),f[1]||(f[1]=v("div",{class:"seg"},null,-1))])}const Me=G(Le,[["render",Be],["__scopeId","data-v-7ea28fa1"]]),je={class:"relative flex items-center w-full h-full"},De={class:"tips"},Pe=J({__name:"content",props:de({condition:{default:null},factor:{},type:{default:"right"}},{input:{},inputModifiers:{},select:{default:()=>null},selectModifiers:{}}),emits:["update:input","update:select"],setup(x){const f=x,k=Z(x,"input"),o=Z(x,"select"),$=P(()=>f.condition===null),S=["in","not_in"],U=P(()=>{const{factor:_}=f;return _.widget.type==="text"}),n=["select","area_select","mult"],O=P(()=>{const{factor:_}=f;return n.includes(_.widget.type)}),w=P(()=>f.type==="left"?!1:f.factor.widget.type==="mult"?!0:S.includes(f.condition||"")),j=P(()=>{const{factor:_}=f,{widget:B}=_;return B.value.map(L=>({label:ne(L)?L:L.label,value:ne(L)?L:L.key}))}),m=()=>{o.value=j.value.map(_=>_.value)},h=()=>{o.value=[]},W=X(""),A=_=>{W.value=_},M=()=>{W.value!==""&&(q(o.value)?q(o.value)&&!o.value.includes(W.value)&&o.value.pu