PageSourceSearch

https://insights.cyrisk.com/js/7826.81967c73.js

js cyrisk.com collected 2026-10-04 13:27:34 UTC 97,260 bytes, 1 lines download raw bytes

1"use strict";(self["webpackChunkcyrisk"]=self["webpackChunkcyrisk"]||[]).push([[7826],{1510:function(e,t,a){a.d(t,{A:function(){return B}});var l=a(96913);const o={id:"account-credit-panel"},n={class:"row no-pad py-2"},r={class:"row no-pad"},c={class:"col-6"},s=["innerHTML"],i={class:"col-6 pr-3 mb-2"},d={class:"col-6 pr-3 mb-2"},u={class:"py-1"},m={class:"col-4"},p=["innerHTML"],h={key:0,class:"col"},g={class:"col-2"},v=["innerHTML"],_={class:"col-2"},V={class:"row no-pad py-2"},y={class:"col-6 pr-3 mb-2"},b={class:"col-6 pr-3 mb-2"},k={class:"col-6 pr-3 mb-2"},f={class:"col-6 pr-3 mb-2"};function N(e,t,a,N,E,x){return(0,l.openBlock)(),(0,l.createElementBlock)("div",o,[t[8]||(t[8]=(0,l.createElementVNode)("p",null,[(0,l.createElementVNode)("strong",null,"Static Limits"),(0,l.createTextVNode)("  ")],-1)),(0,l.createElementVNode)("div",n,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(x.absoluteCredits,(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:t,class:"col-6 pr-3 mb-2"},[(0,l.createElementVNode)("div",r,[(0,l.createElementVNode)("div",c,[(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)((0,l.toDisplayString)(e.label)+" ",1),(0,l.createElementVNode)("strong",null,[(0,l.createElementVNode)("span",{innerHTML:x.handleInfinite(e.credits)},null,8,s)])])])])]))),128)),(0,l.createElementVNode)("div",i,[(0,l.createElementVNode)("label",null,[t[0]||(t[0]=(0,l.createTextVNode)(" Maximum Domains Per Company: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.accountData.max_domains_per_target),1)])]),(0,l.createElementVNode)("div",d,[(0,l.createElementVNode)("label",null,[t[1]||(t[1]=(0,l.createTextVNode)(" Maximum IPs Per Company: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.accountData.max_ipv4s_per_target),1)])])]),t[9]||(t[9]=(0,l.createElementVNode)("hr",null,null,-1)),t[10]||(t[10]=(0,l.createElementVNode)("p",null,[(0,l.createElementVNode)("strong",null,"Refilling Credits")],-1)),(0,l.createElementVNode)("div",u,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(x.dynamicCredits,(a,o)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:o,class:"row no-pad"},[(0,l.createElementVNode)("div",m,[(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)(" Current "+(0,l.toDisplayString)(a.label)+" Credits  ",1),(0,l.createElementVNode)("strong",null,[(0,l.createElementVNode)("span",{innerHTML:x.handleInfinite(a.credits)},null,8,p)])])]),-1==a.credits?((0,l.openBlock)(),(0,l.createElementBlock)("div",h)):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createElementVNode)("div",g,[(0,l.createElementVNode)("label",null,[t[2]||(t[2]=(0,l.createTextVNode)(" Refills to: ",-1)),(0,l.createElementVNode)("strong",null,[(0,l.createElementVNode)("span",{innerHTML:x.handleInfinite(a.refill_amount)},null,8,v)])])]),(0,l.createElementVNode)("div",_,[(0,l.createElementVNode)("label",null,[t[3]||(t[3]=(0,l.createTextVNode)(" Credits Rollover: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(e.normalizeBool(a.rollover)),1)])])],64))]))),128))]),t[11]||(t[11]=(0,l.createElementVNode)("hr",null,null,-1)),t[12]||(t[12]=(0,l.createElementVNode)("p",null,[(0,l.createElementVNode)("strong",null,"Credit Refill Cycle")],-1)),(0,l.createElementVNode)("div",V,[(0,l.createElementVNode)("div",y,[(0,l.createElementVNode)("label",null,[t[4]||(t[4]=(0,l.createTextVNode)(" Credit Refill Schedule: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.accountData.refill_cycle),1)])]),(0,l.createElementVNode)("div",b,[(0,l.createElementVNode)("label",null,[t[5]||(t[5]=(0,l.createTextVNode)(" Credit Refill Cycle Start Date: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.accountData.refill_cycle_start_date),1)])]),(0,l.createElementVNode)("div",k,[(0,l.createElementVNode)("label",null,[t[6]||(t[6]=(0,l.createTextVNode)(" Last Credit Refill: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.accountData.last_refill_date),1)])]),(0,l.createElementVNode)("div",f,[(0,l.createElementVNode)("label",null,[t[7]||(t[7]=(0,l.createTextVNode)(" Next Credit Refill: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.accountData.next_credit_refill),1)])])])])}a(18111),a(22489),a(20116),a(61701),a(69112),a(33110);var E=a(79321),x={props:{accountData:{type:Object,default:()=>({})}},methods:{handleInfinite(e){return e>=0?e:"∞"},getCredits(e){return e.map(e=>{const t=this.accountData.credits.find(t=>t.model===e.model&&t.type===e.type);return t&&(e.credits=t.credits,e.refill_amount=t.refill_amount,e.rollover=t.roll_over),e})}},computed:{absoluteCredits(){if(this.accountData&&this.accountData.credits){const e=JSON.parse(JSON.stringify(E)).filter(e=>e.is_absolute_count);return this.getCredits(e)}return[]},dynamicCredits(){if(this.accountData&&this.accountData.credits){const e=JSON.parse(JSON.stringify(E)).filter(e=>!e.is_absolute_count);return e.map(e=>{const t=this.accountData.credits.find(t=>t.model===e.model&&t.type===e.type);return t&&(e.credits=t.credits,e.refill_amount=t.refill_amount,e.rollover=t.roll_over),e})}return[]}}},C=a(66262);const w=(0,C.A)(x,[["render",N]]);var B=w},66028:function(e,t,a){a.d(t,{A:function(){return m}});var l=a(96913);const o={class:"info"},n={key:0,class:"mr-2"};
1function r(e,t,a,r,c,s){const i=(0,l.resolveComponent)("dx-scroll-view"),d=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",o,[(0,l.createElementVNode)("div",{onClick:t[0]||(t[0]=(...e)=>s.open&&s.open(...e)),id:"info-popup-open",name:"info-popup-open","aria-label":"open info popup",class:"button-wrapper"},[a.message?((0,l.openBlock)(),(0,l.createElementBlock)("span",n,(0,l.toDisplayString)(a.message),1)):(0,l.createCommentVNode)("",!0),t[2]||(t[2]=(0,l.createElementVNode)("svg",{class:"fas fa-question-circle"},null,-1))]),(0,l.createVNode)(d,{height:s.computeHeight,width:s.computeWidth,title:a.title,visible:c.popupOpen,"onUpdate:visible":t[1]||(t[1]=e=>c.popupOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(i,null,{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,"default",{},void 0,!0)],void 0,!0),_:3})],void 0,!0),_:3},8,["height","width","title","visible"])])}var c=a(679),s=a(7628),i={components:{DxPopup:c.jF,DxScrollView:s.$},props:{title:{type:String,default:""},height:Number,width:Number,message:String},data(){return{popupOpen:!1}},computed:{computeHeight(){return this.height?this.gPopupHeight(this.height):null},computeWidth(){return this.width?this.gPopupWidth(this.width):null}},methods:{open(){this.popupOpen=this.toggle(this.popupOpen)}}},d=a(66262);const u=(0,d.A)(i,[["render",r],["__scopeId","data-v-1877ee54"]]);var m=u},30157:function(e,t,a){a.r(t),a.d(t,{default:function(){return Cl}});var l=a(96913);const o={id:"super-admin"};function n(e,t,a,n,r,c){const s=(0,l.resolveComponent)("accounts"),i=(0,l.resolveComponent)("down-load-rules-button"),d=(0,l.resolveComponent)("import-rules-button"),u=(0,l.resolveComponent)("export-admin-usage-csv"),m=(0,l.resolveComponent)("sudoer-pass-reset"),p=(0,l.resolveComponent)("privacy-scan-alert-toggle"),h=(0,l.resolveComponent)("send-test-teams-alert"),g=(0,l.resolveComponent)("card");return(0,l.openBlock)(),(0,l.createElementBlock)("div",o,[(0,l.createVNode)(g,{class:"p-4 text-left d-block h-100"},{default:(0,l.withCtx)(()=>[t[0]||(t[0]=(0,l.createElementVNode)("h1",{class:"mb-4"},[(0,l.createElementVNode)("i",{class:"fas fa-crown"}),(0,l.createTextVNode)(" Sudoer")],-1)),(0,l.createVNode)(s),t[1]||(t[1]=(0,l.createElementVNode)("h1",{class:"mb-4 mt-4"},[(0,l.createElementVNode)("i",{class:"fas fa-tools"}),(0,l.createTextVNode)(" Tools")],-1)),(0,l.createVNode)(i),(0,l.createVNode)(d,{class:"ml-3"}),(0,l.createVNode)(u,{class:"ml-3"}),(0,l.createVNode)(m,{class:"ml-3"}),(0,l.createVNode)(p,{class:"ml-3"}),(0,l.createVNode)(h,{class:"ml-3"})],void 0,!0),_:1})])}var r=a(31078);const c={class:"account-usage"},s={key:1},i={class:"row no-pad"},d={class:"col text-left"},u={class:"col text-right"},m={class:"row no-pad text-left"},p={class:"col-3"},h={class:"account-tree"},g={key:0,"data-toggle":"tooltip",title:"Subscribed",class:"green fas mx-1 fa-usd-circle"},v=["title"],_={key:2,"data-toggle":"tooltip",title:"unlimited trial",class:"fas mx-1 gold fa-calendar-star"},V={key:3,"data-toggle":"tooltip",title:"Trial expired",class:"mx-1 fas error fa-exclamation-circle"},y={class:"col-9 px-4"},b={class:"editor-wrapper"},k={id:"consent-modal"},f={class:"consent-buttons"},N={class:"pt-4 text-center"},E={class:"mb-3"},x={class:"mb-2"};function C(e,t,a,o,n,r){const C=(0,l.resolveComponent)("preloader"),w=(0,l.resolveComponent)("DxSwitch"),B=(0,l.resolveComponent)("DxTreeView"),D=(0,l.resolveComponent)("dx-scroll-view"),S=(0,l.resolveComponent)("account-panel"),A=(0,l.resolveComponent)("account-editor"),T=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",c,[n.loading?((0,l.openBlock)(),(0,l.createBlock)(C,{key:0})):((0,l.openBlock)(),(0,l.createElementBlock)("div",s,[(0,l.createElementVNode)("div",i,[(0,l.createElementVNode)("div",d,[t[7]||(t[7]=(0,l.createElementVNode)("h1",{class:"text-left d-inline-block align-middle"},"Accounts",-1)),(0,l.createVNode)(w,{class:"d-inline-block align-middle",width:"120",name:"showInactiveDx",id:"showInactiveDx","input-attr":{name:"showInactive",id:"showInactive","aria-label":"enter showInactive"},switchedOnText:"Hide Inactive",switchedOffText:"Show Inactive",modelValue:n.showInactive,"onUpdate:modelValue":t[0]||(t[0]=e=>n.showInactive=e),onValueChanged:r.init},null,8,["modelValue","onValueChanged"])]),(0,l.createElementVNode)("div",u,[(0,l.createElementVNode)("span",{onClick:t[1]||(t[1]=(...e)=>r.startNewAccount&&r.startNewAccount(...e)),class:"blu-button",id:"new-account",name:"new-account","aria-label":"new account",role:"button","data-toggle":"tooltip",title:"New Account"},[...t[8]||(t[8]=[(0,l.createElementVNode)("i",{class:"fa fa-plus"},null,-1),(0,l.createTextVNode)(" New Account ",-1)])])])]),t[9]||(t[9]=(0,l.createElementVNode)("hr",null,null,-1)),(0,l.createElementVNode)("div",m,[(0,l.createElementVNode)("div",p,[(0,l.createElementVNode)("div",h,[((0,l.openBlock)(),(0,l.createBlock)(D,{onInitialized:r.saveScroll,height:500,key:"scroll"+n.updateKey},{default:(0,l.withCtx)(()=>[((0,l.openBlock)(),(0,l.createBlock)(B,{key:"account-tree-"+n.updateKey,items:n.accounts,width:"100%",displayExpr:"title",onItemClick:r.selectItem,"search-enabled":!0},{item:(0,l.withCtx)(e=>[(0,l.createElementVNode)("span",{class:(0,l.normalizeClass)(["text-left tree-item",{inactive:!e.data.is_active}])},[(0,l.createTextVNode)((0,l.toDisplayString)(e.data.title)+" ",1),e.data.has_subscribed?((0,l.openBlock)(),(0,l.createElementBlock)("i",g)):(0,l.createCommentVNode)("",!0),!e.data.has_subscribed&&e.data.is_trial&&-1!==e.data.num_valid_days?((0,l.openBlock)(),(0,l.createElementBlock)("i",{key:1,"data-toggle":"tooltip",title:"Trial expires "+r.prettyDate(e.data.tri
1al_time_left.end_time),class:"fas mx-1 orange fa-calendar-day"},null,8,v)):e.data.is_trial&&-1===e.data.num_valid_days?((0,l.openBlock)(),(0,l.createElementBlock)("i",_)):(0,l.createCommentVNode)("",!0),e.data.has_subscribed||e.data.is_trial?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("i",V)),e.data.is_trial?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:4},[],64)):(0,l.createCommentVNode)("",!0)],2)]),_:1},8,["items","onItemClick"]))],void 0,!0),_:1},8,["onInitialized"]))])]),(0,l.createElementVNode)("div",y,[n.currentAccount?((0,l.openBlock)(),(0,l.createBlock)(S,{key:0,account:n.currentAccount,types:n.accountTypes,onEdit:r.openEdit,onToggleActive:r.openToggleConsent},null,8,["account","types","onEdit","onToggleActive"])):(0,l.createCommentVNode)("",!0)])])])),(0,l.createVNode)(T,{height:e.gPopupHeight(800),width:e.gPopupWidth(900),title:n.editAccount?n.editAccount.title:"New Account",visible:n.editorOpen,"onUpdate:visible":t[2]||(t[2]=e=>n.editorOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(D,null,{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",b,[n.editorOpen?((0,l.openBlock)(),(0,l.createBlock)(A,{key:0,accountIn:n.editAccount,types:n.accountTypes,onSaved:r.accountSaved,onCancel:r.cancelEdit},null,8,["accountIn","types","onSaved","onCancel"])):(0,l.createCommentVNode)("",!0)])],void 0,!0),_:1})],void 0,!0),_:1},8,["height","width","title","visible"]),n.currentAccount?((0,l.openBlock)(),(0,l.createBlock)(T,{key:2,height:e.gPopupHeight(260),width:e.gPopupWidth(600),title:n.currentAccount.title,visible:n.toggleConsentOpen,"onUpdate:visible":t[5]||(t[5]=e=>n.toggleConsentOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(D,null,{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",k,[n.toggleConsentOpen?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createElementVNode)("p",null," Are you sure you want to "+(0,l.toDisplayString)(n.editAccount.is_active?"activate":"deactivate")+" this account? ",1),(0,l.createElementVNode)("div",f,[(0,l.createElementVNode)("div",{id:"toggle-active",name:"toggle-active","aria-label":"toggle active",role:"button",onClick:t[3]||(t[3]=(...e)=>r.toggleActive&&r.toggleActive(...e)),class:"blank-button"}," Yes "),(0,l.createElementVNode)("div",{id:"cancel-consent",name:"cancel-consent","aria-label":"cancel consent",role:"button",onClick:t[4]||(t[4]=e=>n.toggleConsentOpen=!1),class:"blank-button"}," No ")])],64)):(0,l.createCommentVNode)("",!0)])],void 0,!0),_:1})],void 0,!0),_:1},8,["height","width","title","visible"])):(0,l.createCommentVNode)("",!0),n.toggleAccountCreds?((0,l.openBlock)(),(0,l.createBlock)(T,{key:3,height:e.gPopupHeight(260),width:e.gPopupWidth(600),title:"Account Created",visible:n.toggleAccountCreds,"onUpdate:visible":t[6]||(t[6]=e=>n.toggleAccountCreds=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(D,null,{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",N,[n.toggleAccountCreds?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createElementVNode)("p",E,[t[10]||(t[10]=(0,l.createTextVNode)(" Account ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(n.creds.title),1),t[11]||(t[11]=(0,l.createTextVNode)(" created with the following credentials ",-1))]),(0,l.createElementVNode)("p",x,[t[12]||(t[12]=(0,l.createElementVNode)("strong",null,"Username:",-1)),(0,l.createTextVNode)(" "+(0,l.toDisplayString)(n.creds.username),1)]),(0,l.createElementVNode)("p",null,[t[13]||(t[13]=(0,l.createElementVNode)("strong",null,"Password:",-1)),(0,l.createTextVNode)(" "+(0,l.toDisplayString)(n.creds.password),1)])],64)):(0,l.createCommentVNode)("",!0)])],void 0,!0),_:1})],void 0,!0),_:1},8,["height","width","visible"])):(0,l.createCommentVNode)("",!0)])}a(74423),a(44114),a(18111),a(22489),a(20116);var w=a(38317),B=a(72279),D=a(22440);const S={class:"account-panel"},A={class:"row no-pad"},T={class:"col-10 text-left"},U={class:"account-title mb-3"},O={key:1,"data-toggle":"tooltip",title:"Subscribed",class:"green fas mx-1 fa-usd-circle"},R=["title"],I={key:3,"data-toggle":"tooltip",title:"unlimited trial",class:"fas mx-1 gold fa-calendar-star"},P={key:4,"data-toggle":"tooltip",title:"Trial expired",class:"mx-1 fas error fa-exclamation-circle"},F={class:"count-down"},L={key:1},M={class:"col-2 text-right"},q={key:1,class:"error"},G={class:"account-block"},z={key:0},H={class:"row no-pad py-2"},$={class:"col-6 pr-3 mb-2"},j={class:"account-block"},K={class:"usage"},W={class:"account-block"},J={key:0},Z={class:"row no-pad mt-3"}
1,Q={key:1},X={class:"account-block"},Y={key:0},ee={class:"row no-pad mt-3"},te={key:1},ae={class:"account-block"},le={class:"row no-pad"},oe={class:"col",style:{border:"none"}},ne={class:"col text-right",style:{border:"none"}},re={key:0,class:"user-breakdown-inner"},ce={key:1},se={key:0};function ie(e,t,a,o,n,r){const c=(0,l.resolveComponent)("preloader"),s=(0,l.resolveComponent)("vac"),i=(0,l.resolveComponent)("collapse-transition"),d=(0,l.resolveComponent)("credits-help-popup"),u=(0,l.resolveComponent)("account-credits-panel"),m=(0,l.resolveComponent)("countTo"),p=(0,l.resolveComponent)("DxSwitch"),h=(0,l.resolveComponent)("user-data-grid"),g=(0,l.resolveComponent)("user-item");return(0,l.openBlock)(),(0,l.createElementBlock)("div",S,[(0,l.createVNode)(l.Transition,{name:"fade",mode:"out-in"},{default:(0,l.withCtx)(()=>[n.loading?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0})):((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:(0,l.normalizeClass)(["account-panel-inner",{inactive:!a.account.is_active}])},[(0,l.createElementVNode)("div",A,[(0,l.createElementVNode)("div",T,[(0,l.createElementVNode)("h1",U,[(0,l.createTextVNode)((0,l.toDisplayString)(a.account.title)+" ",1),a.account.is_active?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createTextVNode)(" ( inactive )")],64)),a.account.has_subscribed?((0,l.openBlock)(),(0,l.createElementBlock)("svg",O)):(0,l.createCommentVNode)("",!0),!a.account.has_subscribed&&a.account.is_trial&&-1!==a.account.num_valid_days?((0,l.openBlock)(),(0,l.createElementBlock)("svg",{key:2,"data-toggle":"tooltip",title:"Trial expires "+r.prettyDateMethod(a.account.trial_time_left.end_time),class:"fas mx-1 orange fa-calendar-day"},null,8,R)):a.account.is_trial&&-1===a.account.num_valid_days?((0,l.openBlock)(),(0,l.createElementBlock)("svg",I)):(0,l.createCommentVNode)("",!0),a.account.has_subscribed||a.account.is_trial?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("svg",P)),(0,l.createElementVNode)("span",F,[!a.account.has_subscribed&&a.account.is_trial&&-1!==a.account.num_valid_days?((0,l.openBlock)(),(0,l.createBlock)(s,{key:0,"end-time":r.expiryDate},{process:(0,l.withCtx)(({timeObj:e})=>[(0,l.createElementVNode)("span",null,[t[10]||(t[10]=(0,l.createTextVNode)(" trial expires in ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(e.d),1),t[11]||(t[11]=(0,l.createTextVNode)("d ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(e.h),1),t[12]||(t[12]=(0,l.createTextVNode)("h ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(e.m),1),t[13]||(t[13]=(0,l.createTextVNode)("m ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(e.s),1),t[14]||(t[14]=(0,l.createTextVNode)("s ",-1))])]),finish:(0,l.withCtx)(()=>[...t[15]||(t[15]=[(0,l.createElementVNode)("span",null,"Trial Expired",-1)])]),_:1},8,["end-time"])):-1===a.account.num_valid_days?((0,l.openBlock)(),(0,l.createElementBlock)("span",L," unlimited trial ")):(0,l.createCommentVNode)("",!0)])])]),(0,l.createElementVNode)("div",M,[n.showEdit?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createElementVNode)("span",{class:"account-action","data-toggle":"tooltip",title:"Edit Account",onClick:t[0]||(t[0]=(...e)=>r.emitEdit&&r.emitEdit(...e)),id:"edit-account",name:"edit-account","aria-label":"edit account",role:"button"},[...t[16]||(t[16]=[(0,l.createElementVNode)("svg",{class:"fas darkBlue fa-edit"},null,-1)])]),r.showDeactivate?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,onClick:t[1]||(t[1]=e=>r.toggleActive(!1)),class:"account-action","data-toggle":"tooltip",id:"deactivate",name:"deactivate","aria-label":"deactivate account",role:"button",title:"Deactivate Account"},[...t[17]||(t[17]=[(0,l.createElementVNode)("svg",{class:"fas error fa-power-off"},null,-1)])])):(0,l.createCommentVNode)("",!0),a.account.is_active?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,onClick:t[2]||(t[2]=e=>r.toggleActive(!0)),id:"activate",name:"activate","aria-label":"activate account",role:"button",class:"account-action","data-toggle":"tooltip",title:"Activate Account"},[...t[18]||(t[18]=[(0,l.createElementVNode)("svg",{class:"fas green fa-power-off"},null,-1)])]))],64)):((0,l.openBlock)(),(0,l.createElementBlock)("h1",q,"Account undergoing migration, please wait"))])]),(0,l.createElementVNode)("div",G,[(0,l.createElementVNode)("label",{class:"d-block mb-0",id:"toggle-account-info",name:"toggle-account-info","aria-label":"confirm reset",role:"button",onClick:t[3]||(t[3]=e=>n.accountInfoOpen=!n.accountInfoOpen)},[t[19]||(t[19]=(0,l.createElementVNode)("strong",null,"Account Info ",-1)),((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)(["fas blue",[n.accountInfoOpen?"fa-minus-square":"fa-plus-square"]])},null,2))]),(0,l.createVNode)(i,null,{default:(0,l.withCtx)(()=>[n.accountInfoOpen?((0,l.openBlock)(),(0,l.createElementBlock)("div",z,[t[21]||(t[21]=(0,l.createElementVNode)("hr",null,null,-1)),(0,l.createElementVNode)("div",H,[(0,l.createElementVNode)("div",$,[(0,l.createElementVNode)("label",null,[t[20]||(t[20]=(0,l.createTextVNode)(" Type: ",-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(r.displayType),1)])]),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(r.accountItems,(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"col-6 pr-3 mb-2",key:t},[(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)((0,l.toDisplayString)(e.label)+": ",1),(0,l.createElementVNode)("strong",null,["created"===e.key||"renewal_date"===e.key?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createTextVNode)((0,l.toDisplayString)(r.prettyDateFormatter(n.accountData[e.key])),1)],64)):"email"===e.key?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createTextVNode)((0,l.toDisplayString)(n.accountData[e.key]),1)],64)):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:2},[(0,l.createTextVNode)((0,l.toDisplayString)(r.formatAccountData(n.accountData[e.key])),1)],64))])])]))),128))])])):(0,l.createCommentVNode)("",!0)],void 0,!0),_:1})]),(0,l.createElementVNode)("div",j,[(0,l.createElementVNode)("label",{class:"d-block mb-0",id:"toggle-account-limit",name:"toggle-account-limit","aria-label":"toggle account limit",role:"button",onClick:t[4]||(t[4]=e=>n.accountLimitsOpen=!n.accountLimitsOpen)},[t[22]||(t[22]=(0,l.createElementVNode)("strong",null,"Account Credits ",-1)),((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)(["fas blue",[n.accountLimitsOpen?"fa-minus-square":"fa-plus-square"]])},null,2)),(0,l.createVNode)(d)]),(0,l.createVNode)(i,null,{default:(0,l.withCtx)(()=>[n.accountLimitsOpen?((0,l.openBlock)(),(0,l.createBlock)(u,{key:0,accountData:n.accountData},null,8,["accountData"])):(0,l.createCommentVNode)("",!0)],void 0,!0),_:1})]),(0,l.createElementVNode)("div",K,[(0,l.createElementVNode)("div",W,[(0,l.createElementVNode)("label",{class:"d-block mb-0",id:"toggle-cycle-usage",name:"toggle-cycle-usage","aria-label":"toggle cycle usage",role:"button",onClick:t[5]||(t[5]=e=>n.cycleUsageOpen=!n.cycleUsageOpen)},[t[23]||(t[23]=(0,l.createElementVNode)("strong",null,"Billing Cycle Usage ",-1)),((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)(["fas blue",[n.cycleUsageOpen?"fa-minus-square":"fa-plus-square"]])},null,2))]),(0,l.createVNode)(i,null,{default:(0,l.withCtx)(()=>[n.cycleUsageOpen?((0,l.openBlock)(),(0,l.createElementBlock)("div",J,[t[24]||(t[24]=(0,l.createElementVNode)("hr",null,null,-1)),(0,l.createElementVNode)("div",Z,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(r.monthlyUsages,(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"col-6 mb-2",key:t},[(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)((0,l.toDisplayString)(r.formatMonthlyUsageKey(t))+": ",1),(0,l.createElementVNode)("strong",null,[e?((0,l.openBlock)(),(0,l.createBlock)(m,{key:0,startVal:0,endVal:e,duration:2e3},null,8,["endVal"])):((0,l.openBlock)(),(0,l.createElementBlock)("span",Q," None"))])])]))),128))])])):(0,l.createCommentVNode)("",!0)],void 0,!0),_:1})]),(0,l.createElementVNode)("div",X,[(0,l.createElementVNode)("label",{class:"d-block mb-0",id:"toggle-totalusage",name:"toggle-totalusage","aria-label":"toggle total usage",role:"button",onClick:t[6]||(t[6]=e=>n.totalUsageOpen=!n.totalUsageOpen)},[t[25]||(t[25]=(0,l.createElementVNode)("strong",null,"Total Usage ",-1)),((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)(["fas blue",[n.totalUsageOpen?"fa-minus-square":"fa-plus-square"]])},null,2))]),(0,l.createVNode)(i,null,{default:(0,l.withCtx)(()=>[n.totalUsageOpen?((0,l.openBlock)(),(0,l.createElementBlock)("div",Y,[t[26]||(t[26]=(0,l.createElementVNode)("hr",null,null,-1)),(0,l.createElementVNode)("div",ee,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(r.totalUsages,(e,t)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"col-6 mb-2",key:t},[(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)((0,l.toDisplayString)(r.formatTotalUsageKey(t))+": ",1),(0,l.createElementVNode)("strong",null,[e?((0,l.openBlock)(),(0,l.createBlock)(m,{key:0,startVal:0,endVal:e,duration:2e3},null,8,["endVal"])):((0,l.openBlock)(),(0,l.createElementBlock)("span",te," None"))])])]))),128))])])):(0,l.createCommentVNode)("",!0)],void 0,!0),_:1})])]),(0,l.createElementVNode)("div",ae,[(0,l.createElementVNode)("div",le,[(0,l.createElementVNode)("div",oe,[(0,l.createElementVNode)("label",{class:"d-block mb-0",id:"toggle-breakdown",name:"toggle-breakdown","aria-label":"toggle user breakdown",role:"button",onClick:t[7]||(t[7]=e=>n.userBreakdownOpen=!n.userBreakdownOpen)},[t[27]||(t[27]=(0,l.createElementVNode)("strong",null,"User Breakdown ",-1)),((0,l.openBlock)(),(0,l.createElementBlock)("svg",{class:(0,l.normalizeClass)(["fas blue",[n.userBreakdownOpen?"fa-minus-square":"fa-plus-square"]])},null,2))])]),(0,l.createElementVNode)("div",ne,[n.userBreakdownOpen&&n.toggleUsers?((0,l.openBlock)(),(0,l.createBlock)(p,{key:0,class:"d-inline-block align-middle",width:"150",switchedOnText:"All Time",switchedOffText:"This Billing Cycle",modelValue:n.showTotals,"onUpdate:modelValue":t[8]||(t[8]=e=>n.showTotals=e),name:"showTotalsDx",id:"showTotalsDx","input-attr":{name:"showTotals",id:"showTotals","aria-label":"enter showTotals"}},null,8,["modelValue"])):(0,l.createCommentVNode)("",!0),n.userBreakdownOpen?((0,l.openBlock)(),(0,l.createBlock)(p,{key:1,class:"d-inline-block align-middle",width:"80",switchedOnText:"Table",switchedOffText:"Cards",modelValue:n.toggleUsers,"onUpdate:modelValue":t[9]||(t[9]=e=>n.toggleUsers=e),name:"toggleUsersDx",id:"toggleUsersDx","input-attr":{name:"toggleUsers",id:"toggleUsers","aria-label":"enter toggleUsers"}},null,8,["modelValue"])):(0,l.createCommentVNode)("",!0)])]),(0,l.createVNode)(i,null,{default:(0,l.withCtx)(()=>[n.userBreakdownOpen?((0,l.openBlock)(),(0,l.createElementBlock)("div",re,[t[28]||(t[28]=(0,l.createElementVNode)("hr",null,null,-1)),(0,l.createVNode)(l.Transition,{name:"fade",mode:"out-in"},{default:(0,l.withCtx)(()=>[n.toggleUsers?((0,l.openBlock)(),(0,l.createBlock)(h,{key:0,class:"p-3",users:n.accountData.user_breakdown,totals:n.showTotals},null,8,["users","totals"])):((0,l.openBlock)(),(0,l.createElementBlock)("div",ce,[n.accountData.user_breakdown.length?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("label",se," No users found")),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(n.accountData.user_breakdown,(e,t)=>((0,l.openBlock)(),(0,l.createBlock)(g,{class:"user-item",key:t,user:e,id:"user-item-"+e.user_id},null,8,["user","id"]))),128))]))],void 0,!0),_:1})])):(0,l.createCommentVNode)("",!0)],void 0,!0),_:1})])],2))],void 0,!0),_:1})])}a(18237),a(69112),a(33110);const de={class:"user-item"},ue={class:"user-item-inner"},me={class:"row no-pad row h-100 justify-content-center align-items-center"},pe={class:"col align-self-center"},he={class:"user-name"},ge={class:"row no-pad"},ve={class:"col-11"},_e={class:"row no-pad"},Ve={class:"col"},ye={class:"col"};
1function be(e,t,a,o,n,r){const c=(0,l.resolveComponent)("countTo");return(0,l.openBlock)(),(0,l.createElementBlock)("div",de,[(0,l.createElementVNode)("div",ue,[(0,l.createElementVNode)("div",me,[(0,l.createElementVNode)("div",pe,[(0,l.createElementVNode)("label",he,[t[0]||(t[0]=(0,l.createElementVNode)("i",{class:"fas fa-user-circle"},null,-1)),(0,l.createElementVNode)("strong",null,(0,l.toDisplayString)(a.user.user_name),1)])])]),(0,l.createElementVNode)("div",ge,[(0,l.createElementVNode)("div",ve,[(0,l.createElementVNode)("div",_e,[(0,l.createElementVNode)("div",Ve,[(0,l.createElementVNode)("label",null,[t[1]||(t[1]=(0,l.createTextVNode)(" Active: ",-1)),(0,l.createElementVNode)("strong",null," "+(0,l.toDisplayString)(r.isUserActiveText),1)])])]),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(r.counts,e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"row no-pad",key:e.key},[(0,l.createElementVNode)("div",ye,[(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)((0,l.toDisplayString)(e.label)+":",1),(0,l.createElementVNode)("strong",null,[a.user[e.key]?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0,startVal:0,endVal:a.user[e.key],duration:2e3},null,8,["endVal"])):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createTextVNode)(" None")],64))])])])]))),128))])])])])}var ke=a(65874),fe=a.n(ke),Ne=a(18017),Ee={components:{countTo:fe()},props:{user:Object},data(){return{countMap:[{key:"total_scan_count",label:"Total Scans"},{key:"monthly_scan_count",label:"Scans This Billing Cycle"},{key:"total_target_count",label:"Companies Added"},{key:"monthly_target_count",label:"Companies Added This Billing Cycle"},{key:"total_report_count",label:"Reports Generated"},{key:"monthly_report_count",label:"Reports This Billing Cycle"}]}},computed:{counts(){return this.countMap},isUserActiveText(){return(0,Ne.zg)(this.user.is_active)}}},xe=a(66262);const Ce=(0,xe.A)(Ee,[["render",be],["__scopeId","data-v-37a9ffb8"]]);var we=Ce,Be=a(78313);const De={class:"user-data-grid"};function Se(e,t,a,o,n,r){const c=(0,l.resolveComponent)("DxDataGrid");return(0,l.openBlock)(),(0,l.createElementBlock)("div",De,[(0,l.createVNode)(c,{"data-source":n.dataSource,columns:r.columns,"show-borders":!0,"allow-column-reordering":!0,"allow-column-resizing":!0,"column-auto-width":!0,"row-alternation-enabled":!0,"customize-columns":r.customizeColumns},null,8,["data-source","columns","customize-columns"])])}var Ae=a(4612),Te={props:{users:Array,totals:Boolean},components:{DxDataGrid:Ae.Ay},data(){return{dataSource:this.users,totalColumns:["user_id","user_name","is_active","total_scan_count","total_target_count","total_report_count"],billingCycleColumns:["user_id","user_name","is_active","monthly_scan_count","monthly_target_count","monthly_report_count"]}},computed:{columns(){return this.totals?this.totalColumns:this.billingCycleColumns}},methods:{customizeColumns(e){for(const t of e)t.caption=t.caption.replace("Monthly",""),t.caption=t.caption.replace("Total",""),t.caption=t.caption.replace("count",""),t.caption=t.caption.replace("scan","Scans"),t.caption=t.caption.replace("Is active","Active"),t.caption=t.caption.replace("target","Companies"),t.caption=t.caption.replace("report","Reports"),t.caption=t.caption.replace("User id","ID")}}};const Ue=(0,xe.A)(Te,[["render",Se],["__scopeId","data-v-63f277f9"]]);var Oe=Ue,Re=a(17113),Ie=a(1510);function Pe(e,t,a,o,n,r){const c=(0,l.resolveComponent)("infos");return(0,l.openBlock)(),(0,l.createBlock)(c,{title:"Account Credits Help",class:"blue",width:800},{default:(0,l.withCtx)(()=>[...t[0]||(t[0]=[(0,l.createElementVNode)("div",{class:"d-block"},[(0,l.createElementVNode)("h1",null,"Static Limits"),(0,l.createElementVNode)("p",null," Static Limits are fixed constraints that apply to your account. These are limits that govern the maximum number of domains, IPs that can be associated with a company and the maximum number of users (both admin and base) that can be associated with your account. Unlike other credit types, Static Limits do not refill or roll over; they are simply hard-set boundaries that cannot be exceeded. "),(0,l.createElementVNode)("strong",null,"Examples of Static Limits:"),(0,l.createElementVNode)("ul",null,[(0,l.createElementVNode)("li",null,"Maximum Domains Per Company: 3"),(0,l.createElementVNode)("li",null,"Maximum IPs per Company: 3"),(0,l.createElementVNode)("li",null,"Maximum Admin Users: 5"),(0,l.createElementVNode)("li",null,"Maximum Base Users: 20")]),(0,l.createElementVNode)("h1",null,"Dynamic Credits"),(0,l.createElementVNode)("p",null," Dynamic Credits are a flexible and consumable resource used for creating objects like scans, reports, and more. Unlike Static Limits, Dynamic Credits are subject to a refill cycle and may be set to roll over. "),(0,l.createElementVNode)("strong",null,"Refill Cycle:"),(0,l.createTextVNode)(" Dynamic Credits are replenished on a regular basis according to the chosen cycle: "),(0,l.createElementVNode)("ul",null,[(0,l.createElementVNode)("li",null,"Monthly: Refilled every month"),(0,l.createElementVNode)("li",null,"Quarterly: Refilled every three months"),(0,l.createElementVNode)("li",null,"Semiannually: Refilled every six months"),(0,l.createElementVNode)("li",null,"Annually: Refilled every year")]),(0,l.createElementVNode)("strong",null,"Rollover Option:"),(0,l.createTextVNode)(" If the rollover option is enabled, any unused Dynamic Credits at the end of the cycle will remain in the account for future use. If disabled, unused credits will be forfeited at the end of the cycle. "),(0,l.createElementVNode)("p",null,[(0,l.createElementVNode)("strong",null,"Usage Example:"),(0,l.createTextVNode)(" If you have 100 Dynamic Credits and use 30 for scans and reports, you will have 70 left. If the rollover option is enabled and your refill cycle is monthly, those 70 credits will remain in your account, and additional credits will be added at the beginning of the next month. ")]),(0,l.createElementVNode)("p",null," Please contact support if you have any questions or need further assistance with the credits system. ")],-1)])],void 0,!0),_:1})}var Fe=a(66028),Le={components:{infos:Fe.A}};const Me=(0,xe.A)(Le,[["render",Pe],["__scopeId","data-v-33334c84"]]);var qe=Me,Ge={components:{preloader:B.A,userItem:we,CollapseTransition:Be.ZQ,countTo:fe(),userDataGrid:Oe,DxSwitch:Re.n,accountCreditsPanel:Ie.A,creditsHelpPopup:qe},props:{account:Object,types:Array},watch:{account:{deep:!0,handler(){this.init()}}},data(){return{showEdit:!1,showTotals:!0,accountInfoOpen:!1,accountLimitsOpen:!1,cycleUsageOpen:!1,totalUsageOpen:!1,userBreakdownOpen:!1,toolBoxOpen:!1,loading:!0,toggleUsers:!0,accountData:null,accountItemMap:[{label:"Admin",key:"is_admin"},{label:"Email",key:"email"},{label:"Phone",key:"phone"},{label:"Created By",key:"created_by"},{label:"Created",key:"created"},{label:"Trial",key:"is_trial"},{label:"Trial Length (days)",key:"num_valid_days"},{label:"Has Subscribed",key:"has_subscribed"},{label:"Renewal Date",key:"renewal_date"},{label:"Company Types",key:"valid_target_types"},{label:"Default Scan Type",key:"default_scan_type"}],accountLimits:[{key:"user_total",label:"Max Users"},{key:"self_target",label:"Max Defensive Monitoring Companies"},{key:"domains_per_target",label:"Max Domains Per Company"},{key:"ipv4s_per_target",label:"IPs Per Company"},{key:"scan_total",label:"Max Scans Per Billing Cycle"},{key:"report_total",label:"Max Reports Per Billing Cycle"}]}},filters:{removeMonthly:function(e){if(e)return e.replace("monthly","")},removeTotal:function(e){if(e)return e.replace("total","")},removeSum:function(e){if(e)return e.replace("sum","")}},computed:{showDeactivate(){const e=this.$store.getters.user.account_id;return e!==this.account.id&&this.account.is_active},expiryDate(){return new Date(this.account.trial_time_left.end_time)},monthlyUsages(){if(this.accountData&&this.accountData.scan_and_report_breakdown){const e=Object.keys(this.accountData.scan_and_report_breakdown).filter(e=>e.includes("monthly")).reduce((e,t)=>
1(e[t]=this.accountData.scan_and_report_breakdown[t],e),{});return e}return{}},totalUsages(){if(this.accountData&&this.accountData.scan_and_report_breakdown){const e=Object.keys(this.accountData.scan_and_report_breakdown).filter(e=>e.includes("total")).reduce((e,t)=>(e[t]=this.accountData.scan_and_report_breakdown[t],e),{});return e}return{}},displayType(){if(Array.isArray(this.types)){const e=this.types.find(e=>e.key===this.accountData.type);if(e)return e.label}return"Not Found"},accountItems(){return this.accountItemMap}},methods:{prettyDateMethod(e){const t=new Date(e);return t.toLocaleDateString("en-US",{hour:"numeric",hour12:!0,minute:"numeric"})},toggleActive(e){const t=JSON.parse(JSON.stringify(this.accountData));t.is_active=e,this.$emit("toggleActive",t)},emitEdit(){this.$emit("edit",this.account)},emitDelete(){this.$emit("delete",this.account)},async init(){this.loading=!0;try{const e=await w.A.call({endpoint:"accounts",action:"get",ID:this.account.id});e&&(this.accountData=e.data,this.showEdit=!this.accountData.is_in_migration)}catch(e){console.error(e),this.catchError("Error fetching account data.")}finally{this.loading=!1}},prettyDateFormatter(e){return(0,Ne.XF)(e)},formatMonthlyUsageKey(e){return(0,Ne.zg)(e.replace(/monthly|sum/gi,""),["noUnderscores","titleCase"])},formatTotalUsageKey(e){return(0,Ne.zg)(e.replace(/total|sum/gi,""),["noUnderscores","titleCase"])},formatAccountData(e){return(0,Ne.zg)(e,["infinite","noUnderscores","titleCase"])}},mounted(){this.init()}};const ze=(0,xe.A)(Ge,[["render",ie],["__scopeId","data-v-3ba3966e"]]);var He=ze;const $e={id:"account-editor"},je={class:"editor-row"},Ke={class:"row no-pad"},We={class:"col-6 editor-column"},Je={class:"col-6 editor-column"},Ze={class:"editor-row"},Qe={class:"row no-pad"},Xe={class:"col-6 editor-column"},Ye={class:"col-6 editor-column"},et={class:"editor-row"},tt={class:"row no-pad"},at={class:"col-6 editor-column"},lt={key:0,class:"col-3 editor-column"},ot={class:"col-3 editor-column"},nt={class:"editor-row"},rt={class:"row no-pad"},ct={class:"col-6 editor-column"},st={class:"col-6 editor-column"},it={class:"editor-row"},dt={class:"row no-pad"},ut={class:"col-6 editor-column"},mt={class:"col-6 editor-column"},pt={class:"editor-row"},ht={class:"row no-pad"},gt={class:"col-6 editor-column"},vt={class:"col-6 editor-column"},_t={class:"col-4 editor-column"},Vt={class:"col-3 editor-column"},yt={class:"col-3 editor-column"},bt={class:"col-2 editor-column"},kt={key:0,class:"editor-row"},ft={key:1,class:"editor-row"},Nt={class:"flag-product-header"},Et={class:"flag-product-label mb-0"},xt={key:0,class:"flag-group-label"},Ct={class:"row no-pad"},wt=["for"],Bt={key:2,class:"editor-row"},Dt={key:3,class:"editor-row"},St={class:"row no-pad"},At={class:"col-6 editor-column"},Tt={class:"col-6 editor-column"},Ut={class:"col-6 editor-column"},Ot={class:"row no-pad mt-3"},Rt={class:"col-3 editor-column"},It={class:"row no-pad"},Pt={class:"col-6 editor-column"},Ft={class:"col-6 editor-column"},Lt={class:"col-6 editor-column"},Mt={class:"col-12 editor-column"},qt={class:"row no-pad mt-3"},Gt={class:"col-3 editor-column"},zt={key:0,class:"sso-help-text"},Ht={key:1,class:"sso-help-text"},$t={class:"col-1 editor-column py-1"},jt={class:"col-11 editor-column py-1 sso-user-label"},Kt={key:0,class:"sso-user-name"},Wt={class:"text-right"},Jt={id:"consent-modal"},Zt={class:"consent-buttons"},Qt={class:"consent-buttons"};function Xt(e,t,a,o,n,r){const c=(0,l.resolveComponent)("preloader"),s=(0,l.resolveComponent)("dx-required-rule"),i=(0,l.resolveComponent)("dx-string-length-rule"),d=(0,l.resolveComponent)("dx-validator"),u=(0,l.resolveComponent)("dx-text-box"),m=(0,l.resolveComponent)("DxPatternRule"),p=(0,l.resolveComponent)("DxValidator"),h=(0,l.resolveComponent)("DxTextBox"),g=(0,l.resolveComponent)("DxCustomRule"),v=(0,l.resolveComponent)("dx-select-box"),_=(0,l.resolveComponent)("DxCheckBox"),V=(0,l.resolveComponent)("DxDateBox"),y=(0,l.resolveComponent)("DxSelectBox"),b=(0,l.resolveComponent)("dx-number-box"),k=(0,l.resolveComponent)("DxTextArea"),f=(0,l.resolveComponent)("DxValidationSummary"),N=(0,l.resolve
1Component)("DxValidationGroup"),E=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",$e,[n.loading?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0})):((0,l.openBlock)(),(0,l.createBlock)(N,{key:1,ref:"setup",id:"accountGroup"},{default:(0,l.withCtx)(()=>[t[58]||(t[58]=(0,l.createElementVNode)("div",{class:"editor-row"},[(0,l.createElementVNode)("h1",null,"Account Details"),(0,l.createElementVNode)("hr")],-1)),(0,l.createElementVNode)("div",je,[(0,l.createElementVNode)("div",Ke,[(0,l.createElementVNode)("div",We,[t[27]||(t[27]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("Account Title"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("i",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(u,{id:"title-dx","input-attr":{name:"account-title",id:"account-title","aria-label":"enter account-title"},autocomplete:"off",modelValue:n.account.title,"onUpdate:modelValue":t[0]||(t[0]=e=>n.account.title=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(d,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{message:"Account title is required"}),(0,l.createVNode)(i,{max:255,message:"Please limit company name to no more that 255 characters"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),(0,l.createElementVNode)("div",Je,[t[28]||(t[28]=(0,l.createElementVNode)("label",null,"Phone #",-1)),(0,l.createVNode)(h,{"mask-rules":n.phoneRules,"use-masked-value":!1,mask:"+1 (000) 000-0000","mask-invalid-message":"The phone must have a correct USA phone format",modelValue:n.account.phone,"onUpdate:modelValue":t[1]||(t[1]=e=>n.account.phone=e),id:"phone-dx","input-attr":{name:"phone",id:"phone","aria-label":"enter phone"},ref:"phoneInput"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{ref:"phoneValidator",validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(m,{pattern:n.phonePattern,message:"The phone must have a correct USA phone format"},null,8,["pattern"])],void 0,!0),_:1},512)],void 0,!0),_:1},8,["mask-rules","modelValue"])])])]),(0,l.createElementVNode)("div",Ze,[(0,l.createElementVNode)("div",Qe,[(0,l.createElementVNode)("div",Xe,[t[29]||(t[29]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("Email"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("svg",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(h,{id:"email-dx","input-attr":{name:"email",id:"email","aria-label":"enter email"},modelValue:n.account.email,"onUpdate:modelValue":t[2]||(t[2]=e=>n.account.email=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(g,{validationCallback:e.validateEmail,message:"Email is invalid"},null,8,["validationCallback"]),(0,l.createVNode)(s,{message:"Account email is required"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),(0,l.createElementVNode)("div",Ye,[t[30]||(t[30]=(0,l.createElementVNode)("label",{class:"mr-3"},[(0,l.createTextVNode)("Account Type"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("svg",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(v,{id:"type-dx","input-attr":{name:"account_type",id:"account_type","aria-label":"enter account_type"},modelValue:n.account.type,"onUpdate:modelValue":t[3]||(t[3]=e=>n.account.type=e),items:a.types,"display-expr":"label","value-expr":"key"},null,8,["modelValue","items"])])])]),(0,l.createElementVNode)("div",et,[(0,l.createElementVNode)("div",tt,[(0,l.createElementVNode)("div",at,[t[31]||(t[31]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("CyRisk Platform Domain Alias"),(0,l.createElementVNode)("span",{style:{"font-style":"italic"}}," (leave blank for default)")],-1)),(0,l.createVNode)(h,{id:"cyrisk_platform_domain_alias_dx","input-attr":{name:"cyrisk_platform_domain_alias",id:"cyrisk_platform_domain_alias","aria-label":"enter cyrisk_platform_domain_alias"},modelValue:n.account.cyrisk_platform_domain_alias,"onUpdate:modelValue":t[4]||(t[4]=e=>n.account.cyrisk_platform_domain_alias=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(g,{validationCallback:e.validatePlatformDomainAlias,message:"Subdomain is invali
1d. (Format: <subdomain>.cyrisk.com)"},null,8,["validationCallback"])],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),n.isNew?((0,l.openBlock)(),(0,l.createElementBlock)("div",lt,[t[32]||(t[32]=(0,l.createElementVNode)("label",{class:"d-block"},"Send Email On Creation",-1)),(0,l.createVNode)(_,{id:"send_email_dx","input-attr":{name:"send_email",id:"send_email","aria-label":"enter send_email"},modelValue:n.account.send_email,"onUpdate:modelValue":t[5]||(t[5]=e=>n.account.send_email=e)},null,8,["modelValue"])])):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",ot,[t[33]||(t[33]=(0,l.createElementVNode)("label",{class:"d-block"},"Subscribed",-1)),(0,l.createVNode)(_,{id:"has_subscribed_dx","input-attr":{name:"has_subscribed",id:"has_subscribed","aria-label":"enter has_subscribed"},modelValue:n.account.has_subscribed,"onUpdate:modelValue":t[6]||(t[6]=e=>n.account.has_subscribed=e)},null,8,["modelValue"])])])]),t[59]||(t[59]=(0,l.createElementVNode)("hr",null,null,-1)),(0,l.createElementVNode)("div",nt,[(0,l.createElementVNode)("div",rt,[(0,l.createElementVNode)("div",ct,[t[34]||(t[34]=(0,l.createElementVNode)("label",{class:"mr-3"},"Refill Cycle Start",-1)),(0,l.createVNode)(V,{"display-format":"yyyy-MM-dd","date-serialization-format":"yyyy-MM-dd",modelValue:n.account.refill_cycle_start_date,"onUpdate:modelValue":t[7]||(t[7]=e=>n.account.refill_cycle_start_date=e),name:"refill_cycle_start_date_dx",id:"refill_cycle_start_date_dx","input-attr":{name:"refill_cycle_start_date",id:"refill_cycle_start_date","aria-label":"enter refill_cycle_start_date"}},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{message:"Expiration date is required"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),(0,l.createElementVNode)("div",st,[t[35]||(t[35]=(0,l.createElementVNode)("label",{class:"mr-3"},"Refill Cycle",-1)),(0,l.createVNode)(y,{id:"refill_cycle_dx","input-attr":{name:"refill_cycle",id:"refill_cycle","aria-label":"enter refill_cycle"},modelValue:n.account.refill_cycle,"onUpdate:modelValue":t[8]||(t[8]=e=>n.account.refill_cycle=e),items:n.refillCycles,"display-expr":"label","value-expr":"key"},null,8,["modelValue","items"])])])]),(0,l.createElementVNode)("div",it,[(0,l.createElementVNode)("div",dt,[(0,l.createElementVNode)("div",ut,[t[36]||(t[36]=(0,l.createElementVNode)("label",null,"Max IPs Per Company",-1)),(0,l.createVNode)(b,{id:"domains_per_target_dx","input-attr":{name:"max_domains_per_target",id:"max_domains_per_target","aria-label":"enter max_domains_per_target"},modelValue:n.account.max_domains_per_target,"onUpdate:modelValue":t[9]||(t[9]=e=>n.account.max_domains_per_target=e),"show-spin-buttons":!0,"show-clear-button":!0,min:-1},null,8,["modelValue"])]),(0,l.createElementVNode)("div",mt,[t[37]||(t[37]=(0,l.createElementVNode)("label",null,"Max Domains Per Company",-1)),(0,l.createVNode)(b,{id:"ipv4s_per_target_dx","input-attr":{name:"ipv4s_per_target",id:"ipv4s_per_target","aria-label":"enter ipv4s_per_target"},modelValue:n.account.max_ipv4s_per_target,"onUpdate:modelValue":t[10]||(t[10]=e=>n.account.max_ipv4s_per_target=e),"show-spin-buttons":!0,"show-clear-button":!0,min:-1},null,8,["modelValue"])])])]),(0,l.createElementVNode)("div",pt,[(0,l.createElementVNode)("div",ht,[(0,l.createElementVNode)("div",gt,[t[38]||(t[38]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("Number of Days Valid"),(0,l.createElementVNode)("br")],-1)),(0,l.createVNode)(b,{id:"num_valid_days_dx","input-attr":{name:"num_valid_days",id:"num_valid_days","aria-label":"enter num_valid_days"},modelValue:n.account.num_valid_days,"onUpdate:modelValue":t[11]||(t[11]=e=>n.account.num_valid_days=e),"show-spin-buttons":!0,"show-clear-button":!0,min:-1},null,8,["modelValue"])]),(0,l.createElementVNode)("div",vt,[t[39]||(t[39]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("Default Scan Type"),(0,l.createElementVNode)("br")],-1)),(0,l.createVNode)(y,{id:"default_scan_type_dx","input-attr":{name:"default_scan_type",id:"default_scan_type","aria-label":"enter default_scan_type"},modelValue:n.account.default_scan_type,"onUpdate:modelValue":t[12]||(t[12]=e=>n.account.default_scan_type=e),items:n.scanTypes,"display-expr":"name","value-expr":"id"},null,8,["modelValue","items"])])])]),t[60]||(t[60]=(0,l.createElementVNode)("div",{class:"editor-row"},[(0,l.createElementVNode)("h1",null,"Account Credits"),(0,l.createElementVNode)("p",null,"Note: use -1 for unlimited"),(0,l.createElementVNode)("hr")],-1)),t[61]||(t[61]=(0,l.createElementVNode)("div",{class:"editor-row"},[(0,l.createElementVNode)("div",{class:"row no-pad"},[(0,l.createElementVNode)("div",{class:"col-4 editor-column"},[(0,l.createElementVNode)("label",null,[(0,l.createElementVNode)("strong",null,"Credit Type")])]),(0,l.createElementVNode)("div",{class:"col-3 editor-column"},[(0,l.createElementVNode)("label",null,[(0,l.createElementVNode)("strong",null,"Current Credits")])]),(0,l.createElementVNode)("div",{class:"col-3 editor-column"},[(0,l.createElementVNode)("label",null,[(0,l.createElementVNode)("strong",null,"Refill Amount")])]),(0,l.createElementVNode)("div",{class:"col-2 editor-column"},[(0,l.createElementVNode)("label",null,[(0,l.createElementVNode)("strong",null,"Roll over")])])])],-1)),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.credits,(e,a)=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"row no-pad py-1",key:a},[(0,l.createElementVNode)("div",_t,[(0,l.createElementVNode)("label",null,(0,l.toDisplayString)(e.label),1)]),(0,l.createElementVNode)("div",Vt,[(0,l.createVNode)(b,{onValueChanged:r.creditValueChange,id:"credits-dx","input-attr":{name:"credits",id:"credits","aria-label":"enter credits"},modelValue:e.credits,"onUpdate:modelValue":t=>e.credits=t,"show-spin-buttons":!0,"show-clear-button":!0,min:-1},null,8,["onValueChanged","modelValue","onUpdate:modelValue"])]),r.showNonApplicable(e)?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[t[40]||(t[40]=(0,l.createElementVNode)("div",{class:"col-3 editor-column p-2"},[(0,l.createElementVNode)("label",null,"Not Applicable")],-1)),t[41]||(t[41]=(0,l.createElementVNode)("div",{class:"col-2 editor-column p-2"},[(0,l.createElementVNode)("label",null,"Not Applicable")],-1))],64)):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createElementVNode)("div",yt,[(0,l.createVNode)(b,{onValueChanged:r.creditValueChange,id:"refill_amount_dx","input-attr":{name:"refill_amount",id:"refill_amount","aria-label":"enter refill_amount"},modelValue:e.refill_amount,"onUpdate:modelValue":t=>e.refill_amount=t,"show-spin-buttons":!0,"show-clear-button":!0,min:-1},null,8,["onValueChanged","modelValue","onUpdate:modelValue"])]),(0,l.createElementVNode)("div",bt,[(0,l.createVNode)(_,{id:"roll_over_dx","input-attr":{name:"roll_over",id:"roll_over","aria-label":"enter roll_over"},modelValue:e.roll_over,"onUpdate:modelValue":t=>e.roll_over=t},null,8,["modelValue","onUpdate:modelValue"])])],64))]))),128)),n.isNew?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",kt,[...t[42]||(t[42]=[(0,l.createElementVNode)("h1",null,"Feature Flags",-1),(0,l.createElementVNode)("p",null,"Toggle feature access for this account",-1),(0,l.createElementVNode)("hr",null,null,-1)])])),n.isNew?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",ft,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(n.featureFlagProducts,e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:e.label,class:"mb-4"},[(0,l.createElementVNode)("div",Nt,[(0,l.createElementVNode)("h5",Et,(0,l.toDisplayString)(e.label),1),(0,l.createVNode)(_,{value:r.
1isProductEnabled(e),onValueChanged:t=>r.toggleProduct(e,t),"input-attr":{"aria-label":"toggle all "+e.label}},null,8,["value","onValueChanged","input-attr"])]),((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.subgroups,e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:e.label,class:"mb-2"},[e.label?((0,l.openBlock)(),(0,l.createElementBlock)("h6",xt,(0,l.toDisplayString)(e.label),1)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",Ct,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.flags,e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{class:"col-4 editor-column py-1",key:e.key},[(0,l.createVNode)(_,{id:"flag-"+e.key,"input-attr":{name:"flag-"+e.key,id:"flag-"+e.key,"aria-label":"toggle "+e.label},value:n.account.feature_flags&&n.account.feature_flags.includes(e.key),onValueChanged:t=>r.toggleFeatureFlag(e.key,t)},null,8,["id","input-attr","value","onValueChanged"]),(0,l.createElementVNode)("label",{class:"ml-2",for:"flag-"+e.key},(0,l.toDisplayString)(e.label),9,wt)]))),128))])]))),128))]))),128))])),n.isNew?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",Bt,[...t[43]||(t[43]=[(0,l.createElementVNode)("h1",null,"SSO Configuration",-1),(0,l.createElementVNode)("hr",null,null,-1)])])),n.isNew?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("div",Dt,[t[56]||(t[56]=(0,l.createElementVNode)("h5",{class:"sso-subsection-label"},"Service Provider Metadata",-1)),t[57]||(t[57]=(0,l.createElementVNode)("p",{class:"sso-help-text"}," Provide these values to your identity provider. ",-1)),(0,l.createElementVNode)("div",St,[(0,l.createElementVNode)("div",At,[t[44]||(t[44]=(0,l.createElementVNode)("label",null,"SP Entity ID",-1)),(0,l.createVNode)(h,{id:"sp_entity_id_dx","input-attr":{name:"sp_entity_id",id:"sp_entity_id","aria-label":"SP entity ID"},value:n.account.sp_entity_id,"read-only":!0},null,8,["value"])]),(0,l.createElementVNode)("div",Tt,[t[45]||(t[45]=(0,l.createElementVNode)("label",null,"SP ACS URL",-1)),(0,l.createVNode)(h,{id:"sp_acs_url_dx","input-attr":{name:"sp_acs_url",id:"sp_acs_url","aria-label":"SP ACS URL"},value:n.account.sp_acs_url,"read-only":!0},null,8,["value"])]),(0,l.createElementVNode)("div",Ut,[t[46]||(t[46]=(0,l.createElementVNode)("label",null,"SP SLO URL",-1)),(0,l.createVNode)(h,{id:"sp_slo_url_dx","input-attr":{name:"sp_slo_url",id:"sp_slo_url","aria-label":"SP SLO URL"},value:n.account.sp_slo_url,"read-only":!0},null,8,["value"])])]),(0,l.createElementVNode)("div",Ot,[(0,l.createElementVNode)("div",Rt,[t[47]||(t[47]=(0,l.createElementVNode)("label",{class:"d-block"},"SSO Enabled",-1)),(0,l.createVNode)(_,{id:"sso_enabled_dx","input-attr":{name:"sso_enabled",id:"sso_enabled","aria-label":"SSO enabled"},modelValue:n.account.sso_enabled,"onUpdate:modelValue":t[13]||(t[13]=e=>n.account.sso_enabled=e)},null,8,["modelValue"])])]),n.account.sso_enabled?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[t[53]||(t[53]=(0,l.createElementVNode)("h5",{class:"sso-subsection-label mt-3"}," Identity Provider Settings ",-1)),(0,l.createElementVNode)("div",It,[(0,l.createElementVNode)("div",Pt,[t[48]||(t[48]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("IdP Entity ID"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("svg",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(h,{id:"idp_entity_id_dx","input-attr":{name:"idp_entity_id",id:"idp_entity_id","aria-label":"IdP entity ID"},modelValue:n.account.saml_config.idp_entity_id,"onUpdate:modelValue":t[14]||(t[14]=e=>n.account.saml_config.idp_entity_id=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{message:"IdP Entity ID is required"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),(0,l.createElementVNode)("div",Ft,[t[49]||(t[49]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("IdP SSO URL"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("svg",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(h,{id:"idp_sso_url_dx","input-attr":{name:"idp_sso_url",id:"idp_sso_url","aria-label":"IdP SSO URL"},modelValue:n.account.saml_config.idp_sso_url,"onUpdate:modelValue":t[15]||(t[15]=e=>n.account.saml_config.idp_sso_url=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{message:"IdP SSO URL is required"})],void 0,!0),_:1})],void 0,!0),_:1}
1,8,["modelValue"])]),(0,l.createElementVNode)("div",Lt,[t[50]||(t[50]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("IdP SLO URL"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("svg",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(h,{id:"idp_slo_url_dx","input-attr":{name:"idp_slo_url",id:"idp_slo_url","aria-label":"IdP SLO URL"},modelValue:n.account.saml_config.idp_slo_url,"onUpdate:modelValue":t[16]||(t[16]=e=>n.account.saml_config.idp_slo_url=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{message:"IdP SLO URL is required"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),(0,l.createElementVNode)("div",Mt,[t[51]||(t[51]=(0,l.createElementVNode)("label",null,[(0,l.createTextVNode)("IdP X.509 Certificate"),(0,l.createElementVNode)("span",{class:"error required-marker"},[(0,l.createElementVNode)("svg",{class:"fas fa-asterisk"})])],-1)),(0,l.createVNode)(k,{id:"idp_x509_cert_dx","input-attr":{name:"idp_x509_cert",id:"idp_x509_cert","aria-label":"IdP X.509 certificate"},modelValue:n.account.saml_config.idp_x509_cert,"onUpdate:modelValue":t[17]||(t[17]=e=>n.account.saml_config.idp_x509_cert=e),height:120},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(p,{validationGroup:"accountGroup"},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{message:"IdP X.509 Certificate is required"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])])]),(0,l.createElementVNode)("div",qt,[(0,l.createElementVNode)("div",Gt,[t[52]||(t[52]=(0,l.createElementVNode)("label",{class:"d-block"},"SSO Enforced",-1)),(0,l.createVNode)(_,{id:"sso_enforced_dx","input-attr":{name:"sso_enforced",id:"sso_enforced","aria-label":"SSO enforced"},modelValue:n.account.sso_enforced,"onUpdate:modelValue":t[18]||(t[18]=e=>n.account.sso_enforced=e)},null,8,["modelValue"])])])],64)):(0,l.createCommentVNode)("",!0),n.account.sso_enabled?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[t[54]||(t[54]=(0,l.createElementVNode)("h5",{class:"sso-subsection-label mt-3"},"User Exemptions",-1)),t[55]||(t[55]=(0,l.createElementVNode)("p",{class:"sso-help-text"}," Exempt users can still sign in with a password when SSO is enforced. ",-1)),n.ssoUsersLoading?((0,l.openBlock)(),(0,l.createElementBlock)("div",zt," Loading users… ")):n.ssoUsers.length?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:2},(0,l.renderList)(n.ssoUsers,e=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:e.id,class:"row no-pad sso-user-row"},[(0,l.createElementVNode)("div",$t,[(0,l.createVNode)(_,{id:"sso-exempt-"+e.id,"input-attr":{name:"sso_exempt_"+e.id,id:"sso_exempt_"+e.id,"aria-label":"SSO exempt for "+e.username},value:e.is_sso_exempt,onValueChanged:t=>t.event&&r.toggleSsoExempt(e,t.value)},null,8,["id","input-attr","value","onValueChanged"])]),(0,l.createElementVNode)("div",jt,[(0,l.createTextVNode)((0,l.toDisplayString)(e.username)+" ",1),e.first_name||e.last_name?((0,l.openBlock)(),(0,l.createElementBlock)("span",Kt," — "+(0,l.toDisplayString)(e.first_name)+" "+(0,l.toDisplayString)(e.last_name),1)):(0,l.createCommentVNode)("",!0)])]))),128)):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ht," No active users found. "))],64)):(0,l.createCommentVNode)("",!0)])),(0,l.createElementVNode)("div",Wt,[(0,l.createElementVNode)("div",{onClick:t[19]||(t[19]=(...e)=>r.saveOrGetConsent&&r.saveOrGetConsent(...e)),class:"white-button d-inline-block mr-3",id:"save-get-consent",name:"save-get-consent","aria-label":"save or get consent",role:"button"}," Save "),(0,l.createElementVNode)("div",{id:"cancel-edit",name:"cancel-edit","aria-label":"cancel edit",role:"button",onClick:t[20]||(t[20]=(...e)=>r.cancel&&r.cancel(...e)),class:"white-button d-inline-block"}," Cancel ")]),(0,l.createVNode)(f,{id:"validation-summary",validationGroup:"accountGroup"})],void 0,!0),_:1},512)),(0,l.createVNode)(E,{width:e.gPopupWidth(500),height:e.gPopupHeight(500),title:"Delete Report",visible:n.consentOpen,"onUpdate:visible":t[26]||(t[26]=e=>n.consentOpen=e),"show-title":!1},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",Jt,[t[66]||(t[66]=(0,l.createElementVNode)("h1",{class:"big"},[(0,l.createElementVNode)("i",{class:"big fas fa-exclamation-triangle error"})],-1)),n.showNameField?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[t[64]||(t[64]=(0,l.createElementVNode)("p",null,[(0,l.createTextVNode)(" Please enter your name so that we have a record of who triggered the migration."),(0,l.createElementVNode)("br")],-1)),(0,l.createVNode)(u,{"value-change-event":"keyup",id:"triggering_user_dx","input-attr":{name:"triggering_user",id:"triggering_user","aria-label":"enter triggering_user"},modelValue:n.triggeringUser,"onUpdate:modelValue":t[23]||(t[23]=e=>n.triggeringUser=e),class:"m-3"},null,8,["modelValue"]),t[65]||(t[65]=(0,l.createElementVNode)("h1",null,[(0,l.createElementVNode)("strong",null," Are you sure you want to proceed?")],-1)),(0,l.createElementVNode)("div",Qt,[n.triggeringUser?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,onClick:t[24]||(t[24]=(...e)=>r.saveAccount&&r.saveAccount(...e)),class:"blank-button",id:"save-account",name:"save-account","aria-label":"save account",role:"button"}," Start ")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",{id:"close-consent",name:"close-consent","aria-label":"close consent",role:"button",onClick:t[25]||(t[25]=(...e)=>r.closeConsent&&r.closeConsent(...e)),class:"blank-button"}," Cancel ")])],64)):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[t[62]||(t[62]=(0,l.createElementVNode)("p",null,[(0,l.createTextVNode)(" You have changed the account type. This will trigger an account migration that could take some time. During this time, the account will be locked. The account users will be unable to log in, and 
1you cannot edit the account until the migration is complete."),(0,l.createElementVNode)("br")],-1)),t[63]||(t[63]=(0,l.createElementVNode)("h1",null,[(0,l.createElementVNode)("strong",null," Are you sure you want to proceed?")],-1)),(0,l.createElementVNode)("div",Zt,[(0,l.createElementVNode)("div",{id:"change-account-type",name:"change-account-type","aria-label":"proceed with account type change",role:"button",onClick:t[21]||(t[21]=e=>n.showNameField=!0),class:"blank-button"}," Proceed "),(0,l.createElementVNode)("div",{id:"close-consent",name:"close-consent","aria-label":"close consent",role:"button",onClick:t[22]||(t[22]=(...e)=>r.closeConsent&&r.closeConsent(...e)),class:"blank-button"}," Cancel ")])],64))])],void 0,!0),_:1},8,["width","height","visible"])])}a(81148),a(30531),a(61701);var Yt=a(16201),ea=a(40464),ta=a(679),aa=a(30623),la=a(97043),oa=a(79321),na=a(40925),ra={props:{accountIn:Object,types:Array},components:{DxPopup:ta.jF,preloader:B.A,DxTextBox:D.HA,DxTextArea:D.R$,DxCustomRule:la.CC,DxNumberBox:D.py,DxDateBox:D.oq,DxValidator:la.Z2,DxRequiredRule:la.az,DxPatternRule:la.zu,DxStringLengthRule:la.Wx,DxCheckBox:Yt.K,DxValidationSummary:D.US,DxValidationGroup:ea.A,DxSelectBox:D.ad},data(){return{scanTypes:aa.vz,showNameField:!1,triggeringUser:null,consentOpen:!1,loading:!0,account:null,phoneRules:{X:/[02-9]/},phonePattern:/^\d{10}$/,group:null,isNew:!0,refillCycles:[{key:"monthly",label:"Monthly"},{key:"quarterly",label:"Quarterly"},{key:"semi_annually",label:"Semi-annually"},{key:"annually",label:"Annually"}],refreshKey:0,ssoUsers:[],ssoUsersLoading:!1,featureFlagProducts:[{label:"Insights Engine",subgroups:[{label:"",flags:[{key:"insights",label:"Insight Engine"},{key:"trends",label:"Trends"},{key:"company_insights",label:"Company Insights"},{key:"vendor_insights",label:"Vendor Insights"},{key:"prism_analysis",label:"Prism Analysis"},{key:"security_litigation",label:"Security Litigation"},{key:"privacy_litigation",label:"Privacy Litigation"},{key:"privacy_v2",label:"Privacy V2"}]}]},{label:"Protect",subgroups:[{label:"Governance & Compliance",flags:[{key:"assessments",label:"Assessments"},{key:"privacy_risk_assessment",label:"Privacy Risk Assessment"},{key:"vendor_risk_management",label:"Vendor Risk Management"},{key:"customer_compliance",label:"Customer Compliance"},{key:"client_trust",label:"Client Trust"}]},{label:"Continuous Monitoring",flags:[{key:"defensive_security_monitoring",label:"Defensive Security Monitoring"},{key:"threat_intelligence",label:"Threat Intelligence"},{key:"soc",label:"SOC"},{key:"loggin_and_siem",label:"Logging & SIEM"},{key:"xdr",label:"XDR"}]},{label:"Protecting the Human",flags:[{key:"phishing_exercises",label:"Phishing Exercises"},{key:"training",label:"Training"},{key:"tabletop_exercise",label:"Tabletop Exercise"}]},{label:"Resource Library",flags:[{key:"resource_library",label:"Resource Library"},{key:"policies_and_procedures_templates",label:"Policies & Procedures Templates"},{key:"communications",label:"Communications"}]},{label:"Services",flags:[{key:"vciso",label:"vCISO"}]},{label:"Platform Settings",flags:[{key:"users",label:"Users"},{key:"account_settings",label:"Account Settings"},{key:"alerts",label:"Alerts"},{key:"rules",label:"Rules"},{key:"techrules",label:"Tech Rules"},{key:"frameworks",label:"Frameworks"}]}]},{label:"Claims Intake Platform",subgroups:[{label:"",flags:[{key:"customer_claims",label:"Claims Platform"},{key:"customer_claims_manager",label:"Claims Manager"}]}]}]}},methods:{getProductFlagKeys(e){return e.subgroups.flatMap(e=>e.flags.map(e=>e.key))},isProductEnabled(e){if(!this.account.feature_flags)return!1;const t=this.getProductFlagKeys(e);return t.every(e=>this.account.feature_flags.includes(e))},toggleProduct(e,t){if(!t.event)return;this.account.feature_flags||(this.account.feature_flags=[]);const a=this.getProductFlagKeys(e);if(t.value)for(const l of a)this.account.feature_flags.includes(l)||this.account.feature_flags.push(l);else this.account.feature_flags=this.account.feature_flags.filter(e=>!a.includes(e))},toggleFeatureFlag(e,t){this.account.feature_flags||(this.account.feature_flags=[]),t.value?this.account.feature_flags.includes(e)||this.account.feature_flags.push(e):this.account.feature_flags=this.account.feature_flags.filter(t=>t!==e)},showNonApplicable(e){return this.refreshKey,e.is_absolute_count||-1===e.credits},creditValueChange(e){this.refreshKey++,null===e.value&&e.component.option("value",0)},async loadSsoUsers(){if(this.account&&this.account.id){this.ssoUsersLoading=!0;try{const e=this.$store.state.hostname,t=`${e}/api/auth/saml/exempt/${this.account.id}/`,a=await this.$store.state.apiClient.get(t);this.ssoUsers=a.data}catch(e){console.error(e)}finally{this.ssoUsersLoading=!1}}},async toggleSsoExempt(e,t){try{const a=this.$store.state.hostname,l=`${a}/api/auth/saml/exempt/${this.account.id}/`;await this.$store.state.apiClient.patch(l,{user_id:e.id,is_sso_exempt:t}),e.is_sso_exempt=t}catch(a){console.error(a),this.catchError("Error updating SSO exemption")}},cancel(){this.$emit("cancel")},saveOrGetConsent(){this.account.type!=this.account_original_type?this.consentOpen=!0:this.saveAccount()},closeConsent(){this.consentOpen=!1,this.triggeringUser=null,this.showNameField=!1,this.account.type=this.account_original_type},async saveAccount(){const e=na.A.validateGroup("accountGroup");if(e.isValid){let e,t,a;this.loading=!0;let l=null;this.isNew?(e={isNew:!0,send_email:this.account.send_email},t="post",a="Account successfully created"):(e={isNew:!1},t="patch",a=this.account.title+" successfully updated",l=this.account.id),this.account.credits=this.credits,this.triggeringUser&&(this.account.triggering_user=this.triggeringUser),await w.A.call({action:t,endpoint:"accounts",params:this.account,ID:l}).then(t=>{e["account"]=t.data,this.dialog(a),this.$emit("saved",e)}).catch(e=>{console.error(e),this.catchError("Error saving account")}
1),this.$store.getters.user.id===this.account.id&&this.$store.dispatch("setUser"),this.loading=!1}},async init(){if(this.loading=!0,this.credits=JSON.parse(JSON.stringify(oa)),this.accountIn){this.isNew=!1;try{const e=await w.A.call({endpoint:"accounts",action:"get",ID:this.accountIn.id}).then(e=>e).catch(e=>e);for(const t of e.data.credits){const e=this.credits.find(e=>e.model===t.model&&e.type===t.type);e&&(e["credits"]=t.credits,e["id"]=t.id,e["roll_over"]=t.roll_over,e["refill_amount"]=t.refill_amount)}this.account=e.data,this.account_original_type=this.account.type,this.account.saml_config||(this.account.saml_config={idp_entity_id:"",idp_sso_url:"",idp_slo_url:"",idp_x509_cert:""}),this.loading=!1,this.loadSsoUsers()}catch(e){console.error(e),this.catchError("Error loading account")}}else this.isNew=!0,this.account=JSON.parse(JSON.stringify(aa.ho)),this.loading=!1}},created(){this.init()}};const ca=(0,xe.A)(ra,[["render",Xt],["__scopeId","data-v-794b5220"]]);var sa=ca,ia=a(7628),da={components:{preloader:B.A,DxTreeView:D.mq,accountPanel:He,accountEditor:sa,DxPopup:ta.jF,DxScrollView:ia.$,DxSwitch:Re.n},data(){return{refreshRequiredAccounts:[],toggleAccountCreds:!1,creds:{title:"account title",username:"username",password:"password"},activationState:null,scrollInstance:null,updateKey:0,loading:!0,accounts:null,currentAccount:null,next:null,editorOpen:!1,editAccount:null,toggleConsentOpen:!1,accountTypes:[{key:"insurance_carrier",label:"Insurance Carrier"},{key:"insurance_carrier_with_trends",label:"Insurance Carrier With Trends"},{key:"insurance_carrier_with_rules",label:"Insurance Carrier With Rules"},{key:"insurance_carrier_with_rules_and_trends",label:"Insurance Carrier With Rules & Trends"},{key:"insurance_carrier_with_rules_plus_full_suite",label:"Insurance Carrier with Rules & Trends + Full Suite"},{key:"ic_fs_rules_phising_tbl_top_resource_lib",label:"IC + FS - Phishing, Tabletop, Resource Lib"},{key:"defensive_monitoring",label:"Defensive Monitoring"},{key:"limited_defensive_monitoring",label:"Limited Defensive Monitoring"},{key:"vendor_risk_management",label:"Vendor Risk Management"},{key:"customer_compliance",label:"Customer Compliance"},{key:"vrm_plus_dm",label:"VRM + DM"},{key:"vrm_plus_cc",label:"VRM + CC"},{key:"cc_plus_dm",label:"CC + DM"},{key:"internal_suite",label:"Full Suite ( DM + CC + VRM + TI )"},{key:"internal_suite_phising_and_tbl_top_rsc",label:"Full Suite - Phishing Tabletop Resource"},{key:"internal_suite_resource_library",label:"Full Suite - Resource Library"},{key:"insight_claims_manager",label:"IE + Claims Manager"},{key:"claims_manager",label:"Claims Manager"},{key:"call_center",label:"Call Center"}],showInactive:!1}},methods:{prettyDate(e){const t=new Date(e);return t.toLocaleDateString("en-US",{hour:"numeric",hour12:!0,minute:"numeric"})},saveScroll(e){this.scrollInstance=e.component},cancelEdit(){this.editAccount=null,this.editorOpen=!1},accountSaved(e){e.isNew?(this.accounts.push(e.account),e.send_email||(this.creds={title:e.account.title,username:e.account.root_user.username,password:e.account.root_user.one_time_password},this.toggleAccountCreds=!0),this.updateKey++):this.updateAccounts(e.account),this.updateKey++,this.editorOpen=!1,this.editAccount=null},updateAccounts(e){const t=this.accounts.findIndex(t=>t.id===e.id);this.showInactive||e.is_active?this.accounts[t]=e:this.accounts.splice(t,1),this.currentAccount=this.accounts[t],this.updateKey++},openEdit(e){this.editAccount=e,this.editorOpen=!0},openToggleConsent(e){this.editAccount=e,this.toggleConsentOpen=!0},async toggleActive(){try{const e=await w.A.call({action:"patch",endpoint:"accounts",ID:this.editAccount.id,params:{is_active:this.editAccount.is_active,title:this.editAccount.title,email:this.editAccount.email}}).then(e=>e);if(e){const t=e.data.is_active?"activated":"deactivated",a="Account successfully "+t;this.dialog(a),this.updateAccounts(e.data),this.toggleConsentOpen=!1,this.editAccount=null}}catch(e){console.error(e),this.catchError("Error toggling account consenterr.")}this.init()},startNewAccount(){this.editAccount=null,this.editorOpen=!0},selectItem(e){this.currentAccount=this.accounts.find(t=>
1t.id===e.itemData.id)},async init(){try{const e=await this.getAccounts();e&&(this.accounts=e.data.results),this.accounts&&(this.currentAccount||(this.currentAccount=this.accounts[0]),this.refreshRequiredAccounts.includes(this.currentAccount.id)&&(this.currentAccount=await this.getAccount(this.currentAccount.id),this.refreshRequiredAccounts=this.refreshRequiredAccounts.filter(e=>e!==this.currentAccount.id)))}catch(e){console.error(e),this.catchError("Error fetching accounts.")}finally{this.loading=!1}},async getAccounts(){const e=[];e.push({name:"limit",value:1e3}),this.showInactive||e.push({name:"is_active",value:!0});const t=await w.A.call({action:"get",endpoint:"accounts",queries:e}).then(e=>e);return t},async getAccount(e){try{const t=await w.A.call({endpoint:"accounts",action:"get",ID:e});if(t)return t.data}catch(t){console.error(t),this.catchError("Error fetching account")}}},created(){this.init(),this.unwatch=this.$store.watch((e,t)=>t.accountRefreshQueue,async()=>{for(const e of this.$store.getters.accountRefreshQueue)this.refreshRequiredAccounts.push(e.account_id),this.$store.dispatch("removeFromAccountRefreshQueue",this.customerID);this.init()}),this.init()}};const ua=(0,xe.A)(da,[["render",C],["__scopeId","data-v-bb18b348"]]);var ma=ua;function pa(e,t,a,o,n,r){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{onClick:t[0]||(t[0]=(...e)=>r.exportCSV&&r.exportCSV(...e)),id:"csv-export-button",name:"csv-export-button","aria-label":"csv export button",role:"button",class:"blank-button"},[...t[1]||(t[1]=[(0,l.createElementVNode)("i",{class:"fas fa-file-export"},null,-1),(0,l.createTextVNode)(" Export Rules ",-1)])])}a(7588),a(13579),a(17642),a(58004),a(33853),a(45876),a(32475),a(15024),a(31698),a(14603),a(47566),a(98721);var ha={data(){return{ruleData:null}},methods:{async exportCSV(){this.ruleData=await this.getData();const e=this.makeCsvContent(),t="text/csv",a="rules.csv",l=window.navigator;if(l?.msSaveOrOpenBlob){const o=new Blob([e],{type:t});l.msSaveOrOpenBlob(o,a)}else{window.URL=window.webkitURL||window.URL;const l=new Blob([e],{type:t}),o=window.URL.createObjectURL(l),n=document.createElement("a");n.href=o,n.setAttribute("download",a),document.body.appendChild(n),n.click()}},async getData(){const e=await w.A.call({action:"get",endpoint:"rules",limit:9999}).then(e=>e.data.results).catch(e=>{throw console.error(e),"Error: Failed to get rules data."});return e},makeCsvContent(){let e=[];const t=[];for(let a of this.ruleData)a=this.formatObject(a),Object.keys(a).some(e=>t.includes(e))||(e=this.mergeArrays(Object.keys(a),e)),t.push(Object.values(a));return t.unshift(e),t.map(e=>e.join("\t")).join("\n")},formatObject(e){for(const t in e)Array.isArray(e[t])?e[t]=e[t].join(" "):(e[t]=`${e[t]}`,e[t]=this.replaceAll(e[t],"\t"," "),e[t]=`"${e[t]}"`,e[t]=e[t].replace(/(?:\r\n|\r|\n)/g,""));return e},replaceAll(e,t,a){return e.replace(new RegExp(t,"g"),a)},mergeArrays(...e){let t=[];return e.forEach(e=>{t=[...t,...e]}),[...new Set([...t])]}}};const ga=(0,xe.A)(ha,[["render",pa],["__scopeId","data-v-19108c22"]]);var va=ga;const _a={class:"py-1 px-3"},Va={key:1},ya={class:"file-input-wrapper"},ba={key:0,class:"error mt-1"};function ka(e,t,a,o,n,r){const c=(0,l.resolveComponent)("preloader"),s=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{onClick:t[3]||(t[3]=e=>n.popupOpen=!n.popupOpen),id:"csv-import-button",name:"csv-import","aria-label":"csv import",role:"button",class:"blank-button"},[t[5]||(t[5]=(0,l.createElementVNode)("i",{class:"fas fa-file-import"},null,-1)),t[6]||(t[6]=(0,l.createTextVNode)(" Import Rules ",-1)),(0,l.createVNode)(s,{height:e.gPopupHeight(400),width:e.gPopupWidth(600),title:"Import Rules",visible:n.popupOpen,"onUpdate:visible":t[2]||(t[2]=e=>n.popupOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",_a,[n.loading?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0})):((0,l.openBlock)(),(0,l.createElementBlock)("div",Va,[t[4]||(t[4]=(0,l.createElementVNode)("label",null,"Select File",-1)),(0,l.createElementVNode)("div",ya,[(0,l.createElementVNode)("input",{type:"file",class:"file",ref:"file",onChange:t[0]||(t[0]=e=>r.selectFile()),name:"rules-import",id:"rules-import","aria-label":"rules import"},null,544),n.error?((0,l.openBlock)(),(0,l.createElementBlock)("div",ba,(0,l.toDisplayString)(n.error),1)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",{id:"submit-rules",name:"submit-rules","aria-label":"submit rules",role:"button",class:"submit-rules blu-button",onClick:t[1]||(t[1]=(...e)=>r.submitRules&&r.submitRules(...e))}," Submit ")])]))])],void 0,!0),_:1},8,["height","width","visible"])])}a(64979);var fa=a(92259),Na=a.n(fa),Ea={components:{DxPopup:ta.jF},data(){return{popupOpen:!1,file:null,error:null,data:null,loading:!1}},methods:{read(e){const t=new FileReader;return new Promise((a,l)=>{t.onerror=()=>{t.abort(),l(new DOMException("Problem parsing input file."))},t.onload=()=>{a(t.result)},t.readAsText(e)})},validateFile(e){const t=["text/csv","text/plain","application/vnd.ms-excel","application/vnd.msexcel","application/excel","text/x-csv","application/csv","application/x-csv","text/comma-separated-values","text/x-comma-separated-values","text/tab-separated-values"];return!!t.includes(e.type)},async selectFile(){if(this.error="",this.file=this.$refs.file.files[0],this.fileIsValid=this.validateFile(this.file),this.fileIsValid)try{this.data=await this.read(this.file).catch(e=>{this.catchError("Error reading file."),console.log(e)}),this.data=await Na()({trim:!0,flatKeys:!0}).fromString(this.data).then(e=>e),this.fixValues(this.data)}catch(e){console.error(e),this.catchError("Error reading file.",1e4),console.log(e),this.file=null}else this.error="Invalid file type. Please select a valid .csv file."},fixValues(){const e=["service_cpes","ports","match_on","copied_from","section"];this.data=this.data.map(t=>{for(const o of e)t[o]?t[o]=t[o].split(" "):t[o]=[];const a=["is_advisory","urgent_section"],l=["true","TRUE",1];for(const e of a)t[e]&&l.includes(t[e])?t[e]=!0:t[e]=!1;return delete t["owner"],delete t["copied_from"],t})},async submitRules(){if(this.postErrors=null,this.file||(this.error="Please select a file."),this.file&&this.fileIsValid){this.loading=!0;for(const e of this.data)w.A.call({action:"post",endpoint:"rules",params:e}).then(()=>{this.dialog("rule added succesfully")}).catch(t=>{console.error(t),this.catchError("Error adding rule."),console.log(e.rule_id,t.response.data)});this.loading=!1,this.popupOpen=!1}}}};const xa=(0,xe.A)(Ea,[["render",ka],["__scopeId","data-v-57a41850"]]);var Ca=xa;const wa={class:"dx-fieldset"},Ba={key:0},Da={class:"dx-buttonset"};
1function Sa(e,t,a,o,n,r){const c=(0,l.resolveComponent)("dx-radio-group"),s=(0,l.resolveComponent)("dx-date-box"),i=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{onClick:t[4]||(t[4]=e=>n.showPopup=!0),id:"csv-export-button",name:"csv-export-button","aria-label":"csv export button",role:"button",class:"blank-button"},[t[6]||(t[6]=(0,l.createElementVNode)("i",{class:"fas fa-file-export"},null,-1)),t[7]||(t[7]=(0,l.createTextVNode)(" Export Admin Usage Report ",-1)),(0,l.createVNode)(i,{visible:n.showPopup,onHidden:r.onPopupHidden,height:n.popupHeight,width:n.popupWidth,title:"Export Admin Usage Report"},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",wa,[(0,l.createVNode)(c,{items:n.radioGroupItems,value:n.defaultRadioGroupValue,onValueChanged:r.handleRadioChangeEvent},null,8,["items","value","onValueChanged"]),(0,l.createVNode)(l.Transition,{name:"fade",mode:"out-in"},{default:(0,l.withCtx)(()=>["date_range"==this.selectedRadioItem?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ba,[t[5]||(t[5]=(0,l.createElementVNode)("h2",null,"Select Date Range",-1)),(0,l.createVNode)(s,{modelValue:n.startDate,"onUpdate:modelValue":t[0]||(t[0]=e=>n.startDate=e),name:"startDateDx",id:"startDateDx","input-attr":{name:"startDate",id:"startDate","aria-label":"enter startDate"},placeholder:"Start Date","display-format":"yyyy-MM-dd"},null,8,["modelValue"]),(0,l.createVNode)(s,{modelValue:n.endDate,"onUpdate:modelValue":t[1]||(t[1]=e=>n.endDate=e),name:"endDateDx",id:"endDateDx","input-attr":{name:"endDate",id:"endDate","aria-label":"enter endDate"},placeholder:"End Date","display-format":"yyyy-MM-dd"},null,8,["modelValue"])])):(0,l.createCommentVNode)("",!0)],void 0,!0),_:1}),(0,l.createElementVNode)("div",Da,[(0,l.createElementVNode)("div",{id:"get-usage-data",name:"get-usage-data","aria-label":"get admin usage data",role:"button",class:"green-button dx-button",onClick:t[2]||(t[2]=(...e)=>r.getData&&r.getData(...e))}," Apply "),(0,l.createElementVNode)("div",{id:"cancel-popup",name:"cancel-popup","aria-label":"cancel popup",role:"button",class:"red-button dx-button",onClick:t[3]||(t[3]=e=>n.showPopup=!1)}," Cancel ")])])],void 0,!0),_:1},8,["visible","onHidden","height","width"])])}var Aa=a(8501),Ta=a(26768),Ua=a(61284);const Oa=[{text:"All time",value:"all_time"},{text:"Select date range",value:"date_range"}],Ra=200,Ia=300,Pa=500;var Fa={components:{DxPopup:ta.Ay,DxDateBox:Aa.Ay,DxRadioGroup:Ta.vs},data(){return{showPopup:!1,startDate:null,endDate:null,startDateStr:null,endDateStr:null,adminUsageData:null,fileName:null,radioGroupItems:Oa,defaultRadioGroupValue:Oa[0],selectedRadioItem:"all_time",popupHeight:Ra,popupWidth:Pa}},methods:{onPopupHidden(){this.startDate=null,this.endDate=null,this.showPopup=!1},handleRadioChangeEvent(e){this.selectedRadioItem=e.value.value,this.startDate=null,this.endDate=null,"date_range"===this.selectedRadioItem?this.popupHeight=Ia:this.popupHeight=Ra},async exportCSV(){this.showPopup=!1,this.adminUsageData=await this.getData();const e=this.adminUsageData,t="text/csv",a=`admin_usage_report-${this.startDateStr}-${this.endDateStr}.csv`,l=window.navigator;if(l?.msSaveOrOpenBlob){const o=new Blob([e],{type:t});l.msSaveOrOpenBlob(o,a)}else{window.URL=window.webkitURL||window.URL;const l=new Blob([e],{type:t}),o=window.URL.createObjectURL(l),n=document.createElement("a");n.href=o,n.setAttribute("download",a),document.body.appendChild(n),n.click()}},async getData(){this.showPopup=!1,console.log(this.startDate,this.endDate),this.startDateStr=await this.formatDate(this.startDate),this.endDateStr=await this.formatDate(this.endDate),console.log(this.startDateStr,this.endDateStr);const e=await w.A.call({action:"get",endpoint:"admin_usage_report",queries:[{name:"start_date",value:this.startDateStr},{name:"end_date",value:this.endDateStr},{name:"date_input_type",value:this.selectedRadioItem}]}).then(e=>{const t={message:e.data.detail};(0,Ua.A)(t,"success",2e3)}).catch(e=>{throw console.log(e.response.data.error),this.catchError("Error: Failed to get admin usage report data."),"Error: Failed to get admin usage report data."});return e},async formatDate(e){if(e instanceof Date&&!isNaN(e.getTime())){const t=new Date(e);let a=""+(t.getMonth()+1),l=""+t.getDate();const o=t.getFullYear();return a.length<2&&(a="0"+a),l.length<2&&(l="0"+l),[o,a,l].join("-")}return null}}};const La=(0,xe.A)(Fa,[["render",Sa],["__scopeId","data-v-15c5b094"]]);var Ma=La;const qa={class:"py-1 px-3"},Ga={key:1},za={class:"mt-2"},Ha={key:0,class:"error mt-1"},$a={class:"py-1 px-3"},ja={key:0,id:"user-info"},Ka={id:"user-line"},Wa={class:"px-1"},Ja={id:"user-line"},Za={class:"px-1"},Qa={id:"user-line"},Xa={class:"px-1"},Ya={id:"user-line"},el={class:"px-1"},tl={id:"user-line"},al={class:"px-1"},ll={id:"user-line"},ol={class:"px-1"},nl={id:"btns-row"};
1function rl(e,t,a,o,n,r){const c=(0,l.resolveComponent)("preloader"),s=(0,l.resolveComponent)("DxCustomRule"),i=(0,l.resolveComponent)("DxRequiredRule"),d=(0,l.resolveComponent)("DxValidator"),u=(0,l.resolveComponent)("DxTextBox"),m=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{onClick:t[6]||(t[6]=e=>n.popupOpen=!n.popupOpen),id:"password-panel-button",name:"password-panel","aria-label":"password panel",role:"button",class:"blank-button"},[t[18]||(t[18]=(0,l.createElementVNode)("i",{class:"fas fa-file-import"},null,-1)),t[19]||(t[19]=(0,l.createTextVNode)(" Reset Password ",-1)),(0,l.createVNode)(m,{height:e.gPopupHeight(320),width:e.gPopupWidth(500),title:"Reset Password",visible:n.popupOpen,"onUpdate:visible":t[2]||(t[2]=e=>n.popupOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",qa,[n.loading?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0})):((0,l.openBlock)(),(0,l.createElementBlock)("div",Ga,[t[7]||(t[7]=(0,l.createElementVNode)("h5",null,"Find user",-1)),t[8]||(t[8]=(0,l.createElementVNode)("hr",null,null,-1)),t[9]||(t[9]=(0,l.createElementVNode)("div",{class:"mt-1"},[(0,l.createElementVNode)("span",null,[(0,l.createTextVNode)("Username or email: "),(0,l.createElementVNode)("span",{class:"smaller error required-marker"},[(0,l.createElementVNode)("i",{class:"smaller align-top fas fa-asterisk"})])])],-1)),(0,l.createElementVNode)("div",za,[(0,l.createVNode)(u,{id:"username-emil-dx","input-attr":{name:"username-emil",id:"username-email","aria-label":"enter username-email"},type:"text",modelValue:n.input,"onUpdate:modelValue":t[0]||(t[0]=e=>n.input=e)},{default:(0,l.withCtx)(()=>[(0,l.createVNode)(d,null,{default:(0,l.withCtx)(()=>[(0,l.createVNode)(s,{validationCallback:r.validateInput,message:"Invalid input"},null,8,["validationCallback"]),(0,l.createVNode)(i,{message:"Input is required"})],void 0,!0),_:1})],void 0,!0),_:1},8,["modelValue"])]),n.error?((0,l.openBlock)(),(0,l.createElementBlock)("div",Ha,(0,l.toDisplayString)(n.error),1)):(0,l.createCommentVNode)("",!0),n.input&&!n.error?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:1,class:"ask-reset blu-button",onClick:t[1]||(t[1]=(...e)=>r.askReset&&r.askReset(...e)),id:"ask-reset",name:"ask-reset","aria-label":"ask reset",role:"button"}," Search User ")):(0,l.createCommentVNode)("",!0)]))])],void 0,!0),_:1},8,["height","width","visible"]),(0,l.createVNode)(m,{height:e.gPopupHeight(370),width:e.gPopupWidth(540),title:"Password Reseter",visible:n.scndpopupOpen,"onUpdate:visible":t[5]||(t[5]=e=>n.scndpopupOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",$a,[t[16]||(t[16]=(0,l.createElementVNode)("h1",null,"Are you sure you want to reset the password for:",-1)),t[17]||(t[17]=(0,l.createElementVNode)("hr",null,null,-1)),n.foundUser?((0,l.openBlock)(),(0,l.createElementBlock)("div",ja,[(0,l.createElementVNode)("div",Ka,[t[10]||(t[10]=(0,l.createElementVNode)("label",null,"Name: ",-1)),(0,l.createElementVNode)("p",Wa,(0,l.toDisplayString)(n.foundUser.first_name),1)]),(0,l.createElementVNode)("div",Ja,[t[11]||(t[11]=(0,l.createElementVNode)("label",null,"Lastname: ",-1)),(0,l.createElementVNode)("p",Za,(0,l.toDisplayString)(n.foundUser.last_name),1)]),(0,l.createElementVNode)("div",Qa,[t[12]||(t[12]=(0,l.createElementVNode)("label",null,"Username: ",-1)),(0,l.createElementVNode)("p",Xa,(0,l.toDisplayString)(n.foundUser.username),1)]),(0,l.createElementVNode)("div",Ya,[t[13]||(t[13]=(0,l.createElementVNode)("label",null,"Email: ",-1)),(0,l.createElementVNode)("p",el,(0,l.toDisplayString)(n.foundUser.email),1)]),(0,l.createElementVNode)("div",tl,[t[14]||(t[14]=(0,l.createElementVNode)("label",null,"User 2FA: ",-1)),(0,l.createElementVNode)("p",al,(0,l.toDisplayString)(n.foundUser.is_two_factor_enabled),1)]),(0,l.createElementVNode)("div",ll,[t[15]||(t[15]=(0,l.createElementVNode)("label",null,"User type: ",-1)),(0,l.createElementVNode)("p",ol,(0,l.toDisplayString)(n.foundUser.type),1)])])):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",nl,[n.foundUser?((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:0,id:"confirm-reset",name:"confirm-reset","aria-label":"confirm reset",role:"button",class:"yes-b blu-button",onClick:t[3]||(t[3]=(...e)=>r.confirmReset&&r.confirmReset(...e))}," Confirm ")):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",{id:"cancel-reset",name:"cancel-reset","aria-label":"cancel reset",role:"button",class:"cancel-b blu-button",onClick:t[4]||(t[4]=e=>n.scndpopupOpen=!1)}," Cancel ")])])],void 0,!0),_:1},8,["height","width","visible"])])}var cl={components:{DxPopup:ta.jF,DxValidator:la.Z2,DxRequiredRule:la.az,DxTextBox:D.HA,DxCustomRule:la.CC,preloader:B.A},data(){return{popupOpen:!1,scndpopupOpen:!1,loading:!1,error:"",input:"",foundUser:null}},methods:{validateInput(e){this.error="";const t=/^[a-zA-Z0-9_-]{1,20}$/,a=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;return!!a.test(e.value)||!!t.test(e.value)},async askReset(){return this.validateInput({value:this.input})?(this.loading=!0,void await w.A.call({action:"post",endpoint:"user_search",params:{search:this.input}}).then(e=>{this.foundUser=e.data,this.scndpopupOpen=!0,this.loading=!1,this.input=""}).catch(e=>{this.error=e.response.data,this.loading=!1,this.input=""})):void(this.error="Invalid input")},async confirmReset(){this.loading=!0,await w.A.call({action:"post",endpoint:"pass_reset",params:{email:this.foundUser.email}}).then(e=>{e.data&&e.data.message&&this.dialog(e.data.message),this.loading=!1}
1).catch(e=>{e.response&&e.response.data.message&&this.dialog(e.response.data.messag),console.error(e),this.catchError("Error resetting password"),this.loading=!1}),this.popupOpen=!1,this.scndpopupOpen=!1}}};const sl=(0,xe.A)(cl,[["render",rl],["__scopeId","data-v-93c94200"]]);var il=sl;const dl={id:"privacy-scan-alert-toggle",name:"privacy-scan-alert-toggle","aria-label":"privacy scan failure alert toggle"},ul={key:0,class:"error mt-1"};function ml(e,t,a,o,n,r){const c=(0,l.resolveComponent)("preloader"),s=(0,l.resolveComponent)("DxCheckBox");return(0,l.openBlock)(),(0,l.createElementBlock)("div",dl,[t[0]||(t[0]=(0,l.createElementVNode)("i",{class:"fas fa-bell"},null,-1)),t[1]||(t[1]=(0,l.createTextVNode)(" Privacy Scan Failure Alert ",-1)),n.loading?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0,class:"d-inline-block",size:20,padding:0,message:"none"})):((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:1},[(0,l.createVNode)(s,{id:"privacy-scan-alert-enabled",class:"ml-2","input-attr":{name:"privacy-scan-alert-enabled",id:"privacy-scan-alert-enabled","aria-label":"toggle privacy scan failure alert"},value:n.enabled,disabled:n.saving,onValueChanged:r.onToggle},null,8,["value","disabled","onValueChanged"]),n.error?((0,l.openBlock)(),(0,l.createElementBlock)("div",ul,(0,l.toDisplayString)(n.error),1)):(0,l.createCommentVNode)("",!0)],64))])}
1var pl={components:{DxCheckBox:Yt.K,preloader:B.A},data(){return{loading:!0,saving:!1,enabled:!1,error:""}},async mounted(){await this.loadSettings()},methods:{async loadSettings(){this.loading=!0,this.error="",await w.A.call({action:"get",endpoint:"internal_alert_settings"}).then(e=>{this.enabled=e.data.privacy_scan_failure_alerts_enabled}).catch(e=>{this.error="Failed to load alert setting",this.catchError(e)}),this.loading=!1},async onToggle(e){if(!e.event)return;const t=e.value,a=this.enabled;this.enabled=t,this.saving=!0,this.error="",await w.A.call({action:"patch",endpoint:"internal_alert_settings",params:{privacy_scan_failure_alerts_enabled:t}}).then(()=>{(0,Ua.A)({message:t?"Privacy scan failure alert enabled":"Privacy scan failure alert disabled"},"success",2e3)}).catch(e=>{this.enabled=a,this.error="Failed to update alert setting",this.catchError(e)}),this.saving=!1}}};const hl=(0,xe.A)(pl,[["render",ml],["__scopeId","data-v-62c43eac"]]);var gl=hl;const vl={class:"py-1 px-3"},_l={key:1},Vl={key:0,class:"error mt-1"},yl={id:"btns-row"};function bl(e,t,a,o,n,r){const c=(0,l.resolveComponent)("preloader"),s=(0,l.resolveComponent)("dx-popup");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{onClick:t[3]||(t[3]=e=>n.popupOpen=!0),id:"test-teams-alert-button",name:"test-teams-alert-button","aria-label":"send test teams alert",role:"button",class:"blank-button"},[t[5]||(t[5]=(0,l.createElementVNode)("i",{class:"fas fa-paper-plane"},null,-1)),t[6]||(t[6]=(0,l.createTextVNode)(" Send Test Teams Alert ",-1)),(0,l.createVNode)(s,{height:e.gPopupHeight(240),width:e.gPopupWidth(420),title:"Send Test Teams Alert",visible:n.popupOpen,"onUpdate:visible":t[2]||(t[2]=e=>n.popupOpen=e)},{default:(0,l.withCtx)(()=>[(0,l.createElementVNode)("div",vl,[n.loading?((0,l.openBlock)(),(0,l.createBlock)(c,{key:0})):((0,l.openBlock)(),(0,l.createElementBlock)("div",_l,[t[4]||(t[4]=(0,l.createElementVNode)("p",null," This sends a real test message to the ops Teams channel, to verify the alert pipe is working on this instance. Continue? ",-1)),n.error?((0,l.openBlock)(),(0,l.createElementBlock)("div",Vl,(0,l.toDisplayString)(n.error),1)):(0,l.createCommentVNode)("",!0),(0,l.createElementVNode)("div",yl,[(0,l.createElementVNode)("div",{id:"confirm-send",name:"confirm-send","aria-label":"confirm send",role:"button",class:"yes-b blu-button",onClick:t[0]||(t[0]=(...e)=>r.sendTestAlert&&r.sendTestAlert(...e))}," Send "),(0,l.createElementVNode)("div",{id:"cancel-send",name:"cancel-send","aria-label":"cancel send",role:"button",class:"cancel-b blu-button",onClick:t[1]||(t[1]=e=>n.popupOpen=!1)}," Cancel ")])]))])],void 0,!0),_:1},8,["height","width","visible"])])}var kl={components:{DxPopup:ta.jF,preloader:B.A},data(){return{popupOpen:!1,loading:!1,error:""}},methods:{async sendTestAlert(){this.loading=!0,this.error="",await w.A.call({action:"post",endpoint:"test_teams_alert"}).then(e=>{(0,Ua.A)({message:e.data.detail||"Test alert sent."},"success",3e3),this.popupOpen=!1}).catch(e=>{this.error=e.response&&e.response.data&&e.response.data.detail||"Failed to send test alert",this.catchError(e)}),this.loading=!1}}};const fl=(0,xe.A)(kl,[["render",bl],["__scopeId","data-v-b9150bb2"]]);var Nl=fl,El={components:{card:r.A,accounts:ma,downLoadRulesButton:va,importRulesButton:Ca,exportAdminUsageCsv:Ma,sudoerPassReset:il,privacyScanAlertToggle:gl,sendTestTeamsAlert:Nl}};const xl=(0,xe.A)(El,[["render",n],["__scopeId","data-v-7c9a103a"]]);var Cl=xl},79321:function(e){e.exports=JSON.parse('[{"label":"Full Scans","model":"targets.Scan","type":"full_scan","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Security Scans","model":"targets.Scan","type":"security_scan","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Privacy Scans","model":"targets.Scan","type":"privacy_scan","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Privacy Policy Analysis","model":"prism_analysis.PrismAnalysis","type":"generic","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false}
1,{"label":"Clients","model":"targets.Target","type":"client","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Defensive Monitoring Targets","model":"targets.Target","type":"continuous","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Compliance Customers","model":"targets.Target","type":"compliance_customer","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Vendors","model":"targets.Target","type":"vendor","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Detailed Cyber & Privacy Risk Report","model":"targets.Report","type":"default_scan_report","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Risk Snapshot Report","model":"targets.Report","type":"concise_scan_report","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Privacy Risk Report","model":"targets.Report","type":"privacy_only_report","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Subjectivity Report","model":"targets.Report","type":"concise_subjectivity_report","is_absolute_count":false,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Maximum Admin Users","model":"account.AccountUser","type":"admin","is_absolute_count":true,"credits":0,"refill_amount":0,"roll_over":false},{"label":"Maximum Base Users","model":"account.AccountUser","type":"user","is_absolute_count":true,"credits":0,"refill_amount":0,"roll_over":false}]')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.