File: /var/www/html/wpdeskera/wp-content/plugins/defender-security/assets/app/ip-lockout.js
(self.webpackChunkwp_defender=self.webpackChunkwp_defender||[]).push([[271],{682:(e,t,n)=>{"use strict";n.d(t,{X:()=>a,m:()=>r});var o=n(9726),i=(0,o.KR)(defender.misc.high_contrast||!1),r=function(e){i.value=e},a=function(){var e=(0,o.KR)(1===parseInt(defender.is_free)),t=(0,o.KR)(defender.tracking_modal),n=(0,o.KR)(defender.is_whitelabel),r=(0,o.KR)(defender.misc||{}),a=(0,o.KR)(defender.whitelabel||{}),l=(0,o.KR)(defender.upgrade_title||""),s=(0,o.KR)(defender.is_membership||!1),u=(0,o.KR)(defender.wpmudev_support_ticket_text||""),c=(0,o.KR)(defender.hosted||!1),d=(0,o.EW)(function(){return"show"===t.value}),p=(0,o.EW)(function(){return"disabled"===n.value}),f=(0,o.EW)(function(){return"enabled"===n.value}),v=(0,o.EW)(function(){return!0===i.value});return{is_free:e,tracking_modal:t,is_whitelabel:n,is_membership:s,misc:r,whitelabel:a,upgradeTitle:l,support_text:u,hosted:c,showTrackingModal:d,isWhitelabelDisabled:p,isWhitelabelEnabled:f,showSupportLinks:function(){return p.value&&!e.value},hasFeature:function(t){if(!e.value)return!0;return["security_tweaks","firewall","scan_free","audit_free","two_fa_free"].includes(t)},maybeHighContrast:function(){return{"sui-color-accessible":v.value}},isHighContrast:function(){return v.value}}}},1117:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var o=n(9726),i=n(7786),r=n(2720),a=n(5592);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var u=["id","for"],c=["id","placeholder","aria-labelledby","aria-describedby"],d=["id"],p=["id"];const f={__name:"simple-form-field",props:{label:{type:String,default:""},placeholder:{type:String,default:""},description:{type:String,default:""},modelValue:{type:String,default:""},inputId:{type:String,default:null},errorMessage:{type:String,default:""},validation:{type:Array,default:function(){return["required"]}}},emits:["update:modelValue","validation"],setup:function(e,t){var n=t.emit,s=(0,a.B)(),f=s.__,v=s.vsprintf,b=e,m=n,y=(0,o.KR)(null),g=(0,o.KR)(null),k=(0,o.EW)(function(){return b.inputId?b.inputId:b.label?b.label.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""):"field-".concat(Math.random().toString(36).substring(2,10))}),h=(0,o.EW)(function(){return"label-".concat(k.value)}),_=(0,o.EW)(function(){return"error-".concat(k.value)}),w=(0,o.EW)(function(){return"description-".concat(k.value)}),L=(0,o.EW)(function(){return!!g.value}),R=(0,o.EW)(function(){var e=[];return L.value&&e.push(_.value),b.description&&e.push(w.value),e.join(" ")}),C=(0,o.EW)(function(){return b.label}),x=(0,o.EW)(function(){return b.placeholder}),S=(0,i.hRP)(b,"modelValue",m),E=function(e){var t,n=(e||"").trim(),o=l(b.validation);try{for(o.s();!(t=o.n()).done;){var i=t.value;if("required"===i&&!n)return g.value=b.errorMessage||f("This field is required."),void m("validation",!1);if("email"===i&&!/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/.test(n))return g.value=f("Please enter a valid email."),void m("validation",!1);if(i.startsWith("min:")){var r=parseInt(i.split(":")[1]);if(n.length<r)return g.value=v(f("Minimum %d characters required."),[r]),void m("validation",!1)}if(i.startsWith("max:")){var a=parseInt(i.split(":")[1]);if(n.length>a)return g.value=v(f("Maximum %d characters allowed."),[a]),void m("validation",!1)}}}catch(e){o.e(e)}finally{o.f()}g.value=null,m("validation",!0)},j=(0,r.Q0)(function(e){E(e)},300);(0,o.wB)(S,function(e){j(e)},{immediate:!0});var P=function(){E(S.value),L.value&&(0,o.dY)(function(){var e;null===(e=y.value)||void 0===e||e.focus()})};return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-form-field",{"sui-form-field-error":L.value}])},[(0,o.Lk)("label",{id:h.value,for:k.value,class:"sui-label"},(0,o.v_)(C.value)+" "+(0,o.v_)((i="required",b.validation.includes(i)?"*":"")),9,u),(0,o.bo)((0,o.Lk)("input",{id:k.value,ref_key:"inputRef",ref:y,"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(S)?S.value=e:null}),class:"sui-form-control",placeholder:x.value,"aria-labelledby":h.value,"aria-describedby":R.value,onBlur:P},null,40,c),[[o.Jo,(0,o.R1)(S)]]),L.value?((0,o.uX)(),(0,o.CE)("span",{key:0,id:_.value,class:"sui-error-message",role:"alert"},(0,o.v_)(g.value),9,d)):(0,o.Q3)("",!0),e.description?((0,o.uX)(),(0,o.CE)("span",{key:1,id:w.value,class:"sui-description"},(0,o.v_)(e.description),9,p)):(0,o.Q3)("",!0)],2);var i}}}},1289:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(9726),i=n(7476),r=["id","type","disabled","aria-live"],a={class:"sui-loading-text"},l={class:"sui-button-text-default"},s={class:"sui-button-text-onload"};const u={__name:"sui-button",props:{label:{type:String,default:""},type:{type:String,default:"button"},variant:{type:String,default:"auto"},icon:{type:String,default:""},action:{type:String,default:""},disabled:{type:Boolean,default:!1},loadingText:{type:String,default:""},customClass:{type:String,default:""},onlyIcon:{type:[Boolean,String],default:!1}},emits:["click"],setup:function(e){var t=(0,i.r)(),n=e,u=(0,o.EW)(function(){return n.icon||(n.action.includes("save")?"sui-icon-save":"")}),c=(0,o.EW)(function(){return"auto"===n.variant?"submit"===n.type?"sui-button-blue":"sui-button-ghost":{blue:"sui-button-blue",ghost:"sui-button-ghost",red:"sui-button-red",gray:"",purple:"sui-button-purple"}[n.variant]}),d=(0,o.EW)(function(){return n.action&&t.isLoading(n.action)}),p=(0,o.EW)(function(){var e=[n.onlyIcon?"sui-button-icon":"sui-button",c.value];return d.value&&e.push(n.loadingText?"sui-button-onload-text":"sui-button-onload"),n.customClass&&e.push(n.customClass),e}),f=(0,o.EW)(function(){return n.action?"".concat(n.type,"-").concat(n.action.toLowerCase().replace(/\s+/g,"-")):"".concat(n.type,"-").concat(n.label.toLowerCase().replace(/\s+/g,"-"),"-").concat(n.type)});return function(t,n){return(0,o.uX)(),(0,o.CE)("button",(0,o.v6)({id:f.value,type:e.type,class:p.value,disabled:d.value||e.disabled,"aria-live":e.loadingText?"polite":void 0,onClick:n[0]||(n[0]=function(e){return t.$emit("click")})},t.$attrs),[e.loadingText?((0,o.uX)(),(0,o.CE)(o.FK,{key:1},[(0,o.Lk)("span",l,[u.value?((0,o.uX)(),(0,o.CE)("span",{key:0,class:(0,o.C4)(u.value),"aria-hidden":"true"},null,2)):(0,o.Q3)("",!0),(0,o.eW)(" "+(0,o.v_)(e.label)+" ",1),(0,o.RG)(t.$slots,"default")]),(0,o.Lk)("span",s,[n[2]||(n[2]=(0,o.Lk)("span",{class:"sui-icon-loader sui-loading","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)(e.loadingText),1)])],64)):((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,o.Lk)("span",a,[u.value?((0,o.uX)(),(0,o.CE)("span",{key:0,class:(0,o.C4)(u.value),"aria-hidden":"true"},null,2)):(0,o.Q3)("",!0),(0,o.eW)(" "+(0,o.v_)(e.label)+" ",1),(0,o.RG)(t.$slots,"default")]),n[1]||(n[1]=(0,o.Lk)("span",{class:"sui-icon-loader sui-loading","aria-hidden":"true"},null,-1))],64))],16,r)}}}},1512:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var o=n(9726),i=n(7786),r={class:"sui-tabs sui-side-tabs"},a={role:"tablist",class:"sui-tabs-menu"},l=["id","aria-controls","aria-selected","tabindex","onClick"],s=["name","value","aria-label","checked"],u={class:"sui-tabs-content"},c=["id","aria-labelledby","hidden"],d={key:0,class:"sui-border-frame"};const p={__name:"side-tab",props:{tabs:{type:Array,required:!0},modelValue:{type:[String,Boolean],required:!0},slug:{type:String,required:!0}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,p=e,f=n,v=(0,i.hRP)(p,"modelValue",f),b=(0,o.EW)(function(){return"".concat(p.slug,"-tabs")}),m=function(e){return e?"".concat(p.slug,"__").concat(e,"__tab"):""},y=function(e){return e?"".concat(p.slug,"__").concat(e,"__content"):""};return function(t,n){return(0,o.uX)(),(0,o.CE)("div",r,[(0,o.Lk)("div",a,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.tabs,function(i){return(0,o.uX)(),(0,o.CE)(o.FK,{key:i.value},[(0,o.Lk)("button",{type:"button",role:"tab",id:m(i.value),class:(0,o.C4)(["sui-tab-item",{active:e.modelValue===i.value}]),"aria-controls":y(i.value),"aria-selected":e.modelValue===i.value?"true":"false",tabindex:e.modelValue===i.value?"0":"-1",onClick:function(e){return t.$emit("update:modelValue",i.value)}},(0,o.v_)(i.label),11,l),(0,o.bo)((0,o.Lk)("input",{type:"radio",name:b.value,value:i.value,class:"sui-screen-reader-text","aria-label":i.label,"aria-hidden":"true",checked:e.modelValue===i.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(v)?v.value=e:null})},null,8,s),[[o.XL,(0,o.R1)(v)]])],64)}),128))]),(0,o.Lk)("div",u,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.tabs,function(n){return(0,o.uX)(),(0,o.CE)(o.FK,{key:n.value},[n.hideContent?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",{key:0,role:"tabpanel",id:y(n.value),class:(0,o.C4)(["sui-tab-content",{active:e.modelValue===n.value}]),"aria-labelledby":m(n.value),tabindex:0,hidden:e.modelValue!==n.value},[!1!==n.hasFrame?((0,o.uX)(),(0,o.CE)("div",d,[(0,o.RG)(t.$slots,n.value)])):(0,o.RG)(t.$slots,n.value,{key:1})],10,c))],64)}),128))])])}}}},1669:e=>{"use strict";e.exports=jQuery},1751:(e,t,n)=>{"use strict";n.d(t,{q:()=>m});var o=n(4335),i=n(3279),r=n(2720),a=n(7786),l=n(8261);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return c(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(c(t={},o,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=d,c(f,"constructor",d),c(d,"constructor",s),s.displayName="GeneratorFunction",c(d,i,"GeneratorFunction"),c(f),c(f,i,"Generator"),c(f,o,function(){return this}),c(f,"toString",function(){return"[object Generator]"}),(u=function(){return{w:r,m:v}})()}function c(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}c=function(e,t,n,o){function r(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},c(e,t,n,o)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){v(r,o,i,a,l,"next",e)}function l(e){v(r,o,i,a,l,"throw",e)}a(void 0)})}}function m(){var e=(0,l.m)().rebindSUI,t=o.A.create({baseURL:"".concat(ajaxurl,"?action=wp_defender/v1/hub/"),timeout:3e4,transitional:{clarifyTimeoutError:!0},withCredentials:!1});function n(e,t){return"&route=".concat(encodeURIComponent(e),"&_def_nonce=").concat(encodeURIComponent(t))}function s(e,t,n,o){return c.apply(this,arguments)}function c(){return c=b(u().m(function o(a,l,s,c){var f,v,b,m,y,g,k,h,_,w,L,R,C,x,S,E,j,P,O,A=arguments;return u().w(function(o){for(;;)switch(o.n){case 0:return g=A.length>4&&void 0!==A[4]?A[4]:{},k=new FormData,c instanceof File&&"application/json"===c.type?k.append("file",c):(h=JSON.stringify(c),k.append("data",h)),_=n(l,s),o.n=1,(0,i.q)(_,p({method:a,data:k},g),t);case 1:if(w=o.v,L=w.data,!w.error.value){o.n=2;break}return o.a(2,null);case 2:return R=L.value,C=R.success,x=(null===(f=R.data)||void 0===f?void 0:f.message)||null,S=(null===(v=R.data)||void 0===v?void 0:v.redirect)||null,E=(null===(b=R.data)||void 0===b?void 0:b.interval)||null,j=(null===(m=R.data)||void 0===m?void 0:m.type_notice)||!1,(void 0===(null===(y=R.data)||void 0===y?void 0:y.auto_close)||R.data.auto_close)&&null!==x&&(O=!0===(null===(P=R.data)||void 0===P?void 0:P.auto_close),Defender.showNotification(C?j||"success":"error",x,O)),"session_out"===j&&null===S&&d(),null!==E?(0,r.TO)(function(){null!==S?location.href=S:location.reload()},1e3*E):null!==S&&(location.href=S),e(),o.a(2,R.data)}},o)})),c.apply(this,arguments)}function d(){(0,r.TO)(function(){(0,a.MLh)(document,"heartbeat-tick",function(){jQuery(document).trigger("heartbeat-tick.wp-auth-check",[{"wp-auth-check":!1}])}),(0,a.MLh)(window,"load",function(){var e=document.getElementById("wp-auth-check-frame");if(e){var t,n=null===(t=e.contentDocument)||void 0===t?void 0:t.getElementById("loginform");n&&n.addEventListener("submit",function(){(0,r.TO)(function(){location.reload()},1e3)})}})},2e3)}var f=function(){var e=b(u().m(function e(t,n){var o,r,a,l,s,c,d,f,v,b,m,y,g=arguments;return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=g.length>2&&void 0!==g[2]?g[2]:{},r=g.length>3&&void 0!==g[3]?g[3]:{},e.p=1,a="".concat(window.ajaxurl,"?action=").concat(t,"&_def_nonce=").concat(n),e.n=2,(0,i.q)(p({url:a,method:"POST",data:o},r));case 2:if(l=e.v,!(s=l.data).value){e.n=4;break}if(!(c=s.value).success){e.n=3;break}return e.a(2,c.data||c);case 3:throw null!==(d=c.data)&&void 0!==d&&d.message&&null!==(f=window.Defender)&&void 0!==f&&f.showNotification&&window.Defender.showNotification("error",c.data.message),new Error((null===(v=c.data)||void 0===v?void 0:v.message)||"Request failed");case 4:throw new Error("No response received");case 5:throw e.p=5,y=e.v,403===(null===(b=y.response)||void 0===b?void 0:b.status)&&(null!==(m=window.Defender)&&void 0!==m&&m.showNotification&&window.Defender.showNotification("error","Session expired. Please refresh the page."),setTimeout(function(){return window.location.reload()},2e3)),y;case 6:return e.a(2)}},e,null,[[1,5]])}));return function(t,n){return e.apply(this,arguments)}}();return{ajax:f,post:function(e,t,n){return s("post",e,t,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})},get:function(e,t,n){return s("get",e,t,n,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{})}}}},1904:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,".prefix-icon[data-v-b05b1ba2]{left:14px;position:absolute;top:50%;transform:translateY(-50%)}",""]);const r=i},2976:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(9726),i=n(7786),r=["id"],a=["for"],l=["id","name","value","true-value","disabled","required","aria-labelledby"],s=["id"];const u={__name:"sui-checkbox",props:{id:{type:String,default:""},modelValue:{type:[Boolean,Array,String,Number,Object],default:!1},label:{type:String,default:""},name:{type:String,default:""},value:{type:[String,Number,Boolean],default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},hasField:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup:function(e,t){var n=t.emit,u=(0,o.Ht)(),c=e,d=n,p=(0,i.hRP)(c,"modelValue",d),f=(0,o.EW)(function(){return c.id?c.id:c.label?c.label.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").trim():"checkbox-".concat(Math.random().toString(36).substr(2,9))}),v=(0,o.EW)(function(){return"".concat(f.value,"-input")}),b=(0,o.EW)(function(){return"".concat(f.value,"-label")}),m=function(e){d("change",e)};return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{id:f.value,class:(0,o.C4)({"sui-form-field":e.hasField})},[(0,o.Lk)("label",{for:v.value,class:"sui-checkbox"},[(0,o.bo)((0,o.Lk)("input",{id:v.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(p)?p.value=e:null}),type:"checkbox",name:e.name,value:e.value,"true-value":e.value,disabled:e.disabled,required:e.required,"aria-labelledby":b.value,onChange:m},null,40,l),[[o.lH,(0,o.R1)(p)]]),n[1]||(n[1]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),e.label||t.$slots.default?((0,o.uX)(),(0,o.CE)("span",{key:0,id:b.value},[(0,o.RG)(t.$slots,"default",{},function(){return[(0,o.eW)((0,o.v_)(e.label),1)]})],8,s)):(0,o.Q3)("",!0)],8,a),(0,o.R1)(u).description?(0,o.RG)(t.$slots,"description",{key:0}):(0,o.Q3)("",!0)],10,r)}}}},3498:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var o=n(9726),i=n(5592),r=n(682);function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var s=["innerHTML"],u={key:0},c={class:"sui-footer-nav"},d=["href"],p={class:"sui-footer-social"},f=["href"],v={class:"sui-screen-reader-text"};const b={__name:"app-footer",setup:function(e){var t=(0,i.B)().__,n=(0,r.X)(),l=n.is_free,b=n.whitelabel,m=(0,o.EW)(function(){return b.value.footer_text}),y=(0,o.EW)(function(){return b.value.change_footer}),g=[{url:"https://wpmudev.com/roadmap/",text:t("Roadmap")},{url:"https://wpmudev.com/docs/",text:t("Docs")},{url:"https://wpmudev.com/terms-of-service/",text:t("Terms of Service")},{url:"https://incsub.com/privacy-policy/",text:t("Privacy Policy")}],k=[{url:"https://wpmudev.com/hub2/",text:t("The Hub")},{url:"https://wpmudev.com/projects/category/plugins/",text:t("Plugins")},{url:"https://wpmudev.com/hub2/support/",text:t("Support")},{url:"https://wpmudev.com/hub2/community/",text:t("Community")}],h=[{url:"https://profiles.wordpress.org/wpmudev#content-plugins",text:t("Free Plugins")},{url:"https://wpmudev.com/features/",text:t("Membership")},{url:"https://wordpress.org/support/plugin/defender-security/",text:t("Support")},{url:"https://wpmudev.com/hub-welcome/",text:t("The Hub")}],_=(0,o.EW)(function(){return[].concat(a(l.value?h:k),g)}),w=[{url:"https://www.facebook.com/wpmudev",icon:"sui-icon-social-facebook",name:t("Facebook")},{url:"https://twitter.com/wpmudev",icon:"sui-icon-social-twitter",name:t("Twitter")},{url:"https://www.instagram.com/wpmu_dev/",icon:"sui-icon-instagram",name:t("Instagram")}];return function(e,t){return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.Lk)("div",{class:"sui-footer",innerHTML:m.value},null,8,s),y.value?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",u,[(0,o.Lk)("ul",c,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(_.value,function(e){return(0,o.uX)(),(0,o.CE)("li",{key:e.url},[(0,o.Lk)("a",{href:e.url,target:"_blank"},(0,o.v_)(e.text),9,d)])}),128))]),(0,o.Lk)("ul",p,[((0,o.uX)(),(0,o.CE)(o.FK,null,(0,o.pI)(w,function(e){return(0,o.Lk)("li",{key:e.url},[(0,o.Lk)("a",{href:e.url,target:"_blank"},[(0,o.Lk)("i",{class:(0,o.C4)(e.icon),"aria-hidden":"true"},null,2),(0,o.Lk)("span",v,(0,o.v_)(e.name),1)],8,f)])}),64))])]))])}}}},3824:(e,t,n)=>{"use strict";n.d(t,{k:()=>m});var o=n(810),i=n(9726),r=n(7786),a=n(1751),l=n(7476);function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),c}var a={};function l(){}function c(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(u(t={},o,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=d,u(f,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(f),u(f,i,"Generator"),u(f,o,function(){return this}),u(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:r,m:v}})()}function u(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}u=function(e,t,n,o){function r(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},u(e,t,n,o)}function c(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){c(r,o,i,a,l,"next",e)}function l(e){c(r,o,i,a,l,"throw",e)}a(void 0)})}}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=(0,o.nY)("hubConnection",function(){var e=(0,a.q)().get,t=(0,l.r)(),n=(0,r.Mjh)("init_hub_connection",""),o=(0,i.KR)({}),u=(0,i.KR)({}),c=(0,i.KR)(""),f=(0,i.KR)(!1),b=(0,i.KR)(!1),m=(0,i.KR)(!1),y=(0,i.KR)({}),g=(0,i.EW)(function(){return m.value}),k=(0,i.EW)(function(){return f.value&&b.value}),h=(0,i.EW)(function(){return f.value&&!b.value}),_=(0,i.EW)(function(){return Object.keys(y.value).length>0});function w(e){var t,n,i;e&&(o.value=e.routes?v({},e.routes):{},u.value=e.nonces?v({},e.nonces):{},c.value=e.button_label||"",f.value=null!==(t=e.is_dash_installed)&&void 0!==t&&t,b.value=null!==(n=e.is_dash_activated)&&void 0!==n&&n,m.value=null!==(i=e.is_hub_connected)&&void 0!==i&&i,y.value=e.hub_connector_url?v({},e.hub_connector_url):{})}function L(){return R.apply(this,arguments)}function R(){return(R=d(s().m(function n(){var i;return s().w(function(n){for(;;)switch(n.p=n.n){case 0:if(h.value&&o.value.activate_dashboard_plugin){n.n=1;break}throw new Error("Cannot activate dashboard plugin");case 1:return t.start("activate-dashboard-plugin"),n.p=2,n.n=3,e(o.value.activate_dashboard_plugin,u.value.activate_dashboard_plugin);case 3:return(i=n.v).redirect&&setTimeout(function(){return window.location.replace(i.redirect)},500),n.a(2,i);case 4:return n.p=4,t.stop("activate-dashboard-plugin"),n.f(4);case 5:return n.a(2)}},n,null,[[2,,4,5]])}))).apply(this,arguments)}function C(){return C=d(s().m(function e(){var t,o,i,r=arguments;return s().w(function(e){for(;;)switch(e.n){case 0:if(t=r.length>0&&void 0!==r[0]?r[0]:{},!h.value){e.n=2;break}return e.n=1,L();case 1:return e.a(2,e.v);case 2:o=t.page||"",t.is_summary||!1?(o="summary-box",n.value=o):n.value=t.module_slug||o,(i=x(o))&&window.location.replace(i);case 3:return e.a(2)}},e)})),C.apply(this,arguments)}function x(e){return _.value&&(y.value[e]||y.value.default)||null}return function(){if("undefined"!=typeof window){var e,t,n,o,i=(null===(e=window.dashboard)||void 0===e?void 0:e.hub_connector)||(null===(t=window.onboard)||void 0===t?void 0:t.hub_connector)||(null===(n=window.defender)||void 0===n?void 0:n.hub_connector)||(null===(o=window.iplockout)||void 0===o?void 0:o.hub_connector);i&&w(i)}}(),{routes:o,nonces:u,button_label:c,is_dash_installed:f,is_dash_activated:b,is_hub_connected:m,hub_connector_url:y,isSiteConnected:g,isDashReady:k,canActivateDash:h,hasConnectorUrls:_,init:w,updateConnectionStatus:function(e){m.value=Boolean(e)},updateConnectorUrl:function(e){"object"===p(e)&&null!==e?y.value=v({},e):"string"==typeof e&&(y.value={default:e})},initHubConnectionFlow:function(){return C.apply(this,arguments)},activateDashboardPlugin:L,checkConnection:function(){var e=n.value;return!(!e||!["global-ip","blocklist","onboard","summary-box"].includes(e)||!m.value)&&(n.value="",!0)},clearConnectionState:function(){n.value=""},getRedirectUrl:x}})},3829:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,'.sui-box-body-onload[data-v-39142834]{position:relative}.sui-box-body-onload[data-v-39142834]:before{background:#fff;bottom:0;content:"";left:0;opacity:.9;position:absolute;right:0;top:0;z-index:1}.sui-box-body-onload .loading[data-v-39142834]{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.loading[data-v-39142834]{color:#888;display:none;font-weight:500}.sui-box-body-onload .loading[data-v-39142834]{display:block}',""]);const r=i},3997:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,"#firewall #ua-blocklist label.sui-checkbox[data-v-0b6f387e]{margin-top:0}#firewall #ua-blocklist hr[data-v-0b6f387e]{margin-bottom:20px;margin-top:20px}.sui-wrap #ua-blocklist.sui-accordion:not(.sui-table):not(.sui-accordion-block):not(.sui-builder-fields) .sui-accordion-item .sui-accordion-item-header .sui-accordion-item-title[data-v-0b6f387e]{color:#666}.bot-trap-upsell-link .sui-icon-open-new-window[data-v-0b6f387e]:before{color:#8d00b1}",""]);const r=i},4073:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var o=function(){return{homeUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return defender.home_url+e},siteUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return defender.site_url+e},adminUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return defender.admin_url+e},assetUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return defender.defender_url+e},wpmuDevApiBaseUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return defender.wpmudev_api_base_url+e},campaign_url:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"project/wp-defender",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return n=n&&!n.endsWith("&")?n+"&":n,"".concat(defender.wpmudev_api_base_url).concat(t,"/?").concat(n,"utm_source=defender&utm_medium=plugin&utm_campaign=").concat(e)},isUrlOrSlug:function(e){return/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/i.test(e)?"url":"slug"}}}},4146:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var o=n(9726),i=n(7786),r=["for"],a=["id","disabled","name"],l={class:"sui-toggle-label"},s=["innerHTML"],u={key:0,class:"sui-notice margin-top-10 sui-description"},c={class:"sui-notice-content"},d={class:"sui-notice-message"},p={key:1,class:"sui-toggle-content"};const f={__name:"toggle-feature",props:{feature:{type:String,required:!0},label:{type:String,required:!0},description:{type:String,default:""},modelValue:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1},disabledNotice:{type:String,default:""},name:{type:String,default:""},hasField:{type:Boolean,default:!0}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,f=e,v=n,b=(0,i.hRP)(f,"modelValue",v);return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)({"sui-form-field":e.hasField})},[(0,o.Lk)("label",{for:"toggle-".concat(e.feature),class:"sui-toggle mb-10px"},[(0,o.bo)((0,o.Lk)("input",{id:"toggle-".concat(e.feature),type:"checkbox","onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(b)?b.value=e:null}),disabled:e.disabled,name:e.name},null,8,a),[[o.lH,(0,o.R1)(b)]]),n[1]||(n[1]=(0,o.Lk)("span",{class:"sui-toggle-slider","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",l,[(0,o.eW)((0,o.v_)(e.label)+" ",1),(0,o.RG)(t.$slots,"label-addon")]),e.description?((0,o.uX)(),(0,o.CE)("span",{key:0,class:"sui-description text-left",innerHTML:e.description},null,8,s)):(0,o.Q3)("",!0)],8,r),e.disabled&&e.disabledNotice?((0,o.uX)(),(0,o.CE)("div",u,[(0,o.Lk)("div",c,[(0,o.Lk)("div",d,[n[2]||(n[2]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",null,(0,o.v_)(e.disabledNotice),1)])])])):(0,o.Q3)("",!0),(0,o.R1)(b)&&!e.disabled&&t.$slots.default?((0,o.uX)(),(0,o.CE)("div",p,[(0,o.RG)(t.$slots,"default")])):(0,o.Q3)("",!0)],2)}}}},4438:(e,t,n)=>{"use strict";n.d(t,{A:()=>j});var o=n(9726),i=n(7786),r=n(682),a=n(1669),l=n.n(a);const s={mounted:function(e,t){(0,r.X)().isHighContrast()&&!l()("body").hasClass("sui-elements-accessible")&&l()("body").addClass("sui-elements-accessible");var n=jQuery(e).closest(".sui-modal-content"),o=n.length?n:"body";"function"==typeof jQuery.fn.SUIselect2&&jQuery(e).SUIselect2({dropdownParent:o}),jQuery(e).on("select2:select",function(){var n,o=new Event("change",{bubbles:!0,cancelable:!0});e.dispatchEvent(o),null===(n=t.value)||void 0===n||n.call(t,e)}),jQuery(e).on("select2:unselect",function(){var t=new Event("change",{bubbles:!0,cancelable:!0});e.dispatchEvent(t)})},updated:function(e){var t=jQuery(e);t.hasClass("select2-hidden-accessible")&&t.SUIselect2("destroy");var n=t.closest(".sui-modal-content"),o=n.length?n:"body";"function"==typeof t.SUIselect2&&t.SUIselect2({dropdownParent:o})},unmounted:function(e){var t=jQuery(e);t.hasClass("select2-hidden-accessible")&&t.SUIselect2("destroy")}};function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,l=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var f=["for"],v={key:1,class:"sui-field-prefix"},b={key:2,class:"relative"},m=["id","name","multiple","data-placeholder","data-minimum-results-for-search","data-width"],y={key:0,value:""},g=["value"],k=["id","name","multiple","data-placeholder","data-minimum-results-for-search","data-width"],h={key:0,value:""},_=["value"],w={key:4,class:"sui-error-message"},L={key:5,class:"sui-description"};const R={__name:"sui-select",props:{modelValue:{type:[String,Number,Array],default:""},options:{type:[Array,Object],required:!0},id:{type:String,default:""},name:{type:String,default:""},label:{type:String,default:""},prefix:{type:String,default:""},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},hasField:{type:Boolean,default:!0},hasError:{type:Boolean,default:!1},errorMessage:{type:String,default:""},helperMessage:{type:String,default:""},customClass:{type:String,default:""},width:{type:String,default:"100%"},icon:{type:String,default:""}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=s,a=e,l=n,u=(0,o.EW)(function(){return a.id||"select-".concat(Math.random().toString(36).substr(2,9))}),p=(0,o.EW)(function(){return(Array.isArray(a.options)?a.options:Object.entries(a.options).map(function(e){var t=d(e,2);return c({},t[0],t[1])})).map(function(e){if("string"==typeof e)return{value:e,label:e};if(void 0!==e.value||void 0!==e.label)return e;var t=d(Object.entries(e)[0]||[],2);return{value:t[0],label:t[1]}})}),R=(0,i.hRP)(a,"modelValue",l);return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)({"sui-form-field":e.hasField,"sui-form-field-error":e.hasError})},[e.label?((0,o.uX)(),(0,o.CE)("label",{key:0,class:"sui-label",for:u.value},(0,o.v_)(e.label),9,f)):(0,o.Q3)("",!0),e.prefix?((0,o.uX)(),(0,o.CE)("span",v,(0,o.v_)(e.prefix),1)):(0,o.Q3)("",!0),e.icon?((0,o.uX)(),(0,o.CE)("div",b,[n[2]||(n[2]=(0,o.Lk)("span",{class:"prefix-icon sui-icon-web-globe-world"},null,-1)),(0,o.bo)(((0,o.uX)(),(0,o.CE)("select",{id:u.value,name:e.name,"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(R)?R.value=e:null}),class:(0,o.C4)(["sui-select",e.customClass]),multiple:e.multiple,"data-placeholder":e.placeholder,"data-minimum-results-for-search":e.searchable?0:"Infinity","data-width":e.width||"100%"},[!e.multiple&&e.placeholder?((0,o.uX)(),(0,o.CE)("option",y)):(0,o.Q3)("",!0),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(p.value,function(e){return(0,o.uX)(),(0,o.CE)("option",{key:e.value,value:e.value},(0,o.v_)(e.label),9,g)}),128))],10,m)),[[o.u1,(0,o.R1)(R)],[(0,o.R1)(r)]])])):(0,o.bo)(((0,o.uX)(),(0,o.CE)("select",{key:3,id:u.value,name:e.name,"onUpdate:modelValue":n[1]||(n[1]=function(e){return(0,o.i9)(R)?R.value=e:null}),class:(0,o.C4)(["sui-select",e.customClass]),multiple:e.multiple,"data-placeholder":e.placeholder,"data-minimum-results-for-search":e.searchable?0:"Infinity","data-width":e.width||"100%"},[!e.multiple&&e.placeholder?((0,o.uX)(),(0,o.CE)("option",h)):(0,o.Q3)("",!0),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(p.value,function(e){return(0,o.uX)(),(0,o.CE)("option",{key:e.value,value:e.value},(0,o.v_)(e.label),9,_)}),128))],10,k)),[[o.u1,(0,o.R1)(R)],[(0,o.R1)(r)]]),e.hasError&&e.errorMessage?((0,o.uX)(),(0,o.CE)("p",w,(0,o.v_)(e.errorMessage),1)):(0,o.Q3)("",!0),e.helperMessage?((0,o.uX)(),(0,o.CE)("p",L,(0,o.v_)(e.helperMessage),1)):(0,o.Q3)("",!0),(0,o.RG)(t.$slots,"default")],2)}}};var C=n(5072),x=n.n(C),S=n(1904),E={insert:"head",singleton:!1};x()(S.A,E);S.A.locals;const j=(0,n(6262).A)(R,[["__scopeId","data-v-b05b1ba2"]])},4497:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var o=n(9726),i={class:"sui-notice-content"},r={class:"sui-notice-message"};const a={__name:"notice",props:{noticeType:String,iconType:String},setup:function(e){return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-notice",e.noticeType])},[(0,o.Lk)("div",i,[(0,o.Lk)("div",r,[(0,o.Lk)("i",{class:(0,o.C4)(["sui-notice-icon sui-md",e.iconType]),"aria-hidden":"true"},null,2),(0,o.RG)(t.$slots,"default")])])],2)}}}},4599:(e,t,n)=>{"use strict";var o=n(9726),i=n(810),r=n(5592),a=n(5807),l=n(3824),s=n(1751),u=n(7476),c=n(9478);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return f(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(f(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,f(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,f(d,"constructor",u),f(u,"constructor",s),s.displayName="GeneratorFunction",f(u,i,"GeneratorFunction"),f(d),f(d,i,"Generator"),f(d,o,function(){return this}),f(d,"toString",function(){return"[object Generator]"}),(p=function(){return{w:r,m:v}})()}function f(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}f=function(e,t,n,o){function r(t,n){f(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},f(e,t,n,o)}function v(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){v(r,o,i,a,l,"next",e)}function l(e){v(r,o,i,a,l,"throw",e)}a(void 0)})}}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=(0,i.nY)("antibot",function(){var e=(0,s.q)().post,t=(0,c.h)().formatNumber,n=(0,u.r)().withLoading,i=(0,l.k)().isSiteConnected,r=(0,o.KR)({}),a=(0,o.KR)({}),d=(0,o.KR)({}),f=(0,o.KR)({});function v(e){r.value=e.model,a.value=e.misc,d.value=e.routes,f.value=e.nonces}function m(e){var t=e.key,n=e.value;r.value=y(y({},r.value),{},g({},t,n))}function k(e){var t=e.key,n=e.value;a.value=y(y({},a.value),{},g({},t,n))}function h(){return(h=b(p().m(function t(){var o;return p().w(function(t){for(;;)switch(t.n){case 0:return o=y(y({},r.value),{},{enabled:!1}),t.n=1,n("deactivate-antibot",function(){return e(d.value.save_settings,f.value.save_settings,o)});case 1:v(t.v);case 2:return t.a(2)}},t)}))).apply(this,arguments)}function _(){return(_=b(p().m(function t(){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n("activate-antibot",b(p().m(function t(){var n;return p().w(function(t){for(;;)switch(t.n){case 0:return n=y(y({},r.value),{},{enabled:!0}),t.n=1,e(d.value.save_settings,f.value.save_settings,n);case 1:setTimeout(function(){return location.reload()},500);case 2:return t.a(2)}},t)})));case 1:return t.a(2)}},t)}))).apply(this,arguments)}function w(){return(w=b(p().m(function t(){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n("disconnect-site",b(p().m(function t(){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(d.value.disconnect_site,f.value.disconnect_site);case 1:setTimeout(function(){return window.location.reload()},3e3);case 2:return t.a(2)}},t)})));case 1:return t.a(2)}},t)}))).apply(this,arguments)}function L(){return(L=b(p().m(function t(){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n("switch-managed-by",b(p().m(function t(){var n;return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(d.value.switch_managed_by,f.value.switch_managed_by);case 1:m({key:"managed_by",value:(n=t.v).managed_by}),k({key:"frontend_mode",value:n.frontend_mode}),k({key:"ips_count",value:n.ips_count});case 2:return t.a(2)}},t)})));case 1:return t.a(2)}},t)}))).apply(this,arguments)}function R(){return(R=b(p().m(function t(o){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n("submit-trusted-ip-form",function(){return e(d.value.blocklist_checker_submit_trusted_ip_form,f.value.blocklist_checker_submit_trusted_ip_form,o)});case 1:return t.a(2)}},t)}))).apply(this,arguments)}function C(){return(C=b(p().m(function t(o){return p().w(function(t){for(;;)if(0===t.n)return t.a(2,n("blocklist-checker-search",b(p().m(function t(){var n,i,r,a;return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(d.value.blocklist_checker_search,f.value.blocklist_checker_search,{ip:o});case 1:if((a=t.v).success){t.n=2;break}throw new Error(a.message);case 2:return t.a(2,{local:null!==(n=a.local)&&void 0!==n&&n,central:null!==(i=a.central)&&void 0!==i&&i,antibot:null!==(r=a.antibot)&&void 0!==r&&r})}},t)}))))},t)}))).apply(this,arguments)}function x(){return(x=b(p().m(function t(o){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n("add-ip-to-allowlist",function(){return e(d.value.blocklist_checker_add_ip_to_allowlist,f.value.blocklist_checker_add_ip_to_allowlist,{ip:o})});case 1:return t.a(2)}},t)}))).apply(this,arguments)}function S(){return(S=b(p().m(function t(){return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n("switch-mode",b(p().m(function t(){var n;return p().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(d.value.switch_mode,f.value.switch_mode,{});case 1:k({key:"frontend_mode",value:(n=t.v).mode}),k({key:"ips_count",value:n.ips_count}),SUI.closeModal();case 2:return t.a(2)}},t)})));case 1:return t.a(2)}},t)}))).apply(this,arguments)}window.antibot&&v(window.antibot);var E=(0,o.EW)(function(){return i&&a.value.frontend_is_enabled}),j=(0,o.EW)(function(){return E.value?t(a.value.ips_count):0});return{model:r,misc:a,routes:d,nonces:f,isEnabled:E,totalAntibotIps:j,init:v,updateModelProperty:m,updateMiscProperty:k,deactivate:function(){return h.apply(this,arguments)},activate:function(){return _.apply(this,arguments)},disconnectSite:function(){return w.apply(this,arguments)},switchManagedBy:function(){return L.apply(this,arguments)},submitTrustedIpForm:function(e){return R.apply(this,arguments)},blocklistCheckerSearch:function(e){return C.apply(this,arguments)},addIpToAllowlist:function(e){return x.apply(this,arguments)},switchMode:function(){return S.apply(this,arguments)}}}),h=n(4497),_=n(4073),w={class:"flex items-start gap-3"},L=["alt","src"],R={class:"m-0 font-semibold"},C={class:"m-0 text-base leading-6"};const x={__name:"feature-item",props:{feature:{type:Object,required:!0,validator:function(e){return"heading"in e&&"description"in e&&"icon"in e}}},setup:function(e){var t=(0,_.I)().assetUrl,n=e,i=(0,o.EW)(function(){return"Icon representing ".concat(n.feature.heading)});return function(n,r){return(0,o.uX)(),(0,o.CE)("div",w,[(0,o.Lk)("img",{alt:i.value,src:(0,o.R1)(t)(e.feature.icon),class:"w-10 h-10 sm:mt-1"},null,8,L),(0,o.Lk)("div",null,[(0,o.Lk)("h5",R,(0,o.v_)(e.feature.heading),1),(0,o.Lk)("p",C,(0,o.v_)(e.feature.description),1)])])}}};var S=n(9806);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return P(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(P(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,P(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,P(d,"constructor",u),P(u,"constructor",s),s.displayName="GeneratorFunction",P(u,i,"GeneratorFunction"),P(d),P(d,i,"Generator"),P(d,o,function(){return this}),P(d,"toString",function(){return"[object Generator]"}),(j=function(){return{w:r,m:p}})()}function P(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}P=function(e,t,n,o){function r(t,n){P(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},P(e,t,n,o)}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach(function(t){T(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function T(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=E(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function W(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){I(r,o,i,a,l,"next",e)}function l(e){I(r,o,i,a,l,"throw",e)}a(void 0)})}}var F=(0,i.nY)("globalIp",function(){var e=(0,s.q)().post,t=(0,u.r)(),n=(0,l.k)(),i=(0,o.KR)({}),r=(0,o.KR)({}),a=(0,o.KR)({}),c=(0,o.KR)({}),d=(0,o.KR)({});function p(e){i.value=e.model,r.value=e.misc,a.value=e.routes,c.value=e.nonces,d.value=e.hub}p(window.global_ip);var f=(0,o.EW)(function(){return i.value.allow_self_unlock});function v(){return(v=W(j().m(function n(){var o;return j().w(function(n){for(;;)switch(n.n){case 0:return o=A(A({},i.value),{},{enabled:!i.value.enabled,blocklist_autosync:!i.value.blocklist_autosync,module_title:"central_ip"}),n.n=1,t.withLoading("toggle",W(j().m(function t(){return j().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(a.value.save_settings,c.value.save_settings,o);case 1:setTimeout(function(){return location.reload()},500);case 2:return t.a(2)}},t)})));case 1:return n.a(2)}},n)}))).apply(this,arguments)}function b(){return(b=W(j().m(function n(){var o;return j().w(function(n){for(;;)switch(n.n){case 0:if(!i.value.enabled){n.n=1;break}return n.a(2);case 1:return o=A(A({},i.value),{},{enabled:!0}),n.n=2,t.withLoading("activate",function(){return e(a.value.save_settings,c.value.save_settings,o)});case 2:p(n.v);case 3:return n.a(2)}},n)}))).apply(this,arguments)}function m(){return(m=W(j().m(function n(){var o;return j().w(function(n){for(;;)switch(n.n){case 0:return o=A(A({},i.value),{},{allow_self_unlock:!i.value.allow_self_unlock,module_title:"antibot"}),n.n=1,t.withLoading("toggle-allow-self-unlock",W(j().m(function t(){return j().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(a.value.save_settings,c.value.save_settings,o);case 1:setTimeout(function(){return location.reload()},500);case 2:return t.a(2)}},t)})));case 1:return n.a(2)}},n)}))).apply(this,arguments)}function y(){return(y=W(j().m(function o(){var r;return j().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,t.withLoading("settings",function(){return e(a.value.save_settings,c.value.save_settings,i.value)});case 1:p(r=o.v),n.init(r);case 2:return o.a(2)}},o)}))).apply(this,arguments)}function g(){return(g=W(j().m(function n(){var o;return j().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t.withLoading("refresh-global-ip",function(){return e(a.value.refresh_global_ip_list,c.value.refresh_global_ip_list)});case 1:void 0!==(o=n.v).global_ip_list&&(d.value.global_ip_list=o.global_ip_list);case 2:return n.a(2)}},n)}))).apply(this,arguments)}return{model:i,misc:r,routes:a,nonces:c,hub:d,is_self_unlock_allowed:f,init:p,toggle:function(){return v.apply(this,arguments)},activate:function(){return b.apply(this,arguments)},toggleAllowSelfUnlock:function(){return m.apply(this,arguments)},saveSettings:function(){return y.apply(this,arguments)},refreshGlobalIP:function(){return g.apply(this,arguments)}}}),X=n(4916),M={class:"flex gap-2"},D={class:"flex gap-2"},V=["data-tooltip"];const U={__name:"status-item",props:{icon:{type:String,required:!0},label:{type:String,required:!0},value:{type:String,required:!0},valueClass:{type:String,default:"text-lg font-bold text-gray-500"},infoTooltip:{type:String,default:null}},setup:function(e){return function(t,n){return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.Lk)("div",M,[(0,o.Lk)("span",{"aria-hidden":!0,class:(0,o.C4)(["sui-md",e.icon])},null,2),(0,o.Lk)("strong",null,(0,o.v_)(e.label),1)]),(0,o.Lk)("div",D,[(0,o.Lk)("span",{class:(0,o.C4)(e.valueClass)},(0,o.v_)(e.value),3),e.infoTooltip?((0,o.uX)(),(0,o.CE)("span",{key:0,"data-tooltip":e.infoTooltip,class:"sui-tooltip"},n[0]||(n[0]=[(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-icon-info"},null,-1)]),8,V)):(0,o.Q3)("",!0)])])}}};var B=n(1117),K={class:"sui-modal sui-modal-md"},H={id:"blocklist-action-modal",role:"dialog",class:"sui-modal-content","aria-modal":"true"},G={class:"sui-box"},Q={class:"sui-box-header sui-flatten"},N={class:"sui-screen-reader-text"},q={class:"sui-box-body"},$={key:0,class:"grid gap-30px"},Y={class:"text-center"},z={class:"grid gap-20px"},J={class:"flex text-base border border-solid rounded border-silver-light gap-20px p-15px"},Z={class:"font-medium text-gray-400"},ee={class:"font-bold"},te={class:"flex justify-between sui-form-field"},ne=["disabled"],oe={key:0},ie={key:1},re={key:1,class:"text-center"},ae={class:"sui-description"};const le={__name:"report-as-trusted",props:{ip:String},setup:function(e){var t=e,n=(0,r.B)().__,i=k(),a=(0,X.w)(),l=(0,o.KR)(""),s=(0,o.KR)(""),u=(0,o.KR)(""),c=(0,o.KR)(!1),d=(0,o.KR)(!1),p=(0,o.KR)({email:!1,service:!1,reason:!1}),f=(0,o.EW)(function(){return Object.values(p.value).every(Boolean)}),v={title:n("Report as Trusted IP"),description:n("Our team will review this IP..."),ipLabel:n("IP Address"),emailLabel:n("User Email"),emailError:n("Please provide a valid email address."),serviceLabel:n("Service it belongs to"),servicePlaceholder:n("E.g., SEMrush"),serviceError:n("Please specify the service associated with this IP address."),reasonLabel:n("Reason for Request"),reasonPlaceholder:n("E.g., Required for essential services or systems"),reasonError:n("Please provide a reason for this request."),submitButtonText:n("Submit Request"),submitButtonLoadingText:n("Submitting Request..."),closeButtonText:n("Close"),successTitle:n("Request Sent!"),successMessage:n("Thanks for submitting a trusted IP request...")};function b(e,t){p.value[e]=t}function m(){!c.value&&f.value&&(c.value=!0,a.trackFeature({event:"def_request_trusted_ip",data:{"IP Address":t.ip,"User Email":l.value,Service:s.value,Reason:u.value},force:!0}),i.submitTrustedIpForm({email:l.value,ip:t.ip,service:s.value,reason:u.value}),setTimeout(function(){c.value=!1,d.value=!0},1500))}function y(){SUI.closeModal("blocklist-action-modal")}function g(){y(),setTimeout(function(){return location.reload()},500)}return(0,o.sV)(function(){jQuery(document).on("keydown","#search-ip-address",function(e){"Enter"===e.key&&m()})}),function(t,n){return(0,o.uX)(),(0,o.CE)("div",K,[(0,o.Lk)("div",H,[(0,o.Lk)("div",G,[(0,o.Lk)("div",Q,[(0,o.Lk)("button",{type:"button",class:"sui-button-icon sui-button-float--right","aria-label":"close-modal",onClick:y},[n[6]||(n[6]=(0,o.Lk)("span",{class:"sui-icon-close","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",N,(0,o.v_)(v.closeButtonText),1)])]),(0,o.Lk)("div",q,[d.value?((0,o.uX)(),(0,o.CE)("div",re,[n[7]||(n[7]=(0,o.Lk)("span",{class:"sui-icon-check-tick sui-success sui-lg","aria-hidden":"true"},null,-1)),(0,o.Lk)("h2",null,(0,o.v_)(v.successTitle),1),(0,o.Lk)("p",ae,(0,o.v_)(v.successMessage),1),(0,o.Lk)("button",{type:"button",class:"sui-button",onClick:g},(0,o.v_)(v.closeButtonText),1)])):((0,o.uX)(),(0,o.CE)("div",$,[(0,o.Lk)("div",Y,[(0,o.Lk)("h2",null,(0,o.v_)(v.title),1),(0,o.Lk)("p",null,(0,o.v_)(v.description),1)]),(0,o.Lk)("div",z,[(0,o.Lk)("div",J,[(0,o.Lk)("label",Z,(0,o.v_)(v.ipLabel),1),(0,o.Lk)("span",ee,(0,o.v_)(e.ip),1)]),(0,o.bF)(B.A,{modelValue:l.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return l.value=e}),modelModifiers:{trim:!0},label:v.emailLabel,validation:["required","email"],"error-message":v.emailError,onValidation:n[1]||(n[1]=function(e){return b("email",e)})},null,8,["modelValue","label","error-message"]),(0,o.bF)(B.A,{modelValue:s.value,"onUpdate:modelValue":n[2]||(n[2]=function(e){return s.value=e}),modelModifiers:{trim:!0},label:v.serviceLabel,placeholder:v.servicePlaceholder,"error-message":v.serviceError,onValidation:n[3]||(n[3]=function(e){return b("service",e)})},null,8,["modelValue","label","placeholder","error-message"]),(0,o.bF)(B.A,{modelValue:u.value,"onUpdate:modelValue":n[4]||(n[4]=function(e){return u.value=e}),modelModifiers:{trim:!0},label:v.reasonLabel,placeholder:v.reasonPlaceholder,"error-message":v.reasonError,onValidation:n[5]||(n[5]=function(e){return b("reason",e)})},null,8,["modelValue","label","placeholder","error-message"]),(0,o.Lk)("div",te,[(0,o.Lk)("button",{type:"button",class:"sui-button sui-button-ghost",onClick:y},(0,o.v_)(v.closeButtonText),1),(0,o.Lk)("button",{type:"button",class:"sui-button sui-button-blue",disabled:c.value||!f.value,onClick:m},[c.value?((0,o.uX)(),(0,o.CE)("span",ie,(0,o.v_)(v.submitButtonLoadingText),1)):((0,o.uX)(),(0,o.CE)("span",oe,(0,o.v_)(v.submitButtonText),1))],8,ne)])])]))])])])])}}};var se={class:"sui-box"},ue={class:"sui-box-header"},ce={class:"sui-box-title"},de=["href"],pe={class:"loading"};const fe={__name:"antibot-loading",props:{title:{type:String,required:!0},showStatsButton:{type:Boolean,default:!1}},setup:function(e){var t=(0,r.B)().__,n=(0,_.I)().wpmuDevApiBaseUrl,i=(0,u.r)(),a=(0,o.EW)(function(){var e=["sui-box-body"];return i.isLoading("switch-managed-by")&&e.push("sui-box-body-onload"),e});return function(i,r){return(0,o.uX)(),(0,o.CE)("div",se,[(0,o.Lk)("div",ue,[(0,o.Lk)("h3",ce,(0,o.v_)(e.title),1),e.showStatsButton?((0,o.uX)(),(0,o.CE)("a",{key:0,href:(0,o.R1)(n)("hub2/security-center"),class:"sui-button sui-button-ghost ml-auto",target:"_blank"},[r[0]||(r[0]=(0,o.Lk)("span",{class:"sui-icon-graph-bar","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(t)("View Antibot Stats")),1)],8,de)):(0,o.Q3)("",!0)]),(0,o.Lk)("div",{class:(0,o.C4)(a.value)},[(0,o.RG)(i.$slots,"default"),(0,o.Lk)("div",pe,[r[1]||(r[1]=(0,o.Lk)("span",{class:"sui-icon-loader sui-loading","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(t)("LOADING...")),1)])],2)])}}};var ve=n(5072),be=n.n(ve),me=n(3829),ye={insert:"head",singleton:!1};be()(me.A,ye);me.A.locals;var ge=n(6262);const ke=(0,ge.A)(fe,[["__scopeId","data-v-39142834"]]);var he=n(682),_e=["innerHTML"],we=["href"],Le=["innerHTML"],Re={class:"mb-5 sui-form-field"},Ce={class:"sui-control-with-icon sui-with-button sui-with-button-inside"},xe=["placeholder"],Se=["disabled"],Ee={key:2,class:"sui-field-list no-border"},je={class:"w-full mt-0 sui-table blocklist-checker-table-result"},Pe={colspan:"3",class:"px-30px pt-30px pb-20px"},Oe={class:"font-bold text-gray-500 mb-5px"},Ae={class:"sui-description"},Te={class:"text-gray-500"},Ie={class:"w-2/5"},We={class:"w-2/5"},Fe={class:"w-2/5 sui-table-item-title"},Xe={class:"w-2/5"},Me={class:"w-1/5 text-right"},De=["innerHTML"];const Ve={__name:"blocklist-checker",props:{managedBy:{type:String,required:!0}},setup:function(e){var t=(0,r.B)(),n=t.__,i=t.sprintf,a=(0,_.I)(),l=a.adminUrl,s=a.wpmuDevApiBaseUrl,u=(0,S.p)().isWhitelabelDisabled,c=(0,he.X)().hosted,d=k(),p=(0,o.KR)(""),f=(0,o.KR)(""),v=(0,o.KR)(!1),b=(0,o.KR)(null),m=(0,o.KR)(null),y=n("Blocklist Checker"),g=l("admin.php?page=wdf-ip-lockout&view=blocklist#tab-ip-allowlist"),w=n("Search"),L=n("Looking up IP address in the Blocklists..."),R=n("Blocklists"),C=n("Status"),x=n("Search IP address"),E=(0,o.EW)(function(){return i(n("Check if an IP is listed in the AntiBot or any other blocklists. If you find an IP that you wish to allow, you can add it to your %1$ssite's allowlist%2$s."),'<a href="'+g+'" target="_blank">',"</a>")}),j=(0,o.EW)(function(){return n("Result for IP:")+" ".concat(f.value)}),P=(0,o.EW)(function(){return i(n("%1$sAntiBot%2$s is managed by WPMU DEV. You can check and add IP addresses to the allowlist via the Hub."),"<strong>","</strong>")}),O=(0,o.EW)(function(){return s("hub2/security-center/antibot-global-firewall#check-ip")}),A=(0,o.EW)(function(){if(!b.value)return"";var e=Object.values(b.value).some(function(e){return e});return n(e?"The IP address was found in 1 or more blocklists.":"The IP address was not found in any blocklists.")}),T=(0,o.EW)(function(){return b.value?[{key:"antibot",name:n("AntiBot Blocklist"),icon:"sui-icon-web-globe-world sui-md"},{key:"central",name:n("Custom IP Blocklist"),icon:"sui-icon-wpmudev-logo sui-md"},{key:"local",name:n("Local Blocklist"),icon:"sui-icon-defender sui-md"}].map(function(e){var t=e.key,o=e.name,i=e.icon,r=b.value[t];return{name:o,icon:i,status:n(r?"Found":"Clear"),statusIcon:r?"sui-icon-warning-alert sui-error sui-md":"sui-icon-check-tick sui-success sui-md",actions:W(t,r)}}):[]}),I=function(){p.value&&(v.value=!0,b.value=null,m.value=null,d.blocklistCheckerSearch(p.value).then(function(e){f.value=p.value,b.value={local:void 0!==e.local&&e.local,central:void 0!==e.central&&e.central,antibot:void 0!==e.antibot&&e.antibot}}).catch(function(e){m.value=e}).finally(function(){v.value=!1}))},W=function(e,t){if(!t||"central"===e&&!u)return"";var o='<div class="sui-dropdown">\n <button class="sui-button-icon sui-dropdown-anchor" aria-label="dropdown">\n <span class="sui-icon-more" aria-hidden="true" />\n </button>\n <ul>\n <li>';return o+="antibot"===e?'<button class="add-to-site-allowlist">\n <span class="mr-0 sui-icon-plus -ml-5px" aria-hidden="true"></span>\n '.concat(n("Add to Site Allow List"),'\n </button>\n <button class="sui-init-modal">\n <span class="mr-0 sui-icon-flag -ml-5px" aria-hidden="true"></span>\n ').concat(n("Report as Trusted IP"),"\n </button>"):X("central"===e?s("hub2/security-center/central-ip-list"):l("admin.php?page=wdf-ip-lockout&view=blocklist")),o+="</li>\n </ul>\n </div>"},X=function(e){return'\n <button>\n <span class="mr-0 sui-icon-widget-settings-config -ml-5px" aria-hidden="true"></span>\n <a href="'.concat(e,'" target="_blank" class="inline-block w-auto pl-0 pr-0 bg-transparent">').concat(n("Manage Blocklist"),"</a>\n </button>\n ")};return(0,o.sV)(function(){jQuery(document).on("click","button.sui-init-modal",function(){jQuery("#reasons-for-trust").SUIselect2({minimumResultsForSearch:-1,dropdownCssClass:"sui-select-dropdown",dropdownParent:jQuery("#blocklist-action-modal")}),SUI.openModal("blocklist-action-modal",jQuery("#reporter-email"))}),jQuery(document).on("click","button.add-to-site-allowlist",function(){p.value&&d.addIpToAllowlist(p.value)})}),function(t,i){return"1"!==c||F().misc.value.is_wpmu_dev_admin||u?((0,o.uX)(),(0,o.Wv)(ke,{key:0,title:(0,o.R1)(y)},{default:(0,o.k6)(function(){return["hosting"===e.managedBy?((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,o.Lk)("p",{innerHTML:P.value,class:"mb-10px"},null,8,_e),(0,o.Lk)("a",{href:O.value,class:"sui-button sui-button-ghost",target:"_blank"},[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Manage Hub Allowlist"))+" ",1),i[1]||(i[1]=(0,o.Lk)("span",{class:"sui-icon-open-new-window ml-2px -mr-5px","aria-hidden":"true"},null,-1))],8,we)],64)):((0,o.uX)(),(0,o.CE)(o.FK,{key:1},[(0,o.Lk)("p",{class:"mb-10px",innerHTML:E.value},null,8,Le),(0,o.Lk)("div",Re,[(0,o.Lk)("div",Ce,[i[2]||(i[2]=(0,o.Lk)("i",{class:"sui-icon-magnifying-glass-search","aria-hidden":"true"},null,-1)),(0,o.bo)((0,o.Lk)("input",{"onUpdate:modelValue":i[0]||(i[0]=function(e){return p.value=e}),type:"search",class:"sui-form-control",placeholder:(0,o.R1)(x),id:"search-ip-address",onKeyup:(0,o.jR)(I,["enter"])},null,40,xe),[[o.Jo,p.value]]),(0,o.Lk)("button",{type:"button",class:"sui-button",onClick:I,disabled:v.value},(0,o.v_)((0,o.R1)(w)),9,Se)])]),v.value?((0,o.uX)(),(0,o.Wv)(h.A,{key:0,"icon-type":"sui-icon-loader sui-loading"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(L)),1)]}),_:1})):m.value?((0,o.uX)(),(0,o.Wv)(h.A,{key:1,"notice-type":"sui-notice-error","icon-type":"sui-icon-warning-alert"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)(m.value),1)]}),_:1})):b.value?((0,o.uX)(),(0,o.CE)("div",Ee,[(0,o.Lk)("table",je,[(0,o.Lk)("thead",null,[(0,o.Lk)("tr",null,[(0,o.Lk)("th",Pe,[(0,o.Lk)("p",Oe,(0,o.v_)(j.value),1),(0,o.Lk)("p",Ae,(0,o.v_)(A.value),1)])])]),(0,o.Lk)("tbody",Te,[(0,o.Lk)("tr",null,[(0,o.Lk)("td",Ie,(0,o.v_)((0,o.R1)(R)),1),(0,o.Lk)("td",We,(0,o.v_)((0,o.R1)(C)),1),i[3]||(i[3]=(0,o.Lk)("td",{class:"w-1/5"},null,-1))]),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(T.value,function(e,t){return(0,o.uX)(),(0,o.CE)("tr",{key:t},[(0,o.Lk)("td",Fe,[(0,o.Lk)("span",{class:(0,o.C4)(e.icon),"aria-hidden":"true"},null,2),(0,o.eW)(" "+(0,o.v_)(e.name),1)]),(0,o.Lk)("td",Xe,[(0,o.Lk)("span",{class:(0,o.C4)([e.statusIcon,"relative top-2px"]),"aria-hidden":"true"},null,2),(0,o.eW)(" "+(0,o.v_)(e.status),1)]),(0,o.Lk)("td",Me,[(0,o.Lk)("div",{innerHTML:e.actions},null,8,De)])])}),128))])])])):(0,o.Q3)("",!0),(0,o.bF)(le,{ip:p.value},null,8,["ip"])],64))]}),_:1},8,["title"])):(0,o.Q3)("",!0)}}};var Ue=n(7089),Be={insert:"head",singleton:!1};be()(Ue.A,Be);Ue.A.locals;const Ke=(0,ge.A)(Ve,[["__scopeId","data-v-3991bc04"]]);var He=n(1289),Ge={id:"anti-bot-global"},Qe={class:"p-6 bg-gray-100 border border-solid rounded-lg border-silver-light"},Ne={class:"grid grid-cols-3 gap-3"},qe={class:"border-b-0 border-l-0 border-r-0 border-solid sui-form-field mt-30px pt-30 border-silver-light"},$e={class:"sui-box-title"},Ye={class:"mt-0 mb-10px"},ze={class:"sui-row max-sm:flex-col",role:"radiogroup"},Je={class:"sui-col mr-10px max-sm:mr-0 max-sm:mb-10px"},Ze={for:"mode-basic",class:"sui-radio"},et=["checked"],tt={id:"label-mode-basic"},nt={class:"sui-tag ml-5px"},ot={class:"block text-base font-normal mt-10px"},it={class:"sui-col ml-10px max-sm:ml-0"},rt={for:"mode-strict",class:"sui-radio"},at=["checked"],lt={id:"label-mode-strict"},st={class:"sui-tag sui-tag-yellow ml-5px"},ut={class:"block text-base font-normal mt-10px"},ct={key:0,class:"border-b-0 border-l-0 border-r-0 border-solid mt-30px pt-30 border-silver-light"},dt={for:"allow-self-unlock",class:"sui-toggle"},pt=["checked"],ft={id:"allow-self-unlock-label",class:"sui-toggle-label"},vt=["href"],bt={class:"sui-box"},mt={class:"sui-box-status p-30px"},yt={class:"gap-2 sui-status"},gt={class:"font-semibold underline"},kt={class:"sui-actions"},ht={class:"sui-modal sui-modal-sm"},_t={role:"dialog",id:"mode-confirm",class:"sui-modal-content","aria-modal":"true","aria-labelledby":"modal-mode-confirm","aria-describedby":"modal-mode-confirm"},wt={class:"sui-box",role:"document"},Lt={class:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},Rt={class:"sui-box-title sui-lg"},Ct={class:"sui-screen-reader-text"},xt={class:"sui-description"},St={class:"sui-box-footer sui-flatten sui-content-center"};const Et={__name:"anti-bot",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,s=(0,he.X)().hosted,u=(0,S.p)().isWhitelabelDisabled,d=k(),p=F(),f=(0,l.k)(),v=(0,X.w)(),b=(0,i.bP)(d),m=b.misc,y=b.model,g=(0,i.bP)(f).isSiteConnected,h=(0,i.bP)(p).is_self_unlock_allowed,_=(0,o.EW)(function(){return m.value.module_name}),w=(0,o.EW)(function(){return n("Your site is securely connected to our servers and protected against malicious IP addresses.")}),L=(0,o.EW)(function(){return n("Status")}),R=(0,o.EW)(function(){return g.value?n("Connected"):n("Disconnected")}),C=(0,o.EW)(function(){return n("Blocked IPs")}),x=(0,o.EW)(function(){return n("Total count of Malicious IPs in the Blocklist.")}),E=(0,o.EW)(function(){return n("Sync schedule")}),j=(0,o.EW)(function(){return(0,c.h)().formatNumber(m.value.ips_count)}),P=(0,o.EW)(function(){return m.value.sync_schedule}),O=(0,o.EW)(function(){return g.value?"sui-tag sui-tag-green":"sui-tag sui-tag-brown"}),A=(0,o.EW)(function(){return"plugin"===y.value.managed_by?n("Defender Plugin"):n("WPMU DEV Hosting")}),T=(0,o.EW)(function(){return"plugin"===y.value.managed_by?n("Switch to Hosting"):n("Switch to Plugin")}),I=(0,o.EW)(function(){return defender.wpmudev_url+"#unlock-me-antibot"});function W(e,t){t.preventDefault(),m.value.frontend_mode!==e&&function(e){SUI.openModal("mode-confirm",e.target,void 0,!0,!0)}(t)}function M(){SUI.closeModal()}var D=function(e){return{"border-blue-normal":m.value.frontend_mode===e,"border-silver-light":m.value.frontend_mode!==e,"hover:border-silver-dark":m.value.frontend_mode!==e}},V=(0,o.EW)(function(){var e="basic"===m.value.frontend_mode?"Strict":"Basic",t=a(n("Are you sure you want to switch to %s Mode? This change will adjust how Defender blocks suspicious traffic."),[e]);return"basic"===m.value.frontend_mode?t+" "+n("Some services like SEO tools or uptime monitors may be affected."):t});return function(e,t){return(0,o.uX)(),(0,o.CE)("div",Ge,[(0,o.bF)(ke,{title:_.value,"show-stats-button":!0},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)(w.value),1),(0,o.Lk)("div",Qe,[(0,o.Lk)("div",Ne,[(0,o.bF)(U,{label:L.value,value:R.value,icon:"sui-icon-web-globe-world","value-class":O.value},null,8,["label","value","value-class"]),(0,o.bF)(U,{"info-tooltip":x.value,label:C.value,value:j.value,icon:"sui-icon-gdpr","value-class":"text-lg font-bold text-gray-500"},null,8,["info-tooltip","label","value"]),(0,o.bF)(U,{label:E.value,value:P.value,icon:"sui-icon-clock","value-class":"text-lg font-bold text-gray-500"},null,8,["label","value"])])]),(0,o.Lk)("div",qe,[(0,o.Lk)("h3",$e,(0,o.v_)((0,o.R1)(n)("AntiBot mode")),1),(0,o.Lk)("p",Ye,(0,o.v_)((0,o.R1)(n)("Choose how strictly Defender blocks suspicious traffic. Each mode offers a different balance of protection.")),1),(0,o.Lk)("div",ze,[(0,o.Lk)("div",Je,[(0,o.Lk)("div",{class:(0,o.C4)(["border border-solid rounded-lg cursor-pointer p-20px",D("basic")]),onClick:t[0]||(t[0]=function(e){return W("basic",e)})},[(0,o.Lk)("label",Ze,[(0,o.Lk)("input",{type:"radio",name:"unique-group-name",id:"mode-basic",value:"basic",checked:"basic"===(0,o.R1)(m).frontend_mode,"aria-labelledby":"label-mode-basic"},null,8,et),t[6]||(t[6]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",tt,[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Basic"))+" ",1),(0,o.Lk)("span",nt,(0,o.v_)((0,o.R1)(n)("Balanced protection")),1),(0,o.Lk)("span",ot,(0,o.v_)((0,o.R1)(n)("Get balanced, everyday protection that blocks harmful visitors while allowing safe bots, uptime monitors, SEO tools, and broken link checkers to ensure your website functions smoothly.")),1)])])],2)]),(0,o.Lk)("div",it,[(0,o.Lk)("div",{class:(0,o.C4)(["border border-solid rounded-lg cursor-pointer p-20px",D("strict")]),onClick:t[1]||(t[1]=function(e){return W("strict",e)})},[(0,o.Lk)("label",rt,[(0,o.Lk)("input",{type:"radio",name:"unique-group-name",id:"mode-strict",value:"strict",checked:"strict"===(0,o.R1)(m).frontend_mode,"aria-labelledby":"label-mode-strict"},null,8,at),t[7]||(t[7]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",lt,[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Strict"))+" ",1),(0,o.Lk)("span",st,(0,o.v_)((0,o.R1)(n)("Maximum protection")),1),(0,o.Lk)("span",ut,(0,o.v_)((0,o.R1)(n)("Applies a strong security filter that blocks even slight suspicious activity—aggressive SEO tools, scanners, broken link checkers—and defends against major threats like DDoS attacks.")),1)])])],2)])])]),"plugin"===(0,o.R1)(y).managed_by?((0,o.uX)(),(0,o.CE)("div",ct,[(0,o.Lk)("label",dt,[(0,o.Lk)("input",{type:"checkbox",checked:(0,o.R1)(h),id:"allow-self-unlock",onClick:t[2]||(t[2]=function(e){return t=(0,o.R1)(h),p.toggleAllowSelfUnlock(),void v.trackFeature({event:"def_unlock_me",data:{Action:t?"Disabled":"Enabled"}});var t}),"aria-labelledby":"allow-self-unlock-label"},null,8,pt),t[8]||(t[8]=(0,o.Lk)("span",{class:"sui-toggle-slider","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",ft,[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Allow site visitors to temporarily unlock themselves."))+" ",1),(0,o.Lk)("a",{href:I.value,target:"_blank",class:"underline"},(0,o.v_)((0,o.R1)(n)("Learn more")),9,vt)])])])):(0,o.Q3)("",!0)]}),_:1},8,["title"]),(0,o.bF)(Ke,{"managed-by":(0,o.R1)(y).managed_by},null,8,["managed-by"]),(0,o.Lk)("div",bt,[(0,o.Lk)("div",mt,[(0,o.Lk)("div",yt,[(0,o.R1)(u)?((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,o.Lk)("div",null,[(0,o.eW)((0,o.v_)((0,o.R1)(n)("AntiBot is managed by"))+" ",1),(0,o.Lk)("span",gt,(0,o.v_)(A.value),1)]),"1"===(0,o.R1)(s)?((0,o.uX)(),(0,o.Wv)(He.A,{key:0,action:"switch-managed-by",onClick:t[3]||(t[3]=function(e){d.switchManagedBy()}),variant:"ghost",icon:"sui-icon-update",label:T.value},null,8,["label"])):(0,o.Q3)("",!0)],64)):(0,o.Q3)("",!0)]),(0,o.Lk)("div",kt,[(0,o.bF)(He.A,{action:"deactivate-antibot",onClick:t[4]||(t[4]=function(e){return(0,o.R1)(d).deactivate()}),icon:"sui-icon-power-on-off",label:(0,o.R1)(n)("Deactivate")},null,8,["label"])])])]),(0,o.Lk)("div",ht,[(0,o.Lk)("div",_t,[(0,o.Lk)("div",wt,[(0,o.Lk)("div",Lt,[(0,o.Lk)("h3",Rt,(0,o.v_)((0,o.R1)(n)("Switch AntiBot Mode?")),1),(0,o.Lk)("button",{type:"button",class:"sui-button-icon sui-button-float--right",onClick:M},[t[9]||(t[9]=(0,o.Lk)("i",{class:"sui-icon-close sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",Ct,(0,o.v_)((0,o.R1)(n)("Close this dialog.")),1)]),(0,o.Lk)("p",xt,(0,o.v_)(V.value),1)]),(0,o.Lk)("div",St,[(0,o.Lk)("form",{method:"post",onSubmit:t[5]||(t[5]=(0,o.D$)(function(){var e;return(0,o.R1)(d).switchMode&&(e=(0,o.R1)(d)).switchMode.apply(e,arguments)},["prevent"]))},[(0,o.Lk)("button",{type:"button",class:"sui-button sui-button-ghost",onClick:M},(0,o.v_)((0,o.R1)(n)("Cancel")),1),(0,o.bF)(He.A,{type:"submit",action:"switch-mode",label:(0,o.R1)(n)("Proceed"),icon:"sui-icon-undo"},null,8,["label"])],32)])])])])])}}};function jt(e){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(e)}function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ot(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=jt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var At={key:0,id:"firewall_global_ip",class:"sui-box","data-tab":"global_ip"},Tt={class:"mx-20 sui-message mb-30px"},It=["src"],Wt={class:"sui-message-content"},Ft={class:"flex flex-wrap items-center justify-center gap-2"},Xt=["innerHTML"],Mt={key:0,class:"grid justify-center"},Dt={key:0,class:"sui-loading sui-icon-loader","aria-hidden":"true"},Vt={key:1},Ut={class:"grid gap-8 p-16 rounded-b bg-gray-97"},Bt={class:"feature-inner-wrap"},Kt={class:"mb-0"},Ht={class:"mt-0 mb-30px"},Gt={class:"grid grid-cols-1 gap-8 text-left md:grid-cols-2"},Qt=["innerHTML"],Nt={class:"sui-modal sui-modal-sm"},qt={role:"dialog",id:"disconnect-confirm",class:"sui-modal-content","aria-modal":"true","aria-labelledby":"modal-disconnect-confirm","aria-describedby":"modal-disconnect-confirm"},$t={class:"sui-box",role:"document"},Yt={class:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},zt={class:"sui-box-title sui-lg"},Jt={class:"sui-screen-reader-text"},Zt={class:"sui-description mt-15px mb-20px"},en=["innerHTML"],tn={class:"sui-box-footer sui-flatten sui-content-center"};const nn={__name:"global-ip",setup:function(e){var t=(0,l.k)(),n=k(),a=(0,u.r)(),s=(0,r.B)(),c=s.__,d=s.sprintf,p=(0,_.I)(),f=p.assetUrl,v=p.wpmuDevApiBaseUrl,b=(0,i.bP)(t),m=b.button_label,y=b.isSiteConnected,g=b.is_dash_installed,w=b.is_dash_activated,L=b.hub_connector_url,R=(0,i.bP)(n).misc,C=f("assets/img/global-ip-icon.png"),S=(0,o.EW)(function(){return!y.value||!R.value.frontend_is_enabled}),E=(0,o.EW)(function(){return!y.value||R.value.frontend_is_enabled?R.value.module_name:c("Activate")+" "+R.value.module_name}),j=(0,o.EW)(function(){return d(c("%s Features"),R.value.module_name)}),P=(0,o.EW)(function(){return y.value||g.value?c("By activating AntiBot, you unlock the following powerful features that can safeguard your site."):c("By signing up with WPMU DEV and activating AntiBot, you unlock powerful features designed to protect your site.")}),O=(0,o.EW)(function(){var e=y.value?c("Powered by threat data from a network of over 500,000+ sites, AntiBot blocks harmful IPs with twice-daily updates. Activate for instant protection."):c("Powered by threat data from a network of over 500,000+ sites, AntiBot blocks harmful IPs with twice-daily updates. Sign up to enable instant protection."),t=v("antibot-global-firewall-statistics");return"\n ".concat(e,'<br/>\n <a\n href="').concat(t,'"\n id="antibot_stats"\n class="sui-button sui-button-ghost ml-auto mt-10px"\n target="_blank"\n >\n <span class="sui-icon-graph-bar" aria-hidden="true"></span>\n ').concat(c("View Antibot Stats"),"\n </a>\n ")}),A=(0,o.EW)(function(){var e=defender.wpmudev_url+"#antibot-global-firewall";return d(c("Learn more about %1$sAntiBot Global Firewall%2$s."),'<a class="underline" href="'.concat(e,'">'),"</a>")}),T=(0,o.EW)(function(){return g.value?"sui-icon-wpmudev-logo":"sui-icon-plug-connected"}),I=(0,o.EW)(function(){return a.isLoading("disconnect-site")}),W=(0,o.EW)(function(){return d(c("Note that disconnecting your site from %1$sWPMU DEV%2$s will disable other services that rely on this connection."),"<strong>","</strong>")}),F=(0,o.EW)(function(){var e=[{icon:"assets/img/security-icon.png",heading:c("Intelligent & Advanced IP Blocklist"),description:c("Protect your site with a dynamic IP blocklist updated using insights from 500,000+ sites.")},{icon:"assets/img/cog-icon.png",heading:c("Automated Firewall Protection"),description:c("Enable automated protection against harmful traffic with just a click.")},{icon:"assets/img/clock-icon.png",heading:c("Regularly Reviewed IP Database"),description:c("Access a meticulously reviewed IP blocklist of 200,000+ harmful addresses updated every 7 days.")}],t=g.value?{icon:"assets/img/archive-icon.png",heading:c("Access to other powerful features"),description:c("Manage your Block/Allowlist, get access to Broken Link Checker, and other WPMUDEV site management tools.")}:{icon:"assets/img/cloud-icon.png",heading:c("Millions of IPs Checked Daily"),description:c("Daily checks on millions of IPs ensure your site stays secure with updated threat data.")};return[].concat(e,[t])});function X(){var e=R.value.module_slug,n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(n),!0).forEach(function(t){Ot(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},L.value);w.value||(n[e]="".concat(n.default,"&page=wdf-ip-lockout&view=").concat(e,"&module_name=").concat(R.value.module_name,"&module_slug=").concat(e),t.updateConnectorUrl(n)),t.initHubConnectionFlow({page:e,module_slug:e,is_summary:!1})}function M(){n.activate()}function D(){n.disconnectSite()}function V(e){SUI.openModal("disconnect-confirm",e.target,void 0,!0,!0)}function U(){SUI.closeModal()}return(0,o.KC)(function(){n.init(window.antibot)}),function(e,t){return S.value?((0,o.uX)(),(0,o.CE)("div",At,[(0,o.Lk)("div",Tt,[(0,o.Lk)("img",{src:(0,o.R1)(C),alt:"Global IP Detection icon","aria-hidden":"true",class:"sui-image"},null,8,It),(0,o.Lk)("div",Wt,[(0,o.Lk)("h2",Ft,(0,o.v_)(E.value),1),(0,o.Lk)("p",{innerHTML:O.value},null,8,Xt),(0,o.Lk)("div",null,[(0,o.R1)(y)?((0,o.uX)(),(0,o.CE)("div",Mt,[(0,o.bF)(He.A,{action:"activate-antibot",variant:"blue",onClick:M,label:(0,o.R1)(c)("Activate")},null,8,["label"]),(0,o.R1)(w)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("strong",{key:0,class:"cursor-pointer mt-30px text-12px",onClick:(0,o.D$)(V,["prevent"])},[I.value?((0,o.uX)(),(0,o.CE)("i",Dt)):((0,o.uX)(),(0,o.CE)("span",Vt,(0,o.v_)((0,o.R1)(c)("DISCONNECT SITE")),1))]))])):((0,o.uX)(),(0,o.Wv)(He.A,{key:1,variant:"blue",action:"init-hub-connection",icon:T.value,onClick:X,label:(0,o.R1)(m)},null,8,["icon","label"]))])])]),(0,o.Lk)("div",Ut,[(0,o.Lk)("div",Bt,[(0,o.Lk)("div",null,[(0,o.Lk)("h3",Kt,(0,o.v_)(j.value),1),(0,o.Lk)("p",Ht,(0,o.v_)(P.value),1)]),(0,o.Lk)("div",Gt,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(F.value,function(e,t){return(0,o.uX)(),(0,o.Wv)(x,{key:"feature-".concat(t),feature:e},null,8,["feature"])}),128))]),(0,o.Lk)("p",{innerHTML:A.value},null,8,Qt)])]),(0,o.Lk)("div",Nt,[(0,o.Lk)("div",qt,[(0,o.Lk)("div",$t,[(0,o.Lk)("div",Yt,[(0,o.Lk)("h3",zt,(0,o.v_)((0,o.R1)(c)("Disconnect Site?")),1),(0,o.Lk)("button",{type:"button",class:"sui-button-icon sui-button-float--right",onClick:U},[t[0]||(t[0]=(0,o.Lk)("i",{class:"sui-icon-close sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",Jt,(0,o.v_)((0,o.R1)(c)("Close this dialog.")),1)]),(0,o.Lk)("p",Zt,(0,o.v_)((0,o.R1)(c)("Do you want to disconnect your site from WPMU DEV?")),1),(0,o.bF)(h.A,{"icon-type":"sui-icon-info","notice-type":"sui-notice-yellow"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",{class:"text-left",style:{color:"#888888"},innerHTML:W.value},null,8,en)]}),_:1})]),(0,o.Lk)("div",tn,[(0,o.Lk)("button",{type:"button",class:"sui-button sui-button-ghost",onClick:U},(0,o.v_)((0,o.R1)(c)("Cancel")),1),(0,o.bF)(He.A,{variant:"blue",action:"disconnect-site",icon:"sui-icon-plug-disconnected",onClick:D},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(c)("Disconnect site")),1)]}),_:1})])])])])])):((0,o.uX)(),(0,o.Wv)(Et,{key:1}))}}};var on=n(7786),rn=n(2543);function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function ln(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return sn(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(sn(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,sn(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,sn(d,"constructor",u),sn(u,"constructor",s),s.displayName="GeneratorFunction",sn(u,i,"GeneratorFunction"),sn(d),sn(d,i,"Generator"),sn(d,o,function(){return this}),sn(d,"toString",function(){return"[object Generator]"}),(ln=function(){return{w:r,m:p}})()}function sn(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}sn=function(e,t,n,o){function r(t,n){sn(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},sn(e,t,n,o)}function un(e){return function(e){if(Array.isArray(e))return cn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function dn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=an(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=an(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==an(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function fn(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){pn(r,o,i,a,l,"next",e)}function l(e){pn(r,o,i,a,l,"throw",e)}a(void 0)})}}var vn=(0,i.nY)("blacklist",function(){var e=(0,s.q)().post,t=(0,r.B)().__,n=(0,u.r)(),i=(0,on.rXt)("bulk_ips",[]),a=(0,o.KR)({}),l=(0,o.KR)({}),c=(0,o.KR)({}),d=(0,o.KR)({}),p=(0,o.KR)(""),f=(0,o.KR)({count:0,ips:[],is_fetching:!0,search:"",chunks:[],paged:1,filtered_count:0}),v=(0,o.KR)({id:!1,name:null}),b=(0,o.KR)(20),m=(0,o.KR)("unban"),y=(0,o.KR)(!0),g=(0,o.KR)(!0),k=(0,o.KR)(!1),h=(0,o.KR)(""),_=(0,o.KR)(!1),w=(0,o.KR)({regions:[],continent_key:"",selected_region_keys:[]}),L=(0,o.KR)({intention:"",location_type:""});function R(e){a.value=e.model,l.value=e.misc,c.value=e.routes,d.value=e.nonces,w.value.continent_key||(w.value.continent_key="all"),M()}function C(){v.value={id:!1,name:null}}function x(e){w.value.regions=e}function S(){return(S=fn(ln().m(function t(){return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n.withLoading("settings",function(){return e(c.value.save_settings,d.value.save_settings,a.value)});case 1:R(t.v);case 2:return t.a(2)}},t)}))).apply(this,arguments)}function E(){return(E=fn(ln().m(function t(){var o;return ln().w(function(t){for(;;)switch(t.n){case 0:return h.value="",t.n=1,n.withLoading("download-geodb",function(){return e(c.value.download_geodb,d.value.download_geodb,{license_key:p.value})});case 1:void 0!==(o=t.v).is_geodb_downloaded?location.reload():void 0!==o.invalid_text&&(h.value=o.invalid_text);case 2:return t.a(2)}},t)}))).apply(this,arguments)}function j(){return(j=fn(ln().m(function t(){return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n.withLoading("delete-geodb",function(){return e(c.value.delete_geodb,d.value.delete_geodb)});case 1:setTimeout(function(){location.reload()},1e3);case 2:return t.a(2)}},t)}))).apply(this,arguments)}function P(){return(P=fn(ln().m(function t(){var n;return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(c.value.get_listed_ips,d.value.get_listed_ips);case 1:n=t.v,a.value.ip_blacklist=n.ip_blacklist,a.value.ip_whitelist=n.ip_whitelist;case 2:return t.a(2)}},t)}))).apply(this,arguments)}function O(){return A.apply(this,arguments)}function A(){return(A=fn(ln().m(function t(){var n;return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(c.value.query_locked_ips,d.value.query_locked_ips);case 1:n=t.v,f.value.ips=n.ips,f.value.chunks=(0,rn.chunk)(n.ips,b.value),f.value.count=n.ips.length,f.value.filtered_count=n.ips.length,f.value.is_fetching=!1;case 2:return t.a(2)}},t)}))).apply(this,arguments)}function T(){return(T=fn(ln().m(function t(o){return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n.withLoading("ip-action-".concat(o.ip),fn(ln().m(function t(){var n;return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(c.value.ip_action,d.value.ip_action,o);case 1:(n=(0,rn.find)(f.value.ips,["ip",o.ip]))&&(n.status="unban"===o.behavior?"normal":"blocked");case 2:return t.a(2)}},t)})));case 1:return t.a(2)}},t)}))).apply(this,arguments)}function I(){return W.apply(this,arguments)}function W(){return(W=fn(ln().m(function t(){var o,r;return ln().w(function(t){for(;;)switch(t.n){case 0:return g.value=!1,y.value&&(i.value=JSON.stringify(f.value.ips)),o={behavior:m.value,ips:"ban"===m.value?i.value:""},t.n=1,n.withLoading("bulk-ip-action",function(){return e(c.value.bulk_ip_action,d.value.bulk_ip_action,o)});case 1:if("continue"!==(r=t.v).status||!r.ips){t.n=2;break}return i.value=r.ips,y.value=!1,t.a(2,I());case 2:"done"!==r.status&&"error"!==r.status||"ban"!==o.behavior||(i.value=[],y.value=!0),f.value.ips.forEach(function(e){e.status="unban"===o.behavior?"normal":"blocked"}),m.value="unban"===m.value?"ban":"unban";case 3:return t.a(2)}},t)}))).apply(this,arguments)}function F(){return(F=fn(ln().m(function e(t){return ln().w(function(e){for(;;)switch(e.n){case 0:if(f.value.paged=t,!g.value){e.n=1;break}return e.n=1,O();case 1:return e.a(2)}},e)}))).apply(this,arguments)}function X(){return(X=fn(ln().m(function t(){return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,n.withLoading("import-ip",fn(ln().m(function t(){return ln().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(c.value.import_ips,d.value.import_ips,{id:v.value.id});case 1:C();case 2:return t.a(2)}},t)})));case 1:return t.a(2)}},t)}))).apply(this,arguments)}function M(){var e,n,o=[],i=null===(e=w.value)||void 0===e?void 0:e.continent_key;if(null!==(n=l.value)&&void 0!==n&&n.countries_with_continents_list&&i){var r="all"===i?l.value.countries_with_continents_list:dn({},i,l.value.countries_with_continents_list[i]);for(var a in r){var s=r[a];if(s&&s.area)for(var u in s.area)s.area[u]&&s.area[u].name&&o.push({code:u,name:s.area[u].name})}o.sort(function(e,t){return e.name.localeCompare(t.name)}),"all"===i&&o.unshift({code:"all",name:t("All regions")}),x(o)}else x(o)}"undefined"!=typeof window&&window.blacklist&&R(window.blacklist);var D=(0,o.EW)(function(){return n.isLoading("download-geodb")}),V=(0,o.EW)(function(){return"".concat(L.value.intention,"-").concat(L.value.location_type)}),U=(0,o.EW)(function(){return L.value.intention}),B=(0,o.EW)(function(){return L.value.location_type}),K=(0,o.EW)(function(){return w.value.continent_key}),H=(0,o.EW)(function(){return w.value.selected_region_keys}),G=(0,o.EW)(function(){return"".concat(ajaxurl,"?action=wp_defender/v1/hub/&route=").concat(c.value.export_ips,"&_def_nonce=").concat(d.value.export_ips)}),Q=(0,o.EW)(function(){return f.value.filtered_count}),N=(0,o.EW)(function(){return f.value.chunks.length}),q=(0,o.EW)(function(){return 0===N.value&&0===Q.value}),$=(0,o.EW)(function(){return N.value>0&&Q.value>0}),Y=(0,o.EW)(function(){var e=[],n=l.value.countries_with_continents_list;for(var o in n)e.push({code:o,name:n[o].name});return e.sort(function(e,t){return e.name.localeCompare(t.name)}),e.unshift({code:"all",name:t("All continents")}),e}),z=(0,o.EW)(function(){return w.value.regions}),J=(0,o.EW)(function(){return w.value.selected_region_keys.length}),Z=(0,o.EW)(function(){return 0===J.value}),ee=(0,o.EW)(function(){var e=l.value.countries_with_continents_list,t=H.value,n=[];if(t.includes("all"))return["all"];for(var o in e){var i=e[o].area;for(var r in i)if(t.includes(r)){var a=i[r].countries;for(var s in a)n.push({code:s,name:a[s]})}}return n.sort(function(e,t){return e.name.localeCompare(t.name)}).map(function(e){return e.code})}),te=(0,o.EW)(function(){if(f.value.search.length>0){!0===_.value&&(f.value.paged=1);var e=f.value.search,t=f.value.ips.filter(function(t){return t.ip.indexOf(e)>-1});if(f.value.filtered_count=t.length,0===t.length)return f.value.chunks=[],[];if(!(t.length>b.value))return f.value.chunks=[t],t;f.value.chunks=(0,rn.chunk)(t,b.value)}else f.value.filtered_count=f.value.count,f.value.chunks=(0,rn.chunk)(f.value.ips,b.value);return f.value.chunks[f.value.paged-1]}),ne=(0,o.EW)(function(){return f.value.paged});function oe(){w.value={regions:[],continent_key:"",selected_region_keys:[]},SUI.closeModal()}return{model:a,misc:l,routes:c,nonces:d,license_key:p,active_lockouts:f,ip_import:v,per_page:b,ip_bulk_action:m,should_update_local_ips:y,should_fetch_ips:g,on_saving:k,errorText:h,is_searching:_,quick_data:w,handler:L,savedState:D,init:R,clearIpImport:C,setRegions:x,updateRegionKeys:function(e){w.value.selected_region_keys=e},saveSettings:function(){return S.apply(this,arguments)},downloadGeoDB:function(){return E.apply(this,arguments)},deleteGeoDB:function(){return j.apply(this,arguments)},fetchListedIps:function(){return P.apply(this,arguments)},fetchLockedIps:O,ipAction:function(e){return T.apply(this,arguments)},bulkIpAction:I,changePage:function(e){return F.apply(this,arguments)},importIp:function(){return X.apply(this,arguments)},getRegions:M,setSpotlightFor:function(e,t){L.value.intention=e,L.value.location_type=t},getCurrentHandler:V,getCurrentIntention:U,getCurrentLocationType:B,getContinentKey:K,getRegionKeys:H,exportUrl:G,getActiveLockouts:Q,totalActiveLockouts:N,notFoundLockouts:q,existLockouts:$,getContinentList:Y,getRegionList:z,totalSelectedRegions:J,IsEmptyRegions:Z,extractCountriesFromRegions:ee,filteredLockedIps:te,getPaged:ne,finalQuickAction:function(){var e=B.value,t=U.value,n=ee.value,o=a.value;"blocklist"===e?o.country_blacklist="add"===t?un(new Set([].concat(un(o.country_blacklist),un(n)))):n.includes("all")?[]:o.country_blacklist.filter(function(e){return!n.includes(e)}):o.country_whitelist="add"===t?un(new Set([].concat(un(o.country_whitelist),un(n)))):n.includes("all")?[]:o.country_whitelist.filter(function(e){return!n.includes(e)}),oe()},closeModalQuickData:oe,setContinentKey:function(e){w.value.continent_key=e,w.value.selected_region_keys=[],M()},freeSpotLight:function(){L.value.intention="",L.value.location_type=""}}}),bn=n(7545),mn={id:"hub-ip-list"},yn={key:0,class:"sui-accordion"},gn={class:"sui-accordion-item sui-accordion-item--disabled"},kn={class:"sui-accordion-item-header"},hn={class:"items-start justify-between sui-accordion-item-title"},_n={class:"sui-toggle",for:"enable-hub-ip-list-sync"},wn={id:"enable-hub-ip-list-sync",class:"inline-flex items-center sui-toggle-label gap-10px"},Ln={class:"text-white sui-tag sui-tag-sm bg-blue-upsell-link hover:bg-blue-upsell-link-hover"},Rn={id:"enable-hub-ip-list-sync-description",class:"ml-0 sui-description mt-10px"},Cn={class:"ml-1"},xn={key:1,class:"sui-accordion"},Sn={class:"sui-accordion-item-header"},En={class:"sui-accordion-item-title"},jn=["data-tooltip"],Pn={id:"enable-hub-ip-list-sync",class:"sui-toggle-label"},On={class:"sui-accordion-item-body"},An={class:"sui-box"},Tn={class:"sui-box-body"},In=["innerHTML"],Wn=["innerHTML"],Fn={class:"items-baseline justify-between sui-box-footer"},Xn={class:"sui-description float-r"};const Mn={__name:"hub-ip-list",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,s=(0,S.p)().isWhitelabelDisabled,u=F(),c=(0,l.k)(),d=(0,i.bP)(u),p=d.model,f=d.hub,v=(0,i.bP)(c).isSiteConnected,b=(0,o.EW)(function(){return a(n("Go to the %sHub settings%s to edit the global IPs."),'<a target="_blank" href="'+f.value.global_ip_setting_url+'">',"</a>")}),m=(0,o.EW)(function(){return n("Sync with the Custom IPs Block/Allow list")}),y=(0,o.EW)(function(){return n("Manage allowlists and blocklists centrally from the Hub, eliminating the need to manage them individually for each site.")}),g=function(){c.initHubConnectionFlow({page:"blocklist"})};return(0,o.sV)(function(){p.value.enabled&&!f.value.global_ip_list.is_synced_before&&u.refreshGlobalIP()}),function(e,t){return(0,o.uX)(),(0,o.CE)("div",mn,[(0,o.R1)(v)?((0,o.uX)(),(0,o.CE)("div",xn,[(0,o.Lk)("div",{class:(0,o.C4)([{"sui-accordion-item--disabled":!(0,o.R1)(p).enabled,"sui-accordion-item--open":(0,o.R1)(p).enabled},"sui-accordion-item"])},[(0,o.Lk)("div",Sn,[(0,o.Lk)("div",En,[(0,o.Lk)("label",{class:(0,o.C4)(["sui-toggle",{"sui-tooltip":!(0,o.R1)(p).enabled}]),"data-tooltip":(0,o.R1)(n)("Enable this option to sync the Custom IPs Allow/Block list with this site."),for:"enable-hub-ip-list-sync"},[(0,o.bo)((0,o.Lk)("input",{id:"enable-hub-ip-list-sync","onUpdate:modelValue":t[1]||(t[1]=function(e){return(0,o.R1)(p).enabled=e}),"aria-describedby":"enable-hub-ip-list-sync","aria-labelledby":"enable-hub-ip-list-sync",type:"checkbox",onClick:t[2]||(t[2]=function(e){return(0,o.R1)(u).toggle((0,o.R1)(p).enabled)})},null,512),[[o.lH,(0,o.R1)(p).enabled]]),t[6]||(t[6]=(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-toggle-slider"},null,-1)),(0,o.Lk)("span",Pn,(0,o.v_)(m.value),1)],10,jn)]),t[7]||(t[7]=(0,o.Lk)("div",null,[(0,o.Lk)("button",{type:"button","aria-label":"open-item",class:"sui-button-icon sui-accordion-open-indicator"},[(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-icon-chevron-down"})])],-1))]),(0,o.Lk)("div",On,[(0,o.Lk)("div",An,[(0,o.Lk)("div",Tn,[(0,o.Lk)("p",{class:"sui-description",innerHTML:y.value},null,8,In),(0,o.R1)(s)?((0,o.uX)(),(0,o.CE)("p",{key:0,class:"sui-description no-margin-bottom",innerHTML:b.value},null,8,Wn)):(0,o.Q3)("",!0)]),(0,o.Lk)("div",Fn,[(0,o.bF)(He.A,{action:"refresh-global-ip",onClick:t[3]||(t[3]=function(e){return(0,o.R1)(u).refreshGlobalIP()}),icon:"sui-icon-refresh",label:(0,o.R1)(n)("Sync IPs")},null,8,["label"]),(0,o.Lk)("span",Xn,(0,o.v_)((0,o.R1)(n)("Last synced:"))+" "+(0,o.v_)((0,o.R1)(f).global_ip_list.last_synced),1)])])])],2)])):((0,o.uX)(),(0,o.CE)("div",yn,[(0,o.Lk)("div",gn,[(0,o.Lk)("div",kn,[(0,o.Lk)("div",hn,[(0,o.Lk)("label",_n,[(0,o.Lk)("input",{id:"enable-hub-ip-list-sync","aria-describedby":"enable-hub-ip-list-sync-description","aria-labelledby":"enable-hub-ip-list-sync-label",onClick:t[0]||(t[0]=(0,o.D$)(function(){},["prevent"])),type:"checkbox"}),t[4]||(t[4]=(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-toggle-slider"},null,-1)),(0,o.Lk)("span",wn,[(0,o.eW)((0,o.v_)(m.value)+" ",1),(0,o.Lk)("span",Ln,(0,o.v_)((0,o.R1)(n)("Connect")),1)]),(0,o.Lk)("span",Rn,[(0,o.Lk)("span",{class:"font-medium text-blue-upsell-link",onClick:(0,o.D$)(g,["prevent"])},(0,o.v_)((0,o.R1)(n)("Connect site")),1),(0,o.Lk)("span",Cn,(0,o.v_)((0,o.R1)(n)("to Sync IP Allow/Blocklists from your Hub account to this site.")),1)])]),t[5]||(t[5]=(0,o.Lk)("div",null,[(0,o.Lk)("span",{"aria-hidden":"true",class:"text-xs sui-icon-chevron-down"})],-1))])])])]))])}}};var Dn=n(9359),Vn={insert:"head",singleton:!1};be()(Dn.A,Vn);Dn.A.locals;const Un=(0,ge.A)(Mn,[["__scopeId","data-v-4133dfb3"]]);var Bn=n(5658),Kn={class:"sui-modal sui-modal-md",id:"ip-lockouts-modal"},Hn={role:"dialog",id:"ips-modal",class:"sui-modal-content locked-ips-dialog","aria-modal":"true","aria-labelledby":"ips-dialog-title","aria-describedby":"ips-dialog-desc"},Gn={class:"sui-box",role:"document"},Qn={class:"sui-box-header sui-flatten padding-bottom-30 sui-content-center sui-spacing-top--60"},Nn={class:"modal-close-button sui-button-icon sui-button-float--right","data-modal-close":""},qn={class:"sui-screen-reader-text"},$n={id:"ips-dialog-title",class:"sui-box-title sui-lg"},Yn={id:"ips-dialog-desc",class:"sui-description"},zn={class:"ul-ips"},Jn={class:"sui-with-button sui-with-button-icon"},Zn=["placeholder"],eo={key:0,class:"sui-box-selector"},to={class:"sui-screen-reader-text"},no={key:1,class:"sui-box-selector-selected"},oo={class:"sui-screen-reader-text"},io={key:0,class:"sui-pagination-wrap"},ro={class:"sui-tag"},ao={key:1},lo=["innerHTML"],so={key:1,class:"text-center no-padding-top margin-bottom-20"},uo=["innerHTML"],co={key:2,class:"flex justify-end mt-5"},po=["innerHTML"];const fo={__name:"locked-ips-dialog",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,l=t.xss,s=(0,S.p)().maybeHideBranding,u=vn(),c=(0,i.bP)(u),d=c.active_lockouts,p=c.is_searching,f=c.filteredLockedIps,v=c.notFoundLockouts,b=c.existLockouts,m=c.getActiveLockouts,y=c.totalActiveLockouts,g=c.ip_bulk_action,k=(0,o.EW)(function(){return a(n('Sorry, we couldn\'t find any IP Address matching "<strong>%s</strong>"'),l(d.value.search))}),h=(0,o.EW)(function(){return'<i class="sui-icon-chevron-right" aria-hidden="true"></i>'}),_=(0,o.EW)(function(){return'<i class="sui-icon-chevron-left" aria-hidden="true"></i>'}),w=(0,o.EW)(function(){return"ban"===g.value?'<i class="sui-icon-undo" aria-hidden="true"></i> '+n("Undo"):"unban"===g.value?'<i class="sui-icon-lock" aria-hidden="true"></i> '+n("Unblock All"):""}),L=function(e){u.changePage(e);var t=document.getElementById("ip-lockouts-modal");setTimeout(function(){t.scrollTop=t.scrollHeight},10)};return(0,o.sV)(function(){jQuery("#search-lockouts").on("keydown",function(){p.value=!0}).on("keyup",function(){p.value=!1})}),function(e,t){return(0,o.uX)(),(0,o.CE)("div",Kn,[(0,o.Lk)("div",Hn,[(0,o.Lk)("div",Gn,[(0,o.Lk)("div",Qn,[(0,o.Lk)("button",Nn,[t[4]||(t[4]=(0,o.Lk)("i",{class:"sui-icon-close sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",qn,(0,o.v_)((0,o.R1)(n)("Close this dialog.")),1)]),(0,o.Lk)("h3",$n,(0,o.v_)((0,o.R1)(n)("Temporary IP Block List")),1),(0,o.Lk)("p",Yn,(0,o.v_)((0,o.R1)(n)("Here's a list of IP addresses that are currently temporarily blocked for bad behavior. Select the IPs you want to unblock below.")),1)]),(0,o.Lk)("div",{class:(0,o.C4)(["sui-box-selectors sui-box-selectors-col-1 no-margin-top",{"no-padding-bottom":(0,o.R1)(v)&&!(0,o.R1)(s)}])},[(0,o.Lk)("ul",zn,[(0,o.Lk)("li",null,[(0,o.Lk)("div",Jn,[(0,o.bo)((0,o.Lk)("input",{type:"text",class:"sui-form-control","onUpdate:modelValue":t[0]||(t[0]=function(e){return(0,o.R1)(d).search=e}),placeholder:(0,o.R1)(n)("Type IP Address"),id:"search-lockouts"},null,8,Zn),[[o.Jo,(0,o.R1)(d).search]]),t[5]||(t[5]=(0,o.Lk)("button",{type:"button",class:"sui-button-icon"},[(0,o.Lk)("i",{class:"sui-icon-magnifying-glass-search","aria-hidden":"true"})],-1))])]),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)((0,o.R1)(f),function(e,i){return(0,o.uX)(),(0,o.CE)("li",{key:i},["blocked"===e.status?((0,o.uX)(),(0,o.CE)("label",eo,[(0,o.Lk)("span",null,[t[6]||(t[6]=(0,o.Lk)("i",{class:"sui-icon-lock","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)(e.ip)+" ",1),(0,o.bF)((0,o.R1)(He.A),{onClick:function(t){return(0,o.R1)(u).ipAction({ip:e.ip,behavior:"unban"})},"data-tooltip":(0,o.R1)(n)("Unblock"),"custom-class":"sui-tooltip","only-icon":"",action:"ip-action",icon:"sui-icon-unlock"},{default:(0,o.k6)(function(){return[(0,o.Lk)("span",to,(0,o.v_)((0,o.R1)(n)("Unlock")),1)]}),_:2},1032,["onClick","data-tooltip"])])])):((0,o.uX)(),(0,o.CE)("label",no,[(0,o.Lk)("span",null,[t[7]||(t[7]=(0,o.Lk)("i",{class:"sui-icon-unlock","aria-hidden":"true"},null,-1)),t[8]||(t[8]=(0,o.eW)(" IP ",-1)),(0,o.Lk)("strong",null,(0,o.v_)(e.ip),1),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(n)("is unblocked"))+" ",1),(0,o.bF)((0,o.R1)(He.A),{onClick:function(t){return(0,o.R1)(u).ipAction({ip:e.ip,behavior:"ban"})},"data-tooltip":(0,o.R1)(n)("Undo"),"custom-class":"sui-tooltip","only-icon":"",action:"ip-action-".concat(e.ip),icon:"sui-icon-undo"},{default:(0,o.k6)(function(){return[(0,o.Lk)("span",oo,(0,o.v_)((0,o.R1)(n)("Undo")),1)]}),_:2},1032,["onClick","data-tooltip","action"])])]))])}),128))]),(0,o.R1)(b)?((0,o.uX)(),(0,o.CE)("div",io,[(0,o.Lk)("span",ro,(0,o.v_)((0,o.R1)(m))+" "+(0,o.v_)((0,o.R1)(n)("results")),1),(0,o.R1)(y)>1?((0,o.uX)(),(0,o.Wv)((0,o.R1)(Bn.A),{key:0,"page-count":(0,o.R1)(y),"click-handler":L,"prev-text":_.value,"next-text":h.value,modelValue:(0,o.R1)(d).paged,"onUpdate:modelValue":t[1]||(t[1]=function(e){return(0,o.R1)(d).paged=e}),"container-class":"sui-pagination"},null,8,["page-count","prev-text","next-text","modelValue"])):(0,o.Q3)("",!0),1===(0,o.R1)(y)?((0,o.uX)(),(0,o.CE)("div",ao,[(0,o.bF)((0,o.R1)(He.A),{variant:"ghost",action:"bulk-ip-action",onClick:t[2]||(t[2]=function(e){return(0,o.R1)(u).bulkIpAction()})},{default:(0,o.k6)(function(){return[(0,o.Lk)("span",{innerHTML:w.value},null,8,lo)]}),_:1})])):(0,o.Q3)("",!0)])):((0,o.uX)(),(0,o.CE)("div",so,[(0,o.Lk)("p",{innerHTML:k.value,style:{marginTop:"20px"}},null,8,uo)])),(0,o.R1)(y)>1?((0,o.uX)(),(0,o.CE)("div",co,[(0,o.bF)((0,o.R1)(He.A),{variant:"ghost",action:"bulk-ip-action",onClick:t[3]||(t[3]=function(e){return(0,o.R1)(u).bulkIpAction()})},{default:(0,o.k6)(function(){return[(0,o.Lk)("span",{innerHTML:w.value},null,8,po)]}),_:1})])):(0,o.Q3)("",!0)],2)])])])}}};var vo=n(4438),bo={class:"sui-modal sui-modal-sm"},mo={role:"dialog",id:"modal-active",class:"sui-modal-content","aria-modal":"true","aria-describedby":"modal-active-notification"},yo={class:"sui-box"},go={class:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},ko={class:"sui-screen-reader-text"},ho=["innerHTML"],_o=["innerHTML"],wo={class:"sui-box-body no-padding-bottom quick-data-wrapper"},Lo={class:"sui-box-footer sui-flatten sui-content-right margin-top-30"};const Ro={__name:"quick-data",setup:function(e){var t=(0,r.B)().__,n=vn(),a=(0,i.bP)(n).quick_data,l=(0,o.EW)(function(){return n.getContinentList}),s=(0,o.EW)(function(){return n.IsEmptyRegions}),u=(0,o.EW)(function(){var e="add"===n.getCurrentIntention,o="allowlist"===n.getCurrentLocationType;return t(e?o?"Quick add to allowlist":"Quick add to blocklist":o?"Quick remove from allowlist":"Quick remove from blocklist")}),c=(0,o.EW)(function(){return"add"===n.getCurrentIntention?t("Quickly add all the nations inside a continent or region."):t("Quickly remove all the nations inside a continent or region.")}),d=(0,o.EW)(function(){var e="add"===n.getCurrentIntention,o="allowlist"===n.getCurrentLocationType;return t(e?o?"Add to allowlist":"Add to blocklist":o?"Remove from allowlist":"Remove from blocklist")});function p(){n.finalQuickAction()}function f(){n.closeModalQuickData()}return(0,o.wB)(function(){return a.value.continent_key},function(){a.value.selected_region_keys=[],n.getRegions()}),function(e,n){return(0,o.uX)(),(0,o.CE)("div",bo,[(0,o.Lk)("div",mo,[(0,o.Lk)("div",yo,[(0,o.Lk)("div",go,[(0,o.Lk)("button",{type:"button",class:"sui-button-icon sui-button-float--right",onClick:f},[n[2]||(n[2]=(0,o.Lk)("i",{class:"sui-icon-close sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",ko,(0,o.v_)((0,o.R1)(t)("Close this dialog.")),1)]),(0,o.Lk)("h3",{class:"sui-box-title sui-lg margin-bottom-10",innerHTML:u.value},null,8,ho),(0,o.Lk)("p",{class:"sui-description",id:"modal-active-notification",innerHTML:c.value},null,8,_o)]),(0,o.Lk)("div",wo,[(0,o.bF)(vo.A,{label:(0,o.R1)(t)("Continent"),options:l.value.map(function(e){return{value:e.code,label:e.name}}),id:"continent-selector",placeholder:(0,o.R1)(t)("Select continent"),searchable:!1,modelValue:(0,o.R1)(a).continent_key,"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.R1)(a).continent_key=e})},null,8,["label","options","placeholder","modelValue"]),(0,o.bF)(vo.A,{label:(0,o.R1)(t)("Region"),options:(0,o.R1)(a).regions.map(function(e){return{value:e.code,label:e.name}}),id:"region-selector",placeholder:(0,o.R1)(t)("Select region"),multiple:"",modelValue:(0,o.R1)(a).selected_region_keys,"onUpdate:modelValue":n[1]||(n[1]=function(e){return(0,o.R1)(a).selected_region_keys=e}),icon:"web-globe-world"},null,8,["label","options","placeholder","modelValue"])]),(0,o.Lk)("div",Lo,[(0,o.bF)(He.A,{onClick:p,label:d.value,disabled:s.value},null,8,["label","disabled"])])])])])}}},Co=Ro;var xo=n(8214),So=n(9409);function Eo(e){return Eo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eo(e)}var jo={class:"mb-10px"},Po={key:0,class:"sui-label"},Oo={key:0,class:"sui-upload-button",type:"button"},Ao={key:1,class:"sui-upload-file ml-0"},To=["aria-label"],Io={key:1,class:"sui-description"};const Wo={__name:"sui-file-upload",props:{modelValue:{type:[String,Object],default:""},label:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,i=So.A,a=(0,r.B)().__,l=e,s=n,u=(0,on.hRP)(l,"modelValue",s),c=(0,o.KR)(""),d=(0,o.KR)(""),p=(0,o.EW)(function(){return"object"===Eo(u.value)&&null!==u.value?u.value.id||u.value.name:""!==u.value}),f=function(){d.value="",c.value="","object"===Eo(u.value)&&null!==u.value?u.value={id:!1,name:null}:u.value=""},v=function(e){e&&e.valid?("object"===Eo(u.value)&&null!==u.value?u.value={id:e.id,name:e.filename}:u.value=e.url,d.value=e.filename||e.url.split("/").pop(),c.value=""):e&&!e.valid&&(c.value=a("Invalid file type."))},b=(0,o.EW)(function(){return{type:["text"],allowedTypes:[],title:a("Choose a file"),callback:v}}),m=(0,o.EW)(function(){return d.value?d.value:"object"===Eo(u.value)&&null!==u.value?u.value.name||"":"string"==typeof u.value&&u.value?u.value.split("/").pop():""});return function(t,n){return(0,o.uX)(),(0,o.CE)("div",jo,[e.label?((0,o.uX)(),(0,o.CE)("label",Po,(0,o.v_)(e.label),1)):(0,o.Q3)("",!0),(0,o.Lk)("div",{class:(0,o.C4)(["sui-upload sui-file-upload sui-file-browser",{"sui-has_file":p.value}])},[p.value?(0,o.Q3)("",!0):(0,o.bo)(((0,o.uX)(),(0,o.CE)("button",Oo,[n[0]||(n[0]=(0,o.Lk)("span",{class:"sui-icon-upload-cloud","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(a)("Upload file")),1)])),[[(0,o.R1)(i),b.value]]),p.value?((0,o.uX)(),(0,o.CE)("div",Ao,[(0,o.Lk)("span",null,(0,o.v_)(m.value),1),(0,o.Lk)("button",{onClick:f,"aria-label":(0,o.R1)(a)("Remove file")},n[1]||(n[1]=[(0,o.Lk)("span",{class:"sui-icon-close","aria-hidden":"true"},null,-1)]),8,To)])):(0,o.Q3)("",!0)],2),e.description?((0,o.uX)(),(0,o.CE)("div",Io,(0,o.v_)(e.description),1)):(0,o.Q3)("",!0),c.value?((0,o.uX)(),(0,o.Wv)(xo.A,{key:2,type:"error"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)(c.value),1)]}),_:1})):(0,o.Q3)("",!0)])}}};var Fo={class:"sui-notice sui-notice-blue margin-bottom-10"},Xo={class:"sui-notice-content"},Mo={class:"sui-notice-message"},Do=["innerHTML"],Vo={class:"sui-tabs sui-tabs-overflow"},Uo={role:"tablist",class:"sui-tabs-menu"},Bo={type:"button",role:"tab",id:"tab-ip-blocklist",class:"sui-tab-item active","aria-controls":"tab-content-ip-blocklist","aria-selected":"true"},Ko={type:"button",role:"tab",id:"tab-ip-allowlist",class:"sui-tab-item","aria-controls":"tab-content-ip-allowlist","aria-selected":"false",tabindex:"-1"},Ho={class:"sui-tabs-content"},Go={role:"tabpanel",tabindex:"0",id:"tab-content-ip-blocklist",class:"sui-tab-content active","aria-labelledby":"tab-ip-blocklist"},Qo={class:"sui-description"},No={class:"sui-label"},qo=["placeholder"],$o={class:"sui-description"},Yo={role:"tabpanel",tabindex:"0",id:"tab-content-ip-allowlist",class:"sui-tab-content","aria-labelledby":"tab-ip-allowlist",hidden:""},zo={class:"sui-description"},Jo={class:"sui-label"},Zo=["placeholder"],ei={class:"sui-description"},ti={class:"sui-notice sui-notice-info margin-bottom-10"},ni={class:"sui-notice-content"},oi={class:"sui-notice-message"},ii=["innerHTML"],ri={key:0,class:"sui-notice sui-notice-info margin-bottom-10"},ai={class:"sui-notice-content"},li={class:"sui-notice-message"},si={class:"sui-border-frame"},ui=["innerHTML"],ci={for:"license-key-place",id:"label-license-key-place",class:"sui-label"},di=["placeholder","disabled"],pi={class:"sui-notice-buttons sui-col"},fi={class:"sui-col"},vi={key:0,id:"error-message-license-key-place",class:"mt-0 text-right sui-error-message",role:"alert"},bi={key:1,class:"sui-row"},mi={class:"sui-col sui-description"},yi={key:2,class:"sui-notice sui-notice-error margin-top-30"},gi={class:"sui-notice-content"},ki={class:"sui-notice-message"},hi=["innerHTML"],_i={key:3,class:"sui-notice"},wi={class:"sui-notice-content"},Li={class:"sui-notice-message"},Ri={key:1},Ci={class:"sui-notice sui-notice-warning"},xi={key:2},Si={class:"sui-description no-margin-bottom"},Ei={class:"sui-border-frame sui-form-field"},ji={class:"sui-label"},Pi={class:"sui-row"},Oi={class:"sui-col margin-top-10 margin-right-10"},Ai={class:"sui-loading-text"},Ti={class:"sui-loading-text"},Ii={class:"sui-description no-margin-bottom"},Wi={class:"sui-border-frame sui-form-field"},Fi={class:"sui-label"},Xi={class:"sui-row margin-bottom-5"},Mi={class:"sui-col margin-top-10 margin-right-10"},Di={class:"sui-loading-text"},Vi={class:"sui-loading-text"},Ui={class:"sui-description"},Bi=["innerHTML"],Ki={class:"sui-label"},Hi={class:"sui-form-field"},Gi=["placeholder"],Qi=["innerHTML"],Ni={class:"sui-description"},qi=["href"],$i={class:"sui-description"};const Yi={__name:"ip-blacklist",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,l=(0,_.I)(),s=l.adminUrl,u=l.siteUrl,c=vn(),d=(0,X.w)(),p=(0,i.bP)(c),f=p.model,v=p.misc,b=p.license_key,m=p.active_lockouts,y=p.ip_import,g=p.savedState,k=p.errorText,h=p.exportUrl,w=(0,o.KR)(!1),L=(0,o.EW)(function(){return""!==k.value}),R=(0,o.EW)(function(){return[{key:"ip_addresses",label:n("IP Addresses"),description:n("Add IP addresses to the blocklist or allowlist to permanently block them or always allow them to access your website.")},{key:"active_lockouts",label:n("Active Lockouts"),description:n("View IP addresses that are temporarily blocked from accessing your site according to your lockout rules. You can release IP addresses from the temporary block here.")},{key:"locations",label:n("Locations"),description:n("Ban countries you don't expect/want traffic from to protect your site from unwanted hackers and bots in a specific location.")},{key:"message",label:n("Message"),description:n("Customize the message locked out users will see.")},{key:"import",label:n("Import"),description:n("Import your blocklist and allowlist from another website.")},{key:"export",label:n("Export"),description:n("Export your blocklist and allowlist for use on another website.")}]}),C=(0,o.EW)(function(){return!1===v.value.is_geodb_downloaded?n("Download"):n("Disconnect")}),x=(0,o.EW)(function(){return!1===v.value.is_geodb_downloaded?"sui-icon-download":"sui-icon-plug-disconnected"}),S=(0,o.EW)(function(){return a(n("We recommend adding your IP address(es) to the Allowlist to avoid getting accidentally locked out of your site. Your current IP address(es): %s. <a href='%s'>%s</a>"),'<span class="admin-ip"><strong>'+v.value.user_ip+"</strong></span>",s("admin.php?page=wdf-ip-lockout&view=settings#detect-ip-addresses"),n("Check how we detect your IP."))}),E=(0,o.EW)(function(){return!0===m.value.is_fetching?n("Loading data..."):0===m.value.count?n("There are no IP addresses being blocked at the moment."):1===m.value.count?n("1 IP address is currently blocked from viewing your site."):a(n("%d IP addresses are currently blocked from viewing your site."),m.value.count)}),j=(0,o.EW)(function(){return a(n('This message will be displayed across your website during the lockout period. See a quick preview <a target="_blank" href="%s">here</a>.'),u("?def-lockout-demo=1&type=blocklist"))}),P=(0,o.EW)(function(){var e='<span class="sui-description">'+a(n("1. <a target='_blank' href='%s'>Sign up for a free account</a> with MaxMind for access to the free GeoLite2 Database."),"https://www.maxmind.com/en/geolite2/signup")+"</span>";return e+='<span class="break-all sui-description">'+a(n('2. Visit <a target="_blank" href="%s">https://www.maxmind.com/en/accounts/current/license-key</a>.'),"https://www.maxmind.com/en/accounts/current/license-key")+"</span>",e+='<span class="sui-description">'+n("3. Create a new key or use an existing license key. Note: A license key is displayed, in full, only once to the person that generates the key.")+"</span>",e+='<span class="sui-description">'+n("4. Paste the license key below and click the download button.")+"</span>"}),O=(0,o.EW)(function(){return a(n("This product includes GeoLite2 data created by MaxMind, available from <a target='_blank' href='%s'>https://www.maxmind.com</a>."),"https://www.maxmind.com")}),A=(0,o.EW)(function(){return w.value&&!1===v.value.is_geodb_downloaded&&!g.value&&!L.value}),T=function(e,t){c.setSpotlightFor(e,t),c.quick_data.continent_key="all";var n=jQuery("#firewall_ip_banning");SUI.openModal("modal-active",n,undefined,!1,!0)};return(0,o.wB)(b,function(e){w.value=e.trim().length>0}),(0,o.KC)(function(){c.fetchLockedIps(),v.value.geodb_license_key&&(b.value=v.value.geodb_license_key),k.value=""}),(0,o.sV)(function(){var e=window.location.hash;e&&(0,o.dY)(function(){jQuery(e).trigger("click")})}),function(e,t){return(0,o.uX)(),(0,o.Wv)(bn.A,{"model-value":"",feature:"ip-banning",title:(0,o.R1)(v).module_name,settings:R.value,"save-action":"save-blacklist-settings",onSaveSettings:(0,o.R1)(c).saveSettings,"has-deactivate":!1},{description:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Choose specific IP addresses or locations you want to permanently lock out from accessing your site.")),1),t[13]||(t[13]=(0,o.Lk)("hr",null,null,-1))]}),ip_addresses:(0,o.k6)(function(){return[(0,o.Lk)("div",Fo,[(0,o.Lk)("div",Xo,[(0,o.Lk)("div",Mo,[t[14]||(t[14]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:S.value},null,8,Do)])])]),(0,o.Lk)("div",Vo,[(0,o.Lk)("div",Uo,[(0,o.Lk)("button",Bo,(0,o.v_)((0,o.R1)(n)("Blocklist")),1),(0,o.Lk)("button",Ko,(0,o.v_)((0,o.R1)(n)("Allowlist")),1)]),(0,o.Lk)("div",Ho,[(0,o.Lk)("div",Go,[(0,o.Lk)("p",Qo,(0,o.v_)((0,o.R1)(n)("Any IP addresses you list here will be completely blocked from accessing your website, including admins.")),1),(0,o.Lk)("label",No,(0,o.v_)((0,o.R1)(n)("Blocklisted IPs")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control",id:"ip_blacklist",name:"ip_blacklist",placeholder:(0,o.R1)(n)("Add IP addresses here, one per line"),"onUpdate:modelValue":t[0]||(t[0]=function(e){return(0,o.R1)(f).ip_blacklist=e}),rows:"8"},null,8,qo),[[o.Jo,(0,o.R1)(f).ip_blacklist]]),(0,o.Lk)("p",$o,(0,o.v_)((0,o.R1)(n)("Add one IP address per line. Both IPv4 and IPv6 are supported. IP ranges are also accepted in the following formats: 127.0.0.1-127.0.0.100 or 127.0.0.1/24.")),1)]),(0,o.Lk)("div",Yo,[(0,o.Lk)("p",zo,(0,o.v_)((0,o.R1)(n)("Any IP addresses you list here will be exempt any existing or new ban rules outlined in login protection, 404 detection or IP ban lists.")),1),(0,o.Lk)("label",Jo,(0,o.v_)((0,o.R1)(n)("Allowed IPs")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control",id:"ip_whitelist",name:"ip_whitelist",placeholder:(0,o.R1)(n)("Add IP addresses here, one per line"),"onUpdate:modelValue":t[1]||(t[1]=function(e){return(0,o.R1)(f).ip_whitelist=e}),rows:"8"},null,8,Zo),[[o.Jo,(0,o.R1)(f).ip_whitelist]]),(0,o.Lk)("p",ei,(0,o.v_)((0,o.R1)(n)("Add one IP address per line. Both IPv4 and IPv6 are supported. IP ranges are also accepted in the following formats: 127.0.0.1-127.0.0.100 or 127.0.0.1/24.")),1)])]),(0,o.bF)(Un)])]}),active_lockouts:(0,o.k6)(function(){return[(0,o.Lk)("div",ti,[(0,o.Lk)("div",ni,[(0,o.Lk)("div",oi,[t[15]||(t[15]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:E.value},null,8,ii)])])]),(0,o.bo)((0,o.Lk)("button",{type:"button",class:"sui-button sui-button-gray","data-modal-open":"ips-modal"},(0,o.v_)((0,o.R1)(n)("Unlock IPs")),513),[[o.aG,(0,o.R1)(m).count>0]])]}),locations:(0,o.k6)(function(){return[!1===(0,o.R1)(v).is_geodb_downloaded?((0,o.uX)(),(0,o.CE)("div",ri,[(0,o.Lk)("div",ai,[(0,o.Lk)("div",li,[t[16]||(t[16]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Follow the steps below to activate the Locations feature and download the latest Geo IP Database.")),1)])])])):(0,o.Q3)("",!0),(0,o.Lk)("div",si,[!1===(0,o.R1)(v).is_geodb_downloaded?((0,o.uX)(),(0,o.CE)("div",{key:0,class:"download-instruction mb-20px",innerHTML:P.value},null,8,ui)):(0,o.Q3)("",!0),(0,o.Lk)("div",{class:(0,o.C4)(["sui-form-field",{"sui-form-field-error":L.value}])},[(0,o.Lk)("label",ci,(0,o.v_)((0,o.R1)(n)("License Key")),1),(0,o.Lk)("div",{class:(0,o.C4)(["sui-with-button sui-with-button-inside",{"wrapper-license-key-error":L.value}])},[t[17]||(t[17]=(0,o.Lk)("button",{class:"right-auto sui-button left-1",disabled:""},[(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-icon-key"})],-1)),(0,o.bo)((0,o.Lk)("input",{placeholder:(0,o.R1)(n)("Place license key here"),id:"license-key-place",class:"pl-24 sui-form-control",type:"text","aria-labelledby":"label-license-key-place","onUpdate:modelValue":t[2]||(t[2]=function(e){return(0,o.i9)(b)?b.value=e:null}),disabled:!0===(0,o.R1)(v).is_geodb_downloaded},null,8,di),[[o.Jo,(0,o.R1)(b)]])],2)],2),(0,o.Lk)("div",{class:(0,o.C4)(["sui-row",{"margin-bottom-20":!0===w.value}])},[(0,o.Lk)("div",pi,[(0,o.bF)(He.A,{label:C.value,icon:x.value,action:"download-geodb",type:"button",disabled:!w.value,"custom-class":"sui-button-ghost",id:"download-geodb",onClick:t[3]||(t[3]=function(e){!1===v.value.is_geodb_downloaded?(c.downloadGeoDB(),d.trackFeature({event:"def_country_blocking",data:{Action:"Enabled"}})):(c.deleteGeoDB(),d.trackFeature({event:"def_country_blocking",data:{Action:"Disabled"}}))})},null,8,["label","icon","disabled"])]),(0,o.Lk)("div",fi,[L.value?((0,o.uX)(),(0,o.CE)("span",vi,(0,o.v_)((0,o.R1)(n)("Invalid license key.")),1)):(0,o.Q3)("",!0)])],2),!0===(0,o.R1)(v).is_geodb_downloaded?((0,o.uX)(),(0,o.CE)("div",bi,[(0,o.Lk)("div",mi,(0,o.v_)((0,o.R1)(n)("Your site is connected to the above Maxmind license key. Defender automatically downloads the latest GeoLite2 data weekly.")),1)])):(0,o.Q3)("",!0),L.value?((0,o.uX)(),(0,o.CE)("div",yi,[(0,o.Lk)("div",gi,[(0,o.Lk)("div",ki,[t[18]||(t[18]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:(0,o.R1)(k)},null,8,hi)])])])):(0,o.Q3)("",!0),A.value?((0,o.uX)(),(0,o.CE)("div",_i,[(0,o.Lk)("div",wi,[(0,o.Lk)("div",Li,[t[19]||(t[19]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("It may take up to five minutes for the MaxMind license key to be activated. Please give it some time before clicking on the Download button.")),1)])])])):(0,o.Q3)("",!0)]),!1===(0,o.R1)(v).current_country?((0,o.uX)(),(0,o.CE)("div",Ri,[(0,o.Lk)("div",Ci,[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Can't detect current country, it seem your site setup in localhost environment.")),1)])])):(0,o.Q3)("",!0),!0===(0,o.R1)(v).is_geodb_downloaded?((0,o.uX)(),(0,o.CE)("div",xi,[(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(n)("Blocklist")),1),(0,o.Lk)("p",Si,(0,o.v_)((0,o.R1)(n)("Any countries you select will not be able to access any area of your website.")),1),(0,o.Lk)("div",Ei,[(0,o.Lk)("label",ji,(0,o.v_)((0,o.R1)(n)("Banned countries")),1),(0,o.bF)(vo.A,{id:"country_blacklist",placeholder:(0,o.R1)(n)("Type country name"),modelValue:(0,o.R1)(f).country_blacklist,"onUpdate:modelValue":t[4]||(t[4]=function(e){return(0,o.R1)(f).country_blacklist=e}),options:(0,o.R1)(v).blacklist_countries,multiple:!0,icon:"web-globe-world","has-field":!1},null,8,["placeholder","modelValue","options"]),(0,o.Lk)("div",Pi,[(0,o.Lk)("div",Oi,[(0,o.Lk)("button",{type:"button",class:"sui-button",onClick:t[5]||(t[5]=function(e){return T("add","blocklist")})},[(0,o.Lk)("span",Ai,(0,o.v_)((0,o.R1)(n)("Quick Add")),1)]),(0,o.Lk)("button",{type:"button",class:"sui-button sui-button-ghost",onClick:t[6]||(t[6]=function(e){return T("remove","blocklist")})},[(0,o.Lk)("span",Ti,(0,o.v_)((0,o.R1)(n)("Quick Remove")),1)])])])]),(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(n)("Allowlist")),1),(0,o.Lk)("p",Ii,(0,o.v_)((0,o.R1)(n)("Any countries you select will always be able to view your website. Note: We've added your default country by default.")),1),(0,o.Lk)("div",Wi,[(0,o.Lk)("label",Fi,(0,o.v_)((0,o.R1)(n)("Allowed countries")),1),(0,o.bF)(vo.A,{id:"country_whitelist",placeholder:(0,o.R1)(n)("Type country name"),modelValue:(0,o.R1)(f).country_whitelist,"onUpdate:modelValue":t[7]||(t[7]=function(e){return(0,o.R1)(f).country_whitelist=e}),options:(0,o.R1)(v).whitelist_countries,multiple:"",icon:"web-globe-world","has-field":!1},null,8,["placeholder","modelValue","options"]),(0,o.Lk)("div",Xi,[(0,o.Lk)("div",Mi,[(0,o.Lk)("button",{type:"button",class:"sui-button",onClick:t[8]||(t[8]=function(e){return T("add","allowlist")})},[(0,o.Lk)("span",Di,(0,o.v_)((0,o.R1)(n)("Quick Add")),1)]),(0,o.Lk)("button",{type:"button",class:"sui-button sui-button-ghost",onClick:t[9]||(t[9]=function(e){return T("remove","allowlist")})},[(0,o.Lk)("span",Vi,(0,o.v_)((0,o.R1)(n)("Quick Remove")),1)])])]),(0,o.Lk)("p",Ui,(0,o.v_)((0,o.R1)(n)("Note: your allowlist will override any country ban, but will still follow your 404 and login lockout rules.")),1)]),(0,o.Lk)("p",{class:"sui-description",innerHTML:O.value},null,8,Bi)])):(0,o.Q3)("",!0)]}),message:(0,o.k6)(function(){return[(0,o.Lk)("label",Ki,(0,o.v_)((0,o.R1)(n)("Custom message")),1),(0,o.Lk)("div",Hi,[(0,o.bo)((0,o.Lk)("textarea",{name:"ip_lockout_message",class:"sui-form-control",placeholder:(0,o.R1)(n)("The administrator has blocked your IP from accessing this website."),"onUpdate:modelValue":t[10]||(t[10]=function(e){return(0,o.R1)(f).ip_lockout_message=e}),id:"ip_lockout_message",rows:"2"},null,8,Gi),[[o.Jo,(0,o.R1)(f).ip_lockout_message]]),(0,o.Lk)("span",{class:"sui-description",innerHTML:j.value},null,8,Qi)])]}),import:(0,o.k6)(function(){return[(0,o.bF)(Wo,{label:(0,o.R1)(n)("Upload the blocklist and allowlist CSV file exported from another website."),modelValue:(0,o.R1)(y),"onUpdate:modelValue":t[11]||(t[11]=function(e){return(0,o.i9)(y)?y.value=e:null})},null,8,["label","modelValue"]),(0,o.bF)(He.A,{label:(0,o.R1)(n)("Import"),action:"import",type:"button",disabled:!(0,o.R1)(y).id,variant:"outlined",icon:"sui-icon-download-cloud",onClick:t[12]||(t[12]=function(e){return(0,o.R1)(c).importIp()})},null,8,["label","disabled"]),(0,o.Lk)("span",Ni,(0,o.v_)((0,o.R1)(n)("Note: Imported IP addresses will be added to the existing blocklist and allowlist.")),1)]}),export:(0,o.k6)(function(){return[(0,o.Lk)("a",{href:(0,o.R1)(v).no_ips?"#":(0,o.R1)(h),class:(0,o.C4)(["sui-button sui-button-outlined export",{disabled:(0,o.R1)(v).no_ips}])},[t[20]||(t[20]=(0,o.Lk)("i",{class:"sui-icon-upload-cloud","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(n)("Export")),1)],10,qi),(0,o.Lk)("span",$i,(0,o.v_)((0,o.R1)(n)("The export will include both the blocklist and allowlist.")),1)]}),modals:(0,o.k6)(function(){return[(0,o.bF)((0,o.R1)(fo)),(0,o.bF)((0,o.R1)(Co))]}),_:1},8,["title","settings","onSaveSettings"])}}};var zi=n(5541),Ji={insert:"head",singleton:!1};be()(zi.A,Ji);zi.A.locals;const Zi=Yi;function er(e){return er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},er(e)}function tr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return nr(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(nr(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,nr(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,nr(d,"constructor",u),nr(u,"constructor",s),s.displayName="GeneratorFunction",nr(u,i,"GeneratorFunction"),nr(d),nr(d,i,"Generator"),nr(d,o,function(){return this}),nr(d,"toString",function(){return"[object Generator]"}),(tr=function(){return{w:r,m:p}})()}function nr(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}nr=function(e,t,n,o){function r(t,n){nr(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},nr(e,t,n,o)}function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?or(Object(n),!0).forEach(function(t){rr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=er(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=er(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==er(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ar(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function lr(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){ar(r,o,i,a,l,"next",e)}function l(e){ar(r,o,i,a,l,"throw",e)}a(void 0)})}}var sr=(0,i.nY)("loginLockout",function(){var e=(0,s.q)().post,t=(0,u.r)(),n=(0,o.KR)({}),i=(0,o.KR)({}),r=(0,o.KR)({}),a=(0,o.KR)({});function l(e){n.value=e.model,i.value=e.misc,r.value=e.routes,a.value=e.nonces}l(window.login_lockout);var c=(0,o.EW)(function(){return n.value.enabled});function d(){return(d=lr(tr().m(function o(){var i;return tr().w(function(o){for(;;)switch(o.n){case 0:return i=ir(ir({},n.value),{},{enabled:!n.value.enabled}),o.n=1,t.withLoading("toggle",lr(tr().m(function t(){return tr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(r.value.save_settings,a.value.save_settings,i);case 1:setTimeout(function(){return location.reload()},500);case 2:return t.a(2)}},t)})));case 1:return o.a(2)}},o)}))).apply(this,arguments)}function p(){return(p=lr(tr().m(function o(){return tr().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,t.withLoading("settings",function(){return e(r.value.save_settings,a.value.save_settings,n.value)});case 1:l(o.v);case 2:return o.a(2)}},o)}))).apply(this,arguments)}return{model:n,misc:i,routes:r,nonces:a,isActive:c,init:l,toggle:function(){return d.apply(this,arguments)},saveSettings:function(){return p.apply(this,arguments)}}});function ur(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return cr(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(cr(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,cr(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,cr(d,"constructor",u),cr(u,"constructor",s),s.displayName="GeneratorFunction",cr(u,i,"GeneratorFunction"),cr(d),cr(d,i,"Generator"),cr(d,o,function(){return this}),cr(d,"toString",function(){return"[object Generator]"}),(ur=function(){return{w:r,m:p}})()}function cr(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}cr=function(e,t,n,o){function r(t,n){cr(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},cr(e,t,n,o)}function dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(n),!0).forEach(function(t){fr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=mr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=mr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function br(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){vr(r,o,i,a,l,"next",e)}function l(e){vr(r,o,i,a,l,"throw",e)}a(void 0)})}}function mr(e){return mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mr(e)}var yr=(0,i.nY)("nfLockout",function(){var e=(0,s.q)().post,t=(0,u.r)(),n=(0,o.KR)({}),i=(0,o.KR)({}),r=(0,o.KR)({}),a=(0,o.KR)({});function l(e){n.value=e.model,i.value=e.misc,r.value=e.routes,a.value=e.nonces}function c(){return(c=br(ur().m(function o(){var i;return ur().w(function(o){for(;;)switch(o.n){case 0:return i=pr(pr({},n.value),{},{enabled:!n.value.enabled}),o.n=1,t.withLoading("toggle-nf",br(ur().m(function t(){return ur().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(r.value.save_settings,a.value.save_settings,i);case 1:setTimeout(function(){return location.reload()},500);case 2:return t.a(2)}},t)})));case 1:return o.a(2)}},o)}))).apply(this,arguments)}function d(){return(d=br(ur().m(function o(){return ur().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,t.withLoading("save-nf-settings",function(){return e(r.value.save_settings,a.value.save_settings,n.value)});case 1:l(o.v);case 2:return o.a(2)}},o)}))).apply(this,arguments)}"object"===mr(window.nf_lockout)&&l(window.nf_lockout);var p=(0,o.EW)(function(){return n.value.enabled});return{model:n,misc:i,routes:r,nonces:a,isActive:p,toggle:function(){return c.apply(this,arguments)},saveSettings:function(){return d.apply(this,arguments)}}});function gr(e){return gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gr(e)}function kr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return hr(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(hr(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,hr(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,hr(d,"constructor",u),hr(u,"constructor",s),s.displayName="GeneratorFunction",hr(u,i,"GeneratorFunction"),hr(d),hr(d,i,"Generator"),hr(d,o,function(){return this}),hr(d,"toString",function(){return"[object Generator]"}),(kr=function(){return{w:r,m:p}})()}function hr(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}hr=function(e,t,n,o){function r(t,n){hr(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},hr(e,t,n,o)}function _r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_r(Object(n),!0).forEach(function(t){Lr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=gr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=gr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gr(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rr(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function Cr(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){Rr(r,o,i,a,l,"next",e)}function l(e){Rr(r,o,i,a,l,"throw",e)}a(void 0)})}}var xr=(0,i.nY)("uaLockout",function(){var e=(0,s.q)().post,t=(0,u.r)().withLoading,n=(0,o.KR)({}),i=(0,o.KR)({}),r=(0,o.KR)({}),a=(0,o.KR)({}),l=(0,o.KR)({id:!1,name:null});function c(e){n.value=e.model,i.value=e.misc,r.value=e.routes,a.value=e.nonces}"undefined"!=typeof window&&window.ua_lockout&&c(window.ua_lockout);var d=(0,o.EW)(function(){return n.value.enabled});function p(){l.value.id=!1,l.value.name=null}var f=(0,o.EW)(function(){return"".concat(ajaxurl,"?action=wp_defender/v1/hub/&route=").concat(r.value.export_ua,"&_def_nonce=").concat(a.value.export_ua)});function v(){return(v=Cr(kr().m(function o(){var i;return kr().w(function(o){for(;;)switch(o.n){case 0:return i=wr(wr({},n.value),{},{enabled:!n.value.enabled}),o.n=1,t("toggle-ua",Cr(kr().m(function t(){return kr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(r.value.save_settings,a.value.save_settings,i);case 1:setTimeout(function(){return location.reload()},500);case 2:return t.a(2)}},t)})));case 1:return o.a(2)}},o)}))).apply(this,arguments)}function b(){return(b=Cr(kr().m(function o(){return kr().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,t("save-ua-settings",function(){return e(r.value.save_settings,a.value.save_settings,n.value)});case 1:c(o.v);case 2:return o.a(2)}},o)}))).apply(this,arguments)}function m(){return(m=Cr(kr().m(function n(){return kr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t("import-ua-file",Cr(kr().m(function t(){return kr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(r.value.import_ua,a.value.import_ua,{id:l.value.id});case 1:p();case 2:return t.a(2)}},t)})));case 1:return n.a(2)}},n)}))).apply(this,arguments)}var y=(0,o.EW)(function(){return Object.keys(i.value.blocklist_presets.brute_forcing_tools||{})}),g=(0,o.EW)(function(){var e=y.value;return e.length&&Array.isArray(n.value.blocklist_preset_values)&&e.every(function(e){return n.value.blocklist_preset_values.includes(e)})}),k=(0,o.EW)(function(){return g.value}),h=(0,o.EW)(function(){return Object.keys(i.value.blocklist_presets.security_scanners||{})}),_=(0,o.EW)(function(){var e=h.value;return e.length&&Array.isArray(n.value.blocklist_preset_values)&&e.every(function(e){return n.value.blocklist_preset_values.includes(e)})}),w=(0,o.EW)(function(){return _.value}),L=(0,o.EW)(function(){return Object.keys(i.value.blocklist_presets.seo_crawlers||{})}),R=(0,o.EW)(function(){var e=L.value;return e.length&&Array.isArray(n.value.blocklist_preset_values)&&e.every(function(e){return n.value.blocklist_preset_values.includes(e)})}),C=(0,o.EW)(function(){return R.value});return{model:n,misc:i,routes:r,nonces:a,ua_import:l,exportUrl:f,isActive:d,init:c,clearUaImport:p,toggle:function(){return v.apply(this,arguments)},saveSettings:function(){return b.apply(this,arguments)},importUa:function(){return m.apply(this,arguments)},allBruteForcingToolsKeys:y,isAllBruteForcingToolsSelected:g,selectAllBruteForcingTools:k,allSecurityScannersKeys:h,selectAllSecurityScanners:w,isAllSecurityScannersSelected:_,allSeoCrawlersKeys:L,selectAllSeoCrawlers:C,isAllSeoCrawlersSelected:R,toggleSelectAllBruteForcingTools:function(e){var t=Object.keys(i.value.blocklist_presets.brute_forcing_tools||[]);e?t.forEach(function(e){n.value.blocklist_preset_values.includes(e)||n.value.blocklist_preset_values.push(e)}):n.value.blocklist_preset_values=n.value.blocklist_preset_values.filter(function(e){return!t.includes(e)})},toggleSelectAllSeoCrawlers:function(e){var t=Object.keys(i.value.blocklist_presets.seo_crawlers||[]);e?t.forEach(function(e){n.value.blocklist_preset_values.includes(e)||n.value.blocklist_preset_values.push(e)}):n.value.blocklist_preset_values=n.value.blocklist_preset_values.filter(function(e){return!t.includes(e)})},toggleSelectAllSecurityScanners:function(e){var t=Object.keys(i.value.blocklist_presets.security_scanners||[]);e?t.forEach(function(e){n.value.blocklist_preset_values.includes(e)||n.value.blocklist_preset_values.push(e)}):n.value.blocklist_preset_values=n.value.blocklist_preset_values.filter(function(e){return!t.includes(e)})},toggleBlocklistPresets:function(e){e||(n.value.blocklist_preset_values=[])},toggleScriptPresets:function(e){e||(n.value.script_preset_values=[])}}});function Sr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return Er(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(Er(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Er(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,Er(d,"constructor",u),Er(u,"constructor",s),s.displayName="GeneratorFunction",Er(u,i,"GeneratorFunction"),Er(d),Er(d,i,"Generator"),Er(d,o,function(){return this}),Er(d,"toString",function(){return"[object Generator]"}),(Sr=function(){return{w:r,m:p}})()}function Er(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Er=function(e,t,n,o){function r(t,n){Er(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},Er(e,t,n,o)}function jr(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function Pr(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){jr(r,o,i,a,l,"next",e)}function l(e){jr(r,o,i,a,l,"throw",e)}a(void 0)})}}var Or=(0,i.nY)("firewall",function(){var e=sr(),t=yr(),n=xr(),i=(0,s.q)().post,r=(0,u.r)(),a=(0,o.KR)({}),l=(0,o.KR)({}),c=(0,o.KR)({}),d=(0,o.KR)("0"),p=(0,o.KR)("0"),f=(0,o.KR)("Never"),v=(0,o.KR)({}),b=(0,o.KR)(""),m=(0,o.KR)(""),y=(0,o.KR)(""),g=(0,o.KR)(""),k=(0,o.KR)(""),h=(0,o.KR)(""),_=(0,o.KR)(""),w=(0,o.KR)({}),L=(0,o.KR)({}),R=(0,o.KR)({}),C=(0,o.KR)({}),x=(0,o.KR)({}),S=(0,o.KR)({});function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.iplockout;a.value=e.login,l.value=e.nf,c.value=e.ua,d.value=e.month,p.value=e.day,f.value=e.last_lockout,v.value=e.settings,b.value=e.login_lockout,m.value=e.nf_lockout,y.value=e.ua_lockout,g.value=e.notification_lockout,k.value=e.report,h.value=e.user_ip,_.value=e.user_ip_header,w.value=e.trusted_proxy_presets,L.value=e.global_ip,R.value=e.hub_connector,C.value=e.antibot,x.value=e.routes,S.value=e.nonces}var j=(0,o.EW)(function(){return w.value});function P(e){h.value=e.user_ip,_.value=e.user_ip_header}function O(){return(O=Pr(Sr().m(function e(){return Sr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.withLoading("save-settings",function(){return i(x.value.save_settings,S.value.save_settings,v.value)});case 1:return e.a(2)}},e)}))).apply(this,arguments)}function A(){return(A=Pr(Sr().m(function e(){return Sr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.withLoading("empty-logs",function(){return i(x.value.empty_logs,S.value.empty_logs,v.value)});case 1:return e.a(2)}},e)}))).apply(this,arguments)}function T(){return(T=Pr(Sr().m(function e(){return Sr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.withLoading("empty-lockouts",function(){return i(x.value.empty_lockouts,S.value.empty_lockouts,v.value)});case 1:return e.a(2)}},e)}))).apply(this,arguments)}function I(){return(I=Pr(Sr().m(function e(t){return Sr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.withLoading("sync-ip-header",Pr(Sr().m(function e(){return Sr().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i(x.value.sync_ip_header,S.value.sync_ip_header,t);case 1:P(e.v);case 2:return e.a(2)}},e)})));case 1:return e.a(2)}},e)}))).apply(this,arguments)}function W(){return(W=Pr(Sr().m(function o(){return Sr().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,r.withLoading("activate-lockouts",Pr(Sr().m(function o(){var r;return Sr().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,i(x.value.dashboard_activation,S.value.dashboard_activation,{});case 1:r=o.v,e.model.enabled=r.enable_login,t.model.enabled=r.enable_404,n.model.enabled=r.enable_ua;case 2:return o.a(2)}},o)})));case 1:return o.a(2)}},o)}))).apply(this,arguments)}void 0!==window.iplockout&&E(window.iplockout);var F=(0,o.EW)(function(){return e.isActive&&t.isActive&&n.isActive}),X=(0,o.EW)(function(){return!F.value&&(e.isActive||t.isActive||n.isActive)});return{month:d,day:p,login:a,nf:l,ua:c,last_lockout:f,settings:v,routes:x,nonces:S,user_ip:h,user_ip_header:_,trusted_proxy_presets:w,getTrustedProxyPresets:j,isFullyActive:F,isPartiallyActive:X,init:E,syncIPHeader:P,saveSettings:function(){return O.apply(this,arguments)},emptyLogs:function(){return A.apply(this,arguments)},emptyLockouts:function(){return T.apply(this,arguments)},syncIPHeaderAction:function(e){return I.apply(this,arguments)},activateLockouts:function(){return W.apply(this,arguments)}}}),Ar=n(1512),Tr=["innerHTML"],Ir={class:"flex sui-form-field"},Wr={class:"mr-3"},Fr={class:"sui-label"},Xr={class:"sui-label"},Mr={class:"sui-field-suffix"},Dr={class:"flex"},Vr={class:"mr-3"},Ur={for:"login_protection_lockout_duration",id:"label_login_protection_lockout_duration",class:"sui-label"},Br={class:"sui-label"},Kr=["innerHTML"],Hr={class:"sui-label"},Gr=["placeholder"],Qr=["innerHTML"];const Nr={__name:"lockout",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,l=(0,_.I)(),s=l.adminUrl,u=l.siteUrl,c=l.assetUrl,d=sr(),p=Or(),f=(0,X.w)(),v=(0,i.bP)(d),b=v.model,m=v.misc,y=(0,i.bP)(p).login,g=[{value:"seconds",label:n("Seconds")},{value:"minutes",label:n("Minutes")},{value:"hours",label:n("Hours")}],k=(0,o.EW)(function(){return[{key:"threshold",label:n("Threshold"),description:n("Specify how many failed login attempts within a specific time period will trigger a lockout.")},{key:"duration",label:n("Duration"),description:n("Choose how long you'd like to ban the locked out user for.")},{key:"message",label:n("Message"),description:n("Customize the message locked out users will see.")},{key:"banned_usernames",label:n("Banned usernames"),description:n("It is highly recommended you avoid using the default username 'admin'. Use this tool to automatically lockout and ban users who try to login with common usernames.")}]}),h=(0,o.EW)(function(){return 0===y.value.day?n("Login protection is enabled. There are no lockouts logged yet."):a(n('There have been %s lockouts in the last 24 hours. <a href="%s"><strong>View log</strong></a>.'),y.value.day,s("admin.php?page=wdf-ip-lockout&view=logs&type=auth_lock"))}),w=(0,o.EW)(function(){return a(n("We recommend adding the usernames <strong>admin</strong>, <strong>administrator</strong> and your hostname <strong>%s</strong> as these are common for bots to try logging in with. One username per line."),m.value.host)}),L=(0,o.EW)(function(){return a(n('This message will be displayed across your website during the lockout period. See a quick preview <a target="_blank" href="%s">here</a>.'),u("?def-lockout-demo=1&type=login"))}),R=function(){var e=b.value.enabled;d.toggle(),f.trackFeature({event:e?"def_feature_deactivated":"def_feature_activated",data:{Feature:"Login Protection","Triggered From":"Feature page"}})};return(0,o.KC)(function(){d.init(login_lockout)}),function(e,t){return(0,o.uX)(),(0,o.Wv)(bn.A,{modelValue:(0,o.R1)(b).enabled,"onUpdate:modelValue":t[7]||(t[7]=function(e){return(0,o.R1)(b).enabled=e}),feature:"login-lockout",title:(0,o.R1)(m).module_name,settings:k.value,"save-action":"save-login-settings","toggle-action":"toggle-login",onSaveSettings:(0,o.R1)(d).saveSettings,onToggleFeature:R,"image-url":(0,o.R1)(c)("assets/img/disabled-module.png")},{"deactivate-message":(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Put a stop to hackers trying to randomly guess your login credentials. Defender will lock out users after a set number of failed login attempts.")),1)]}),description:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Prevent hackers from guessing login credentials by locking out users after failed login attempts.")),1),(0,o.bF)(xo.A,{type:(0,o.R1)(y).day>0?"error":"success"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",{innerHTML:h.value},null,8,Tr)]}),_:1},8,["type"])]}),threshold:(0,o.k6)(function(){return[(0,o.Lk)("div",Ir,[(0,o.Lk)("div",Wr,[(0,o.Lk)("label",Fr,(0,o.v_)((0,o.R1)(n)("Failed logins")),1),(0,o.bo)((0,o.Lk)("input",{size:"8","onUpdate:modelValue":t[0]||(t[0]=function(e){return(0,o.R1)(b).attempt=e}),type:"number",min:"1",class:"sui-form-control sui-input-sm",id:"login_protection_login_attempt",name:"login_protection_login_attempt"},null,512),[[o.Jo,(0,o.R1)(b).attempt]])]),(0,o.Lk)("div",null,[(0,o.Lk)("label",Xr,(0,o.v_)((0,o.R1)(n)("Timeframe")),1),(0,o.bo)((0,o.Lk)("input",{size:"8","onUpdate:modelValue":t[1]||(t[1]=function(e){return(0,o.R1)(b).timeframe=e}),type:"number",min:"1",id:"login_lockout_timeframe",name:"login_protection_lockout_timeframe",class:"sui-form-control sui-input-sm sui-field-has-suffix"},null,512),[[o.Jo,(0,o.R1)(b).timeframe]]),(0,o.Lk)("span",Mr,(0,o.v_)((0,o.R1)(n)("seconds")),1)])])]}),duration:(0,o.k6)(function(){return[(0,o.bF)(Ar.A,{slug:"lockout_type",modelValue:(0,o.R1)(b).lockout_type,"onUpdate:modelValue":t[4]||(t[4]=function(e){return(0,o.R1)(b).lockout_type=e}),tabs:[{value:"timeframe",label:(0,o.R1)(n)("Temporary")},{value:"permanent",hideContent:!0,label:(0,o.R1)(n)("Permanent")}]},{timeframe:(0,o.k6)(function(){return[(0,o.Lk)("div",Dr,[(0,o.Lk)("div",Vr,[(0,o.Lk)("label",Ur,(0,o.v_)((0,o.R1)(n)("Duration")),1),(0,o.bo)((0,o.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(e){return(0,o.R1)(b).duration=e}),size:"4",type:"number",min:"1",name:"login_protection_lockout_duration",id:"login_protection_lockout_duration","aria-labelledby":"label_login_protection_lockout_duration",class:"sui-form-control sui-input-sm"},null,512),[[o.Jo,(0,o.R1)(b).duration]])]),(0,o.bF)(vo.A,{id:"lockout-duration-unit",modelValue:(0,o.R1)(b).duration_unit,"onUpdate:modelValue":t[3]||(t[3]=function(e){return(0,o.R1)(b).duration_unit=e}),options:g,"aria-labelledby":"label_lockout_duration_unit",width:"140px",label:(0,o.R1)(n)("Unit")},null,8,["modelValue","label"])])]}),_:1},8,["modelValue","tabs"])]}),message:(0,o.k6)(function(){return[(0,o.Lk)("label",Br,(0,o.v_)((0,o.R1)(n)("Custom message")),1),(0,o.bo)((0,o.Lk)("textarea",{name:"login_protection_lockout_message","onUpdate:modelValue":t[5]||(t[5]=function(e){return(0,o.R1)(b).lockout_message=e}),class:"sui-form-control",id:"login_protection_lockout_message",rows:"2"},null,512),[[o.Jo,(0,o.R1)(b).lockout_message]]),(0,o.Lk)("span",{class:"sui-description",innerHTML:L.value},null,8,Kr)]}),banned_usernames:(0,o.k6)(function(){return[(0,o.Lk)("label",Hr,(0,o.v_)((0,o.R1)(n)("Banned usernames")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control","onUpdate:modelValue":t[6]||(t[6]=function(e){return(0,o.R1)(b).username_blacklist=e}),placeholder:(0,o.R1)(n)("Type usernames, one per line"),id:"username_blacklist",name:"username_blacklist",rows:"8"},null,8,Gr),[[o.Jo,(0,o.R1)(b).username_blacklist]]),(0,o.Lk)("span",{class:"sui-description",innerHTML:w.value},null,8,Qr)]}),_:1},8,["modelValue","title","settings","onSaveSettings","image-url"])}}};var qr=n(6218);function $r(e){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(e)}function Yr(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return zr(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][o]?t(t([][o]())):(zr(t={},o,function(){return this}),t),d=u.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,zr(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=u,zr(d,"constructor",u),zr(u,"constructor",s),s.displayName="GeneratorFunction",zr(u,i,"GeneratorFunction"),zr(d),zr(d,i,"Generator"),zr(d,o,function(){return this}),zr(d,"toString",function(){return"[object Generator]"}),(Yr=function(){return{w:r,m:p}})()}function zr(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}zr=function(e,t,n,o){function r(t,n){zr(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},zr(e,t,n,o)}function Jr(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function Zr(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){Jr(r,o,i,a,l,"next",e)}function l(e){Jr(r,o,i,a,l,"throw",e)}a(void 0)})}}function ea(e){return function(e){if(Array.isArray(e))return ta(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ta(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ta(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function oa(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=$r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=$r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ia={ip:"",ban_status:"all",per_page:20,paged:1,type:"all",dateFrom:"",dateTo:""},ra=(0,qr.j)(),aa=ra.subtractDays,la=ra.formatDate,sa=(0,i.nY)("logs",function(){var e=(0,s.q)().post,t=(0,u.r)(),n=vn(),i=(0,o.KR)("0"),r=(0,o.KR)([]),a=(0,o.KR)("20"),l=(0,o.KR)("1"),c=(0,o.KR)({}),d=(0,o.KR)({}),p=(0,o.KR)({}),f=(0,o.KR)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?na(Object(n),!0).forEach(function(t){oa(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):na(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},ia)),v=(0,o.KR)({ids:[],action:""}),b=(0,o.KR)("latest"),m=(0,o.EW)(function(){var e="-1"===f.value.per_page?-1:f.value.per_page,t=R(),n=t.date_from,o=t.date_to;return"".concat(ajaxurl,"?action=wp_defender/v1/hub/&_def_nonce=").concat(p.value.export_as_csv,"&route=").concat(d.value.export_as_csv)+"&date_from=".concat(n,"&date_to=").concat(o,"&term=").concat(f.value.type,"&ip=").concat(f.value.ip)+"&paged=".concat(f.value.paged,"&per_page=").concat(e,"&ban_status=").concat(f.value.ban_status,"&sort=").concat(b.value)}),y=(0,o.EW)(function(){return"ua_lockout"!==f.value.type}),g=(0,o.EW)(function(){return"ua_lockout"===f.value.type||f.value.type===ia.type}),k=(0,o.EW)(function(){return f.value.paged===l.value}),h=(0,o.EW)(function(){return"-1"===f.value.per_page});function _(e){var t;"-1"===f.value.per_page?(t=r.value).push.apply(t,ea(e.logs)):r.value=e.logs;if(void 0!==e.count&&(i.value=e.count),void 0!==e.total_pages&&(l.value=e.total_pages),void 0!==e.blocklist_preset_values){var n=xr(),o=e.blocklist_preset_values;Array.isArray(o)||(o=Object.values(o||{})),n.model.blocklist_preset_values=o}}function w(e){i.value=e.count,r.value=e.logs,a.value=e.per_page,l.value=e.total_pages,c.value=e.misc,d.value=e.routes,p.value=e.nonces}function L(){f.value.paged++}function R(){var e=new Date,t=aa(e,29);return{date_from:f.value.dateFrom||la(t,"DD-MM-YYYY"),date_to:f.value.dateTo||la(e,"DD-MM-YYYY")}}function C(){return x.apply(this,arguments)}function x(){return(x=Zr(Yr().m(function n(){return Yr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t.withLoading("fetch-lockout-logs",Zr(Yr().m(function t(){var n,o,i;return Yr().w(function(t){for(;;)switch(t.n){case 0:return n=R(),o=n.date_from,i=n.date_to,t.n=1,e(d.value.query_logs,p.value.query_logs,{date_from:o,date_to:i,paged:f.value.paged,type:f.value.type,ip:f.value.ip,sort:b.value,per_page:f.value.per_page,ban_status:f.value.ban_status});case 1:_(t.v);case 2:return t.a(2)}},t)})));case 1:return n.a(2)}},n)}))).apply(this,arguments)}function S(){return(S=Zr(Yr().m(function o(i){return Yr().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,t.withLoading("toggle-ip",Zr(Yr().m(function t(){var o,r,a;return Yr().w(function(t){for(;;)switch(t.n){case 0:return o=R(),r=o.date_from,a=o.date_to,t.n=1,e(d.value.toggle_ip_to_list,p.value.toggle_ip_to_list,{ip:i.ip,list:i.list,date_from:r,date_to:a,paged:f.value.paged,per_page:f.value.per_page,type:f.value.type,ip_filter:f.value.ip,ban_status:f.value.ban_status});case 1:return _(t.v),t.n=2,n.fetchListedIps();case 2:return t.a(2)}},t)})));case 1:return o.a(2)}},o)}))).apply(this,arguments)}function E(){return(E=Zr(Yr().m(function n(o){return Yr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t.withLoading("toggle-ua",Zr(Yr().m(function t(){var n,i,r,a;return Yr().w(function(t){for(;;)switch(t.n){case 0:return n=R(),i=n.date_from,r=n.date_to,t.n=1,e(d.value.toggle_ua_to_list,p.value.toggle_ua_to_list,{ua:o.ua,list:o.list,scenario:o.scenario,date_from:i,date_to:r,paged:f.value.paged,per_page:f.value.per_page,type:f.value.type,ip_filter:f.value.ip});case 1:void 0!==(a=t.v).logs&&_(a);case 2:return t.a(2)}},t)})));case 1:return n.a(2)}},n)}))).apply(this,arguments)}function j(){return(j=Zr(Yr().m(function n(){return Yr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,t.withLoading("bulk-action",Zr(Yr().m(function t(){var n;return Yr().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e(d.value.bulk,p.value.bulk,{ids:v.value.ids,action:v.value.action});case 1:n=t.v,"delete"===v.value.action?location.reload():null!=n&&n.logs&&(r.value=n.logs);case 2:return t.a(2)}},t)})));case 1:return n.a(2)}},n)}))).apply(this,arguments)}function P(){return(P=Zr(Yr().m(function e(t){return Yr().w(function(e){for(;;)switch(e.n){case 0:return f.value.paged=t,e.n=1,C();case 1:return e.a(2)}},e)}))).apply(this,arguments)}lockout_logs&&w(lockout_logs);return{logs:r,misc:c,count:i,total_pages:l,filter:f,bulk:v,sort:b,nonces:p,routes:d,getCsvExportUrl:m,showIPAddressDOM:y,showBanStatusDOM:g,isLastPage:k,isinfiniteScrolling:h,updateLogs:_,init:w,resetFilterIP:function(){f.value.ip=ia.ip},resetFilterBanStatus:function(){f.value.ban_status=ia.ban_status},incrementFilterPaged:L,fetchLogs:C,toggleAnIpToAList:function(e){return S.apply(this,arguments)},toggleAnUaToAList:function(e){return E.apply(this,arguments)},bulkActions:function(){return j.apply(this,arguments)},goToPage:function(e){return P.apply(this,arguments)},intersected:function(){h.value&&!k.value&&(L(),C())},isNotCustomLockoutOrUnlock:function(e){return"custom_lockout"!==e&&"ip_unlock"!==e}}}),ua=n(8374);function ca(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,l=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return da(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var pa={class:"intersection-observer"};const fa={__name:"intersection-observer",props:{options:{type:Object,default:function(){return{}}}},emits:["intersect"],setup:function(e,t){var n=t.emit,i=e,r=n,a=(0,o.KR)(null);return(0,o.sV)(function(){a.value=new IntersectionObserver(function(e){var t=ca(e,1)[0];null!=t&&t.isIntersecting&&r("intersect")},i.options),a.value.observe(document.querySelector(".intersection-observer"))}),(0,o.xo)(function(){a.value&&a.value.disconnect()}),function(e,t){return(0,o.uX)(),(0,o.CE)("div",pa)}}},va={__name:"ip-buttons",props:{log:{type:Object,required:!0}},setup:function(e){var t=(0,r.B)().__,n=e,i=sa(),a=function(){i.toggleAnIpToAList({list:"blocklist",ip:n.log.ip})},l=function(){i.toggleAnIpToAList({list:"blocklist",ip:n.log.ip})},s=(0,o.EW)(function(){return"ua_lockout"===n.log.type?"ghost":"red"}),u=(0,o.EW)(function(){return"bot_trap"===n.log.type?"green":"ghost"}),c=(0,o.EW)(function(){var e="sm-btn-block sm-mt-10px";return"ua_lockout"===n.log.type&&(e+=" sui-button-red"),e}),d=(0,o.EW)(function(){var e="sm-btn-block sm-mt-10px";return e+=" sui-button-green","ua_lockout"===n.log.type&&(e+=" sui-button-ghost-green"),e}),p=(0,o.EW)(function(){return!("ua_lockout"!==n.log.type||"bad_post"===n.log.tried||!n.log.access_status_ip.includes("banned"))||(!("ua_lockout"!==n.log.type||"bad_post"!==n.log.tried||!n.log.access_status.includes("banned"))||!("ua_lockout"===n.log.type||!n.log.access_status.includes("banned")))});return function(n,r){return p.value?((0,o.uX)(),(0,o.Wv)(He.A,{key:0,variant:u.value,"custom-class":d.value,label:(0,o.R1)(t)("Unban IP"),action:"toggle-ip-ban",onClick:l},null,8,["variant","custom-class","label"])):(0,o.R1)(i).isNotCustomLockoutOrUnlock(e.log.type)?((0,o.uX)(),(0,o.Wv)(He.A,{key:1,variant:s.value,"custom-class":c.value,label:(0,o.R1)(t)("Ban IP"),action:"toggle-ip-ban",onClick:a},null,8,["variant","custom-class","label"])):(0,o.Q3)("",!0)}}},ba={__name:"ua-buttons",props:{log:{type:Object,required:!0}},setup:function(e){var t=(0,r.B)().__,n=e,i=sa(),a=function(){i.toggleAnUaToAList({list:"blocklist",ua:n.log.user_agent,scenario:"remove"})},l=function(){i.toggleAnUaToAList({list:"blocklist",ua:n.log.user_agent,scenario:"add"})},s=(0,o.EW)(function(){return"red"}),u=(0,o.EW)(function(){return"green"}),c=(0,o.EW)(function(){return"sm-btn-block sm-mt-10px sui-button-red"}),d=(0,o.EW)(function(){return"sm-btn-block sm-mt-10px sui-button-green"}),p=(0,o.EW)(function(){return!("bot_trap"!==n.log.type||!n.log.access_status_ua.includes("banned"))||!("ua_lockout"!==n.log.type||!n.log.access_status.includes("banned"))});return function(e,n){return p.value?((0,o.uX)(),(0,o.Wv)(He.A,{key:0,variant:u.value,"custom-class":d.value,label:(0,o.R1)(t)("Unban User Agent"),action:"toggle-ua-ban",onClick:a},null,8,["variant","custom-class","label"])):((0,o.uX)(),(0,o.Wv)(He.A,{key:1,variant:s.value,"custom-class":c.value,label:(0,o.R1)(t)("Ban User Agent"),action:"toggle-ua-ban",onClick:l},null,8,["variant","custom-class","label"]))}}};var ma=n(8261);var ya=n(2976);function ga(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,l=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ka(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ka(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ka(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var ha={id:"firewall_logs",class:"sui-box","data-tab":"logs"},_a={class:"sui-box-header"},wa={class:"sui-box-title"},La={class:"flex items-center gap-2 sui-actions-right"},Ra=["href"],Ca={class:"sui-box-body"},xa={class:"grid grid-cols-3 gap-5"},Sa={class:"sui-form-field"},Ea={id:"label-ip-filter",class:"sui-label",for:"ip-filter"},ja=["placeholder"],Pa={class:"flex items-center gap-2 sui-form-field"},Oa={key:0,class:"sui-notice no-margin-top"},Aa={class:"sui-notice-content"},Ta={class:"sui-notice-message"},Ia={key:1,class:"sui-notice margin-top-30"},Wa={class:"sui-notice-content"},Fa={class:"sui-notice-message"},Xa={key:0,class:"sui-accordion sui-accordion-flushed no-border-top"},Ma={class:"sui-accordion-header"},Da={key:0,class:"sui-accordion-col-2"},Va={key:1,class:"sui-accordion-col-2"},Ua={class:"sui-accordion-item-header"},Ba={class:"sui-checkbox"},Ka=["value"],Ha=["textContent"],Ga=["textContent"],Qa=["textContent"],Na={class:"sui-accordion-item-body"},qa={class:"sui-box"},$a={class:"sui-box-body"},Ya={class:"grid mb-20px"},za={class:"margin-bottom-5 leading-22px"},Ja=["innerHTML"],Za={class:"grid grid-cols-12 mb-20px"},el={class:"col-span-6"},tl={class:"margin-bottom-5 leading-22px"},nl={class:"mt-0 text-base leading-22px"},ol=["data-tooltip"],il=["textContent"],rl={class:"col-span-6"},al={class:"margin-bottom-5 leading-22px"},ll=["textContent"],sl={class:"grid grid-cols-12"},ul={class:"col-span-6"},cl={class:"margin-bottom-5 leading-22px"},dl={class:"mt-0 text-base leading-22px"},pl={href:""},fl={class:"col-span-6"},vl={class:"margin-bottom-5 leading-22px"},bl=["textContent"],ml={key:0,class:"sui-box-body wrap-button-line"},yl={class:"grid grid-cols-12"},gl={class:"col-span-6 ml-0 sm-col-span-12"},kl={class:"col-span-6 text-right sm-col-span-12"},hl={class:"grid"},_l={key:0,class:"sui-description margin-top-10"},wl={key:1,class:"sui-description margin-top-10"},Ll={key:1,class:"sui-box-body wrap-button-line"},Rl={class:"grid grid-cols-12"},Cl={class:"col-span-6 ml-0 sm-col-span-12"},xl={class:"col-span-6 text-right sm-col-span-12"},Sl={class:"grid"},El={key:0,class:"sui-description margin-top-10"},jl={key:1,class:"sui-description margin-top-10"};const Pl={__name:"logs",setup:function(e){var t=(0,r.B)().__,n=(0,ma.m)(),a=n.isMobile,l=n.rebindSUI,s=(0,c.h)(),d=s.getCountryName,p=s.getFlagEmoji,f={capitalizeFirstLetter:function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}}.capitalizeFirstLetter,v=sa(),b=(0,u.r)(),m=(0,i.bP)(v),y=m.logs,g=m.count,k=m.total_pages,h=m.filter,_=m.bulk,w=m.sort,L=m.misc,R=m.showIPAddressDOM,C=m.showBanStatusDOM,x=m.getCsvExportUrl,S=(0,o.KR)(!1),E=(0,o.KR)(h.value.per_page||0),j=(0,o.EW)(function(){return Object.entries(L.value.limit_logs).map(function(e){var t=ga(e,2);return{value:t[0],label:t[1]}})}),P=(0,o.EW)(function(){var e=[];return h.value.type&&"all"!==h.value.type&&e.push({id:"type",label:"".concat(t("Type"),": ").concat(L.value.lockout_types[h.value.type])}),h.value.ip&&""!==h.value.ip.trim()&&e.push({id:"ip",label:"".concat(t("IP"),": ").concat(h.value.ip)}),h.value.ban_status&&"all"!==h.value.ban_status&&e.push({id:"ban_status",label:"".concat(t("Status"),": ").concat(L.value.ban_status[h.value.ban_status])}),e}),O=(0,o.EW)(function(){return _.value.ids.length>0&&""!==_.value.action}),A=function(){O.value&&v.bulkActions()},T=function(e,t){v.toggleAnUaToAList({list:"allowlist",ua:e.user_agent,scenario:t})},I=function(e){v.toggleAnIpToAList({list:"allowlist",ip:e.ip})},W=function(e){h.value.paged=e,v.goToPage(e)},F=function(e){E.value=parseInt(e),h.value.per_page=parseInt(e),h.value.paged=1,v.fetchLogs()},X=function(e){h.value.dateFrom=e.start,h.value.dateTo=e.end,h.value.paged=1,v.fetchLogs()},M=function(e){"type"===e.id&&(h.value.type="all"),"ip"===e.id&&(h.value.ip=""),"ban_status"===e.id&&(h.value.ban_status="all"),h.value.paged=1,v.fetchLogs()},D=function(){h.value.paged=1,v.fetchLogs()},V=function(){h.value.type="all",h.value.ban_status="all",h.value.ip="",h.value.paged=1,v.fetchLogs()},U=function(){v.intersected()};return(0,o.wB)(function(){return _.value.is_bulk},function(e){_.value.ids=!0===e?y.value.map(function(e){return e.id}):[]}),(0,o.wB)(w,function(){v.fetchLogs()}),(0,o.wB)(function(){return h.value.per_page},function(e){E.value=e}),(0,o.sV)(function(){var e=new URLSearchParams(window.location.search).get("type");e&&L.value.lockout_types&&L.value.lockout_types[e]&&(h.value.type=e,h.value.paged=1,v.fetchLogs())}),(0,o.$u)(function(){jQuery(function(){(0,o.dY)(function(){l()})})}),function(e,n){return(0,o.uX)(),(0,o.CE)("div",ha,[(0,o.Lk)("div",_a,[(0,o.Lk)("h3",wa,(0,o.v_)((0,o.R1)(t)("Logs")),1),(0,o.Lk)("div",La,[(0,o.bF)(vo.A,{id:"iplockout-logs-export-sort-list",modelValue:(0,o.R1)(w),"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(w)?w.value=e:null}),"has-field":!1,options:(0,o.R1)(L).sort_values,prefix:(0,o.R1)(t)("Sort by"),searchable:!1,"custom-class":"sui-select-sm sui-select-inline","label-class":"sui-field-prefix",width:"140px"},null,8,["modelValue","options","prefix"]),(0,o.Lk)("a",{href:(0,o.R1)(x),class:"sui-button sui-button-ghost"},[n[8]||(n[8]=(0,o.Lk)("i",{"aria-hidden":"true",class:"sui-icon-upload-cloud"},null,-1)),(0,o.R1)(a)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,o.eW)((0,o.v_)((0,o.R1)(t)("Export CSV")),1)],64))],8,Ra)])]),(0,o.Lk)("div",Ca,[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(t)("Here's your comprehensive lockout log. You can allowlist or ban IPs and user agents here.")),1),(0,o.bF)((0,o.R1)(ua.A),{class:"pb-2","current-page":(0,o.R1)(h).paged,"total-pages":parseInt((0,o.R1)(k)),"total-results":(0,o.R1)(g),"results-text":(0,o.R1)(t)("results"),"show-date-range":!0,"date-range-label":(0,o.R1)(t)("Date range"),"date-range-placeholder":(0,o.R1)(t)("Placeholder"),"show-filter":!0,"filter-tooltip":(0,o.R1)(t)("Filter"),"filter-screen-reader-text":(0,o.R1)(t)("Click to open filtering settings"),"show-per-page":!0,"per-page-options":j.value,"current-per-page":E.value,"active-filters":P.value,"active-filters-label":(0,o.R1)(t)("Active Filters"),onPageChange:W,onFilterToggle:n[4]||(n[4]=function(e){return S.value=e}),onPerPageChange:F,onDateRangeChange:X,onClearFilters:V,onApplyFilters:D,onFilterRemove:M},{filter:(0,o.k6)(function(){return[(0,o.Lk)("div",xa,[(0,o.Lk)("div",{class:(0,o.C4)((0,o.R1)(a)?"col-span-12":"col-span-1")},[(0,o.bF)(vo.A,{id:"lockout-type",modelValue:(0,o.R1)(h).type,"onUpdate:modelValue":n[1]||(n[1]=function(e){return(0,o.R1)(h).type=e}),options:(0,o.R1)(L).lockout_types,label:(0,o.R1)(t)("Lockout Type"),searchable:!1},null,8,["modelValue","options","label"])],2),(0,o.bF)(o.eB,{"enter-active-class":"duration-500 ease-out","enter-class":"translate-x-full opacity-0","enter-to-class":"translate-x-0 opacity-100","leave-active-class":"duration-500 ease-in","leave-class":"translate-x-0 opacity-100","leave-to-class":"translate-x-full opacity-0",mode:"out-in"},{default:(0,o.k6)(function(){return[(0,o.R1)(R)?((0,o.uX)(),(0,o.CE)("div",{key:0,class:(0,o.C4)([(0,o.R1)(a)?"col-span-12":"col-span-1","transition-all transform"])},[(0,o.Lk)("div",Sa,[(0,o.Lk)("label",Ea,(0,o.v_)((0,o.R1)(t)("IP Address")),1),(0,o.bo)((0,o.Lk)("input",{id:"ip-filter","onUpdate:modelValue":n[2]||(n[2]=function(e){return(0,o.R1)(h).ip=e}),placeholder:(0,o.R1)(t)("Enter an IP address"),class:"sui-form-control",type:"text"},null,8,ja),[[o.Jo,(0,o.R1)(h).ip]])])],2)):(0,o.Q3)("",!0)]}),_:1}),(0,o.bF)(o.eB,{"enter-active-class":"duration-500 ease-out","enter-class":"translate-x-full opacity-0","enter-to-class":"translate-x-0 opacity-100","leave-active-class":"duration-500 ease-in","leave-class":"translate-x-0 opacity-100","leave-to-class":"translate-x-full opacity-0",mode:"out-in"},{default:(0,o.k6)(function(){return[(0,o.R1)(C)?((0,o.uX)(),(0,o.CE)("div",{key:0,class:(0,o.C4)([(0,o.R1)(a)?"col-span-12":"col-span-1","transition-all transform"])},[(0,o.bF)(vo.A,{id:"filter_ban_status",name:"ban_status",modelValue:(0,o.R1)(h).ban_status,"onUpdate:modelValue":n[3]||(n[3]=function(e){return(0,o.R1)(h).ban_status=e}),options:(0,o.R1)(L).ban_status,label:(0,o.R1)(t)("Ban Status"),searchable:!1},null,8,["modelValue","options","label"])],2)):(0,o.Q3)("",!0)]}),_:1})])]}),_:1},8,["current-page","total-pages","total-results","results-text","date-range-label","date-range-placeholder","filter-tooltip","filter-screen-reader-text","per-page-options","current-per-page","active-filters","active-filters-label"]),(0,o.Lk)("div",Pa,[(0,o.bF)(ya.A,{modelValue:(0,o.R1)(_).is_bulk,"onUpdate:modelValue":n[5]||(n[5]=function(e){return(0,o.R1)(_).is_bulk=e}),"has-field":!1,"custom-class":"apply-all"},null,8,["modelValue"]),(0,o.bF)(vo.A,{modelValue:(0,o.R1)(_).action,"onUpdate:modelValue":n[6]||(n[6]=function(e){return(0,o.R1)(_).action=e}),options:[{value:"",label:(0,o.R1)(t)("Bulk Actions")},{value:"ban",label:(0,o.R1)(t)("Ban")},{value:"allowlist",label:(0,o.R1)(t)("Allowlist")},{value:"delete",label:(0,o.R1)(t)("Delete")}],placeholder:(0,o.R1)(t)("Bulk Actions"),searchable:!1,width:"140px","custom-class":"sui-select-sm sui-select-inline select-bulk-action","has-field":!1},null,8,["modelValue","options","placeholder"]),(0,o.bF)(He.A,{type:"button",action:"bulk-action",variant:"ghost",label:(0,o.R1)(t)("Apply"),disabled:!O.value,onClick:A},null,8,["label","disabled"])]),(0,o.R1)(b).isLoading("fetch-lockout-logs")?((0,o.uX)(),(0,o.CE)("div",Oa,[(0,o.Lk)("div",Aa,[(0,o.Lk)("div",Ta,[n[9]||(n[9]=(0,o.Lk)("i",{"aria-hidden":"true",class:"sui-notice-icon sui-icon-loader sui-loading sui-md"},null,-1)),(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(t)("Fetching logs, please wait a few moments...")),1)])])])):(0,o.Q3)("",!0),0===(0,o.R1)(y).length?((0,o.uX)(),(0,o.CE)("div",Ia,[(0,o.Lk)("div",Wa,[(0,o.Lk)("div",Fa,[n[10]||(n[10]=(0,o.Lk)("i",{"aria-hidden":"true",class:"sui-notice-icon sui-icon-info sui-md"},null,-1)),(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(t)("There haven't been any logs during the selected reporting period.")),1)])])])):(0,o.Q3)("",!0)]),(0,o.R1)(y).length>0&&!(0,o.R1)(b).isLoading("fetch-lockout-logs")?((0,o.uX)(),(0,o.CE)("div",Xa,[(0,o.Lk)("div",Ma,[(0,o.Lk)("div",{class:(0,o.C4)((0,o.R1)(a)?"sui-accordion-col-10":"sui-accordion-col-7")},(0,o.v_)((0,o.R1)(t)("Details")),3),(0,o.R1)(a)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",Da,(0,o.v_)((0,o.R1)(t)("IP Address")),1)),(0,o.R1)(a)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",Va,(0,o.v_)((0,o.R1)(t)("Time")),1)),(0,o.Lk)("div",{class:(0,o.C4)((0,o.R1)(a)?"sui-accordion-col-2":"sui-accordion-col-1")},null,2)]),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)((0,o.R1)(y),function(e){return(0,o.uX)(),(0,o.CE)("div",{key:e.id,class:(0,o.C4)([e.container_class,"sui-accordion-item"])},[(0,o.Lk)("div",Ua,[(0,o.Lk)("div",{class:(0,o.C4)([(0,o.R1)(a)?"sui-accordion-col-10":"sui-accordion-col-7","sui-accordion-item-title"])},[(0,o.Lk)("label",Ba,[(0,o.bo)((0,o.Lk)("input",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return(0,o.R1)(_).ids=e}),value:e.id,type:"checkbox"},null,8,Ka),[[o.lH,(0,o.R1)(_).ids]]),n[11]||(n[11]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1))]),(0,o.Lk)("span",{class:(0,o.C4)([e.tag_class,"px-2 py-1 mr-3 text-sm rounded sm-ml-3"]),style:{"text-transform":"uppercase"},textContent:(0,o.v_)(e.tag)},null,10,Ha),(0,o.eW)(" "+(0,o.v_)(e.log),1)],2),(0,o.R1)(a)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",{key:0,class:"break-all sui-accordion-col-2 fc-grey",textContent:(0,o.v_)(e.ip)},null,8,Ga)),(0,o.R1)(a)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",{key:1,class:"sui-accordion-col-2 fc-grey",textContent:(0,o.v_)(e.format_date)},null,8,Qa)),(0,o.Lk)("div",{class:(0,o.C4)((0,o.R1)(a)?"sui-accordion-col-2":"sui-accordion-col-1")},n[12]||(n[12]=[(0,o.Lk)("button",{"aria-label":"open-item",class:"sui-button-icon sui-accordion-open-indicator"},[(0,o.Lk)("i",{"aria-hidden":"true",class:"sui-icon-chevron-down"})],-1)]),2)]),(0,o.Lk)("div",Na,[(0,o.Lk)("div",qa,[(0,o.Lk)("div",$a,[(0,o.Lk)("div",Ya,[(0,o.Lk)("p",za,[(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(t)("Description")),1)]),(0,o.Lk)("p",{class:"mt-0 text-base leading-22px fc-grey",innerHTML:e.description},null,8,Ja)]),(0,o.Lk)("div",Za,[(0,o.Lk)("div",el,[(0,o.Lk)("p",tl,[(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(t)("IP Address")),1)]),(0,o.Lk)("p",nl,[2===e.country_iso_code.length?((0,o.uX)(),(0,o.CE)("span",{key:0,"data-tooltip":(0,o.R1)(d)(e.country_iso_code),class:"inline-flex items-center justify-center px-1 py-2 align-middle sui-tooltip bg-gray-97 rounded-4px w-7 mr-10px text-15px"},(0,o.v_)((0,o.R1)(p)(e.country_iso_code)),9,ol)):(0,o.Q3)("",!0),(0,o.Lk)("a",{class:"inline-flex align-middle",href:"",textContent:(0,o.v_)(e.ip)},null,8,il)])]),(0,o.Lk)("div",rl,[(0,o.Lk)("p",al,[(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(t)("Date / Time")),1)]),(0,o.Lk)("p",{class:"mt-0 text-base leading-22px fc-grey",textContent:(0,o.v_)(e.date)},null,8,ll)])]),(0,o.Lk)("div",sl,[(0,o.Lk)("div",ul,[(0,o.Lk)("p",cl,[(0,o.Lk)("strong",null,(0,o.v_)(e.type_label),1)]),(0,o.Lk)("p",dl,[(0,o.Lk)("a",pl,(0,o.v_)((0,o.R1)(f)(e.type_value)),1)])]),(0,o.Lk)("div",fl,[(0,o.Lk)("p",vl,[(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(t)("Ban Status")),1)]),(0,o.Lk)("p",{class:"mt-0 text-base leading-22px fc-grey",textContent:(0,o.v_)(e.access_status_text)},null,8,bl)])])]),"ua_lockout"==e.type&&"bad_post"!==e.tried?((0,o.uX)(),(0,o.CE)("div",ml,[(0,o.Lk)("div",yl,[(0,o.Lk)("div",gl,[e.access_status.includes("allowlist")?((0,o.uX)(),(0,o.Wv)(He.A,{key:0,variant:"ghost",action:"toggle-ua-allowlist",label:(0,o.R1)(t)("Remove from allowlist"),"custom-class":"sm-btn-block",onClick:function(t){return T(e,"remove")}},null,8,["label","onClick"])):((0,o.uX)(),(0,o.Wv)(He.A,{key:1,variant:"ghost",action:"toggle-ua-allowlist",label:(0,o.R1)(t)("Add to allowlist"),"custom-class":"sm-btn-block",onClick:function(t){return T(e,"add")}},null,8,["label","onClick"]))]),(0,o.Lk)("div",kl,[(0,o.bF)((0,o.R1)(va),{log:e},null,8,["log"]),(0,o.bF)((0,o.R1)(ba),{log:e},null,8,["log"])])]),(0,o.Lk)("div",hl,[e.access_status.includes("banned")?((0,o.uX)(),(0,o.CE)("p",_l,(0,o.v_)((0,o.R1)(t)("Note: This user agent is already in your banned list.")),1)):((0,o.uX)(),(0,o.CE)("p",wl,(0,o.v_)((0,o.R1)(t)("Note: Make sure this user agent is not a legitimate operation, banning the user agent will result in being permanently locked out from accessing your website.")),1))])])):((0,o.uX)(),(0,o.CE)("div",Ll,[(0,o.Lk)("div",Rl,[(0,o.Lk)("div",Cl,[e.access_status.includes("allowlist")?((0,o.uX)(),(0,o.Wv)(He.A,{key:0,variant:"ghost",action:"toggle-ip-allowlist",label:(0,o.R1)(t)("Remove from allowlist"),"custom-class":"sm-btn-block",onClick:function(t){return I(e)}},null,8,["label","onClick"])):((0,o.uX)(),(0,o.Wv)(He.A,{key:1,variant:"ghost",action:"toggle-ip-allowlist",label:(0,o.R1)(t)("Add to allowlist"),"custom-class":"sm-btn-block",onClick:function(t){return I(e)}},null,8,["label","onClick"]))]),(0,o.Lk)("div",xl,[(0,o.bF)((0,o.R1)(va),{log:e},null,8,["log"]),"bot_trap"===e.type?((0,o.uX)(),(0,o.Wv)((0,o.R1)(ba),{key:0,log:e},null,8,["log"])):(0,o.Q3)("",!0)])]),(0,o.Lk)("div",Sl,[e.access_status.includes("banned")?((0,o.uX)(),(0,o.CE)("p",El,(0,o.v_)((0,o.R1)(t)("Note: This IP address is already in your banned list.")),1)):((0,o.uX)(),(0,o.CE)("p",jl,(0,o.v_)((0,o.R1)(t)("Note: Make sure this IP is not a legitimate operation, banning the IP will result in being permanently locked out from accessing your website.")),1))])]))])])],2)}),128)),(0,o.bF)((0,o.R1)(fa),{options:{rootMargin:"256px"},onIntersect:U})])):(0,o.Q3)("",!0)])}}},Ol=Pl;var Al=n(4146),Tl=["innerHTML"],Il={class:"flex sui-form-field"},Wl={class:"mr-3"},Fl={class:"sui-label"},Xl={class:"sui-label"},Ml={class:"sui-field-suffix"},Dl={class:"flex"},Vl={class:"mr-3"},Ul={for:"detect_404_lockout_duration",id:"detect_404_lockout_label_duration",class:"sui-label"},Bl={class:"sui-label"},Kl=["innerHTML"],Hl={class:"sui-tabs sui-tabs-overflow"},Gl={role:"tablist",class:"sui-tabs-menu"},Ql={type:"button",role:"tab",id:"tab-blocklist",class:"sui-tab-item active","aria-controls":"tab-content-blocklist","aria-selected":"true"},Nl={type:"button",role:"tab",id:"tab-allowlist",class:"sui-tab-item","aria-controls":"tab-content-allowlist","aria-selected":"false",tabindex:"-1"},ql={class:"sui-tabs-content"},$l={role:"tabpanel",tabindex:"0",id:"tab-content-blocklist",class:"sui-tab-content active","aria-labelledby":"tab-blocklist"},Yl={class:"sui-description",style:{marginBottom:"20px"}},zl={class:"sui-label"},Jl=["placeholder"],Zl=["innerHTML"],es={class:"sui-notice"},ts={class:"sui-notice-content"},ns={class:"sui-notice-message"},os=["innerHTML"],is={role:"tabpanel",tabindex:"0",id:"tab-content-allowlist",class:"sui-tab-content","aria-labelledby":"tab-allowlist",hidden:""},rs={class:"sui-description",style:{marginBottom:"20px"}},as={class:"sui-label"},ls=["placeholder"],ss=["innerHTML"],us={class:"sui-notice"},cs={class:"sui-notice-content"},ds={class:"sui-notice-message"},ps=["innerHTML"],fs={class:"sui-form-field"};const vs={__name:"notfound-lockout",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,l=(0,_.I)(),s=l.adminUrl,u=l.siteUrl,c=l.assetUrl,d=yr(),p=Or(),f=(0,i.bP)(d),v=f.model,b=f.misc,m=(0,i.bP)(p).nf,y=[{value:"seconds",label:n("Seconds")},{value:"minutes",label:n("Minutes")},{value:"hours",label:n("Hours")}],g=(0,o.EW)(function(){return[{key:"threshold",label:n("Threshold"),description:n("Specify how many 404 hits on the same file or page will trigger a lockout.")},{key:"duration",label:n("Duration"),description:n("Choose how long you'd like to ban the locked out user for.")},{key:"message",label:n("Message"),description:n("Customize the message locked out users will see.")},{key:"files_folders_types",label:n("Files, folders and file types"),description:n("Choose specific files, folders and file types that you want to automatically ban users/bots from accessing, or allow access to.")},{key:"exclusions",label:n("Exclusions"),description:n("By default, logged in users are excluded from 404 detection. Enable this feature to monitor 404s from logged in users.")}]}),k=(0,o.EW)(function(){return 0===m.value.day?n("404 detection is enabled. There are no lockouts logged yet."):a(n('There have been %s lockouts in the last 24 hours. <a href="%s"><strong>View log</strong></a>.'),m.value.day,s("admin.php?page=wdf-ip-lockout&view=logs&type=404_lockout"))}),h=(0,o.EW)(function(){return a(n('This message will be displayed across your website during the lockout period. See a quick preview <a target="_blank" href="%s">here</a>.'),u("?def-lockout-demo=1&type=404"))}),w=(0,o.EW)(function(){return n("Add one item per line. E.g. file & folder path - <strong>filename.php, /example-folder/filename.html, /example-folder/sub-folder/directory,</strong> file type - <strong>.jpg .exe .css .html</strong>")}),L=(0,o.EW)(function(){return n("By default, .css, .js, and .map file extensions are allowed on new installations. If the same file, folder, or file extension appears in both the allowlist and blocklist, the allowlist will override the blocklist. Files served at the server level will not be detected, and Firewall rules will not apply.")});return function(e,t){return(0,o.uX)(),(0,o.Wv)(bn.A,{modelValue:(0,o.R1)(v).enabled,"onUpdate:modelValue":t[9]||(t[9]=function(e){return(0,o.R1)(v).enabled=e}),feature:"notfound-lockout",title:(0,o.R1)(b).module_name,settings:g.value,"save-action":"save-nf-settings","toggle-action":"toggle-nf",onSaveSettings:(0,o.R1)(d).saveSettings,onToggleFeature:(0,o.R1)(d).toggle,"image-url":(0,o.R1)(c)("assets/img/disabled-module.png")},{"deactivate-message":(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("With 404 detection enabled, Defender will keep an eye out for IP addresses that repeatedly request pages on your website that don't exist and then temporarily block them from accessing your site.")),1)]}),description:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Monitor for IP addresses that repeatedly hit pages that don't exist on your website and temporarily block them.")),1),(0,o.bF)(xo.A,{type:(0,o.R1)(m).day>0?"error":"success"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",{innerHTML:k.value},null,8,Tl)]}),_:1},8,["type"])]}),threshold:(0,o.k6)(function(){return[(0,o.Lk)("div",Il,[(0,o.Lk)("div",Wl,[(0,o.Lk)("label",Fl,(0,o.v_)((0,o.R1)(n)("404 hits")),1),(0,o.bo)((0,o.Lk)("input",{size:"8","onUpdate:modelValue":t[0]||(t[0]=function(e){return(0,o.R1)(v).attempt=e}),type:"number",min:"1",class:"sui-form-control sui-input-sm",id:"detect_404_lockout_threshold",name:"detect_404_lockout_threshold"},null,512),[[o.Jo,(0,o.R1)(v).attempt]])]),(0,o.Lk)("div",null,[(0,o.Lk)("label",Xl,(0,o.v_)((0,o.R1)(n)("Timeframe")),1),(0,o.bo)((0,o.Lk)("input",{size:"8","onUpdate:modelValue":t[1]||(t[1]=function(e){return(0,o.R1)(v).timeframe=e}),type:"number",min:"1",id:"detect_404_lockout_timeframe",name:"detect_404_lockout_timeframe",class:"sui-form-control sui-input-sm sui-field-has-suffix"},null,512),[[o.Jo,(0,o.R1)(v).timeframe]]),(0,o.Lk)("span",Ml,(0,o.v_)((0,o.R1)(n)("seconds")),1)])])]}),duration:(0,o.k6)(function(){return[(0,o.bF)(Ar.A,{slug:"notfound_lockout_type",modelValue:(0,o.R1)(v).lockout_type,"onUpdate:modelValue":t[4]||(t[4]=function(e){return(0,o.R1)(v).lockout_type=e}),tabs:[{value:"timeframe",label:(0,o.R1)(n)("Temporary")},{value:"permanent",hideContent:!0,label:(0,o.R1)(n)("Permanent")}]},{timeframe:(0,o.k6)(function(){return[(0,o.Lk)("div",Dl,[(0,o.Lk)("div",Vl,[(0,o.Lk)("label",Ul,(0,o.v_)((0,o.R1)(n)("Duration")),1),(0,o.bo)((0,o.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=function(e){return(0,o.R1)(v).duration=e}),size:"4",type:"number",min:"1",name:"detect_404_lockout_duration",id:"detect_404_lockout_duration","aria-labelledby":"detect_404_lockout_label_duration",class:"sui-form-control sui-input-sm"},null,512),[[o.Jo,(0,o.R1)(v).duration]])]),(0,o.bF)(vo.A,{id:"detect_404_lockout_duration_unit",options:y,modelValue:(0,o.R1)(v).duration_unit,"onUpdate:modelValue":t[3]||(t[3]=function(e){return(0,o.R1)(v).duration_unit=e}),"aria-labelledby":"detect_404_lockout_label_duration_unit",width:"140px",label:(0,o.R1)(n)("Unit")},null,8,["modelValue","label"])])]}),_:1},8,["modelValue","tabs"])]}),message:(0,o.k6)(function(){return[(0,o.Lk)("label",Bl,(0,o.v_)((0,o.R1)(n)("Custom message")),1),(0,o.bo)((0,o.Lk)("textarea",{name:"detect_404_lockout_message","onUpdate:modelValue":t[5]||(t[5]=function(e){return(0,o.R1)(v).lockout_message=e}),class:"sui-form-control",id:"detect_404_lockout_message",rows:"2"},null,512),[[o.Jo,(0,o.R1)(v).lockout_message]]),(0,o.Lk)("span",{class:"sui-description",innerHTML:h.value},null,8,Kl)]}),files_folders_types:(0,o.k6)(function(){return[(0,o.Lk)("div",Hl,[(0,o.Lk)("div",Gl,[(0,o.Lk)("button",Ql,(0,o.v_)((0,o.R1)(n)("Blocklist")),1),(0,o.Lk)("button",Nl,(0,o.v_)((0,o.R1)(n)("Allowlist")),1)]),(0,o.Lk)("div",ql,[(0,o.Lk)("div",$l,[(0,o.Lk)("p",Yl,(0,o.v_)((0,o.R1)(n)("Add file or folder URLs you want to automatically ban. Users or bots who request them will be locked out as per your 404 rules above.")),1),(0,o.Lk)("label",zl,(0,o.v_)((0,o.R1)(n)("Blocklist")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control","onUpdate:modelValue":t[6]||(t[6]=function(e){return(0,o.R1)(v).blacklist=e}),placeholder:(0,o.R1)(n)("Add files, folders, file types here..."),id:"detect_404_lockout_blacklist_urls",name:"detect_404_lockout_blacklist_urls",rows:"8"},null,8,Jl),[[o.Jo,(0,o.R1)(v).blacklist]]),(0,o.Lk)("p",{class:"sui-description",innerHTML:w.value},null,8,Zl),(0,o.Lk)("div",es,[(0,o.Lk)("div",ts,[(0,o.Lk)("div",ns,[t[10]||(t[10]=(0,o.Lk)("span",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:L.value},null,8,os)])])])]),(0,o.Lk)("div",is,[(0,o.Lk)("p",rs,(0,o.v_)((0,o.R1)(n)("If you know a common file, folder or file type on your website is missing, you can record it here so it doesn't count towards a lockout record.")),1),(0,o.Lk)("label",as,(0,o.v_)((0,o.R1)(n)("Allowlist")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control","onUpdate:modelValue":t[7]||(t[7]=function(e){return(0,o.R1)(v).whitelist=e}),placeholder:(0,o.R1)(n)("Add files, folders, file types here..."),id:"detect_404_lockout_whitelist_urls",name:"detect_404_lockout_whitelist_urls",rows:"8"},null,8,ls),[[o.Jo,(0,o.R1)(v).whitelist]]),(0,o.Lk)("p",{class:"sui-description",innerHTML:w.value},null,8,ss),(0,o.Lk)("div",us,[(0,o.Lk)("div",cs,[(0,o.Lk)("div",ds,[t[11]||(t[11]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:L.value},null,8,ps)])])])])])])]}),exclusions:(0,o.k6)(function(){return[(0,o.Lk)("div",fs,[(0,o.bF)(Al.A,{modelValue:(0,o.R1)(v).detect_logged,"onUpdate:modelValue":t[8]||(t[8]=function(e){return(0,o.R1)(v).detect_logged=e}),label:(0,o.R1)(n)("Monitor 404s from logged in users"),feature:"nf-detect-logged"},null,8,["modelValue","label"])])]}),_:1},8,["modelValue","title","settings","onSaveSettings","onToggleFeature","image-url"])}}};var bs=["for"],ms=["name","id","value","checked","aria-labelledby"],ys=["id"];const gs={__name:"radio",props:{name:{type:String,required:!0},value:{type:String,required:!0},modelValue:{type:String,default:""},label:{type:String,required:!0},className:{type:[String,Array],default:"sui-radio"},id:{type:String,required:!0}},emits:["update:modelValue","change"],setup:function(e,t){var n=t.emit,i=e,r=n,a=(0,o.EW)(function(){return"label-"+i.id}),l=(0,o.EW)(function(){return i.modelValue==i.value});function s(){r("update:modelValue",i.value),r("change",i.value)}return function(t,n){return(0,o.uX)(),(0,o.CE)("label",{for:e.id,class:(0,o.C4)(e.className)},[(0,o.Lk)("input",{type:"radio",name:e.name,id:e.id,value:e.value,checked:l.value,"aria-labelledby":a.value,onChange:s},null,40,ms),n[0]||(n[0]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",{id:a.value},(0,o.v_)(e.label),9,ys)],10,bs)}}};var ks={class:"mb-0 sui-p-small"},hs={class:"mb-0 margin-top-10 sui-p-small"};const _s={__name:"ip-settings-info",setup:function(e){var t=(0,r.B)().__,n=(0,i.bP)(Or()),a=n.user_ip,l=n.user_ip_header;return function(e,n){return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.Lk)("p",ks,[(0,o.eW)((0,o.v_)((0,o.R1)(t)("Detected IP(s)"))+": ",1),(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(a)),1)]),(0,o.Lk)("p",hs,[(0,o.eW)((0,o.v_)((0,o.R1)(t)("IP Settings"))+": ",1),(0,o.Lk)("strong",null,(0,o.v_)((0,o.R1)(l)),1)])])}}};function ws(e){return function(e){if(Array.isArray(e))return Cs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Rs(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ls(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,l=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||Rs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rs(e,t){if(e){if("string"==typeof e)return Cs(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cs(e,t):void 0}}function Cs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var xs={class:"sui-box",id:"firewall_settings","data-tab":"settings"},Ss={class:"sui-box-header"},Es={class:"sui-box-title"},js={class:"sui-box-body"},Ps={id:"detect-ip-addresses",class:"sui-box-settings-row"},Os={class:"sui-box-settings-col-1"},As={class:"sui-settings-label"},Ts=["innerHTML"],Is={class:"sui-box-settings-col-2"},Ws={class:"sui-form-field"},Fs={class:"sui-notice sui-notice-blue"},Xs={class:"sui-notice-content"},Ms={class:"sui-notice-message"},Ds={class:"sui-form-field form-field-separator",role:"radiogroup"},Vs={class:"transition-all transform"},Us={class:"sui-form-field mt-30"},Bs={for:"get-ip-input",id:"label-get-ip-input",class:"sui-label"},Ks=["placeholder"],Hs=["innerHTML"],Gs={class:"sui-box-settings-row"},Qs={class:"sui-box-settings-col-1"},Ns={class:"sui-settings-label"},qs={class:"sui-description"},$s={class:"sui-box-settings-col-2"},Ys={class:"sui-box-settings-row"},zs={class:"sui-box-settings-col-1"},Js={class:"sui-settings-label"},Zs={class:"sui-description"},eu={class:"sui-box-settings-col-2"},tu={class:"sui-form-field"},nu={class:"sui-field-suffix"},ou={class:"sui-box-settings-row"},iu={class:"sui-box-settings-col-1"},ru={class:"sui-settings-label"},au={class:"sui-description"},lu={class:"sui-box-settings-col-2"},su={class:"sui-description"},uu={class:"sui-box-settings-row"},cu={class:"sui-box-settings-col-1"},du={class:"sui-settings-label"},pu={class:"sui-description"},fu={class:"sui-box-settings-col-2"},vu={class:"sui-description"},bu={class:"sui-box-footer"},mu={class:"sui-actions-right"};const yu={__name:"settings",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,l=Or(),s=(0,i.bP)(l),u=s.settings,c=s.trusted_proxy_presets,d=a(n("Select the method the plugin should use to detect your site visitors' IP addresses. For more information about these methods, see our <a href='%s' target='_blank'>documentation</a>."),defender.wpmudev_url+"#detect-ip-addresses"),p=[{label:n("Use the REMOTE_ADDR built-in PHP function only. It offers a high level of security if it is compatible with your website."),value:"REMOTE_ADDR",id:"remote_addr"},{label:n("Enable X-Forwarded-For HTTP header. Use this only if you have a front-end proxy, or else spoofing may occur."),value:"HTTP_X_FORWARDED_FOR",id:"http_x_forwarded_for"},{label:n("Enable X-Real-IP HTTP header. Use this only if you have a front-end proxy, or else spoofing may occur."),value:"HTTP_X_REAL_IP",id:"http_x_real_ip"},{label:n("Use the Cloudflare CF-Connecting-IP HTTP header. Choose this option only if you are routing your domain through Cloudflare."),value:"HTTP_CF_CONNECTING_IP",id:"http_cf_connecting_ip"}],f=["HTTP_X_FORWARDED_FOR","HTTP_X_REAL_IP","HTTP_CF_CONNECTING_IP"],v=a(n("These IPs will be compared when determining the requesting IP via the <strong>%s</strong> HTTP header. Enter one IP per line."),"X-Forwarded-For, X-Real-IP, or CF-Connecting-IP"),b=(0,o.EW)(function(){var e=Object.entries(c.value).map(function(e){var t=Ls(e,2);return{value:t[0],label:t[1]}});return[{value:"",label:"None"}].concat(ws(e))}),m=(0,o.EW)(function(){return f.includes(u.value.http_ip_header)});return(0,o.wB)(function(){return u.value.http_ip_header},function(e){l.syncIPHeaderAction({selected_http_header:e,ip_detection_type:u.value.ip_detection_type})}),(0,o.wB)(function(){return u.value.ip_detection_type},function(e){l.syncIPHeaderAction({selected_http_header:u.value.http_ip_header,ip_detection_type:e})}),function(e,t){return(0,o.uX)(),(0,o.CE)("div",xs,[(0,o.Lk)("div",Ss,[(0,o.Lk)("h3",Es,(0,o.v_)((0,o.R1)(n)("Settings")),1)]),(0,o.Lk)("form",{method:"post",onSubmit:t[8]||(t[8]=(0,o.D$)(function(e){return(0,o.R1)(l).saveSettings()},["prevent"]))},[(0,o.Lk)("div",js,[(0,o.Lk)("div",Ps,[(0,o.Lk)("div",Os,[(0,o.Lk)("span",As,(0,o.v_)((0,o.R1)(n)("Detect IP Addresses")),1),(0,o.Lk)("span",{class:"sui-description",innerHTML:(0,o.R1)(d)},null,8,Ts)]),(0,o.Lk)("div",Is,[(0,o.bF)(Ar.A,{slug:"ip_detection_type_",modelValue:(0,o.R1)(u).ip_detection_type,"onUpdate:modelValue":t[3]||(t[3]=function(e){return(0,o.R1)(u).ip_detection_type=e}),tabs:[{value:"automatic",label:(0,o.R1)(n)("Automatic (Recommended)")},{value:"manual",label:(0,o.R1)(n)("Manual IP Detection")}]},{automatic:(0,o.k6)(function(){return[(0,o.Lk)("div",Ws,[(0,o.Lk)("div",Fs,[(0,o.Lk)("div",Xs,[(0,o.Lk)("div",Ms,[t[9]||(t[9]=(0,o.Lk)("span",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("The most secure method to detect visitors' IP addresses will be chosen automatically. This prevents spoofing and is compatible with most sites. If you don't see your IP under Detected IPs, you can choose other options from Manual IP Detection.")),1)])])]),(0,o.bF)(_s)])]}),manual:(0,o.k6)(function(){return[(0,o.Lk)("div",null,[(0,o.Lk)("div",Ds,[((0,o.uX)(),(0,o.CE)(o.FK,null,(0,o.pI)(p,function(e){return(0,o.bF)((0,o.R1)(gs),(0,o.v6)({key:e.id,name:"get-ip-header"},{ref_for:!0},e,{class:"sui-radio-stacked sui-radio-sm",modelValue:(0,o.R1)(u).http_ip_header,"onUpdate:modelValue":t[0]||(t[0]=function(e){return(0,o.R1)(u).http_ip_header=e})}),null,16,["modelValue"])}),64))]),(0,o.bF)(_s),(0,o.bF)(o.eB,{"enter-active-class":"duration-500 ease-out","enter-class":"translate-x-full opacity-0","enter-to-class":"translate-x-0 opacity-100","leave-active-class":"duration-500 ease-in","leave-class":"translate-x-0 opacity-100","leave-to-class":"translate-x-full opacity-0",mode:"out-in"},{default:(0,o.k6)(function(){return[(0,o.bo)((0,o.Lk)("div",Vs,[(0,o.Lk)("div",Us,[(0,o.Lk)("label",Bs,(0,o.v_)((0,o.R1)(n)("Edit Trusted Proxies")),1),(0,o.bo)((0,o.Lk)("textarea",{placeholder:(0,o.R1)(n)("Add IP addresses here, one per line"),id:"get-ip-input",class:"sui-form-control","aria-labelledby":"label-get-ip-input","aria-describedby":"error-get-ip-input description-get-ip-input",rows:"8","onUpdate:modelValue":t[1]||(t[1]=function(e){return(0,o.R1)(u).trusted_proxies_ip=e})},null,8,Ks),[[o.Jo,(0,o.R1)(u).trusted_proxies_ip]]),t[10]||(t[10]=(0,o.Lk)("span",{id:"error-get-ip-input",class:"sui-error-message",style:{display:"none"}},null,-1)),(0,o.Lk)("span",{id:"description-get-ip-input",class:"sui-description",innerHTML:(0,o.R1)(v)},null,8,Hs)]),(0,o.bF)(vo.A,{modelValue:(0,o.R1)(u).trusted_proxy_preset,"onUpdate:modelValue":t[2]||(t[2]=function(e){return(0,o.R1)(u).trusted_proxy_preset=e}),options:b.value,placeholder:(0,o.R1)(n)("None")},null,8,["modelValue","options","placeholder"])],512),[[o.aG,m.value]])]}),_:1})])]}),_:1},8,["modelValue","tabs"])])]),(0,o.Lk)("div",Gs,[(0,o.Lk)("div",Qs,[(0,o.Lk)("span",Ns,(0,o.v_)((0,o.R1)(n)("Clear Temporary IP Block List")),1),(0,o.Lk)("span",qs,(0,o.v_)((0,o.R1)(n)("Choose how frequently you want the Temporary IP Block List to be automatically cleared.")),1)]),(0,o.Lk)("div",$s,[(0,o.bF)(vo.A,{id:"temporary-ip-list-cleanup-interval",label:(0,o.R1)(n)("Clear list"),modelValue:(0,o.R1)(u).ip_blocklist_cleanup_interval,"onUpdate:modelValue":t[4]||(t[4]=function(e){return(0,o.R1)(u).ip_blocklist_cleanup_interval=e}),options:[{value:"never",label:(0,o.R1)(n)("Never")},{value:"daily",label:(0,o.R1)(n)("Daily")},{value:"weekly",label:(0,o.R1)(n)("Weekly")},{value:"monthly",label:(0,o.R1)(n)("Monthly")}],"aria-labelledby":"label_ip_blocklist_cleanup_interval",width:"150px",placeholder:(0,o.R1)(n)("None")},null,8,["label","modelValue","options","placeholder"])])]),(0,o.Lk)("div",Ys,[(0,o.Lk)("div",zs,[(0,o.Lk)("span",Js,(0,o.v_)((0,o.R1)(n)("Logs Storage")),1),(0,o.Lk)("span",Zs,(0,o.v_)((0,o.R1)(n)("Event logs are cached on your local server to speed up load times. Choose how many days of event logs you'd like to store locally.")),1)]),(0,o.Lk)("div",eu,[(0,o.Lk)("div",tu,[(0,o.bo)((0,o.Lk)("input",{size:"8","onUpdate:modelValue":t[5]||(t[5]=function(e){return(0,o.R1)(u).storage_days=e}),type:"number",min:"1",class:"sui-form-control sui-input-sm sui-field-has-suffix",id:"storage_days",name:"storage_days"},null,512),[[o.Jo,(0,o.R1)(u).storage_days]]),(0,o.Lk)("span",nu,(0,o.v_)((0,o.R1)(n)("days")),1)])])]),(0,o.Lk)("div",ou,[(0,o.Lk)("div",iu,[(0,o.Lk)("span",ru,(0,o.v_)((0,o.R1)(n)("Delete logs")),1),(0,o.Lk)("span",au,(0,o.v_)((0,o.R1)(n)("If you wish to delete your current logs simply hit delete and this will wipe your logs clean.")),1)]),(0,o.Lk)("div",lu,[(0,o.bF)(He.A,{action:"empty-logs",type:"button",onClick:t[6]||(t[6]=function(e){return(0,o.R1)(l).emptyLogs()}),icon:"sui-icon-trash"},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Delete Logs")),1)]}),_:1}),(0,o.Lk)("span",su,(0,o.v_)((0,o.R1)(n)("Note: Defender will instantly remove all past event logs, you will not be able to get them back.")),1)])]),(0,o.Lk)("div",uu,[(0,o.Lk)("div",cu,[(0,o.Lk)("span",du,(0,o.v_)((0,o.R1)(n)("Delete lockouts")),1),(0,o.Lk)("span",pu,(0,o.v_)((0,o.R1)(n)("To delete all the records in the lockout table, simply hit delete.")),1)]),(0,o.Lk)("div",fu,[(0,o.bF)(He.A,{action:"empty-lockouts",type:"button",onClick:t[7]||(t[7]=function(e){return(0,o.R1)(l).emptyLockouts()}),icon:"sui-icon-trash"},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Delete lockouts")),1)]}),_:1}),(0,o.Lk)("span",vu,(0,o.v_)((0,o.R1)(n)("Note: Defender will permanently remove all lockout records from your database. This means that all locked-out users will be able to access your site again.")),1)])])]),(0,o.Lk)("div",bu,[(0,o.Lk)("div",mu,[(0,o.bF)(He.A,{action:"save-settings",type:"submit"},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Save Changes")),1)]}),_:1})])])],32)])}}},gu=yu;var ku=n(6827),hu=["innerHTML"],_u={class:"sui-tabs sui-tabs-overflow"},wu={role:"tablist",class:"sui-tabs-menu"},Lu={type:"button",role:"tab",id:"tab-ua-blocklist",class:"sui-tab-item active","aria-controls":"tab-content-ua-blocklist","aria-selected":"true"},Ru={type:"button",role:"tab",id:"tab-ua-allowlist",class:"sui-tab-item","aria-controls":"tab-content-ua-allowlist","aria-selected":"false",tabindex:"-1"},Cu={class:"sui-tabs-content"},xu={role:"tabpanel",tabindex:"0",id:"tab-content-ua-blocklist",class:"sui-tab-content active","aria-labelledby":"tab-ua-blocklist"},Su={class:"sui-description",style:{marginBottom:"20px"}},Eu={class:"sui-accordion sui-accordion-flushed",id:"ua-blocklist"},ju={class:"sui-accordion-item-header"},Pu={class:"sui-accordion-item-title"},Ou={for:"preset-blocklist-id",class:"sui-toggle"},Au={id:"preset-blocklist-id-label",class:"sui-toggle-label"},Tu={class:"sui-tag sui-tag-sm sui-tag-green"},Iu={class:"sui-accordion-item-body"},Wu={class:"sui-box"},Fu={class:"sui-box-body"},Xu={class:"m-0 text-base text-gray-400 leading-22px pb-20px"},Mu={class:"sui-form-field sui-checkbox-stacked mb-15px"},Du={class:"sui-checkbox",for:"all-brute-forcing-tools"},Vu=["checked"],Uu={id:"label-all-brute-forcing-tools",class:"font-bold text-gray-500"},Bu=["data-tooltip"],Ku={class:"sui-form-field sui-checkbox-stacked mb-15px"},Hu={class:"sui-checkbox",for:"all-security-scanners"},Gu=["checked"],Qu={id:"label-all-security-scanners",class:"font-bold text-gray-500"},Nu=["data-tooltip"],qu={class:"sui-form-field sui-checkbox-stacked mb-15px"},$u={class:"sui-checkbox",for:"all-seo-crawlers"},Yu=["checked"],zu={id:"label-all-seo-crawlers",class:"font-bold text-gray-500"},Ju=["data-tooltip"],Zu={class:"sui-accordion-item-header"},ec={class:"sui-accordion-item-title"},tc={for:"preset-scripts-id",class:"sui-toggle"},nc={id:"preset-scripts-id-label",class:"sui-toggle-label"},oc={class:"sui-accordion-item-body"},ic={class:"sui-box"},rc={class:"sui-box-body"},ac={class:"m-0 text-base text-gray-400 leading-22px pb-20px"},lc={class:"sui-form-field"},sc={class:"sui-form-field sui-checkbox-stacked mb-15px"},uc=["for"],cc=["value","id","aria-labelledby"],dc={class:"script_preset_detail pl-5px"},pc={class:"sui-notice"},fc={class:"sui-notice-content"},vc={class:"sui-notice-message"},bc=["innerHTML"],mc={class:"sui-accordion-item"},yc={class:"sui-accordion-item-header"},gc={class:"sui-accordion-item-title"},kc={id:"preset-custom-user-agents-id-label",class:"sui-toggle-label",style:{fontSize:"15px",fontWeight:"500"}},hc={class:"sui-accordion-item-body"},_c={class:"sui-box"},wc={class:"sui-box-body"},Lc={class:"m-0 text-base text-gray-400 leading-22px pb-20px"},Rc={class:"items-center my-0"},Cc={class:"sui-label"},xc=["placeholder"],Sc={class:"margin-top-30"},Ec={class:"sui-notice"},jc={class:"sui-notice-content"},Pc={class:"sui-notice-message"},Oc=["innerHTML"],Ac={role:"tabpanel",tabindex:"0",id:"tab-content-ua-allowlist",class:"sui-tab-content","aria-labelledby":"tab-ua-allowlist",hidden:""},Tc={class:"sui-description",style:{marginBottom:"20px"}},Ic={class:"sui-label"},Wc=["placeholder"],Fc=["innerHTML"],Xc={class:"sui-notice"},Mc={class:"sui-notice-content"},Dc={class:"sui-notice-message"},Vc=["innerHTML"],Uc={class:"sui-label"},Bc=["placeholder"],Kc=["innerHTML"],Hc={key:0,class:"sui-upsell-row"},Gc={class:"min-w-full p-0 sui-upsell-notice"},Qc={class:"flex-1"},Nc=["href"],qc={key:1,class:"sui-form-field"},$c={class:"sui-toggle"},Yc=["disabled"],zc={for:"bot_trap_enabled",class:"sui-toggle-label"},Jc={key:0},Zc={class:"sui-border-frame sui-toggle-content margin-bottom-10"},ed=["innerHTML"],td={class:"sui-description"},nd=["href"],od={class:"sui-description"};const id={__name:"ua-lockout",setup:function(e){var t=(0,r.B)(),n=t.__,a=t.sprintf,l=(0,_.I)(),s=l.adminUrl,u=l.siteUrl,c=l.assetUrl,d=l.campaign_url,p=(0,he.X)().is_free,f=xr(),v=Or(),b=(0,i.bP)(f),m=b.model,y=b.misc,g=b.ua_import,k=b.exportUrl,h=b.selectAllBruteForcingTools,w=b.selectAllSecurityScanners,L=b.selectAllSeoCrawlers,R=(0,i.bP)(v).ua,C=(0,o.EW)(function(){return[{key:"user_agents",label:n("User Agents Blocklist and Allowlists"),description:x.value,descType:"html"},{key:"message",label:n("Message"),description:n("Customize the message locked out users will see."),type:"textarea",model:m.value.message},{key:"bot_trap",label:n("User Agent Bot Trap "),description:n("Adds a hidden link to your site’s footer to detect bots that ignore robots.txt. Instantly blocks spam and automated threats — without affecting real visitors."),showPro:p.value,showOpacity:!1,showNew:!p.value},{key:"empty_headers",label:n("Empty Headers"),description:n("Block IP addresses that send POST requests with empty Referer and User-Agent headers."),type:"toggle",toggleLabel:n("Block IP addresses with empty Referer and User-Agent headers"),model:m.value.empty_headers},{key:"import",label:n("Import"),description:n("Import your blocklist and allowlist from another website.")},{key:"export",label:n("Export"),description:n("Export your blocklist and allowlist for use on another website.")}]}),x=(0,o.EW)(function(){var e=n("Control access to your site by choosing which User Agents to block or allow.");return e+="<br>"+a(n('Learn more about <a target="_blank" href="%s">user agents</a>, and why some are bad.'),defender.wpmudev_url+"?utm_source=defender&utm_medium=plugin&utm_campaign=defender_user_agent_banning_docs#user-agent-banning")}),S=(0,o.EW)(function(){return 0===R.value.day?n("User agent banning is enabled. There are no lockouts logged yet."):a(n('There have been %s lockouts in the last 24 hours. <a href="%s"><strong>View log</strong></a>.'),R.value.day,s("admin.php?page=wdf-ip-lockout&view=logs&type=ua_lockout"))}),E=(0,o.EW)(function(){return a(n('This message will be displayed across your website during the lockout period. See a quick preview <a target="_blank" href="%s">here</a>.'),u("?def-lockout-demo=1&type=ua-lockout"))}),j=(0,o.EW)(function(){return n("Add one user agent name per line. We've added a few common legitimate bots/user agents to get you started.")}),P=(0,o.EW)(function(){return n("If the same bot or user agent appears in both the allowlist and blocklist, the allowlist will override the blocklist. Regex support is available for bots and user agents.")}),O=(0,o.EW)(function(){var e="<strong>";return e+=n("Note:"),e+="</strong> ",e+=n("May interfere with uptime checkers or integrations using Python or Go clients. Enable only if you're not relying on such tools.")}),A=(0,o.EW)(function(){return a(n("Choose how to block bots that trigger the trap. Googlebot, Bingbot, and allowlisted IPs are always excluded. %1$sView logs%2$s"),'<a href="'+s("admin.php?page=wdf-ip-lockout&view=logs&type=bot_trap")+'">',"</a>")});return function(e,t){return(0,o.uX)(),(0,o.Wv)(bn.A,{modelValue:(0,o.R1)(m).enabled,"onUpdate:modelValue":t[19]||(t[19]=function(e){return(0,o.R1)(m).enabled=e}),feature:"ua-lockout",title:(0,o.R1)(y).module_name,settings:C.value,"save-action":"save-ua-settings","toggle-action":"toggle-ua",onSaveSettings:(0,o.R1)(f).saveSettings,onToggleFeature:(0,o.R1)(f).toggle,"image-url":(0,o.R1)(c)("assets/img/disabled-module.png")},{"deactivate-message":(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Prevent malicious bots and user-agents from accessing your website by banning them with Defender's User Agent Banning feature.")),1)]}),description:(0,o.k6)(function(){return[(0,o.Lk)("p",null,(0,o.v_)((0,o.R1)(n)("Protect your site by blocking harmful bots and suspicious user agents.")),1),(0,o.bF)(xo.A,{type:(0,o.R1)(R).day>0?"error":"success"},{default:(0,o.k6)(function(){return[(0,o.Lk)("p",{innerHTML:S.value},null,8,hu)]}),_:1},8,["type"])]}),user_agents:(0,o.k6)(function(){return[(0,o.Lk)("div",_u,[(0,o.Lk)("div",wu,[(0,o.Lk)("button",Lu,(0,o.v_)((0,o.R1)(n)("Blocklist")),1),(0,o.Lk)("button",Ru,(0,o.v_)((0,o.R1)(n)("Allowlist")),1)]),(0,o.Lk)("div",Cu,[(0,o.Lk)("div",xu,[(0,o.Lk)("p",Su,(0,o.v_)((0,o.R1)(n)("Block unwanted traffic using recommended presets or your own list of User Agents.")),1),(0,o.Lk)("div",Eu,[(0,o.Lk)("div",{class:(0,o.C4)(["sui-accordion-item",{"sui-accordion-item--disabled":!(0,o.R1)(m).blocklist_presets}])},[(0,o.Lk)("div",ju,[(0,o.Lk)("div",Pu,[(0,o.Lk)("label",Ou,[(0,o.bo)((0,o.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=function(e){return(0,o.R1)(m).blocklist_presets=e}),type:"checkbox",id:"preset-blocklist-id","aria-labelledby":"preset-blocklist-id-label",onClick:t[1]||(t[1]=function(e){return(0,o.R1)(f).toggleBlocklistPresets((0,o.R1)(m).blocklist_presets)})},null,512),[[o.lH,(0,o.R1)(m).blocklist_presets]]),t[20]||(t[20]=(0,o.Lk)("span",{class:"sui-toggle-slider","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",Au,(0,o.v_)((0,o.R1)(n)("Blocklist Presets")),1)]),(0,o.Lk)("span",Tu,(0,o.v_)((0,o.R1)(n)("Recommended")),1)]),t[21]||(t[21]=(0,o.Lk)("div",{class:"sui-accordion-col-auto"},[(0,o.Lk)("button",{class:"sui-button-icon sui-accordion-open-indicator","aria-label":"open-item"},[(0,o.Lk)("span",{class:"sui-icon-chevron-down","aria-hidden":"true"})])],-1))]),(0,o.Lk)("div",Iu,[(0,o.Lk)("div",Wu,[(0,o.Lk)("div",Fu,[(0,o.Lk)("p",Xu,(0,o.v_)((0,o.R1)(n)("Choose which tools and bots to block based on suspicious behavior—like aggressive scanning, brute-force attempts, or repeated site scraping. We’ve preselected some common offenders to help you get started.")),1),(0,o.Lk)("div",Mu,[(0,o.Lk)("label",Du,[(0,o.Lk)("input",{id:"all-brute-forcing-tools",checked:(0,o.R1)(h),"aria-labelledby":"label-all-brute-forcing-tools",type:"checkbox",onChange:t[2]||(t[2]=function(e){return(0,o.R1)(f).toggleSelectAllBruteForcingTools(e.target.checked)})},null,40,Vu),t[22]||(t[22]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",Uu,(0,o.v_)((0,o.R1)(n)("Brute-forcing tools")),1)]),(0,o.Lk)("span",{class:"sui-tooltip sui-tooltip-constrained sui-tooltip-top-center","data-tooltip":(0,o.R1)(n)("Tools that uncover hidden files or paths and test site security using brute-force methods.")},t[23]||(t[23]=[(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-icon-info sui-sm"},null,-1)]),8,Bu)]),(0,o.bF)(ku.A,{modelValue:(0,o.R1)(m).blocklist_preset_values,"onUpdate:modelValue":t[3]||(t[3]=function(e){return(0,o.R1)(m).blocklist_preset_values=e}),options:(0,o.R1)(y).blocklist_presets.brute_forcing_tools,class:"pl-30px",feature:"blocklist_presets_brute_forcing_tools"},null,8,["modelValue","options"]),t[28]||(t[28]=(0,o.Lk)("hr",null,null,-1)),(0,o.Lk)("div",Ku,[(0,o.Lk)("label",Hu,[(0,o.Lk)("input",{id:"all-security-scanners",checked:(0,o.R1)(w),"aria-labelledby":"label-all-security-scanners",type:"checkbox",onChange:t[4]||(t[4]=function(e){return(0,o.R1)(f).toggleSelectAllSecurityScanners(e.target.checked)})},null,40,Gu),t[24]||(t[24]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",Qu,(0,o.v_)((0,o.R1)(n)("Security scanners")),1)]),(0,o.Lk)("span",{class:"sui-tooltip sui-tooltip-constrained sui-tooltip-top-center","data-tooltip":(0,o.R1)(n)("Automated tools that scan for security vulnerabilities.")},t[25]||(t[25]=[(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-icon-info sui-sm"},null,-1)]),8,Nu)]),(0,o.bF)(ku.A,{modelValue:(0,o.R1)(m).blocklist_preset_values,"onUpdate:modelValue":t[5]||(t[5]=function(e){return(0,o.R1)(m).blocklist_preset_values=e}),options:(0,o.R1)(y).blocklist_presets.security_scanners,class:"pl-30px",feature:"blocklist_presets_security_scanners"},null,8,["modelValue","options"]),t[29]||(t[29]=(0,o.Lk)("hr",null,null,-1)),(0,o.Lk)("div",qu,[(0,o.Lk)("label",$u,[(0,o.Lk)("input",{id:"all-seo-crawlers",checked:(0,o.R1)(L),"aria-labelledby":"label-all-seo-crawlers",type:"checkbox",onChange:t[6]||(t[6]=function(e){return(0,o.R1)(f).toggleSelectAllSeoCrawlers(e.target.checked)})},null,40,Yu),t[26]||(t[26]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",zu,(0,o.v_)((0,o.R1)(n)("SEO crawlers")),1)]),(0,o.Lk)("span",{class:"sui-tooltip sui-tooltip-constrained sui-tooltip-top-center","data-tooltip":(0,o.R1)(n)("Bots that crawl your site too often, affecting performance and using up bandwidth.")},t[27]||(t[27]=[(0,o.Lk)("span",{"aria-hidden":"true",class:"sui-icon-info sui-sm"},null,-1)]),8,Ju)]),(0,o.bF)(ku.A,{modelValue:(0,o.R1)(m).blocklist_preset_values,"onUpdate:modelValue":t[7]||(t[7]=function(e){return(0,o.R1)(m).blocklist_preset_values=e}),options:(0,o.R1)(y).blocklist_presets.seo_crawlers,class:"pl-30px",feature:"blocklist_presets_seo_crawlers"},null,8,["modelValue","options"])])])])],2),(0,o.Lk)("div",{class:(0,o.C4)(["sui-accordion-item",{"sui-accordion-item--disabled":!(0,o.R1)(m).script_presets}])},[(0,o.Lk)("div",Zu,[(0,o.Lk)("div",ec,[(0,o.Lk)("label",tc,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":t[8]||(t[8]=function(e){return(0,o.R1)(m).script_presets=e}),id:"preset-scripts-id","aria-labelledby":"preset-scripts-id-label",onClick:t[9]||(t[9]=function(e){return(0,o.R1)(f).toggleScriptPresets((0,o.R1)(m).script_presets)})},null,512),[[o.lH,(0,o.R1)(m).script_presets]]),t[30]||(t[30]=(0,o.Lk)("span",{class:"sui-toggle-slider","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",nc,(0,o.v_)((0,o.R1)(n)("Scripts Presets")),1)])]),t[31]||(t[31]=(0,o.Lk)("div",{class:"sui-accordion-col-auto"},[(0,o.Lk)("button",{class:"sui-button-icon sui-accordion-open-indicator","aria-label":"open-item"},[(0,o.Lk)("span",{class:"sui-icon-chevron-down","aria-hidden":"true"})])],-1))]),(0,o.Lk)("div",oc,[(0,o.Lk)("div",ic,[(0,o.Lk)("div",rc,[(0,o.Lk)("p",ac,(0,o.v_)((0,o.R1)(n)("Select which scripts to block to reduce unwanted traffic.")),1),(0,o.Lk)("div",lc,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)((0,o.R1)(y).script_presets,function(e,n){return(0,o.uX)(),(0,o.CE)("div",sc,[(0,o.Lk)("label",{for:"".concat(n,"-id"),class:"sui-checkbox"},[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":t[10]||(t[10]=function(e){return(0,o.R1)(m).script_preset_values=e}),value:"".concat(n),id:"".concat(n,"-id"),name:"script_presets","aria-labelledby":"".concat(n,"-label")},null,8,cc),[[o.lH,(0,o.R1)(m).script_preset_values]]),t[32]||(t[32]=(0,o.Lk)("span",{"aria-hidden":"true"},null,-1)),(0,o.Lk)("span",{class:(0,o.C4)("".concat(n,"-label"))},(0,o.v_)(e.label),3),(0,o.Lk)("span",dc,(0,o.v_)(e.desc),1)],8,uc)])}),256))]),(0,o.Lk)("div",pc,[(0,o.Lk)("div",fc,[(0,o.Lk)("div",vc,[t[33]||(t[33]=(0,o.Lk)("span",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:O.value},null,8,bc)])])])])])])],2),(0,o.Lk)("div",mc,[(0,o.Lk)("div",yc,[(0,o.Lk)("div",gc,[(0,o.Lk)("span",kc,(0,o.v_)((0,o.R1)(n)("Custom User Agents")),1)]),t[34]||(t[34]=(0,o.Lk)("div",{class:"sui-accordion-col-auto"},[(0,o.Lk)("button",{class:"sui-button-icon sui-accordion-open-indicator","aria-label":"open-item"},[(0,o.Lk)("span",{class:"sui-icon-chevron-down","aria-hidden":"true"})])],-1))]),(0,o.Lk)("div",hc,[(0,o.Lk)("div",_c,[(0,o.Lk)("div",wc,[(0,o.Lk)("p",Lc,(0,o.v_)((0,o.R1)(n)("Block additional User Agents that aren’t covered by presets by adding them below.")),1),(0,o.Lk)("div",Rc,[(0,o.Lk)("span",Cc,(0,o.v_)((0,o.R1)(n)("Blocklist (Enter one user agent per line)")),1)]),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control","onUpdate:modelValue":t[11]||(t[11]=function(e){return(0,o.R1)(m).blacklist=e}),placeholder:(0,o.R1)(n)("Add user agents here, one per line"),id:"blacklist_user_agents",name:"blacklist_user_agents",rows:"8"},null,8,xc),[[o.Jo,(0,o.R1)(m).blacklist]])])])])])]),(0,o.Lk)("div",Sc,[(0,o.Lk)("div",Ec,[(0,o.Lk)("div",jc,[(0,o.Lk)("div",Pc,[t[35]||(t[35]=(0,o.Lk)("span",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:P.value},null,8,Oc)])])])])]),(0,o.Lk)("div",Ac,[(0,o.Lk)("p",Tc,(0,o.v_)((0,o.R1)(n)("Any user agents you list here will be allowed to access your website.")),1),(0,o.Lk)("label",Ic,(0,o.v_)((0,o.R1)(n)("Allowlist")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control","onUpdate:modelValue":t[12]||(t[12]=function(e){return(0,o.R1)(m).whitelist=e}),placeholder:(0,o.R1)(n)("Add user agents here, one per line"),id:"whitelist_user_agents",rows:"8"},null,8,Wc),[[o.Jo,(0,o.R1)(m).whitelist]]),(0,o.Lk)("p",{class:"sui-description",innerHTML:j.value},null,8,Fc),(0,o.Lk)("div",Xc,[(0,o.Lk)("div",Mc,[(0,o.Lk)("div",Dc,[t[36]||(t[36]=(0,o.Lk)("i",{class:"sui-notice-icon sui-icon-info sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("p",{innerHTML:P.value},null,8,Vc)])])])])])])]}),message:(0,o.k6)(function(){return[(0,o.Lk)("label",Uc,(0,o.v_)((0,o.R1)(n)("Custom message")),1),(0,o.bo)((0,o.Lk)("textarea",{class:"sui-form-control","onUpdate:modelValue":t[13]||(t[13]=function(e){return(0,o.R1)(m).message=e}),placeholder:(0,o.R1)(n)("Enter your custom message here"),rows:"2"},null,8,Bc),[[o.Jo,(0,o.R1)(m).message]]),(0,o.Lk)("p",{class:"sui-description",innerHTML:E.value},null,8,Kc)]}),bot_trap:(0,o.k6)(function(){return[(0,o.R1)(p)?((0,o.uX)(),(0,o.CE)("div",Hc,[(0,o.Lk)("div",Gc,[(0,o.Lk)("p",Qc,[(0,o.eW)((0,o.v_)((0,o.R1)(n)("This feature requires Defender Pro and WPMU DEV membership.")),1),t[38]||(t[38]=(0,o.Lk)("br",null,null,-1)),(0,o.Lk)("a",{class:"bot-trap-upsell-link text-purple",target:"_blank",href:(0,o.R1)(d)("defender_firewall_bottrap_upgrade")},[(0,o.eW)((0,o.v_)((0,o.R1)(n)("Unlock with Pro"))+" ",1),t[37]||(t[37]=(0,o.Lk)("span",{class:"sui-icon-open-new-window","aria-hidden":"true"},null,-1))],8,Nc)])])])):((0,o.uX)(),(0,o.CE)("div",qc,[(0,o.Lk)("label",$c,[(0,o.bo)((0,o.Lk)("input",{type:"checkbox","onUpdate:modelValue":t[14]||(t[14]=function(e){return(0,o.R1)(m).bot_trap_enabled=e}),id:"bot_trap_enabled",disabled:(0,o.R1)(p),name:"bot_trap_enabled"},null,8,Yc),[[o.lH,(0,o.R1)(m).bot_trap_enabled]]),t[39]||(t[39]=(0,o.Lk)("span",{class:"sui-toggle-slider"},null,-1)),(0,o.Lk)("span",zc,(0,o.v_)((0,o.R1)(n)("Enable Bot Trap")),1)]),!(0,o.R1)(p)&&(0,o.R1)(m).bot_trap_enabled?((0,o.uX)(),(0,o.CE)("div",Jc,[(0,o.Lk)("div",Zc,[(0,o.Lk)("p",{class:"sui-p-small margin-bottom-15",innerHTML:A.value},null,8,ed),(0,o.bF)(vo.A,{modelValue:(0,o.R1)(m).bot_trap_lockout_type,"onUpdate:modelValue":t[15]||(t[15]=function(e){return(0,o.R1)(m).bot_trap_lockout_type=e}),label:(0,o.R1)(n)("Action on bot detection"),options:[{value:"temporary",label:n("Temporary Block for 300 seconds")},{value:"permanent",label:n("Permanent Block")}],searchable:!1},null,8,["modelValue","label","options"])])])):(0,o.Q3)("",!0)]))]}),empty_headers:(0,o.k6)(function(){return[(0,o.bF)(Al.A,{modelValue:(0,o.R1)(m).empty_headers,"onUpdate:modelValue":t[16]||(t[16]=function(e){return(0,o.R1)(m).empty_headers=e}),label:(0,o.R1)(n)("Block IP addresses with empty Referer and User-Agent headers"),feature:"ua-empty-headers"},null,8,["modelValue","label"])]}),import:(0,o.k6)(function(){return[(0,o.bF)(Wo,{label:(0,o.R1)(n)("Upload the blocklist and allowlist CSV file exported from another website."),modelValue:(0,o.R1)(g),"onUpdate:modelValue":t[17]||(t[17]=function(e){return(0,o.i9)(g)?g.value=e:null})},null,8,["label","modelValue"]),(0,o.bF)(He.A,{label:(0,o.R1)(n)("Import"),action:"import",type:"button",disabled:!(0,o.R1)(g).id,variant:"outlined",icon:"sui-icon-download-cloud",onClick:t[18]||(t[18]=function(e){return(0,o.R1)(f).importUa()})},null,8,["label","disabled"]),(0,o.Lk)("span",td,(0,o.v_)((0,o.R1)(n)("Note: Imported user agents will be added to the existing blocklist and allowlist.")),1)]}),export:(0,o.k6)(function(){return[(0,o.Lk)("a",{href:(0,o.R1)(y).no_ua?"#":(0,o.R1)(k),class:(0,o.C4)(["sui-button sui-button-outlined export",{disabled:(0,o.R1)(y).no_ua}])},[t[40]||(t[40]=(0,o.Lk)("i",{class:"sui-icon-upload-cloud","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(n)("Export")),1)],10,nd),(0,o.Lk)("span",od,(0,o.v_)((0,o.R1)(n)("The export will include both the blocklist and allowlist.")),1)]}),_:1},8,["modelValue","title","settings","onSaveSettings","onToggleFeature","image-url"])}}};var rd=n(3997),ad={insert:"head",singleton:!1};be()(rd.A,ad);rd.A.locals;const ld=(0,ge.A)(id,[["__scopeId","data-v-0b6f387e"]]);var sd={class:"sui-modal sui-modal-sm"},ud={role:"dialog",id:"modal-site-connected",class:"sui-modal-content","aria-modal":"true","aria-labelledby":"modal-title-modal-site-connected","aria-describedby":"modal-description-modal-site-connected"},cd={class:"text-center sui-box"},dd={class:"py-16 sui-box-body space-y-30px px-30px"},pd=["innerHTML"];const fd={__name:"connected-firewall-modal",props:{page:{type:String,required:!0}},setup:function(e){var t=(0,r.B)(),n=t.__,i=t.sprintf,a=e,s=(0,l.k)(),u=F(),c=(0,o.KR)(""),d=(0,o.EW)(function(){return{"global-ip":i(n("%1$sCongratulations!%2$s Your site is connected to the WPMU DEV Hub and %1$sAntiBot%2$s global firewall is active."),"<strong>","</strong>"),blocklist:i(n("%1$sCongratulations!%2$s Your site is connected to the Hub. You can now sync your site's %1$sIP Allow/Block list%2$s with the %1$sHub%2$s."),"<strong>","</strong>")}[a.page]||a.page}),p=function(){s.checkConnection().then(function(e){e&&("blocklist"===a.page&&u.activate(),jQuery(document).ready(function(){SUI.openModal("modal-site-connected",jQuery(".iplockout"),void 0,!1,!0)}))})},f=function(){"undefined"!=typeof SUI&&"function"==typeof SUI.closeModal&&SUI.closeModal()};return(0,o.KC)(function(){["global-ip","blocklist"].includes(a.page)&&(c.value=d.value,p())}),function(e,t){return(0,o.uX)(),(0,o.CE)("div",sd,[(0,o.Lk)("div",ud,[(0,o.Lk)("div",cd,[(0,o.Lk)("div",dd,[(0,o.Lk)("div",null,[t[0]||(t[0]=(0,o.Lk)("span",{class:"sui-icon-check-tick sui-success sui-xl","aria-hidden":"true"},null,-1)),(0,o.Lk)("h2",null,(0,o.v_)((0,o.R1)(n)("Site connected successfully!")),1),(0,o.Lk)("p",{class:"text-base leading-22px",innerHTML:c.value},null,8,pd)]),(0,o.Lk)("button",{class:"sui-button sui-button-blue",type:"button",onClick:(0,o.D$)(f,["prevent"])},(0,o.v_)((0,o.R1)(n)("Close")),1)])])])])}}};var vd={class:"sui-summary-segment"},bd={class:"sui-summary-details"},md={class:"sui-row"},yd={class:"sui-col"},gd={class:"sui-summary-large"},kd=["data-tooltip"],hd={class:"sui-summary-sub"},_d=["innerHTML"],wd=["innerHTML"],Ld={key:1,class:"block font-medium"},Rd={class:"sui-col"},Cd={class:"sui-summary-large"},xd=["data-tooltip"],Sd={class:"sui-summary-sub"},Ed=["innerHTML"],jd={class:"block font-medium"},Pd={class:"sui-summary-segment"},Od={class:"sui-list"},Ad={class:"sui-list-label"},Td=["data-tooltip"],Id={class:"sui-list-detail"},Wd={key:2,class:"sui-tag sui-tag-blue"},Fd={class:"sui-list-label"},Xd={class:"sui-list-detail"},Md={key:0,class:"sui-tag sui-tag-blue"},Dd={key:1,class:"sui-tag inactive"},Vd={key:0,class:"local-summary"},Ud={class:"sui-row"},Bd={class:"sui-col"},Kd={class:"mb-10px"},Hd={key:0,class:"sui-tag"},Gd={key:1,class:"sui-tag"},Qd={class:"sui-col"},Nd={class:"mb-10px"},qd={key:0,class:"sui-tag"},$d={key:1,class:"sui-tag"},Yd={class:"sui-col"},zd={class:"mb-10px"},Jd={key:0,class:"sui-tag"},Zd={key:1,class:"sui-tag"};const ep={__name:"summary-box",setup:function(e){var t=(0,S.p)(),n=t.maybeHideBranding,i=t.whitelabelHeroImage,a=t.backgroundImageStyle,s=(0,r.B)(),u=s.__,d=s.sprintf,p=(0,c.h)().formatNumber,f=(0,l.k)(),v=k(),b=sr(),m=yr(),y=xr(),g=Or(),h=g.isFullyActive,_=g.isPartiallyActive,w=g.login,L=g.nf,R=g.ua,C=g.activateLockouts,x=(0,o.EW)(function(){return f.isSiteConnected}),E=(0,o.EW)(function(){return x.value?p(v.misc.ips_count):0}),j=(0,o.EW)(function(){if(!h&&!_)return"_";var e=b.isActive?parseInt(w.month):0,t=m.isActive?parseInt(L.month):0,n=y.isActive?parseInt(R.month):0;return p(e+t+n)}),P=(0,o.EW)(function(){return d(u("Malicious IPs blocked by %s"),['<strong class="block">'.concat(v.misc.module_name,"</strong>")])}),O=(0,o.EW)(function(){return d(u("%s is not active"),[v.misc.module_name])}),A=(0,o.EW)(function(){return d(u("Malicious IPs Blocked by %s"),['<strong class="block">'.concat(u("Local Firewall"),"</strong>")])});function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={"antibot-active":v.misc.active_tooltip_text,"antibot-inactive":v.misc.inactive_tooltip_text};return e?t[e]:u("Malicious IPs blocked by Local Firewall in the last 30 days.")}function I(){v.activate()}return function(e,t){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-box sui-summary",{"sui-rebranded":(0,o.R1)(n)&&(0,o.R1)(i)}])},[(0,o.Lk)("div",{class:"sui-summary-image-space","aria-hidden":"true",style:(0,o.Tr)((0,o.R1)(a))},null,4),(0,o.Lk)("div",vd,[(0,o.Lk)("div",bd,[(0,o.Lk)("div",md,[(0,o.Lk)("div",yd,[(0,o.Lk)("span",gd,(0,o.v_)(E.value),1),x.value&&(0,o.R1)(v).misc.frontend_is_enabled?((0,o.uX)(),(0,o.CE)("span",{key:0,class:"sui-tooltip sui-tooltip-constrained","data-tooltip":T("antibot-active")},t[1]||(t[1]=[(0,o.Lk)("i",{"aria-hidden":"true",class:"sui-icon-info"},null,-1)]),8,kd)):(0,o.Q3)("",!0),(0,o.Lk)("span",hd,[(0,o.Lk)("span",{innerHTML:P.value},null,8,_d),x.value&&(0,o.R1)(v).misc.frontend_is_enabled?((0,o.uX)(),(0,o.CE)("i",Ld,(0,o.v_)((0,o.R1)(u)("In the past 12 hours")),1)):((0,o.uX)(),(0,o.CE)("i",{key:0,class:"block font-medium",innerHTML:O.value},null,8,wd))])]),(0,o.Lk)("div",Rd,[(0,o.Lk)("span",Cd,(0,o.v_)(j.value),1),(0,o.Lk)("span",{class:"sui-tooltip sui-tooltip-constrained","data-tooltip":T()},t[2]||(t[2]=[(0,o.Lk)("i",{"aria-hidden":"true",class:"sui-icon-info"},null,-1)]),8,xd),(0,o.Lk)("span",Sd,[(0,o.Lk)("span",{innerHTML:A.value},null,8,Ed),(0,o.Lk)("i",jd,(0,o.v_)((0,o.R1)(u)("In the last 30 days")),1)])])])])]),(0,o.Lk)("div",Pd,[(0,o.Lk)("ul",Od,[(0,o.Lk)("li",null,[(0,o.Lk)("span",Ad,[(0,o.eW)((0,o.v_)((0,o.R1)(v).misc.module_name)+" ",1),(0,o.R1)(v).misc.is_active?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("span",{key:0,class:"sui-tooltip sui-tooltip-constrained ml-5px","data-tooltip":T("antibot-inactive")},t[3]||(t[3]=[(0,o.Lk)("i",{class:"sui-icon-info sui-warning"},null,-1)]),8,Td))]),(0,o.Lk)("span",Id,[x.value?(0,o.R1)(v).misc.frontend_is_enabled?((0,o.uX)(),(0,o.CE)("span",Wd,(0,o.v_)((0,o.R1)(u)("Active")),1)):((0,o.uX)(),(0,o.Wv)(He.A,{key:1,action:"activate-antibot",variant:"blue",onClick:I},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(u)("Activate")),1)]}),_:1})):((0,o.uX)(),(0,o.Wv)(He.A,{key:0,action:"init-hub-connection",variant:"blue",onClick:t[0]||(t[0]=function(e){return(0,o.R1)(v).misc.module_name,t=(0,o.R1)(v).misc.module_slug,void f.initHubConnectionFlow({page:t,module_slug:t,is_summary:!0});var t})},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(u)("Connect site")),1)]}),_:1}))])]),(0,o.Lk)("li",null,[(0,o.Lk)("span",Fd,(0,o.v_)((0,o.R1)(u)("Local Firewall")),1),(0,o.Lk)("span",Xd,[(0,o.R1)(h)?((0,o.uX)(),(0,o.CE)("span",Md,(0,o.v_)((0,o.R1)(u)("Active")),1)):(0,o.R1)(_)?((0,o.uX)(),(0,o.CE)("span",Dd,(0,o.v_)((0,o.R1)(u)("Active")),1)):((0,o.uX)(),(0,o.Wv)(He.A,{key:2,action:"activate-lockouts",variant:"blue",onClick:(0,o.R1)(C)},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(u)("Activate")),1)]}),_:1},8,["onClick"]))])]),(0,o.R1)(h)||(0,o.R1)(_)?((0,o.uX)(),(0,o.CE)("li",Vd,[t[4]||(t[4]=(0,o.Lk)("i",{class:"arrow-up"},null,-1)),(0,o.Lk)("div",Ud,[(0,o.Lk)("div",Bd,[(0,o.Lk)("div",Kd,(0,o.v_)((0,o.R1)(u)("Login Lockout")),1),(0,o.R1)(b).isActive?((0,o.uX)(),(0,o.CE)("span",Hd,(0,o.v_)((0,o.R1)(w).month),1)):((0,o.uX)(),(0,o.CE)("span",Gd,(0,o.v_)((0,o.R1)(u)("Inactive")),1))]),(0,o.Lk)("div",Qd,[(0,o.Lk)("div",Nd,(0,o.v_)((0,o.R1)(u)("404 Lockout")),1),(0,o.R1)(m).isActive?((0,o.uX)(),(0,o.CE)("span",qd,(0,o.v_)((0,o.R1)(L).month),1)):((0,o.uX)(),(0,o.CE)("span",$d,(0,o.v_)((0,o.R1)(u)("Inactive")),1))]),(0,o.Lk)("div",Yd,[(0,o.Lk)("div",zd,(0,o.v_)((0,o.R1)(u)("User Agent Lockout")),1),(0,o.R1)(y).isActive?((0,o.uX)(),(0,o.CE)("span",Jd,(0,o.v_)((0,o.R1)(R).month),1)):((0,o.uX)(),(0,o.CE)("span",Zd,(0,o.v_)((0,o.R1)(u)("Inactive")),1))])])])):(0,o.Q3)("",!0)])])],2)}}},tp={__name:"ip-lockout",setup:function(e){var t=(0,r.B)().__,n=k(),i=(0,o.EW)(function(){return[{heading:t("Global Firewall")},{id:"global-ip",label:t("AntiBot"),icon:n.isEnabled?"":"sui-icon-info sui-warning"},{heading:t("Local Firewall")},{id:"blocklist",label:t("Local Blocklist")},{id:"login",label:t("Login Protection")},{id:"404",label:t("404 Detection")},{id:"ua-lockout",label:t("User Agent Banning")},{id:"logs",label:t("Logs")},{id:"settings",label:t("Settings")}]});return function(e,n){return(0,o.uX)(),(0,o.Wv)(a.A,{title:(0,o.R1)(t)("Firewall"),feature:"firewall","page-class":"iplockout","doc-link":"?utm_source=defender&utm_medium=plugin&utm_campaign=defender_firewall_docs#firewall",tabs:i.value,"default-tab":"global-ip",boxed:!1},{summary:(0,o.k6)(function(){return[(0,o.bF)(ep)]}),"global-ip":(0,o.k6)(function(){return[(0,o.bF)(nn)]}),blocklist:(0,o.k6)(function(){return[(0,o.bF)(Zi)]}),login:(0,o.k6)(function(){return[(0,o.bF)(Nr)]}),404:(0,o.k6)(function(){return[(0,o.bF)(vs)]}),"ua-lockout":(0,o.k6)(function(){return[(0,o.bF)(ld)]}),logs:(0,o.k6)(function(){return[(0,o.bF)(Ol)]}),settings:(0,o.k6)(function(){return[(0,o.bF)((0,o.R1)(gu))]}),default:(0,o.k6)(function(){return[(0,o.bF)(fd,{page:e.page},null,8,["page"])]}),_:1},8,["title","tabs"])}}};var np=(0,o.Ef)(tp);np.use((0,i.Ey)()),np.mount("#defender")},4916:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var o=n(1751);function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function l(n,o,i,a){var l=o&&o.prototype instanceof u?o:u,c=Object.create(l.prototype);return r(c,"_invoke",function(n,o,i){var r,a,l,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,a=0,l=e,p.n=n,s}};function f(n,o){for(a=n,l=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(l=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(a=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,a=0))}if(i||n>1)return s;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),a=c,l=v;(t=a<2?e:l)||!d;){r||(a?a<3?(a>1&&(p.n=-1),f(a,l)):p.n=l:p.v=l);try{if(u=2,r){if(a||(i="next"),t=r[i]){if(!(t=t.call(r,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=r.return)&&t.call(r),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);r=e}else if((t=(d=p.n<0)?l:n.call(o,p))!==s)break}catch(t){r=e,a=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,a),!0),c}var s={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(r(t={},o,function(){return this}),t),f=d.prototype=u.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,r(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=d,r(f,"constructor",d),r(d,"constructor",c),c.displayName="GeneratorFunction",r(d,a,"GeneratorFunction"),r(f),r(f,a,"Generator"),r(f,o,function(){return this}),r(f,"toString",function(){return"[object Generator]"}),(i=function(){return{w:l,m:v}})()}function r(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}r=function(e,t,n,o){function a(t,n){r(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},r(e,t,n,o)}function a(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}var l=(0,n(810).nY)("analyticsTracking",function(){function e(){var t;return t=i().m(function e(t){var n,r,a,l;return i().w(function(e){for(;;)switch(e.n){case 0:if(a=null===(n=defender)||void 0===n||null===(n=n.routes)||void 0===n?void 0:n.track_feature_handler,l=null===(r=defender)||void 0===r||null===(r=r.nonces)||void 0===r?void 0:r.track_feature_handler,!a||!l){e.n=2;break}return e.n=1,(0,o.q)().post(a,l,t);case 1:return e.a(2,e.v);case 2:return e.a(2)}},e)}),e=function(){var e=this,n=arguments;return new Promise(function(o,i){var r=t.apply(e,n);function l(e){a(r,o,i,l,s,"next",e)}function s(e){a(r,o,i,l,s,"throw",e)}l(void 0)})},e.apply(this,arguments)}return{trackFeature:function(t){return e.apply(this,arguments)}}})},5358:(e,t,n)=>{var o={"./af":5177,"./af.js":5177,"./ar":1509,"./ar-dz":1488,"./ar-dz.js":1488,"./ar-kw":8676,"./ar-kw.js":8676,"./ar-ly":2353,"./ar-ly.js":2353,"./ar-ma":4496,"./ar-ma.js":4496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":2682,"./ar-sa.js":2682,"./ar-tn":9756,"./ar-tn.js":9756,"./ar.js":1509,"./az":5533,"./az.js":5533,"./be":8959,"./be.js":8959,"./bg":7777,"./bg.js":7777,"./bm":4903,"./bm.js":4903,"./bn":1290,"./bn-bd":7357,"./bn-bd.js":7357,"./bn.js":1290,"./bo":1545,"./bo.js":1545,"./br":1470,"./br.js":1470,"./bs":4429,"./bs.js":4429,"./ca":7306,"./ca.js":7306,"./cs":6464,"./cs.js":6464,"./cv":3635,"./cv.js":3635,"./cy":4226,"./cy.js":4226,"./da":3601,"./da.js":3601,"./de":7853,"./de-at":6111,"./de-at.js":6111,"./de-ch":4697,"./de-ch.js":4697,"./de.js":7853,"./dv":708,"./dv.js":708,"./el":4691,"./el.js":4691,"./en-au":3872,"./en-au.js":3872,"./en-ca":8298,"./en-ca.js":8298,"./en-gb":6195,"./en-gb.js":6195,"./en-ie":6584,"./en-ie.js":6584,"./en-il":5543,"./en-il.js":5543,"./en-in":9033,"./en-in.js":9033,"./en-nz":9402,"./en-nz.js":9402,"./en-sg":3004,"./en-sg.js":3004,"./eo":2934,"./eo.js":2934,"./es":7650,"./es-do":838,"./es-do.js":838,"./es-mx":7730,"./es-mx.js":7730,"./es-us":6575,"./es-us.js":6575,"./es.js":7650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":527,"./fi.js":527,"./fil":5995,"./fil.js":5995,"./fo":2477,"./fo.js":2477,"./fr":5498,"./fr-ca":6435,"./fr-ca.js":6435,"./fr-ch":7892,"./fr-ch.js":7892,"./fr.js":5498,"./fy":7071,"./fy.js":7071,"./ga":1734,"./ga.js":1734,"./gd":217,"./gd.js":217,"./gl":7329,"./gl.js":7329,"./gom-deva":2124,"./gom-deva.js":2124,"./gom-latn":3383,"./gom-latn.js":3383,"./gu":5050,"./gu.js":5050,"./he":1713,"./he.js":1713,"./hi":3861,"./hi.js":3861,"./hr":6308,"./hr.js":6308,"./hu":609,"./hu.js":609,"./hy-am":7160,"./hy-am.js":7160,"./id":4063,"./id.js":4063,"./is":9374,"./is.js":9374,"./it":8383,"./it-ch":1827,"./it-ch.js":1827,"./it.js":8383,"./ja":3827,"./ja.js":3827,"./jv":9722,"./jv.js":9722,"./ka":1794,"./ka.js":1794,"./kk":7088,"./kk.js":7088,"./km":6870,"./km.js":6870,"./kn":4451,"./kn.js":4451,"./ko":3164,"./ko.js":3164,"./ku":8174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":8174,"./ky":8474,"./ky.js":8474,"./lb":9680,"./lb.js":9680,"./lo":5867,"./lo.js":5867,"./lt":5766,"./lt.js":5766,"./lv":9532,"./lv.js":9532,"./me":8076,"./me.js":8076,"./mi":1848,"./mi.js":1848,"./mk":306,"./mk.js":306,"./ml":3739,"./ml.js":3739,"./mn":9053,"./mn.js":9053,"./mr":6169,"./mr.js":6169,"./ms":3386,"./ms-my":2297,"./ms-my.js":2297,"./ms.js":3386,"./mt":7075,"./mt.js":7075,"./my":2264,"./my.js":2264,"./nb":2274,"./nb.js":2274,"./ne":8235,"./ne.js":8235,"./nl":2572,"./nl-be":3784,"./nl-be.js":3784,"./nl.js":2572,"./nn":4566,"./nn.js":4566,"./oc-lnc":9330,"./oc-lnc.js":9330,"./pa-in":9849,"./pa-in.js":9849,"./pl":4418,"./pl.js":4418,"./pt":9834,"./pt-br":8303,"./pt-br.js":8303,"./pt.js":9834,"./ro":4457,"./ro.js":4457,"./ru":2271,"./ru.js":2271,"./sd":1221,"./sd.js":1221,"./se":3478,"./se.js":3478,"./si":7538,"./si.js":7538,"./sk":5784,"./sk.js":5784,"./sl":6637,"./sl.js":6637,"./sq":6794,"./sq.js":6794,"./sr":5719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":5719,"./ss":6e3,"./ss.js":6e3,"./sv":1011,"./sv.js":1011,"./sw":748,"./sw.js":748,"./ta":1025,"./ta.js":1025,"./te":1885,"./te.js":1885,"./tet":8861,"./tet.js":8861,"./tg":6571,"./tg.js":6571,"./th":5802,"./th.js":5802,"./tk":9527,"./tk.js":9527,"./tl-ph":9231,"./tl-ph.js":9231,"./tlh":1052,"./tlh.js":1052,"./tr":5096,"./tr.js":5096,"./tzl":9846,"./tzl.js":9846,"./tzm":1765,"./tzm-latn":7711,"./tzm-latn.js":7711,"./tzm.js":1765,"./ug-cn":8414,"./ug-cn.js":8414,"./uk":6618,"./uk.js":6618,"./ur":158,"./ur.js":158,"./uz":7609,"./uz-latn":2475,"./uz-latn.js":2475,"./uz.js":7609,"./vi":1135,"./vi.js":1135,"./x-pseudo":4051,"./x-pseudo.js":4051,"./yo":2218,"./yo.js":2218,"./zh-cn":2648,"./zh-cn.js":2648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":1541,"./zh-mo.js":1541,"./zh-tw":304,"./zh-tw.js":304};function i(e){var t=r(e);return n(t)}function r(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}i.keys=function(){return Object.keys(o)},i.resolve=r,e.exports=i,i.id=5358},5541:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,".sui-2-12-24 .sui-wrap select.sui-select+.sui-select .selection span[role=combobox].select2-selection--multiple{padding-left:3rem}",""]);const r=i},5592:(e,t,n)=>{"use strict";n.d(t,{B:()=>r});var o=n(4005),i=new o.FilterXSS({whiteList:{a:["href","title","target"],span:["class"],strong:[]},safeAttrValue:function(e,t,n){return"a"===e&&"href"===t&&"%s"===n?"%s":(0,o.safeAttrValue)(e,t,n)}}),r=function(){var e=wp.i18n;return{__:function(t){return i.process(e.__(t,"defender-security"))},_n:function(t,n,o){return i.process(e._n(t,n,o,"defender-security"))},xss:function(e){return i.process(e)},sprintf:function(){return e.sprintf.apply(e,arguments)}}}},5658:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var o=n(9726),i=n(7786),r=n(2720);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,l=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var s=["tabindex","innerHTML"],u=["tabindex","innerHTML"],c=["onClick","onKeyup"],d=["tabindex","innerHTML"],p=["tabindex","innerHTML"],f=["innerHTML"],v=["innerHTML"],b=["onClick","onKeyup"],m=["innerHTML"],y=["innerHTML"];const g={__name:"pagination",props:{modelValue:Number,pageCount:{type:Number,required:!0},forcePage:Number,clickHandler:{type:Function,default:function(){}},pageRange:{type:Number,default:3},marginPages:{type:Number,default:1},prevText:{type:String,default:"Prev"},nextText:{type:String,default:"Next"},breakViewText:{type:String,default:"…"},containerClass:String,pageClass:String,pageLinkClass:String,prevClass:String,prevLinkClass:String,nextClass:String,nextLinkClass:String,breakViewClass:String,breakViewLinkClass:String,activeClass:{type:String,default:"active"},disabledClass:{type:String,default:"disabled"},noLiSurround:{type:Boolean,default:!1},firstLastButton:{type:Boolean,default:!1},firstButtonText:{type:String,default:"First"},lastButtonText:{type:String,default:"Last"},hidePrevNext:{type:Boolean,default:!1}},emits:["update:modelValue","input"],setup:function(e,t){var n=t.expose,l=t.emit,g=e,k=l,h=(0,i.hRP)(g,"modelValue",k,{defaultValue:(0,i.Mjh)("pagination-selected",1)});(0,o.wB)(function(){return g.forcePage},function(e){void 0!==e&&e!==h.value&&(h.value=e)});var _=(0,o.EW)(function(){var e={},t=h.value,n=Math.floor(g.pageRange/2),o=function(n){e[n]={index:n,content:n+1,selected:n===t-1}},i=function(t){e[t]={disabled:!0,breakView:!0}};if(g.pageCount<=g.pageRange){for(var r=0;r<g.pageCount;r++)o(r);return e}for(var a=0;a<g.marginPages;a++)o(a);var l=Math.max(0,t-1-n),s=l+g.pageRange-1;s>=g.pageCount&&(s=g.pageCount-1,l=Math.max(0,s-g.pageRange+1));for(var u=l;u<=s;u++)o(u);l>g.marginPages&&i(l-1),s+1<g.pageCount-g.marginPages&&i(s+1);for(var c=g.pageCount-1;c>=g.pageCount-g.marginPages;c--)o(c);return e}),w=(0,r.k3)(function(e){g.clickHandler(e)},300),L=function(e){e!==h.value&&(h.value=e,k("update:modelValue",e),k("input",e),w(e))},R=function(){h.value>1&&L(h.value-1)},C=function(){h.value<g.pageCount&&L(h.value+1)},x=function(){return 1===h.value},S=function(){return h.value===g.pageCount||0===g.pageCount},E=function(){h.value>1&&L(1)},j=function(){h.value<g.pageCount&&L(g.pageCount)},P=a((0,r.eY)(),1)[0],O=(0,o.KR)(null);return(0,i.X2F)(O,function(){P.value=!1}),(0,i.MLh)("keydown",function(e){"ArrowLeft"===e.key&&R(),"ArrowRight"===e.key&&C()}),n({prevPage:R,nextPage:C,firstPageSelected:x,lastPageSelected:S,selectFirstPage:E,selectLastPage:j}),function(t,n){return e.noLiSurround?((0,o.uX)(),(0,o.CE)("div",{key:1,class:(0,o.C4)(e.containerClass)},[e.firstLastButton?((0,o.uX)(),(0,o.CE)("a",{key:0,onClick:n[8]||(n[8]=function(e){return E()}),onKeyup:n[9]||(n[9]=(0,o.jR)(function(e){return E()},["enter"])),class:(0,o.C4)([e.pageLinkClass,x()?e.disabledClass:""]),tabindex:"0",innerHTML:e.firstButtonText},null,42,f)):(0,o.Q3)("",!0),x()&&e.hidePrevNext?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("a",{key:1,onClick:n[10]||(n[10]=function(e){return R()}),onKeyup:n[11]||(n[11]=(0,o.jR)(function(e){return R()},["enter"])),class:(0,o.C4)([e.prevLinkClass,x()?e.disabledClass:""]),tabindex:"0",innerHTML:e.prevText},null,42,v)),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(_.value,function(n,i){return(0,o.uX)(),(0,o.CE)(o.FK,{key:i},[n.breakView?((0,o.uX)(),(0,o.CE)("a",{key:0,class:(0,o.C4)([e.pageLinkClass,e.breakViewLinkClass,n.disabled?e.disabledClass:""]),tabindex:"0"},[(0,o.RG)(t.$slots,"breakViewContent",{},function(){return[(0,o.eW)((0,o.v_)(e.breakViewText),1)]})],2)):n.disabled?((0,o.uX)(),(0,o.CE)("a",{key:1,class:(0,o.C4)([e.pageLinkClass,n.selected?e.activeClass:"",e.disabledClass]),tabindex:"0"},(0,o.v_)(n.content),3)):((0,o.uX)(),(0,o.CE)("a",{key:2,onClick:function(e){return L(n.index+1)},onKeyup:(0,o.jR)(function(e){return L(n.index+1)},["enter"]),class:(0,o.C4)([e.pageLinkClass,n.selected?e.activeClass:""]),tabindex:"0"},(0,o.v_)(n.content),43,b))],64)}),128)),S()&&e.hidePrevNext?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("a",{key:2,onClick:n[12]||(n[12]=function(e){return C()}),onKeyup:n[13]||(n[13]=(0,o.jR)(function(e){return C()},["enter"])),class:(0,o.C4)([e.nextLinkClass,S()?e.disabledClass:""]),tabindex:"0",innerHTML:e.nextText},null,42,m)),e.firstLastButton?((0,o.uX)(),(0,o.CE)("a",{key:3,onClick:n[14]||(n[14]=function(e){return j()}),onKeyup:n[15]||(n[15]=(0,o.jR)(function(e){return j()},["enter"])),class:(0,o.C4)([e.pageLinkClass,S()?e.disabledClass:""]),tabindex:"0",innerHTML:e.lastButtonText},null,42,y)):(0,o.Q3)("",!0)],2)):((0,o.uX)(),(0,o.CE)("ul",{key:0,class:(0,o.C4)(e.containerClass)},[e.firstLastButton?((0,o.uX)(),(0,o.CE)("li",{key:0,class:(0,o.C4)([e.pageClass,x()?e.disabledClass:""])},[(0,o.Lk)("a",{onClick:n[0]||(n[0]=function(e){return E()}),onKeyup:n[1]||(n[1]=(0,o.jR)(function(e){return E()},["enter"])),class:(0,o.C4)(e.pageLinkClass),tabindex:x()?-1:0,innerHTML:e.firstButtonText},null,42,s)],2)):(0,o.Q3)("",!0),x()&&e.hidePrevNext?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("li",{key:1,class:(0,o.C4)([e.prevClass,x()?e.disabledClass:""])},[(0,o.Lk)("a",{onClick:n[2]||(n[2]=function(e){return R()}),onKeyup:n[3]||(n[3]=(0,o.jR)(function(e){return R()},["enter"])),class:(0,o.C4)(e.prevLinkClass),tabindex:x()?-1:0,innerHTML:e.prevText},null,42,u)],2)),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(_.value,function(n,i){return(0,o.uX)(),(0,o.CE)("li",{key:i,class:(0,o.C4)([e.pageClass,n.selected?e.activeClass:"",n.disabled?e.disabledClass:"",n.breakView?e.breakViewClass:""])},[n.breakView?((0,o.uX)(),(0,o.CE)("a",{key:0,class:(0,o.C4)([e.pageLinkClass,e.breakViewLinkClass]),tabindex:"0"},[(0,o.RG)(t.$slots,"breakViewContent",{},function(){return[(0,o.eW)((0,o.v_)(e.breakViewText),1)]})],2)):n.disabled?((0,o.uX)(),(0,o.CE)("a",{key:1,class:(0,o.C4)(e.pageLinkClass),tabindex:"0"},(0,o.v_)(n.content),3)):((0,o.uX)(),(0,o.CE)("a",{key:2,onClick:function(e){return L(n.index+1)},onKeyup:(0,o.jR)(function(e){return L(n.index+1)},["enter"]),class:(0,o.C4)([e.pageLinkClass,n.selected?e.activeClass:""]),tabindex:"0"},(0,o.v_)(n.content),43,c))],2)}),128)),S()&&e.hidePrevNext?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("li",{key:2,class:(0,o.C4)([e.nextClass,S()?e.disabledClass:""])},[(0,o.Lk)("a",{onClick:n[4]||(n[4]=function(e){return C()}),onKeyup:n[5]||(n[5]=(0,o.jR)(function(e){return C()},["enter"])),class:(0,o.C4)(e.nextLinkClass),tabindex:S()?-1:0,innerHTML:e.nextText},null,42,d)],2)),e.firstLastButton?((0,o.uX)(),(0,o.CE)("li",{key:3,class:(0,o.C4)([e.pageClass,S()?e.disabledClass:""])},[(0,o.Lk)("a",{onClick:n[6]||(n[6]=function(e){return j()}),onKeyup:n[7]||(n[7]=(0,o.jR)(function(e){return j()},["enter"])),class:(0,o.C4)(e.pageLinkClass),tabindex:S()?-1:0,innerHTML:e.lastButtonText},null,42,p)],2)):(0,o.Q3)("",!0)],2))}}}},5807:(e,t,n)=>{"use strict";n.d(t,{A:()=>ke});var o=n(9726),i=n(682),r=n(5945),a=n(5592),l=n(1751),s=n(9919);function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return c(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(c(t={},o,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=d,c(f,"constructor",d),c(d,"constructor",s),s.displayName="GeneratorFunction",c(d,i,"GeneratorFunction"),c(f),c(f,i,"Generator"),c(f,o,function(){return this}),c(f,"toString",function(){return"[object Generator]"}),(u=function(){return{w:r,m:v}})()}function c(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}c=function(e,t,n,o){function r(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},c(e,t,n,o)}function d(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){d(r,o,i,a,l,"next",e)}function l(e){d(r,o,i,a,l,"throw",e)}a(void 0)})}}var f={key:0,class:"defender-rate-notice sui-notice sui-notice-info"},v={class:"sui-notice-content"},b={class:"sui-notice-message"},m={class:"sui-notice-actions"},y={class:"sui-screen-reader-text"};const g={__name:"rate-notice",props:{message:String,type:String},setup:function(e){var t=(0,a.B)().__,n=(0,l.q)(),i=(0,o.WQ)("store"),r=(0,o.KR)(!0),c=(0,o.EW)(function(){return i.misc.rating_is_displayed}),d=(0,o.EW)(function(){return i.misc.rating_text}),g=(0,o.EW)(function(){return i.misc.rating_type}),k=(0,o.EW)(function(){return i.routes}),h=(0,o.EW)(function(){return i.nonces}),_=function(){var e=p(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n.post(k.value.handle_notice,h.value.handle_notice,{});case 1:r.value=!1,window.open("https://wordpress.org/support/plugin/defender-security/reviews/#new-post","_blank");case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),w=function(){var e=p(u().m(function e(){var t,o,i;return u().w(function(e){for(;;)switch(e.n){case 0:return t="tweak"===g.value,o=t?k.value.refuse_notice:k.value.postpone_notice,i=t?h.value.refuse_notice:h.value.postpone_notice,e.n=1,n.post(o,i,{});case 1:r.value=!1;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),L=function(){var e=p(u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,n.post(k.value.refuse_notice,h.value.refuse_notice,{});case 1:r.value=!1;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return function(e,n){return c.value&&r.value?((0,o.uX)(),(0,o.CE)("div",f,[(0,o.Lk)("div",v,[(0,o.Lk)("div",b,[(0,o.Lk)("p",null,(0,o.v_)(d.value),1),(0,o.bF)((0,o.R1)(s.A),{"css-class":"sui-button-blue",onClick:_},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(t)("Rate Defender")),1)]}),_:1}),(0,o.bF)((0,o.R1)(s.A),{onClick:w,"css-class":"sui-button-ghost dismiss"},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)((0,o.R1)(t)("Maybe later")),1)]}),_:1}),(0,o.Lk)("a",{href:"#",onClick:(0,o.D$)(L,["prevent"]),class:"refuse"},(0,o.v_)((0,o.R1)(t)("No thanks")),1)]),(0,o.Lk)("div",m,[(0,o.Lk)("button",{class:"sui-button-icon",onClick:L},[n[0]||(n[0]=(0,o.Lk)("span",{class:"sui-icon-cross-close","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",y,(0,o.v_)((0,o.R1)(t)("Close this notice")),1)])])])])):(0,o.Q3)("",!0)}}};var k={key:0,class:"sui-notice sui-notice-info"},h={class:"sui-notice-content"},_={class:"sui-notice-message"},w={class:"m-0"},L=["innerHTML"];const R={__name:"opcache-notice",setup:function(e){var t=(0,a.B)().__,n=(0,o.KR)(defender.opcache_save_comments),i=(0,o.KR)(defender.opcache_message);return function(e,r){return"disabled"===n.value?((0,o.uX)(),(0,o.CE)("div",k,[(0,o.Lk)("div",h,[(0,o.Lk)("div",_,[(0,o.Lk)("h3",w,(0,o.v_)((0,o.R1)(t)("Enable OPcache Save Comments")),1),(0,o.Lk)("p",{innerHTML:i.value},null,8,L)])])])):(0,o.Q3)("",!0)}}};var C=n(6874),x=n(4073),S=n(4438),E={class:"sui-row-with-sidenav"},j={role:"navigation",class:"sui-sidenav"},P={class:"sui-vertical-tabs sui-sidenav-hide-md"},O=["data-tab","onClick"],A={key:0,class:"wd-new-feature-dot"},T={key:1,class:"sui-tag sui-tag-pro right-10px top-10px"},I={class:"sui-sidenav-hide-lg"};const W={__name:"side-menu",props:{tabs:{type:Array,required:!0},defaultTab:{type:String,default:null},boxed:{type:Boolean,default:!1}},setup:function(e){var t,n=(0,x.I)().adminUrl,i=(0,a.B)().__,r=e,l=(0,o.KR)(r.defaultTab||(null===(t=r.tabs[0])||void 0===t?void 0:t.id));(0,o.wB)(l,function(){var e=n("admin.php?page="+s()+"&view="+l.value),t=window.location.hash;void 0!==t&&(e+=t),history.replaceState({},null,e)});var s=function(){return new URLSearchParams(window.location.search).get("page")};return(0,o.sV)(function(){var e=new URLSearchParams(window.location.search).get("view");e&&r.tabs.some(function(t){return t.id===e})?l.value=e:!r.defaultTab&&r.tabs.length>0&&(l.value=r.tabs[0].id)}),function(t,r){return(0,o.uX)(),(0,o.CE)("section",E,[(0,o.Lk)("div",j,[(0,o.Lk)("ul",P,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.tabs,function(e){return(0,o.uX)(),(0,o.CE)("li",{key:e.id,class:(0,o.C4)(["sui-vertical-tab",{current:l.value===e.id,"heading pl-5px":e.heading}])},[e.heading?((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,o.eW)((0,o.v_)(e.heading),1)],64)):((0,o.uX)(),(0,o.CE)("a",{key:1,href:"#",role:"button","data-tab":e.id,onClick:(0,o.D$)(function(t){return o=e.id,l.value=o,void history.replaceState({},null,n("admin.php?page="+s()+"&view="+o));var o},["prevent"])},[(0,o.eW)((0,o.v_)(e.label)+" ",1),e.showDot?((0,o.uX)(),(0,o.CE)("span",A)):e.showPro?((0,o.uX)(),(0,o.CE)("span",T,(0,o.v_)((0,o.R1)(i)("Pro")),1)):e.badge?((0,o.uX)(),(0,o.CE)("span",{key:2,class:(0,o.C4)(["sui-tag",[e.badgeColor,{"sui-tag-grey":l.value===e.id}]])},(0,o.v_)(e.badge),3)):e.icon?((0,o.uX)(),(0,o.CE)("span",{key:3,class:(0,o.C4)(e.icon),"aria-hidden":"true"},null,2)):(0,o.Q3)("",!0)],8,O))],2)}),128))]),(0,o.Lk)("div",I,[(0,o.bF)(S.A,{"has-field":!1,class:"margin-bottom-30",modelValue:l.value,"onUpdate:modelValue":r[0]||(r[0]=function(e){return l.value=e}),options:e.tabs.map(function(e){return{label:e.label,value:e.id}})},null,8,["modelValue","options"])])]),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.tabs,function(n){return(0,o.uX)(),(0,o.CE)("div",{key:"content-".concat(n.id),class:(0,o.C4)({"sui-box":e.boxed}),style:(0,o.Tr)({display:l.value===n.id?"block":"none"})},[n.heading?(0,o.Q3)("",!0):(0,o.RG)(t.$slots,n.id,{key:0,tab:n},function(){return[(0,o.Lk)("p",null,"Content for "+(0,o.v_)(n.label),1)]})],6)}),128))])}}};var F=n(5072),X=n.n(F),M=n(8023),D={insert:"head",singleton:!1};X()(M.A,D);M.A.locals;const V=(0,n(6262).A)(W,[["__scopeId","data-v-4f9f85ba"]]);var U=n(9806),B={class:"sui-list-detail flex items-center"},K=["href"];const H={__name:"unlock-pro",props:{campaignUrl:{type:String,required:!0}},setup:function(e){var t=(0,a.B)().__;return function(n,i){return(0,o.uX)(),(0,o.CE)("span",B,[(0,o.Lk)("a",{href:e.campaignUrl,target:"_blank",class:"defender-upgrade-text"},(0,o.v_)((0,o.R1)(t)("Unlock with Pro")),9,K),i[0]||(i[0]=(0,o.Lk)("svg",{width:"36",height:"26",viewBox:"0 0 36 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,o.Lk)("rect",{x:"0.5",y:"0.5",width:"35",height:"25",rx:"12.5",fill:"#F9E1FF"}),(0,o.Lk)("rect",{x:"0.5",y:"0.5",width:"35",height:"25",rx:"12.5",stroke:"#8D00B1"}),(0,o.Lk)("path",{d:"M14.6133 12V10.8047C14.6289 10.3438 14.7305 9.91406 14.918 9.51562C15.1055 9.10938 15.3516 8.75781 15.6562 8.46094C15.9609 8.16406 16.3125 7.92969 16.7109 7.75781C17.1172 7.58594 17.5469 7.5 18 7.5C18.4609 7.5 18.8906 7.58594 19.2891 7.75781C19.6953 7.92969 20.0508 8.16406 20.3555 8.46094C20.6602 8.75781 20.9062 9.10938 21.0938 9.51562C21.2734 9.91406 21.375 10.3438 21.3984 10.8047V12H21.75C21.9609 12 22.1367 12.0742 22.2773 12.2227C22.4258 12.3633 22.5 12.5391 22.5 12.75V17.25C22.5 17.4609 22.4258 17.6406 22.2773 17.7891C22.1367 17.9297 21.9609 18 21.75 18H14.25C14.0391 18 13.8594 17.9297 13.7109 17.7891C13.5703 17.6406 13.5 17.4609 13.5 17.25V12.75C13.5 12.5391 13.5703 12.3633 13.7109 12.2227C13.8594 12.0742 14.0391 12 14.25 12H14.6133ZM16.5234 12H19.4766V10.8047C19.4766 10.3906 19.332 10.0391 19.043 9.75C18.7539 9.45312 18.4062 9.30469 18 9.30469C17.5938 9.30469 17.2461 9.45312 16.957 9.75C16.668 10.0391 16.5234 10.3906 16.5234 10.8047V12Z",fill:"#8D00B1"})],-1))])}}};var G=n(1289),Q=["id"],N={class:"sui-summary-segment"},q={class:"sui-summary-details"},$={class:"sui-summary-large"},Y=["data-tooltip"],z={key:1,class:"sui-summary-percent"},J={class:"sui-summary-sub"},Z={key:2,class:"sui-summary-detail"},ee={key:3,class:"sui-summary-sub"},te={key:0,class:"sui-summary-segment"},ne={class:"sui-list"},oe={class:"sui-list-label"},ie=["data-tooltip"],re={class:"sui-list-detail"},ae=["href"],le={key:0,class:"sui-tag sui-tag-brown"},se={key:2,"aria-hidden":"true",class:"sui-icon-check-tick sui-success"},ue={key:0,"aria-hidden":"true",class:"sui-icon-check-tick sui-success"},ce={key:1,class:"sui-tag sui-tag-brown"},de={key:1,class:"sui-summary-segment"};const pe={__name:"sui-summary",props:{small:{type:Boolean,default:!1},id:{type:String,default:""},title:{type:String,default:""},mainValue:{type:[String,Number]},maxValue:{type:[String,Number],default:""},mainLabel:{type:String},subValue:{type:String,default:""},subLabel:{type:String,default:""},icon:{type:String,default:""},iconColor:{type:String,default:""},listItems:{type:Array,default:function(){return[]}},customContent:{type:Boolean,default:!1},tooltip:{type:String,default:""}},emits:["button-click"],setup:function(e,t){var n=t.emit,i=e,r=n,l=(0,U.p)(),s=l.maybeHideBranding,u=l.whitelabelHeroImage,c=l.backgroundImageStyle,d=(0,a.B)().__,p=(0,o.EW)(function(){return i.id?i.id:i.title?i.title.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""):""});return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-box sui-summary",{"sui-summary-sm":e.small,"sui-rebranded":(0,o.R1)(s)&&(0,o.R1)(u),"sui-unbranded":(0,o.R1)(s)&&!(0,o.R1)(u)}]),id:p.value},[(0,o.Lk)("div",{class:"sui-summary-image-space","aria-hidden":"true",style:(0,o.Tr)((0,o.R1)(c))},null,4),(0,o.Lk)("div",N,[(0,o.Lk)("div",q,[e.customContent?(0,o.RG)(t.$slots,"custom-content",{key:0}):((0,o.uX)(),(0,o.CE)(o.FK,{key:1},[(0,o.Lk)("span",$,(0,o.v_)(e.mainValue),1),e.tooltip?((0,o.uX)(),(0,o.CE)("span",{key:0,"data-tooltip":e.tooltip,class:"sui-tooltip sui-tooltip-top-center sui-tooltip-constrained"},[n[0]||(n[0]=(0,o.eW)(" ",-1)),e.icon?((0,o.uX)(),(0,o.CE)("span",{key:0,class:(0,o.C4)([e.icon,e.iconColor]),"aria-hidden":"true"},null,2)):(0,o.Q3)("",!0)],8,Y)):(0,o.Q3)("",!0),e.maxValue?((0,o.uX)(),(0,o.CE)("span",z,"/"+(0,o.v_)(e.maxValue),1)):(0,o.Q3)("",!0),(0,o.Lk)("span",J,(0,o.v_)(e.mainLabel),1),e.subValue?((0,o.uX)(),(0,o.CE)("span",Z,(0,o.v_)(e.subValue),1)):(0,o.Q3)("",!0),e.subLabel?((0,o.uX)(),(0,o.CE)("span",ee,(0,o.v_)(e.subLabel),1)):(0,o.Q3)("",!0)],64))])]),e.listItems&&e.listItems.length?((0,o.uX)(),(0,o.CE)("div",te,[(0,o.Lk)("ul",ne,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.listItems,function(e){return(0,o.uX)(),(0,o.CE)("li",{key:e.label},[(0,o.Lk)("span",oe,[(0,o.eW)((0,o.v_)(e.label)+" ",1),e.tooltip?((0,o.uX)(),(0,o.CE)("span",{key:0,"data-tooltip":e.tooltip,class:"sui-tooltip sui-tooltip-constrained sui-tooltip-top-center"},n[1]||(n[1]=[(0,o.Lk)("span",{"aria-hidden":"true",class:"ml-2 sui-icon-info sui-sm"},null,-1)]),8,ie)):(0,o.Q3)("",!0)]),(0,o.Lk)("span",re,[e.button?((0,o.uX)(),(0,o.Wv)(G.A,{key:0,label:e.button.label||e.value,type:e.button.type||"button",variant:e.button.variant||"default",size:e.button.size||"small",disabled:e.button.disabled||!1,icon:e.button.icon,onClick:function(t){return function(e){var t,n;r("button-click",{action:(null===(t=e.button)||void 0===t?void 0:t.action)||"default",data:(null===(n=e.button)||void 0===n?void 0:n.data)||{},item:e,label:e.label})}(e)}},null,8,["label","type","variant","size","disabled","icon","onClick"])):e.upsellUrl?((0,o.uX)(),(0,o.Wv)(H,{key:1,"campaign-url":e.upsellUrl},null,8,["campaign-url"])):e.link?((0,o.uX)(),(0,o.CE)("a",{key:2,href:e.link,target:"_blank"},["disabled"===e.value?((0,o.uX)(),(0,o.CE)("span",le,(0,o.v_)((0,o.R1)(d)("Disabled")),1)):e.tag?((0,o.uX)(),(0,o.CE)("span",{key:1,class:(0,o.C4)(["sui-tag",e.tagClass||"sui-tag-error"])},(0,o.v_)(e.value),3)):"check"===e.value?((0,o.uX)(),(0,o.CE)("i",se)):((0,o.uX)(),(0,o.CE)(o.FK,{key:3},[(0,o.eW)((0,o.v_)(e.value),1)],64))],8,ae)):((0,o.uX)(),(0,o.CE)(o.FK,{key:3},["check"===e.value?((0,o.uX)(),(0,o.CE)("i",ue)):"disabled"===e.value?((0,o.uX)(),(0,o.CE)("span",ce,(0,o.v_)((0,o.R1)(d)("Disabled")),1)):e.tag?((0,o.uX)(),(0,o.CE)("span",{key:2,class:(0,o.C4)(["sui-tag",e.tagClass||"sui-tag-error"])},(0,o.v_)(e.value),3)):((0,o.uX)(),(0,o.CE)(o.FK,{key:3},[(0,o.eW)((0,o.v_)(e.value),1)],64))],64))])])}),128))])])):(0,o.Q3)("",!0),t.$slots.segment?((0,o.uX)(),(0,o.CE)("div",de,[(0,o.RG)(t.$slots,"segment")])):(0,o.Q3)("",!0)],10,Q)}}};var fe=n(3498),ve=n(9250),be=["id"],me={class:"sui-header"},ye={class:"sui-header-title"},ge={key:5};const ke={__name:"base-layout",props:{title:{type:String,required:!0},pageClass:{type:String,default:""},docLink:{type:String,default:null},summary:{type:Object,default:null},showSummary:{type:Boolean,default:!0},tabs:{type:Array,default:null},defaultTab:{type:String,default:null},boxed:{type:Boolean,default:!1},feature:{type:String,default:"base-layout"}},setup:function(e){var t=e,n=(0,i.X)(),a=n.maybeHighContrast,l=n.showTrackingModal,s=["file-scanning","security-tweaks"].includes(t.feature),u=function(e){e.action&&"start-scan"===e.action&&(0,ve.S)().startScan()};return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-wrap",(0,o.R1)(a)()]),id:e.feature},[(0,o.Lk)("div",{class:(0,o.C4)(e.pageClass)},[(0,o.Lk)("div",me,[(0,o.Lk)("h1",ye,(0,o.v_)(e.title),1),(0,o.RG)(t.$slots,"header-actions"),e.docLink?((0,o.uX)(),(0,o.Wv)(r.A,{key:0,link:e.docLink},null,8,["link"])):(0,o.Q3)("",!0)]),(0,o.RG)(t.$slots,"notices"),(0,o.R1)(s)?((0,o.uX)(),(0,o.Wv)(g,{key:0})):(0,o.Q3)("",!0),(0,o.bF)(R),(0,o.R1)(l)?((0,o.uX)(),(0,o.Wv)(C.A,{key:1})):(0,o.Q3)("",!0),e.summary&&e.showSummary?((0,o.uX)(),(0,o.Wv)(pe,{key:2,id:"".concat(e.feature,"-summary"),"main-value":e.summary.mainValue,"main-label":e.summary.mainLabel,"sub-value":e.summary.subValue,"sub-label":e.summary.subLabel,icon:e.summary.icon,"icon-color":e.summary.iconColor,tooltip:e.summary.tooltip,"list-items":e.summary.listItems,onButtonClick:u},null,8,["id","main-value","main-label","sub-value","sub-label","icon","icon-color","tooltip","list-items"])):(0,o.RG)(t.$slots,"summary",{key:3}),e.tabs?((0,o.uX)(),(0,o.Wv)(V,{key:4,tabs:e.tabs,"default-tab":e.defaultTab,boxed:e.boxed},(0,o.eX)({_:2},[(0,o.pI)(e.tabs,function(e){return{name:e.id,fn:(0,o.k6)(function(){return[(0,o.RG)(t.$slots,e.id)]})}})]),1032,["tabs","default-tab","boxed"])):((0,o.uX)(),(0,o.CE)("div",ge,[(0,o.RG)(t.$slots,"default")])),n[0]||(n[0]=(0,o.Lk)("div",{class:"clearfix"},null,-1)),n[1]||(n[1]=(0,o.Lk)("div",{class:"padding-bottom-30"},null,-1))],2),(0,o.bF)(fe.A),(0,o.RG)(t.$slots,"modals")],10,be)}}}},5945:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(9726),i=n(5592),r={key:0,class:"sui-actions-right"},a=["href"];const l={__name:"doc-link",props:{link:{type:String,required:!0}},setup:function(e){var t=e,n=(0,i.B)().__,l=(0,o.KR)(defender.whitelabel.hide_doc_link),s=(0,o.EW)(function(){return defender.wpmudev_url+t.link});return function(e,t){return!1===l.value?((0,o.uX)(),(0,o.CE)("div",r,[(0,o.Lk)("a",{href:s.value,target:"_blank",class:"sui-button sui-button-ghost"},[t[0]||(t[0]=(0,o.Lk)("i",{class:"sui-icon-academy","aria-hidden":"true"},null,-1)),(0,o.eW)(" "+(0,o.v_)((0,o.R1)(n)("Documentation")),1)],8,a)])):(0,o.Q3)("",!0)}}}},6218:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var o=n(5093),i=n.n(o);function r(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DD-MM-YYYY";return e?i()(e).format(t):""},t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i()(e).subtract(t,"days").toDate()},n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return i()(e).startOf("week").toDate()},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return i()(e).endOf("week").toDate()};return{formatDate:e,formatTime:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HH:mm";if(!e)return"";if("string"==typeof e)if(e.match(/^\d{1,2}:\d{2}(:\d{2})?$/)){var o=e.padStart(5,"0");t=i()("1970-01-01T".concat(o))}else t=i()(e);else t=i()(e);return t.isValid()?"LT"===n?t.format("LT"):t.format(n):""},subtractDays:t,addDays:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i()(e).add(t,"days").toDate()},getWeekStart:n,getWeekEnd:o,getDateRanges:function(){var e=new Date,i=n(e),r=o(e);return{Today:[e,e],"Last 7 days":[t(e,7),e],"This week":[i,r],"30 days":[t(e,30),e]}},getDefaultDateRange:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7,o=new Date,i=t(o,n);return{date_from:e(i),date_to:e(o)}}}}},6827:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var o=n(9726),i=n(7786),r=n(2976);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,l=[],s=!0,u=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=r.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var u={key:0,class:"sui-description mb-18px"},c={class:"sui-form-field"};const d={__name:"stacked-checkboxes",props:{options:{type:[Array,Object],required:!0},modelValue:{type:[Array,Object],default:function(){return["administrator"]}},description:{type:String,default:""},feature:{type:String,required:!0},disabledOptions:{type:Array,default:function(){return["administrator"]}},size:{type:String,default:"",validator:function(e){return["sm",""].includes(e)}}},emits:["update:modelValue","change"],setup:function(e,t){var n=t.emit,l=e,d=n,p=(0,o.Ht)(),f=(0,i.hRP)(l,"modelValue",d),v=(0,o.EW)(function(){return l.options?Array.isArray(l.options)?l.options.map(function(e){return"string"==typeof e?{value:e.toString().toLowerCase(),label:e}:"object"===s(e)&&null!==e?{value:null!==(t=null!==(n=e.value)&&void 0!==n?n:e.key)&&void 0!==t?t:"",label:null!==(o=null!==(i=null!==(r=null!==(a=e.label)&&void 0!==a?a:e.text)&&void 0!==r?r:e.value)&&void 0!==i?i:e.key)&&void 0!==o?o:""}:{value:"",label:""};var t,n,o,i,r,a}):"object"===s(l.options)?Object.entries(l.options).map(function(e){var t=a(e,2),n=t[0],o=t[1];return{value:n,label:String(o)}}):[]:[]}),b=(0,o.EW)(function(){var e=v.value;return e.length>0?e[e.length-1].value:null});function m(e){return"".concat(l.feature,"-toggle-").concat(e)}function y(e){return"".concat(l.feature,"-label-").concat(e)}function g(e){return l.disabledOptions.includes(e)}function k(){d("change",f.value)}return function(t,n){return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.R1)(p).description||e.description?((0,o.uX)(),(0,o.CE)("p",u,[(0,o.RG)(t.$slots,"description",{},function(){return[(0,o.eW)((0,o.v_)(e.description),1)]})])):(0,o.Q3)("",!0),(0,o.Lk)("div",c,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(v.value,function(t){return(0,o.uX)(),(0,o.Wv)(r.A,{key:t.value,id:m(t.value),modelValue:(0,o.R1)(f),"onUpdate:modelValue":n[0]||(n[0]=function(e){return(0,o.i9)(f)?f.value=e:null}),value:t.value,disabled:g(t.value),"aria-labelledby":y(t.value),onChange:k,class:(0,o.C4)(["sui-checkbox-stacked",["sm"===e.size?"sui-checkbox-sm":"mb-15px",{"mb-0":t.value===b.value}]])},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)(t.label),1)]}),_:2},1032,["id","modelValue","value","disabled","aria-labelledby","class"])}),128))])])}}}},6874:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var o=n(9726),i=n(5592),r=n(8261),a=n(1751),l=n(9919);function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return u(c,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),c}var a={};function l(){}function c(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(u(t={},o,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=d,u(f,"constructor",d),u(d,"constructor",c),c.displayName="GeneratorFunction",u(d,i,"GeneratorFunction"),u(f),u(f,i,"Generator"),u(f,o,function(){return this}),u(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:r,m:v}})()}function u(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}u=function(e,t,n,o){function r(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},u(e,t,n,o)}function c(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){c(r,o,i,a,l,"next",e)}function l(e){c(r,o,i,a,l,"throw",e)}a(void 0)})}}var p={class:"sui-modal sui-modal-md"},f=["aria-label"],v={class:"sui-box margin-bottom-5"},b={class:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},m={class:"sui-box-banner margin-bottom-30","aria-hidden":"true"},y=["src","srcset","alt"],g={class:"sui-screen-reader-text"},k=["innerHTML"],h=["innerHTML"],_={class:"sui-box-footer sui-flatten sui-content-center sui-spacing-bottom--50"};const w={__name:"tracking-modal",setup:function(e){var t=(0,i.B)().__,n=(0,r.m)().suiRemoveModalClass,u=(0,a.q)().post,c=(0,o.KR)(defender.misc.banner_1x),w=(0,o.KR)(defender.misc.banner_2x),L=(0,o.KR)(defender.misc.title),R=(0,o.KR)(defender.misc.title),C=(0,o.KR)(defender.misc.desc),x=(0,o.KR)(defender.misc.optin_button_title),S=(0,o.KR)(defender.misc.skip_button_title),E=(0,o.KR)(defender.misc.nonces),j=(0,o.KR)(defender.misc.routes),P=(0,o.KR)(!1);(0,o.sV)(function(){document.onreadystatechange=function(){SUI.openModal("defender-tracking-modal",jQuery("body"),void 0,!1,!0)}});var O=function(){var e=d(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return P.value=!0,e.n=1,u(j.value.save_track_modal,E.value.save_track_modal,{});case 1:SUI.closeModal(),n(),P.value=!1;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(){var e=d(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return P.value=!0,e.n=1,u(j.value.close_track_modal,E.value.close_track_modal,{});case 1:SUI.closeModal(),n(),P.value=!1;case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return function(e,n){return(0,o.uX)(),(0,o.CE)("div",p,[(0,o.Lk)("div",{role:"dialog",id:"defender-tracking-modal","aria-modal":"true",class:"sui-modal-content","aria-label":(0,o.R1)(t)("Tracking Preferences Modal")},[(0,o.Lk)("div",v,[(0,o.Lk)("div",b,[(0,o.Lk)("figure",m,[(0,o.Lk)("img",{src:c.value,srcset:c.value+" 1x, "+w.value+" 2x",alt:L.value},null,8,y)]),(0,o.Lk)("button",{class:"modal-close-button sui-button-white sui-button-icon sui-button-float--right",onClick:A},[n[0]||(n[0]=(0,o.Lk)("i",{class:"sui-icon-close sui-md","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",g,(0,o.v_)((0,o.R1)(t)("Close this dialog.")),1)]),(0,o.Lk)("h3",{class:"sui-box-title sui-lg",id:"defender-tracking-modal-label",innerHTML:R.value},null,8,k),(0,o.Lk)("p",{class:"sui-description",innerHTML:C.value},null,8,h)]),(0,o.Lk)("div",_,[(0,o.bF)((0,o.R1)(l.A),{onClick:O,doing_ajax:P.value,"css-class":"sui-button-blue"},{default:(0,o.k6)(function(){return[(0,o.eW)((0,o.v_)(x.value),1)]}),_:1},8,["doing_ajax"])])]),(0,o.Lk)("button",{type:"button",onClick:A,class:"sui-modal-skip defender-tracking-modal-skip-link"},(0,o.v_)(S.value),1)],8,f)])}}}},7089:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,".blocklist-checker-table-result tbody tr[data-v-3991bc04]{font-weight:700}",""]);const r=i},7476:(e,t,n)=>{"use strict";n.d(t,{r:()=>s});var o=n(810),i=n(9726);function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function l(n,o,i,r){var l=o&&o.prototype instanceof u?o:u,c=Object.create(l.prototype);return a(c,"_invoke",function(n,o,i){var r,a,l,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,a=0,l=e,p.n=n,s}};function f(n,o){for(a=n,l=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(l=r[(a=r[4])?5:(a=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(a=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,a=0))}if(i||n>1)return s;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),a=c,l=v;(t=a<2?e:l)||!d;){r||(a?a<3?(a>1&&(p.n=-1),f(a,l)):p.n=l:p.v=l);try{if(u=2,r){if(a||(i="next"),t=r[i]){if(!(t=t.call(r,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=r.return)&&t.call(r),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);r=e}else if((t=(d=p.n<0)?l:n.call(o,p))!==s)break}catch(t){r=e,a=1,l=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),c}var s={};function u(){}function c(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(a(t={},o,function(){return this}),t),f=d.prototype=u.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,a(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=d,a(f,"constructor",d),a(d,"constructor",c),c.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(f),a(f,i,"Generator"),a(f,o,function(){return this}),a(f,"toString",function(){return"[object Generator]"}),(r=function(){return{w:l,m:v}})()}function a(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}a=function(e,t,n,o){function r(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},a(e,t,n,o)}function l(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}var s=(0,o.nY)("loading",function(){var e=(0,i.KR)([]);function t(t){e.value.push(t)}function n(t){e.value=e.value.filter(function(e){return e!==t})}function o(t){return e.value.includes(t)}var a=function(){var e,i=(e=r().m(function e(i,a){return r().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!o(i)){e.n=1;break}return e.a(2);case 1:return t(i),e.p=2,e.n=3,a();case 3:return e.a(2,e.v);case 4:return e.p=4,n(i),e.f(4);case 5:return e.a(2)}},e,null,[[2,,4,5]])}),function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){l(r,o,i,a,s,"next",e)}function s(e){l(r,o,i,a,s,"throw",e)}a(void 0)})});return function(e,t){return i.apply(this,arguments)}}();return{start:t,stop:n,isLoading:o,clear:function(){for(var t in e)e[t]=!1},withLoading:a}})},7545:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var o=n(9726),i=n(7786),r=n(1289),a=n(8114),l=n(5592),s=n(9806),u={class:"sui-box-header"},c={class:"sui-box-title"},d={class:"sui-actions-right"},p={class:"sui-message"},f=["src"],v=["src"],b={class:"sui-message-content"},m={class:"sui-box-header"},y={class:"sui-box-title"},g={class:"sui-actions-right"},k=["innerHTML"],h={key:0,class:"sui-box-footer"},_={class:"sui-actions-right"};const w={__name:"settings-layout",props:{feature:{type:String,required:!0},title:{type:String,required:!0},modelValue:{type:Boolean,default:!0},settings:{type:Array,default:function(){return[]}},imageUrl:{type:String,default:""},toggleAction:{type:String,default:""},saveAction:{type:String,default:""},hasDeactivate:{type:Boolean,default:!0},layoutClass:{type:String,default:""}},emits:["update:modelValue","save-settings","toggle-feature"],setup:function(e,t){var n=t.emit,w=(0,l.B)().__,L=(0,s.p)(),R=L.maybeHideBranding,C=L.whitelabelHeroImage,x=e,S=n,E=(0,i.hRP)(x,"modelValue",S),j="settings-".concat(x.feature,"-").concat(x.modelValue?"enabled":"disabled");return function(t,n){return(0,o.uX)(),(0,o.CE)(o.FK,null,[!1===(0,o.R1)(E)&&e.toggleAction?((0,o.uX)(),(0,o.CE)("div",{key:0,class:"sui-box",id:j},[(0,o.Lk)("div",u,[(0,o.Lk)("h2",c,(0,o.v_)(e.title),1),(0,o.Lk)("div",d,[(0,o.RG)(t.$slots,"actions-right")])]),(0,o.Lk)("div",p,[(0,o.R1)(R)?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("img",{key:0,src:e.imageUrl,class:"sui-image",alt:"Feature image"},null,8,f)),(0,o.R1)(R)&&(0,o.R1)(C)?((0,o.uX)(),(0,o.CE)("img",{key:1,src:(0,o.R1)(C),class:"sui-image wd-whitelabel-custom-branding-logo",alt:"Custom Feature image"},null,8,v)):(0,o.Q3)("",!0),(0,o.Lk)("div",b,[(0,o.RG)(t.$slots,"deactivate-message"),(0,o.bF)(r.A,{label:(0,o.R1)(w)("Activate"),variant:"blue",action:e.toggleAction,type:"button",onClick:n[0]||(n[0]=function(e){return S("toggle-feature")})},null,8,["label","action"])])])])):((0,o.uX)(),(0,o.CE)("div",{key:1,class:"sui-box",id:j},[(0,o.Lk)("div",m,[(0,o.Lk)("h3",y,(0,o.v_)(e.title),1),(0,o.Lk)("div",g,[(0,o.RG)(t.$slots,"actions-right")])]),(0,o.Lk)("div",{class:(0,o.C4)(["sui-box-body",e.layoutClass])},[(0,o.RG)(t.$slots,"description"),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.settings,function(e){return(0,o.uX)(),(0,o.Wv)(a.A,{key:e.key,label:e.label,description:"html"===e.descType?"":e.description,"show-pro":e.showPro,"show-opacity":e.showOpacity,"show-new":e.showNew},(0,o.eX)({default:(0,o.k6)(function(){return[(0,o.RG)(t.$slots,e.key)]}),_:2},["html"===e.descType?{name:"description",fn:(0,o.k6)(function(){return[(0,o.Lk)("div",{innerHTML:e.description},null,8,k)]}),key:"0"}:void 0]),1032,["label","description","show-pro","show-opacity","show-new"])}),128)),e.toggleAction?((0,o.uX)(),(0,o.Wv)(a.A,{key:0,label:(0,o.R1)(w)("Deactivate"),description:(0,o.R1)(w)("If you no longer want to use this feature you can turn it off at any time.")},{default:(0,o.k6)(function(){return[(0,o.bF)(r.A,{label:(0,o.R1)(w)("Deactivate"),variant:"ghost",icon:"sui-icon-power-on-off",action:e.toggleAction,type:"button",onClick:n[1]||(n[1]=function(e){return S("toggle-feature")})},null,8,["label","action"])]}),_:1},8,["label","description"])):(0,o.Q3)("",!0)],2),(0,o.RG)(t.$slots,"default"),e.saveAction?((0,o.uX)(),(0,o.CE)("div",h,[(0,o.Lk)("div",_,[(0,o.bF)(r.A,{label:(0,o.R1)(w)("Save Changes"),variant:"blue",icon:"sui-icon-save",action:e.saveAction,type:"button",onClick:n[2]||(n[2]=function(e){return S("save-settings")})},null,8,["label","action"])])])):(0,o.Q3)("",!0)])),(0,o.RG)(t.$slots,"modals")],64)}}}},8023:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,".heading[data-v-4f9f85ba]{color:#999;font-size:12px;font-weight:600}.sidenav-tooltip-icon[data-v-4f9f85ba]{right:-5px;top:2px}",""]);const r=i},8114:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var o=n(9726),i=n(5592),r={key:0,class:"sui-box-settings-col-1"},a={class:"sui-settings-label"},l={key:0,class:"sui-tag sui-tag-pro"},s={key:1,class:"sui-tag sui-tag-green"},u={class:"sui-description"},c={class:"sui-box-settings-col-2"};const d={__name:"setting-row",props:{label:{type:String,default:""},description:{type:String,default:""},showPro:{type:[Boolean,Number],default:!1},showOpacity:{type:[Boolean,Number],default:!0},showNew:{type:[Boolean,Number],default:!1}},setup:function(e){var t=e,n=(0,i.B)().__;return function(i,d){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-box-settings-row sui-flushed",{"opacity-50 pointer-events-none":e.showPro&&e.showOpacity}])},[t.label&&(0,o.Ht)().label?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)("div",r,[(0,o.Lk)("div",a,[(0,o.eW)((0,o.v_)(e.label)+" ",1),(0,o.RG)(i.$slots,"label"),e.showPro?((0,o.uX)(),(0,o.CE)("span",l,(0,o.v_)((0,o.R1)(n)("Pro")),1)):(0,o.Q3)("",!0),e.showNew?((0,o.uX)(),(0,o.CE)("span",s,(0,o.v_)((0,o.R1)(n)("New")),1)):(0,o.Q3)("",!0)]),(0,o.Lk)("span",u,[(0,o.eW)((0,o.v_)(e.description||"")+" ",1),(0,o.RG)(i.$slots,"description")])])),(0,o.Lk)("div",c,[(0,o.RG)(i.$slots,"default")])],2)}}};var p=n(5072),f=n.n(p),v=n(9755),b={insert:"head",singleton:!1};f()(v.A,b);v.A.locals;const m=(0,n(6262).A)(d,[["__scopeId","data-v-4b019f10"]])},8214:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var o=n(9726),i={class:"sui-notice-content"},r={class:"sui-notice-message"},a={key:0,class:"sui-notice-actions"},l=["aria-label"],s={class:"sui-screen-reader-text"};const u={__name:"sui-notice",props:{type:{type:String,default:"",validator:function(e){return["","info","success","warning","error","purple"].includes(e)}},dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:"Close this notice"}},emits:["dismiss"],setup:function(e,t){var n=t.emit,u=e,c=n,d=(0,o.EW)(function(){return{info:"sui-icon-info",success:"sui-icon-check-tick",warning:"sui-icon-info",error:"sui-icon-info"}[u.type]||"sui-icon-info"}),p=function(){c("dismiss")};return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["sui-notice","sui-notice sui-notice-".concat(e.type)])},[(0,o.Lk)("div",i,[(0,o.Lk)("div",r,[(0,o.Lk)("i",{"aria-hidden":"true",class:(0,o.C4)(["sui-notice-icon sui-md",d.value])},null,2),(0,o.Lk)("p",null,[(0,o.RG)(t.$slots,"default")])]),e.dismissible?((0,o.uX)(),(0,o.CE)("div",a,[(0,o.Lk)("button",{class:"sui-button-icon",onClick:p,"aria-label":e.dismissLabel},[n[0]||(n[0]=(0,o.Lk)("i",{class:"sui-icon-check","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",s,(0,o.v_)(e.dismissLabel),1)],8,l)])):(0,o.Q3)("",!0)])],2)}}}},8261:(e,t,n)=>{"use strict";n.d(t,{m:()=>l});var o=n(9726),i=n(7786);function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw r}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var l=function(){var e=function(){(0,o.dY)(function(){"undefined"!=typeof SUI&&(t(),SUI.tabs(),SUI.modalDialog()),"undefined"!=typeof SUI&&SUI.select2&&document.querySelectorAll(".sui-select").forEach(function(e){var t=e.dataset.placeholder||"";SUI.select2(e,{placeholder:t,dropdownCssClass:"sui-select-dropdown"})})})};function t(){document.querySelectorAll(".sui-accordion").forEach(function(e){SUI.suiAccordion(e)})}var n=function(){var e=document.querySelector(".sui-has-modal");e&&e.classList.remove("sui-has-modal")};e(),(0,i.MLh)(document,"modalClosed",n);var a=(0,i.Ubj)("(max-width: 767px)"),l=(0,i.Ubj)("(min-width: 768px) and (max-width: 1024px)"),s=(0,i.Ubj)("(min-width: 1025px)"),u=(0,i.Ubj)("(max-width: 1444px)");return{rebindSUI:e,associateSUIselect2WithModal:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("undefined"!=typeof SUI&&SUI.select2){if(!t){var n=e.closest('.sui-modal-content[aria-modal="true"]');t=(null==n?void 0:n.getAttribute("id"))||""}if(t){var o=document.getElementById(t);o&&SUI.select2(e,{dropdownParent:o})}}},suiRemoveModalClass:n,observeModalChanges:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".sui-modal";(0,i.P1n)(document.body,function(n){var o,i=r(n);try{for(i.s();!(o=i.n()).done;){var a=o.value;if("childList"===a.type)Array.from(a.addedNodes).some(function(e){var n,o;return e.nodeType===Node.ELEMENT_NODE&&((null===(n=e.matches)||void 0===n?void 0:n.call(e,t))||(null===(o=e.querySelector)||void 0===o?void 0:o.call(e,t)))})&&e()}}catch(e){i.e(e)}finally{i.f()}},{childList:!0,subtree:!0})},reloadAccordion:t,isMobile:a,isTablet:l,isDesktop:s,isLargeDesktop:u}}},8374:(e,t,n)=>{"use strict";n.d(t,{A:()=>Z});var o=n(9726),i=n(5592),r=n(1289),a=n(4438),l=n(8261),s=n(5093),u=n.n(s),c=(n(3335),n(1669)),d=n.n(c),p=n(682);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y={mounted:function(e,t){var n=u()().subtract(29,"days"),o=u()(),i=b(b({},{autoApply:!0,ranges:{Today:[u()(),u()()],Yesterday:[u()().subtract(1,"days"),u()().subtract(1,"days")],"Last 7 days":[u()().subtract(7,"days"),u()()],"1 week":[u()().startOf("week"),u()().endOf("week")],"30 days":[u()().startOf("month"),u()().endOf("month")]},locale:{format:"MMMM DD, YYYY",separator:" - ",customRangeLabel:"Custom",daysOfWeek:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"]},alwaysShowCalendars:!0,startDate:n,endDate:o}),t.value);(0,p.X)().isHighContrast()&&!d()("body").hasClass("sui-elements-accessible")&&d()("body").addClass("sui-elements-accessible"),d()(e).daterangepicker(i,function(t,n,o){var i=new CustomEvent("dateSelected",{detail:{start:t,end:n,label:o,startFormatted:t.format("YYYY-MM-DD"),endFormatted:n.format("YYYY-MM-DD")}});e.dispatchEvent(i)}),window.rebindSUI&&"function"==typeof window.rebindSUI&&setTimeout(function(){return window.rebindSUI()},100)},unmounted:function(e){d()(e).data("daterangepicker")&&d()(e).data("daterangepicker").remove()}};function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=g(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==g(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=["id"],w={class:"sui-date w-300px"},L=["placeholder","aria-labelledby","aria-describedby"],R=["id"],C=["id"];const x={__name:"sui-calender",props:{label:{type:String,default:""},placeholder:{type:String,default:""},message:{type:String,default:""},errorMessage:{type:String,default:""},hasError:{type:Boolean,default:!1},startDate:{type:[String,Object],default:null},endDate:{type:[String,Object],default:null},options:{type:Object,default:function(){return{}}}},emits:["dateSelected"],setup:function(e,t){var n=t.emit,r=(0,i.B)().__,a=n,s=0,c="range-datepicker-".concat(++s),d=(0,o.KR)(""),p=(0,o.KR)(null),f=e,v=(0,o.EW)(function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},f.options);if(f.startDate&&f.endDate){var t="string"==typeof f.startDate?u()(f.startDate,"DD-MM-YYYY"):u()(f.startDate),n="string"==typeof f.endDate?u()(f.endDate,"DD-MM-YYYY"):u()(f.endDate);e.startDate=t,e.endDate=n}return e}),b=function(e){var t=e.detail,n=t.start,o=t.end,i=t.label,r=t.startFormatted,l=t.endFormatted;d.value=n.format("MMMM DD, YYYY")+" - "+o.format("MMMM DD, YYYY"),a("dateSelected",{start:n,end:o,label:i,startFormatted:r,endFormatted:l})},m=y;return function(t,n){return(0,o.uX)(),(0,o.CE)("div",{class:(0,o.C4)(["flex items-center gap-2",(0,o.R1)(l.m)().isTablet.value?"col-span-12 mb-3":"col-span-6"])},[e.label?((0,o.uX)(),(0,o.CE)("label",{key:0,for:c,id:c+"--label",class:"inline-block sui-label"},(0,o.v_)(e.label),9,_)):(0,o.Q3)("",!0),(0,o.Lk)("div",w,[(0,o.bo)((0,o.Lk)("input",{id:c,ref_key:"dateInput",ref:p,type:"text",placeholder:e.placeholder||(0,o.R1)(r)("Select date range"),class:(0,o.C4)(["sui-form-control sui-input-height-md",{"sui-form-control-error":e.hasError}]),"aria-labelledby":c+"--label","aria-describedby":c+"--message "+c+"--error","onUpdate:modelValue":n[0]||(n[0]=function(e){return d.value=e}),"on:dateSelected":b,readonly:""},null,42,L),[[o.Jo,d.value],[(0,o.R1)(m),v.value]]),n[1]||(n[1]=(0,o.Lk)("i",{class:"sui-icon-calendar","aria-hidden":"true"},null,-1))]),e.hasError?((0,o.uX)(),(0,o.CE)("span",{key:1,id:c+"--error",class:"sui-error-message"},(0,o.v_)(e.errorMessage),9,R)):(0,o.Q3)("",!0),e.message?((0,o.uX)(),(0,o.CE)("span",{key:2,id:c+"--message",class:"sui-description"},(0,o.v_)(e.message),9,C)):(0,o.Q3)("",!0)],2)}}};var S=n(6218);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=E(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A={class:"items-center sui-row"},T={key:0,class:"sui-col-md-6"},I=["id"],W={key:1,class:"sui-pagination"},F={key:0},X=["disabled"],M=["tabindex","disabled"],D={key:0,tabindex:"-1"},V=["disabled","onClick"],U=["tabindex","disabled"],B={key:1},K=["disabled"],H={key:2,class:"sui-select-sm sui-select-inline",style:{width:"73px"}},G=["data-tooltip"],Q={class:"sui-screen-reader-text"},N={class:"sui-row"},q={class:"sui-col"},$={class:"sui-col"},Y={class:"sui-label"},z={class:"sui-pagination-active-filters"},J=["onClick"];const Z={__name:"sui-pagination",props:{id:{type:String,default:""},title:{type:String,default:""},wrapperClass:{type:String,default:""},currentPage:{type:Number,default:1},totalPages:{type:Number,required:!0},totalResults:{type:[Number,String],required:!0},resultsText:{type:String,default:"results"},resultsStyle:{type:String,default:""},showResults:{type:Boolean,default:!0},showFilter:{type:Boolean,default:!0},showSkipButtons:{type:Boolean,default:!0},showPerPage:{type:Boolean,default:!1},filterTooltip:{type:String,default:"Filter"},filterScreenReaderText:{type:String,default:"Open search filter"},filterStyle:{type:String,default:""},maxVisiblePages:{type:Number,default:5},perPageOptions:{type:Array,default:function(){return[]}},currentPerPage:{type:[String,Number],default:20},activeFilters:{type:Array,default:function(){return[]}},activeFiltersLabel:{type:String,default:"Active Filter(s)"},showDateRange:{type:Boolean,default:!1},dateRangeLabel:{type:String,default:"Date range"},dateRangePlaceholder:{type:String,default:"Select date range"},dateRangeStartDate:{type:[String,Object],default:null},dateRangeEndDate:{type:[String,Object],default:null},dateRangeConfig:{type:Object,default:function(){return{autoApply:!0,ranges:{},locale:{format:"MMMM DD, YYYY",separator:" - ",customRangeLabel:"Custom",daysOfWeek:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"]},alwaysShowCalendars:!0}}}},emits:["page-change","filter-toggle","per-page-change","filter-remove","date-range-change","clear-filters","apply-filters"],setup:function(e,t){var n=t.emit,l=(0,S.j)().getDateRanges,s=e,u=(0,i.B)().__,c=n,d=(0,o.EW)(function(){return P(P({},s.dateRangeConfig),{},{ranges:P(P({},l()),s.dateRangeConfig.ranges)})}),p=(0,o.KR)(!1),f=(0,o.KR)(s.currentPerPage),v=(0,o.EW)(function(){return s.id?s.id:s.title?s.title.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""):""}),b=(0,o.EW)(function(){var e=[],t=s.currentPage,n=s.totalPages,o=s.maxVisiblePages;if(n<=o)for(var i=1;i<=n;i++)e.push(i);else{var r=Math.floor(o/2);if(t<=r+1){for(var a=1;a<=o-2;a++)e.push(a);e.push("..."),e.push(n)}else if(t>=n-r){e.push(1),e.push("...");for(var l=n-(o-3);l<=n;l++)e.push(l)}else{e.push(1),e.push("...");for(var u=t-r+1;u<=t+r-1;u++)e.push(u);e.push("..."),e.push(n)}}return e}),m=function(e){c("date-range-change",{start:e.startFormatted,end:e.endFormatted,text:e.start.format("MMMM DD, YYYY")+" - "+e.end.format("MMMM DD, YYYY"),startDate:e.start,endDate:e.end,label:e.label})},y=function(e){e>=1&&e<=s.totalPages&&e!==s.currentPage&&c("page-change",e)},g=function(){p.value=!p.value,c("filter-toggle",p.value)},k=function(){c("per-page-change",f.value)},h=function(){c("clear-filters")},_=function(){c("apply-filters")};return function(t,n){return(0,o.uX)(),(0,o.CE)("div",null,[(0,o.Lk)("div",A,[e.showDateRange?((0,o.uX)(),(0,o.CE)("div",T,[(0,o.bF)(x,{label:e.dateRangeLabel,placeholder:e.dateRangePlaceholder,"start-date":e.dateRangeStartDate,"end-date":e.dateRangeEndDate,options:d.value,onDateSelected:m},null,8,["label","placeholder","start-date","end-date","options"])])):(0,o.Q3)("",!0),(0,o.Lk)("div",{class:(0,o.C4)(e.showDateRange?"sui-col-md-6":"sui-col")},[(0,o.Lk)("div",{class:(0,o.C4)(["gap-2 sui-pagination-wrap",e.wrapperClass]),id:v.value},[e.showResults?((0,o.uX)(),(0,o.CE)("span",{key:0,class:"sui-pagination-results",style:(0,o.Tr)(e.resultsStyle)},(0,o.v_)(e.totalResults)+" "+(0,o.v_)(e.resultsText),5)):(0,o.Q3)("",!0),e.totalPages>1?((0,o.uX)(),(0,o.CE)("ul",W,[e.showSkipButtons?((0,o.uX)(),(0,o.CE)("li",F,[(0,o.Lk)("a",{href:"#",role:"button",disabled:1===e.currentPage?"disabled":null,onClick:n[0]||(n[0]=(0,o.D$)(function(e){return y(1)},["prevent"]))},n[5]||(n[5]=[(0,o.Lk)("span",{class:"sui-icon-arrow-skip-back","aria-hidden":"true"},null,-1),(0,o.Lk)("span",{class:"sui-screen-reader-text"},"Go to first page",-1)]),8,X)])):(0,o.Q3)("",!0),(0,o.Lk)("li",{class:(0,o.C4)({disabled:1===e.currentPage})},[(0,o.Lk)("a",{tabindex:1===e.currentPage?-1:0,onClick:n[1]||(n[1]=(0,o.D$)(function(t){return y(e.currentPage-1)},["prevent"])),disabled:1===e.currentPage?"disabled":null},n[6]||(n[6]=[(0,o.Lk)("i",{class:"sui-icon-chevron-left","aria-hidden":"true"},null,-1)]),8,M)],2),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(b.value,function(t){return(0,o.uX)(),(0,o.CE)("li",{key:t,class:(0,o.C4)({active:t===e.currentPage,disabled:"..."===t})},["..."===t?((0,o.uX)(),(0,o.CE)("a",D,(0,o.v_)(t),1)):((0,o.uX)(),(0,o.CE)("a",{key:1,disabled:t===e.currentPage?"disabled":null,tabindex:0,onClick:(0,o.D$)(function(e){return y(t)},["prevent"])},(0,o.v_)(t),9,V))],2)}),128)),(0,o.Lk)("li",{class:(0,o.C4)({disabled:e.currentPage===e.totalPages})},[(0,o.Lk)("a",{tabindex:e.currentPage===e.totalPages?-1:0,onClick:n[2]||(n[2]=(0,o.D$)(function(t){return y(e.currentPage+1)},["prevent"])),disabled:e.currentPage===e.totalPages?"disabled":null},n[7]||(n[7]=[(0,o.Lk)("i",{class:"sui-icon-chevron-right","aria-hidden":"true"},null,-1)]),8,U)],2),e.showSkipButtons?((0,o.uX)(),(0,o.CE)("li",B,[(0,o.Lk)("a",{href:"#",role:"button",disabled:e.currentPage===e.totalPages?"disabled":null,onClick:n[3]||(n[3]=(0,o.D$)(function(t){return y(e.totalPages)},["prevent"]))},n[8]||(n[8]=[(0,o.Lk)("span",{class:"sui-icon-arrow-skip-forward","aria-hidden":"true"},null,-1),(0,o.Lk)("span",{class:"sui-screen-reader-text"},"Go to last page",-1)]),8,K)])):(0,o.Q3)("",!0)])):(0,o.Q3)("",!0),e.showPerPage&&e.perPageOptions.length?((0,o.uX)(),(0,o.CE)("div",H,[(0,o.bF)(a.A,{modelValue:f.value,"onUpdate:modelValue":[n[4]||(n[4]=function(e){return f.value=e}),k],options:e.perPageOptions,"custom-class":"per_page sui-select-sm"},null,8,["modelValue","options"])])):(0,o.Q3)("",!0),e.showFilter?((0,o.uX)(),(0,o.CE)("button",{key:3,type:"button",class:"sui-button-icon sui-button-outlined sui-tooltip","data-tooltip":e.filterTooltip,style:(0,o.Tr)(e.filterStyle),onClick:g},[n[9]||(n[9]=(0,o.Lk)("i",{class:"sui-icon-filter","aria-hidden":"true"},null,-1)),(0,o.Lk)("span",Q,(0,o.v_)(e.filterScreenReaderText),1)],12,G)):(0,o.Q3)("",!0)],10,I)],2)]),e.showFilter?((0,o.uX)(),(0,o.CE)("div",{key:0,class:(0,o.C4)(["mb-2 sui-pagination-filter",{"sui-open":p.value}])},[(0,o.RG)(t.$slots,"filter"),n[10]||(n[10]=(0,o.Lk)("hr",null,null,-1)),(0,o.Lk)("div",N,[(0,o.Lk)("div",q,[(0,o.bF)(r.A,{type:"button",onClick:h,label:(0,o.R1)(u)("Clear Filters"),action:"clear-filters"},null,8,["label"])]),(0,o.Lk)("div",$,[(0,o.bF)(r.A,{type:"button",variant:"gray",onClick:_,icon:"sui-icon-check","custom-class":"float-r",label:(0,o.R1)(u)("Apply Filters"),action:"apply-filters"},null,8,["label"])])])],2)):(0,o.Q3)("",!0),e.activeFilters&&e.activeFilters.length?((0,o.uX)(),(0,o.CE)(o.FK,{key:1},[(0,o.Lk)("label",Y,(0,o.v_)(e.activeFiltersLabel),1),(0,o.Lk)("div",z,[((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)(e.activeFilters,function(e){return(0,o.uX)(),(0,o.CE)("span",{key:e.id||e.label,class:"sui-active-filter"},[(0,o.eW)((0,o.v_)(e.label)+" ",1),(0,o.Lk)("span",{role:"button",class:"sui-active-filter-remove",onClick:function(t){return function(e){c("filter-remove",e)}(e)}},null,8,J)])}),128))])],64)):(0,o.Q3)("",!0)])}}}},9250:(e,t,n)=>{"use strict";n.d(t,{S:()=>f});var o=n(810),i=n(9726),r=n(1751),a=n(5592),l=n(2720),s=n(7476);function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function r(n,o,i,r){var s=o&&o.prototype instanceof l?o:l,u=Object.create(s.prototype);return c(u,"_invoke",function(n,o,i){var r,l,s,u=0,c=i||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return r=t,l=0,s=e,p.n=n,a}};function f(n,o){for(l=n,s=o,t=0;!d&&u&&!i&&t<c.length;t++){var i,r=c[t],f=p.p,v=r[2];n>3?(i=v===o)&&(s=r[(l=r[4])?5:(l=3,3)],r[4]=r[5]=e):r[0]<=f&&((i=n<2&&f<r[1])?(l=0,p.v=o,p.n=r[1]):f<v&&(i=n<3||r[0]>o||o>v)&&(r[4]=n,r[5]=o,p.n=v,l=0))}if(i||n>1)return a;throw d=!0,o}return function(i,c,v){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&f(c,v),l=c,s=v;(t=l<2?e:s)||!d;){r||(l?l<3?(l>1&&(p.n=-1),f(l,s)):p.n=s:p.v=s);try{if(u=2,r){if(l||(i="next"),t=r[i]){if(!(t=t.call(r,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=r.return)&&t.call(r),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);r=e}else if((t=(d=p.n<0)?s:n.call(o,p))!==a)break}catch(t){r=e,l=1,s=t}finally{u=1}}return{value:t,done:d}}}(n,i,r),!0),u}var a={};function l(){}function s(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(c(t={},o,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return s.prototype=d,c(f,"constructor",d),c(d,"constructor",s),s.displayName="GeneratorFunction",c(d,i,"GeneratorFunction"),c(f),c(f,i,"Generator"),c(f,o,function(){return this}),c(f,"toString",function(){return"[object Generator]"}),(u=function(){return{w:r,m:v}})()}function c(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}c=function(e,t,n,o){function r(t,n){c(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},c(e,t,n,o)}function d(e,t,n,o,i,r,a){try{var l=e[r](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(o,i)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var r=e.apply(t,n);function a(e){d(r,o,i,a,l,"next",e)}function l(e){d(r,o,i,a,l,"throw",e)}a(void 0)})}}var f=(0,o.nY)("scan",function(){var e,t=(0,i.KR)(null),n=(0,i.KR)({}),o=(0,i.KR)({}),c=(0,i.KR)(""),d=(0,i.KR)({}),f=(0,i.KR)({}),v=(0,i.KR)({}),b=(0,a.B)(),m=b.__,y=b.sprintf,g=(0,s.r)(),k=(0,i.EW)(function(){var e;return(null===(e=t.value)||void 0===e||null===(e=e.count)||void 0===e?void 0:e.issues_total)||0}),h=(0,i.EW)(function(){var e;return[void 0,"finish","idle"].includes(null===(e=t.value)||void 0===e?void 0:e.status)}),_=(0,i.EW)(function(){var e;return(null===(e=f.value)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.length)||0}),w=(0,i.EW)(function(){var e;return(null===(e=t.value)||void 0===e||null===(e=e.issues_items)||void 0===e?void 0:e.length)||0}),L=(0,i.EW)(function(){return g.isLoading("scan")});function R(e){t.value=e.scan,n.value=e.routes,o.value=e.nonces,c.value=e.report,d.value=e.settings,f.value=e.quarantine,v.value=e.upsell}function C(){return(C=p(u().m(function e(){return u().w(function(e){for(;;)if(0===e.n)return e.a(2,g.withLoading("start-scan",p(u().m(function e(){var i;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,r.q)().post(n.value.start,o.value.start,{});case 1:return i=e.v,t.value=i,e.a(2,i)}},e)}))))},e)}))).apply(this,arguments)}function x(){return(x=p(u().m(function e(){return u().w(function(e){for(;;)if(0===e.n)return e.a(2,g.withLoading("cancel-scan",p(u().m(function e(){var i;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,r.q)().post(n.value.cancel,o.value.cancel,{});case 1:return i=e.v,t.value=i.scan,e.a(2,i)}},e)}))))},e)}))).apply(this,arguments)}function S(){return E.apply(this,arguments)}function E(){return(E=p(u().m(function e(){var i;return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(0,r.q)().post(n.value.status,o.value.status,{});case 1:if("session_out"!==(null==(i=e.v)?void 0:i.type_notice)){e.n=2;break}throw new Error(i.type_notice);case 2:return t.value=i,e.a(2,i)}},e)}))).apply(this,arguments)}"undefined"!=typeof window&&null!==(e=window.dashboard)&&void 0!==e&&e.scan&&R(window.dashboard.scan);var j,P=(0,i.EW)(function(){return 1===k.value?m("We've detected a potential security risk in your file system. We recommend you take a look and action a fix, or ignore the file if it's harmless."):k.value>1?y(m("We've detected %d potential security risks in your file system. We recommend you take a look and action a fix, or ignore the file if it's harmless."),[k.value]):m("You don't have any outstanding security recommendations, nice work!")}),O=function(){var e,t;null===(e=j)||void 0===e||null===(t=e.pause)||void 0===t||t.call(e)};return{scan:t,report:c,settings:d,quarantine:f,upsell:v,count:k,isScanStopped:h,getQuarantineCount:_,tooltips:P,totalIssues:w,isLoading:L,init:R,startScan:function(){return C.apply(this,arguments)},cancelScan:function(){return x.apply(this,arguments)},status:S,startPolling:function(){var e;null!==(e=j)&&void 0!==e&&null!==(e=e.isActive)&&void 0!==e&&e.value||(j=(0,l.Rg)(p(u().m(function e(){return u().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,S();case 1:e.n=3;break;case 2:e.p=2,"session_out"===e.v.message&&O();case 3:return e.a(2)}},e,null,[[0,2]])})),3e3)).resume()},stopPolling:O,resultIndicator:function(e){return e>0?'<span class="sui-tag sui-tag-warning">'.concat(e,"</span>"):'<i aria-hidden="true" class="sui-icon-check-tick sui-success"></i>'}}})},9359:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,"#hub-ip-list[data-v-4133dfb3]:target{outline:1px solid #17a8e3}.sui-2-12-24 .sui-wrap .sui-tooltip[data-v-4133dfb3]:before{left:1rem}.sui-2-12-24 .sui-wrap .sui-tooltip[data-v-4133dfb3]:after{left:1.25rem;white-space:normal;width:160px}",""]);const r=i},9409:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=(0,n(5592).B)().__;const i={beforeMount:function(e,t){if(window.wp&&window.wp.media){var n=null,i=t.value||{},r="function"==typeof i?i:i.callback,a=i.type||["image"],l=i.allowedTypes||["image/jpeg","image/png","image/gif"],s=i.title||o("Choose an image file"),u=function(){"undefined"!=typeof _&&"function"==typeof _.forEach&&["get","set","cloneDeep","at"].every(function(e){return"function"==typeof _[e]})&&_.noConflict(),n||(n=window.wp.media({title:s,button:{text:o("Choose File")},multiple:!1,library:{type:a}})).on("select",function(){var e=n.state().get("selection").first().toJSON();0===l.length||l.indexOf(e.mime)>-1?r({url:e.url,valid:!0,id:e.id,filename:e.filename}):(window.Defender&&window.Defender.showNotification&&window.Defender.showNotification("error",o("Invalid file type")),r({url:e.url,valid:!1}))}),n.open()};e.__vueWpMediaHandler__=u,e.addEventListener("click",u)}},unmounted:function(e){e.removeEventListener("click",e.__vueWpMediaHandler__),delete e.__vueWpMediaHandler__}}},9478:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var o=n(5592),i=function(){var e=(0,o.B)().__;return{ucFirst:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},getFlagEmoji:function(e){if(2===e.length)return e.toUpperCase().replace(/./g,function(e){return String.fromCodePoint(127397+e.charCodeAt())})},getCountryName:function(t){return 2===t.length?new Intl.DisplayNames(["en"],{type:"region"}).of(t):e("Unknown")},formatNumber:function(e){return"string"==typeof e&&(e=e.replace(/,/g,"")),isNaN(Number(e))?e:new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(Number(e))}}}},9755:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(6314),i=n.n(o)()(function(e){return e[1]});i.push([e.id,".bottom-border[data-v-4b019f10]{border-bottom:1px solid #e6e6e6}.bottom-border[data-v-4b019f10]:last-child{border-bottom:none}.sui-tag[data-v-4b019f10]{font-size:8px!important;height:auto!important;line-height:8px!important;margin-left:5px!important;min-height:auto!important;padding:2px 6px!important;position:relative;top:-2px;width:auto!important}",""]);const r=i},9806:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var o=n(5592),i=n(9726);function r(){(0,o.B)().__;var e=(0,i.EW)(function(){return defender.whitelabel.hide_branding}),t=(0,i.EW)(function(){return"disabled"===defender.is_whitelabel&&0===parseInt(defender.is_free)}),n=(0,i.EW)(function(){return"disabled"===defender.is_whitelabel}),r=(0,i.EW)(function(){return defender.whitelabel.hero_image||!1}),a=(0,i.EW)(function(){return defender.whitelabel.hide_doc_link||!1}),l=(0,i.EW)(function(){return e.value&&r.value?{backgroundImage:"url(".concat(r.value,")")}:{}});return{maybeHideBranding:e,showSupportLinks:t,isWhitelabelDisabled:n,whitelabelHeroImage:r,hide_doc_link:a,backgroundImageStyle:l}}},9919:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(9726);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var r=["type","disabled"],a={class:"sui-loading-text"};const l={__name:"submit-button2",props:{cssClass:String,disabled:Boolean,type:String,is_icon:Boolean,doing_ajax:[Boolean,String],action:String},emits:["click"],setup:function(e){var t=e,n=(0,o.nI)().proxy,l=null==n?void 0:n.$store,s=(0,o.EW)(function(){var e,n=["sui-button"];return!0===t.is_icon&&(n=[]),t.cssClass&&n.push(t.cssClass),void 0===t.doing_ajax?("object"===i(null==l?void 0:l.state.doing_ajax)&&t.action&&-1!==l.state.doing_ajax.indexOf(t.action)||!0===(null==l?void 0:l.state.doing_ajax))&&(e=!0):e=t.doing_ajax,!0===e&&n.push("sui-button-onload"),n}),u=(0,o.EW)(function(){return!0===t.disabled}),c=(0,o.EW)(function(){return""===t.type?"submit":t.type});return function(e,t){return(0,o.uX)(),(0,o.CE)("button",{type:c.value,onClick:t[0]||(t[0]=function(t){return e.$emit("click")}),class:(0,o.C4)(s.value),disabled:u.value},[(0,o.Lk)("span",a,[(0,o.RG)(e.$slots,"default")]),t[1]||(t[1]=(0,o.Lk)("i",{class:"sui-icon-loader sui-loading","aria-hidden":"true"},null,-1))],10,r)}}}}},e=>{e.O(0,[594],()=>{return t=4599,e(e.s=t);var t});e.O()}]);