import{o as c,c as d,w as a,b as s,a as o,u as e,d as u,e as m,g as _,D as h,f as g,t as p,F as C}from"./app-SC54XQDl.js";import{P as y}from"./app-BGgVpkqZ.js";import{i as v,c as V}from"./app-Ba7ZqSpq.js";import{_ as $}from"./app-DFulsyXy.js";import{_ as w}from"./app-CVQkwzlf.js";import{_ as P,a as S}from"./app-PrSv7rSt.js";import{_ as x,a as b}from"./app-B_Y0qfbu.js";import{_ as f}from"./app-FlPLZh9D.js";import{_ as I}from"./app-DWUwCFNm.js";import{_ as D}from"./app-huVLEujn.js";import{D as k}from"./app-ZeVDYyDS.js";import"./app-yUrwy8EY.js";import"./app-DnXuoh8P.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-CCkWSX4Q.js";import"./app-CHxME8Sw.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.js";import"./app-BxWqoSpr.js";import"./app-CNHjdV6U.js";import"./app-BzdF9mA3.js";import"./app-T1ysvErZ.js";import"./app-nyOoGAKT.js";import"./app-C0-Qcoum.js";import"./app-DZaelcLs.js";function E(){v(this),this.success=this.$NotifyPopup,this.rules=this.setConfig.rules,this.selectedConnector=this.setConfig.connector,this.selectedConnectorDescription="",this.changeConnector=function(){let r=this;this.selectedConnectorDescription=this.connectors.$find(function(t,l){return l.value==r.selectedConnector}).description},this.changeConnector(),this.action=this.setConfig.action,this.actionGroupId=0,(this.action=="go_group"||this.action=="go_set"&&this.setConfig.actionOptions!=null)&&this.$delay(function(){this.actionGroupId=this.setConfig.actionOptions.groupId}),this.actionSetId=0,this.action=="go_set"&&this.setConfig.actionOptions!=null&&this.$delay(function(){this.actionSetId=this.setConfig.actionOptions.setId}),this.groupSets=function(r){if(this.firewallPolicy==null)return;let t=null;return this.firewallPolicy.inbound.groups.forEach(function(l){l.id==r&&(t=l)}),this.firewallPolicy.outbound.groups.forEach(function(l){l.id==r&&(t=l)}),t==null?[]:t.sets}}const O=o("header",null,"修改规则集",-1),L=["value"],B=o("td",{class:"title"},"规则集名称 *",-1),N=o("p",{class:"comment"},"可以用来描述当前规则集用途。",-1),U=o("td",null,"规则 *",-1),F={style:{"word-break":"break-word"}},G=o("td",null,"规则之间的关系 *",-1),T={class:"comment"},R=o("td",null,"执行动作 *",-1),j={colspan:"2"},q=o("td",null,"允许局域网IP",-1),z=o("p",{class:"comment"},"选中后表示如果请求来自局域网IP，则直接跳过当前规则集。",-1),A=o("td",null,"允许搜索引擎",-1),H=o("p",{class:"comment"},"选中后，表示如果请求来自常见搜索引擎的IP，则直接跳过当前规则集。",-1),$t={__name:"updateSetPopup",setup(r){const t=V(new E);return(l,i)=>(c(),d(y,null,{default:a(()=>[O,s($,{action:"$",onSuccess:e(t).success},{default:a(()=>[o("input",{type:"hidden",name:"setId",value:e(t).setConfig.id},null,8,L),s(k,null,{default:a(()=>[o("tbody",null,[o("tr",null,[B,o("td",null,[s(w,{type:"text",name:"name",maxlength:"100",class:"w-full",autofocus:"",modelValue:e(t).setConfig.name,"onUpdate:modelValue":i[0]||(i[0]=n=>e(t).setConfig.name=n)},null,8,["modelValue"]),N])]),o("tr",null,[U,o("td",F,[s(x,{"v-rules":e(t).rules,"v-type":e(t).type,connector:e(t).selectedConnector},null,8,["v-rules","v-type","connector"])])]),u(o("tr",null,[G,o("td",null,[s(P,{name:"connector",onChange:i[1]||(i[1]=n=>e(t).changeConnector()),modelValue:e(t).selectedConnector,"onUpdate:modelValue":i[2]||(i[2]=n=>e(t).selectedConnector=n)},{default:a(()=>[(c(!0),_(C,null,h(e(t).connectors,n=>(c(),d(S,{value:n.value},{default:a(()=>[g(p(n.name),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue"]),o("p",T,p(e(t).selectedConnectorDescription),1)])],512),[[m,e(t).rules.length>1]]),o("tr",null,[R,o("td",null,[s(b,{"v-actions":e(t).actions,"v-firewall-policy":e(t).firewallPolicy,"v-action-configs":e(t).actionConfigs,"v-group-type":e(t).type},null,8,["v-actions","v-firewall-policy","v-action-configs","v-group-type"])])]),o("tr",null,[o("td",j,[s(D)])]),u(o("tr",null,[q,o("td",null,[s(f,{name:"ignoreLocal",modelValue:e(t).setConfig.ignoreLocal,"onUpdate:modelValue":i[3]||(i[3]=n=>e(t).setConfig.ignoreLocal=n)},null,8,["modelValue"]),z])],512),[[m,e(t).moreOptionsVisible]]),u(o("tr",null,[A,o("td",null,[s(f,{name:"ignoreSearchEngine",modelValue:e(t).setConfig.ignoreSearchEngine,"onUpdate:modelValue":i[4]||(i[4]=n=>e(t).setConfig.ignoreSearchEngine=n)},null,8,["modelValue"]),H])],512),[[m,e(t).moreOptionsVisible]])])]),_:1}),s(I)]),_:1},8,["onSuccess"])]),_:1}))}};export{$t as default};
