Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/Program Files/Avast Software/Avast/gui_resources/1.0.663/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files/Avast Software/Avast/gui_resources/1.0.663/Dashboard.js
//{"name":"Dashboard","version":"1.2.793","created":"2021-09-06T10:41:40.908Z"}
import{moduleManager as t,serviceRequest as n,eventer as e,onlineChecker as s,debugMode as i,napiTracker as o}from"./napi.js";import{stringUtils as r,logger as c}from"./libs.js";import{napiUtils as a,productModel as l,ipmService as d,settingsService as u,utils as p}from"./napiExtensions.js";import{nls as f,moment as m}from"./i18n.js";import{externalLinks as h}from"./plugins.js";function g(){}function _(t){return t()}function b(){return Object.create(null)}function $(t){t.forEach(_)}function y(t){return"function"==typeof t}function v(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}function x(t,...n){if(null==t)return g;const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function S(t,n,e){t.$$.on_destroy.push(x(n,e))}function w(t,n,e,s){if(t){const i=k(t,n,e,s);return t[0](i)}}function k(t,n,e,s){return t[1]&&s?function(t,n){for(const e in n)t[e]=n[e];return t}(e.ctx.slice(),t[1](s(n))):e.ctx}function I(t,n,e,s,i,o,r){const c=function(t,n,e,s){if(t[2]&&s){const i=t[2](s(e));if(void 0===n.dirty)return i;if("object"==typeof i){const t=[],e=Math.max(n.dirty.length,i.length);for(let s=0;s<e;s+=1)t[s]=n.dirty[s]|i[s];return t}return n.dirty|i}return n.dirty}(n,s,i,o);if(c){const i=k(n,e,s,r);t.p(i,c)}}function C(t,n){t.appendChild(n)}function z(t,n,e){t.insertBefore(n,e||null)}function E(t){t.parentNode.removeChild(t)}function P(t){return document.createElement(t)}function j(t){return document.createTextNode(t)}function N(){return j(" ")}function T(){return j("")}function L(t,n,e,s){return t.addEventListener(n,e,s),()=>t.removeEventListener(n,e,s)}function A(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function M(t,n,e){n in t?t[n]=e:A(t,n,e)}function O(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function F(t,n,e,s){t.style.setProperty(n,e,s?"important":"")}function D(t,n,e){t.classList[e?"add":"remove"](n)}class H{constructor(t=null){this.a=t,this.e=this.n=null}m(t,n,e=null){this.e||(this.e=P(n.nodeName),this.t=n,this.h(t)),this.i(e)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)z(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(E)}}let B;function W(t){B=t}function G(){if(!B)throw new Error("Function called outside component initialization");return B}function U(t){G().$$.on_mount.push(t)}function R(t){G().$$.on_destroy.push(t)}function Y(){const t=G();return(n,e)=>{const s=t.$$.callbacks[n];if(s){const i=function(t,n){const e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,n),e}(n,e);s.slice().forEach((n=>{n.call(t,i)}))}}}const V=[],q=[],Z=[],J=[],K=Promise.resolve();let Q=!1;function X(t){Z.push(t)}let tt=!1;const nt=new Set;function et(){if(!tt){tt=!0;do{for(let t=0;t<V.length;t+=1){const n=V[t];W(n),st(n.$$)}for(W(null),V.length=0;q.length;)q.pop()();for(let t=0;t<Z.length;t+=1){const n=Z[t];nt.has(n)||(nt.add(n),n())}Z.length=0}while(V.length);for(;J.length;)J.pop()();Q=!1,tt=!1,nt.clear()}}function st(t){if(null!==t.fragment){t.update(),$(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(X)}}const it=new Set;let ot;function rt(){ot={r:0,c:[],p:ot}}function ct(){ot.r||$(ot.c),ot=ot.p}function at(t,n){t&&t.i&&(it.delete(t),t.i(n))}function lt(t,n,e,s){if(t&&t.o){if(it.has(t))return;it.add(t),ot.c.push((()=>{it.delete(t),s&&(e&&t.d(1),s())})),t.o(n)}}function dt(t){t&&t.c()}function ut(t,n,e,s){const{fragment:i,on_mount:o,on_destroy:r,after_update:c}=t.$$;i&&i.m(n,e),s||X((()=>{const n=o.map(_).filter(y);r?r.push(...n):$(n),t.$$.on_mount=[]})),c.forEach(X)}function pt(t,n){const e=t.$$;null!==e.fragment&&($(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function ft(t,n){-1===t.$$.dirty[0]&&(V.push(t),Q||(Q=!0,K.then(et)),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<<n%31}function mt(t,n,e,s,i,o,r=[-1]){const c=B;W(t);const a=t.$$={fragment:null,ctx:null,props:o,update:g,not_equal:i,bound:b(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(c?c.$$.context:[]),callbacks:b(),dirty:r,skip_bound:!1};let l=!1;if(a.ctx=e?e(t,n.props||{},((n,e,...s)=>{const o=s.length?s[0]:e;return a.ctx&&i(a.ctx[n],a.ctx[n]=o)&&(!a.skip_bound&&a.bound[n]&&a.bound[n](o),l&&ft(t,n)),e})):[],a.update(),l=!0,$(a.before_update),a.fragment=!!s&&s(a.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);a.fragment&&a.fragment.l(t),t.forEach(E)}else a.fragment&&a.fragment.c();n.intro&&at(t.$$.fragment),ut(t,n.target,n.anchor,n.customElement),et()}W(c)}class ht{$destroy(){pt(this,1),this.$destroy=g}$on(t,n){const e=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return e.push(n),()=>{const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function gt(t,n){void 0===n&&(n={});var e=n.insertAt;if(t&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===e&&s.firstChild?s.insertBefore(i,s.firstChild):s.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}gt(".dsh .dsh_status__state {\n  white-space: nowrap;\n}\n.dsh .dsh_status__progress {\n  display: inline-block;\n  vertical-align: middle;\n  width: 20rem;\n  margin: 0 1rem;\n}\n.dsh .dsh_status__cta {\n  position: relative;\n  display: flex;\n  justify-items: center;\n  align-items: center;\n}\n.dsh .dsh_status__cta.-fixing > *,\n.dsh .dsh_status__cta.-fixing > kin-button,\n.dsh .dsh_status__cta.-fixing > kin-dropdown {\n  visibility: hidden;\n}\n.dsh .dsh_status__title span {\n  color: var(--color-text);\n  font-weight: var(--font-weight-h1);\n}\n.dsh .dsh_status__fixing {\n  visibility: visible !important;\n  color: var(--color-text-secondary);\n  font-size: var(--font-size-small);\n  position: absolute;\n  text-align: center;\n  width: 100%;\n}\n");function _t(t){let n,e;const s=t[1].default,i=w(s,t,t[0],null);return{c(){n=P("div"),i&&i.c(),A(n,"class","dsh slants")},m(t,s){z(t,n,s),i&&i.m(n,null),e=!0},p(t,[n]){i&&i.p&&1&n&&I(i,s,t,t[0],n,null,null)},i(t){e||(at(i,t),e=!0)},o(t){lt(i,t),e=!1},d(t){t&&E(n),i&&i.d(t)}}}function bt(t,n,e){let{$$slots:s={},$$scope:i}=n;return t.$$set=t=>{"$$scope"in t&&e(0,i=t.$$scope)},[i,s]}gt(".dsh {\n  display: flex;\n  align-items: stretch;\n  justify-content: stretch;\n  flex-direction: column;\n  height: 100%;\n  overflow: auto;\n  max-height: 100%;\n}\n.dsh .dsh_status {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  flex-grow: 1;\n  padding: 15vh 10% 2rem;\n  text-align: center;\n}\n.dsh .dsh_status__title {\n  margin: 1.5rem 0;\n}\n.dsh .dsh_status__cta {\n  margin-top: 2rem;\n  justify-content: center;\n}\n.dsh .dsh_status__desc {\n  max-width: 60rem;\n}\n.dsh .dsh_banner {\n  width: 100%;\n  height: 128px;\n  flex-shrink: 0;\n  position: relative;\n  z-index: 0;\n}\n");class $t extends ht{constructor(t){super(),mt(this,t,bt,_t,v,{})}}const yt=[];function vt(t,n){return{subscribe:xt(t,n).subscribe}}function xt(t,n=g){let e;const s=[];function i(n){if(v(t,n)&&(t=n,e)){const n=!yt.length;for(let e=0;e<s.length;e+=1){const n=s[e];n[1](),yt.push(n,t)}if(n){for(let t=0;t<yt.length;t+=2)yt[t][0](yt[t+1]);yt.length=0}}}return{set:i,update:function(n){i(n(t))},subscribe:function(o,r=g){const c=[o,r];return s.push(c),1===s.length&&(e=n(i)||g),o(t),()=>{const t=s.indexOf(c);-1!==t&&s.splice(t,1),0===s.length&&(e(),e=null)}}}}function St(t,n,e){const s=!Array.isArray(t),i=s?[t]:t,o=n.length<2;return vt(e,(t=>{let e=!1;const r=[];let c=0,a=g;const l=()=>{if(c)return;a();const e=n(s?r[0]:r,t);o?t(e):a=y(e)?e:g},d=i.map(((t,n)=>x(t,(t=>{r[n]=t,c&=~(1<<n),e&&l()}),(()=>{c|=1<<n}))));return e=!0,l(),function(){$(d),a()}}))}const wt=["behavshield_off","fsshield_off","mailshield_off","webshield_off","antiexploit_off","arpot_off","antiransomwareshield_off","webcamshield_off","datascan_off","securedns_off","remote_access_shield_off","browserprotection_shield_off"],kt={behavshield_off:"shields.behavior",fsshield_off:"shields.file",mailshield_off:"shields.email",webshield_off:"shields.web",arpot_off:"shields.antiRootkit",antiexploit_off:"scans.antiExploit",antiransomwareshield_off:"antiransomware",webcamshield_off:"webcamshield",datascan_off:"sensitivedata",securedns_off:"secureDNS",remote_access_shield_off:"remoteAccessShield",browserprotection_shield_off:"passwordProtection"},It={id:"some_shields_off",priority:6,severity:1,ignorable:!0,ignored:!1,shields:[]},Ct=["full","folder","quick","media","custom","chest","smartScan","menu"],zt="30days",Et=t=>{const n=[],e=Object.keys(t).some((t=>a.isExtendedPassiveModeIssue(t)));for(const s in t)if(t[s]){if(t[s].id=s,"passive_mode"===s&&e)continue;n.push(t[s])}return((t=[])=>{const n=[],e=[];if(t.forEach((t=>wt.includes(t.id)&&!t.ignored?e.push(t.id):n.push(t))),e.length>1){const t=Object.assign(It,{shields:e});return n.push(t),n}return t})(n)},Pt=vt(l.isAfbEdition()),jt=vt(l.isBuyBcProblem),Nt=vt(l.isAfbSoho()),Tt=vt(l.isReseller()),Lt=xt(l.getStatus()),At=xt(!1),Mt=St(Lt,(t=>"green"===t?"ok":"yellow"===t?"attention":"red"===t||"service_unreachable"===t?"critical":"white")),Ot=xt(l.getNotifications()),Ft=xt(l.getState().issues);St(Ft,(t=>Object.entries(t||[]).filter((([t,n])=>n.ignored)).map((([t,n])=>(n._id=t,n))).sort(((t,n)=>Math.sign(t.priority-n.priority)))));const Dt=xt(!1),Ht=xt(!1),Bt=xt(!1),Wt=St(Ft,(t=>{let n=[];return t?(n=Et(t),n.filter((t=>!t.ignored&&t.priority>-1)).sort(((t,n)=>t.priority-n.priority))):n}));St(Wt,(t=>t.some((t=>"shields_off"===t.id)))),St(Wt,(t=>t.some((t=>"service_off"===t.id)))),St(Wt,(t=>t.some((t=>t.id.startsWith("passive_mode")))));const Gt=xt([]),Ut=St([Wt,Gt],(([t,n])=>t.concat(n).sort(((t,n)=>t.priority-n.priority)))),Rt=xt(0);let Yt;St([Ut,Rt],(([t,n])=>function(t,n=0){return t.slice(n,t.length).concat(t.slice(0,n))}(t,n).slice(0,3).reverse())),St([Ut,Rt],(([t,n])=>`${n+1} / ${t.length}`)),At.subscribe((t=>Yt=t));const Vt=l.getProduct(),qt="omni"===Vt,Zt=t=>"expiring"===t?nn("title"):t&&"undefined"!==t?f(`dashboard.problems.${t}`):null,Jt=(t,n=null)=>"some_shields_off"===t?Kt(t,n):"expiring"===t?nn("desc"):"subscription_paid_expired"===t&&qt?tn("desc"):t&&"undefined"!==t?f(`dashboard.problems.${t}.desc`):null,Kt=(t,n)=>{const e=[...n],s=Qt(e.pop()),i=e.map((t=>Qt(t))).join(", ");return f(`dashboard.problems.${t}.desc`,i,s)},Qt=t=>f(`${kt[t]}`),Xt=t=>"expiring"===t?nn("action"):"subscription_paid_expired"===t&&qt?tn("action"):t&&"undefined"!==t?f(`dashboard.problems.${t}.action`):null,tn=t=>{let n="";switch(t){case"desc":n=Yt?"":f("dashboard.problems.subscription_paid_expired.omni.desc");break;case"action":n=f("dashboard.problems.subscription_paid_expired.omni.action")}return n},nn=t=>{let n="";const e=l.getExpiration(),s=l.isTrial(),i=f(a.getProductStringId()),o="pro_av"===Vt;switch(t){case"title":n=f(s?"dashboard.problems.expiring.trial":"dashboard.problems.expiring",e);break;case"desc":n=o?f(s?"dashboard.problems.expiring.trial.pro.desc":"dashboard.problems.expiring.pro.desc",i):qt?f("dashboard.problems.expiring.omni.desc"):f(s?"dashboard.problems.expiring.trial.desc":"dashboard.problems.expiring.desc",i);break;case"action":n=f(s?"dashboard.problems.expiring.trial.action":"dashboard.problems.expiring.action")}return n},en=t=>"custom"===t.type?f("dashboard.scan.running.desc",t.label):f("dashboard.scan.running.desc",f(`scans.scanType.${t.type}`)),sn=t=>"custom"===t.type?f("dashboard.scan.finished.desc",t.label):f("dashboard.scan.finished.desc",f(`scans.scanType.${t.type}`)),on=t=>f("dashboard.progress",t);function rn(t){let n,e,s,i,o,r,c,a=sn(t[1])+"",l=f("scans.seeResults")+"";return{c(){n=P("div"),e=j(a),s=N(),i=P("div"),o=P("kin-button"),r=j(l),A(n,"class","dsh_status__desc"),M(o,"size",t[0]),M(o,"link",c=t[4](t[1])),A(i,"class","dsh_status__cta")},m(t,c){z(t,n,c),C(n,e),z(t,s,c),z(t,i,c),C(i,o),C(o,r)},p(t,n){2&n&&a!==(a=sn(t[1])+"")&&O(e,a),1&n&&M(o,"size",t[0]),2&n&&c!==(c=t[4](t[1]))&&M(o,"link",c)},d(t){t&&E(n),t&&E(s),t&&E(i)}}}function cn(t){let n,e,s,i,o,r,c,a,l,d,u,p=en(t[2])+"",m=f("global.showDetails")+"",h=t[3]>=0&&an(t);return{c(){n=P("div"),e=j(p),s=N(),i=P("span"),o=P("kin-progress"),r=N(),h&&h.c(),c=N(),a=P("div"),l=P("kin-button"),d=j(m),M(o,"percentage",t[3]),M(o,"small","true"),M(o,"class","dsh_status__progress"),A(i,"class","dsh_status__state"),A(n,"class","dsh_status__desc"),M(l,"size",t[0]),M(l,"link",u=t[4](t[2])),A(a,"class","dsh_status__cta")},m(t,u){z(t,n,u),C(n,e),C(n,s),C(n,i),C(i,o),C(i,r),h&&h.m(i,null),z(t,c,u),z(t,a,u),C(a,l),C(l,d)},p(t,n){4&n&&p!==(p=en(t[2])+"")&&O(e,p),8&n&&M(o,"percentage",t[3]),t[3]>=0?h?h.p(t,n):(h=an(t),h.c(),h.m(i,null)):h&&(h.d(1),h=null),1&n&&M(l,"size",t[0]),4&n&&u!==(u=t[4](t[2]))&&M(l,"link",u)},d(t){t&&E(n),h&&h.d(),t&&E(c),t&&E(a)}}}function an(t){let n,e=on(t[3])+"";return{c(){n=P("span"),A(n,"dir","ltr")},m(t,s){z(t,n,s),n.innerHTML=e},p(t,s){8&s&&e!==(e=on(t[3])+"")&&(n.innerHTML=e)},d(t){t&&E(n)}}}function ln(t){let n,e=Ht&&function(t){let n;function e(t,n){return t[2]?cn:t[1]?rn:void 0}let s=e(t),i=s&&s(t);return{c(){i&&i.c(),n=T()},m(t,e){i&&i.m(t,e),z(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i&&i.d(1),i=s&&s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i&&i.d(t),t&&E(n)}}}(t);return{c(){e&&e.c(),n=T()},m(t,s){e&&e.m(t,s),z(t,n,s)},p(t,[n]){Ht&&e.p(t,n)},i:g,o:g,d(t){e&&e.d(t),t&&E(n)}}}function dn(e,s,i){let o,{buttonSize:r="large"}=s,c=[],a=null,l=null,d=null,u=[],p=[],f=-1,m=null;U((()=>{b(),t.importModule("Scans","serviceProxy").then((t=>(l=t,l.getScans()))).then((t=>{u=t.filter((t=>Ct.includes(t.type))).map((t=>t.id)),h(),g()}))}));const h=()=>{u.forEach((t=>{c.push(l.on("running."+t,(()=>{g()})))})),c.push(l.on("running.smartScan",(()=>{g()})))},g=()=>{l.getRunningScans().then((t=>{i(5,p=t.filter((t=>Ct.includes(t.type))))}))};function _(){d&&d.stopPolling(),d=null,a&&clearInterval(a),a=null}function b(){d&&_(),c.forEach((t=>{t()})),c=[]}return R((()=>{b()})),e.$$set=t=>{"buttonSize"in t&&i(0,r=t.buttonSize)},e.$$.update=()=>{32&e.$$.dirty&&i(2,o=0!==p.lenght?p[0]:null),38&e.$$.dirty&&(o?(Ht.set(!0),i(1,m=o),!o||"smartScan"!==o.type&&"SmartScan"!==o.job?l.getScan(o.id).then((t=>{d=t,c.push(d.on("change",(t=>{t.progress&&i(3,f=t.progress)}))),d.getStatus().then((t=>{d.startPolling()}))})):(i(3,f=-1),a||(a=setInterval((()=>{n("app.smartScan.GetStatus").then((t=>{"scan_report"!==t.statusPrimary&&"ready"!==t.statusPrimary||(clearInterval(a),g())}))}),1e3)))):(Ht.set(m&&0===p.length),_(),i(3,f=-1)))},[r,m,o,f,t=>"smartScan"===t.type||"SmartScan"===t.job?"#SmartScan":"#Scans/scan/"+t.id,p]}class un extends ht{constructor(t){super(),mt(this,t,dn,ln,v,{buttonSize:0})}}const pn=()=>{const t=l.getStatus(),n=l.getNotifications(),e=l.getState().issues;Lt.set(t),Ot.set(n),Ft.set(e)},fn=t=>("all"===t.id&&console.error('Issue "all" is no longer supported, specify proper issue ID.'),"some_shields_off"===t.id?mn("FixIssue",t):hn("FixIssue",t.id)),mn=(t,e,s)=>{const{shields:i}=e;Dt.set("all");const o=i.map((e=>{const i=e?{issueId:e}:void 0;return"boolean"==typeof s&&(i.ignore=s),n("app.avService."+t,i)}));Promise.all(o).then((()=>n("app.settings.ApplySettings"))).then((()=>l.update())).then((()=>{pn()})).catch((()=>{l.update().then((()=>{pn()}))})).then((()=>{Dt.set(!1)}))},hn=(t,e,s)=>{Dt.set(e);const i=e?{issueId:e}:void 0;return"boolean"==typeof s&&(i.ignore=s),n("app.avService."+t,i).then((()=>n("app.settings.ApplySettings"))).then((()=>l.update())).then((()=>{pn()})).catch((()=>{l.update().then((()=>{pn()}))})).then((()=>{e.startsWith("passive_mode")?n("app.passivemode.GetStatus").then((t=>{t&&t.changeInProgress||Dt.set(!1)})):Dt.set(!1)}))},gn=t=>({}),_n=t=>({}),bn=t=>({}),$n=t=>({}),yn=t=>({problem:64&t}),vn=t=>({problem:t[6]});function xn(t){let n,e,s=Zt(t[6].id)+"";return{c(){e=T(),n=new H(e)},m(t,i){n.m(s,t,i),z(t,e,i)},p(t,e){64&e&&s!==(s=Zt(t[6].id)+"")&&n.p(s)},d(t){t&&E(e),t&&n.d()}}}function Sn(t){let n,e,s=f(t[4])+"";return{c(){e=T(),n=new H(e)},m(t,i){n.m(s,t,i),z(t,e,i)},p(t,e){16&e&&s!==(s=f(t[4])+"")&&n.p(s)},d(t){t&&E(e),t&&n.d()}}}function wn(t){let n,e,s,i,o;n=new un({props:{buttonSize:t[1]}});let r=!t[13]&&Cn(t),c=!t[13]&&!t[15]&&zn(t);return{c(){dt(n.$$.fragment),e=N(),r&&r.c(),s=N(),c&&c.c(),i=T()},m(t,a){ut(n,t,a),z(t,e,a),r&&r.m(t,a),z(t,s,a),c&&c.m(t,a),z(t,i,a),o=!0},p(t,e){const o={};2&e&&(o.buttonSize=t[1]),n.$set(o),t[13]?r&&(rt(),lt(r,1,1,(()=>{r=null})),ct()):r?(r.p(t,e),8192&e&&at(r,1)):(r=Cn(t),r.c(),at(r,1),r.m(s.parentNode,s)),t[13]||t[15]?c&&(rt(),lt(c,1,1,(()=>{c=null})),ct()):c?(c.p(t,e),40960&e&&at(c,1)):(c=zn(t),c.c(),at(c,1),c.m(i.parentNode,i))},i(t){o||(at(n.$$.fragment,t),at(r),at(c),o=!0)},o(t){lt(n.$$.fragment,t),lt(r),lt(c),o=!1},d(t){pt(n,t),t&&E(e),r&&r.d(t),t&&E(s),c&&c.d(t),t&&E(i)}}}function kn(t){let n,e,s,i,o,r,c,a,l;function d(t,n){return"some_shields_off"===t[6].id?Pn:En}let u=d(t),p=u(t);const f=[Tn,Nn,jn],m=[];function h(t,n){return t[14]?0:t[10]?t[10]&&t[7].length>1?2:-1:1}~(i=h(t))&&(o=m[i]=f[i](t));let g=t[2]&&(!0===t[6].ignorable||t[7].length>1)&&!t[10]&&Ln(t),_=t[11]&&On();return{c(){n=P("p"),p.c(),e=N(),s=P("div"),o&&o.c(),r=N(),g&&g.c(),c=N(),_&&_.c(),A(n,"class","dsh_status__desc"),A(s,"class",a="dsh_status__cta "+(t[11]?"-fixing":""))},m(t,o){z(t,n,o),p.m(n,null),z(t,e,o),z(t,s,o),~i&&m[i].m(s,null),C(s,r),g&&g.m(s,null),C(s,c),_&&_.m(s,null),l=!0},p(t,e){u===(u=d(t))&&p?p.p(t,e):(p.d(1),p=u(t),p&&(p.c(),p.m(n,null)));let b=i;i=h(t),i===b?~i&&m[i].p(t,e):(o&&(rt(),lt(m[b],1,1,(()=>{m[b]=null})),ct()),~i?(o=m[i],o?o.p(t,e):(o=m[i]=f[i](t),o.c()),at(o,1),o.m(s,r)):o=null),t[2]&&(!0===t[6].ignorable||t[7].length>1)&&!t[10]?g?g.p(t,e):(g=Ln(t),g.c(),g.m(s,c)):g&&(g.d(1),g=null),t[11]?_?_.p(t,e):(_=On(),_.c(),_.m(s,null)):_&&(_.d(1),_=null),(!l||2048&e&&a!==(a="dsh_status__cta "+(t[11]?"-fixing":"")))&&A(s,"class",a)},i(t){l||(at(o),l=!0)},o(t){lt(o),l=!1},d(t){t&&E(n),p.d(),t&&E(e),t&&E(s),~i&&m[i].d(),g&&g.d(),_&&_.d()}}}function In(t){let n,e,s,i,o,r,c,a,l=f("dashboard.finishingInstallation")+"";return{c(){n=P("div"),e=j(l),s=N(),i=P("kin-progress"),o=N(),r=P("span"),c=j(t[5]),a=j("%"),M(i,"percentage",t[5]),M(i,"small","true"),M(i,"class","dsh_status__progress"),A(r,"dir","ltr"),A(n,"class","dsh_status__desc")},m(t,l){z(t,n,l),C(n,e),C(n,s),C(n,i),C(n,o),C(n,r),C(r,c),C(r,a)},p(t,n){32&n&&M(i,"percentage",t[5]),32&n&&O(c,t[5])},i:g,o:g,d(t){t&&E(n)}}}function Cn(t){let n;const e=t[20].Installation,s=w(e,t,t[19],$n);return{c(){s&&s.c()},m(t,e){s&&s.m(t,e),n=!0},p(t,n){s&&s.p&&524288&n&&I(s,e,t,t[19],n,bn,$n)},i(t){n||(at(s,t),n=!0)},o(t){lt(s,t),n=!1},d(t){s&&s.d(t)}}}function zn(t){let n;const e=t[20].SmartScan,s=w(e,t,t[19],_n);return{c(){s&&s.c()},m(t,e){s&&s.m(t,e),n=!0},p(t,n){s&&s.p&&524288&n&&I(s,e,t,t[19],n,gn,_n)},i(t){n||(at(s,t),n=!0)},o(t){lt(s,t),n=!1},d(t){s&&s.d(t)}}}function En(t){let n,e=Jt(t[6].id)+"";return{c(){n=j(e)},m(t,e){z(t,n,e)},p(t,s){64&s&&e!==(e=Jt(t[6].id)+"")&&O(n,e)},d(t){t&&E(n)}}}function Pn(t){let n,e=Kt(t[6].id,t[6].shields)+"";return{c(){n=j(e)},m(t,e){z(t,n,e)},p(t,s){64&s&&e!==(e=Kt(t[6].id,t[6].shields)+"")&&O(n,e)},d(t){t&&E(n)}}}function jn(t){let n,e,s=f("dashboard.viewAllIssues")+"";return{c(){n=P("kin-button"),e=j(s),M(n,"type","secondary"),M(n,"link","#Notifications"),M(n,"size",t[1]),M(n,"title",f("dashboard.viewAllIssues"))},m(t,s){z(t,n,s),C(n,e)},p(t,e){2&e&&M(n,"size",t[1])},i:g,o:g,d(t){t&&E(n)}}}function Nn(t){let n,e,s,i,o,c=Xt(t[6].id)+"";return{c(){n=P("kin-button"),e=j(c),M(n,"type",t[0]),M(n,"size",t[1]),M(n,"title",s=r.stripHtml(Zt(t[6].id))+" - "+Xt(t[6].id))},m(s,r){z(s,n,r),C(n,e),i||(o=L(n,"click",t[21]),i=!0)},p(t,i){64&i&&c!==(c=Xt(t[6].id)+"")&&O(e,c),1&i&&M(n,"type",t[0]),2&i&&M(n,"size",t[1]),64&i&&s!==(s=r.stripHtml(Zt(t[6].id))+" - "+Xt(t[6].id))&&M(n,"title",s)},i:g,o:g,d(t){t&&E(n),i=!1,o()}}}function Tn(t){let n;const e=t[20].SMB,s=w(e,t,t[19],vn);return{c(){s&&s.c()},m(t,e){s&&s.m(t,e),n=!0},p(t,n){s&&s.p&&524352&n&&I(s,e,t,t[19],n,yn,vn)},i(t){n||(at(s,t),n=!0)},o(t){lt(s,t),n=!1},d(t){s&&s.d(t)}}}function Ln(t){let n,e,s,i,o,r,c,a=!0===t[6].ignorable&&An(t),l=t[7].length>1&&Mn();return{c(){n=P("kin-dropdown"),e=P("div"),s=P("kin-button"),i=P("kin-icon"),o=N(),r=P("div"),a&&a.c(),c=N(),l&&l.c(),M(i,"name","icon-s-controls-menu-more"),M(i,"size","16"),M(s,"type","secondary"),M(s,"icononly","true"),M(s,"size",t[1]),M(s,"title",f("global.showMoreActions")),A(e,"slot","dropdown-activator"),M(n,"class","g-margin-left--10")},m(t,d){z(t,n,d),C(n,e),C(e,s),C(s,i),C(n,o),C(n,r),a&&a.m(r,null),C(r,c),l&&l.m(r,null)},p(t,n){2&n&&M(s,"size",t[1]),!0===t[6].ignorable?a?a.p(t,n):(a=An(t),a.c(),a.m(r,c)):a&&(a.d(1),a=null),t[7].length>1?l?l.p(t,n):(l=Mn(),l.c(),l.m(r,null)):l&&(l.d(1),l=null)},d(t){t&&E(n),a&&a.d(),l&&l.d()}}}function An(t){let n,e,s;return{c(){n=P("kin-dropdown-item"),n.textContent=`${f("dashboard.ignore")}`},m(i,o){z(i,n,o),e||(s=L(n,"click",t[22]),e=!0)},p:g,d(t){t&&E(n),e=!1,s()}}}function Mn(t){let n;return{c(){n=P("kin-dropdown-item"),n.textContent=`${f("dashboard.viewAllIssues")}`,M(n,"link","#Notifications")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function On(t){let n,e,s,i;return{c(){n=P("div"),e=P("p"),e.textContent=`${f("global.fixing")}`,s=N(),i=P("kin-progress"),A(e,"class","g-margin-bottom--5"),M(i,"percentage","-1"),M(i,"small","true"),A(n,"class","dsh_status__fixing")},m(t,o){z(t,n,o),C(n,e),C(n,s),C(n,i)},p:g,d(t){t&&E(n)}}}function Fn(t){let n,e,s,i,o,r,c,a,l,d,u;function p(t,n){return 0===t[7].length?Sn:xn}let f=p(t),m=f(t);const h=[In,kn,wn],g=[];function _(t,n){return t[9]?0:t[7].length>0&&t[6]?1:t[14]||0!==t[7].length?-1:2}return~(a=_(t))&&(l=g[a]=h[a](t)),{c(){n=P("div"),e=P("kin-icon"),i=N(),o=P("h1"),m.c(),c=N(),l&&l.c(),M(e,"name",s="circle-"+t[12]),M(e,"size",t[3]),M(e,"class","dsh_status__icon"),A(o,"class",r="dsh_status__title "+(0!==t[7].length||t[9]||t[13]?"":"-solo")+" h1 color-"+t[12]+" -text"),A(n,"class","dsh_status"),A(n,"data-test",d=`dashboard-status_${t[8]}`)},m(t,s){z(t,n,s),C(n,e),C(n,i),C(n,o),m.m(o,null),C(n,c),~a&&g[a].m(n,null),u=!0},p(t,[i]){(!u||4096&i&&s!==(s="circle-"+t[12]))&&M(e,"name",s),(!u||8&i)&&M(e,"size",t[3]),f===(f=p(t))&&m?m.p(t,i):(m.d(1),m=f(t),m&&(m.c(),m.m(o,null))),(!u||12928&i&&r!==(r="dsh_status__title "+(0!==t[7].length||t[9]||t[13]?"":"-solo")+" h1 color-"+t[12]+" -text"))&&A(o,"class",r);let c=a;a=_(t),a===c?~a&&g[a].p(t,i):(l&&(rt(),lt(g[c],1,1,(()=>{g[c]=null})),ct()),~a?(l=g[a],l?l.p(t,i):(l=g[a]=h[a](t),l.c()),at(l,1),l.m(n,null)):l=null),(!u||256&i&&d!==(d=`dashboard-status_${t[8]}`))&&A(n,"data-test",d)},i(t){u||(at(l),u=!0)},o(t){lt(l),u=!1},d(t){t&&E(n),m.d(),~a&&g[a].d()}}}function Dn(t,s,i){let o,r,c,a,d,u,p,f,m,h,g,_;S(t,Wt,(t=>i(7,u=t))),S(t,At,(t=>i(17,p=t))),S(t,Dt,(t=>i(18,f=t))),S(t,Mt,(t=>i(12,m=t))),S(t,Ht,(t=>i(13,h=t))),S(t,Pt,(t=>i(14,g=t))),S(t,Bt,(t=>i(15,_=t)));let{$$slots:b={},$$scope:$}=s,{problemId:y=0}=s,{buttonSeverity:v=""}=s,{buttonSize:x="large"}=s,{hasSecondaryAction:w=!0}=s,{iconSize:k="100"}=s,{nlsProductLicense:I="dashboard.status.green"}=s,C=null,z=[];function E(){z.forEach((t=>{t()})),z=[]}U((()=>{E(),"omni"===l.getProduct()?n("app.ring.stateInfo").then((t=>{At.set(["CHILD_PAIRING","CHILD_FINISHED"].includes(t.state))})).catch((()=>{At.set(!1)})):At.set(!1),l.update().then((()=>{pn()})),z.push(e.on("product.change.state",(()=>{l.update().then((()=>{pn()}))}))),z.push(e.on("setup.onStatusChanged.secondPhaseInstallationProgress",(t=>{i(5,C=t)})))})),R((()=>{E()}));return t.$$set=t=>{"problemId"in t&&i(16,y=t.problemId),"buttonSeverity"in t&&i(0,v=t.buttonSeverity),"buttonSize"in t&&i(1,x=t.buttonSize),"hasSecondaryAction"in t&&i(2,w=t.hasSecondaryAction),"iconSize"in t&&i(3,k=t.iconSize),"nlsProductLicense"in t&&i(4,I=t.nlsProductLicense),"$$scope"in t&&i(19,$=t.$$scope)},t.$$.update=()=>{65664&t.$$.dirty&&i(6,o=u[y]),192&t.$$.dirty&&i(8,r=0===u.length?"ok":o.id),32&t.$$.dirty&&i(9,c=null!==C&&C>0&&C<100),131136&t.$$.dirty&&i(10,a=o&&("passive_mode_locked"===o.id||p&&("expiring"===o.id||"subscription_paid_expired"===o.id))),262208&t.$$.dirty&&i(11,d=f&&o&&(f===o.id||o.id.startsWith("passive_mode")&&f.startsWith(o.id)))},[v,x,w,k,I,C,o,u,r,c,a,d,m,h,g,_,y,p,f,$,b,()=>fn(o),()=>{return"some_shields_off"===(t=o).id?mn("IgnoreIssue",t,!0):hn("IgnoreIssue",t.id,!0);var t}]}class Hn extends ht{constructor(t){super(),mt(this,t,Dn,Fn,v,{problemId:16,buttonSeverity:0,buttonSize:1,hasSecondaryAction:2,iconSize:3,nlsProductLicense:4})}}function Bn(t){let n,e,s,i,o=Xt(t[0].id)+"";return{c(){n=P("kin-button"),e=j(o),M(n,"size","large")},m(o,r){z(o,n,r),C(n,e),s||(i=L(n,"click",t[4]),s=!0)},p(t,n){1&n&&o!==(o=Xt(t[0].id)+"")&&O(e,o)},d(t){t&&E(n),s=!1,i()}}}function Wn(t){let n,e=Xt("subscription_business_reseller")+"";return{c(){n=j(e)},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Gn(t){let n;function e(t,n){return t[3]?Rn:Un}let s=e(t),i=s(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),z(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&E(n)}}}function Un(t){let n,e=Xt("subscription_business")+"";return{c(){n=j(e)},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Rn(t){let n,e=Xt("subscription_business_reseller")+"";return{c(){n=j(e)},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Yn(t){let n,e,s;function i(t,s){return(null==n||7&s)&&(n=!(t[1]||!t[2](t[0].id))),n?Gn:((null==e||13&s)&&(e=!(!t[3]||!t[2](t[0].id))),e?Wn:Bn)}let o=i(t,-1),r=o(t);return{c(){r.c(),s=T()},m(t,n){r.m(t,n),z(t,s,n)},p(t,[n]){o===(o=i(t,n))&&r?r.p(t,n):(r.d(1),r=o(t),r&&(r.c(),r.m(s.parentNode,s)))},i:g,o:g,d(t){r.d(t),t&&E(s)}}}function Vn(t,n,e){let s,i,o;S(t,Nt,(t=>e(1,s=t))),S(t,jt,(t=>e(2,i=t))),S(t,Tt,(t=>e(3,o=t)));let{problem:r}=n;return t.$$set=t=>{"problem"in t&&e(0,r=t.problem)},[r,s,i,o,()=>fn(r)]}class qn extends ht{constructor(t){super(),mt(this,t,Vn,Yn,v,{problem:0})}}function Zn(t){let n,e;return{c(){n=P("div"),e=P("kin-button"),e.textContent=`${f("dashboard.runSmartScan")}`,M(e,"size","large"),M(e,"link","#SmartScan"),A(n,"class","dsh_status__cta"),A(n,"id","dashboard-runSmartScan")},m(t,s){z(t,n,s),C(n,e)},p:g,d(t){t&&E(n)}}}function Jn(t){let n,e,s,i;return{c(){n=P("p"),n.textContent=`${sn(t[1])}`,e=N(),s=P("div"),i=P("kin-button"),i.textContent=`${f("scans.seeResults")}`,A(n,"class","dsh_status__desc"),M(i,"size","large"),M(i,"link","#SmartScan"),A(s,"class","dsh_status__cta")},m(t,o){z(t,n,o),z(t,e,o),z(t,s,o),C(s,i)},p:g,d(t){t&&E(n),t&&E(e),t&&E(s)}}}function Kn(t){let n;function e(t,n){return t[0]?Jn:Zn}let s=e(t),i=s(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),z(t,n,e)},p(t,[o]){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},i:g,o:g,d(t){i.d(t),t&&E(n)}}}function Qn(t,e,s){let i=!1;const o={type:"smartScan"};return U((()=>{n("app.smartScan.GetStatus").then((t=>{s(0,i="scan_report"===t.statusPrimary)}))})),[i,o]}class Xn extends ht{constructor(t){super(),mt(this,t,Qn,Kn,v,{})}}var te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ne="object"==typeof te&&te&&te.Object===Object&&te,ee="object"==typeof self&&self&&self.Object===Object&&self;function se(t){let n,e,s,i,o,r,c,a;const l=t[15].default,d=w(l,t,t[14],null);return{c(){n=P("div"),e=P("div"),s=P("iframe"),r=N(),c=P("div"),d&&d.c(),s.src!==(i=t[2])&&A(s,"src",i),A(s,"data-test",o="ipm-elm-"+t[0]),A(s,"title",t[1]),A(e,"class","sve_ipm"),F(e,"display",t[4]?"block":"none"),A(c,"data-slot",""),F(c,"display",t[4]?"none":"block"),A(n,"class","svelte wrap")},m(i,o){z(i,n,o),C(n,e),C(e,s),t[16](s),C(n,r),C(n,c),d&&d.m(c,null),a=!0},p(t,n){(!a||4&n[0]&&s.src!==(i=t[2]))&&A(s,"src",i),(!a||1&n[0]&&o!==(o="ipm-elm-"+t[0]))&&A(s,"data-test",o),(!a||2&n[0])&&A(s,"title",t[1]),(!a||16&n[0])&&F(e,"display",t[4]?"block":"none"),d&&d.p&&16384&n[0]&&I(d,l,t,t[14],n,null,null),(!a||16&n[0])&&F(c,"display",t[4]?"none":"block")},i(t){a||(at(d,t),a=!0)},o(t){lt(d,t),a=!1},d(e){e&&E(n),t[16](null),d&&d.d(e)}}}ne||ee||Function("return this")();const ie=7e3;function oe(t,r,a){let l,p;S(t,s,(t=>a(13,p=t)));let{$$slots:f={},$$scope:m}=r;const h=[0,1,2,3,4,5,10,15,30,60];let{id:g}=r,{opmUrl:_}=r,{title:b}=r,{params:$={}}=r,{condition:y=!0}=r,{timeout:v=ie}=r,{route:x}=r;const w=c.createLogger("component.ipm"),k=Y(),I="true"===localStorage.getItem("automationDisableIpm"),C=[];let z,E,P,j,N,T,L,A=null;function M(){!P&&A&&n("opm.message_shown",{message_id:A})}function O(t){z&&t&&t.data&&("windowLoaded"!==t.data.action||""===t.data.elmId||t.data.elmId!=g&&t.data.placement!=g||(w.info("ipm content loaded"),H(),D(Math.round((performance.now()-N)/1e3)),g==parseInt(g)&&n("app.ipm_tracking.track",{elem_id:parseInt(g),response_time:-1},i.isEnabled()),k("success",g)))}function F(t){if(w.info("updateFrame",{isIframe:z,ipmUrl:E}),a(11,P=null),t&&t.url&&A!==t.msg_id&&(M(),A=t.msg_id),!z)return;let n;H(),n=t&&t.url?Promise.resolve(d.extendUrlWithParams(t.url,$)):_?Promise.resolve(d.extendUrlWithParams(_,$)):d.getUrl(g,$),n.then((t=>{let n;"object"==typeof t?(n=t.url,A=t.msgId):n=t,N=performance.now(),w.info("loading ipm url: "+n),E!==n&&(T=setTimeout((()=>{D("timeout"),B("timeout")}),v),a(2,E=n))})).catch((t=>B(t)))}function D(t){u.getValueCached("avdef://config/GuiCache/TrackIpmLoadTime",!0).then((n=>{n&&o.timing("IPM loading","timeout"===t?66666:t,g,function(t){if("timeout"===t)return"timeout";{const n=h.find((n=>n<=t)),e=h.find((n=>n>t));return e?`${n}-${e}s`:`> ${n}s`}}(t))}))}function H(){T&&clearTimeout(T)}function B(t){console.warn("Ipm component error:",t,"for id:",g),k("error",t)}return U((()=>{F()})),R((()=>{H(),C.forEach((t=>t())),window.removeEventListener("message",O),window.removeEventListener("beforeunload",M)})),window.addEventListener("beforeunload",M,!1),window.addEventListener("message",O,!1),C.push(e.on("ASW_NOTIF_RELOAD_IPM",(()=>F())),e.on("ipm.reload."+g,(t=>F(t)))),t.$$set=t=>{"id"in t&&a(0,g=t.id),"opmUrl"in t&&a(5,_=t.opmUrl),"title"in t&&a(1,b=t.title),"params"in t&&a(6,$=t.params),"condition"in t&&a(7,y=t.condition),"timeout"in t&&a(8,v=t.timeout),"route"in t&&a(9,x=t.route),"$$scope"in t&&a(14,m=t.$$scope)},t.$$.update=()=>{12288&t.$$.dirty[0]&&null!=p&&(p?!1===L&&(w.debug("went online"),F()):(w.debug("went offline"),H(),B("offline")),a(12,L=p)),2176&t.$$.dirty[0]&&a(10,z=!P&&!I&&y),1544&t.$$.dirty[0]&&null!=x&&z&&(w.debug("change of route: "+x),j.contentWindow&&j.contentWindow.postMessage&&j.contentWindow.postMessage("route:"+x,"*")),1028&t.$$.dirty[0]&&a(4,l=z&&E)},[g,b,E,j,l,_,$,y,v,x,z,P,L,p,m,f,function(t){q[t?"unshift":"push"]((()=>{j=t,a(3,j)}))}]}class re extends ht{constructor(t){super(),mt(this,t,oe,se,v,{id:0,opmUrl:5,title:1,params:6,condition:7,timeout:8,route:9},[-1,-1])}}function ce(t){let n,e,s;return e=new re({props:{id:t[0]}}),{c(){n=P("div"),dt(e.$$.fragment),A(n,"class","dsh_banner")},m(t,i){z(t,n,i),ut(e,n,null),s=!0},p(t,[n]){const s={};1&n&&(s.id=t[0]),e.$set(s)},i(t){s||(at(e.$$.fragment,t),s=!0)},o(t){lt(e.$$.fragment,t),s=!1},d(t){t&&E(n),pt(e)}}}function ae(t,n,e){let{id:s=0}=n;return t.$$set=t=>{"id"in t&&e(0,s=t.id)},[s]}class le extends ht{constructor(t){super(),mt(this,t,ae,ce,v,{id:0})}}function de(t){let n,e,s;return e=new qn({props:{problem:t[1]}}),{c(){n=P("div"),dt(e.$$.fragment),A(n,"slot","SMB")},m(t,i){z(t,n,i),ut(e,n,null),s=!0},p(t,n){const s={};2&n&&(s.problem=t[1]),e.$set(s)},i(t){s||(at(e.$$.fragment,t),s=!0)},o(t){lt(e.$$.fragment,t),s=!1},d(t){t&&E(n),pt(e)}}}function ue(t){let n,e,s;return e=new Xn({}),{c(){n=P("div"),dt(e.$$.fragment),A(n,"slot","SmartScan")},m(t,i){z(t,n,i),ut(e,n,null),s=!0},i(t){s||(at(e.$$.fragment,t),s=!0)},o(t){lt(e.$$.fragment,t),s=!1},d(t){t&&E(n),pt(e)}}}function pe(t){let n,e;return n=new le({props:{id:t[0]}}),{c(){dt(n.$$.fragment)},m(t,s){ut(n,t,s),e=!0},p(t,e){const s={};1&e&&(s.id=t[0]),n.$set(s)},i(t){e||(at(n.$$.fragment,t),e=!0)},o(t){lt(n.$$.fragment,t),e=!1},d(t){pt(n,t)}}}function fe(t){let n,e,s,i;n=new Hn({props:{$$slots:{SmartScan:[ue],SMB:[de,({problem:t})=>({1:t}),({problem:t})=>t?2:0]},$$scope:{ctx:t}}});let o=null!=t[0]&&pe(t);return{c(){dt(n.$$.fragment),e=N(),o&&o.c(),s=T()},m(t,r){ut(n,t,r),z(t,e,r),o&&o.m(t,r),z(t,s,r),i=!0},p(t,e){const i={};6&e&&(i.$$scope={dirty:e,ctx:t}),n.$set(i),null!=t[0]?o?(o.p(t,e),1&e&&at(o,1)):(o=pe(t),o.c(),at(o,1),o.m(s.parentNode,s)):o&&(rt(),lt(o,1,1,(()=>{o=null})),ct())},i(t){i||(at(n.$$.fragment,t),at(o),i=!0)},o(t){lt(n.$$.fragment,t),lt(o),i=!1},d(t){pt(n,t),t&&E(e),o&&o.d(t),t&&E(s)}}}function me(t){let n,e;return n=new $t({props:{$$slots:{default:[fe]},$$scope:{ctx:t}}}),{c(){dt(n.$$.fragment)},m(t,s){ut(n,t,s),e=!0},p(t,[e]){const s={};5&e&&(s.$$scope={dirty:e,ctx:t}),n.$set(s)},i(t){e||(at(n.$$.fragment,t),e=!0)},o(t){lt(n.$$.fragment,t),e=!1},d(t){pt(n,t)}}}function he(t,s,i){let o=null;return e.emit("nui.mainLayout.view","menu"),e.emit("nui.mainLayout.circles","landing-page"),U((()=>{n("app.settings.Get","avdef://config/GuiCache/placement_banner_main").then((t=>{i(0,o=t||0)}))})),[o]}gt(".sta {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: stretch;\n  text-align: start;\n  height: 100%;\n}\n.sta .sta_header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  padding: 2vh 0 0;\n}\n.sta .sta_block {\n  display: flex;\n  flex-flow: column;\n  align-items: center;\n  justify-content: start;\n  text-align: center;\n  padding: 3vh 0 1vh;\n}\n.sta .sta_icon {\n  border-radius: 100%;\n  background-color: rgba(255,255,255,0.1);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 3rem;\n  transform: scale(0.7);\n}\n.sta .sta_icon__cont {\n  position: relative;\n  display: inline-block;\n  margin: 0 auto;\n}\n.sta .sta_count {\n  color: var(--color-ok);\n  line-height: 1;\n  text-align: center;\n  font-weight: 700;\n}\n.sta .sta_tip {\n  padding-bottom: 1rem;\n  display: flex;\n  justify-content: flex-start;\n  align-items: center;\n}\n.sta .sta_tip__badge {\n  white-space: nowrap;\n}\n.sta .sta_info {\n  position: absolute;\n  bottom: 1rem;\n  right: 1rem;\n  color: var(--color-text-secondary);\n}\n.sta .sta_tooltip {\n  width: 190px;\n}\n.sta .sta_update {\n  display: flex;\n  flex-direction: row;\n}\n.sta .sta_status-dot {\n  flex-shrink: 0;\n  width: 7px;\n  height: 7px;\n  border-radius: 7px;\n  display: inline-block;\n  vertical-align: middle;\n  position: relative;\n  margin-top: 2px;\n  background-color: var(--color-ok);\n}\n");function ge(t){let n;function e(t,n){return t[2]===zt?Se:xe}let s=e(t),i=s(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),z(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&E(n)}}}function _e(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.scannedSites.info")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function be(t){let n;function e(t,n){return t[2]===zt?ke:we}let s=e(t),i=s(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),z(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&E(n)}}}function $e(t){let n,e,s;return{c(){n=P("p"),n.textContent=`${f("statistics.threats.info")}`,e=N(),s=P("p"),s.textContent=`${f("statistics.threats.info.desc")}`,A(n,"class","p -small"),A(s,"class","p -tiny -secondary g-margin-top--15")},m(t,i){z(t,n,i),z(t,e,i),z(t,s,i)},p:g,d(t){t&&E(n),t&&E(e),t&&E(s)}}}function ye(t){let n,e,s,i,o,r,c,a,d,u,p;return{c(){n=P("p"),n.textContent=`${f("statistics.updates.info")}`,e=N(),s=P("div"),i=P("span"),o=N(),r=P("div"),c=P("p"),c.textContent=`${f("statistics.updates.info.virus")}`,a=N(),d=P("p"),d.textContent=`${f("statistics.updates.info.virus.desc")}`,u=N(),p=P("p"),p.textContent=`${f("statistics.updates.info.virus.date",(()=>{const t=1e3*l.getState().lastUpdateTime,n=m(t);return m().diff(n,"days")>1?n.format("MMM Do YYYY"):m().startOf("day")>n?f("statistics.updates.info.virus.date.yesterday",n.format("LT")):f("statistics.updates.info.virus.date.today",n.format("LT"))})())}`,A(n,"class","p -small"),A(i,"class","sta_status-dot g-margin-right--5"),A(c,"class","p -tiny -strong"),A(d,"class","p -tiny -secondary"),A(p,"class","p -tiny color-ok -text"),A(s,"class","sta_update g-margin-top--15")},m(t,l){z(t,n,l),z(t,e,l),z(t,s,l),C(s,i),C(s,o),C(s,r),C(r,c),C(r,a),C(r,d),C(r,u),C(r,p)},p:g,d(t){t&&E(n),t&&E(e),t&&E(s)}}}function ve(t){let n;function e(t,n){return t[1]?Ce:Ie}let s=e(t),i=s(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),z(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&E(n)}}}function xe(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.smartscans.info.overall")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Se(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.smartscans.info")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function we(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.scannedFiles.info.overall")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function ke(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.scannedFiles.info")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Ie(t){let n,e,s;function i(t,n){return t[2]===zt?Ee:ze}let o=i(t),r=o(t);return{c(){n=P("p"),n.textContent=`${f("statistics.attacks.info.ok")}`,e=N(),r.c(),s=T(),A(n,"class","p -small")},m(t,i){z(t,n,i),z(t,e,i),r.m(t,i),z(t,s,i)},p(t,n){o===(o=i(t))&&r?r.p(t,n):(r.d(1),r=o(t),r&&(r.c(),r.m(s.parentNode,s)))},d(t){t&&E(n),t&&E(e),r.d(t),t&&E(s)}}}function Ce(t){let n;function e(t,n){return t[2]===zt?je:Pe}let s=e(t),i=s(t);return{c(){i.c(),n=T()},m(t,e){i.m(t,e),z(t,n,e)},p(t,o){s===(s=e(t))&&i?i.p(t,o):(i.d(1),i=s(t),i&&(i.c(),i.m(n.parentNode,n)))},d(t){i.d(t),t&&E(n)}}}function ze(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.attacks.info.ok.desc.overall")}`,A(n,"class","p -tiny -secondary g-margin-top--15")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Ee(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.attacks.info.ok.desc")}`,A(n,"class","p -tiny -secondary g-margin-top--15")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Pe(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.attacks.info.overall")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function je(t){let n;return{c(){n=P("p"),n.textContent=`${f("statistics.attacks.info")}`,A(n,"class","p -small")},m(t,e){z(t,n,e)},p:g,d(t){t&&E(n)}}}function Ne(t){let n;function e(t,n){return"attacks"===t[0]?ve:"updates"===t[0]?ye:"threats"===t[0]?$e:"scannedFiles"===t[0]?be:"scannedSites"===t[0]?_e:"smartscans"===t[0]?ge:void 0}let s=e(t),i=s&&s(t);return{c(){n=P("div"),i&&i.c(),A(n,"class","sta_tooltip")},m(t,e){z(t,n,e),i&&i.m(n,null)},p(t,[o]){s===(s=e(t))&&i?i.p(t,o):(i&&i.d(1),i=s&&s(t),i&&(i.c(),i.m(n,null)))},i:g,o:g,d(t){t&&E(n),i&&i.d()}}}function Te(t,n,e){let{id:s=null}=n,{count:i=null}=n,{filter:o=zt}=n;return t.$$set=t=>{"id"in t&&e(0,s=t.id),"count"in t&&e(1,i=t.count),"filter"in t&&e(2,o=t.filter)},[s,i,o]}class Le extends ht{constructor(t){super(),mt(this,t,Te,Ne,v,{id:0,count:1,filter:2})}}function Ae(t,n,e){const s=t.slice();return s[11]=n[e].id,s[12]=n[e].desc,s[13]=n[e].icon,s[14]=n[e].action,s[15]=n[e].info,s[16]=n[e].count,s[17]=n[e].actionText,s[4]=n[e].data,s}function Me(t){let n,e,s=t[1],i=[];for(let r=0;r<s.length;r+=1)i[r]=Fe(Ae(t,s,r));const o=t=>lt(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();n=T()},m(t,s){for(let n=0;n<i.length;n+=1)i[n].m(t,s);z(t,n,s),e=!0},p(t,e){if(3&e){let r;for(s=t[1],r=0;r<s.length;r+=1){const o=Ae(t,s,r);i[r]?(i[r].p(o,e),at(i[r],1)):(i[r]=Fe(o),i[r].c(),at(i[r],1),i[r].m(n.parentNode,n))}for(rt(),r=s.length;r<i.length;r+=1)o(r);ct()}},i(t){if(!e){for(let t=0;t<s.length;t+=1)at(i[t]);e=!0}},o(t){i=i.filter(Boolean);for(let n=0;n<i.length;n+=1)lt(i[n]);e=!1},d(t){!function(t,n){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(n)}(i,t),t&&E(n)}}}function Oe(t){let n,e,s,i,o,r,c=t[17]+"";function a(){return t[7](t[14])}return{c(){n=P("br"),e=N(),s=P("button"),i=j(c),A(s,"class","a -small")},m(t,c){z(t,n,c),z(t,e,c),z(t,s,c),C(s,i),o||(r=L(s,"click",a),o=!0)},p(n,e){t=n,2&e&&c!==(c=t[17]+"")&&O(i,c)},d(t){t&&E(n),t&&E(e),t&&E(s),o=!1,r()}}}function Fe(t){let n,e,s,i,o,r,c,a,l,d,u,p,f,m,h,g,_,b,$,y=He(t[16])+"",v=t[12]+"";d=new Le({props:{id:t[11],filter:t[0],count:t[16]}});let x=t[14]&&Oe(t);return{c(){n=P("div"),e=P("div"),s=P("kin-icon"),o=N(),r=P("kin-tooltip"),c=P("div"),c.innerHTML='<kin-icon name="icon-m-action-info" size="18"></kin-icon>',a=N(),l=P("div"),dt(d.$$.fragment),u=N(),p=P("div"),f=j(y),m=N(),h=P("div"),g=j(v),_=N(),x&&x.c(),b=N(),M(s,"name",i=t[13]),M(s,"size","80"),M(s,"class","sta_icon"),A(c,"slot","tooltip-activator"),A(l,"slot","tooltip"),M(r,"class","sta_info"),A(e,"class","sta_icon__cont"),A(p,"class","sta_count h1"),A(h,"class","sta_desc"),A(n,"class","sixpack__2 sta_block")},m(t,i){z(t,n,i),C(n,e),C(e,s),C(e,o),C(e,r),C(r,c),C(r,a),C(r,l),ut(d,l,null),C(n,u),C(n,p),C(p,f),C(n,m),C(n,h),C(h,g),C(h,_),x&&x.m(h,null),C(n,b),$=!0},p(t,n){(!$||2&n&&i!==(i=t[13]))&&M(s,"name",i);const e={};2&n&&(e.id=t[11]),1&n&&(e.filter=t[0]),2&n&&(e.count=t[16]),d.$set(e),(!$||2&n)&&y!==(y=He(t[16])+"")&&O(f,y),(!$||2&n)&&v!==(v=t[12]+"")&&O(g,v),t[14]?x?x.p(t,n):(x=Oe(t),x.c(),x.m(h,null)):x&&(x.d(1),x=null)},i(t){$||(at(d.$$.fragment,t),$=!0)},o(t){lt(d.$$.fragment,t),$=!1},d(t){t&&E(n),pt(d),x&&x.d()}}}function De(t){let n,e,s,i,o,r,c,a,l,d,u,p,m,_,b,v,x,S,w,k,I,T,M=f("statistics.filter.30")+"",O=f("statistics.filter.total")+"",F=f("statistics.security.blog")+"",H=t[1]&&Me(t);return{c(){n=P("div"),e=P("div"),s=P("h3"),s.textContent=`${f("statistics.claim",f(t[2]))}`,i=N(),o=P("div"),r=P("button"),c=j(M),l=N(),d=P("button"),u=j(O),m=N(),_=P("div"),H&&H.c(),b=N(),v=P("div"),x=P("span"),x.textContent=`${f("statistics.security.badge")}`,S=N(),w=P("p"),A(s,"class","h3"),A(r,"data-test","stats-30day"),r.disabled=a=t[0]===zt,D(r,"-active",t[0]===zt),A(d,"data-test","stats-overall"),d.disabled=p="overall"===t[0],D(d,"-active","overall"===t[0]),A(o,"class","linkgroup g-margin-left--10"),A(e,"class","sta_header"),A(_,"class","sixpack -wrap"),A(x,"class","sta_tip__badge badge g-margin-right--10"),A(w,"class","span -small -secondary"),A(v,"class","sta_tip"),A(n,"class","sta")},m(a,p){var f;z(a,n,p),C(n,e),C(e,s),C(e,i),C(e,o),C(o,r),C(r,c),C(o,l),C(o,d),C(d,u),C(n,m),C(n,_),H&&H.m(_,null),C(n,b),C(n,v),C(v,x),C(v,S),C(v,w),w.innerHTML=F,k=!0,I||(T=[L(r,"click",t[5]),L(d,"click",t[6]),(f=h.call(null,w),f&&y(f.destroy)?f.destroy:g)],I=!0)},p(t,[n]){(!k||1&n&&a!==(a=t[0]===zt))&&(r.disabled=a),1&n&&D(r,"-active",t[0]===zt),(!k||1&n&&p!==(p="overall"===t[0]))&&(d.disabled=p),1&n&&D(d,"-active","overall"===t[0]),t[1]?H?(H.p(t,n),2&n&&at(H,1)):(H=Me(t),H.c(),at(H,1),H.m(_,null)):H&&(rt(),lt(H,1,1,(()=>{H=null})),ct())},i(t){k||(at(H),k=!0)},o(t){lt(H),k=!1},d(t){t&&E(n),H&&H.d(),I=!1,$(T)}}}function He(t){return t.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g,",")}function Be(t,e,s){let i,o=null,r=null,c=zt;const a=p.getProductStringId();let l=null;function d(){Promise.all([n("avService.Stats.Get"),n("app.scanViruses.GetHistory")]).then((t=>{s(4,o=t[0]),s(3,r=t[1])}))}U((()=>{d(),l=setInterval((()=>d()),5e3)})),R((()=>{clearInterval(l)}));return t.$$.update=()=>{25&t.$$.dirty&&s(1,i=function(t,n,e="overall"){if(!t)return null;const s=t[e];return[{id:"attacks",desc:f("statistics.attacks"),icon:"icon-l-pc-ok",action:null,count:s.fileShield.infectedCount+s.webShield.infectedCount},{id:"updates",desc:f("statistics.updates"),icon:"icon-l-realtime-updates",action:null,count:s.updates.vps+s.updates.streaming},{id:"threats",desc:f("statistics.threats"),icon:"icon-l-virus-chest",actionText:f("statistics.openchest"),action(){location.hash="#VirusChest"},count:t.chestItemCount},{id:"scannedFiles",desc:f("statistics.scannedFiles"),icon:"icon-l-file-scan",action:null,count:s.fileShield.scannedCount},{id:"scannedSites",desc:f("statistics.scannedSites"),icon:"icon-l-website-scan",action:null,count:s.webShield.scannedCount},{id:"smartscans",desc:f("statistics.smartscans"),icon:"icon-l-smart-scan",actionText:f("statistics.runsmartscan"),action(){location.hash="#SmartScan"},count:s.odDemandScanner.sessionCount}]}(o,0,c))},[c,i,a,r,o,()=>s(0,c=zt),()=>s(0,c="overall"),t=>t()]}class We extends ht{constructor(t){super(),mt(this,t,Be,De,v,{})}}function Ge(t){let n,e;return n=new We({}),{c(){dt(n.$$.fragment)},m(t,s){ut(n,t,s),e=!0},p:g,i(t){e||(at(n.$$.fragment,t),e=!0)},o(t){lt(n.$$.fragment,t),e=!1},d(t){pt(n,t)}}}class Ue extends ht{constructor(t){super(),mt(this,t,null,Ge,v,{})}}export default class extends ht{constructor(t){super(),mt(this,t,he,me,v,{})}}export{Ue as stats};const Re={name:"Dashboard",version:"1.2.793",created:"2021-09-06T10:41:40.908Z"};export{Re as metadata};