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/System.js
//{"name":"System","version":"1.2.436","created":"2021-09-06T10:46:12.754Z"}
import t from"./ractive.js";import{windowApi as e,napiTracker as n,burgerTracker as s,moduleManager as o,eventer as i,serviceRequest as r}from"./napi.js";import{settingsService as a,systemService as c,napiUtils as l,productModel as d,passwordService as u}from"./napiExtensions.js";import{stringUtils as p}from"./libs.js";import{nls as m}from"./i18n.js";const f=t.extend({}),g={toasterView:!0,toasterClose:!0},h=t.extend({template:{v:3,t:[{t:7,e:"Toaster",a:{windowHeight:[{t:2,r:"windowHeight"}],windowWidth:[{t:2,r:"windowWidth"}],customContent:"true",title:[{t:2,x:{r:["nls"],s:'_0("system.toasters.deviceConnected.title")'}}],text:[{t:2,r:"drivePathAndName"}],autoResize:"true",",":0,icon:"icon-m-usb-stick",burgerToasterTracker:[{t:2,r:"burgerToasterTracker"}]},f:[{t:7,e:"div",a:{class:"toaster__btns"},f:[{t:7,e:"p",f:[{t:7,e:"kin-button",v:{click:"scan"},a:{"data-test":"sys_deviceConnected_scan"},f:[{t:2,x:{r:["nls"],s:'_0("system.toasters.deviceConnected.scan")'}}]}]}," ",{t:4,f:[{t:7,e:"p",f:[{t:7,e:"button",a:{class:"a","data-test":"sys_deviceConnected_stopOffering"},v:{click:"stopOffering"},f:[{t:2,x:{r:["nls"],s:'_0("system.toasters.deviceConnected.stopOffering")'}}]}]}],n:50,r:"stopOfferingAllowed"}]}]}]},data:function(){return{drivePathAndName:null,windowWidth:450,autoResize:!0,stopOfferingAllowed:!1,burgerToasterTracker:g}},oninit:function(){this._super(),this.toasterCompo=this.findComponent("Toaster"),this.toasterCompo.windowClose=e.close,this.toasterCompo.gaTrack=n;const t=e.getUrlParams();this.set("drivePathAndName",`(${t.path} ${p.escapeHtml(t.name)})<br />${t.desc}`),a.get("avcfg://settings/Common/ExternalDriveScanOffer").then((t=>{this.set("stopOfferingAllowed",!t.locked)})),this.on("scan",(function(){n.event("Toaster","Click","Scan"),s.toaster.click({label:"Scan"}),o.importModule("Scans","serviceProxy").then((e=>e.getScanRoute({scanType:"folder",scanPath:t.path}))).then((t=>{if(!t)throw"no scan route";e.openMainWindow({route:t}).then((()=>{e.close()}))})).catch((()=>e.close()))})),this.on("stopOffering",(function(t,o){n.event("Toaster","Click","Stop offering"),s.toaster.click({label:"Stop offering"}),a.set("avcfg://settings/Common/ExternalDriveScanOffer",0).finally((()=>{e.close()}))}))}}),w={toasterView:!0,toasterClose:!0},b=t.extend({template:{v:3,t:[{t:7,e:"Toaster",a:{windowHeight:[{t:2,r:"windowHeight"}],windowWidth:[{t:2,r:"windowWidth"}],customContent:"true",title:[{t:3,x:{r:["nls"],s:'_0("system.toasters.restart.title")'}}],text:[{t:3,x:{r:["nls"],s:'_0("system.toasters.restart.text")'}}],autoResize:"true",burgerToasterTracker:[{t:2,r:"burgerToasterTracker"}]},f:[{t:7,e:"div",a:{class:"toaster__btns"},f:[{t:7,e:"kin-button",v:{click:"restart"},a:{"data-test":"sys_restart"},f:[{t:3,x:{r:["nls"],s:'_0("system.toasters.restart.restartComputer")'}}]}," ",{t:7,e:"kin-dropdown",f:[{t:7,e:"kin-button",a:{type:"secondary",slot:"dropdown-activator"},f:[{t:3,x:{r:["nls"],s:'_0("system.toasters.restart.remindMeLater")'}}," ",{t:7,e:"kin-icon",a:{name:"icon-s-controls-arrow-down",size:"16",class:"g-margin-left--10"}}]}," ",{t:4,f:[{t:7,e:"kin-dropdown-item",v:{click:{n:"remindMeLater",d:[{t:2,r:"minutes"}]}},a:{"data-test":["sys_restart-remind-",{t:2,r:"minutes"}]},f:[{t:3,r:"title"}]}],n:52,r:"remindMeIn"}]}]}]}]},data:function(){return{remindMeIn:[{title:m("system.toasters.restart.remindMe.inXminutes",15),minutes:15},{title:m("system.toasters.restart.remindMe.inXhours",1),minutes:60},{title:m("system.toasters.restart.remindMe.tomorrow"),minutes:1440},{title:m("system.toasters.restart.remindMe.nextCentury"),minutes:0}],windowWidth:450,autoResize:!0,burgerToasterTracker:w}},oninit:function(){this._super(),this.toasterCompo=this.findComponent("Toaster"),this.toasterCompo.windowClose=e.close,this.toasterCompo.gaTrack=n,this.on("restart",(function(){n.event("Toaster","Click","Restart"),s.toaster.click({label:"Restart"}),c.restart({rebootType:"RebootAfterUpdate"}),e.close()})),this.on("remindMeLater",(function(t,o){n.event("Toaster","Click","RemindMeLater"),s.toaster.click({label:"RemindMeLater"}),c.showRestartDialog({delay:o}).finally((()=>e.close()))}))}}),_=1,v=2,y=3,x=12,k=14,C=18,T=19,$={toasterView:!0,toasterClose:!0},E=t.extend({template:{v:3,t:[{t:7,e:"Toaster",a:{windowHeight:[{t:2,r:"windowHeight"}],windowWidth:[{t:2,r:"windowWidth"}],customContent:"true",title:[{t:3,r:"mainText"}],text:[{t:3,x:{r:["nls"],s:'_0("system.toasters.update.text")'}}],autoResize:"true",progress:"-1",burgerTracker:[{t:2,r:"burgerTracker"}]},f:[]}]},data:function(){return{windowWidth:450,autoResize:!0,mainText:m("system.toasters.update.title"),burgerToasterTracker:$}},oninit:function(){this._super(),this.toasterCompo=this.findComponent("Toaster"),this.toasterCompo.windowClose=e.close,this.toasterCompo.gaTrack=n;const t=new URL(document.location).searchParams,o=+(t.get("newEdition")||-1);o<+(t.get("oldEdition")||-1)&&this.set({mainText:m("system.toasters.update.down.title",this.getEditionName(o))}),i.on("app.setup.ProgramUpdateFinished",(()=>{s.toaster.automatedActivity({label:"Update finished"}),e.close()})),setTimeout((()=>{e.close()}),12e5)},getEditionName(t){switch(t){case _:return m("global.product.free_av");case v:return m("global.product.pro_av");case y:return m("global.product.suite");case x:return m(l.getProductStringId("premier"));case k:return m("global.product.business");case C:return m("global.product.business_soho");case T:return m("global.product.omni")}return m("global.product.free_av")}}),M={toasterView:!0,toasterClose:!0},A=t.extend({template:{v:3,t:[{t:7,e:"Toaster",a:{windowWidth:[{t:2,r:"windowWidth"}],windowHeight:[{t:2,r:"windowHeight"}],customContent:"true",text:[{t:3,x:{r:["nls"],s:'_0("system.toasters.wrongTime.text")'}}],autoResize:"true",burgerToasterTracker:[{t:2,r:"burgerToasterTracker"}]},f:[{t:7,e:"kin-button",a:{class:"toaster__btn"},v:{click:"setCorrectTime"},f:[{t:3,x:{r:["nls"],s:'_0("system.toasters.wrongTime.setCorrectTime")'}}]}," ",{t:7,e:"div",a:{class:"toaster__footer"},f:[{t:7,e:"input",a:{type:"checkbox",id:"dontShowAgain",disabled:[{t:2,r:"switchDisabled"}],class:["checkbox -small ",{t:4,f:["-disabled"],n:50,r:"switchDisabled"}]},v:{click:"toggleSwitch"}}," ",{t:7,e:"label",a:{for:"dontShowAgain",class:"checkbox__label text -secondary -small"},f:[{t:3,x:{r:["nls"],s:'_0("system.toasters.wrongTime.dontShowAgain")'}}]}]}]}]},data:function(){return{burgerToasterTracker:M}},oninit:function(){this._super(),this.toasterCompo=this.findComponent("Toaster"),this.toasterCompo.windowClose=e.close,this.toasterCompo.gaTrack=n,this.on("setCorrectTime",(function(){n.event("Toaster","Click","SetCorrectTime"),s.toaster.click({label:"SetCorrectTime"}),r("app.system.SetCorrectTime"),e.close()})),this.on("toggleSwitch",(function(t){const e=t.node.checked;n.event("Toaster","Click",e?"DontShowAgain":"ShowAgain"),s.toaster.click({label:"checkbox_dontShowAgain_"+e}),this.set("switchDisabled",!0),r("app.windowManager.SetToasterVisibility",{visible:!e,id:"wrong_time_toaster"}).then((()=>{this.set("switchDisabled",!1)})).catch((()=>{t.node.checked=!e,this.set("switchDisabled",!1)}))}))}});function R(){}function I(t){return t()}function N(){return Object.create(null)}function S(t){t.forEach(I)}function O(t){return"function"==typeof t}function L(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function P(t,e,n,s){return t[1]&&s?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](s(e))):n.ctx}function W(t,e,n,s,o,i,r){const a=function(t,e,n,s){if(t[2]&&s){const o=t[2](s(n));if(void 0===e.dirty)return o;if("object"==typeof o){const t=[],n=Math.max(e.dirty.length,o.length);for(let s=0;s<n;s+=1)t[s]=e.dirty[s]|o[s];return t}return e.dirty|o}return e.dirty}(e,s,o,i);if(a){const o=P(e,n,s,r);t.p(o,a)}}function B(t){return t&&O(t.destroy)?t.destroy:R}function H(t,e){t.appendChild(e)}function z(t,e,n){t.insertBefore(e,n||null)}function D(t){t.parentNode.removeChild(t)}function U(t){return document.createElement(t)}function Y(t){return document.createTextNode(t)}function j(){return Y(" ")}function V(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function X(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function G(t,e,n){e in t?t[e]=n:X(t,e,n)}function K(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function F(t,e,n,s){t.style.setProperty(e,n,s?"important":"")}class q{constructor(t=null){this.a=t,this.e=this.n=null}m(t,e,n=null){this.e||(this.e=U(e.nodeName),this.t=e,this.h(t)),this.i(n)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)z(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(D)}}let Z;function J(t){Z=t}function Q(){if(!Z)throw new Error("Function called outside component initialization");return Z}function tt(t){Q().$$.on_destroy.push(t)}function et(){const t=Q();return(e,n)=>{const s=t.$$.callbacks[e];if(s){const o=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(e,n);s.slice().forEach((e=>{e.call(t,o)}))}}}const nt=[],st=[],ot=[],it=[],rt=Promise.resolve();let at=!1;function ct(t){ot.push(t)}let lt=!1;const dt=new Set;function ut(){if(!lt){lt=!0;do{for(let t=0;t<nt.length;t+=1){const e=nt[t];J(e),pt(e.$$)}for(J(null),nt.length=0;st.length;)st.pop()();for(let t=0;t<ot.length;t+=1){const e=ot[t];dt.has(e)||(dt.add(e),e())}ot.length=0}while(nt.length);for(;it.length;)it.pop()();at=!1,lt=!1,dt.clear()}}function pt(t){if(null!==t.fragment){t.update(),S(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ct)}}const mt=new Set;function ft(t,e){t&&t.i&&(mt.delete(t),t.i(e))}function gt(t,e,n,s){if(t&&t.o){if(mt.has(t))return;mt.add(t),undefined.c.push((()=>{mt.delete(t),s&&(n&&t.d(1),s())})),t.o(e)}}function ht(t,e,n,s){const{fragment:o,on_mount:i,on_destroy:r,after_update:a}=t.$$;o&&o.m(e,n),s||ct((()=>{const e=i.map(I).filter(O);r?r.push(...e):S(e),t.$$.on_mount=[]})),a.forEach(ct)}function wt(t,e){const n=t.$$;null!==n.fragment&&(S(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function bt(t,e){-1===t.$$.dirty[0]&&(nt.push(t),at||(at=!0,rt.then(ut)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function _t(t,e,n,s,o,i,r=[-1]){const a=Z;J(t);const c=t.$$={fragment:null,ctx:null,props:i,update:R,not_equal:o,bound:N(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:N(),dirty:r,skip_bound:!1};let l=!1;if(c.ctx=n?n(t,e.props||{},((e,n,...s)=>{const i=s.length?s[0]:n;return c.ctx&&o(c.ctx[e],c.ctx[e]=i)&&(!c.skip_bound&&c.bound[e]&&c.bound[e](i),l&&bt(t,e)),n})):[],c.update(),l=!0,S(c.before_update),c.fragment=!!s&&s(c.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);c.fragment&&c.fragment.l(t),t.forEach(D)}else c.fragment&&c.fragment.c();e.intro&&ft(t.$$.fragment),ht(t,e.target,e.anchor,e.customElement),ut()}J(a)}class vt{$destroy(){wt(this,1),this.$destroy=R}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}var yt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},xt="object"==typeof yt&&yt&&yt.Object===Object&&yt,kt="object"==typeof self&&self&&self.Object===Object&&self;function Ct(t){let e,n,s,o;return{c(){e=U("div"),n=U("kin-icon"),G(n,"name",t[4]),X(e,"class",s="sve_toaster__theme "+(t[3]?"color-"+t[3]:"color-dark -bg")),X(e,"style",o=t[5]?"font-size:"+t[5]:"")},m(t,s){z(t,e,s),H(e,n)},p(t,i){16&i&&G(n,"name",t[4]),8&i&&s!==(s="sve_toaster__theme "+(t[3]?"color-"+t[3]:"color-dark -bg"))&&X(e,"class",s),32&i&&o!==(o=t[5]?"font-size:"+t[5]:"")&&X(e,"style",o)},d(t){t&&D(e)}}}function Tt(t){let e,n;return{c(){e=U("kin-icon"),G(e,"name",t[4]),G(e,"class",n="g-margin-bottom--20 "+(t[3]?"color-"+t[3]+" -text":""))},m(t,n){z(t,e,n)},p(t,s){16&s&&G(e,"name",t[4]),8&s&&n!==(n="g-margin-bottom--20 "+(t[3]?"color-"+t[3]+" -text":""))&&G(e,"class",n)},d(t){t&&D(e)}}}function $t(t){let e,n;return{c(){e=U("h2"),n=Y(t[6]),X(e,"class","sve_toaster__title h3")},m(t,s){z(t,e,s),H(e,n)},p(t,e){64&e&&K(n,t[6])},d(t){t&&D(e)}}}function Et(t){let e,n;function s(t,e){return t[10]?At:Mt}let o=s(t),i=o(t),r=t[8]&&Rt(t);return{c(){e=U("p"),i.c(),n=j(),r&&r.c(),X(e,"class","sve_toaster__text p -small")},m(t,s){z(t,e,s),i.m(e,null),H(e,n),r&&r.m(e,null)},p(t,a){o===(o=s(t))&&i?i.p(t,a):(i.d(1),i=o(t),i&&(i.c(),i.m(e,n))),t[8]?r?r.p(t,a):(r=Rt(t),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(t){t&&D(e),i.d(),r&&r.d()}}}function Mt(t){let e;return{c(){e=Y(t[7])},m(t,n){z(t,e,n)},p(t,n){128&n&&K(e,t[7])},d(t){t&&D(e)}}}function At(t){let e,n;return{c(){n=Y(""),e=new q(n)},m(s,o){e.m(t[7],s,o),z(s,n,o)},p(t,n){128&n&&e.p(t[7])},d(t){t&&D(n),t&&e.d()}}}function Rt(t){let e,n,s,o,i;return{c(){e=Y(" "),n=U("button"),s=Y(t[8]),X(n,"class","a g-font--capital")},m(r,a){z(r,e,a),z(r,n,a),H(n,s),o||(i=V(n,"click",t[14]),o=!0)},p(t,e){256&e&&K(s,t[8])},d(t){t&&D(e),t&&D(n),o=!1,i()}}}function It(t){let e;function n(t,e){return t[11]<0||100<t[11]?St:Nt}let s=n(t),o=s(t);return{c(){e=U("div"),o.c(),X(e,"class","sve_toaster__progress")},m(t,n){z(t,e,n),o.m(e,null)},p(t,i){s===(s=n(t))&&o?o.p(t,i):(o.d(1),o=s(t),o&&(o.c(),o.m(e,null)))},d(t){t&&D(e),o.d()}}}function Nt(t){let e,n,s,o,i;return{c(){e=U("kin-progress"),n=j(),s=U("p"),o=Y(t[11]),i=Y("%"),G(e,"percentage",t[11]),G(e,"csscls","-standalone"),X(s,"class","p")},m(t,r){z(t,e,r),z(t,n,r),z(t,s,r),H(s,o),H(s,i)},p(t,n){2048&n&&G(e,"percentage",t[11]),2048&n&&K(o,t[11])},d(t){t&&D(e),t&&D(n),t&&D(s)}}}function St(t){let e;return{c(){e=U("kin-progress"),G(e,"percentage",t[11]),G(e,"csscls","-standalone -unknown")},m(t,n){z(t,e,n)},p(t,n){2048&n&&G(e,"percentage",t[11])},d(t){t&&D(e)}}}function Ot(t){let e,n,s,o;return{c(){e=U("kin-button"),n=Y(t[9]),G(e,"class","sve_toaster__btn")},m(i,r){z(i,e,r),H(e,n),s||(o=V(e,"click",t[15]),s=!0)},p(t,e){512&e&&K(n,t[9])},d(t){t&&D(e),s=!1,o()}}}function Lt(t){let e,n,s,o,i,r,a,c,l,d,u,p,f,g,h,w,b,_,v=t[1]&&Ct(t),y=t[4]&&!t[1]&&Tt(t),x=t[6]&&$t(t),k=t[7]&&Et(t),C=(t[11]||0===t[11])&&It(t);const T=t[23].default,$=function(t,e,n,s){if(t){const o=P(t,e,n,s);return t[0](o)}}(T,t,t[22],null);let E=t[9]&&Ot(t);return{c(){e=U("div"),n=U("div"),s=U("h1"),s.innerHTML='<span class="logo -white -width-70"></span>',o=j(),i=U("div"),r=U("button"),a=j(),c=U("div"),v&&v.c(),l=j(),y&&y.c(),d=j(),x&&x.c(),u=j(),k&&k.c(),p=j(),C&&C.c(),f=j(),$&&$.c(),g=j(),E&&E.c(),X(s,"class","nui_logo"),X(r,"class","nui_controls__item -close nui_caption_client"),X(r,"title",m("global.closeModalWindow")),X(i,"class","nui_controls"),X(n,"class","nui_titlebar -toaster nui_caption"),X(c,"class",h="nui_main -toaster\n\t\t"+(t[2]?"color-"+t[2]+" -bg":"")+"\n\t\t"+(t[1]?t[1]+"-toaster-icon":"")+"\n\t"),X(e,"class","sve_toaster"),F(e,"width",t[0]+"px")},m(m,h){z(m,e,h),H(e,n),H(n,s),H(n,o),H(n,i),H(i,r),H(e,a),H(e,c),v&&v.m(c,null),H(c,l),y&&y.m(c,null),H(c,d),x&&x.m(c,null),H(c,u),k&&k.m(c,null),H(c,p),C&&C.m(c,null),H(c,f),$&&$.m(c,null),H(c,g),E&&E.m(c,null),w=!0,b||(_=[V(r,"click",t[13]),B(t[16].call(null,n)),B(t[17].call(null,c)),V(e,"click",t[12])],b=!0)},p(t,[n]){t[1]?v?v.p(t,n):(v=Ct(t),v.c(),v.m(c,l)):v&&(v.d(1),v=null),t[4]&&!t[1]?y?y.p(t,n):(y=Tt(t),y.c(),y.m(c,d)):y&&(y.d(1),y=null),t[6]?x?x.p(t,n):(x=$t(t),x.c(),x.m(c,u)):x&&(x.d(1),x=null),t[7]?k?k.p(t,n):(k=Et(t),k.c(),k.m(c,p)):k&&(k.d(1),k=null),t[11]||0===t[11]?C?C.p(t,n):(C=It(t),C.c(),C.m(c,f)):C&&(C.d(1),C=null),$&&$.p&&4194304&n&&W($,T,t,t[22],n,null,null),t[9]?E?E.p(t,n):(E=Ot(t),E.c(),E.m(c,null)):E&&(E.d(1),E=null),(!w||6&n&&h!==(h="nui_main -toaster\n\t\t"+(t[2]?"color-"+t[2]+" -bg":"")+"\n\t\t"+(t[1]?t[1]+"-toaster-icon":"")+"\n\t"))&&X(c,"class",h),(!w||1&n)&&F(e,"width",t[0]+"px")},i(t){w||(ft($,t),w=!0)},o(t){gt($,t),w=!1},d(t){t&&D(e),v&&v.d(),y&&y.d(),x&&x.d(),k&&k.d(),C&&C.d(),$&&$.d(t),E&&E.d(),b=!1,S(_)}}}function Pt(t,o,i){let r,{$$slots:a={},$$scope:c}=o,{windowWidth:l=360}=o,{windowHeight:d=360}=o,{theme:u}=o,{skin:p}=o,{severity:m}=o,{icon:f}=o,{iconSize:g}=o,{title:h}=o,{text:w}=o,{progress:b}=o,{textActionLabel:_}=o,{buttonLabel:v}=o,{burgerToasterTracker:y}=o,{handleClose:x}=o,{allowHtml:k}=o;const C=et();let T,$,E;var M;function A(){i(18,d=$.scrollHeight+T.scrollHeight),e.resize(l,d)}return M=()=>{A(),E=new MutationObserver(A.bind(this)),E.observe($,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),y?.toasterView&&s.toaster.view()},Q().$$.after_update.push(M),tt((()=>{E&&E.disconnect()})),t.$$set=t=>{"windowWidth"in t&&i(0,l=t.windowWidth),"windowHeight"in t&&i(18,d=t.windowHeight),"theme"in t&&i(1,u=t.theme),"skin"in t&&i(2,p=t.skin),"severity"in t&&i(3,m=t.severity),"icon"in t&&i(4,f=t.icon),"iconSize"in t&&i(5,g=t.iconSize),"title"in t&&i(6,h=t.title),"text"in t&&i(7,w=t.text),"progress"in t&&i(19,b=t.progress),"textActionLabel"in t&&i(8,_=t.textActionLabel),"buttonLabel"in t&&i(9,v=t.buttonLabel),"burgerToasterTracker"in t&&i(20,y=t.burgerToasterTracker),"handleClose"in t&&i(21,x=t.handleClose),"allowHtml"in t&&i(10,k=t.allowHtml),"$$scope"in t&&i(22,c=t.$$scope)},t.$$.update=()=>{524288&t.$$.dirty&&i(11,r=Number.isNaN(parseInt(b))?b:parseInt(b))},[l,u,p,m,f,g,h,w,_,v,k,r,function(){n.event("Toaster","Click","Area"),C("areaAction")},function(){n.event("Toaster","Close"),y?.toasterClose&&s.toaster.close(),x?C("close"):e.close()},function(){C("doTextAction")},function(){C("doAction")},function(t){T=t},function(t){$=t},d,b,y,x,c,a]}xt||kt||Function("return this")();class Wt extends vt{constructor(t){super(),_t(this,t,Pt,Lt,L,{windowWidth:0,windowHeight:18,theme:1,skin:2,severity:3,icon:4,iconSize:5,title:6,text:7,progress:19,textActionLabel:8,buttonLabel:9,burgerToasterTracker:20,handleClose:21,allowHtml:10})}}function Bt(t){let e,n,s,o,i,r;return{c(){e=U("div"),n=U("div"),s=U("kin-progress"),i=j(),r=U("div"),r.textContent=`${m("system.toasters.switchPassiveModeProgress.title")}`,G(s,"percentage",o=t[0]||-1),X(n,"class","sve_toaster__progress"),X(r,"class","sve_toaster__title"),X(e,"class","sve_toaster__main")},m(t,o){z(t,e,o),H(e,n),H(n,s),H(e,i),H(e,r)},p(t,e){1&e&&o!==(o=t[0]||-1)&&G(s,"percentage",o)},d(t){t&&D(e)}}}function Ht(t){let e,n;return e=new Wt({props:{burgerToasterTracker:t[1],$$slots:{default:[Bt]},$$scope:{ctx:t}}}),{c(){var t;(t=e.$$.fragment)&&t.c()},m(t,s){ht(e,t,s),n=!0},p(t,[n]){const s={};65&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){n||(ft(e.$$.fragment,t),n=!0)},o(t){gt(e.$$.fragment,t),n=!1},d(t){wt(e,t)}}}function zt(t,n,s){const o=[],r=e.getUrlParams(),a=parseInt(r.session);let c=0,l="";return tt((()=>{o.forEach((t=>{t()}))})),o.push(i.on("icarus.onStatusChanged.sessionUpdate",(t=>{t&&parseInt(t.sessionId)===a&&(l=t.status,"progress"===l?s(0,c=t.progress):"finished"===t.status&&e.close())}))),[c,{toasterView:!0,toasterClose:!0}]}class Dt extends vt{constructor(t){super(),_t(this,t,zt,Ht,L,{})}}const Ut=t.extend({template:{v:3,t:[{t:7,e:"Titlebar",a:{minimizeIcon:"false",product:[{t:2,r:"product"}],title:[{t:2,r:"title"}],closeIconTitle:[{t:2,x:{r:["nls"],s:'_0("global.closeModalWindow")'}}],cssCls:"-toaster"}}," ",{t:7,e:"div",a:{class:"nui_main -toaster -full"},f:[{t:7,e:"h1",a:{class:"h2"},f:[{t:3,r:"text"}]}," ",{t:7,e:"div",a:{class:"toaster__btns g-margin-top--20"},f:[{t:7,e:"kin-button",v:{click:"restart"},a:{"data-test":"sys_restart"},f:[{t:3,x:{r:["nls"],s:'_0("system.toasters.restart.restartComputer")'}}]}," ",{t:4,f:[{t:7,e:"kin-dropdown",f:[{t:7,e:"kin-button",a:{type:"secondary",slot:"dropdown-activator"},f:[{t:3,x:{r:["nls"],s:'_0("system.toasters.restart.remindMeLater")'}}," ",{t:7,e:"kin-icon",a:{name:"icon-s-controls-arrow-down",size:"16",class:"g-margin-left--10"}}]}," ",{t:4,f:[{t:7,e:"kin-dropdown-item",v:{click:{n:"remindMeLater",d:[{t:2,r:"minutes"}]}},a:{"data-test":["sys_restart-remind-",{t:2,r:"minutes"}]},f:[{t:3,r:"title"}]}],n:52,r:"remindMeIn"}]}],n:50,r:"enablePostpone"}]}]}]},data:function(){return{remindMeIn:[{title:m("system.toasters.restart.remindMe.inXminutes",10),minutes:10},{title:m("system.toasters.restart.remindMe.inXhours",1),minutes:60},{title:m("system.toasters.restart.remindMe.inXhours",4),minutes:240},{title:m("system.toasters.restart.remindMe.inXhours",6),minutes:360},{title:m("system.toasters.restart.remindMe.tomorrow"),minutes:1440},{title:m("system.toasters.restart.remindMe.nextWeek"),minutes:10080},{title:m("system.toasters.restart.remindMe.nextCentury"),minutes:0}],windowWidth:600,windowHeight:300,autoResize:!0,product:"",productEx:"",isAfbManaged:d.isAfbManaged(),enablePostpone:!0}},computed:{title(){const t=this.get("productEx")||this.get("product");return m(l.getProductStringId(t))},text(){return this.get("isAfbManaged")?m("system.dialog.restart.businness.title"):m("system.dialog.restart.title")}},oninit:function(){this._super();const t=new URL(document.location).searchParams;this.set({enablePostpone:"1"!==t.get("no_postpone")}),d.update().then((()=>{this.set({product:d.getProduct(),productEx:d.getState().productEx,isAfbManaged:d.isAfbManaged()})})),this.on("*.closeWindow",(()=>{e.close()})),this.on("restart",(function(){n.event("Dialog","Click","Restart"),c.restart({rebootType:c.RESTART_TYPES.afterUpdate}),e.close()})),this.on("remindMeLater",(function(t,s){n.event("Dialog","Click","RemindMeLater");const o={delay:s},i=e.getUrlParams();i.rebootType&&(o.rebootType=i.rebootType),c.showRestartDialog(o).finally((()=>e.close()))}))}}),Yt=["service","ini","uninstall","selfdef","password","component"],jt=0,Vt=1,Xt=2,Gt=t.extend({template:{v:3,t:[{t:7,e:"Titlebar",a:{minimizeIcon:"false",product:[{t:2,r:"product"}],title:[{t:2,r:"title"}]}}," ",{t:7,e:"div",a:{class:"nui_page"},f:[{t:7,e:"div",a:{class:"center g-padding-left--20 g-padding-right--20"},f:[{t:7,e:"p",a:{class:"p g-margin-top--20"},f:[{t:2,r:"desc"}]}," ",{t:7,e:"p",a:{class:"p g-margin-top--20"},f:[{t:2,x:{r:["nls"],s:'_0("system.consent.question")'}}]}," ",{t:7,e:"p",a:{class:"p g-margin-top--10 g-margin-bottom--20"},f:[{t:2,x:{r:["nls"],s:'_0("system.consent.note")'}}]}," ",{t:7,e:"form",v:{submit:"validate"},f:[{t:4,f:[{t:7,e:"div",a:{class:"form__row -simple g-margin-toip--10"},f:[{t:7,e:"Input",a:{id:"pwd1",innerValue:[{t:2,r:"password"}],type:"password",label:[{t:2,x:{r:["nls"],s:'_0("global.dialog.enterPassword.inputLabel")'}}],error:[{t:2,x:{r:["passwordError"],s:"!!_0"}}],message:[{t:2,r:"passwordError"}],autofocus:0}}]}],n:50,x:{r:["type"],s:"_0==4"}}," ",{t:7,e:"div",a:{class:"toaster__btns"},f:[{t:7,e:"kin-button",a:{type:"secondary","data-test":"sys_consent_yes"},v:{click:"actionYes"},f:[{t:3,x:{r:["nls"],s:'_0("global.yes")'}}]}," ",{t:7,e:"kin-button",a:{type:"secondary","data-test":"sys_consent_no"},v:{click:"actionNo"},f:[{t:3,x:{r:["nls"],s:'_0("global.no")'}}," ",{t:7,e:"span",a:{style:"min-width:25px;display:inline-block;text-align:left"},f:[{t:2,r:"countdown"}]}]}]}]}]}]}]},data:function(){return{windowWidth:600,windowHeight:250,autoResize:!0,product:"",productEx:"",title:m("system.consent.general.title"),desc:m("system.consent.general.desc"),_countdown:60,intervalId:0,password:"",passwordError:"",type:3}},computed:{countdown(){const t=this.get("_countdown");return t<=0?"":"("+t+")"}},oninit:function(){this._super(),this.parseArgs(),d.update().then((()=>{this.set({product:d.getProduct(),productEx:d.getState().productEx})})),this.startCloseCountdown(),this.on("*.closeWindow",(()=>{this.cancel()})),this.on("actionYes",(function(){"password"!==Yt[this.get("type")]?(n.event("consentDialog","Click","Yes"),r("modalWindow.close",{action:Vt}),e.close()):this.validate()})),this.on("actionNo",(function(){n.event("consentDialog","Click","No"),this.cancel()})),this.on("validate",(t=>{t.original.preventDefault(),"password"===Yt[this.get("type")]?this.validate():this.fire("actionNo")}))},cancel(){"password"===Yt[this.get("type")]?r("modalWindow.close",{action:Xt}):r("modalWindow.close",{action:jt}),e.close()},onteardown(){const t=this.get("intervalId");0!==t&&(window.clearInterval(t),this.set({intervalId:0}))},parseArgs(){const t=new URL(document.location).searchParams,e={flags:+t.get("flags"),filename:decodeURIComponent(t.get("filename")),param:decodeURIComponent(t.get("param"))},n=e.flags;this.set({title:m("system.consent."+Yt[n]+".title"),desc:m("system.consent."+Yt[n]+".desc"),type:n,windowHeight:"password"==Yt[n]?360:250}),"component"!==Yt[n]&&"password"!==Yt[n]||this.set({desc:m("system.consent."+Yt[n]+".desc",e.param)})},validate(){u.verifyPassword(this.get("password")).then((t=>{t?(r("modalWindow.close",{action:Vt}),e.close()):this.set({passwordError:m("global.dialog.enterPassword.invalidPassword")})}))},startCloseCountdown(){0==this.get("intervalId")&&this.set({intervalId:window.setInterval((()=>{let t=this.get("_countdown");t-- >0?this.set({_countdown:t}):this.cancel()}),1e3)})}}),Kt={OK:{text:m("global.ok"),value:1},CANCEL:{text:m("global.cancel"),value:2},ABORT:{text:m("global.abort"),value:3},RETRY:{text:m("global.retry"),value:4},IGNORE:{text:m("global.ignore"),value:5},YES:{text:m("global.yes"),value:6},NO:{text:m("global.no"),value:7},TRYAGAIN:{text:m("global.tryagain"),value:10},CONTINUE:{text:m("global.continue"),value:11}},Ft={name:"MB_OK",code:0,buttons:[Kt.OK]},qt=[Ft,{name:"MB_ABORTRETRYIGNORE",code:2,buttons:[Kt.ABORT,Kt.RETRY,Kt.IGNORE]},{name:"MB_CANCELTRYCONTINUE",code:6,buttons:[Kt.CANCEL,Kt.TRYAGAIN,Kt.CONTINUE]},{name:"MB_OKCANCEL",code:1,buttons:[Kt.OK,Kt.CANCEL]},{name:"MB_RETRYCANCEL",code:5,buttons:[Kt.RETRY,Kt.CANCEL]},{name:"MB_YESNO",code:4,buttons:[Kt.YES,Kt.NO]},{name:"MB_YESNOCANCEL",code:3,buttons:[Kt.YES,Kt.NO,Kt.CANCEL]}],Zt=t.extend({template:{v:3,t:[{t:7,e:"Titlebar",a:{minimizeIcon:"false",product:[{t:2,r:"product"}],title:[{t:2,r:"title"}]}}," ",{t:7,e:"div",a:{class:"nui_page"},f:[{t:7,e:"div",a:{class:"center g-padding-left--20 g-padding-right--20"},f:[{t:7,e:"p",a:{class:"p g-margin-top--20 g-margin-bottom--20"},f:[{t:2,r:"desc"}]}," ",{t:7,e:"div",a:{class:"toaster__btns"},f:[{t:4,f:[{t:7,e:"kin-button",a:{type:[{t:2,x:{r:["primaryBtn","@index"],s:'_0==_1?"primary":"secondary"'}}],"data-test":["sys_messagebox_btn",{t:2,r:"@index"}]},v:{click:"btnClick"},f:[{t:2,r:"text"}," ",{t:7,e:"span",f:[{t:4,f:[{t:7,e:"span",a:{style:"min-width:25px;display:inline-block;text-align:left"},f:[{t:2,r:"countdown"}]}],n:50,x:{r:["countdownBtn","@index"],s:"_0==_1"}}]}]}],n:52,r:"buttons"}]}]}]}]},data:function(){return{windowWidth:550,windowHeight:250,autoResize:!0,product:"",productEx:"",title:"",icon:"",desc:"",buttons:[],_countdown:60,intervalId:0,primaryBtn:-1,countdownBtn:-1}},computed:{countdown(){const t=this.get("_countdown");return t<=0?"":"("+t+")"}},oninit:function(){this._super(),this.parseArgs(),d.update().then((()=>{this.set({product:d.getProduct(),productEx:d.getState().productEx})})),this.on("*.closeWindow",(()=>{this.cancel()})),this.on("btnClick",(t=>{n.event("messageBox","Click",String(t.context.value)),r("messageBox.close",{action:t.context.value}),e.close()}))},onteardown(){const t=this.get("intervalId");0!==t&&(window.clearInterval(t),this.set({intervalId:0}))},cancel(){r("messageBox.close",{action:Kt.CANCEL.value}),e.close()},parseArgs(){const t=new URL(document.location).searchParams;let e=decodeURIComponent(t.get("text"));const n=e.indexOf("\t");-1!=n&&(this.set({title:e.substring(0,n)}),e=e.substring(n+1));const s={text:e,type:(+t.get("type")).toString(16)%10,defaultBtn:+t.get("defaultBtn")-1,countdownBtn:+t.get("countdownBtn")-1},o=qt.filter((t=>s.type==t.code));this.set({buttons:o[0].buttons||Ft.buttons,desc:s.text,icon:o.icon,primaryBtn:s.defaultBtn,countdownBtn:s.countdownBtn}),-1<s.countdownBtn&&this.startCloseCountdown()},startCloseCountdown(){0==this.get("intervalId")&&this.set({intervalId:window.setInterval((()=>{let t=this.get("_countdown");if(t-- >0)this.set({_countdown:t});else{const t=this.get("buttons")[this.get("countdownBtn")];t&&t.value?(r("messageBox.close",{action:t.value}),e.close()):this.cancel()}}),1e3)})}});function Jt(t){let e,n,s,o,i,r,a,c,l,d,u,p,f,g,h,w,b,_,v,y,x,k,C,T,$=m("global.yes")+"",E=t[3]&&function(t){let e,n,s,o,i,r,a;return{c(){e=U("div"),n=U("input"),o=j(),i=U("label"),i.textContent=`${m("global.dontAskAgain.checkbox")}`,X(n,"type","checkbox"),n.checked=t[1],n.disabled=s=t[0]||t[2],X(n,"id","passive-mode-checkbox"),X(n,"class","checkbox"),X(i,"class","checkbox__label"),X(i,"for","passive-mode-checkbox"),X(e,"class","g-margin-top--10")},m(s,c){z(s,e,c),H(e,n),H(e,o),H(e,i),r||(a=V(n,"change",t[4]),r=!0)},p(t,e){2&e&&(n.checked=t[1]),5&e&&s!==(s=t[0]||t[2])&&(n.disabled=s)},d(t){t&&D(e),r=!1,a()}}}(t);return{c(){e=U("div"),n=U("div"),s=U("h1"),s.innerHTML='<span class="logo -white -width-70"></span>',o=j(),i=U("div"),r=U("button"),a=j(),c=U("div"),l=U("h2"),l.textContent=`${m("global.passiveModeModal.title")}`,d=j(),u=U("p"),u.textContent=`${m("global.passiveModeModal.desc1")}`,p=j(),f=U("p"),f.textContent=`${m("global.passiveModeModal.desc2")}`,g=j(),h=U("p"),h.textContent=`${m("global.passiveModeModal.desc3")}`,w=j(),b=U("div"),_=U("kin-button"),v=Y($),y=j(),x=U("kin-button"),x.textContent=`${m("global.passiveModeModal.stayInPassiveMode")}`,k=j(),E&&E.c(),X(s,"class","nui_logo"),X(r,"class","nui_controls__item -close nui_caption_client g-cursor--pointer"),X(r,"title",m("global.closeModalWindow")),X(i,"class","nui_controls"),X(n,"class","nui_titlebar -toaster nui_caption"),X(l,"class","h2 modal__title"),X(u,"class","p g-margin-top--20 -secondary"),X(f,"class","p g-margin-top--20 -secondary"),X(h,"class","p g-margin-top--20 -secondary"),G(_,"class","g-margin-right--10"),G(_,"processing",t[0]),G(x,"type","secondary"),X(b,"class","g-margin-top--20 sve_toaster__btns"),X(c,"class","sve_toaster__main"),X(e,"class","sve_toaster -detection"),F(e,"width",Qt+"px")},m(m,$){z(m,e,$),H(e,n),H(n,s),H(n,o),H(n,i),H(i,r),H(e,a),H(e,c),H(c,l),H(c,d),H(c,u),H(c,p),H(c,f),H(c,g),H(c,h),H(c,w),H(c,b),H(b,_),H(_,v),H(b,y),H(b,x),H(c,k),E&&E.m(c,null),C||(T=[V(r,"click",t[7]),V(_,"click",t[6]),V(x,"click",t[8]),B(t[5].call(null,e))],C=!0)},p(t,[e]){1&e&&G(_,"processing",t[0]),t[3]&&E.p(t,e)},i:R,o:R,d(t){t&&D(e),E&&E.d(),C=!1,S(T)}}}const Qt=600;function te(t,n,s){const o="turnOnProtection"===e.getUrlParams().mode;let i=!1,c=!1,l=!1;function d(t){e.resize(Qt,Math.min(t.scrollHeight,window.screen.availHeight))}o&&a.getValue("avcfg://settings/PassiveMode/Enforced").then((t=>{s(1,c=1===parseInt(t))}));return[i,c,l,o,function(){s(1,c=!c),s(2,l=!0),a.set("avcfg://settings/PassiveMode/Enforced",c?1:0).then((()=>{s(2,l=!1)}))},function(t){d(t);const e=new MutationObserver(d.bind(this,t));return e.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),{destroy:e.disconnect.bind(e)}},function(){s(0,i=!0),r("app.passivemode.Disable").finally((()=>{e.close()}))},()=>e.close(),()=>e.close()]}class ee extends vt{constructor(t){super(),_t(this,t,te,Jt,L,{})}}export default f;export{Gt as consentDialog,h as deviceConnectedToaster,Zt as messageBox,Ut as restartDialog,b as restartToaster,Dt as switchPassiveModeProgress,ee as turnOffPassiveModeDialog,E as updateToaster,A as wrongTimeToaster};const ne={name:"System",version:"1.2.436",created:"2021-09-06T10:46:12.754Z"};export{ne as metadata};