File: /var/www/delta/wp-content/plugins/better-wp-security/dist/pages/vulnerabilities.js
/*! For license information please see vulnerabilities.js.LICENSE.txt */
(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[3974],{1694:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"}))},2809:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"}))},3075:e=>{e.exports=function(){return this.wp.i18n}()},8601:e=>{e.exports=function(){return this.wp.element}()},15603:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(r.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}))},17232:e=>{e.exports=function(){return this.wp.domReady}()},23175:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"}))},31987:e=>{e.exports=function(){return this.wp.data}()},38125:e=>{e.exports=function(){return this.wp.plugins}()},39214:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.createElement)(r.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"}))},39959:e=>{e.exports=function(){return this.wp.components}()},46627:e=>{e.exports=function(){return this.itsec.packages.data}()},46644:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,a.createElement)(r.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}))},48851:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},51609:e=>{"use strict";e.exports=window.React},55933:e=>{e.exports=function(){return this.wp.primitives}()},56897:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}))},66087:e=>{"use strict";e.exports=window.lodash},67108:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}))},75413:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});var a=n(17929),r=n(86663),l=n(66087);function i(e,t){const n=(0,a.zR)(),i=n=>{const l="string"==typeof n?(0,a.Rr)(n):n,i=(0,r.parse)(l.search?.substring(1))||{};return{...l,pathname:e.pathname,search:"?"+(0,r.stringify)({...i,path:l.pathname,...t})}};return{get length(){return n.length},get action(){return n.action},get location(){const e=(0,r.parse)(n.location.search.substring(1)),a=e.path||"/";return{...n.location,pathname:a,search:"?"+(0,r.stringify)((0,l.omit)(e,["path",Object.keys(t)]))}},createHref:e=>n.createHref(i(e)),push:(e,t)=>{n.push(i(e),t)},replace:(e,t)=>{n.replace(i(e),t)},go:(...e)=>n.go.apply(n,e),goBack:(...e)=>n.goBack.apply(n,e),goForward:(...e)=>n.goForward.apply(n,e),block:(...e)=>n.block.apply(n,e),listen(e){return n.listen((()=>{e(this.location,this.action)}))}}}},75795:e=>{"use strict";e.exports=window.ReactDOM},76154:e=>{"use strict";e.exports=window.moment},77172:e=>{e.exports=function(){return this.wp.url}()},79860:e=>{e.exports=function(){return this.wp.keycodes}()},81903:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"}))},85631:e=>{e.exports=function(){return this.wp.apiFetch}()},88053:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(51609),r=n(55933);const l=(0,a.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(r.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}))},89897:e=>{e.exports=function(){return this.wp.compose}()},89959:e=>{e.exports=function(){return this.wp.date}()},94513:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BeforeHeaderFill:()=>se,severityColor:()=>te,vulnerabilityIcon:()=>ee});var a=n(51609),r=n(17232),l=n.n(r),i=n(8601),s=n(81923),c=n(56347),o=n(7e3),u=n(79487),m=n(39959),d=n(38125),p=n(88356),E=n(48620),h=n(54625),g=n(66087),v=n(31987),y=n(3075),f=n(89897),w=n(39214),x=n(1694),_=n(56897),b=n(46627),A=n(98883),L=n(89959),N=n(41588);const S=(0,s.A)("header",{target:"egry9926"})("display:flex;flex-direction:",(({isSmall:e})=>e&&"column"),";justify-content:space-between;align-items:",(({isSmall:e})=>e?"flex-start":"center"),";padding:1rem 1.25rem;"),I=(0,s.A)(p.DZ,{target:"egry9925"})("margin-top:",(({isSmall:e})=>e&&"-1.25rem"),";"),O=(0,s.A)(p.EY,{shouldForwardProp:e=>"hasScanDate"!==e,target:"egry9924"})("visibility:",(({hasScanDate:e})=>e?"visible":"hidden"),";"),k=(0,s.A)("div",{target:"egry9923"})("display:flex;flex-direction:",(({isSmall:e})=>e&&"column"),";gap:1rem;margin-top:1rem;"),C=(0,s.A)("div",{target:"egry9922"})("display:flex;flex-direction:column;align-items:flex-end;order:",(({isSmall:e})=>e&&"-1"),";align-self:",(({isSmall:e})=>e&&"flex-end"),";"),Y=(0,s.A)(p.EY,{target:"egry9921"})({name:"kc0l0i",styles:"font-size:0.625rem"}),R=(0,s.A)(N.Tk,{shouldForwardProp:e=>"isLarge"!==e,target:"egry9920"})("width:",(({isLarge:e})=>e?"170px":"124px"),";");function D(){const{scans:e}=(0,v.useSelect)((e=>({scans:e(b.siteScannerStore).getScans()})),[]),t=(0,f.useViewportMatch)("small","<"),n=(0,f.useViewportMatch)("large");return(0,a.createElement)(S,{isSmall:t},(0,a.createElement)("div",null,(0,a.createElement)(I,{isSmall:t,level:2,size:p.$C.LARGE,variant:p.J3.DARK,weight:600,text:(0,y.__)("Vulnerable Software","better-wp-security")}),(0,a.createElement)(O,{hasScanDate:e.length>0,variant:p.J3.MUTED,text:(0,y.sprintf)((0,y.__)("This website was last checked against the vulnerability database on %s.","better-wp-security"),(0,L.dateI18n)("m/d/Y (g:i A)",e[0]?.time))}),(0,a.createElement)(k,{isSmall:t},(0,a.createElement)(E.i$,null),(0,a.createElement)(E.Fe,null))),(0,a.createElement)(C,{isSmall:t},(0,a.createElement)(Y,{weight:600,text:(0,y.__)("Powered by","better-wp-security")}),(0,a.createElement)(R,{isLarge:n})))}var P=n(81903),z=n(23175),V=n(46644),F=n(88053),$=n(28351);const M=(0,s.A)("div",{target:"e1p1tpjx2"})({name:"tgjssi",styles:"display:flex;align-items:center;justify-content:center;max-width:1680px"}),T=(0,s.A)("div",{target:"e1p1tpjx1"})({name:"1e6v2hq",styles:"display:flex;flex-direction:column;align-items:center;gap:1.25rem;max-width:300px;padding-top:70px;padding-bottom:70px"}),B=(0,s.A)(p.EY,{shouldForwardProp:e=>"hasScanDate"!==e,target:"e1p1tpjx0"})("visibility:",(({hasScanDate:e})=>e?"visible":"hidden"),";");function H({getScans:e}){return(0,a.createElement)(M,null,(0,a.createElement)(T,null,(0,a.createElement)(E.zf,{icon:(0,a.createElement)(N.KC,{style:{height:"135px"}})}),(0,a.createElement)(p.EY,{variant:p.J3.DARK,weight:700,text:(0,y.__)("No Vulnerabilities Found!","better-wp-security")}),(0,a.createElement)(p.EY,{align:"center",variant:p.J3.DARK,text:(0,y.__)("Your site has been successfully checked against the Patchstack vulnerability database.","better-wp-security")}),(0,a.createElement)(B,{hasScanDate:e.length,variant:p.J3.DARK,weight:600,text:(0,y.sprintf)((0,y.__)("Last Scan: %s","better-wp-security"),(0,L.dateI18n)("m/d/Y",e[0]?.time))}),(0,a.createElement)(h.N_,{to:"/scan",replace:!0,component:(0,A.kk)(p.$n),variant:"primary",text:(0,y.__)("Scan for Vulnerabilities","better-wp-security")})))}const G=(0,s.A)(p.ui,{target:"eu3ynho9"})({name:"ic1ezh",styles:"flex-shrink:1;position:relative"}),J=(0,s.A)("tr",{target:"eu3ynho8"})("vertical-align:",(({isSmall:e,isLarge:t})=>!e&&!t&&"top"),";"),K=(0,s.A)(p.EY,{target:"eu3ynho7"})({name:"104g9nb",styles:"grid-area:name"}),j=(0,s.A)(p.EY,{target:"eu3ynho6"})({name:"1olbkha",styles:"grid-area:version"}),q=(0,s.A)(p.EY,{target:"eu3ynho5"})({name:"29p8i5",styles:"grid-area:detail"}),U=(0,s.A)("div",{target:"eu3ynho4"})({name:"1doqzcq",styles:'display:grid;grid-template-columns:0.5fr 1fr;grid-template-areas:"severity name";justify-items:start'}),W=(0,s.A)(p.ui,{target:"eu3ynho3"})({name:"144dajy",styles:'display:grid;grid-template-columns:1fr;grid-template-areas:"name" "version" "detail";align-items:center;@media screen and (min-width: 960px){grid-template-columns:1fr 1fr 1fr;grid-template-areas:"name version detail";}'}),Q=(0,s.A)(p.EY,{target:"eu3ynho2"})("display:flex;justify-content:center;width:min-content;min-width:2rem;margin:",(({isSmall:e})=>!e&&"0 auto"),";padding:1.5px 6.5px;background-color:",(({backgroundColor:e})=>e),";border-radius:2px;"),Z=(0,s.A)(m.Icon,{target:"eu3ynho1"})({name:"1svyz14",styles:"background-color:#438C56;border-radius:2rem"}),X=(0,s.A)(m.Icon,{target:"eu3ynho0"})({name:"i7362z",styles:"background-color:#FFABAF;border-radius:2rem"});function ee(e){switch(e){case"plugin":return P.A;case"theme":return z.A;case"wordpress":return V.A;default:return}}function te(e){switch(!0){case isNaN(e):return"#CECECE";case e<3:return"#B8E6BF";case e<7:return"#FFC518";case e<9:return"#FFABAF";default:return"#D63638"}}function ne(e){switch(e){case"":return(0,a.createElement)(X,{icon:F.A,style:{fill:"#D75A4B"}});case"auto-updated":case"deactivated":case"deleted":case"updated":return(0,a.createElement)(Z,{icon:$.A,style:{fill:"#FFFFFF"}});case"patched":return(0,a.createElement)(N.VY,null);case"muted":return(0,a.createElement)(N.dM,null)}}function ae({getScans:e,items:t,filters:n}){const r=(0,f.useViewportMatch)("small","<"),l=(0,f.useViewportMatch)("large");return(0,a.createElement)(G,{as:"section"},(0,a.createElement)("table",{className:"itsec-card-vulnerable-software__table"},(0,a.createElement)("thead",null,r?(0,a.createElement)("tr",null,(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Type","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Severity and Name","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Status","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Action","better-wp-security")})):(0,a.createElement)("tr",null,(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Type","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Vulnerability","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Severity","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Status","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Date","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Action","better-wp-security")}))),t.length>0&&(0,a.createElement)("tbody",null,t.map((e=>{var t,n;const i=e.details.id;return(0,a.createElement)(J,{key:i,isSmall:r,isLarge:l},r?(0,a.createElement)(React.Fragment,null,(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{icon:ee(e.software.type.slug)})),(0,a.createElement)("td",null,(0,a.createElement)(U,null,(0,a.createElement)(Q,{backgroundColor:te(e.details.score),isSmall:r,status:e.status,weight:600,text:null!==(t=e.details.score)&&void 0!==t?t:"??"}),(0,a.createElement)(K,{weight:500,text:e.software.label||e.software.slug}))),(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{icon:ne(e.resolution.slug),iconSize:16,text:e.resolution.label})),(0,a.createElement)("td",null,(0,a.createElement)(h.N_,{to:`/vulnerability/${i}`},(0,y.__)("View Details","better-wp-security")))):(0,a.createElement)(React.Fragment,null,(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{icon:ee(e.software.type.slug),text:e.software.type.label})),(0,a.createElement)("td",null,(0,a.createElement)(W,{isLarge:l},(0,a.createElement)(K,{weight:500,text:e.software.label||e.software.slug}),(0,a.createElement)(j,{text:e.details.affected_in}),(0,a.createElement)(q,{text:e.details.type.label}))),(0,a.createElement)("td",null,(0,a.createElement)(Q,{backgroundColor:te(e.details.score),status:e.status,weight:600,text:null!==(n=e.details.score)&&void 0!==n?n:"??"})),(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{icon:ne(e.resolution.slug),iconSize:16,text:e.resolution.label})),(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{text:(0,y.sprintf)((0,y.__)("%s ago","better-wp-security"),e.last_seen_diff)})),(0,a.createElement)("td",null,(0,a.createElement)(h.N_,{to:`/vulnerability/${i}`},(0,y.__)("View Details","better-wp-security")))))}))),0===t.length&&n?.resolution?.includes("")&&(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("td",{colSpan:"6"},(0,a.createElement)(H,{getScans:e})))),0===t.length&&!n?.resolution?.includes("")&&(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("td",{colSpan:"6"},(0,y.__)("No vulnerabilities found","better-wp-security"))))))}const re=(0,s.A)("div",{target:"e5qch01"})({name:"n7u7td",styles:"display:flex;flex-direction:column;gap:1rem;width:100%;max-width:1680px;margin:0 auto;padding:1rem 1.25rem"}),le=(0,s.A)("header",{target:"e5qch00"})("display:flex;justify-content:space-between;align-items:",(({isSmall:e})=>e?"flex-start":"center"),";"),{Slot:ie,Fill:se}=(0,m.createSlotFill)("BeforeHeader"),ce=(0,s.A)(p.Cu,{target:"e14j518i4"})({name:"lee4ct",styles:"width:350px"}),oe=(0,s.A)("div",{target:"e14j518i3"})({name:"r2g86h",styles:"display:flex;align-items:center;gap:1rem"}),ue=(0,s.A)("span",{target:"e14j518i2"})({name:"14cgj8g",styles:"color:#c0c0c0"}),me=(0,s.A)("div",{target:"e14j518i1"})("display:flex;flex-direction:",(({isSmall:e})=>e&&"column"),";gap:1rem;"),de=(0,s.A)("div",{target:"e14j518i0"})({name:"1vltohq",styles:"display:flex;gap:2rem;justify-content:flex-end;& .components-button.is-tertiary:disabled{background:transparent!important;}"}),pe={per_page:100};function Ee(){const e={resolution:["unresolved","patched","deactivated"]},[t,n]=(0,i.useState)(e),{query:r,fetchQueryNextPage:l,fetchQueryPrevPage:s}=(0,v.useDispatch)(b.vulnerabilitiesStore),{items:c,isQuerying:o,hasResolved:u,getScans:d,queryHasNextPage:E,queryHasPrevPage:L}=(0,v.useSelect)((e=>({items:e(b.vulnerabilitiesStore).getVulnerabilities(),isQuerying:e(b.vulnerabilitiesStore).isQuerying("main"),hasResolved:e(b.vulnerabilitiesStore).hasFinishedResolution("getVulnerabilities"),queryHasNextPage:e(b.vulnerabilitiesStore).queryHasNextPage("main"),queryHasPrevPage:e(b.vulnerabilitiesStore).queryHasPrevPage("main"),getScans:e(b.siteScannerStore).getScans()})),[]),N=(0,f.useViewportMatch)("small","<"),S=e=>{n(e),r("main",{...e,...pe})},I=()=>{n(e),r("main",{...e,...pe}),S(e)},O=Object.keys(t).filter((e=>!(0,g.isEmpty)(t[e]))).length;return(0,a.createElement)(re,null,(0,a.createElement)(ie,null),(0,a.createElement)(le,{isSmall:N},(0,a.createElement)(oe,null,(0,a.createElement)(m.Dropdown,{popoverProps:{focusOnMount:"container"},renderToggle:({isOpen:e,onToggle:t})=>(0,a.createElement)(p.$n,{icon:w.A,onClick:t,"aria-expanded":e,variant:"tertiary",text:(0,y.sprintf)((0,y.__)("Filter (%d)","better-wp-security"),O)}),renderContent:()=>(0,a.createElement)(ce,{initialValue:t,initialOpen:["software_type"],expandSingle:!0,isBusy:o,onApply:S},(0,a.createElement)(p.OV,{slug:"software_type",title:(0,y.__)("Types","better-wp-security"),options:[{value:"theme",label:(0,y.__)("Themes","better-wp-security")},{value:"plugin",label:(0,y.__)("Plugins","better-wp-security")},{value:"wordpress",label:(0,y.__)("Core","better-wp-security")}]}),(0,a.createElement)(p.OV,{slug:"resolution",title:(0,y.__)("Status","better-wp-security"),options:[{value:"unresolved",label:(0,y.__)("Unresolved","better-wp-security")},{value:"patched",label:(0,y.__)("Mitigated","better-wp-security")},{value:"auto-updated",label:(0,y.__)("Auto-Updated","better-wp-security")},{value:"updated",label:(0,y.__)("Updated","better-wp-security")},{value:"muted",label:(0,y.__)("Muted","better-wp-security")},{value:"deactivated",label:(0,y.__)("Deactivated","better-wp-security")},{value:"deleted",label:(0,y.__)("Deleted","better-wp-security")}]}))}),O>0&&(0,a.createElement)(React.Fragment,null,(0,a.createElement)(ue,null,"|"),(0,a.createElement)(p.$n,{onClick:I,variant:"tertiary",text:(0,y.__)("Reset all","better-wp-security")}))),(0,a.createElement)(me,{isSmall:N},(0,a.createElement)(h.N_,{to:"/database",component:(0,A.kk)(p.$n),text:(0,y.__)("Browse Vulnerability Database","better-wp-security")}),(0,a.createElement)(h.N_,{to:"/scan",replace:!0,component:(0,A.kk)(p.$n),onClick:I,variant:"primary",text:(0,y.__)("Scan for Vulnerabilities","better-wp-security")}))),(0,a.createElement)(p.ui,{as:"section"},(0,a.createElement)(D,null),u&&(0,a.createElement)(ae,{getScans:d,items:c,filters:t})),(0,a.createElement)(de,null,(0,a.createElement)(p.$n,{disabled:!L,icon:x.A,iconGap:0,variant:"tertiary",onClick:()=>{s("main","replace")},text:(0,y.__)("Prev","better-wp-security")}),(0,a.createElement)(p.$n,{disabled:!E,icon:_.A,iconPosition:"right",iconGap:0,variant:"tertiary",onClick:()=>{l("main","replace")},text:(0,y.__)("Next","better-wp-security")})))}var he=n(15603),ge=n(67108);const ve=(0,s.A)(p.ui,{target:"e1itr1mv10"})({name:"ic1ezh",styles:"flex-shrink:1;position:relative"}),ye=(0,s.A)(p.EY,{target:"e1itr1mv9"})({name:"104g9nb",styles:"grid-area:name"}),fe=(0,s.A)(p.EY,{target:"e1itr1mv8"})({name:"1olbkha",styles:"grid-area:version"}),we=(0,s.A)(p.EY,{target:"e1itr1mv7"})({name:"29p8i5",styles:"grid-area:detail"}),xe=(0,s.A)("td",{target:"e1itr1mv6"})({name:"1bmnxg7",styles:"white-space:nowrap"}),_e=(0,s.A)(p.ui,{target:"e1itr1mv5"})('display:grid;grid-template-columns:1fr 0.5fr 1fr;grid-template-areas:"name name name" "version detail detail";align-items:center;@media screen and (min-width: 960px){grid-template-columns:1fr 0.5fr 1fr;grid-template-areas:"name version detail";gap:',(({theme:{getSize:e}})=>e(1)),";}"),be=(0,s.A)(p.EY,{target:"e1itr1mv4"})("padding:1.5px 6.5px;background-color:",(({backgroundColor:e})=>e),";border-radius:2px;width:35px;display:flex;justify-content:center;"),Ae=(0,s.A)(m.Icon,{target:"e1itr1mv3"})({name:"o0zq48",styles:"fill:white;background-color:#438C56;border-radius:2rem"}),Le=(0,s.A)(m.Icon,{target:"e1itr1mv2"})({name:"i7362z",styles:"background-color:#FFABAF;border-radius:2rem"}),Ne=(0,s.A)(p.ui,{target:"e1itr1mv0"})("display:block;align-items:center;justify-content:space-between;padding:",(({theme:{getSize:e}})=>`${e(.5)} ${e(1.5)}`),";text-align:center;");function Se(e){switch(e.toLowerCase()){case"plugin":return P.A;case"theme":return z.A;case"wordpress":return V.A;default:return}}function Ie(e){switch(!0){case e<3:return"#B8E6BF";case e<7:return"#FFC518";case e<9:return"#FFABAF";default:return"#D63638"}}function Oe(e){return""===e?(0,y.__)("No Fix","better-wp-security"):(0,y.__)("Fix Available","better-wp-security")}function ke(e){e=new Date(e);const t=new Date;return Math.round((t.getTime()-e.getTime())/864e5)}function Ce({items:e}){return(0,a.createElement)(ve,{as:"section"},(0,a.createElement)("table",{className:"itsec-card-vulnerable-software__table"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",null,(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Type","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Vulnerability","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Severity","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Status","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Date","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Action","better-wp-security")}))),e.length>0&&(0,a.createElement)("tbody",null,e.map((e=>{const t=e.id;return(0,a.createElement)("tr",{key:t},(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{icon:Se(e.product_type),text:e.product_type})),(0,a.createElement)("td",null,(0,a.createElement)(_e,null,(0,a.createElement)(ye,{weight:500,text:e.product_name||e.product_slug}),(0,a.createElement)(fe,{text:e.affected_in}),(0,a.createElement)(we,{text:e.vuln_type}))),(0,a.createElement)("td",null,(0,a.createElement)(be,{backgroundColor:Ie(e.cvss_score),status:e.status,weight:600,text:e.cvss_score})),(0,a.createElement)("td",null,(0,a.createElement)(p.EY,{icon:(n=e.fixed_in,""===n?(0,a.createElement)(Le,{icon:F.A,style:{fill:"#D75A4B"}}):(0,a.createElement)(Ae,{icon:$.A,style:{fill:"#FFFFFF"}})),iconSize:16,text:Oe(e.fixed_in)})),(0,a.createElement)(xe,null,(0,a.createElement)(p.EY,{text:(0,y.sprintf)((0,y.__)("%s days ago","better-wp-security"),ke(e.created_at))})),(0,a.createElement)(xe,null,(0,a.createElement)(p.$n,{icon:ge.A,iconSize:15,iconPosition:"right",href:e.direct_url,text:(0,y.__)("View Details","better-wp-security"),variant:"link",target:"_blank"})));var n}))),0===e.length&&(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("td",{colSpan:"6"},(0,y.__)("No vulnerabilities found","better-wp-security"))))))}function Ye(){return(0,a.createElement)(S,null,(0,a.createElement)("div",null,(0,a.createElement)(p.DZ,{level:2,size:p.$C.LARGE,variant:p.J3.DARK,weight:600,text:(0,y.__)("Vulnerability Database","better-wp-security")}),(0,a.createElement)(p.EY,{variant:p.J3.MUTED,text:(0,y.__)("You are viewing the last two weeks of vulnerabilities from the database.","better-wp-security")})),(0,a.createElement)(C,null,(0,a.createElement)(p.EY,{text:(0,y.__)("Powered by","better-wp-security")}),(0,a.createElement)(N.Tk,null)))}function Re(){const e={},[t,n]=(0,i.useState)(e),{query:r,fetchQueryNextPage:l,fetchQueryPrevPage:s}=(0,v.useDispatch)(b.patchstackStore),{items:c,isQuerying:o,queryHasNextPage:u,queryHasPrevPage:d}=(0,v.useSelect)((e=>({items:e(b.patchstackStore).getPatchstackVulnerabilities(),isQuerying:e(b.patchstackStore).isQuerying("main"),hasResolved:e(b.patchstackStore).hasFinishedResolution("getPatchstackVulnerabilities"),queryHasNextPage:e(b.patchstackStore).queryHasNextPage("main"),queryHasPrevPage:e(b.patchstackStore).queryHasPrevPage("main")})),[]),E=e=>{n(e),r("main",e)};return(0,a.createElement)(React.Fragment,null,(0,a.createElement)(Ne,{variant:p.ls.DARK},(0,a.createElement)(p.EY,{icon:he.A,text:(0,y.__)("You are browsing the vulnerability database. These vulnerabilities do not affect your site. To see active vulnerabilities on your site, stop browsing the database.","better-wp-security"),align:"center"})),(0,a.createElement)(re,null,(0,a.createElement)(ie,null),(0,a.createElement)(le,null,(0,a.createElement)(oe,null,(0,a.createElement)(m.Dropdown,{popoverProps:{focusOnMount:"container"},renderToggle:({isOpen:e,onToggle:n})=>(0,a.createElement)(p.$n,{icon:w.A,onClick:n,"aria-expanded":e,variant:"tertiary",text:(0,y.sprintf)((0,y.__)("Filter (%d)","better-wp-security"),Object.keys(t).filter((e=>!(0,g.isEmpty)(t[e]))).length)}),renderContent:()=>(0,a.createElement)(ce,{initialValue:t,initialOpen:["type"],expandSingle:!0,isBusy:o,onApply:E},(0,a.createElement)(p.YS,{slug:"type",title:(0,y.__)("Types","better-wp-security"),options:[{value:"themes",label:(0,y.__)("Themes","better-wp-security")},{value:"plugins",label:(0,y.__)("Plugins","better-wp-security")},{value:"wordpress",label:(0,y.__)("Core","better-wp-security")}]}))}),(0,a.createElement)(p.EY,{variant:p.J3.MUTED},"|"),(0,a.createElement)(p.$n,{onClick:()=>{n(e),r("main",e),E(e)},variant:"tertiary",text:(0,y.__)("Reset all","better-wp-security")})),(0,a.createElement)(me,null,(0,a.createElement)(h.N_,{to:"/active",component:(0,A.kk)(p.$n),text:(0,y.__)("Stop Browsing Database","better-wp-security")}),(0,a.createElement)(h.N_,{to:"/scan",replace:!0,component:(0,A.kk)(p.$n),variant:"primary",text:(0,y.__)("Scan for Vulnerabilities","better-wp-security")}))),(0,a.createElement)(p.ui,{as:"section"},(0,a.createElement)(Ye,null),(0,a.createElement)(Ce,{items:c})),(0,a.createElement)(de,null,(0,a.createElement)(p.$n,{disabled:!d,icon:x.A,variant:"tertiary",onClick:()=>{s("main","replace")},text:(0,y.__)("Prev","better-wp-security")}),(0,a.createElement)(p.$n,{disabled:!u,icon:_.A,iconPosition:"right",variant:"tertiary",onClick:()=>{l("main","replace")},text:(0,y.__)("Next","better-wp-security")}))))}const De=(0,s.A)("div",{target:"e1dcuk7f2"})({name:"1uvji1u",styles:"display:flex;gap:1rem;margin-left:auto"}),Pe=(0,s.A)("div",{target:"e1dcuk7f1"})({name:"1nbimis",styles:"display:flex;flex-direction:column;align-items:center;gap:0.75rem;margin:0 auto;padding:70px 0;max-width:36ch"}),ze=(0,s.A)(m.Spinner,{target:"e1dcuk7f0"})({name:"1goa6k7",styles:"width:80px!important;height:80px!important"});function Ve(){const e=(0,c.W6)(),{runScan:t,refreshQuery:n}=(0,v.useDispatch)(b.siteScannerStore),{refreshQuery:r}=(0,v.useDispatch)(b.vulnerabilitiesStore);return(0,i.useEffect)((()=>{t().then((()=>Promise.allSettled([n("main"),r("main")]))).then((()=>e.replace("/active")))}),[e,n,r,t]),(0,a.createElement)(re,null,(0,a.createElement)(ie,null),(0,a.createElement)(le,null,(0,a.createElement)(De,null,(0,a.createElement)(h.N_,{to:"/database",component:(0,A.kk)(p.$n),text:(0,y.__)("Browse Vulnerability Database","better-wp-security")}),(0,a.createElement)(h.N_,{to:"/scan",component:(0,A.kk)(p.$n),variant:"primary",disabled:!0,text:(0,y.__)("Scan for vulnerabilities","better-wp-security")}))),(0,a.createElement)(p.ui,{as:"section"},(0,a.createElement)(D,null),(0,a.createElement)("table",{className:"itsec-card-vulnerable-software__table"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",null,(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Type","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Vulnerability","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Severity","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Status","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Date","better-wp-security")}),(0,a.createElement)(p.EY,{as:"th",text:(0,y.__)("Action","better-wp-security")}))),(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("td",{colSpan:6},(0,a.createElement)(Pe,null,(0,a.createElement)(ze,null),(0,a.createElement)(p.EY,{text:(0,y.__)("Scanning for vulnerabilities…","better-wp-security"),size:p.$C.LARGE,weight:p.uL.HEAVY,variant:p.J3.DARK}),(0,a.createElement)(p.EY,{text:(0,y.__)("Currently checking your site for any vulnerable plugins, themes, or WordPress Core.","better-wp-security"),size:p.$C.SMALL,align:"center",variant:p.J3.MUTED}))))))))}var Fe=n(2809),$e=n(48851);const Me=(0,s.A)("div",{target:"e1pwvo0s21"})("display:flex;flex-direction:",(({isSmall:e})=>e&&"column"),";justify-content:space-between;align-items:",(({isSmall:e})=>e?"flex-start":"center"),";"),Te=(0,s.A)("div",{target:"e1pwvo0s20"})({name:"damvy5",styles:"display:flex;gap:1rem"}),Be=(0,s.A)(p.ui,{target:"e1pwvo0s18"})({name:"1v03bf2",styles:"padding:2rem"}),He=(0,s.A)("div",{shouldForwardProp:e=>"isLarge"!==e,target:"e1pwvo0s17"})("display:flex;flex-direction:",(({isLarge:e})=>e?"row":"column"),";justify-content:space-between;gap:",(({isLarge:e})=>e?"6rem":"1rem"),";"),Ge=(0,s.A)(p.DZ,{target:"e1pwvo0s16"})({name:"1h026t7",styles:"margin-bottom:1.5rem"}),Je=(0,s.A)("div",{target:"e1pwvo0s15"})("display:flex;flex-direction:column;align-items:flex-end;order:",(({isLarge:e})=>!e&&"-1"),";"),Ke=(0,s.A)(p.EY,{target:"e1pwvo0s14"})({name:"kc0l0i",styles:"font-size:0.625rem"}),je=(0,s.A)(N.Tk,{shouldForwardProp:e=>"isLarge"!==e,target:"e1pwvo0s13"})("width:",(({isLarge:e})=>e?"170px":"124px"),";"),qe=(0,s.A)("div",{target:"e1pwvo0s12"})("display:flex;flex-direction:",(({isLarge:e})=>e?"row":"column"),";width:100%;gap:1.25rem;"),Ue=(0,s.A)(p.ui,{target:"e1pwvo0s11"})({name:"w15bqf",styles:"display:flex;justify-content:center;align-items:center;gap:1rem;width:100%;padding:1.25rem 0"}),We=(0,s.A)(p.EY,{target:"e1pwvo0s10"})("color:",(({color:e})=>e),";"),Qe=(0,s.A)("div",{target:"e1pwvo0s9"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"}),Ze=(0,s.A)("div",{target:"e1pwvo0s8"})({name:"18ggg9v",styles:"display:flex;flex-direction:column;gap:0.875rem"}),Xe=(0,s.A)(p.DZ,{target:"e1pwvo0s7"})({name:"11qopbe",styles:"padding-top:2rem"}),et=(0,s.A)(p.EY,{target:"e1pwvo0s6"})({name:"mqz0wn",styles:"max-width:90ch"}),tt=(0,s.A)("div",{target:"e1pwvo0s5"})({name:"g8ag6v",styles:"display:flex;flex-wrap:wrap;gap:1.5rem"}),nt=(0,s.A)("div",{target:"e1pwvo0s4"})("display:flex;flex-direction:",(({isSmall:e})=>e&&"column"),";justify-content:space-between;gap:",(({isSmall:e})=>e&&"0.5rem"),";padding:1.5rem 0;border-bottom:",(({isLastRow:e,theme:t})=>!e&&`1px solid ${t.colors.border.normal}`),";"),at=(0,s.A)("div",{target:"e1pwvo0s3"})({name:"a0377c",styles:"display:flex;align-items:center;gap:0.75rem"}),rt=(0,s.A)(m.Icon,{target:"e1pwvo0s2"})("fill:",(({theme:e})=>e.colors.primary.darker20),";"),lt=(0,s.A)("div",{target:"e1pwvo0s1"})({name:"r2g86h",styles:"display:flex;align-items:center;gap:1rem"}),it=(0,s.A)("div",{target:"e1pwvo0s0"})({name:"25ihgi",styles:"display:flex;justify-content:center;padding:2rem 0 1rem"});function st(e){switch(!0){case isNaN(e):return(0,y.__)("Unknown Severity","better-wp-security");case e<3:return(0,y.__)("Low Severity","better-wp-security");case e<7:return(0,y.__)("Medium Severity","better-wp-security");case e<9:return(0,y.__)("High Severity","better-wp-security");default:return(0,y.__)("Critical Severity","better-wp-security")}}function ct(e){switch(!0){case isNaN(e):return"#CECECE";case e<3:return"#B8E6BF";case e<7:return"#FFC518";case e<9:return"#FFABAF";default:return"#D63638"}}function ot({action:e,isApplying:t,onApply:n}){return(0,a.createElement)(p.$n,{isBusy:t,onClick:n,variant:"ithemes-security:fix-vulnerability"===e.rel?"primary":"secondary",text:e.title})}function ut({action:e,isApplying:t,onApply:n}){const r={title:(0,y.__)("Confirm your action","better-wp-security"),body:(0,y.__)("Are you sure you want to do this?","better-wp-security"),onContinue:n,continueText:e.title},[l,i]=(0,p.Jg)(r);return(0,a.createElement)(React.Fragment,null,(0,a.createElement)(p.$n,{isDestructive:e.isDestructive,isBusy:t,onClick:l,text:e.title}),i)}function mt({action:e,vulnerability:t}){const{applyVulnerabilityAction:n}=(0,v.useDispatch)(b.vulnerabilitiesStore),{isApplying:r}=(0,v.useSelect)((n=>({isApplying:n(b.vulnerabilitiesStore).isApplyingAction(t,e.rel)})),[e.rel,t]),l=()=>{n(t,e.rel)};return e.isDestructive?(0,a.createElement)(ut,{action:e,isApplying:r,onApply:l}):(0,a.createElement)(ot,{action:e,isApplying:r,onApply:l})}function dt({vulnerability:e,vulnerabilityActions:t}){return["updated","auto-updated","deleted"].includes(e.resolution.slug)?null:(0,a.createElement)(Ze,null,(0,a.createElement)(Xe,{level:3,size:p.$C.EXTRA_LARGE,variant:p.J3.DARK,text:(0,y.__)("Solution","better-wp-security")}),e.details.fixed_in&&(0,a.createElement)(p.EY,{variant:p.J3.DARK,weight:600,text:(0,y.sprintf)((0,y.__)("Update the %1$s %2$s to the latest available version (at least %3$s).","better-wp-security"),e.software.label,e.software.type.slug,e.details.fixed_in)}),!e.details.fixed_in&&(0,a.createElement)(p.EY,{variant:p.J3.DARK,weight:600,text:(0,y.__)("No fix has been released for this vulnerability.","better-wp-security")}),!t.find((({rel:e})=>"ithemes-security:fix-vulnerability"===e))&&(0,a.createElement)(et,{as:"p",size:p.$C.SMALL,variant:p.J3.DARK,text:(0,a.createElement)(React.Fragment,null,"plugin"===e.software.type.slug&&(0,y.__)("If no update is available, you should deactivate the plugin.","better-wp-security")+" ","theme"===e.software.type.slug&&(0,y.__)("If no update is available, you should switch themes.","better-wp-security")+" ",t.find((({rel:e})=>"ithemes-security:mute-vulnerability"===e))&&(0,i.createInterpolateElement)((0,y.__)("Muting the issue will exclude it from future scans. <b>Only mute the issue after you’ve confirmed the vulnerability does not affect your site.</b>","better-wp-security"),{b:(0,a.createElement)("strong",null)}))}),t.length>0&&(0,a.createElement)(tt,null,t.map((t=>(0,a.createElement)(mt,{key:t.rel,action:t,vulnerability:e})))))}function pt(){var e;const{id:t}=(0,c.g)(),{vulnerability:n,vulnerabilityActions:r}=(0,v.useSelect)((function(e){const n=e(b.vulnerabilitiesStore).getVulnerabilityById(t);return{vulnerability:n,vulnerabilityActions:e(b.vulnerabilitiesStore).getVulnerabilityActions(n)}}),[t]),l=(0,f.useViewportMatch)("small","<"),i=(0,f.useViewportMatch)("large");return(0,a.createElement)(re,null,(0,a.createElement)(ie,null),(0,a.createElement)(Me,{isSmall:l},(0,a.createElement)(h.N_,{to:"/active",component:(0,A.kk)(p.$n),icon:x.A,variant:"tertiary",text:(0,y.__)("Back to Vulnerabilities","better-wp-security")}),(0,a.createElement)(Te,{isSmall:l},(0,a.createElement)(E.i$,null),(0,a.createElement)(E.Fe,null))),n&&(0,a.createElement)(React.Fragment,null,(0,a.createElement)(Be,null,(0,a.createElement)(He,{isLarge:i},(0,a.createElement)(Ge,{isSmall:l,level:2,size:l?p.$C.EXTRA_LARGE:p.$C.GIGANTIC,variant:p.J3.DARK,text:n.details.title}),(0,a.createElement)(Je,{isLarge:i},(0,a.createElement)(Ke,{variant:p.J3.DARK,weight:600,text:(0,y.__)("Powered by","better-wp-security")}),(0,a.createElement)(je,{isLarge:i}))),(0,a.createElement)(qe,{isLarge:i},(0,a.createElement)(Ue,{variant:"tertiary"},(0,a.createElement)(We,{color:ct(n.details.score),size:p.$C.GIGANTIC,text:null!==(e=n.details.score)&&void 0!==e?e:"??"}),(0,a.createElement)(Qe,null,(0,a.createElement)(p.EY,{size:p.$C.LARGE,weight:600,text:st(n.details.score)}),(0,a.createElement)(p.EY,{variant:p.J3.MUTED,text:(0,y.__)("CVSS 3.1 score","better-wp-security")}))),(0,a.createElement)(Ue,{variant:"tertiary"},n.details.is_exploited?(0,a.createElement)(N.kv,null):(0,a.createElement)(N.p_,null),(0,a.createElement)(Qe,null,(0,a.createElement)(p.EY,{size:p.$C.LARGE,weight:600,text:n.details.is_exploited?(0,y.__)("Exploited Vulnerability","better-wp-security"):(0,y.__)("Not Known to be Exploited","better-wp-security")}),(0,a.createElement)("a",{href:"https://patchstack.com/database/report"},(0,y.__)("Report an attack","better-wp-security")))),"patched"===n.resolution.slug&&(0,a.createElement)(Ue,{variant:"tertiary"},(0,a.createElement)(N.m2,null),(0,a.createElement)(p.EY,{size:p.$C.LARGE,weight:600,text:(0,y.__)("Patched Automatically","better-wp-security")}))),(0,a.createElement)(dt,{vulnerability:n,vulnerabilityActions:r}),n.resolution.description&&(0,a.createElement)(Ze,null,(0,a.createElement)(Xe,{level:3,size:p.$C.EXTRA_LARGE,variant:p.J3.DARK,text:(0,y.__)("Status","better-wp-security")}),(0,a.createElement)(p.EY,{variant:p.J3.DARK,text:n.resolution.description})),(0,a.createElement)(Ze,null,(0,a.createElement)(Xe,{level:3,size:p.$C.EXTRA_LARGE,variant:p.J3.DARK,text:(0,y.__)("Details","better-wp-security")}),(0,a.createElement)(p.EY,{text:n.details.description}))),(0,a.createElement)(Be,null,"wordpress"!==n.software.type.slug&&(0,a.createElement)(nt,{isSmall:l},(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.MUTED,weight:p.uL.HEAVY,text:(0,y.__)("Software","better-wp-security")}),(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.DARK,weight:p.uL.HEAVY,text:n.software.label||n.software.slug})),(0,a.createElement)(nt,{isSmall:l},(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.MUTED,weight:p.uL.HEAVY,text:(0,y.__)("Type","better-wp-security")}),(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.DARK,weight:p.uL.HEAVY,text:n.software.type.label})),(0,a.createElement)(nt,{isSmall:l},(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.MUTED,weight:p.uL.HEAVY,text:(0,y.__)("Vulnerable Versions","better-wp-security")}),(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.DARK,weight:p.uL.HEAVY,text:n.details.affected_in})),n.details.references.filter((e=>"patchstack"!==e.slug)).map((e=>(0,a.createElement)(nt,{key:e.slug,isSmall:l},(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.MUTED,weight:p.uL.HEAVY,text:e.label}),(0,a.createElement)("a",{href:e.refs[0].link},(0,a.createElement)(lt,null,(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.DARK,weight:p.uL.HEAVY,text:"CVE"===e.label?`CVE-${e.refs[0].value}`:e.refs[0].value}),(0,a.createElement)(m.Icon,{icon:Fe.A,size:16})))))),(0,a.createElement)(nt,{isSmall:l},(0,a.createElement)(at,null,(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.MUTED,weight:p.uL.HEAVY,text:(0,y.__)("Classification","better-wp-security")}),(0,a.createElement)(m.Tooltip,{text:(0,y.__)("Vulnerability Type","better-wp-security")},(0,a.createElement)("span",null,(0,a.createElement)(rt,{icon:$e.A})))),(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.DARK,weight:p.uL.HEAVY,text:n.details.type.label})),(0,a.createElement)(nt,{isLastRow:!0,isSmall:l},(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.MUTED,weight:p.uL.HEAVY,text:(0,y.__)("Publicly Disclosed","better-wp-security")}),(0,a.createElement)(p.EY,{size:p.$C.LARGE,variant:p.J3.DARK,weight:p.uL.HEAVY,text:(0,L.dateI18n)("F j, Y",n.details.published_at)})),(0,a.createElement)(it,null,(0,a.createElement)(p.$n,{href:n.details.references[0].refs[0].link,icon:ge.A,iconPosition:"right",variant:"link",text:(0,y.__)("Vulnerability Details")})))))}const Et=(0,s.A)(p.ui,{target:"eogikur0"})({name:"1fttcpj",styles:"display:flex;flex-direction:column"});function ht({history:e}){return(0,a.createElement)(u.b,{theme:p.$f},(0,a.createElement)(c.Ix,{history:e},(0,a.createElement)(o.HX,{ReactRouterRoute:c.qh},(0,a.createElement)(Et,{className:"itsec-vulnerabilities",variant:p.ls.UNDER_PAGE},(0,a.createElement)(m.SlotFillProvider,null,(0,a.createElement)(d.PluginArea,null),(0,a.createElement)(m.Popover.Slot,null),(0,a.createElement)(E.Nr,null),(0,a.createElement)(c.dO,null,(0,a.createElement)(c.qh,{path:"/database",component:Re}),(0,a.createElement)(c.qh,{path:"/vulnerability/:id",component:pt}),(0,a.createElement)(c.qh,{path:"/scan",component:Ve}),(0,a.createElement)(c.qh,{path:"/active",component:Ee}),(0,a.createElement)(c.qh,{path:"/"},(0,a.createElement)(c.rd,{to:"/active"}))))))))}var gt=n(75413);n.p=window.itsecWebpackPublicPath;const vt=(0,gt.n)(document.location,{page:"itsec-vulnerabilities"});l()((()=>{const e=document.getElementById("itsec-vulnerabilities-root");(0,i.render)((0,a.createElement)(ht,{history:vt}),e)}))},98883:(e,t,n)=>{"use strict";n.d(t,{Yb:()=>g,ML:()=>v,$I:()=>f,Mj:()=>w,SV:()=>x,ee:()=>h,sy:()=>o,qY:()=>u,kk:()=>p,wl:()=>d,pq:()=>s});var a=n(58168),r=n(51609),l=n(8601),i=n(89897);function s(e){return(0,i.createHigherOrderComponent)((t=>class extends l.Component{render(){return(0,r.createElement)(t,(0,a.A)({},this.props,e))}}),"withProps")}var c=n(66087);function o(e,t,n={}){return(0,i.createHigherOrderComponent)((a=>class extends l.Component{constructor(){super(...arguments),this.debouncedPropInvoke=(0,c.debounce)(((...t)=>this.props[e](...t)),"function"==typeof t?t(this.props):t,n),this.handler=(e,...t)=>(e&&"function"==typeof e.persist&&e.persist(),this.debouncedPropInvoke(e,...t))}componentWillUnmount(){this.debouncedPropInvoke.cancel()}render(){const t={...this.props,[e]:this.handler};return(0,r.createElement)(a,t)}}),"withDebounceHandler")}function u(e,t){let n;return n=(0,c.isFunction)(t)?[{delay:e,cb:t}]:e,(0,i.createHigherOrderComponent)((e=>class extends l.Component{constructor(){super(...arguments),this.intervalIds=[]}componentDidMount(){for(const e of n)(t=>{this.intervalIds.push(setInterval((()=>t(this.props)),e.delay))})(e.cb)}componentWillUnmount(){this.intervalIds.forEach(clearInterval)}render(){return(0,r.createElement)(e,this.props)}}),"withInterval")}var m=n(64467);(0,i.createHigherOrderComponent)((e=>{var t;return t=class extends l.Component{constructor(...e){super(...e),(0,m.A)(this,"state",{width:1280}),(0,m.A)(this,"mounted",!1),(0,m.A)(this,"ref",null),(0,m.A)(this,"onWindowResize",(()=>{if(!this.mounted)return;const e=(0,l.findDOMNode)(this);if(e instanceof window.HTMLElement){const t=e.offsetWidth;this.setState({width:t})}}))}componentDidMount(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").addEventListener("click",this.onWindowResize),this.onWindowResize()}componentWillUnmount(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize),document.getElementById("collapse-button").removeEventListener("click",this.onWindowResize)}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?(0,r.createElement)("div",{className:this.props.className,style:this.props.style}):(0,r.createElement)(e,(0,a.A)({},n,{width:this.state.width+20}))}},(0,m.A)(t,"defaultProps",{measureBeforeMount:!1}),t}),"withWidth");const d=(0,i.createHigherOrderComponent)((e=>class extends l.Component{constructor(){super(...arguments),(0,m.A)(this,"state",{pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}}),(0,m.A)(this,"mounted",!1),this.listener=this.listener.bind(this),this.onBlur=this.onBlur.bind(this)}componentDidMount(){this.mounted=!0,window.addEventListener("keydown",this.listener),window.addEventListener("keyup",this.listener),window.addEventListener("click",this.listener),window.addEventListener("blur",this.onBlur)}componentWillUnmount(){this.mounted=!1,window.removeEventListener("keydown",this.listener),window.removeEventListener("keyup",this.listener),window.removeEventListener("click",this.listener),window.removeEventListener("blur",this.onBlur)}listener(e){this.mounted&&this.setState({pressed:{shift:e.shiftKey,ctrl:e.ctrlKey,meta:e.metaKey,alt:e.altKey}})}onBlur(){this.setState({pressed:{shift:!1,ctrl:!1,meta:!1,alt:!1}})}render(){return(0,r.createElement)(e,(0,a.A)({pressedModifierKeys:this.state.pressed},this.props))}}),"withPressedModifierKeys"),p=(0,i.createHigherOrderComponent)((e=>function({navigate:t,...n}){return(0,r.createElement)(e,(0,a.A)({},n,{onClick:e=>{try{n.onClick&&n.onClick(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||n.target&&"_self"!==n.target||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),t())}}))}),"withNavigate"),E=new WeakMap;function h(e,t){(0,l.useLayoutEffect)((()=>{E.has(e)||(t(),E.set(e,!0))}),[])}function g(e,t=!0){const[n,a]=(0,l.useState)("idle"),[r,i]=(0,l.useState)(null),[s,c]=(0,l.useState)(null),o=(0,l.useCallback)(((...t)=>(a("pending"),c(null),e(...t).then((e=>{i(e),a("success")})).catch((e=>{c(e),i(null),a("error")})))),[e]);return(0,l.useEffect)((()=>{t&&o()}),[o,t]),{execute:o,status:n,value:r,error:s}}function v(e,t,n=window){const a=(0,l.useRef)();(0,l.useEffect)((()=>{a.current=t}),[t]),(0,l.useEffect)((()=>{if(!n||!n.addEventListener)return;const t=e=>a.current(e);return n.addEventListener(e,t),()=>n.removeEventListener(e,t)}),[e,n])}const y=["button","submit"];function f(e){const t=(0,l.useRef)(e);(0,l.useEffect)((()=>{t.current=e}),[e]);const n=(0,l.useRef)(!1),a=(0,l.useRef)(),r=(0,l.useCallback)((()=>{clearTimeout(a.current)}),[]);(0,l.useEffect)((()=>()=>r()),[]),(0,l.useEffect)((()=>{e||r()}),[e,r]);const i=(0,l.useCallback)((e=>{const{type:t,target:a}=e;(0,c.includes)(["mouseup","touchend"],t)?n.current=!1:function(e){if(!(e instanceof window.HTMLElement))return!1;switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,c.includes)(y,e.type)}return!1}(a)&&(n.current=!0)}),[]),s=(0,l.useCallback)((e=>{e.persist(),n.current||(a.current=setTimeout((()=>{document.hasFocus()?"function"==typeof t.current&&t.current(e):e.preventDefault()}),0))}),[]);return{onFocus:r,onMouseDown:i,onMouseUp:i,onTouchStart:i,onTouchEnd:i,onBlur:s}}function w(e,t){const[n,a]=(0,l.useState)((()=>{try{const n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch(e){return console.error(e),t}}));return[n,t=>{try{const r=t instanceof Function?t(n):t;a(r),window.localStorage.setItem(e,JSON.stringify(r))}catch(e){console.error(e)}}]}function x(e){const t=(0,l.useRef)(null),n=(0,l.useRef)(!1),a=(0,l.useRef)(e),r=(0,l.useRef)(e);return r.current=e,(0,l.useLayoutEffect)((()=>{e.forEach(((e,r)=>{const l=a.current[r];"function"==typeof e&&e!==l&&!1===n.current&&(l(null),e(t.current))})),a.current=e}),e),(0,l.useLayoutEffect)((()=>{n.current=!1})),(0,l.useCallback)((e=>{t.current=e,n.current=!0,(e?r.current:a.current).forEach((t=>{"function"==typeof t?t(e):t&&t.hasOwnProperty("current")&&(t.current=e)}))}),[])}n(31987),n(46627)}},e=>{e.O(0,[9427,8356,222,3733,8363,5152,1588,2932,8620],(()=>e(e.s=94513)));var t=e.O();((window.itsec=window.itsec||{}).pages=window.itsec.pages||{}).vulnerabilities=t}]);