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/default_av/ |
//{"name":"Settings","version":"1.2.966","created":"2021-03-09T09:16:04.870Z"} import{eventer as e,serviceRequest as t,EventEmitter as s,windowApi as n,moduleManager as a,napiTracker as o}from"./napi.js";import{logger as r,Router as i,urlPlaceholders as l,svelte3Adapter as c,trapTabNavigation as d,stringUtils as p}from"./libs.js";import{nls as u,moment as g,nlsRaw as h,nlsWoHtml as m,format as f}from"./i18n.js";import{productModel as b,napiUtils as _,passwordService as v,settingsService as S,setupService as y,systemService as x}from"./napiExtensions.js";import w from"./ractive.js";import{EventEmitter as k}from"./napiAdapter.js";import T,{modals as A}from"./ractiveComponents.js";import{objectFromEntriesPolyfill as I}from"./plugins.js";function E(){}function P(e){return e()}function C(){return Object.create(null)}function L(e){e.forEach(P)}function N(e){return"function"==typeof e}function R(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function M(e,t,s,n){if(e){const a=D(e,t,s,n);return e[0](a)}}function D(e,t,s,n){return e[1]&&n?function(e,t){for(const s in t)e[s]=t[s];return e}(s.ctx.slice(),e[1](n(t))):s.ctx}function $(e,t,s,n,a,o,r){const i=function(e,t,s,n){if(e[2]&&n){const a=e[2](n(s));if(void 0===t.dirty)return a;if("object"==typeof a){const e=[],s=Math.max(t.dirty.length,a.length);for(let n=0;n<s;n+=1)e[n]=t.dirty[n]|a[n];return e}return t.dirty|a}return t.dirty}(t,n,a,o);if(i){const a=D(t,s,n,r);e.p(a,i)}}function U(e){return e&&N(e.destroy)?e.destroy:E}function O(e,t){e.appendChild(t)}function G(e,t,s){e.insertBefore(t,s||null)}function j(e){e.parentNode.removeChild(e)}function V(e,t){for(let s=0;s<e.length;s+=1)e[s]&&e[s].d(t)}function F(e){return document.createElement(e)}function B(e){return document.createTextNode(e)}function z(){return B(" ")}function W(){return B("")}function H(e,t,s,n){return e.addEventListener(t,s,n),()=>e.removeEventListener(t,s,n)}function q(e,t,s){null==s?e.removeAttribute(t):e.getAttribute(t)!==s&&e.setAttribute(t,s)}function Y(e,t,s){t in e?e[t]=s:q(e,t,s)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function X(e,t){e.value=null==t?"":t}function J(e,t){for(let s=0;s<e.options.length;s+=1){const n=e.options[s];if(n.__value===t)return void(n.selected=!0)}}function Q(e,t,s){e.classList[s?"add":"remove"](t)}let Z;function ee(e){Z=e}function te(){if(!Z)throw new Error("Function called outside component initialization");return Z}function se(e){te().$$.on_mount.push(e)}function ne(e){te().$$.on_destroy.push(e)}function ae(){const e=te();return(t,s)=>{const n=e.$$.callbacks[t];if(n){const a=function(e,t){const s=document.createEvent("CustomEvent");return s.initCustomEvent(e,!1,!1,t),s}(t,s);n.slice().forEach((t=>{t.call(e,a)}))}}}const oe=[],re=[],ie=[],le=[],ce=Promise.resolve();let de=!1;function pe(e){ie.push(e)}function ue(e){le.push(e)}let ge=!1;const he=new Set;function me(){if(!ge){ge=!0;do{for(let e=0;e<oe.length;e+=1){const t=oe[e];ee(t),fe(t.$$)}for(ee(null),oe.length=0;re.length;)re.pop()();for(let e=0;e<ie.length;e+=1){const t=ie[e];he.has(t)||(he.add(t),t())}ie.length=0}while(oe.length);for(;le.length;)le.pop()();de=!1,ge=!1,he.clear()}}function fe(e){if(null!==e.fragment){e.update(),L(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(pe)}}const be=new Set;let _e;function ve(){_e={r:0,c:[],p:_e}}function Se(){_e.r||L(_e.c),_e=_e.p}function ye(e,t){e&&e.i&&(be.delete(e),e.i(t))}function xe(e,t,s,n){if(e&&e.o){if(be.has(e))return;be.add(e),_e&&_e.c&&_e.c.push((()=>{be.delete(e),n&&(s&&e.d(1),n())})),e.o(t)}}const we="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function ke(e,t,s){const n=e.$$.props[t];void 0!==n&&(e.$$.bound[n]=s,s(e.$$.ctx[n]))}function Te(e){e&&e.c()}function Ae(e,t,s){const{fragment:n,on_mount:a,on_destroy:o,after_update:r}=e.$$;n&&n.m(t,s),pe((()=>{const t=a.map(P).filter(N);o?o.push(...t):L(t),e.$$.on_mount=[]})),r.forEach(pe)}function Ie(e,t){const s=e.$$;null!==s.fragment&&(L(s.on_destroy),s.fragment&&s.fragment.d(t),s.on_destroy=s.fragment=null,s.ctx=[])}function Ee(e,t){-1===e.$$.dirty[0]&&(oe.push(e),de||(de=!0,ce.then(me)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Pe(e,t,s,n,a,o,r=[-1]){const i=Z;ee(e);const l=t.props||{},c=e.$$={fragment:null,ctx:null,props:o,update:E,not_equal:a,bound:C(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(i?i.$$.context:[]),callbacks:C(),dirty:r,skip_bound:!1};let d=!1;if(c.ctx=s?s(e,l,((t,s,...n)=>{const o=n.length?n[0]:s;return c.ctx&&a(c.ctx[t],c.ctx[t]=o)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](o),d&&Ee(e,t)),s})):[],c.update(),d=!0,L(c.before_update),c.fragment=!!n&&n(c.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);c.fragment&&c.fragment.l(e),e.forEach(j)}else c.fragment&&c.fragment.c();t.intro&&ye(e.$$.fragment),Ae(e,t.target,t.anchor),me()}ee(i)}class Ce{$destroy(){Ie(this,1),this.$destroy=E}$on(e,t){const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(t),()=>{const e=s.indexOf(t);-1!==e&&s.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Le(e,t){void 0===t&&(t={});var s=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===s&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var Ne=".stg_language__row {\n text-align: start;\n padding: 8px;\n margin: 0 20px;\n border-top: 1px solid rgba(255,255,255,0.1);\n}\n.stg_language__row:last-of-type {\n border-bottom: 1px solid rgba(255,255,255,0.1);\n}\n";Le(Ne);const Re={1025:"Arabic - Saudi Arabia",1026:"Bulgarian",1028:"Chinese - Taiwan",1032:"Greek",1037:"Hebrew",1041:"Japanese",1042:"Korean",1049:"Russian",1054:"Thai",1056:"Urdu",1058:"Ukrainian",1059:"Belarusian",1065:"Farsi - Persian",1081:"Hindi",1093:"Bengali - India",2052:"Chinese - China"},Me=[1033,1036,1046,3082],De={title:"settings.languages",chooseLanguage:"settings.languages.chooseLangauage",addNewLanguage:"settings.languages.addNewLanguage",addNewLanguageDesc:"settings.languages.addNewLanguage.desc",installNow:"settings.installNow",close:"global.close"};function $e(){return{language:{id:"stg-languages-chooseLanguage",label:u(De.chooseLanguage),path:"avcfg://settings/Languages/Engine",options:null,search:De.chooseLanguage},addNewLanguage:{id:"stg-languages-addNewLanguage",label:u(De.addNewLanguage),search:De.addNewLanguage}}}const Ue=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}]},f:[{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"properties.language"}],labelSmall:0}}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"button",a:{class:"btn",id:[{t:2,r:"properties.addNewLanguage.id"}]},v:{click:"showLanguageList"},f:[{t:2,r:"properties.addNewLanguage.label"}]}]}]}," ",{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls","STRINGS.addNewLanguage"],s:"_0(_1)"}}],subtitle:[{t:3,x:{r:["nls","STRINGS.addNewLanguageDesc"],s:"_0(_1)"}}],scrollable:0},f:[{t:7,e:"div",a:{class:"modal"},f:[{t:4,f:[{t:7,e:"div",a:{class:"stg_language__row"},f:[{t:7,e:"input",a:{type:"checkbox",checked:[{t:2,r:"toBeInstalled"}],disabled:[{t:2,x:{r:["properties.language.value","languageId","toBeInstalled","isLastLngToBeInstalled"],s:"_0===_1||(_2&&_3)"}}],id:["settings-languages-",{t:2,r:"languageId"}],"data-test":["settings-languages-",{t:2,r:"languageId"}],class:"checkbox",title:[{t:2,r:"englishName"}]}}," ",{t:7,e:"label",a:{class:"checkbox__label",for:["settings-languages-",{t:2,r:"languageId"}]},f:[{t:2,r:"localizedName"},{t:3,r:"RTL_BRACKET_FIXER"}]}]}],r:"languages"}]}," ",{t:7,e:"div",a:{class:"modal__footer"},f:[{t:7,e:"button",a:{class:"btn"},v:{click:"updateLanguages"},f:[{t:3,x:{r:["nls","STRINGS.installNow"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary"},v:{click:"close"},f:[{t:3,x:{r:["nls","STRINGS.close"],s:"_0(_1)"}}]}]}]}],n:50,r:"showLanguageList"}]},css:Ne,data:()=>({STRINGS:De,properties:$e(),RTL_BRACKET_FIXER:"‎",languages:[],showLanguageList:!1,isOmni:"omni"===b.getProduct()}),computed:{isLastLngToBeInstalled:function(){return 1===this.get("languages").filter((e=>e.toBeInstalled)).length}},oninit(){this.appliedLanguage=null,this.observe("languages",this.updateInstalledLanguages.bind(this),{init:!1}),this.observe("properties.language.value",((t,s)=>{null==s?this.appliedLanguage=t:this.trackLanguageChange(t),null!=t&&null!=s&&e.emit("settings.change.language",t)}),{init:!1}),this.on("showLanguageList",this.showLanguageList.bind(this)),this.on("Modal.modalClose",this.closeLanguageList.bind(this,!0)),this.on("close",this.closeLanguageList.bind(this,!0)),this.on("reload",this.reload.bind(this)),this.on("updateLanguages",(()=>{this.closeLanguageList(),this.updateLanguages()})),this.loadLanguages()},loadLanguages(){return t("app.languages.GetLanguages").then((e=>{this.get("isOmni")&&(e=e.filter((e=>Me.includes(e.languageId)))),e.sort(((e,t)=>e.localizedName.localeCompare(t.localizedName))).forEach((e=>{const t=Re[e.languageId];t&&(e.englishName=t)})),this.set("languages",e)}))},initLanguageCheckboxes(){const e=this.get("languages");e.forEach((e=>{e.toBeInstalled=e.installed})),this.set("languages",e)},updateLanguages(){const s=this.get("languages");e.emit("Settings.gaTrack","Install"),s.forEach((t=>{let s;t.installed&&!t.toBeInstalled?s=!1:!t.installed&&t.toBeInstalled&&(s=!0),null!=s&&(e.emit("Settings.gaTrack",t.localizedName,s),t.installed=s)})),t("app.languages.SetLanguages",s).then((()=>{this.set("languages",s)}))},updateInstalledLanguages(){const e=this.get("languages"),t=[];e&&e.forEach((e=>{e.installed&&t.push({label:e.localizedName,value:e.languageId})})),this.set("properties.language.options",t)},showLanguageList(){e.emit("Settings.gaTrack","Add language"),this.initLanguageCheckboxes(),this.set("showLanguageList",!0)},closeLanguageList(t){t&&e.emit("Settings.gaTrack","Close the add language dialog"),this.set("showLanguageList",!1)},reload(){window.location.reload()},trackLanguageChange(t){const s=this.get("languages").find((e=>e.languageId==t));s&&e.emit("Settings.gaTrack","Change language",s.localizedName)}});var Oe=".stg_update__row {\n min-height: 6.5rem;\n border-bottom: solid 1px transparent;\n}\n.stg_update__form {\n margin-top: 1rem;\n}\n.stg_update__form .input__label.-inline {\n width: 20%;\n}\n.stg_update__form .input {\n width: 79%;\n}\n";Le(Oe);const Ge="Icarus",je="Instup",Ve="updateVps",Fe="updateProgram",Be={outdated:"outdated",updating:"updating",updated:"updated",failed:"failed"},ze="starting",We="running",He="progress",qe="finished",Ye="done",Ke=function(e){return e===Be.updated?{name:"tick",color:"ok"}:e===Be.outdated||e===Be.failed?{name:"exclamation",color:"critical",shape:"triangle"}:void 0},Xe=w.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"settings__indent g-margin-bottom--10"},t0:{n:[{t:2,x:{r:["slideEffectEnabled"],s:'_0?"slide":""'}}],d:[]},f:[{t:16}]}],n:50,r:"expanded"}]},data:()=>({expanded:!1,slideEffectEnabled:!0}),onteardown(){this.set("slideEffectEnabled",!1)}}),Je=r.createLogger("settings.updaterService");class Qe extends k{constructor(e){super(),this.setup=e.setup,this.updater=e.updater,this._updateTriedAgain,this.sessionId}destroy(){Je.info("destroying"),this._stopWatchingInstupStatus(),this._stopWatchingIcarusStatus()}getState(){return this._setState()}_getVersion(){return this.updater===Fe?this._getProgramInfo():this.updater===Ve?this._getVpsInfo():void 0}_getProgramInfo(){return t("app.setup.GetProgramVersions").then((e=>(e.installedBuild=b.getProductInfo().buildNumber,e)))}_getVpsInfo(){return Promise.allSettled([t("app.setup.GetVPSVersions"),t("app.settings.Get",{name:"avcfg://volatile/Streams/LastStrmUpdReceived"})]).then((e=>{const t=e[0].value,s=e[1].value,n=s&&s.value?s.value:0;return t.installedTime=Math.max(t.installedTime,n),t}))}_isUpdating(e){return e===ze||e===We||e===He}_setState(e,t){this._isUpdating(e)?this.emit("state",{updateState:Be.updating,progress:t}):this._getVersion().then((t=>{(function(e,t){if(e===t)return 0;const s=e.split("."),n=t.split("."),a=Math.min(s.length,n.length);for(let o=0;o<a;o++){if(parseInt(s[o])>parseInt(n[o]))return 1;if(parseInt(s[o])<parseInt(n[o]))return-1}return s.length-n.length})(t.installedVersion,t.latestVersion)<0?e===qe||e===Ye?this._updateTriedAgain?this.emit("state",{updateState:Be.failed,info:t}):(this._updateTriedAgain=!0,this.doUpdate(!0)):this.emit("state",{updateState:Be.outdated,info:t}):this.updater===Ve?b.update().then((()=>{const e=b.getState().issues;e&&e.defs_out_of_date?this.emit("state",{updateState:Be.outdated,info:t}):this.emit("state",{updateState:Be.updated,info:t})})):this.emit("state",{updateState:Be.updated,info:t})})).catch((e=>{Je.error("set state failed",e)}))}_watchIcarusStatus(){this.vpsEventerOff||(this._setState(ze),this.vpsEventerOff=e.on("icarus.onStatusChanged.sessionUpdate",(e=>{e.sessionId===this.sessionId&&e.task===this.updater&&(e.status===qe&&this._stopWatchingIcarusStatus(),this._setState(e.status,e.progress))})))}_stopWatchingIcarusStatus(){this.vpsEventerOff&&this.vpsEventerOff(),this.sessionId=null,this.vpsEventerOff=void 0}_watchInstupStatus(){this.intervalId||(this.intervalId=setInterval((()=>{t("app.setup.GetUpdateStatus",{task:this.updater}).then((e=>{e.task===this.updater?(e.status===Ye&&this._stopWatchingInstupStatus(),this._setState(e.status,e.progress)):this._stopWatchingInstupStatus()})).catch((e=>{Je.error("getting status failed",e),this._stopWatchingInstupStatus()}))}),500))}_stopWatchingInstupStatus(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0)}_doUpdate(){return this.updater===Fe?t("app.setup.UpdateProgram"):this.updater===Ve?t("app.setup.UpdateVPS"):void 0}doUpdate(t){t||(e.emit("Settings.gaTrack","Check program update"),delete this._updateTriedAgain),this._doUpdate().then((e=>{this.startWatchingProgress(e.sessionId)})).catch((e=>{Je.error("updating failed",e)}))}startWatchingProgress(e){return this.sessionId=e,this.setup===Ge?this._watchIcarusStatus():this.setup===je?this._watchInstupStatus():void 0}}const Ze=Ve,et={virusDefinitions:"settings.update.virusDefinitions",vpsUpToDate:"settings.update.vpsUpToDate",vpsOutdated:"settings.update.vpsOutdated",vpsUpdateChecking:"settings.update.vpsUpdateChecking",vpsUpdateDownloading:"settings.update.vpsUpdateDownloading",vpsUpdateInstalling:"settings.update.vpsUpdateInstalling",updateFailed:"settings.update.updateFailed",releaseDateWas:"settings.update.releaseDateWas",version:"settings.update.versionShort",checkForUpdates:"settings.update.checkForUpdates",enableStreamingUpdate:"settings.update.enableStreamingUpdate",automaticUpdate:"settings.update.automaticUpdate",askWhenUpdateAvailable:"settings.update.askWhenUpdateAvailable",manualUpdate:"settings.update.manualUpdate",moreOptions:"settings.moreOptions",lessOptions:"settings.lessOptions"};function tt(){return{version:{id:"settings-update-vps-version",search:et.version},checkForUpdatesBtn:{id:"settings-update-vps-checkForUpdates",label:u(et.checkForUpdates),search:{title:et.checkForUpdates,others:[et.automaticUpdate,et.askWhenUpdateAvailable,et.manualUpdate],napiEvent:"settings.update.showVpsUpdate"}},vpsUpdate:{id:"settings-update-vps-update",track:{subject:"VPS update"},path:"avcfg://settings/Common/VPSUpdate",options:[{label:u(et.automaticUpdate),value:"Auto"},{label:u(et.askWhenUpdateAvailable),value:"Ask"},{label:u(et.manualUpdate),value:"Manual"}]},streamingUpdate:{id:"settings-update-vps-enableStreamingUpdate",label:u(et.enableStreamingUpdate),track:{subject:"Streaming update"},path:"avcfg://settings/Common/StreamingUpdates",search:{title:et.enableStreamingUpdate,napiEvent:"settings.update.showVpsUpdate"}}}}const st=w.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"div",a:{class:"stg_update__row"},f:[{t:4,f:[{t:7,e:"Icon",a:{name:[{t:2,r:"vpsUpdateIcon.name"}],cssCls:["badge settings__icon -small color-",{t:2,r:"vpsUpdateIcon.color"}," ",{t:2,x:{r:["vpsUpdateIcon.color"],s:'_0=="critical"?"-triangle":""'}}," -bg"]}}," ",{t:7,e:"div",a:{class:"settings__indent"},f:[{t:4,f:[{t:7,e:"h4",a:{class:"h4 -margins"},f:[{t:3,x:{r:["nls","STRINGS.vpsUpToDate"],s:"_0(_1)"}}]}],n:50,x:{r:["vpsUpdateState","UPDATE_STATES.updated"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["vpsUpdateState","UPDATE_STATES.failed"],s:"_0===_1"},f:[{t:7,e:"h4",a:{class:"h4 color-critical -text -margins"},f:[{t:3,x:{r:["nls","STRINGS.updateFailed"],s:"_0(_1)"}}]}]},{t:4,n:50,x:{r:["vpsUpdateState","UPDATE_STATES.failed"],s:"!(_0===_1)"},f:[" ",{t:7,e:"h4",a:{class:"h4 color-critical -text -margins"},f:[{t:3,x:{r:["nls","STRINGS.vpsOutdated"],s:"_0(_1)"}}]}]}],x:{r:["vpsUpdateState","UPDATE_STATES.updated"],s:"_0===_1"}}," ",{t:7,e:"p",a:{class:"p -small -secondary"},f:[{t:3,x:{r:["nls","STRINGS.releaseDateWas","moment","vpsInfo.installedTime"],s:'_0(_1,_2(_3*1000).format("LLL"))'}},{t:7,e:"br"}," (",{t:7,e:"span",a:{id:[{t:2,r:"properties.version.id"}]},f:[{t:3,x:{r:["nls","STRINGS.version","vpsInfo.installedVersion"],s:"_0(_1,_2)"}}]},")"]}]}],n:50,x:{r:["UPDATE_STATES.updated","vpsUpdateState","UPDATE_STATES.outdated"],s:"_1===_0||_1===_2"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["vpsUpdateState","UPDATE_STATES.updating"],s:"_0===_1"},f:[{t:7,e:"span",a:{class:"spinner -tiny settings__icon"}}," ",{t:7,e:"div",a:{class:"settings__indent"},f:[{t:4,f:[{t:7,e:"h4",a:{class:"h4 -margins"},f:[{t:3,x:{r:["nls","STRINGS.vpsUpdateInstalling"],s:"_0(_1)"}}]}," ",{t:7,e:"Progress",a:{percentage:[{t:2,r:"vpsUpdateProgress"}],cssCls:"-standalone"}}],n:50,r:"vpsUpdateProgress"},{t:4,n:51,f:[{t:7,e:"h4",a:{class:"h4 -margins"},f:[{t:3,x:{r:["nls","STRINGS.vpsUpdateChecking"],s:"_0(_1)"}}]}," ",{t:7,e:"Progress",a:{percentage:"unknown",cssCls:"-standalone"}}],r:"vpsUpdateProgress"}]}]}],x:{r:["UPDATE_STATES.updated","vpsUpdateState","UPDATE_STATES.outdated"],s:"_1===_0||_1===_2"}}]}," ",{t:7,e:"div",a:{class:"settings__indent settings__row"},f:[{t:7,e:"button",a:{disabled:[{t:2,r:"runningUpdateTask"}],id:[{t:2,r:"properties.checkForUpdatesBtn.id"}],class:"btn -secondary","aria-label":[{t:2,r:"properties.checkForUpdatesBtn.label"}," - ",{t:2,x:{r:["nls","STRINGS.virusDefinitions"],s:"_0(_1)"}}]},v:{click:"doVpsUpdate"},f:[{t:2,r:"properties.checkForUpdatesBtn.label"}]}," ",{t:7,e:"button",a:{class:"a -icon-right g-margin-left--10"},v:{click:"toggleVpsUpdate"},f:[{t:4,f:[{t:3,x:{r:["nls","STRINGS.lessOptions"],s:"_0(_1)"}}],n:50,r:"showVpsUpdate"},{t:4,n:51,f:[{t:3,x:{r:["nls","STRINGS.moreOptions"],s:"_0(_1)"}}],r:"showVpsUpdate"}," ",{t:7,e:"Icon",a:{name:"chevron-down",cssCls:[{t:2,x:{r:["showVpsUpdate"],s:'_0?"g-rotate--180":""'}}]}}]}]}]}," ",{t:7,e:"Expander",a:{expanded:[{t:2,r:"showVpsUpdate"}]},f:[{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.vpsUpdate"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.streamingUpdate"}]}}]}],n:50,r:"vpsLoaded"}]},components:{Expander:Xe},data:()=>({STRINGS:et,UPDATE_STATES:Be,properties:tt(),icarusSetup:!1,vpsLoaded:!1,sessionId:null,vpsInfo:{installedVersion:null,installedTime:null,latestVersion:null},vpsUpdateState:null,vpsUpdateProgress:null,vpsUpdateIcon:{color:null,name:null},showVpsUpdate:!1,runningUpdateTask:null,slideEffectEnabled:!0}),oninit(){this.programUpdater=new Qe({setup:this.get("icarusSetup")?Ge:je,updater:Ze}),this.programUpdater.on("state",(e=>this.setState(e))),this.observe("checkRunningUpdate",(e=>{e&&e.task===Ze&&(this.programUpdater.startWatchingProgress(e.sessionId?e.sessionId:null),this.set("checkRunningUpdate",null))})),this.programUpdater.getState(),this.on("doVpsUpdate",(()=>this.programUpdater.doUpdate())),this.on("toggleVpsUpdate",this.toggle.bind(this,"showVpsUpdate"))},onteardown(){this.set("slideEffectEnabled",!1),this.programUpdater.destroy()},setState(e){e&&(e.info&&(this.set("vpsInfo",e.info),this.get("vpsLoaded")||(this.fire("loaded"),this.set("vpsLoaded",!0))),e.updateState&&e.updateState!==this.get("vpsUpdateState")&&(this.set("runningUpdateTask",e.updateState===Be.updating),this.setVpsUpdateIcon(e.updateState),this.set("vpsUpdateState",e.updateState)),e.progress&&this.set("vpsUpdateProgress",e.progress),e.updateState===Be.updated&&this.get("runningUpdateTask")&&this.set("runningUpdateTask",!1))},setVpsUpdateIcon(e){this.set("vpsUpdateIcon",Ke(e))}}),nt=r.createLogger("settings.update.proxy"),at={specificProxyTitle:"settings.update.specificProxyTitle",useSpecificProxy:"settings.update.useSpecificProxy",proxyType:"settings.update.proxy.type",proxyTypeNo:"settings.update.proxy.type.none",proxyTypePreconfig:"settings.update.proxy.type.preconfig",proxyTypeHttp:"settings.update.proxy.type.http",proxyTypeSocks4:"settings.update.proxy.type.socks4",proxyAddress:"settings.update.proxy.address",proxyPort:"settings.update.proxy.port",proxyAuthentication:"settings.update.proxy.authenticationType",proxyAuthenticationNo:"settings.update.proxy.authenticationType.no",proxyAuthenticationBasic:"settings.update.proxy.authenticationType.basic",proxyAuthenticationNtlm:"settings.update.proxy.authenticationType.ntlm",proxyUsername:"settings.update.proxy.username",proxyPassword:"settings.update.proxy.password"},ot={proxy:{id:"settings-update-program-proxy-enabled",search:{title:at.useSpecificProxy,desc:at.specificProxyTitle,others:[at.proxyType,at.proxyTypeHttp,at.proxyTypeSocks4,at.proxyAddress,at.proxyPort,at.proxyAuthentication,at.proxyAuthenticationNo,at.proxyAuthenticationBasic,at.proxyAuthenticationNtlm,at.proxyUsername,at.proxyPassword]}}},rt=w.extend({template:{v:3,t:[{t:7,e:"p",a:{class:"p -small -secondary g-margin-top--15"},f:[{t:3,x:{r:["nls","STRINGS.specificProxyTitle"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"proxyEnabled"}]},f:[{t:7,e:"form",a:{class:"stg_update__form"},f:[{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"proxy.type"}],inline:0}}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"proxy.address"}],inline:0}}]}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"proxy.port"}],inline:0}}]}," ",{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"proxy.authorization"}],inline:0}}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"proxy.userName"}],inline:0}}]}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"proxy.userPassword"}],inline:0}}]}]}]}]},data(){return{STRINGS:at,proxyEnabled:{id:"settings-update-program-proxy-enabled",label:u(at.useSpecificProxy),track:{subject:"Use proxy"},load:this.loadProxyEnabled.bind(this),change:this.changeProxyEnabled.bind(this)},proxy:{type:{id:"settings-update-program-proxy-type",label:u(at.proxyType),load:this.loadProxyProp.bind(this,"type"),change:this.changeProxyProp.bind(this,"type"),options:[{label:u(at.proxyTypeHttp),value:"http"},{label:u(at.proxyTypeSocks4),value:"socks4"}]},address:{id:"settings-update-program-proxy-address",label:u(at.proxyAddress),load:this.loadProxyProp.bind(this,"address"),change:this.changeProxyProp.bind(this,"address")},port:{id:"settings-update-program-proxy-port",label:u(at.proxyPort),load:this.loadProxyProp.bind(this,"port"),change:this.changeProxyProp.bind(this,"port"),regex:/\d+/},authorization:{id:"settings-update-program-proxy-authorization",label:u(at.proxyAuthentication),load:this.loadProxyProp.bind(this,"authorization"),change:this.changeProxyProp.bind(this,"authorization"),options:[{label:u(at.proxyAuthenticationNo),value:"none"},{label:u(at.proxyAuthenticationBasic),value:"basic"},{label:u(at.proxyAuthenticationNtlm),value:"ntlm"}]},userName:{id:"settings-update-program-proxy-userName",label:u(at.proxyUsername),load:this.loadProxyProp.bind(this,"userName"),change:this.changeProxyProp.bind(this,"userName")},userPassword:{id:"settings-update-program-proxy-userPassword",label:u(at.proxyPassword),load:this.loadProxyProp.bind(this,"userPassword"),change:this.changeProxyProp.bind(this,"userPassword"),type:"password"}}}},oninit(){this.observe("proxy.type.storedValue",(e=>{for(const t in this.get("proxy"))"port"===t&&void 0===this.proxyData.values.port?this.set("proxy.port.disabled",!0):this.set("proxy."+t+".disabled","none"===e)}),{init:!1})},loadProxyEnabled(){return this.loadProxyProp("type").then((e=>({locked:e.locked,value:"none"!==e.value})))},changeProxyEnabled(e){const s=e?"http":"none";return this.changeProxyProp("type",s).then((()=>{this.set("proxy.type.storedValue",s),t("app.settings.ApplySettings")}))},loadProxyProp(e){return this.loadProxy().then((t=>({locked:t.locked,value:t.values[e]})))},changeProxyProp(e,s){return this.proxyData.values[e]=s,t("app.settings.Set",{name:"proxy://Proxy/Common/Proxy",value:this.proxyData.values})},loadProxy(){return this.loadProxyPromise||(this.loadProxyPromise=t("app.settings.Get",{name:"proxy://Proxy/Common/Proxy"}).then((e=>(this.proxyData={values:e.value,locked:e.locked},this.proxyData))).catch((e=>{nt.error("loading proxy failed",e),delete this.loadProxyPromise}))),this.loadProxyPromise}}),it=Fe,lt={program:"settings.update.program",programUpToDate:"settings.update.programUpToDate",programOutdated:"settings.update.programOutdated",programUpdateChecking:"settings.update.programUpdateChecking",programUpdateDownloading:"settings.update.programUpdateDownloading",programUpdateInstalling:"settings.update.programUpdateInstalling",updateFailed:"settings.update.updateFailed",releaseDateWas:"settings.update.releaseDateWas",version:"settings.update.versionShort",build:"settings.update.build",checkForUpdates:"settings.update.checkForUpdates",automaticUpdate:"settings.update.automaticUpdate",askWhenUpdateAvailable:"settings.update.askWhenUpdateAvailable",askWhenUpdateDownloaded:"settings.update.askWhenUpdateDownloaded",manualUpdate:"settings.update.manualUpdate",moreOptions:"settings.moreOptions",lessOptions:"settings.lessOptions",restartNow:"settings.restartNow",restartNeededDesc:"settings.restartNeeded.desc"};function ct(){return{version:{id:"settings-update-program-version",search:lt.version},build:{id:"settings-update-program-build",search:lt.build},checkForUpdatesBtn:{id:"settings-update-program-checkForUpdates",label:u(lt.checkForUpdates),search:{title:lt.checkForUpdates,others:[lt.automaticUpdate,lt.askWhenUpdateDownloaded,lt.askWhenUpdateAvailable,lt.manualUpdate],napiEvent:"settings.update.showProgramUpdate"}},programUpdate:{id:"settings-update-program-update",track:{subject:"Program update"},path:"avcfg://settings/Common/ProgramUpdate",options:[{label:u(lt.automaticUpdate),value:"Auto"},{label:u(lt.askWhenUpdateDownloaded),value:"Download"},{label:u(lt.askWhenUpdateAvailable),value:"Ask"},{label:u(lt.manualUpdate),value:"Manual"}]}}}const dt=w.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"div",a:{class:"stg_update__row"},f:[{t:4,f:[{t:7,e:"Icon",a:{name:[{t:2,r:"programUpdateIcon.name"}],cssCls:["badge settings__icon -small color-",{t:2,r:"programUpdateIcon.color"}," ",{t:2,x:{r:["programUpdateIcon.color"],s:'_0=="critical"?"-triangle":""'}}," -bg"]}}," ",{t:7,e:"div",a:{class:"settings__indent"},f:[{t:4,f:[{t:7,e:"h4",a:{class:"h4 -margins"},f:[{t:3,x:{r:["nls","STRINGS.programUpToDate"],s:"_0(_1)"}}]}],n:50,x:{r:["programUpdateState","UPDATE_STATES.updated"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["programUpdateState","UPDATE_STATES.failed"],s:"_0===_1"},f:[{t:7,e:"h4",a:{class:"h4 color-critical -text -margins"},f:[{t:3,x:{r:["nls","STRINGS.updateFailed"],s:"_0(_1)"}}]}]},{t:4,n:50,x:{r:["programUpdateState","UPDATE_STATES.failed"],s:"!(_0===_1)"},f:[" ",{t:7,e:"h4",a:{class:"h4 color-critical -text -margins"},f:[{t:3,x:{r:["nls","STRINGS.programOutdated"],s:"_0(_1)"}}]}]}],x:{r:["programUpdateState","UPDATE_STATES.updated"],s:"_0===_1"}}," ",{t:7,e:"p",a:{class:"p -small -secondary"},f:[{t:3,x:{r:["nls","STRINGS.releaseDateWas","moment","programInfo.installedTime"],s:'_0(_1,_2(_3*1000).format("LLL"))'}},{t:7,e:"br"}," (",{t:7,e:"span",a:{id:[{t:2,r:"properties.version.id"}]},f:[{t:3,x:{r:["nls","STRINGS.version","programInfo.installedVersion"],s:"_0(_1,_2)"}}]}," - ",{t:7,e:"span",a:{id:[{t:2,r:"properties.build.id"}]},f:[{t:3,x:{r:["nls","STRINGS.build","programInfo.installedBuild"],s:"_0(_1,_2)"}}]},")"]}]}],n:50,x:{r:["UPDATE_STATES.updated","UPDATE_STATES.outdated","programUpdateState","UPDATE_STATES.failed"],s:"_2===_0||_2===_1||_2===_3"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["programUpdateState","UPDATE_STATES.updating"],s:"_0===_1"},f:[{t:7,e:"span",a:{class:"spinner -tiny settings__icon"}}," ",{t:7,e:"div",a:{class:"settings__indent"},f:[{t:4,f:[{t:7,e:"h4",a:{class:"h4 -margins"},f:[{t:3,x:{r:["nls","STRINGS.programUpdateInstalling"],s:"_0(_1)"}}]}," ",{t:7,e:"Progress",a:{percentage:[{t:2,r:"programUpdateProgress"}],cssCls:"-standalone"}}],n:50,r:"programUpdateProgress"},{t:4,n:51,f:[{t:7,e:"h4",a:{class:"h4 -margins"},f:[{t:3,x:{r:["nls","STRINGS.programUpdateChecking"],s:"_0(_1)"}}]}," ",{t:7,e:"Progress",a:{percentage:"unknown",cssCls:"-standalone"}}],r:"programUpdateProgress"}]}]}],x:{r:["UPDATE_STATES.updated","UPDATE_STATES.outdated","programUpdateState","UPDATE_STATES.failed"],s:"_2===_0||_2===_1||_2===_3"}}]}," ",{t:7,e:"div",a:{class:"settings__indent settings__row"},f:[{t:4,f:[{t:7,e:"p",a:{class:"p g-margin-bottom--5"},f:[{t:3,x:{r:["nls","STRINGS.restartNeededDesc"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{disabled:[{t:2,r:"runningUpdateTask"}],class:"btn -secondary"},v:{click:"restartNow"},f:[{t:3,x:{r:["nls","STRINGS.restartNow"],s:"_0(_1)"}}]}],n:50,r:"restartNeeded"},{t:4,n:51,f:[{t:7,e:"button",a:{disabled:[{t:2,r:"runningUpdateTask"}],id:[{t:2,r:"properties.checkForUpdatesBtn.id"}],class:"btn -secondary","aria-label":[{t:2,r:"properties.checkForUpdatesBtn.label"}," - ",{t:2,x:{r:["nls","STRINGS.program"],s:"_0(_1)"}}]},v:{click:"doProgramUpdate"},f:[{t:2,r:"properties.checkForUpdatesBtn.label"}]}," ",{t:7,e:"button",a:{class:"a -icon-right g-margin-left--10"},v:{click:"toggleProgramUpdate"},f:[{t:4,f:[{t:3,x:{r:["nls","STRINGS.lessOptions"],s:"_0(_1)"}}],n:50,r:"showProgramUpdate"},{t:4,n:51,f:[{t:3,x:{r:["nls","STRINGS.moreOptions"],s:"_0(_1)"}}],r:"showProgramUpdate"},{t:7,e:"Icon",a:{name:"chevron-down",cssCls:[{t:2,x:{r:["showProgramUpdate"],s:'_0?"g-rotate--180":""'}}]}}]}],r:"restartNeeded"}]}]}," ",{t:7,e:"Expander",a:{expanded:[{t:2,r:"showProgramUpdate"}]},f:[{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.programUpdate"}]}}," ",{t:7,e:"Proxy"}]}],n:50,r:"programLoaded"}]},components:{Expander:Xe,Proxy:rt},data:()=>({STRINGS:lt,UPDATE_STATES:Be,properties:ct(),icarusSetup:!1,restartNeeded:null,programLoaded:!1,sessionId:null,programInfo:{installedVersion:null,installedTime:null,installedBuild:null,latestVersion:null},programUpdateState:null,programUpdateProgress:null,showProgramUpdate:!1,runningUpdateTask:null}),oninit(){this.programUpdater=new Qe({setup:this.get("icarusSetup")?Ge:je,updater:it}),this.programUpdater.on("state",(e=>this.setState(e))),this.observe("checkRunningUpdate",(e=>{e&&e.task===it&&(this.programUpdater.startWatchingProgress(e.sessionId?e.sessionId:null),this.set("checkRunningUpdate",null))})),this.programUpdater.getState(),this.on("doProgramUpdate",(()=>this.programUpdater.doUpdate())),this.on("toggleProgramUpdate",this.toggle.bind(this,"showProgramUpdate")),this.on("restartNow",(()=>{t("app.avService.FixIssue",{issueId:"reboot_required"})}))},onteardown(){this.programUpdater.destroy()},setState(e){e&&(e.info&&(this.set("programInfo",e.info),this.get("programLoaded")||(this.fire("loaded"),this.set("programLoaded",!0))),e.updateState&&e.updateState!==this.get("programUpdateState")&&(this.set("runningUpdateTask",e.updateState===Be.updating),this.setProgramUpdateIcon(e.updateState),this.set("programUpdateState",e.updateState)),e.progress&&this.set("programUpdateProgress",e.progress),e.updateState!==Be.updating&&this.set("restartNeeded",this.isRestartNeeded()),e.updateState===Be.updated&&this.set("runningUpdateTask")&&this.set("runningUpdateTask",!1))},setProgramUpdateIcon(e){this.set("programUpdateIcon",Ke(e))},isRestartNeeded:()=>!!b.getIssues().reboot_required}),pt="settings.update";const ut=w.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"div",a:{class:"banner -simple g-margin-bottom--30"},f:[{t:7,e:"kin-icon",a:{name:"icon-m-action-download",size:"16",class:"banner__icon color-ok -text"}}," ",{t:7,e:"h4",a:{class:"h4 -text"},f:[{t:3,x:{r:["nls"],s:'_0("settings.update.upgrade2prem.title")'}}]}," ",{t:7,e:"p",a:{class:"text -small -margins"},f:[{t:3,x:{r:["nls"],s:'_0("settings.update.upgrade2prem.desc")'}}]}," ",{t:7,e:"button",a:{class:"btn -primary"},v:{click:{m:"showUpgradeModal",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls"],s:'_0("global.updateNow")'}}]}]}],n:50,r:"showUpgrade"},{t:7,e:"SettingsContainer",a:{title:[{t:2,r:"title"}]},f:[{t:4,f:[{t:7,e:"kin-loading",a:{fullscreen:"true"}}],n:50,x:{r:["programLoaded","vpsLoaded"],s:"!_0&&!_1"}}," ",{t:4,f:[{t:7,e:"Vps",a:{runningUpdateTask:[{t:2,r:"runningUpdateTask"}],icarusSetup:[{t:2,r:"icarusSetup"}],sessionId:[{t:2,r:"sessionId"}]},m:[{t:2,r:"checkRunningUpdate"}]}," ",{t:7,e:"Program",a:{runningUpdateTask:[{t:2,r:"runningUpdateTask"}],icarusSetup:[{t:2,r:"icarusSetup"}],sessionId:[{t:2,r:"sessionId"}]},m:[{t:2,r:"checkRunningUpdate"}]}],n:50,r:"setupLoaded"}]}," ",{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls"],s:'_0("settings.update.upgrade2prem.modal.title")'}}]},f:[{t:7,e:"div",a:{class:"modal"},f:[{t:7,e:"p",a:{class:"text -small"},f:[{t:3,x:{r:["nls"],s:'_0("settings.update.upgrade2prem.desc")'}}]}]}," ",{t:7,e:"div",a:{class:"modal__footer"},f:[{t:7,e:"button",a:{class:"btn -primary"},v:{click:{m:"upgrade2premium",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls"],s:'_0("global.updateNow")'}}]}," ",{t:7,e:"button",a:{class:"btn -secondary"},v:{click:"Modal.close"},f:[{t:3,x:{r:["nls"],s:'_0("settings.update.doItLater")'}}]}]}]}],n:50,r:"showUpgradeModal"}]},css:Oe,router:new i,components:{Vps:st,Program:dt},data:()=>({title:u(pt),setupLoaded:!1,programLoaded:!1,vpsLoaded:!1,icarusSetup:!1,sessionId:null,runningUpdateTask:!1,checkRunningUpdate:null,showUpgrade:null}),oninit(){this.checkSetupType(),this.on("Vps.loaded",(()=>{this.set("vpsLoaded",!0)})),this.on("Program.loaded",(()=>{this.set("programLoaded",!0)})),this.router.on("/",(()=>{})),this.router.on("/cpp",(()=>{location.hash=location.hash.replace("/cpp",""),this.checkSetupType()})),_.isVersionSupported("19.7")&&["suite","pro_av"].includes(b.getProduct())&&(this.on("Modal.close",(()=>{this.set("showUpgradeModal",!1)})),this.set("showUpgrade",!0))},onteardown(){this.router.removeAllListeners()},checkSetupType(){t("app.setup.GetType").then((e=>{e.name===Ge&&this.set("icarusSetup",!0)})).finally((()=>{this.set("setupLoaded",!0),this.checkRunningUpdate()}))},checkRunningUpdate(){this.get("icarusSetup")?t("app.icarus.GetStatus").then((e=>{e.sessions&&(this.set("runningUpdateTask",!0),this.set("checkRunningUpdate",{task:e.sessions[0].task,sessionId:e.sessions[0].sessionId}))})):t("app.setup.GetStatus").then((e=>{this.set("runningUpdateTask",!0),this.set("checkRunningUpdate",{task:e.task})}))},showUpgradeModal(){this.set("showUpgradeModal",!0)},upgrade2premium(){t("app.setup.ChangeProduct",{edition:12}),this.set("showUpgradeModal",!1)}}),gt={title:"settings.notifications",silentMode:"settings.notifications.silentMode.label",showIcon:"settings.notifications.showIcon.label",animateIcon:"settings.notifications.animateIcon.label",enableSounds:"settings.notifications.enableSounds.label",externalDriveScanOffer:"settings.notifications.externalDriveScanOffer.label"};function ht(){const e={silentMode:{id:"settings-notifications-silentMode",label:u(gt.silentMode),track:{subject:"Silent mode"},path:"avcfg://settings/Common/PropertySilent",search:gt.silentMode},showTaskbarIcon:{id:"settings-notifications-showIcon",label:u(gt.showIcon),track:{subject:"Show icon"},path:"avcfg://settings/AAVM/ShowTaskbarIcon",applyOnChange:!0,search:gt.showIcon},animateIcon:{id:"settings-notifications-animateIcon",label:u(gt.animateIcon),track:{subject:"Animate icon"},path:"avcfg://settings/UserInterface/AnimateIcon",search:gt.animateIcon},soundsEnabled:{id:"settings-notifications-enableSounds",label:u(gt.enableSounds),track:{subject:"Enable sounds"},path:"avcfg://settings/Common/SoundsEnabled",search:gt.enableSounds,changeEvent:"soundsEnabled"}};return _.isVersionSupported("20.5")&&(e.externalDriveScanOffer={id:"settings-notifications-externalDriveScanOffer",label:u(gt.externalDriveScanOffer),track:{subject:"Offer to scan external drives"},path:"avcfg://settings/Common/ExternalDriveScanOffer",search:gt.externalDriveScanOffer}),e}const mt=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.silentMode"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.showTaskbarIcon"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.animateIcon"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.soundsEnabled"}]}}," ",{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.externalDriveScanOffer"}]}}],n:50,r:"properties.externalDriveScanOffer"}]}]},data:()=>({STRINGS:gt,properties:ht()})});var ft=".stg_exception_form .form__row {\n display: flex;\n min-height: 0;\n}\n.stg_exception_form .input__row {\n display: inline-block;\n width: 100%;\n}\n.stg_exception_form .input__row:first-child {\n margin-right: 30px;\n}\n.stg_exception_form .modal__actions {\n margin-top: 15px;\n}\n.stg__tooltip {\n max-width: 500px;\n}\n";Le(ft);var bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var _t,vt,St=(function(e,t){var s="__lodash_hash_undefined__",n=1/0,a=9007199254740991,o="[object Arguments]",r="[object Array]",i="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",p="[object Map]",u="[object Number]",g="[object Object]",h="[object Promise]",m="[object RegExp]",f="[object Set]",b="[object String]",_="[object Symbol]",v="[object WeakMap]",S="[object ArrayBuffer]",y="[object DataView]",x=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,w=/^\w*$/,k=/^\./,T=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A=/\\(\\)?/g,I=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,P={};P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P[o]=P[r]=P[S]=P[i]=P[y]=P[l]=P[c]=P[d]=P[p]=P[u]=P[g]=P[m]=P[f]=P[b]=P[v]=!1;var C="object"==typeof bt&&bt&&bt.Object===Object&&bt,L="object"==typeof self&&self&&self.Object===Object&&self,N=C||L||Function("return this")(),R=t&&!t.nodeType&&t,M=R&&e&&!e.nodeType&&e,D=M&&M.exports===R&&C.process,$=function(){try{return D&&D.binding("util")}catch(e){}}(),U=$&&$.isTypedArray;function O(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}function G(e,t){return!(!e||!e.length)&&function(e,t,s){if(t!=t)return function(e,t,s,n){for(var a=e.length,o=s+(n?1:-1);n?o--:++o<a;)if(t(e[o],o,e))return o;return-1}(e,B,s);for(var n=s-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}(e,t,0)>-1}function j(e,t,s){for(var n=-1,a=e?e.length:0;++n<a;)if(s(t,e[n]))return!0;return!1}function V(e,t){for(var s=-1,n=t.length,a=e.length;++s<n;)e[a+s]=t[s];return e}function F(e,t){for(var s=-1,n=e?e.length:0;++s<n;)if(t(e[s],s,e))return!0;return!1}function B(e){return e!=e}function z(e,t){return e.has(t)}function W(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(s){}return t}function H(e){var t=-1,s=Array(e.size);return e.forEach((function(e,n){s[++t]=[n,e]})),s}function q(e){var t=-1,s=Array(e.size);return e.forEach((function(e){s[++t]=e})),s}var Y,K=Array.prototype,X=Function.prototype,J=Object.prototype,Q=N["__core-js_shared__"],Z=(Y=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",ee=X.toString,te=J.hasOwnProperty,se=J.toString,ne=RegExp("^"+ee.call(te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ae=N.Symbol,oe=N.Uint8Array,re=J.propertyIsEnumerable,ie=K.splice,le=ae?ae.isConcatSpreadable:void 0,ce=function(e,t){return function(s){return e(t(s))}}(Object.keys,Object),de=Math.max,pe=Be(N,"DataView"),ue=Be(N,"Map"),ge=Be(N,"Promise"),he=Be(N,"Set"),me=Be(N,"WeakMap"),fe=Be(Object,"create"),be=Qe(pe),_e=Qe(ue),ve=Qe(ge),Se=Qe(he),ye=Qe(me),xe=ae?ae.prototype:void 0,we=xe?xe.valueOf:void 0,ke=xe?xe.toString:void 0;function Te(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var n=e[t];this.set(n[0],n[1])}}function Ae(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var n=e[t];this.set(n[0],n[1])}}function Ie(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var n=e[t];this.set(n[0],n[1])}}function Ee(e){var t=-1,s=e?e.length:0;for(this.__data__=new Ie;++t<s;)this.add(e[t])}function Pe(e){this.__data__=new Ae(e)}function Ce(e,t){var s=nt(e)||st(e)?function(e,t){for(var s=-1,n=Array(e);++s<e;)n[s]=t(s);return n}(e.length,String):[],n=s.length,a=!!n;for(var o in e)!t&&!te.call(e,o)||a&&("length"==o||He(o,n))||s.push(o);return s}function Le(e,t){for(var s=e.length;s--;)if(tt(e[s][0],t))return s;return-1}function Ne(e,t,s,n,a){var o=-1,r=e.length;for(s||(s=We),a||(a=[]);++o<r;){var i=e[o];t>0&&s(i)?t>1?Ne(i,t-1,s,n,a):V(a,i):n||(a[a.length]=i)}return a}function Re(e,t){for(var s=0,n=(t=qe(t,e)?[t]:Ge(t)).length;null!=e&&s<n;)e=e[Je(t[s++])];return s&&s==n?e:void 0}function Me(e,t){return null!=e&&t in Object(e)}function De(e,t,s,n,a){return e===t||(null==e||null==t||!lt(e)&&!ct(t)?e!=e&&t!=t:function(e,t,s,n,a,d){var h=nt(e),v=nt(t),x=r,w=r;h||(x=(x=ze(e))==o?g:x),v||(w=(w=ze(t))==o?g:w);var k=x==g&&!W(e),T=w==g&&!W(t),A=x==w;if(A&&!k)return d||(d=new Pe),h||pt(e)?Ve(e,t,s,n,a,d):function(e,t,s,n,a,o,r){switch(s){case y:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!n(new oe(e),new oe(t)));case i:case l:case u:return tt(+e,+t);case c:return e.name==t.name&&e.message==t.message;case m:case b:return e==t+"";case p:var d=H;case f:var g=2&o;if(d||(d=q),e.size!=t.size&&!g)return!1;var h=r.get(e);if(h)return h==t;o|=1,r.set(e,t);var v=Ve(d(e),d(t),n,a,o,r);return r.delete(e),v;case _:if(we)return we.call(e)==we.call(t)}return!1}(e,t,x,s,n,a,d);if(!(2&a)){var I=k&&te.call(e,"__wrapped__"),E=T&&te.call(t,"__wrapped__");if(I||E){var P=I?e.value():e,C=E?t.value():t;return d||(d=new Pe),s(P,C,n,a,d)}}return!!A&&(d||(d=new Pe),function(e,t,s,n,a,o){var r=2&a,i=ut(e),l=i.length,c=ut(t).length;if(l!=c&&!r)return!1;for(var d=l;d--;){var p=i[d];if(!(r?p in t:te.call(t,p)))return!1}var u=o.get(e);if(u&&o.get(t))return u==t;var g=!0;o.set(e,t),o.set(t,e);for(var h=r;++d<l;){var m=e[p=i[d]],f=t[p];if(n)var b=r?n(f,m,p,t,e,o):n(m,f,p,e,t,o);if(!(void 0===b?m===f||s(m,f,n,a,o):b)){g=!1;break}h||(h="constructor"==p)}if(g&&!h){var _=e.constructor,v=t.constructor;_==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof v&&v instanceof v||(g=!1)}return o.delete(e),o.delete(t),g}(e,t,s,n,a,d))}(e,t,De,s,n,a))}function $e(e){return!(!lt(e)||function(e){return!!Z&&Z in e}(e))&&(rt(e)||W(e)?ne:I).test(Qe(e))}function Ue(e){return"function"==typeof e?e:null==e?gt:"object"==typeof e?nt(e)?function(e,t){return qe(e)&&Ye(t)?Ke(Je(e),t):function(s){var n=function(e,t,s){var n=null==e?void 0:Re(e,t);return void 0===n?s:n}(s,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,s){t=qe(t,e)?[t]:Ge(t);for(var n,a=-1,o=t.length;++a<o;){var r=Je(t[a]);if(!(n=null!=e&&s(e,r)))break;e=e[r]}return n||!!(o=e?e.length:0)&&it(o)&&He(r,o)&&(nt(e)||st(e))}(e,t,Me)}(s,e):De(t,n,void 0,3)}}(e[0],e[1]):1==(s=function(e){for(var t=ut(e),s=t.length;s--;){var n=t[s],a=e[n];t[s]=[n,a,Ye(a)]}return t}(t=e)).length&&s[0][2]?Ke(s[0][0],s[0][1]):function(e){return e===t||function(e,t,s,n){var a=s.length,o=a,r=!n;if(null==e)return!o;for(e=Object(e);a--;){var i=s[a];if(r&&i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var l=(i=s[a])[0],c=e[l],d=i[1];if(r&&i[2]){if(void 0===c&&!(l in e))return!1}else{var p=new Pe;if(n)var u=n(c,d,l,e,t,p);if(!(void 0===u?De(d,c,n,3,p):u))return!1}}return!0}(e,t,s)}:qe(n=e)?(a=Je(n),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Re(t,e)}}(n);var t,s,n,a}function Oe(e){if(s=(t=e)&&t.constructor,n="function"==typeof s&&s.prototype||J,t!==n)return ce(e);var t,s,n,a=[];for(var o in Object(e))te.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Ge(e){return nt(e)?e:Xe(e)}Te.prototype.clear=function(){this.__data__=fe?fe(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__;if(fe){var n=t[e];return n===s?void 0:n}return te.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:te.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?s:t,this},Ae.prototype.clear=function(){this.__data__=[]},Ae.prototype.delete=function(e){var t=this.__data__,s=Le(t,e);return!(s<0||(s==t.length-1?t.pop():ie.call(t,s,1),0))},Ae.prototype.get=function(e){var t=this.__data__,s=Le(t,e);return s<0?void 0:t[s][1]},Ae.prototype.has=function(e){return Le(this.__data__,e)>-1},Ae.prototype.set=function(e,t){var s=this.__data__,n=Le(s,e);return n<0?s.push([e,t]):s[n][1]=t,this},Ie.prototype.clear=function(){this.__data__={hash:new Te,map:new(ue||Ae),string:new Te}},Ie.prototype.delete=function(e){return Fe(this,e).delete(e)},Ie.prototype.get=function(e){return Fe(this,e).get(e)},Ie.prototype.has=function(e){return Fe(this,e).has(e)},Ie.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,s),this},Ee.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.clear=function(){this.__data__=new Ae},Pe.prototype.delete=function(e){return this.__data__.delete(e)},Pe.prototype.get=function(e){return this.__data__.get(e)},Pe.prototype.has=function(e){return this.__data__.has(e)},Pe.prototype.set=function(e,t){var s=this.__data__;if(s instanceof Ae){var n=s.__data__;if(!ue||n.length<199)return n.push([e,t]),this;s=this.__data__=new Ie(n)}return s.set(e,t),this};var je=he&&1/q(new he([,-0]))[1]==n?function(e){return new he(e)}:function(){};function Ve(e,t,s,n,a,o){var r=2&a,i=e.length,l=t.length;if(i!=l&&!(r&&l>i))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,p=!0,u=1&a?new Ee:void 0;for(o.set(e,t),o.set(t,e);++d<i;){var g=e[d],h=t[d];if(n)var m=r?n(h,g,d,t,e,o):n(g,h,d,e,t,o);if(void 0!==m){if(m)continue;p=!1;break}if(u){if(!F(t,(function(e,t){if(!u.has(t)&&(g===e||s(g,e,n,a,o)))return u.add(t)}))){p=!1;break}}else if(g!==h&&!s(g,h,n,a,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function Fe(e,t){var s,n,a=e.__data__;return("string"==(n=typeof(s=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function Be(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return $e(s)?s:void 0}var ze=function(e){return se.call(e)};function We(e){return nt(e)||st(e)||!!(le&&e&&e[le])}function He(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||E.test(e))&&e>-1&&e%1==0&&e<t}function qe(e,t){if(nt(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!dt(e))||w.test(e)||!x.test(e)||null!=t&&e in Object(t)}function Ye(e){return e==e&&!lt(e)}function Ke(e,t){return function(s){return null!=s&&s[e]===t&&(void 0!==t||e in Object(s))}}(pe&&ze(new pe(new ArrayBuffer(1)))!=y||ue&&ze(new ue)!=p||ge&&ze(ge.resolve())!=h||he&&ze(new he)!=f||me&&ze(new me)!=v)&&(ze=function(e){var t=se.call(e),s=t==g?e.constructor:void 0,n=s?Qe(s):void 0;if(n)switch(n){case be:return y;case _e:return p;case ve:return h;case Se:return f;case ye:return v}return t});var Xe=et((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(dt(e))return ke?ke.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var s=[];return k.test(e)&&s.push(""),e.replace(T,(function(e,t,n,a){s.push(n?a.replace(A,"$1"):t||e)})),s}));function Je(e){if("string"==typeof e||dt(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Qe(e){if(null!=e){try{return ee.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Ze=function(e,t){return t=de(void 0===t?e.length-1:t,0),function(){for(var s=arguments,n=-1,a=de(s.length-t,0),o=Array(a);++n<a;)o[n]=s[t+n];n=-1;for(var r=Array(t+1);++n<t;)r[n]=s[n];return r[t]=o,O(e,this,r)}}((function(e){var t,s,n=(s=(t=e)?t.length:0)?t[s-1]:void 0;return ot(n)&&(n=void 0),function(e,t,s){var n=-1,a=G,o=e.length,r=!0,i=[],l=i;if(s)r=!1,a=j;else if(o>=200){var c=t?null:je(e);if(c)return q(c);r=!1,a=z,l=new Ee}else l=t?[]:i;e:for(;++n<o;){var d=e[n],p=t?t(d):d;if(d=s||0!==d?d:0,r&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),i.push(d)}else a(l,p,s)||(l!==i&&l.push(p),i.push(d))}return i}(Ne(e,1,ot,!0),Ue(n))}));function et(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=s.cache;if(o.has(a))return o.get(a);var r=e.apply(this,n);return s.cache=o.set(a,r),r};return s.cache=new(et.Cache||Ie),s}function tt(e,t){return e===t||e!=e&&t!=t}function st(e){return ot(e)&&te.call(e,"callee")&&(!re.call(e,"callee")||se.call(e)==o)}et.Cache=Ie;var nt=Array.isArray;function at(e){return null!=e&&it(e.length)&&!rt(e)}function ot(e){return ct(e)&&at(e)}function rt(e){var t=lt(e)?se.call(e):"";return t==d||"[object GeneratorFunction]"==t}function it(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function lt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==typeof e}function dt(e){return"symbol"==typeof e||ct(e)&&se.call(e)==_}var pt=U?function(e){return function(t){return e(t)}}(U):function(e){return ct(e)&&it(e.length)&&!!P[se.call(e)]};function ut(e){return at(e)?Ce(e):Oe(e)}function gt(e){return e}e.exports=Ze}(vt={path:_t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&vt.path)}},vt.exports),vt.exports);const yt=/"/g,xt="file",wt="url",kt="cmdLine",Tt=[{path:"avcfg://exclusions/Global/ExcludeFiles",type:xt},{path:"avcfg://exclusions/Global/ExcludeUrls",type:wt},{path:"avcfg://exclusions/Global/ExcludeCommandLine",type:kt}],At={title:"settings.exceptions",desc:"settings.exceptions.desc",addException:"settings.exceptions.addException",addExceptionDesc:"settings.exceptions.addException.desc",newExceptionPlaceholder:"settings.exceptions.newException.placeholder",newExceptionError:"settings.exceptions.newException.error.invalid",exceptionType:{file:"settings.exceptions.type.file",url:"settings.exceptions.type.url",cmdLine:"settings.exceptions.type.cmdLine"},noExceptions:"settings.exceptions.noExceptions",browse:"global.browse"},It={title:At.title,desc:At.desc},Et=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}]},f:[{t:7,e:"div",f:[{t:7,e:"button",a:{class:"btn",disabled:[{t:2,r:"locked"}]},v:{click:"showAddDialog"},f:[{t:3,x:{r:["nls","STRINGS.addException"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"SettingsBadge",a:{cssCls:"g-margin-left--20"}}],n:50,r:"locked"}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"g-margin-top--30"},f:[{t:7,e:"div",a:{class:"text g-margin-right--10 -small -secondary g-ellipsis"},f:[{t:3,x:{r:["nls"],s:'_0("global.filterBy")'}}]}," ",{t:7,e:"span",a:{class:"g-margin-right--20 g-display--inline-block"},f:[{t:7,e:"input",a:{id:"selTypeFile",class:"checkbox",type:"checkbox",checked:[{t:2,r:"selectedTypes.file"}]}}," ",{t:7,e:"label",a:{class:"checkbox__label",for:"selTypeFile"},f:[{t:3,x:{r:["nls","STRINGS.exceptionType.file"],s:"_0(_1)"}}]}]}," ",{t:7,e:"span",a:{class:"g-margin-right--20 g-display--inline-block"},f:[{t:7,e:"input",a:{id:"selTypeUrl",class:"checkbox",type:"checkbox",checked:[{t:2,r:"selectedTypes.url"}]}}," ",{t:7,e:"label",a:{class:"checkbox__label",for:"selTypeUrl"},f:[{t:3,x:{r:["nls","STRINGS.exceptionType.url"],s:"_0(_1)"}}]}]}," ",{t:7,e:"span",a:{class:"g-display--inline-block"},f:[{t:7,e:"input",a:{id:"selTypeCmdLine",class:"checkbox",type:"checkbox",checked:[{t:2,r:"selectedTypes.cmdLine"}]}}," ",{t:7,e:"label",a:{class:"checkbox__label",for:"selTypeCmdLine"},f:[{t:3,x:{r:["nls","STRINGS.exceptionType.cmdLine"],s:"_0(_1)"}}]}]}]}," ",{t:4,f:[{t:7,e:"table",a:{class:"table -small -fixed g-margin-top--10"},f:[{t:7,e:"colgroup",f:[{t:7,e:"col",a:{width:"90%"}}," ",{t:7,e:"col",a:{width:"10%"}}]}," ",{t:4,f:[{t:7,e:"tr",f:[{t:7,e:"td",f:[{t:4,f:[{t:7,e:"p",a:{id:["exception-tooltip-opener-",{t:2,r:"index"}],class:"p -small -full -secondary g-ellipsis"},f:[{t:2,r:"value"}]}],n:50,r:"locked"},{t:4,n:51,f:[{t:7,e:"input",a:{id:["exception-tooltip-opener-",{t:2,r:"index"}],type:"text",value:[{t:2,r:"value"}],class:"input -blank -small -full ats_list-input",lazy:"500"},v:{keyup:"inputKeyup",blur:"editException"}}],r:"locked"}," ",{t:7,e:"TooltipX",a:{cssCls:"stg__tooltip",showOnEllipsis:"true",openerSelector:["#exception-tooltip-opener-",{t:2,r:"index"}],placement:"bottom-start",boundariesSelector:".settings__content"},f:[{t:7,e:"div",a:{class:"text -small -secondary"},f:[{t:2,r:"value"}]}]}]}," ",{t:7,e:"td",a:{class:"table__delete"},f:[{t:4,f:[{t:7,e:"button",a:{class:"a",title:[{t:3,x:{r:["nls"],s:'_0("global.remove")'}}]},v:{click:"removeException"},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-bin",size:"16"}}]}],n:50,x:{r:["locked"],s:"!_0"}}]}]}],n:52,i:"index",r:"selectedExceptions"}]}],n:50,r:"selectedExceptions.length"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"g-margin-top--15 p -secondary -small"},f:[{t:3,x:{r:["nls","STRINGS.noExceptions"],s:"_0(_1)"}}]}],r:"selectedExceptions.length"}],n:50,r:"showExceptionList"}]}," ",{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls","STRINGS.addException"],s:"_0(_1)"}}],subtitle:[{t:3,x:{r:["nls","STRINGS.addExceptionDesc"],s:"_0(_1)"}}]},f:[{t:7,e:"form",a:{onsubmit:"return false"},f:[{t:7,e:"div",a:{class:"form__row"},f:[{t:7,e:"Input",a:{id:"newException",innerValue:[{t:2,r:"newException"}],type:"text",label:[{t:3,x:{r:["nls","STRINGS.newExceptionPlaceholder"],s:"_0(_1)"}}],error:[{t:2,x:{r:["newExceptionError"],s:"!!_0"}}],message:[{t:2,r:"newExceptionError"}],autofocus:0}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",a:{class:"btn -primary"},v:{click:"addException"},f:[{t:3,x:{r:["nls","STRINGS.addException"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary"},v:{click:"selectFileExceptions"},f:[{t:3,x:{r:["nls","STRINGS.browse"],s:"_0(_1)"}}]}]}]}," ",{t:7,e:"button",a:{class:"a -secondary g-float--right "},v:{click:"toggleExpansion"},f:[{t:3,x:{r:["isExpanded","nls"],s:'_0?_1("global.less"):_1("global.more")'}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"strike g-margin-top--40 g-margin-bottom--20"}}," ",{t:7,e:"h2",a:{class:"modal__title h2"},f:[{t:3,x:{r:["nls"],s:'_0("settings.exceptions.addCmdLineException")'}}]}," ",{t:7,e:"p",a:{class:"modal__subtitle"},f:[{t:3,x:{r:["nls"],s:'_0("settings.exceptions.addCmdLineException.desc")'}}]}," ",{t:7,e:"form",a:{onsubmit:"return false",class:"stg_exception_form"},f:[{t:7,e:"div",a:{class:"form__row g-margin-top--10"},f:[{t:7,e:"Input",a:{id:"processNameException",innerValue:[{t:2,r:"processNameException"}],type:"text",label:[{t:3,x:{r:["nls"],s:'_0("settings.exceptions.processNameException.placeholder")'}}],error:[{t:2,x:{r:["processNameExceptionError"],s:"!!_0"}}],message:[{t:2,r:"processNameExceptionError"}],autofocus:0}}," ",{t:7,e:"Input",a:{id:"cmdLineParamsException",innerValue:[{t:2,r:"cmdLineParamsException"}],type:"text",label:[{t:3,x:{r:["nls"],s:'_0("settings.exceptions.cmdLineParamsException.placeholder")'}}],error:[{t:2,x:{r:["cmdLineParamsExceptionError"],s:"!!_0"}}],message:[{t:2,r:"cmdLineParamsExceptionError"}]}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",a:{class:"btn -primary"},v:{click:"addCmdLineException"},f:[{t:3,x:{r:["nls"],s:'_0("settings.exceptions.addCmdLineException")'}}]}]}]}],n:50,r:"isExpanded"}]}],n:50,r:"addDialog"}]},css:ft,data:()=>({STRINGS:At,addDialog:!1,newException:null,newExceptionError:null,processNameException:null,processNameExceptionError:null,cmdLineParamsException:null,cmdLineParamsExceptionError:null,locked:!1,exceptions:[],isExpanded:!1,selectedTypes:{file:!0,url:!0,cmdLine:!0}}),computed:{selectedExceptions(){return this.get("exceptions").filter((e=>this.get("selectedTypes."+e.type)))},showExceptionList(){return this.get("exceptions").length>0}},oninit(){this.offSettingsChanged=e.on("app.settings.onStatusChanged",(()=>{this.getData(null,!0).then((()=>{this.setLocked(),this.setExceptions()}))})),this.setLocked(),this.setExceptions(),this.on("showAddDialog",this.showAddDialog.bind(this)),this.on("Modal.modalClose",this.closeAddDialog.bind(this,!0)),this.on("addException",this.addException.bind(this)),this.on("addCmdLineException",this.addCmdLineException.bind(this)),this.on("selectFileExceptions",this.selectFileExceptions.bind(this)),this.on("removeException",(e=>this.removeException(e.context))),this.on("inputKeyup",this.inputKeyUp),this.on("toggleExpansion",this.toggleExpansion.bind(this)),this.on("editException",(e=>this.editException({...e.context,...e.index}))),this.observe("selectedTypes.*",((t,s,n)=>{const a=n.split(".")[1];e.emit("Settings.gaTrack",(t?"Show ":"Hide ")+a+" exceptions")}),{init:!1})},onteardown(){this.offSettingsChanged()},getData(e,s){if(!this.getDataPromise||s){const e=Tt.map((e=>t("app.settings.Get",{name:e.path})));this.getDataPromise=Promise.all(e).then((e=>{const t={};return e.forEach(((e,s)=>{t[Tt[s].path]=e||{},null==e&&console.warn("Exceptions: list resposne is empty",Tt[s])})),t}))}return this.getDataPromise.then((t=>e?t[e]:t))},setLocked(){this.getData().then((e=>Tt.some((t=>e[t.path].locked)))).then((e=>{this.set("locked",e)}))},setExceptions(){const e=Tt.map((e=>this.getList(e)));return Promise.all(e).then((e=>St.apply(null,e.concat(["value"])))).then((e=>{this.set("exceptions",e)}))},saveExceptions(e){const t=Tt.find((t=>t.type===e)),s=this.get("exceptions").filter((t=>t.type===e));return this.saveList(t,s)},addFolderWildcard(e,t,s){if(!t)return e;const n=e.slice(-1);return n===s?e+"*":"*"!==n?e+`${s}*`:e},fixFolderFormat(e){if(!isNaN(+e)||"*"===e[e.length-1])return Promise.resolve(e);const s=e.indexOf("/")>-1?"/":"\\";return t("app.utils.GetFileAttributes",e).then((t=>this.addFolderWildcard(e,t.directory,s))).catch((()=>{const t=-1===e.split(s).pop().indexOf(".");return this.addFolderWildcard(e,t,s)}))},fixUrlFormat(e){if(!isNaN(+e)||e&&0===e.length)return Promise.resolve(e);"*"!==e.slice(-1)&&("/"!==e.slice(-1)?e.indexOf("://")+3<e.lastIndexOf("/")&&e.lastIndexOf("/")<e.lastIndexOf(".")?e+="*":e+="/*":e+="*");const t=[];return-1===e.indexOf("://")?t.push("http://"+e,"https://"+e):t.push(e),Promise.resolve(t.reduce(((e,s)=>{const n=s.match(/(^(?:(\w{2,})?:\/\/)?(?:[^@/\n]+@)?(\[[^\]]{2,}\]|[^:/?\n]+))/);if(n.length>1){e.push(s);const a=n[1]+"/*";t.includes(a)||e.push(a)}else e.push(s);return e}),[]))},getList(e){return this.getData(e.path).then((t=>{let s=[];return t.value&&(s=t.value.split(";").map((t=>{let s;return s=e.type==kt?this.decodeCmdLineExceptionValue(t):t.replace(yt,""),{value:s,type:e.type}}))),s}))},saveList(e,s){const n=s.map((t=>e.type==kt?this.encodeCmdLineExceptionValue(t.value):'"'+t.value+'"')).join(";");return t("app.settings.Set",{name:e.path,value:n})},encodeCmdLineExceptionValue(e){let t,s,n="",a="",o="";/^['"`]/.test(e[0])?(t=1,s=e.search(/.['"`]/)+1):(t=0,s=e.search(/\s/)),n=e.substring(t,s).trim(),a=e.substring(s+1).trim();try{o=btoa(a)}catch{console.log("unable to convert to base64",a)}const r=`${n};${o}`;let i="";try{i=btoa(r)}catch{console.log("unable to convert cmdLineEx to base64",r)}return i},decodeCmdLineExceptionValue(e){const t=atob(e),s=t.lastIndexOf(";"),n=t.substring(s+1)||"";let a,o=t.substring(0,s);o=this.addQuotesToProcessNameIfNeeded(o);try{a=atob(n)}catch{console.log("invalid based64 args")}return`${o} ${a}`},selectFileExceptions(){t("app.utils.SelectFolders").then((e=>{if("ok"===e.dialogReturnCode){const t=e.paths.split(";").map((e=>e.replace(yt,"")));this.addFileExceptions(t),this.closeAddDialog()}}))},addFileExceptions(t){const s=xt,n=t.map((e=>this.fixFolderFormat(e)));Promise.all(n).then((t=>{let n=!1;t.forEach((t=>{e.emit("Settings.gaTrack","Add exception",s),this.isNewException(t)&&(this.get("exceptions").push({value:t,type:s}),n=!0)})),n&&this.saveExceptions(xt)}))},addException(){const t=this.get("newException");let s,n;if(/(^\w:\\?|^\\{2}|\\)/.test(t))s=xt;else{if(!/(.+\.)\w/.test(t))return void this.set("newExceptionError",u(At.newExceptionError));s=wt}e.emit("Settings.gaTrack","Add exception",s),n=s===xt?this.fixFolderFormat(t):s===wt?this.fixUrlFormat(t):Promise.resolve(t),n.then((e=>{if(e){const t=this.get("exceptions");s===wt?(e.forEach((e=>{this.isNewException(e)&&t.push({value:e,type:s})})),this.saveExceptions(s)):this.isNewException(e)&&(t.push({value:e,type:s}),this.saveExceptions(s)),this.closeAddDialog()}else this.set("newExceptionError",u(At.newExceptionError))}))},addCmdLineException(){let t=this.get("processNameException").replace(/['"`]/g,"");if(t=this.addQuotesToProcessNameIfNeeded(t),!t)return void this.set("processNameExceptionError",u("settings.exceptions.processNameException.error.invalid"));e.emit("Settings.gaTrack","Add command line exception",kt);const s=(this.get("cmdLineParamsException")||"").trim(),n=this.get("exceptions"),a=t+(s?" "+s:""),o=kt;this.isNewException(a)&&(n.push({value:a,type:o}),this.saveExceptions(o)),this.closeAddDialog()},addQuotesToProcessNameIfNeeded:e=>/\s/.test(e)?`"${e}"`:e,editException(t){e.emit("Settings.gaTrack","Edit exception",t.type);const s=this.get("exceptions");t.value.length||s.splice(t.index,1),this.saveExceptions(t.type,!1)},removeException(t){e.emit("Settings.gaTrack","Remove exception",t.type);const s=this.get("exceptions"),n=s.findIndex((e=>e.value===t.value));s.splice(n,1),this.saveExceptions(t.type)},isNewException(e){return this.get("exceptions").every((t=>t.value!==e))},showAddDialog(){e.emit("Settings.gaTrack","Open the add exception dialog"),this.set("addDialog",!0)},inputKeyUp(e){13===e.original.keyCode&&e.node.blur()},toggleExpansion(){this.toggle("isExpanded")},closeAddDialog(t){t&&e.emit("Settings.gaTrack","Close the add exception dialog"),this.set("addDialog",!1),this.set({newException:null,newExceptionError:null,processNameException:null,processNameExceptionError:null,cmdLineParamsException:null,cmdLineParamsExceptionError:null,isExpanded:!1})}});var Pt=/^\[object .+?Constructor\]$/,Ct="object"==typeof bt&&bt&&bt.Object===Object&&bt,Lt="object"==typeof self&&self&&self.Object===Object&&self,Nt=Ct||Lt||Function("return this")();function Rt(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)}function Mt(e,t){return!!(e?e.length:0)&&function(e,t,s){if(t!=t)return function(e,t,s,n){var a=e.length,o=s+(n?1:-1);for(;n?o--:++o<a;)if(t(e[o],o,e))return o;return-1}(e,Ut,s);var n=s-1,a=e.length;for(;++n<a;)if(e[n]===t)return n;return-1}(e,t,0)>-1}function Dt(e,t,s){for(var n=-1,a=e?e.length:0;++n<a;)if(s(t,e[n]))return!0;return!1}function $t(e,t){for(var s=-1,n=t.length,a=e.length;++s<n;)e[a+s]=t[s];return e}function Ut(e){return e!=e}function Ot(e,t){return e.has(t)}function Gt(e){var t=-1,s=Array(e.size);return e.forEach((function(e){s[++t]=e})),s}var jt,Vt=Array.prototype,Ft=Function.prototype,Bt=Object.prototype,zt=Nt["__core-js_shared__"],Wt=(jt=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+jt:"",Ht=Ft.toString,qt=Bt.hasOwnProperty,Yt=Bt.toString,Kt=RegExp("^"+Ht.call(qt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=Nt.Symbol,Jt=Bt.propertyIsEnumerable,Qt=Vt.splice,Zt=Xt?Xt.isConcatSpreadable:void 0,es=Math.max,ts=gs(Nt,"Map"),ss=gs(Nt,"Set"),ns=gs(Object,"create");function as(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var n=e[t];this.set(n[0],n[1])}}function os(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var n=e[t];this.set(n[0],n[1])}}function rs(e){var t=-1,s=e?e.length:0;for(this.clear();++t<s;){var n=e[t];this.set(n[0],n[1])}}function is(e){var t=-1,s=e?e.length:0;for(this.__data__=new rs;++t<s;)this.add(e[t])}function ls(e,t){for(var s,n,a=e.length;a--;)if((s=e[a][0])===(n=t)||s!=s&&n!=n)return a;return-1}function cs(e,t,s,n,a){var o=-1,r=e.length;for(s||(s=hs),a||(a=[]);++o<r;){var i=e[o];t>0&&s(i)?t>1?cs(i,t-1,s,n,a):$t(a,i):n||(a[a.length]=i)}return a}function ds(e){return!(!Ss(e)||function(e){return!!Wt&&Wt in e}(e))&&(vs(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(s){}return t}(e)?Kt:Pt).test(function(e){if(null!=e){try{return Ht.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}as.prototype.clear=function(){this.__data__=ns?ns(null):{}},as.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},as.prototype.get=function(e){var t=this.__data__;if(ns){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return qt.call(t,e)?t[e]:void 0},as.prototype.has=function(e){var t=this.__data__;return ns?void 0!==t[e]:qt.call(t,e)},as.prototype.set=function(e,t){return this.__data__[e]=ns&&void 0===t?"__lodash_hash_undefined__":t,this},os.prototype.clear=function(){this.__data__=[]},os.prototype.delete=function(e){var t=this.__data__,s=ls(t,e);return!(s<0)&&(s==t.length-1?t.pop():Qt.call(t,s,1),!0)},os.prototype.get=function(e){var t=this.__data__,s=ls(t,e);return s<0?void 0:t[s][1]},os.prototype.has=function(e){return ls(this.__data__,e)>-1},os.prototype.set=function(e,t){var s=this.__data__,n=ls(s,e);return n<0?s.push([e,t]):s[n][1]=t,this},rs.prototype.clear=function(){this.__data__={hash:new as,map:new(ts||os),string:new as}},rs.prototype.delete=function(e){return us(this,e).delete(e)},rs.prototype.get=function(e){return us(this,e).get(e)},rs.prototype.has=function(e){return us(this,e).has(e)},rs.prototype.set=function(e,t){return us(this,e).set(e,t),this},is.prototype.add=is.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},is.prototype.has=function(e){return this.__data__.has(e)};var ps=ss&&1/Gt(new ss([,-0]))[1]==1/0?function(e){return new ss(e)}:function(){};function us(e,t){var s,n,a=e.__data__;return("string"==(n=typeof(s=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==s:null===s)?a["string"==typeof t?"string":"hash"]:a.map}function gs(e,t){var s=function(e,t){return null==e?void 0:e[t]}(e,t);return ds(s)?s:void 0}function hs(e){return fs(e)||function(e){return _s(e)&&qt.call(e,"callee")&&(!Jt.call(e,"callee")||"[object Arguments]"==Yt.call(e))}(e)||!!(Zt&&e&&e[Zt])}var ms=function(e,t){return t=es(void 0===t?e.length-1:t,0),function(){for(var s=arguments,n=-1,a=es(s.length-t,0),o=Array(a);++n<a;)o[n]=s[t+n];n=-1;for(var r=Array(t+1);++n<t;)r[n]=s[n];return r[t]=o,Rt(e,this,r)}}((function(e){var t,s,n=(s=(t=e)?t.length:0)?t[s-1]:void 0;return _s(n)&&(n=void 0),function(e,t,s){var n=-1,a=Mt,o=e.length,r=!0,i=[],l=i;if(s)r=!1,a=Dt;else if(o>=200){var c=t?null:ps(e);if(c)return Gt(c);r=!1,a=Ot,l=new is}else l=t?[]:i;e:for(;++n<o;){var d=e[n],p=t?t(d):d;if(d=s||0!==d?d:0,r&&p==p){for(var u=l.length;u--;)if(l[u]===p)continue e;t&&l.push(p),i.push(d)}else a(l,p,s)||(l!==i&&l.push(p),i.push(d))}return i}(cs(e,1,_s,!0),void 0,n)}));var fs=Array.isArray;function bs(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!vs(e)}function _s(e){return function(e){return!!e&&"object"==typeof e}(e)&&bs(e)}function vs(e){var t=Ss(e)?Yt.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Ss(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var ys=ms;const xs=new class extends s{constructor(){super(),this.EVENTS={shieldsChanged:"shieldsChanged",appsChanged:"appsChanged"},this._SHIELDS={antiransomware:{path:"avastcfg://exclusions/FileProtection/ExcludedFiles",setupId:"ais_shl_rsw",funcs:{loadApps:()=>this._loadArwPapApps("antiransomware"),saveApp:(e,t)=>this._saveArwPapApp(e,t)}},webcam:{path:"webcam://webcam/common/application_list",setupId:"ais_cmp_webcam",funcs:{loadApps:()=>this._loadSdsWcApps("webcam"),saveApp:(e,t)=>this._saveSdsWcApp(e,t)}},sensitivedata:{path:"sds://SensitiveDataScan/Common/ApplicationList",setupId:"ais_cmp_datascan_full",funcs:{loadApps:()=>this._loadSdsWcApps("sensitivedata"),saveApp:(e,t)=>this._saveSdsWcApp(e,t)}},passwordProtection:{path:"avcfg://exclusions/PasswordProtection/ExcludedFiles",setupId:"ais_cmp_avpap",funcs:{loadApps:()=>this._loadArwPapApps("passwordProtection"),saveApp:(e,t)=>this._saveArwPapApp(e,t)}}},this._appMap={},this._shields=[],this._loadAppsPromise=null,this._userCount=0,this._listeneres=[]}init(){for(const e in this._SHIELDS)this._listeneres.push(b.on("product.change.feature."+this._SHIELDS[e].setupId,this._setShields.bind(this)));this._listeneres.push(e.on("settings.blockedAndAllowedApps.changed",(e=>{setTimeout(this._updateApps.bind(this),e?.updateDelay||0)}))),0===this._userCount&&(this._setShields(),this._loadApps()),this._userCount++}destroy(){this._listeneres.forEach((e=>e())),this._listeneres.length=0,this._userCount=Math.max(this._userCount-1,0),0===this._userCount&&(this._shields.length=0,this._appMap={},this._loadAppsPromise=null)}getShields(){return this._shields}loadApps(){return this._loadApps().then((e=>Object.keys(e).map((t=>this._copyObject(e[t]))).sort(((e,t)=>e.name.localeCompare(t.name)))))}getApp(e){return this._copyObject(this._appMap[e])}saveApp(e){const t=this._shields.map((t=>this._SHIELDS[t].funcs.saveApp(e,t)));return t.push(_.injectAppData(e)),Promise.all(t).then((()=>{this._appMap[e.path]=e,this.emit(this.EVENTS.appsChanged)}))}fakeAllShieldsActiveBeforeDelete(e,t){this._shields.forEach((s=>{this._appMap[e].shields[s]=t}))}_setShields(){this._shields.length=0;for(const e in this._SHIELDS){const t=this._SHIELDS[e].setupId;b.isInstalled(t)&&b.isLicensed(t)&&this._shields.push(e)}this.emit(this.EVENTS.shieldsChanged)}_updateApps(){this._loadApps(!0).then((()=>{this.emit(this.EVENTS.appsChanged)}))}_getAppList(){return Object.keys(this._appMap).map((e=>this._appMap[e]))}_loadApps(e){return!e&&this._loadAppsPromise||(this._loadAppsPromise=Promise.all(this._shields.map((e=>this._SHIELDS[e].funcs.loadApps()))).then((e=>{this._appMap={},e.forEach(((e,t)=>{const s=this._shields[t];e&&e.forEach((e=>{this._appMap[e.path]=this._appMap[e.path]||{path:e.path},this._appMap[e.path].shields=this._appMap[e.path].shields||{},this._appMap[e.path].shields[s]=e.blocked?"blocked":"allowed"}))}));const t=Object.keys(this._appMap).map((e=>_.injectAppData(this._appMap[e])));return Promise.all(t).then((()=>this._appMap))})).catch((e=>{console.error("loading apps failed",e),this._loadAppsPromise=null}))),this._loadAppsPromise}_loadArwPapApps(e){const s=this._SHIELDS[e].path;return t("app.settings.Get",{name:s}).then((e=>{if(!e.value)return;const t=/(.*)<block=(\d)>/,s=[];return this._getArwPapAppPaths(e.value).forEach((e=>{const n=t.exec(e);n&&s.push({path:n[1],blocked:"1"==n[2]})})),s})).catch((e=>{console.error("loading "+s,e)}))}_getArwPapAppPaths(e){if(!e)return[];const t=[];for(let s of e.split(">;"))s.endsWith(">")||(s+=">"),t.push(s);return t}_loadSdsWcApps(e){const s=this._SHIELDS[e].path;return t("app.settings.Get",{name:s}).then((e=>e.value?e.value.map((e=>({path:e.filename,blocked:!e.allow}))):[]))}_saveArwPapApp(e,s){const n=this._SHIELDS[s].path,a=ys([e],this._getAppList(),((e,t)=>e.path===t.path)).filter((e=>null!=e.shields[s])).map((e=>e.path+"<block="+("blocked"===e.shields[s]?1:0)+">")).join(";");return t("app.settings.Set",{name:n,value:a})}_saveSdsWcApp(e,s){const n=this._SHIELDS[s].path,a="blocked"===e.shields[s],o="blocked"===e.shields[s]?0:1;let r;return void 0===e.shields[s]?Promise.resolve():(this._appMap[e.path]&&this._appMap[e.path].shields[s]?null==e.shields[s]?(delete e.shields[s],r="delete"):this._appMap[e.path].shields[s]!==e.shields[s]&&(r="switch"):r="add",r?t("app.settings.Set",{name:n,value:{filename:e.path,action:r,blocked:a,allow:o}}):Promise.resolve())}_copyObject(e){return e?JSON.parse(JSON.stringify(e)):e}},ws={title:"settings.blockedAndAllowedApps",desc:"settings.blockedAndAllowedApps.desc",appName:"settings.blockedAndAllowedApps.appName",noApps:"settings.blockedAndAllowedApps.noApps",addApp:"settings.blockedAndAllowedApps.addApp",changeApp:"settings.blockedAndAllowedApps.changeApp",removeApp:"settings.blockedAndAllowedApps.removeApp",list:{blocked:{title:"settings.blockedAndAllowedApps.blockedApps",addLabel:"settings.blockedAndAllowedApps.blockedApps.addLabel",appliedFor:"settings.blockedAndAllowedApps.blockedApps.appliedFor",changeFeaturesLabel:"settings.blockedAndAllowedApps.blockedApps.changeFeaturesLabel",addTitle:"settings.blockedAndAllowedApps.blockedApps.addTitle",addDesc:"settings.blockedAndAllowedApps.blockedApps.addDesc",changeTitle:"settings.blockedAndAllowedApps.blockedApps.changeTitle",featuresLabel:"settings.blockedAndAllowedApps.blockedApps.featuresLabel"},allowed:{title:"settings.blockedAndAllowedApps.allowedApps",addLabel:"settings.blockedAndAllowedApps.allowedApps.addLabel",appliedFor:"settings.blockedAndAllowedApps.allowedApps.appliedFor",changeFeaturesLabel:"settings.blockedAndAllowedApps.allowedApps.changeFeaturesLabel",addTitle:"settings.blockedAndAllowedApps.allowedApps.addTitle",addDesc:"settings.blockedAndAllowedApps.allowedApps.addDesc",changeTitle:"settings.blockedAndAllowedApps.allowedApps.changeTitle",featuresLabel:"settings.blockedAndAllowedApps.allowedApps.featuresLabel"}},noShield:"settings.blockedAndAllowedApps.noShield"},ks={blocked:{id:"settings-blockedAndAllowedApps-blocked",list:[],search:ws.list.blocked.title},allowed:{id:"settings-blockedAndAllowedApps-allowed",list:[],search:ws.list.allowed.title}},Ts={title:ws.title,items:[ks.blocked,ks.allowed]},As=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:2,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}]},f:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"settings__row",id:[{t:2,r:"id"}]},f:[{t:7,e:"h4",a:{class:"h4 g-margin-bottom--20"},f:[{t:3,x:{r:["nls","listType","STRINGS.list"],s:"_0(_2[_1].title)"}}]}," ",{t:7,e:"kin-button",a:{type:"secondary",class:"g-margin-bottom--20","data-test":["baw_add_",{t:2,r:"listType"},"_app"]},v:{click:{n:"showAppDialog",d:[{t:2,r:"listType"}]}},f:[{t:7,e:"kin-icon",a:{name:"icon-s-add",size:"16",class:"g-margin-right--5"}}," ",{t:3,x:{r:["nls","listType","STRINGS.list"],s:"_0(_2[_1].addLabel)"}}]}," ",{t:4,f:[{t:7,e:"table",a:{class:"table -small -fixed -compact g-margin-bottom--20"},f:[{t:7,e:"colgroup",f:[{t:7,e:"col",a:{width:"25%"}}," ",{t:7,e:"col",a:{width:"44%"}}," ",{t:7,e:"col",a:{width:"23%"}}," ",{t:7,e:"col",a:{width:"8%"}}]}," ",{t:7,e:"tr",f:[{t:7,e:"th",a:{colspan:"2"},f:[{t:3,x:{r:["nls","STRINGS.appName"],s:"_0(_1)"}}]}," ",{t:7,e:"th",a:{colspan:"2"},f:[{t:3,x:{r:["nls","listType","STRINGS.list"],s:"_0(_2[_1].appliedFor)"}}]}]}," ",{t:4,f:[{t:7,e:"tr",a:{class:"-hoverable"},f:[{t:7,e:"td",f:[{t:2,r:"name"}]}," ",{t:7,e:"td",a:{"data-test":[{t:2,r:"listType"},"_apps-appPath"]},f:[{t:7,e:"kin-tooltip",a:{ellipsis:"true"},f:[{t:7,e:"p",a:{slot:"tooltip-activator",class:"text -small -secondary"},f:[{t:2,r:"path"}]}," ",{t:7,e:"div",a:{slot:"tooltip"},f:[{t:2,r:"path"}]}]}]}," ",{t:7,e:"td",f:[{t:4,f:[{t:4,f:[{t:7,e:"kin-tooltip",a:{"data-test":["baw_shield_",{t:2,r:"."}]},f:[{t:7,e:"span",a:{slot:"tooltip-activator"},f:[{t:7,e:"kin-icon",a:{name:[{t:2,rx:{r:"SHIELD_ICONS",m:[{t:30,n:"."}]}}],size:"28"}}]}," ",{t:7,e:"div",a:{slot:"tooltip"},f:[{t:2,x:{r:["nls","SHIELD_TRANS","."],s:"_0(_1[_2]||_2)"}}]}]}],n:50,x:{r:[".","shields","listType"],s:"_1&&_1[_0]===_2"}}],n:52,r:"shieldList"}]}," ",{t:7,e:"td",f:[{t:7,e:"kin-dropdown",f:[{t:7,e:"div",a:{slot:"dropdown-activator"},f:[{t:7,e:"kin-button",a:{type:"blank",size:"small",icononly:"true","data-test":"kin_table-item-options",title:[{t:2,x:{r:["nls"],s:'_0("global.moreOptions")'}}]},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-menu-more",size:"14"},f:[]}]}]}," ",{t:7,e:"kin-dropdown-item",v:{click:{n:"showAppDialog",d:[{t:2,r:"listType"},",",{t:2,r:"."}]}},a:{type:"button","data-test":"kin_dropdown-item-change"},f:[{t:3,x:{r:["nls","listType","STRINGS.list"],s:"_0(_2[_1].changeFeaturesLabel)"}}]}," ",{t:7,e:"kin-dropdown-item",v:{click:{n:"removeApp",d:[{t:2,r:"listType"},",",{t:2,r:"."}]}},a:{type:"button","data-test":"kin_dropdown-item-remove"},f:[{t:3,x:{r:["nls","STRINGS.removeApp"],s:"_0(_1)"}}]}]}]}]}],n:52,r:"list"}]}],n:50,r:"list.length"},{t:4,n:51,f:[{t:7,e:"p",a:{class:"p -small -secondary g-margin-bottom--20"},f:[{t:3,x:{r:["nls","STRINGS.noApps"],s:"_0(_1)"}}]}],r:"list.length"}]}],i:"listType",r:"appLists"}],n:50,r:"shieldList.length"},{t:4,n:51,f:[{t:7,e:"p",f:[{t:2,x:{r:["nls","STRINGS.noShield"],s:"_0(_1)"}}]}],r:"shieldList.length"}]}," ",{t:4,f:[{t:4,f:[{t:7,e:"Modal",a:{title:[{t:2,r:"appDialog.title"}],subtitle:[{t:2,r:"appDialog.app.name"}]},f:[{t:7,e:"p",a:{class:"p g-align--left g-margin-bottom--10"},f:[{t:3,x:{r:["nls","appDialog.listType","STRINGS.list"],s:"_1&&_0(_2[_1].featuresLabel)"}}]}," ",{t:7,e:"table",a:{class:"table -compact -no-border -fixed g-margin-bottom--20"},f:[{t:7,e:"colgroup",f:[{t:7,e:"col",a:{width:"5%"}}," ",{t:7,e:"col",a:{width:"95%"}}]}," ",{t:4,f:[{t:7,e:"tr",f:[{t:7,e:"td",f:[{t:7,e:"input",a:{type:"checkbox",checked:[{t:2,rx:{r:"appDialog.shields",m:[{t:30,n:"."}]}}],class:"checkbox",id:["baa_changeShield-",{t:2,r:"."}]}}]}," ",{t:7,e:"td",f:[{t:7,e:"label",a:{for:["baa_changeShield-",{t:2,r:"."}]},f:[{t:7,e:"kin-icon",a:{name:[{t:2,rx:{r:"SHIELD_ICONS",m:[{t:30,n:"."}]}}],size:"24"}}," ",{t:7,e:"span",a:{class:"g-margin-left--10"},f:[{t:2,x:{r:["nls","SHIELD_TRANS","."],s:"_0(_1[_2]||_2)"}}]}]}]}]}],n:52,r:"shieldList"}]}," ",{t:7,e:"button",a:{class:"btn","data-test":"baa_changeShield-add"},v:{click:"saveApp"},f:[{t:4,f:[{t:3,x:{r:["nls","STRINGS.addApp"],s:"_0(_1)"}}],n:50,r:"appDialog.isNewApp"},{t:4,n:51,f:[{t:3,x:{r:["nls","STRINGS.changeApp"],s:"_0(_1)"}}],r:"appDialog.isNewApp"}]}]}],n:50,r:"appDialog.app"},{t:4,n:51,f:[{t:7,e:"InstalledApps",a:{title:[{t:2,r:"appDialog.title"}],desc:[{t:2,r:"appDialog.desc"}],addedAppPaths:[{t:2,r:"appDialog.addedAppPaths"}]}}],r:"appDialog.app"}],n:50,r:"appDialog"}]},components:{InstalledApps:T.InstalledApps},data:()=>({STRINGS:ws,SHIELD_TRANS:{webcam:"webcamshield",passwordProtection:"passwordProtection"},SHIELD_ICONS:{antiransomware:"icon-m-tools-ransomware",webcam:"icon-l-webcam",sensitivedata:"icon-l-sensitive-data",passwordProtection:"password-protection"},shieldList:xs.getShields(),appDialog:null,appLists:ks}),oninit(){xs.init(),this.on("showAppDialog",((e,t,s)=>this.showAppDialog(t,s))),this.on("removeApp",((e,t,s)=>this.removeApp(t,s))),this.on("saveApp",this.saveApp.bind(this)),this.on("Modal.modalClose",this.closeAppDialog.bind(this,!0)),this.on("InstalledApps.appSelected",this.onNewAppSelected.bind(this)),this.on("InstalledApps.close",this.closeAppDialog.bind(this,!0)),this.offShieldsChanged=xs.on(xs.EVENTS.shieldsChanged,(()=>{this.set("shieldList",xs.getShields())})),this.offAppsChanged=xs.on(xs.EVENTS.appsChanged,this.loadAppLists.bind(this)),this.loadAppLists()},onteardown(){this.offAppsChanged(),xs.destroy()},loadAppLists(){xs.loadApps().then((e=>{const t=[],s=[];e.forEach((e=>{const n=this.get("shieldList"),a=n.some((t=>"blocked"===e.shields[t])),o=n.some((t=>"allowed"===e.shields[t]));a&&t.push(e),o&&s.push(e)})),this.merge("appLists.blocked.list",t,{compare:"path"}),this.merge("appLists.allowed.list",s,{compare:"path"}),this.updateAddedAppPaths()}))},removeApp(t,s){e.emit("Settings.gaTrack",this.capitalize(t)+" app list","Remove app",s.name),this.get("shieldList").forEach((e=>{s.shields[e]===t&&(s.shields[e]=null)})),xs.saveApp(s)},saveApp(){const t=this.get("appDialog.listType"),s=this.get("appDialog.app"),n=this.get("appDialog.shields"),a=xs.getApp(s.path)||{},o=this.capitalize(t)+" app list";e.emit("Settings.gaTrack",o,"Save app",s.name),s.shields=s.shields||a.shields||{},this.get("shieldList").forEach((e=>{n[e]?s.shields[e]=t:s.shields[e]===t&&(s.shields[e]=null)})),xs.saveApp(s),this.closeAppDialog()},showAppDialog(t,s){const n={listType:t,app:s,isNewApp:this.get("appDialog.isNewApp")||!s},a=this.capitalize(t)+" app list";n.isNewApp?s?e.emit("Settings.gaTrack",a,"Set features",s.name):e.emit("Settings.gaTrack",a,"Add app"):e.emit("Settings.gaTrack",a,"Change features",s.name),s&&!n.isNewApp?n.title=u(ws.list[t].changeTitle):n.title=u(ws.list[t].addTitle),s?(n.shields={},this.get("shieldList").forEach((e=>{s.shields?n.shields[e]=s.shields[e]===t:n.shields[e]=t}))):(n.desc=u(ws.list[t].addDesc),n.addedAppPaths=this.getAddedAppPaths(t)),this.set("appDialog",n)},closeAppDialog(t){if(this.get("appDialog")){if(t){const t=this.capitalize(this.get("appDialog.listType")),s=this.get("appDialog.app");e.emit("Settings.gaTrack",t+" app list","Close app dialog",s&&s.name)}this.set("appDialog",null)}},onNewAppSelected(e){const t=this.get("appDialog.listType");this.showAppDialog(t,e)},getAddedAppPaths(e){return this.get("appLists."+e+".list").map((e=>e.path))},updateAddedAppPaths(){const e=this.get("appDialog");e&&this.set("appDialog.addedAppPaths",this.getAddedAppPaths(e.listType))},capitalize:e=>e[0].toUpperCase()+e.slice(1)});var Is=/^\s+|\s+$/g,Es=/^[-+]0x[0-9a-f]+$/i,Ps=/^0b[01]+$/i,Cs=/^0o[0-7]+$/i,Ls=parseInt,Ns="object"==typeof bt&&bt&&bt.Object===Object&&bt,Rs="object"==typeof self&&self&&self.Object===Object&&self,Ms=Ns||Rs||Function("return this")(),Ds=Object.prototype.toString,$s=Math.max,Us=Math.min,Os=function(){return Ms.Date.now()};function Gs(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function js(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Ds.call(e)}(e))return NaN;if(Gs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Gs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Is,"");var s=Ps.test(e);return s||Cs.test(e)?Ls(e.slice(2),s?2:8):Es.test(e)?NaN:+e}var Vs=function(e,t,s){var n,a,o,r,i,l,c=0,d=!1,p=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var s=n,o=a;return n=a=void 0,c=t,r=e.apply(o,s)}function h(e){return c=e,i=setTimeout(f,t),d?g(e):r}function m(e){var s=e-l;return void 0===l||s>=t||s<0||p&&e-c>=o}function f(){var e=Os();if(m(e))return b(e);i=setTimeout(f,function(e){var s=t-(e-l);return p?Us(s,o-(e-c)):s}(e))}function b(e){return i=void 0,u&&n?g(e):(n=a=void 0,r)}function _(){var e=Os(),s=m(e);if(n=arguments,a=this,l=e,s){if(void 0===i)return h(l);if(p)return i=setTimeout(f,t),g(l)}return void 0===i&&(i=setTimeout(f,t)),r}return t=js(t)||0,Gs(s)&&(d=!!s.leading,o=(p="maxWait"in s)?$s(js(s.maxWait)||0,t):o,u="trailing"in s?!!s.trailing:u),_.cancel=function(){void 0!==i&&clearTimeout(i),c=0,n=l=a=i=void 0},_.flush=function(){return void 0===i?r:b(Os())},_};const Fs={title:"settings.password",desc:"settings.password.desc",createPassword:"settings.password.createPassword",createPasswordDesc:"settings.password.createPassword.desc",enterPassword:"settings.password.enterPassword",reenterPassword:"settings.password.reenterPassword",passwordsDontMatch:"settings.password.passwordsDontMatch",changePassword:"settings.password.changePassword",removePassword:"settings.password.removePassword",protectEverything:"settings.password.protectEverything",protectOnlyAdvancedSettings:"settings.password.protectOnlyAdvancedSettings",protectCustomParts:"settings.password.protectCustomParts",protectShields:"settings.password.protectShields",protectShieldSettings:"settings.password.protectShieldSettings",protectScans:"settings.password.protectScans",protectScanSettings:"settings.password.protectScanSettings",protectUpdate:"settings.password.protectUpdate",protectVirusChest:"settings.password.protectVirusChest",protectFirewall:"settings.password.protectFirewall"},Bs={title:Fs.title,desc:Fs.desc},zs=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}]},f:[{t:4,f:[{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"protectOptions"}],"data-test":"settings_pwd-radio"},f:[],p:{customAreas:[{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"."}]}}],n:52,r:"customAreas"}]}}],n:50,r:"passwordCreated"}," ",{t:7,e:"div",a:{class:"settings__row"},f:[{t:7,e:"button",a:{class:"btn -primary","data-test":"settings_pwd-create",disabled:[{t:2,r:"passwordLocked"}]},v:{click:"openPasswordForm"},f:[{t:4,f:[{t:3,x:{r:["nls","STRINGS.changePassword"],s:"_0(_1)"}}],n:50,r:"passwordCreated"},{t:4,n:51,f:[{t:3,x:{r:["nls","STRINGS.createPassword"],s:"_0(_1)"}}],r:"passwordCreated"}]}," ",{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"passwordLocked"}]}," ",{t:4,f:[{t:4,f:[{t:7,e:"p",a:{class:"a g-margin-left--10","data-test":"settings_pwd-remove"},f:[{t:3,x:{r:["nls","STRINGS.removePassword"],s:"_0(_1)"}}," ",{t:7,e:"SettingsBadge"}]}],n:50,r:"passwordLocked"},{t:4,n:51,f:[{t:7,e:"a",a:{class:"a g-margin-left--10","data-test":"settings_pwd-remove"},v:{click:"removePassword"},f:[{t:3,x:{r:["nls","STRINGS.removePassword"],s:"_0(_1)"}}]}],r:"passwordLocked"}],n:50,r:"passwordCreated"}]}," ",{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls","passwordCreated","STRINGS.changePassword","STRINGS.createPassword"],s:"_0(_1?_2:_3)"}}],subtitle:[{t:3,x:{r:["nls","STRINGS.createPasswordDesc"],s:"_0(_1)"}}],testId:"settings_pwd-modal"},f:[{t:7,e:"form",v:{submit:"changePassword"},f:[{t:7,e:"div",a:{class:"form__row -simple g-margin-toip--10","data-test":"settings_pwd-in1"},f:[{t:7,e:"Input",a:{id:"pwd1",innerValue:[{t:2,r:"password"}],type:"password",label:[{t:2,x:{r:["nls","STRINGS.enterPassword"],s:"_0(_1)"}}],error:[{t:2,x:{r:["passwordError"],s:"!!_0"}}],message:[{t:2,r:"passwordError"}],autofocus:0}}]}," ",{t:7,e:"div",a:{class:"form__row -simple","data-test":"settings_pwd-in2"},f:[{t:7,e:"Input",a:{id:"pwd2",innerValue:[{t:2,r:"password2"}],type:"password",label:[{t:2,x:{r:["nls","STRINGS.reenterPassword"],s:"_0(_1)"}}],error:[{t:2,x:{r:["password2Error"],s:"!!_0"}}],message:[{t:2,r:"password2Error"}]}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",a:{class:"btn -primary","data-test":"settings_pwd-change"},v:{click:"changePassword"},f:[{t:4,f:[{t:3,x:{r:["nls","STRINGS.changePassword"],s:"_0(_1)"}}],n:50,r:"passwordCreated"},{t:4,n:51,f:[{t:3,x:{r:["nls","STRINGS.createPassword"],s:"_0(_1)"}}],r:"passwordCreated"}]}]}]}]}],n:50,r:"showPasswordForm"}]},CUSTOM_AREAS_VALUE:"_customAreas",DEFAULT_PROTECT_OPTION:"settings",data(){return{STRINGS:Fs,passwordCreated:!1,passwordLocked:!1,showPasswordForm:!1,password:null,password2:null,passwordError:null,protectOptions:{id:"password-protectOptions",load:this.loadProtectOption.bind(this),change:this.changeProtectOption.bind(this),options:[{label:u(Fs.protectEverything),value:"ui"},{label:u(Fs.protectOnlyAdvancedSettings),value:"settings"}]},customAreas:[{id:"password-protect-protection",label:u(Fs.protectShields),load:this.loadArea.bind(this,"protection"),change:this.saveCustomAreas.bind(this),_value:"protection",track:{subject:"Protect shields"}},{id:"password-protect-protection_settings",label:u(Fs.protectShieldSettings),load:this.loadArea.bind(this,"protection_settings"),change:this.saveCustomAreas.bind(this),_value:"protection_settings",track:{subject:"Protect shield settings"}},{id:"password-protect-scan",label:u(Fs.protectScans),load:this.loadArea.bind(this,"scan"),change:this.saveCustomAreas.bind(this),_value:"scan",track:{subject:"Protect scans"}},{id:"password-protect-scan_settings",label:u(Fs.protectScanSettings),load:this.loadArea.bind(this,"scan_settings"),change:this.saveCustomAreas.bind(this),_value:"scan_settings",track:{subject:"Protect scan settings"}},{id:"password-protect-update",label:u(Fs.protectUpdate),load:this.loadArea.bind(this,"update"),change:this.saveCustomAreas.bind(this),_value:"update",track:{subject:"Protect update"}},{id:"password-protect-chest",label:u(Fs.protectVirusChest),load:this.loadArea.bind(this,"chest"),change:this.saveCustomAreas.bind(this),_value:"chest",track:{subject:"Protect virus chest"}},{id:"password-protect-firewall",label:u(Fs.protectFirewall),load:this.loadArea.bind(this,"firewall"),change:this.saveCustomAreas.bind(this),_value:"firewall",track:{subject:"Protect firewall"}}]}},oninit(){b.isAfbEdition()&&this.get("protectOptions.options").push({label:u(Fs.protectCustomParts),value:this.CUSTOM_AREAS_VALUE,customYield:"customAreas"}),this.on("openPasswordForm",(()=>{e.emit("Settings.gaTrack","PasswordForm","Open"),this.set("showPasswordForm",!0)}));const t=Vs(this.checkPasswords.bind(this,!1),500);this.observe("password",t,{init:!1}),this.observe("password2",t,{init:!1}),this.on("changePassword",(e=>{e.original.preventDefault(),this.checkPasswords(!0)&&this.changePassword().then(this.hidePasswordForm.bind(this)).catch(this.hidePasswordForm.bind(this))})),this.on("removePassword",this.removePassword.bind(this)),this.on("Modal.modalClose",this.hidePasswordForm.bind(this)),v.on("change",this.loadPasswordCreated.bind(this)),this.loadPasswordCreated()},hidePasswordForm(){e.emit("Settings.gaTrack","PasswordForm","Close"),this.set("showPasswordForm",!1),this.set("password",null),this.set("password2",null),this.set("passwordError",null),this.set("password2Error",null)},checkPasswords(e){const t=this.get("password"),s=this.get("password2");let n=null,a=null;return e?(t!==s&&(a=u(Fs.passwordsDontMatch)),t||(n=u(Fs.enterPassword)),s||(a=u(Fs.reenterPassword))):t&&s&&t!==s?a=u(Fs.passwordsDontMatch):(null==t||t.length||(n=u(Fs.enterPassword)),null==s||s.length||(a=u(Fs.reenterPassword))),this.set("passwordError",n),this.set("password2Error",a),!n&&!a},loadPasswordCreated(){v.getData().then((e=>{this.set("passwordCreated",e.enabled),this.set("passwordLocked",e.enabledLocked)}))},changePassword(){return e.emit("Settings.gaTrack",this.get("passwordCreated")?"Change":"Create password"),Promise.all([v.setPassword(this.get("password")),this.changeProtectOption(this.get("protectOptions").storedValue||this.DEFAULT_PROTECT_OPTION)])},removePassword:()=>(e.emit("Settings.gaTrack","Remove password"),v.removePassword()),loadProtectOption(){return v.getData().then((e=>{const t=this.get("protectOptions.options").map((e=>e.value)).find((t=>e.areas.includes(t)));return{locked:e.areasLocked,value:t||this.CUSTOM_AREAS_VALUE}}))},changeProtectOption(e){let t=[];return b.isAfbEdition()?(t=this.getProtectedCustomAreas(),e!==this.CUSTOM_AREAS_VALUE&&t.push(e)):"ui"===e?t=v.ALL_AREAS:"settings"===e?t=v.SETTINGS_AREAS:t.push(e),v.setProtectedAreas(t)},loadArea:e=>v.getData().then((t=>({locked:t.areasLocked,value:t.areas.includes(e)}))),saveCustomAreas(){const e=this.getProtectedCustomAreas();return v.setProtectedAreas(e)},getProtectedCustomAreas(){const e=[];return this.get("customAreas").forEach((t=>{t.value&&e.push(t._value)})),e}}),Ws=_.isVersionSupported("19.7"),Hs=_.isVersionSupported("20.6"),qs={title:"settings.personalPrivacy",desc:"settings.personalPrivacy.desc",community:"settings.personalPrivacy.community.label",dataSharingGa:"settings.personalPrivacy.dataSharingGa.label",dataSharingGa206:"settings.personalPrivacy.dataSharingGa.20.6.label",dataSharingGa206Desc:"settings.personalPrivacy.dataSharingGa.20.6.desc",allowOfferPopups:"settings.personalPrivacy.allowOfferPopups.label",allow3rdPartyOfferPopups:"settings.personalPrivacy.allow3rdPartyOfferPopups.label",allowUsageData:"settings.personalPrivacy.allowUsageData.label",footnote:"settings.personalPrivacy.footnote",improvements:"settings.personalPrivacy.improvements",offers:"settings.personalPrivacy.offers",trendAnalytics:"settings.personalPrivacy.trendAnalytics"};function Ys(){const e={community:{id:"settings-personalPrivacy-community",label:u(qs.community),track:{subject:"Participate"},path:"avcfg://settings/Common/PropertyCommunity",search:qs.community},allow3rdPartyOfferPopups:{id:"settings-personalPrivacy-allow3rdPartyOfferPopups",label:u(qs.allow3rdPartyOfferPopups),track:{subject:"Show 3rd offers"},path:"avcfg://settings/Common/Allow3rdPartyOfferPopups",applyOnChange:!0,search:qs.allow3rdPartyOfferPopups}};return Hs||(e.allowUsageData={id:"settings-personalPrivacy-allowUsageData",label:u(qs.allowUsageData),track:{subject:"Help improve"},path:"avcfg://settings/Common/AllowUsageData",search:qs.allowUsageData}),Ws&&(e.dataSharingGa={id:"settings-personalPrivacy-dataSharingGa",label:u(Hs?qs.dataSharingGa206:qs.dataSharingGa),desc:Ks(),track:{subject:"Allow usage GA"},path:"avcfg://settings/Common/PropertyDataSharingGa",search:{title:Hs?qs.dataSharingGa206:qs.dataSharingGa,desc:Hs?qs.dataSharingGa206Desc:null}}),b.isFreeProduct()||(e.allowOfferPopups={id:"settings-personalPrivacy-allowOfferPopups",label:u(qs.allowOfferPopups),track:{subject:"Show our offers"},path:"avcfg://settings/Common/AllowOfferPopups",search:qs.allowOfferPopups}),e}function Ks(){if(!Hs)return null;return l.replace(u(qs.dataSharingGa206Desc),{suffix:"PRODUCT",onclick:["NAPI.track.event('Settings', 'Click', 'Product Policy')","NAPI.openIpmBrowser(403)"]})}const Xs=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,r:"desc"}]},f:[{t:4,f:[{t:7,e:"h4",a:{class:"h4 g-margin-top--20"},f:[{t:2,x:{r:["nls","STRINGS.improvements"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.community"}]}}," ",{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.allowUsageData"}]}}],n:50,r:"properties.allowUsageData"}," ",{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.dataSharingGa"}]}}],n:50,r:"properties.dataSharingGa"}," ",{t:7,e:"h4",a:{class:"h4 g-margin-top--20"},f:[{t:2,x:{r:["nls","STRINGS.offers"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.allowOfferPopups"}]}}],n:50,r:"properties.allowOfferPopups"}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.allow3rdPartyOfferPopups"}]}}," ",{t:7,e:"p",a:{class:"p -small g-margin-top--20"},f:[{t:2,x:{r:["nls","STRINGS.footnote","productTranslated"],s:"_0(_1,_2)"}}]}],n:50,r:"properties"}]}]},data(){return{STRINGS:qs,properties:Ys(),desc:this.getDesc()}},computed:{productTranslated:function(){let e=u(_.getProductStringId());return"avg"===b.getProductId()&&(e="AVG "+e),e}},getDesc:()=>l.replace(u(qs.desc),[{suffix:"PRIVACY",onclick:["NAPI.track.event('Settings', 'Click', 'Privacy Policy')","NAPI.openIpmBrowser(11)"]},{suffix:"PRODUCT",onclick:["NAPI.track.event('Settings', 'Click', 'Product Policy')","NAPI.openIpmBrowser(403)"]}])}),Js=r.createLogger("settings.troubleshooting");r.setSeverity("settings.troubleshooting",r.SEVERITIES.INFO);const Qs=b.isAfbManaged(),Zs=b.isTheOne(),en={title:"settings.troubleshooting",desc:"settings.troubleshooting.desc",offlineMode:"settings.troubleshooting.offlineMode.label",offlineModeDesc:"settings.troubleshooting.offlineMode.desc",offlineModeConfirmTitle:"settings.troubleshooting.offlineMode.confirm.title",offlineModeConfirmDesc:"settings.troubleshooting.offlineMode.confirm.desc",passiveMode:"settings.troubleshooting.passiveMode.label",passiveModeDesc:"settings.troubleshooting.passiveMode.desc",passiveModeRestartOn:"settings.troubleshooting.passiveMode.restartOn",passiveModeRestartOff:"settings.troubleshooting.passiveMode.restartOff",selfDefense:"settings.troubleshooting.selfDefense.label",selfDefenseDesc:"settings.troubleshooting.selfDefense.desc",virtualizationMechanisms:"settings.troubleshooting.virtualizationMechanisms.label",virtualizationMechanismsDesc:"settings.troubleshooting.virtualizationMechanisms.desc",lateServiceStart:"settings.troubleshooting.lateServiceStart.label",lateServiceStartDesc:"settings.troubleshooting.lateServiceStart.desc",repairAndModifyTitle:"settings.troubleshooting.repairAndModifyTitle",repairAndModifyDesc:"settings.troubleshooting.repairAndModifyDesc",repair:"settings.troubleshooting.repair",repairConfirmationTitle:"settings.troubleshooting.repair",repairConfirmationDesc:"settings.troubleshooting.repair.confirmation.desc",repairConfirmationYes:"global.yes",repairConfirmationNo:"global.no",addAndModifyComponents:"settings.addAndModifyComponents",backupAndRestoreTitle:"settings.troubleshooting.backupAndRestoreTitle",backupAndRestoreDesc:"settings.troubleshooting.backupAndRestoreDesc",backupAndRestorePassiveModeOn:"settings.troubleshooting.backupAndRestorePassiveModeOn",backup:"settings.troubleshooting.backup",restore:"settings.troubleshooting.restore",locked:"settings.locked",notInstalled:"settings.notInstalled",resetToDefaultTitle:"settings.troubleshooting.resetToDefaultTitle",resetToDefaultDesc:"settings.troubleshooting.resetToDefaultDesc",resetToDefaultPassiveModeOn:"settings.troubleshooting.resetToDefaultPassiveModeOn",resetToDefault:"settings.troubleshooting.resetToDefault",resetSettingsTitle:"settings.troubleshooting.resetSettings.title",resetSettingsDesc:"settings.troubleshooting.resetSettings.desc",resetSettingsYes:"settings.troubleshooting.resetSettings.yes",resetSettingsNo:"settings.troubleshooting.resetSettings.no",settingsReset:"settings.troubleshooting.resetSettings.success",settingsExported:"settings.troubleshooting.settingsExported",settingsRestored:"settings.troubleshooting.settingsRestored",logs:"settings.troubleshooting.logs",debugLogging:"settings.troubleshooting.debugLogging.label",sendLogsTitle:"settings.troubleshooting.sendLogs.title",sendLogsDesc:"settings.troubleshooting.sendLogs.desc",sendLogsBtn:"settings.troubleshooting.sendLogs.btnLabel",pleaseRestartPC:"settings.pleaseRestartPC",ok:"global.ok",restartNow:"settings.restartNow",restartLater:"global.rebootLater",kb:"global.sizeUnits.kilobyte.standalone",theme:"settings.theme",themeDesc:"settings.theme.desc",themeSelect:"settings.useUpdatedTheme",performanceRecordingTitle:"settings.performanceRecording.title",performanceRecordingDesc:"settings.performanceRecording.desc",performanceRecordingBtn:"settings.performanceRecording.open.btn"};let tn;function sn(){return tn=tn||Promise.all([S.getValue("avdef://config/GuiCache/supportToolBtnVisible"),S.getValue("avdef://config/GuiCache/ThemeSwitch"),S.getValue("avdef://config/GuiCache/PerfToolBtnVisible")]).then((e=>{const t=e[0],s=parseInt(e[1]),n=e[2],a={passiveMode:{id:"settings-troubleshooting-passiveMode",label:u(en.passiveMode),desc:u(en.passiveModeDesc),track:{subject:"Passive mode"},load:null,change:null,showThrobberWhileChanging:!0,testAttr:"app.passivemode.GetStatus",value:null,search:{title:en.passiveMode,desc:en.passiveModeDesc}},selfDefense:{id:"settings-troubleshooting-selfDefense",label:u(en.selfDefense),desc:u(en.selfDefenseDesc),track:{subject:"Self-defense module"},path:"avcfg://settings/SelfDefense/SelfDefense",search:{title:en.selfDefense,desc:en.selfDefenseDesc}},virtualizationMechanisms:{id:"settings-troubleshooting-virtualizationMechanisms",label:u(en.virtualizationMechanisms),desc:u(en.virtualizationMechanismsDesc),track:{subject:"Hardware virtualization"},path:"avcfg://settings/Common/VirtualizationMechanisms",search:{title:en.virtualizationMechanisms,desc:en.virtualizationMechanismsDesc}},lateServiceStart:{id:"settings-troubleshooting-lateServiceStart",label:u(en.lateServiceStart),desc:u(en.lateServiceStartDesc),track:{subject:"Loading"},path:"avcfg://settings/Common/LateServiceStart",search:{title:en.lateServiceStart,desc:en.lateServiceStartDesc}},repairAndModify:{id:"settings-troubleshooting-repairAndModify",repairInProgress:!1,search:{title:en.repairAndModifyTitle,others:[en.repair]}},logs:{id:"settings-troubleshooting-logs",title:u(en.logs),search:en.logs},debugLogging:{id:"settings-troubleshooting-debugLogging",label:u(en.debugLogging),track:{subject:"Debug logging"},path:"avcfg://settings/Common/DebugLogging",search:en.debugLogging}};return b.isLicensed("firewall")&&(a.offlineMode={id:"settings-troubleshooting-offlineMode",label:u(en.offlineMode),desc:u(en.offlineModeDesc),track:{subject:"Offline mode"},path:"avcfg://Firewall/Firewall/InternetLock",change:null,applyOnChange:!0,disabled:!b.isInstalled("firewall"),search:{title:en.offlineMode,desc:en.offlineModeDesc}}),s&&(a.theme={id:"settings-troubleshooting-theme",title:u(en.theme),search:en.theme},a.secondaryCss={id:"settings-troubleshooting-secondaryCss",label:u(en.themeSelect),desc:u(en.themeDesc),track:{subject:"Theme"},change:null,path:"avcfg://settings/Common/SecondaryCss",search:{title:en.themeSelect,desc:en.themeDesc}}),Qs||(a.repairAndModify.search.others.push(en.addAndModifyComponents),Object.assign(a,{backupAndRestore:{id:"settings-troubleshooting-backupAndRestore",search:{title:en.backupAndRestoreTitle,others:[en.backup,en.restore]}},resetToDefault:{id:"settings-troubleshooting-resetToDefault",search:{title:en.resetToDefaultTitle,others:[en.resetToDefault]}}})),1==t&&Object.assign(a,{sendLogs:{id:"settings-troubleshooting-sendLogs",search:{title:en.sendLogsTitle,desc:en.sendLogsDesc,others:[en.sendLogsBtn]}}}),1==n&&Object.assign(a,{performanceRecording:{id:"settings-troubleshooting-performanceRecording",search:{title:en.performanceRecordingTitle,desc:en.performanceRecordingDesc,others:[en.performanceRecordingBtn]}}}),a}))}const nn=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],loaded:[{t:2,r:"loaded"}]},f:[{t:4,f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.offlineMode"}]}}],n:50,r:"properties.offlineMode"}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.passiveMode"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.selfDefense"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.virtualizationMechanisms"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.lateServiceStart"}]}}," ",{t:7,e:"div",a:{class:"settings__row g-margin-top--10 checkbox__row",id:[{t:2,r:"properties.repairAndModify.id"}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls","STRINGS.repairAndModifyTitle"],s:"_0(_1)"}}]}," ",{t:7,e:"p",a:{class:"p checkbox__desc -margins"},f:[{t:3,x:{r:["nls","STRINGS.repairAndModifyDesc"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -primary g-margin-right--10 g-margin-bottom--5"},v:{click:"repairProgram"},f:[{t:3,x:{r:["nls","STRINGS.repair"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"button",a:{class:"btn -secondary g-margin-bottom--5"},v:{click:"addAndModifyComponents"},f:[{t:3,x:{r:["nls","STRINGS.addAndModifyComponents"],s:"_0(_1)"}}]}],n:50,x:{r:["IS_AFB","IS_ONE"],s:"!_0&&!_1"}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--20 checkbox__row",id:[{t:2,r:"properties.backupAndRestore.id"}]},f:[{t:7,e:"p",a:{class:["p ",{t:2,x:{r:["passiveMode.value"],s:'_0?"-light":""'}}]},f:[{t:3,x:{r:["nls","STRINGS.backupAndRestoreTitle"],s:"_0(_1)"}}]}," ",{t:7,e:"p",a:{class:["p checkbox__desc -margins ",{t:2,x:{r:["passiveMode.value"],s:'_0?"-light":""'}}]},f:[{t:3,x:{r:["nls","STRINGS.backupAndRestoreDesc"],s:"_0(_1)"}}," ",{t:4,f:[{t:7,e:"br"},{t:7,e:"strong",f:[{t:3,x:{r:["nls","STRINGS.backupAndRestorePassiveModeOn"],s:"_0(_1)"}}]}],n:50,r:"passiveMode.value"}]}," ",{t:7,e:"button",a:{disabled:[{t:2,r:"passiveMode.value"}],class:"btn -secondary g-margin-right--10 g-margin-bottom--5","data-test":"settings_trouble-export"},v:{click:"exportSettings"},f:[{t:3,x:{r:["nls","STRINGS.backup"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{disabled:[{t:2,r:"passiveMode.value"}],class:"btn -secondary g-margin-bottom--5","data-test":"settings_trouble-import"},v:{click:"importSettings"},f:[{t:3,x:{r:["nls","STRINGS.restore"],s:"_0(_1)"}}]}]}," ",{t:7,e:"div",a:{class:"settings__row g-margin-top--20 checkbox__row",id:[{t:2,r:"properties.resetToDefault.id"}]},f:[{t:7,e:"p",a:{class:["p ",{t:2,x:{r:["passiveMode.value"],s:'_0?"-light":""'}}]},f:[{t:3,x:{r:["nls","STRINGS.resetToDefaultTitle"],s:"_0(_1)"}}]}," ",{t:7,e:"p",a:{class:["p checkbox__desc -margins ",{t:2,x:{r:["passiveMode.value"],s:'_0?"-light":""'}}]},f:[{t:3,x:{r:["nls","STRINGS.resetToDefaultDesc"],s:"_0(_1)"}}," ",{t:4,f:[{t:7,e:"br"},{t:7,e:"strong",f:[{t:3,x:{r:["nls","STRINGS.resetToDefaultPassiveModeOn"],s:"_0(_1)"}}]}],n:50,r:"passiveMode.value"}]}," ",{t:7,e:"button",a:{disabled:[{t:2,r:"passiveMode.value"}],class:"btn -secondary","data-test":"settings_trouble-reset"},v:{click:"resetSettings"},f:[{t:3,x:{r:["nls","STRINGS.resetToDefault"],s:"_0(_1)"}}]}]}],n:50,x:{r:["IS_AFB"],s:"!_0"}}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--20 checkbox__row",id:[{t:2,r:"properties.performanceRecording.id"}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:2,x:{r:["nls","STRINGS.performanceRecordingTitle"],s:"_0(_1)"}}]}," ",{t:7,e:"p",a:{class:"p checkbox__desc -margins"},f:[{t:2,x:{r:["nls","STRINGS.performanceRecordingDesc"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary g-margin-right--10 g-margin-bottom--5"},v:{click:"openPerformanceRecorder"},f:[{t:2,x:{r:["nls","STRINGS.performanceRecordingBtn"],s:"_0(_1)"}}]}]}],n:50,r:"properties.performanceRecording"}," ",{t:4,f:[{t:7,e:"h4",a:{class:"h4 g-margin-top--20",id:[{t:2,r:"properties.theme.id"}]},f:[{t:2,r:"properties.theme.title"}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.secondaryCss"}]}}],n:50,x:{r:["properties.theme","properties.secondaryCss","IS_ONE"],s:"_0&&_1&&!_2"}}," ",{t:7,e:"h4",a:{class:"h4 g-margin-top--20",id:[{t:2,r:"properties.logs.id"}]},f:[{t:2,r:"properties.logs.title"}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.debugLogging"}]}}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--20 checkbox__row",id:[{t:2,r:"properties.sendLogs.id"}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls","STRINGS.sendLogsTitle"],s:"_0(_1)"}}]}," ",{t:7,e:"p",a:{class:"p checkbox__desc -margins"},f:[{t:3,x:{r:["nls","STRINGS.sendLogsDesc"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary","data-test":"settings_trouble-sendLogs"},v:{click:"sendLogs"},f:[{t:3,x:{r:["nls","STRINGS.sendLogsBtn"],s:"_0(_1)"}}]}]}],n:50,r:"properties.sendLogs"}]}," ",{t:4,f:[{t:7,e:"Modal",a:{closable:"false"},f:[{t:7,e:"kin-loading",a:{label:[{t:2,x:{r:["nls"],s:'_0("global.repairing")'}}]}}]}],n:50,r:"properties.repairAndModify.repairInProgress"}]},data:()=>({IS_AFB:Qs,IS_ONE:Zs,STRINGS:en,loaded:!1,properties:null}),oninit(){this.on("repairProgram",this.repairProgram.bind(this)),this.on("addAndModifyComponents",this.addAndModifyComponents.bind(this)),this.on("exportSettings",this.exportSettings.bind(this)),this.on("importSettings",this.importSettings.bind(this)),this.on("openPerformanceRecorder",this.openPerformanceRecorder.bind(this)),this.on("resetSettings",this.resetSettings.bind(this)),this.on("sendLogs",this.sendLogs.bind(this)),sn().then((e=>{e.offlineMode&&(e.offlineMode.change=this.changeOfflineMode.bind(this)),e.passiveMode.load=this.loadPassiveMode.bind(this),e.passiveMode.change=this.changePassiveMode.bind(this),e.secondaryCss&&(e.secondaryCss.change=this.updateTheme.bind(this)),this.set("properties",e),this.set("loaded",!0)})),this.loadPassiveMode()},onteardown(){this.passiveModeChangeOff&&this.passiveModeChangeOff()},updateTheme:e=>S.set("avcfg://settings/Common/SecondaryCss",e).then((()=>window.location.reload())),repairProgram(){A.confirm(u(en.repairConfirmationDesc),{title:u(en.repairConfirmationTitle),ok:u(en.repairConfirmationYes),cancel:u(en.repairConfirmationNo)}).then((()=>{e.emit("Settings.gaTrack","Repair app"),Js.debug("triggering program repair"),this.set("properties.repairAndModify.repairInProgress",!0),y.repair().then((()=>{this.set("properties.repairAndModify.repairInProgress",!1)})).catch((e=>{Js.error("repairing program failed",e),this.set("properties.repairAndModify.repairInProgress",!1)}))}))},addAndModifyComponents(){e.emit("Settings.gaTrack","Add components"),y.modifyComponents()},exportSettings(){e.emit("Settings.gaTrack","Backup settings"),t("app.imexsettings.export").then((()=>{A.inform(u(en.settingsExported),{title:u("settings.success")})})).catch((e=>{e&&1223===e.code&&Js.info("settings export cancelled by the user")}))},importSettings(){e.emit("Settings.gaTrack","Restore settings"),t("app.imexsettings.import").then((()=>{this.showRestartDialog(u(en.settingsRestored))})).catch((e=>{e&&1223===e.code&&Js.info("settings import cancelled by the user")}))},openPerformanceRecorder(){e.emit("Settings.gaTrack","Open Performance Recorder"),n.minimize().then((()=>{n.open({url:location.origin+"/MainWindow.html?module=Feedback&view=performanceReporter",windowType:"window",showTitlebar:!1})}))},resetSettings(){e.emit("Settings.gaTrack","Reset to default confirm dlg","Open"),A.confirm(u(en.resetSettingsDesc),{title:u(en.resetSettingsTitle),ok:u(en.resetSettingsYes),cancel:u(en.resetSettingsNo)}).then((()=>{e.emit("Settings.gaTrack","Reset to default confirm dlg","Confirm"),y.factoryReset().then((()=>{this.showRestartDialog(u(en.settingsReset))})).catch((t=>{e.emit("Settings.gaTrack","Reset to default failed"),Js.error("resetting to default failed",t)}))})).catch((()=>{e.emit("Settings.gaTrack","Reset to default confirm dlg","Close")}))},sendLogs(){e.emit("Settings.gaTrack","Send logs","Open"),t("app.utils.OpenSupportTool")},changeOfflineMode(e){return 0==e?S.set(this.get("properties.offlineMode.path"),e):A.confirm(u(en.offlineModeConfirmDesc),{icon:"circle-critical",title:u(en.offlineModeConfirmTitle),ok:u("global.goOffline"),cancel:u("global.cancel")}).then((()=>S.set(this.get("properties.offlineMode.path"),e)))},loadPassiveMode:()=>t("app.passivemode.GetStatus").then((e=>({locked:e.locked,value:e.enabled}))),changePassiveMode(s){return new Promise((n=>{this.set("properties.passiveMode.value",s),t("app.passivemode."+(s?"Enable":"Disable")),this.passiveModeChangeOff=e.on("passivemode.onStatusChanged.installationProgress",(e=>{100===e&&(this.passiveModeChangeOff(),t("app.passivemode.GetInstallationProgress").then((e=>e.rebootRequired)).catch((e=>(console.error("getting passive mode progress data failed",e),console.info("..but the passive mode may have been changed successfully, so let's act like it's ok but require reboot"),!0))).then((e=>t("app.settings.ApplySettings").then((()=>e)).catch((e=>(console.error("applying settings failed -> require reboot",e),!0))))).then((e=>{if(e){const e=u(this.get("properties.passiveMode.value")?en.passiveModeRestartOn:en.passiveModeRestartOff);this.showRestartDialog(e)}n()})))}))}))},showRestartDialog(t){e.emit("Settings.gaTrack","Restart PC confirm dlg","Open"),A.confirm(t,{title:u(en.pleaseRestartPC),ok:u(en.restartNow),cancel:u(en.restartLater)}).then((()=>{e.emit("Settings.gaTrack","Restart PC confirm dlg","Confirm"),x.restart()})).catch((()=>{e.emit("Settings.gaTrack","Restart PC confirm dlg","Close")}))}}),an={scan:{desc:"exchange.scan.desc",access:"exchange.scan.access",background:"exchange.scan.background",proactive:"exchange.scan.proactive",transport:"exchange.scan.transport",rtf:"exchange.scan.rtf",infected:"exchange.scan.infected"},logging:{desc:"smb.loging.desc",label:"smb.loging.label",values:{low:"smb.loging.low",normal:"smb.loging.normal",high:"smb.loging.high",max:"smb.loging.max"}}};function on(){return{access:{id:"settings-exchange-scanning-access",label:u(an.scan.access),path:"avcfg://ExchangeShield/Exchange/ScanMessagesOnAccess",search:an.scan.access},background:{id:"settings-exchange-scanning-background",label:u(an.scan.background),path:"avcfg://ExchangeShield/Exchange/ScanMessagesInBackground",search:an.scan.background},proactive:{id:"settings-exchange-scanning-proactive",label:u(an.scan.proactive),path:"avcfg://ExchangeShield/Exchange/EnableProactiveScanning",search:an.scan.proactive},transport:{id:"settings-exchange-scanning-transport",label:u(an.scan.transport),path:"avcfg://ExchangeShield/Exchange/ScanAtTransportLevel",search:an.scan.transport},rtf:{id:"settings-exchange-scanning-rtf",label:u(an.scan.rtf),path:"avcfg://ExchangeShield/Exchange/ScanRTFBodies",search:an.scan.rtf},infected:{id:"settings-exchange-scanning-infected",label:u(an.scan.infected),path:"avcfg://ExchangeShield/Exchange/TryToCleanInfectedObjects",search:an.scan.infected},logging:{id:"settings-exchange-scanning-logging",label:u(an.logging.label),options:[{label:u(an.logging.values.low),value:"0"},{label:u(an.logging.values.normal),value:"1"},{label:u(an.logging.values.high),value:"2"},{label:u(an.logging.values.max),value:"3"}],path:"avcfg://ExchangeShield/Exchange/LoggingLevel",search:an.logging.label}}}function rn(){return{desc:an.desc,items:on()}}const ln=w.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"g-margin-top--10 g-margin-bottom--10"},f:[{t:3,x:{r:["nls","STRINGS.scan.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.access"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.background"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.proactive"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.transport"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.rtf"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.infected"}]}}," ",{t:7,e:"div",a:{class:"g-margin-top--10"},f:[{t:3,x:{r:["nls","STRINGS.logging.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"properties.logging"}]}}]},data:()=>({STRINGS:an,properties:on()})}),cn={untestDesc:"exchange.actions.utDesc",untestLabel:"exchange.actions.utLabel",infectLabel:"exchange.actions.infect",icon:"exchange.actions.icon",values:{allow:"exchange.actions.allow",overwrite:"exchange.actions.overwrite",delete:"exchange.actions.delete"}};function dn(){const e=[{label:u(cn.values.allow),value:"0"},{label:u(cn.values.overwrite),value:"1"},{label:u(cn.values.delete),value:"3"}];return{untest:{id:"settings-exchange-actions-untest",label:u(cn.untestLabel),path:"avcfg://ExchangeShield/Exchange/UntestableItemsAction",options:e,search:{title:cn.untestLabel,others:[cn.values.allow,cn.values.overwrite,cn.values.delete,cn.icon]}},untestIcon:{id:"settings-exchange-actions-untestIcon",label:u(cn.icon),path:"avcfg://ExchangeShield/Exchange/UntestableItemsChangeObjectIcon"},infected:{id:"settings-exchange-actions-infected",label:u(cn.infectLabel),path:"avcfg://ExchangeShield/Exchange/InfectedItemsAction",options:e,search:{title:cn.infectLabel,others:[cn.values.allow,cn.values.overwrite,cn.values.delete,cn.icon]}},infectedIcon:{id:"settings-exchange-actions-infectedIcon",label:u(cn.icon),path:"avcfg://ExchangeShield/Exchange/InfectedItemsChangeObjectIcon"}}}function pn(){return{desc:cn.untestDesc,items:dn()}}const un=w.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"g-margin-top--10 g-margin-bottom--10"},f:[{t:3,x:{r:["nls","STRINGS.untestDesc"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.untest"}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.untestIcon"}]}}]}," ",{t:7,e:"div",a:{class:"strike"}}," ",{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.infected"}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.infectedIcon"}]}}]}]},data:()=>({STRINGS:cn,properties:dn()})}),gn=r.createLogger("exchange.settings.blockingList"),hn="avcfg://ExchangeShield/Exchange/BlockingNames",mn=w.extend({template:{v:3,t:[{t:4,f:[{t:7,e:"table",a:{class:"table -small"},f:[{t:4,f:[{t:7,e:"tr",a:{class:"-selectable"},f:[{t:7,e:"td",f:[{t:7,e:"input",a:{id:[{t:2,r:"listType"},"-list-tooltip-opener-",{t:2,r:"index"}],type:"text",value:[{t:2,r:"."}],class:"input -blank -small ats_list-input",lazy:"500"},v:{keyup:"inputKeyup",blur:"saveList"}}," ",{t:7,e:"TooltipX",a:{cssCls:"stg__tooltip",boundariesSelector:".settings__content",showOnEllipsis:"true",openerSelector:["#",{t:2,r:"listType"},"-list-tooltip-opener-",{t:2,r:"index"}],placement:"bottom-start"},f:[{t:7,e:"div",a:{class:"text -small -secondary"},f:[{t:2,r:"."}]}]}]}," ",{t:7,e:"td",a:{class:"table__delete"},f:[{t:7,e:"button",a:{class:"a",title:[{t:3,x:{r:["nls"],s:'_0("global.remove")'}}]},v:{click:"removeFromList"},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-bin",size:"16"}}]}]}]}],n:52,i:"index",r:"list"}]}],n:50,r:"list.length"},{t:4,n:51,f:[{t:7,e:"p",a:{class:"p -small -secondary"},v:{click:"addToList"},f:[{t:3,x:{r:["nls"],s:'_0("global.emptyList")'}}]}],r:"list.length"}]},data:function(){return{list:[]}},oninit(){this.loadList(),this.on("inputKeyup",(e=>{13===e.original.keyCode&&e.node.blur()})),this.on("saveList",(t=>{e.emit("Settings.gaTrack","Save blockingNames");const s=this.get("list");t.context.length||s.splice(t.index.index,1),this.updateList(s)})),this.on("addToList",(()=>{this.addToList()})),this.on("removeFromList",(t=>{e.emit("Settings.gaTrack","Remove from blockingNames");const s=this.get("list");s.splice(t.index.index,1),this.updateList(s)}))},addToList(){const e=this.get("list");(0===e.length||e[0].length>0)&&e.unshift(""),this.find("input.ats_list-input").focus()},loadList(){t("app.settings.Get",{name:hn}).then((e=>{this.set("list",this.parseList(e.value))})).catch((e=>{gn.error("loading list failed",e)}))},updateList(e){this.set("list",e),t("app.settings.Set",{name:hn,value:this.stringifyList(e)})},parseList:e=>e?e.split(";"):[],stringifyList:e=>e&&e.length?e.join(";"):""}),fn={desc:"exchange.block.desc",blockByName:"exchange.block.byName",blockAdd:"exchange.block.add",fNameReplaceLabel:"exchange.block.fnameReplace",replaceWithLabel:"exchange.block.replaceWith"};function bn(){return{blockName:{id:"settings-exchange-blocking-blockName",label:u(fn.blockByName),path:"avcfg://ExchangeShield/Exchange/EnableAttachmentBlockingByName",search:fn.blockByName},fnameReplace:{id:"settings-exchange-blocking-fnameReplace",label:u(fn.fNameReplaceLabel),path:"avcfg://ExchangeShield/Exchange/BlockingFilenameReplacement",search:fn.fNameReplaceLabel},replaceWith:{id:"settings-exchange-blocking-replaceWith",label:u(fn.replaceWithLabel),path:"avcfg://ExchangeShield/Exchange/BlockingReplaceWith",search:fn.replaceWithLabel}}}function _n(){return{desc:fn.desc,items:bn()}}const vn=w.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"g-margin-top--10 g-margin-bottom--10"},f:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.blockName"}]}}," ",{t:7,e:"div",a:{class:"g-margin-bottom--15"},f:[{t:7,e:"button",a:{class:"btn -small -secondary g-margin-top--10 g-margin-bottom--5","data-test":"addBlockName"},v:{click:"addBlockName"},f:["+ ",{t:3,x:{r:["nls","STRINGS.blockAdd"],s:"_0(_1)"}}]}," ",{t:7,e:"BlockingList"}]}," ",{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.fnameReplace"}]},p:{labelRight:[]}}," ",{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.replaceWith"}]},p:{labelRight:[]}}]},components:{BlockingList:mn},data:()=>({STRINGS:fn,properties:bn()}),oninit(){this.blockingList=this.findComponent("BlockingList"),this.on("addBlockName",(()=>{this.blockingList.fire("addToList")}))}}),Sn={title:"exchange.title",desc:"exchange.desc",scanningTabLabel:"exchange.scan.tab",actionsTabLabel:"exchange.actions.tab",blockingTabLabel:"exchange.block.tab"};function yn(){return{scanning:{id:"settings-exchange-scanning",type:"tab",title:u(Sn.scanningTabLabel),hash:"Settings/exchange/scanning",testAttr:"scanning",compo:ln,search:{title:Sn.scanningTabLabel,desc:rn.desc,subroute:"scanning",items:rn.items}},actions:{id:"settings-exchange-actions",type:"tab",title:u(Sn.actionsTabLabel),hash:"Settings/exchange/actions",testAttr:"actions",compo:un,search:{title:Sn.actionsTabLabel,desc:pn.desc,subroute:"actions",items:pn.items}},blocking:{id:"settings-exchange-blocking",type:"tab",title:u(Sn.blockingTabLabel),hash:"Settings/exchange/blocking",testAttr:"blocking",compo:vn,search:{title:Sn.blockingTabLabel,desc:_n.desc,subroute:"blocking",items:_n.items}}}}const xn=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],component:"exchange",stopOptions:[{t:2,r:"stopOptions"}]},f:[{t:7,e:"SettingsTabs",a:{tabs:[{t:2,r:"tabs"}],selectedTabId:[{t:2,r:"selectedTabId"}]}}]}]},router:new i,data(){const e=yn();return{STRINGS:Sn,stopOptions:{},selectedTabId:null,tabs:[e.scanning,e.actions,e.blocking]}},oninit(){this.router.on("/",this.handleRoute.bind(this)),this.router.on("/:tab",this.handleRoute.bind(this))},onteardown(){this.router.removeAllListeners()},handleRoute(e){e&&e.tab?this.set("selectedTabId","settings-exchange-"+e.tab):window.location.hash=this.get("tabs.0.hash")}}),wn={title:"sharepoint.title",desc:"sharepoint.desc",logging:{desc:"smb.loging.desc",label:"smb.loging.label",values:{low:"smb.loging.low",normal:"smb.loging.normal",high:"smb.loging.high",max:"smb.loging.max"}},unclean:{label:"sharepoint.unclean.label",footer:"sharepoint.unclean.footer",values:{deny:"sharepoint.unclean.deny",replace:"sharepoint.unclean.replace"}}};function kn(){return{propLogging:{label:u(wn.logging.label),options:[{label:u(wn.logging.values.low),value:"0"},{label:u(wn.logging.values.normal),value:"1"},{label:u(wn.logging.values.high),value:"2"},{label:u(wn.logging.values.max),value:"3"}],path:"avcfg://SharepointShield/Sharepoint/LoggingLevel",search:wn.logging.label},propUnClean:{label:u(wn.unclean.label),path:"avcfg://SharepointShield/Sharepoint/UncleanableItemsAction",options:[{label:u(wn.unclean.values.deny),value:"0"},{label:u(wn.unclean.values.replace),value:"1"}],search:wn.unclean.label}}}const Tn=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],component:"sharepoint",stopOptions:[{t:2,r:"stopOptions"}]},f:[{t:7,e:"p",a:{class:"g-margin-top--10"},f:[{t:3,x:{r:["nls","STRINGS.logging.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"SettingsSelect",a:{property:[{t:2,r:"properties.propLogging"}],wrapCssCls:"g-margin-bottom--10"}}," ",{t:7,e:"SettingsRadio",a:{property:[{t:2,r:"properties.propUnClean"}]}}," ",{t:7,e:"div",f:[{t:3,x:{r:["nls","STRINGS.unclean.footer"],s:"_0(_1)"}}]}]}]},data:()=>({STRINGS:wn,stopOptions:{},properties:kn()})}),An={0:"UNDEFINED",1:"STARTING",2:"STARTED",3:"CONNECTING",4:"CONNECTED",5:"DISCONNECTING",6:"STOPPING",7:"STOPPED"},In={0:"UNDEFINED",1:"STARTING",2:"TESTING",3:"CONNECTION_OK",4:"NOT_AVAILABLE",5:"FAILED"},En={title:"remoteAdmin.title",desc:"remoteAdmin.desc",server:"remoteAdmin.server",port:"remoteAdmin.port",login:"remoteAdmin.login",pass:"remoteAdmin.pass",port4msg:"remoteAdmin.port4msg",testRemote:"remoteAdmin.testRemote"},Pn=function(){return t("app.settings.Get",{name:this.path}).then((e=>(void 0===this.defaultValue||e.value||0===e.value||(e.value=this.defaultValue),e))).finally((()=>{const e=this.cmpRemoteAdmin.get("properties");this.propLoaded||(this.propLoaded=!0),this.cmpRemoteAdmin._loginPropsLoaded||e.server.propLoaded&&e.port.propLoaded&&e.loginName.propLoaded&&e.password.propLoaded&&e.portMsgIncoming.propLoaded&&(this.cmpRemoteAdmin._loginPropsLoaded=!0,this.cmpRemoteAdmin.remoteStateFetch().finally((()=>this.cmpRemoteAdmin.remoteStateWatch())))}))};function Cn(){return{server:{label:u(En.server),path:"avcfg://settings/AvAdminClient/Server",search:En.server,defaultValue:"",load:Pn},port:{label:u(En.port),path:"avcfg://settings/AvAdminClient/Port",search:En.port,type:"number",minValue:1,maxValue:65535,defaultValue:4158,load:Pn},loginName:{label:u(En.login),path:"avcfg://settings/AvAdminClient/LoginName",search:En.login,load:Pn},password:{label:u(En.pass),property:"password",path:"avcfg://settings/AvAdminClient/LoginPassword",type:"password",search:En.pass,load:Pn},portMsgIncoming:{label:u(En.port4msg),path:"avcfg://settings/AvAdminClient/ListeningPort",search:En.port4msg,type:"number",minValue:1,maxValue:65535,defaultValue:6503,load:Pn}}}const Ln=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}]},f:[{t:4,f:[{t:7,e:"div",a:{class:"growl -block g-margin-top--10"},f:[{t:3,x:{r:["nls","remoteState"],s:'_0("remoteAdmin.remote.state."+_1)'}}]}],n:50,x:{r:["remoteState"],s:'_0&&_0!=="UNDEFINED"'}},{t:4,n:51,f:[{t:7,e:"div",a:{class:"g-margin-top--40"}}],x:{r:["remoteState"],s:'_0&&_0!=="UNDEFINED"'}}," ",{t:7,e:"div",a:{style:"position: relative"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.server"}],cssCls:"-full"}}," ",{t:7,e:"div",a:{class:"sixpack"},f:[{t:7,e:"div",a:{class:"sixpack__3"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.port"}],cssCls:"-full"}}]}," ",{t:7,e:"div",a:{class:"sixpack__3"},f:[{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.portMsgIncoming"}],cssCls:"-full"}}]}]}," ",{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.loginName"}],cssCls:"-full"}}," ",{t:7,e:"SettingsTextInput",a:{property:[{t:2,r:"properties.password"}],cssCls:"-full"}}," ",{t:4,f:[{t:7,e:"div",a:{class:["growl -block g-margin-top--10 ",{t:4,f:["-critical"],n:50,x:{r:["remoteTestStatus"],s:'_0==="NOT_AVAILABLE"||_0==="FAILED"'}}," ",{t:4,f:["-ok"],n:50,x:{r:["remoteTestStatus"],s:'_0==="CONNECTION_OK"'}}]},f:[{t:4,f:[{t:7,e:"kin-loading",a:{size:"small"}}],n:50,x:{r:["remoteTestStatus"],s:'_0==="STARTING"||_0==="TESTING"'}}," ",{t:3,x:{r:["nls","remoteTestStatus"],s:'_0("remoteAdmin.remote.status."+_1)'}}]}],n:50,x:{r:["remoteTestStatus"],s:'_0&&_0!=="UNDEFINED"'}}," ",{t:7,e:"button",a:{class:"btn -secondary g-margin-top--10",disabled:[{t:2,x:{r:["testableRemote","remoteState"],s:'!_0||_1==="testing"'}}]},v:{click:{m:"testRemote",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.testRemote"],s:"_0(_1)"}}]}]}]}]},data(){const e=Cn();return Object.values(e).forEach((e=>e.cmpRemoteAdmin=this)),{STRINGS:En,properties:e,_remoteState:null,_remoteTestStatus:null}},computed:{testableRemote(){const e=this.get("properties");return e.server.value&&e.port.value&&e.portMsgIncoming.value},remoteState(){return An[this.get("_remoteState")]},remoteTestStatus(){return In[this.get("_remoteTestStatus")]}},onteardown(){this.remoteStateStopWatch()},testRemote(){if(!this.get("testableRemote"))return;this.remoteStateStopWatch(),this.set("properties.server.disabled",!0),this.set("properties.port.disabled",!0),this.set("properties.portMsgIncoming.disabled",!0),this.set("properties.loginName.disabled",!0),this.set("properties.password.disabled",!0);const e=this.get("properties");t("app.smb.AdminConnectionTest",{address:e.server.value,remotePort:parseInt(e.port.value,10),localPort:parseInt(e.portMsgIncoming.value,10),login:e.loginName.value,password:e.password.value}).finally((()=>{this.remoteStateFetch().finally((()=>{this.set("properties.server.disabled",!1),this.set("properties.port.disabled",!1),this.set("properties.portMsgIncoming.disabled",!1),this.set("properties.loginName.disabled",!1),this.set("properties.password.disabled",!1),this.remoteStateWatch()}))}))},remoteStateFetch(){return Promise.all([t("app.settings.Get","avcfg://settings/AvAdminClient/State"),t("app.settings.Get","avcfg://settings/AvAdminClient/TestStatus")]).then((e=>{this.set({_remoteState:e[0],_remoteTestStatus:e[1]})}))},remoteStateWatch(){this.remoteStateStopWatch(),this.remoteStateWatchTimer=setTimeout((()=>{this.remoteStateFetch().finally((()=>this.remoteStateWatch()))}),2e3)},remoteStateStopWatch(){this.remoteStateWatchTimer&&(this.remoteStateWatchTimer=clearTimeout(this.remoteStateWatchTimer))}}),Nn={title:"smarthome.hub.troubleshooting.desc",reconf:{desc:"smarthome.hub.desc",btn:"smarthome.hub.btnReconf"},reconfModal:{title:"smarthome.hub.modal.title",desc:"smarthome.hub.modal.desc",btnConfirm:"smarthome.hub.modal.btnConfirm"},manualSetup:{title:"smarthome.hub.manualSetup.title",descDhcp:"smarthome.hub.manualSetup.desc",descArp:"smarthome.hub.manualSetup.desc.arp",btnDhcp:"smarthome.hub.manualSetup.dhcp",btnArp:"smarthome.hub.manualSetup.arp"},sendLogs:{title:"smarthome.sendLogs.title",desc:"smarthome.sendLogs.desc",btn:"smarthome.sendLogs.btn",sending:"smarthome.sendLogs.sending",errorStatusDesc:"smarthome.sendLogs.status.error.desc",okStatusDesc:"smarthome.sendLogs.status.ok.desc"},troubleshootingMode:{desc:"smarthome.hub.troubleshootingMode.desc",btnDisable:"smarthome.hub.troubleshootingMode.btn.disable",btnEnable:"smarthome.hub.troubleshootingMode.btn.enable",enabledTitle:"smarthome.hub.troubleshootingMode.notification.title",enabledDesc:"smarthome.hub.troubleshootingMode.notification.desc",enabling:"smarthome.hub.troubleshootingMode.status.enabling",disabling:"smarthome.hub.troubleshootingMode.status.disabling"},troubleshootingModeModal:{title:"smarthome.hub.troubleshootingMode.modal.title",desc:"smarthome.hub.troubleshootingMode.modal.desc",btnConfirm:"smarthome.hub.troubleshootingMode.btn.disable"},troubleshootingModeErrorModal:{title:"smarthome.hub.troubleshootingMode.modalError.title",desc:"smarthome.hub.troubleshootingMode.modalError.desc",link:"smarthome.hub.troubleshootingMode.modalError.helpLink"},resetHub:{title:"smarthome.hub.reset.title",desc:"smarthome.hub.reset.desc",stepOne:"smarthome.hub.reset.stepOne",stepTwo:"smarthome.hub.reset.stepTwo"}},Rn={id:"settings-smarthome-btnReconf",search:{title:Nn.reconf.btn,desc:Nn.reconf.desc}};function Mn(){return Gn().then((e=>{const t=e.arp?Nn.manualSetup.descDhcp:Nn.manualSetup.descArp,s=e.arp?Nn.manualSetup.btnDhcp:Nn.manualSetup.btnArp;return{id:"settings-smarthome-manualSetup",descId:t,btnLabelId:s,search:{title:s,desc:t}}}))}const Dn={id:"settings-smarthome-troubleshootingMode",search:{title:Nn.troubleshootingMode.btnDisable,desc:Nn.troubleshootingMode.desc,others:[Nn.troubleshootingMode.btnDisable,Nn.troubleshootingMode.btnEnable,Nn.troubleshootingMode.enabledTitle,Nn.troubleshootingMode.enabledDesc]}},$n={id:"settings-smarthome-reset",search:{title:Nn.resetHub.title,desc:Nn.resetHub.desc,others:[Nn.resetHub.stepOne,Nn.resetHub.stepTwo]}},Un={id:"settings-smarthome-sendLogs",search:{title:Nn.sendLogs.btn}},On={arp:!0};function Gn(){return a.importModule("Smarthome","store").then((e=>{const{routerInfo:t}=e.get();return t&&t[0]&&t[0].tamMode?t[0].tamMode:On})).catch((()=>On))}const jn=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}]},f:[{t:4,f:[{t:7,e:"kin-loading",a:{fullscreen:"true"}}],n:50,r:"loading"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--20",id:[{t:2,r:"reconf.id"}]},f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:3,x:{r:["nls","STRINGS.reconf.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -small -secondary","data-test":"settings-omni-reconfigure-hub"},v:{click:{m:"showReconfigureModal",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.reconf.btn"],s:"_0(_1)"}}]}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--20",id:[{t:2,r:"manualSetup.id"}]},f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:3,x:{r:["nls","manualSetup.descId"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -small -secondary","data-test":"settings-omni-manual-setup"},v:{click:{m:"manualSetup",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","manualSetup.btnLabelId"],s:"_0(_1)"}}]}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--20",id:[{t:2,r:"troubleshootingMode.id"}]},f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingMode.desc"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:7,e:"Icon",a:{name:"exclamation",cssCls:"badge settings__icon -small color-critical -triangle -bg"}}," ",{t:7,e:"span",a:{class:"span -small color-critical -text g-margin-left--10"},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingMode.enabledTitle"],s:"_0(_1)"}}," ",{t:3,x:{r:["nls","STRINGS.troubleshootingMode.enabledDesc"],s:"_0(_1)"}}]}]}],n:50,r:"isTSModeActive"}," ",{t:4,f:[{t:7,e:"kin-loading",a:{size:"small",inline:"true"}}," ",{t:7,e:"span",a:{class:"span -small"},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingMode.enabling"],s:"_0(_1)"}}]}],n:50,x:{r:["setTSMStatus"],s:'_0==="ENABLING"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["setTSMStatus"],s:'_0==="DISABLING"'},f:[{t:7,e:"kin-loading",a:{size:"small",inline:"true"}}," ",{t:7,e:"span",a:{class:"span -small"},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingMode.disabling"],s:"_0(_1)"}}]}]},{t:4,n:50,x:{r:["setTSMStatus"],s:'!(_0==="DISABLING")'},f:[" ",{t:4,f:[{t:7,e:"button",a:{class:"btn -small -primary","data-test":"settings-omni-troubleshooting-mode"},v:{click:{m:"setTSM",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingMode.btnEnable"],s:"_0(_1)"}}]}],n:50,r:"isTSModeActive"},{t:4,n:51,f:[{t:7,e:"button",a:{class:"btn -small -secondary","data-test":"settings-omni-troubleshooting-mode"},v:{click:{m:"showTroubleshootingModeModal",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingMode.btnDisable"],s:"_0(_1)"}}]}],r:"isTSModeActive"}]}],x:{r:["setTSMStatus"],s:'_0==="ENABLING"'}}]}],n:50,x:{r:["isTSModeAvailable","tamMode.arp","isTSModeActive"],s:"_0&&(_1||_2)"}}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--10",id:[{t:2,r:"sendLogs.id"}]},f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:3,x:{r:["nls","STRINGS.sendLogs.desc"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"Icon",a:{name:"tick",cssCls:"badge settings__icon -small color-ok -bg"}}," ",{t:7,e:"span",a:{class:"span -small g-margin-left--10"},f:[{t:3,x:{r:["nls","STRINGS.sendLogs.okStatusDesc"],s:"_0(_1)"}}]}],n:50,x:{r:["sendOmniLogsStatus"],s:'_0==="OK"'}},{t:4,n:51,f:[{t:4,n:50,x:{r:["sendOmniLogsStatus"],s:'_0==="ERROR"||_0==="TIMEOUT"'},f:[{t:7,e:"Icon",a:{name:"exclamation",cssCls:"badge settings__icon -small color-critical -triangle -bg"}}," ",{t:7,e:"span",a:{class:"span -small color-critical -text g-margin-left--10"},f:[{t:3,x:{r:["nls","STRINGS.sendLogs.errorStatusDesc"],s:"_0(_1)"}}]}]},{t:4,n:50,x:{r:["sendOmniLogsStatus"],s:'(!(_0==="ERROR"||_0==="TIMEOUT"))&&(_0==="SENDING")'},f:[" ",{t:7,e:"kin-loading",a:{size:"small",inline:"true"}}," ",{t:7,e:"span",a:{class:"span -small"},f:[{t:3,x:{r:["nls","STRINGS.sendLogs.sending"],s:"_0(_1)"}}]}]},{t:4,n:50,x:{r:["sendOmniLogsStatus"],s:'(!(_0==="ERROR"||_0==="TIMEOUT"))&&(!(_0==="SENDING"))'},f:[" ",{t:7,e:"button",a:{class:"btn -secondary"},v:{click:{m:"sendOmniLogs",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.sendLogs.btn"],s:"_0(_1)"}}]}]}],x:{r:["sendOmniLogsStatus"],s:'_0==="OK"'}}]}],n:50,r:"isSendLogsAvailable"}],n:50,x:{r:["isPrescout"],s:"!_0"}}," ",{t:7,e:"div",a:{class:"settings__row g-margin-top--20",id:[{t:2,r:"resetHub.id"}]},f:[{t:7,e:"h3",a:{class:"h3"},f:[{t:3,x:{r:["nls","STRINGS.resetHub.title"],s:"_0(_1)"}}]}," ",{t:7,e:"div",a:{class:"settings__desc g-margin-top--20"},f:[{t:3,x:{r:["nls","STRINGS.resetHub.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"ol",a:{class:"list g-margin-top--20 text -small"},f:[{t:7,e:"li",a:{class:"list__item"},f:[{t:3,x:{r:["nls","STRINGS.resetHub.stepOne"],s:"_0(_1)"}}]}," ",{t:7,e:"li",a:{class:"list__item"},f:[{t:3,x:{r:["nls","STRINGS.resetHub.stepTwo"],s:"_0(_1)"}}]}]}]}],r:"loading"}]}," ",{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls","STRINGS.reconfModal.title"],s:"_0(_1)"}}]},f:[" ",{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls","STRINGS.reconfModal.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",a:{class:"btn -large -critical"},v:{click:{m:"reconfigureHub",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.reconfModal.btnConfirm"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -large -secondary"},v:{click:"Modal.close"},f:[{t:3,x:{r:["nls"],s:'_0("global.cancel")'}}]}]}],p:{modalHeaderContent:[{t:7,e:"div",a:{class:"g-margin-bottom--20"},f:[{t:7,e:"kin-icon",a:{name:"circle-critical",size:"48"}}]}]}}],n:50,r:"showReconfigureModal"},{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls","STRINGS.troubleshootingModeModal.title"],s:"_0(_1)"}}]},f:[" ",{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingModeModal.desc"],s:"_0(_1)"}}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",a:{class:"btn -large -primary"},v:{click:{m:"setTSM",a:{r:[],s:"[]"}}},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingModeModal.btnConfirm"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -large -secondary"},v:{click:"Modal.close"},f:[{t:3,x:{r:["nls"],s:'_0("global.cancel")'}}]}]}],p:{modalHeaderContent:[{t:7,e:"div",a:{class:"g-margin-bottom--20"},f:[{t:7,e:"kin-icon",a:{name:"circle-critical-neutral",size:"48"}}]}]}}],n:50,r:"showTSMConfirmModal"},{t:4,f:[{t:7,e:"Modal",a:{title:[{t:3,x:{r:["nls","STRINGS.troubleshootingModeErrorModal.title"],s:"_0(_1)"}}]},f:[{t:7,e:"p",a:{class:"p"},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingModeErrorModal.desc"],s:"_0(_1)"}}," ",{t:7,e:"a",a:{class:"a"},v:{click:{m:"openUrl",a:{r:["SUPPORT_LINK"],s:"[_0]"}}},f:[{t:3,x:{r:["nls","STRINGS.troubleshootingModeErrorModal.link"],s:"_0(_1)"}}]}]}," ",{t:7,e:"div",a:{class:"modal__actions"},f:[{t:7,e:"button",a:{class:"btn -secondary"},v:{click:"Modal.close"},f:[{t:3,x:{r:["nls"],s:'_0("global.ok")'}}]}]}]}],n:50,r:"showTSMErrorModal"}]},data:()=>({STRINGS:Nn,loading:!0,reconf:Rn,sendLogs:Un,manualSetup:{},troubleshootingMode:Dn,isSendLogsAvailable:!0,sendOmniLogsStatus:"",isPrescout:!1,tamMode:On,isTSM:!0,setTSMStatus:"",isTSModeAvailable:!0,isTSModeActive:!1,SUPPORT_LINK:"https://support.avast.com/product/avast_omni/",showReconfigureModal:!1,showTSMConfirmModal:!1,showTSMErrorModal:!1}),smarthomeStore:null,oninit(){this.on("Modal.close",(()=>{this.set({showReconfigureModal:!1,showTSMConfirmModal:!1,showTSMErrorModal:!1})})),Mn().then((e=>this.set("manualSetup",e))),Gn().then((e=>this.set("tamMode",e))),a.importModule("Smarthome","store").then((e=>{this.smarthomeStore=e;const{prescout:t}=this.smarthomeStore.get();this.set("isPrescout",!0===t),this.smarthomeStore.getRouterTroubleshootingMode().then((e=>{e&&e[0]&&e[0].current&&e[0].current.troubleshootingMode&&this.set("isTSModeActive",Boolean(e[0].current.troubleshootingMode.passiveMode)),this.set({isTSModeAvailable:!0,loading:!1})})).catch((e=>{console.error("getRouterTroubleshootingMode()",e),this.set({isTSModeAvailable:!1,loading:!1})}))})).catch((e=>{console.error("Failed loading Smarthome.store",e),this.set({isTSModeAvailable:!1,isSendLogsAvailable:!1,loading:!1})}))},openUrl(e){n.browse(e)},showReconfigureModal(){this.set("showReconfigureModal",!0)},reconfigureHub(){window.location.hash="Smarthome/pluging"},manualSetup(){window.location.hash="Smarthome/boxsetup/manualdhcp"},showTroubleshootingModeModal(){this.set("showTSMConfirmModal",!0)},setTSM(){const e=this.get("isTSModeActive");this.set({showTSMConfirmModal:!1,setTSMStatus:e?"ENABLING":"DISABLING"}),this.smarthomeStore.postRouterTroubleshootingMode(!e).then((()=>{this.watchTroubleshootingMode()})).catch((e=>{console.error(e),this.set({showTSMErrorModal:!0,setTSMStatus:null})}))},watchTroubleshootingMode(){const e=this.get("isTSModeActive");let t=0;const s=()=>{this.smarthomeStore.getRouterTroubleshootingMode().then((n=>{if(t++,t>60)return this.set({showTSMErrorModal:!0,setTSMStatus:null});n&&n[0]&&n[0].requested&&n[0].requested.state?("ERROR"===n[0].requested.state&&(console.error(n[0].requested.errorMsg),this.set({showTSMErrorModal:!0,setTSMStatus:null})),"DONE"===n[0].requested.state&&n[0].current&&n[0].current.troubleshootingMode&&this.set({isTSModeActive:n[0].current.troubleshootingMode.passiveMode,setTSMStatus:null}),"IN_PROGRESS"===n[0].requested.state&&(this.set("setTSMStatus",e?"ENABLING":"DISABLING"),setTimeout((()=>s()),2e3))):n&&n[0]&&n[0].current&&n[0].current.troubleshootingMode&&this.set({isTSModeActive:n[0].current.troubleshootingMode.passiveMode,setTSMStatus:null})})).catch((e=>{console.error(e),this.set({showTSMErrorModal:!0,setTSMStatus:null})}))};s()},sendOmniLogs(){this.set("sendOmniLogsStatus","SENDING"),this.smarthomeStore.boxSendlogs().then((e=>{this.set("sendOmniLogsStatus",e.result)})).catch((e=>{this.set("sendOmniLogsStatus","ERROR"),console.error("Send Omni logs err",e)}))}}),Vn={title:"smarthome.personalPrivacy.title",gdpr:{desc:"smarthome.gdpr.desc",descExporting:"smarthome.gdpr.descExporting",descSuccess:"smarthome.gdpr.descSuccess",descError:"smarthome.gdpr.descError",btnRequest:"smarthome.gdpr.btnRequest",btnDownload:"global.download",statusPending:"smarthome.gdpr.statusPending"}},Fn={id:"settings-smarthome-gdpr",search:{title:Vn.gdpr.btnDownload,desc:Vn.gdpr.desc,others:[Vn.gdpr.btnRequest,Vn.gdpr.btnDownload,Vn.gdpr.descExporting,Vn.gdpr.descSuccess]}};const Bn=w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}]},f:[{t:4,f:[{t:7,e:"kin-loading",a:{fullscreen:"true"}}],n:50,r:"loading"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"settings__row g-margin-top--10",id:[{t:2,r:"sendLogs.id"}]},f:[{t:4,f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:2,x:{r:["nls","STRINGS.gdpr.descExporting"],s:"_0(_1)"}}]}," ",{t:7,e:"kin-loading",a:{size:"small",inline:"true"}}," ",{t:7,e:"span",a:{class:"span -small"},f:[{t:2,x:{r:["nls","STRINGS.gdpr.statusPending"],s:"_0(_1)"}}]}],n:50,x:{r:["gdpr.status","GDPR_EXPORTING"],s:"_0===_1"}},{t:4,n:51,f:[{t:4,n:50,x:{r:["gdpr.status","GDPR_SUCCESS"],s:"_0===_1"},f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:2,x:{r:["nls","STRINGS.gdpr.descSuccess","getHoursToExpire","gdpr.expireAt"],s:"_0(_1,_2(_3))"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary"},v:{click:{m:"openUrl",a:{r:["gdpr.url"],s:"[_0]"}}},f:[{t:2,x:{r:["nls","STRINGS.gdpr.btnDownload"],s:"_0(_1)"}}]}]},{t:4,n:50,x:{r:["gdpr.status","GDPR_SUCCESS"],s:"!(_0===_1)"},f:[" ",{t:7,e:"div",a:{class:"settings__desc"},f:[{t:2,x:{r:["nls","STRINGS.gdpr.desc"],s:"_0(_1)"}}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"settings__desc"},f:[{t:7,e:"span",a:{class:"span -small color-critical -text g-margin-left--10"},f:[{t:2,x:{r:["nls","STRINGS.gdpr.descError"],s:"_0(_1)"}}]}]}],n:50,x:{r:["gdpr.status","GDPR_ERROR"],s:"_0===_1"}}," ",{t:7,e:"button",a:{class:"btn -secondary"},v:{click:{m:"gdprRequest",a:{r:[],s:"[]"}}},f:[{t:2,x:{r:["nls","STRINGS.gdpr.btnRequest"],s:"_0(_1)"}}]}]}],x:{r:["gdpr.status","GDPR_EXPORTING"],s:"_0===_1"}}]}],r:"loading"}]}]},data:()=>({STRINGS:Vn,loading:!0,getHoursToExpire:e=>{const t=g(),s=g(e).diff(t,"hours");return s>1?s:1},POLL_LIMIT:3e4,gdpr:{status:"NONE"},GDPR_NONE:"NONE",GDPR_EXPORTING:"EXPORTING",GDPR_SUCCESS:"SUCCESS",GDPR_CANCELED:"CANCELED",GDPR_ERROR:"ERROR"}),smarthomeStore:null,checkInterval:null,oninit(){a.importModule("Smarthome","store").then((e=>{this.smarthomeStore=e,this.smarthomeStore.getDataExport().then((e=>{this.set({gdpr:e,loading:!1}),"EXPORTING"!==e.status||this.checkInterval||this.setCheckInterval()})).catch((e=>{console.error("getDataExport()",e),this.set("loading",!1)}))})).catch((e=>{console.error("Failed loading Smarthome.store",e),this.set("loading",!1)}))},onteardown(){this.checkInterval&&this.clearCheckInterval()},openUrl(e){n.browse(e)},gdprRequest(){this.smarthomeStore.postDataExport().then((()=>{this.gdprStatus()})).catch((e=>{console.error("Failed to request Data Export",e),this.gdprStatus()}))},gdprStatus(){this.smarthomeStore.getDataExport().then((e=>{this.set("gdpr",e),"EXPORTING"!==e.status||this.checkInterval?"EXPORTING"!==e.status&&this.checkInterval&&this.clearCheckInterval():this.setCheckInterval()})).catch((e=>{console.error("Failed to get Data Export Status",e)}))},setCheckInterval(){this.checkInterval=setInterval((()=>{this.gdprStatus()}),3e4)},clearCheckInterval(){this.checkInterval=clearInterval(this.checkInterval)}}),zn={title:"settings.legacyPasswords"};function Wn(){return{showLegacyPasswords:{id:"settings-legacy-show",label:u("settings.legacyPasswords.showInMenu.label"),desc:u("settings.legacyPasswords.showInMenu.desc"),track:{subject:"Show Avast Passwords"},path:"avcfg://settings/Common/ShowLegacyPasswords",search:u("settings.legacyPasswords.showInMenu.label")}}}const Hn={blockedAndAllowedApps:As,exceptions:Et,languages:Ue,notifications:mt,password:zs,personalPrivacy:Xs,troubleshooting:nn,update:ut,exchange:xn,sharepoint:Tn,remoteAdmin:Ln,smarthomeTroubleshooting:jn,smarthomePersonalPrivacy:Bn,legacyPasswords:w.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{title:[{t:2,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}]},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.showLegacyPasswords"}]}}]}]},data:()=>({STRINGS:zn,properties:Wn()}),onteardown(){e.emit("Settings.updateMenu")}})},qn={blockedAndAllowedApps:Ts,exceptions:It,languages:function(){return{title:De.title,desc:De.desc,items:$e()}},notifications:function(){return{title:gt.title,items:ht()}},password:Bs,personalPrivacy:function(){return{title:qs.title,desc:qs.desc,items:Ys()}},troubleshooting:function(){return sn().then((e=>({title:en.title,items:e})))},update:function(){return{title:pt,subpages:[{search:{title:et.virusDefinitions,items:tt()}},{search:(Object.keys(ot).forEach((e=>{ot[e].search&&(ot[e].search.napiEvent="settings.update.showProgramUpdate")})),{title:lt.program,items:Object.assign(ct(),ot)})}]}},exchange:function(){const e=yn();return{title:Sn.title,desc:Sn.desc,subpages:[e.scanning,e.actions,e.blocking]}},sharepoint:function(){return{title:wn.title,desc:wn.desc,items:kn()}},remoteAdmin:function(){return{title:En.title,desc:En.desc,items:Cn()}},smarthomeTroubleshooting:function(){return Mn().then((e=>({title:Nn.title,items:[Rn,e,Un,Dn,$n]})))},smarthomePersonalPrivacy:function(){return{title:Vn.title,items:[Fn]}},legacyPasswords:function(){return{title:zn.title,items:Wn()}}},Yn={troubleshooting:[{path:"avcfg://settings/Common/LimitAccessForGuestAccount",label:"Limit program access for Guest account",desc:"The Guest account should not be able to change the security settings.",type:"checkbox"},{label:"Maximum size of each log file",path:"avcfg://settings/Common/LogMaxSize",type:"number",unit:"kB",minValue:1,maxValue:1e6,required:!0}],update:[{path:"avcfg://settings/InetWD/UpdatePeriod",label:"Auto-update every",track:{subject:"Auto-update every"},type:"number",minValue:1,maxValue:99999,required:!0,unit:"minutes"}]};var Kn=".stg_switch__tooltip {\n transform: translateX(-50%);\n left: 50%;\n position: absolute;\n top: 35;\n min-width: 230px;\n}\n";Le(Kn);const Xn=r.createLogger("settings.container"),Jn=w.extend({template:{v:3,t:[{t:7,e:"h3",a:{class:"h3 settings__title"},f:[{t:2,r:"title"}]}," ",{t:7,e:"div",a:{class:"settings__status"},f:[{t:4,f:[{t:4,f:[{t:7,e:"div",a:{class:"g-relative"},f:[{t:7,e:"Switch",a:{disabled:"true",cssCls:"-trivial"}}," ",{t:4,f:[{t:7,e:"div",a:{class:"stg_switch__tooltip tooltip -arrow-top"},f:[{t:2,r:"notSupportedMsg"}]}],n:50,r:"notSupportedMsg"}]}],n:50,r:"notSupported"},{t:4,n:51,f:[{t:4,n:50,x:{r:["noEnable"],s:"!_0"},f:[{t:7,e:"Switch",a:{checked:[{t:2,r:"isEnabled"}],disabled:[{t:2,x:{r:["enablingControllable","enablingLocked"],s:"!_0||_1"}}],dataTest:"settings_component-switch"},v:{domClick:"toggleEnabled"}}," ",{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"enablingLocked"}]}],r:"notSupported"}],n:50,x:{r:["noInstall","isInstalled"],s:"_0||_1"}},{t:4,n:51,f:[{t:7,e:"div",a:{class:"settings__not-installed"},f:[{t:3,x:{r:["nls"],s:'_0("settings.notInstalled")'}}]}],x:{r:["noInstall","isInstalled"],s:"_0||_1"}}]}," ",{t:4,f:[{t:7,e:"p",a:{class:"settings__desc"},f:[{t:3,r:"desc"}]}],n:50,r:"desc"},{t:4,f:[{t:4,f:[{t:4,f:[{t:7,e:"div",o:"insertYield"}],n:50,r:"yieldElem"},{t:4,n:51,f:[{t:16}],r:"yieldElem"}],n:50,r:"loaded"},{t:4,n:51,f:[{t:7,e:"div",a:{class:"center__wrap"},f:[{t:7,e:"div",a:{class:"center"},f:["Loading"]}]}],r:"loaded"}],n:50,x:{r:["noInstall","isInstalled"],s:"_0||_1"}},{t:4,n:51,f:[{t:7,e:"Button",v:{domClick:"openSetup"},a:{cssCls:"-secondary g-margin-top--15"},f:[{t:3,x:{r:["nls"],s:'_0("settings.addAndModifyComponents")'}}]}],x:{r:["noInstall","isInstalled"],s:"_0||_1"}}]},css:Kn,data:()=>({loaded:!0,component:null,ipmBuyElm:null,title:null,desc:null,noInstall:!1,noEnable:!1,componentService:null,stopOptions:null,notSupported:!1,notSupportedMsg:null,isInstalled:!1,isEnabled:!0,enablingControllable:!1,yieldElem:null}),decorators:{insertYield:function(e){const t=this.get("yieldElem");return e.replaceWith(t),t.hidden=!1,{teardown:function(){}}}},oninit(){!this.get("yieldElem")||(this.get("noInstall")||this.get("isInstalled"))&&this.get("loaded")||(this.get("yieldElem").hidden=!0),this._component=this.get("component"),this.componentService=this.get("componentService"),this.componentService?(this.componentService.init(),this.componentService.on("change",this.updateComponentStatus.bind(this)),this.componentService.on("controllable",this.updateComponentControllable.bind(this)),this.componentToggleWait=!1,this.componentService.hasToggleWithWaiting&&(this.componentToggleWait=this.componentService.hasToggleWithWaiting())):this._component&&e.on("product.change.feature."+this._component,this.updateComponentStatus.bind(this)),this.updateComponentStatus(),this.on("toggleEnabled",this.toggleEnabled.bind(this)),this.on("openSetup",(()=>{e.emit("Settings.gaTrack","Add and modify components"),y.modifyComponents()})),this._component||this.componentService||this.set({noInstall:!0,noEnable:!0})},onteardown(){this.componentService&&this.componentService.destroy()},updateComponentControllable(e){this.set({enablingControllable:e})},updateComponentStatus(){let e;this.componentService&&this.componentService.loadStatus?e=this.componentService.loadStatus(!0):this._component&&(e=Promise.resolve(b.getFeature(this._component))),e&&e.then((e=>{let t=!0;void 0!==e.controllable&&(t=e.controllable);const s={isInstalled:e.installed,isEnabled:e.enabled,enablingControllable:t,enablingLocked:!1};this.set(s),this.fire("componentStatus",s)}))},toggleEnabled(){const t=this.get("isEnabled"),s=this.get("component");let n;this.componentToggleWait&&setTimeout((()=>{this.set("isEnabled",t)}),0),this.componentService&&this.componentService.toggleEnabled?n=this.componentService.toggleEnabled():t&&this.get("stopOptions")?n=this.stopShield():!t&&b.isPassiveMode()?n=A.passiveMode().then((()=>b.toggleFeature(s))):(e.emit("Settings.gaTrack","Component ON/OFF",t?"off":"on"),n=b.toggleFeature(s)),n.catch(this.updateComponentStatus.bind(this))},stopShield(){return this.pickStopOption().then((t=>(e.emit("Settings.gaTrack","Component ON/OFF","off",t),b.disableFeature(this.get("component"),t))))},pickStopOption(){return A.stopOptions(this.get("stopOptions")).then((e=>e.time)).catch((()=>(Xn.info("no stop option selected.. doing nothing"),Promise.reject())))}});function Qn(e){if(null==e.value||""===e.value)return e.required?{valid:!1}:{valid:!0,value:e.value};{let t=e.value;if(null!=e.minValue||null!=e.maxValue){const s=parseInt(e.value);t=s,null!=e.minValue&&(s<e.minValue||isNaN(s))?t=e.minValue:null!=e.maxValue&&s>e.maxValue&&(t=e.maxValue)}return t="string"==typeof e.value?String(t):parseInt(t),{valid:!0,value:t}}}function Zn(e){return!e.required||null!=e.value&&""!==e.value?{valid:!0,value:e.value}:{valid:!1}}function ea(e){let t=e.value,s=t;switch("boolean"==typeof t&&(t=t?1:0),e._valueType){case"number":s=parseInt(t);break;case"boolean":s=Boolean(parseInt(t));break;case"string":s=null==t?"":t+""}return s}function ta(e){const t=e.map((e=>function(e){const t=e.map((e=>{let t=!0;return"exchange"===e.id||"sharepoint"===e.id?t=b.isInstalled(e.componentId)&&b.isLicensed(e.componentId):e.componentId&&(t=b.isLicensed(e.componentId)),t&&e.cond?e.cond():t}));return Promise.all(t).then((t=>e.filter(((e,s)=>t[s]))))}(e.sections)));return Promise.all(t).then((t=>{const s=[],n=[];return e.forEach(((e,a)=>{const o=t[a];o.length&&(e.cond?n.push(e.cond()):n.push(!0),s.push(Object.assign({},e,{sections:o})))})),Promise.all(n).then((e=>s.filter(((t,s)=>e[s]))))}))}function sa(e){const t=aa(e);return e.id||t&&JSON.stringify(t).replace(/[^a-zA-Z0-9]+/g,"_")}function na(e){const t=aa(e);return"object"==typeof e.testAttr?JSON.stringify(Array.isArray(e.testAttr)?e.testAttr:[e.testAttr]):void 0!==e.testAttr?e.testAttr:t?JSON.stringify(t):void 0}function aa(e){if(e.path)return"string"==typeof e.path?[{name:e.path}]:Array.isArray(e.path)?e.path.map((e=>"string"==typeof e?{name:e}:e)):[e.path]}function oa(t){try{!t&&localStorage.settingsSearchResult&&(t=JSON.parse(localStorage.settingsSearchResult))}catch(s){console.error("Reading search result from localStorage failed",s)}delete localStorage.settingsSearchResult,t=t||{},setTimeout((()=>{t.tabId&&e.emit("settings.selectTab",t.tabId),t.napiEvent&&e.emit(t.napiEvent,t.napiEventParams),window.setTimeout((()=>{let e;t.elemId&&(e=document.querySelector("#"+t.elemId+"__container"),e||(e=document.querySelector("#"+t.elemId))),document.querySelectorAll(".settings__highlight").forEach((e=>{e.classList.remove("settings__highlight")})),e&&(e.classList.add("settings__highlight"),e.scrollIntoView())}))}))}function ra(e){return!e.componentId||b.isInstalled(e.componentId)}const ia=Object.freeze({__proto__:null,validateIntValue:Qn,validateValue:Zn,getReportDestination:function(){const e="C:\\ProgramData\\AVAST Software\\Avast\\report";return t("app.settings.Get",{name:"avcfg://settings/Common/DefaultReportName"}).then((t=>t.value||e)).catch((()=>e))},getPropValueToStore:ea,filterStructure:ta,getPropId:sa,getPropTestAttr:na,getPropPaths:aa,highlightSearchResult:oa,isSectionContentVisible:ra}),la=r.createLogger("settings._input"),ca=w.extend({_listeners:[],data:()=>({property:null,_yieldElem:null}),decorators:{insertYield:function(e){return e.replaceWith(this.get("yieldElem")),{teardown:function(){}}},registerInput:function(e){return this.inputElem=e,{teardown:function(){}}}},computed:{idAttr:function(){if(!this.get("property"))return;const e=sa(this.get("property"));if(e)return e;la.warn("missing id attr.. may cause problems (e.g. connection to the label)",this.get("property"))},testAttr:function(){if(!this.get("property"))return;const e=na(this.get("property"));if(e)return e;la.info("missing data-test attr.. may cause problems to the testers",this.get("property"))},paths:function(){if(this.get("property"))return aa(this.get("property"))}},oninit(){this.on("changeProp",this.changeProp.bind(this));const t=this.get("property");t.updateOnEvent&&this._listeners.push(e.on(t.updateOnEvent,this.loadProp.bind(this,!0))),this._listeners.push(e.on("app.settings.onStatusChanged",this.loadProp.bind(this,!0))),this.loadProp();const s=this.get("property.descAsPromise");s&&s().then((e=>this.set("property.desc",e))),this.set("property.forceChange",(e=>{this.set("property.value",e),this.changeProp()}))},onteardown(){this._listeners.forEach((e=>e())),this._listeners.length=0},changeProp(){if(!this.validateValue().valid)return;const s=this.get("property"),n=this.getValueToStore(s);if(s.storedValue===n)return;this.set("property.controllable",!1),this.set("property.beingChanged",!0),this.track();let a=s.change&&s.change(n);if(!a){const e=this.get("paths").map((e=>t("app.settings.Set",Object.assign({value:n},e))));a=Promise.all(e)}a.then((()=>{s.storedValue=n,s.controllable=!0,s.beingChanged=!1,this.set("property",s),this.focusElem();const a=this.get("property.changeEvent");a&&e.emit("settings.change."+a,n),s.applyOnChange&&t("app.settings.ApplySettings")})).catch((e=>{this.setValue(s.storedValue),this.fire("error",e,s),this.focusElem()}))},loadProp(e){const s=this.get("property"),n=this.get("paths.0");if(!s)return;let a=s&&s.load&&s.load(e);a||(n?a=t("app.settings.Get",n):la.warn("loading property failed; neither path nor the load function defined",s)),a.then((e=>{null==e?la.error('the property "'+(n&&n.name||s.label)+'" is undefined'):(this.set("property.locked","1"==e.locked),this.set("property.storedValue",e.value),this.set("property._valueType",typeof e.value),this.setValue(e.value))})).catch((e=>{la.error("loading property failed",e,s)}))},setValue(e){this.set("property.value",this.getUiValue(e)),this.set("property.controllable",!0),this.set("property.beingChanged",!1)},getUiValue:e=>e,getValueToStore:ea,validateValue(){return{valid:!0,value:this.get("property.value")}},focusElem(){this.inputElem&&this.inputElem.focus()},track(){const t=this.get("property");if(t.track&&t.track.subject){let s;s=t.track.valueMap&&void 0!==t.track.valueMap[t.value]?t.track.valueMap[t.value]:t.value,void 0!==s&&(s=String(s)),e.emit("Settings.gaTrack",t.track.subject,s)}}}),da=ca.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"checkbox__row settings__row",id:[{t:2,r:"idAttr"},"__container"]},f:[{t:7,e:"input",o:"registerInputCheckbox",a:{type:"checkbox",checked:[{t:2,r:"property.value"}],value:[{t:2,r:"property.storedValue"}],id:[{t:2,r:"idAttr"}],"data-test":[{t:2,r:"testAttr"}],class:["checkbox",{t:4,f:[" -disabled"],n:50,x:{r:["property.locked","property.disabled","property.unlicensed","property.controllable"],s:"_0||_1||_2||!_3"}}]},m:[]}," ",{t:7,e:"label",a:{class:["checkbox__label ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.unlicensed","property.controllable"],s:"_0||_1||_2||!_3"}}],for:[{t:2,r:"idAttr"}]},f:[{t:3,r:"property.label"}," ",{t:4,f:[{t:7,e:"kin-loading",a:{size:"small",class:"g-margin-left--5",inline:"true"}}],n:50,x:{r:["property.beingChanged","property.showThrobberWhileChanging"],s:"_0&&_1"}}," ",{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"property.locked"}," ",{t:4,f:[{t:7,e:"SettingsBadge",a:{label:[{t:3,x:{r:["nls"],s:'_0("settings.unlicensed")'}}]}}],n:50,r:"property.unlicensed"}]}," ",{t:4,f:[{t:7,e:"p",a:{class:["settings__indent checkbox__desc ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.unlicensed","property.controllable"],s:"_0||_1||_2||!_3"}}]},f:[{t:3,r:"property.desc"}]}],n:50,r:"property.desc"}," ",{t:4,f:[{t:7,e:"div",o:"insertYield"}],n:50,r:"yieldElem"},{t:4,n:51,f:[{t:16}],r:"yieldElem"}]}]},decorators:{registerInputCheckbox:function(e){return this.inputElem=e,this.inputElemChange=()=>{this.get("property").controllable?this.changeProp():this.inputElem.checked=!this.inputElem.checked},this.inputElem.addEventListener("change",this.inputElemChange),{teardown:()=>{this.inputElem.removeEventListener("change",this.inputElemChange)}}}},getUiValue:e=>"1"==e,track(){const t=this.get("property");if(t.track&&t.track.subject){let s;s=t.track.valueMap&&void 0!==t.track.valueMap[t.value]?t.track.valueMap[t.value]:t.value,e.emit("Settings.gaTrack",t.track.subject,s?"check":"uncheck")}}}),pa=ca.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"radio__group settings__row",id:[{t:2,r:"idAttr"},"__container"],"data-test":[{t:2,r:"testAttr"}]},f:[{t:7,e:"fieldset",f:[{t:4,f:[{t:7,e:"p",a:{class:"p -margins"},f:[{t:3,r:"property.label"}]}],n:50,r:"property.label"}," ",{t:4,f:[{t:7,e:"div",a:{class:"radio__row"},f:[{t:7,e:"input",a:{type:"radio",name:[{t:3,r:"idAttr"}],disabled:[{t:4,f:["true"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}],id:[{t:2,r:"idAttr"},"-",{t:2,r:"value"}],class:"radio",value:[{t:2,r:"value"}]},v:{change:"changeProp"},m:[{t:4,f:["checked"],n:50,x:{r:["value","property.value"],s:"_0===_1"}}]}," ",{t:7,e:"label",a:{class:["radio__label ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}],for:[{t:2,r:"idAttr"},"-",{t:2,r:"value"}]},f:[{t:3,r:"label"}," ",{t:4,f:[{t:7,e:"SettingsBadge",a:{label:[{t:3,x:{r:["nls"],s:'_0("settings.recommended")'}}],icon:"star",cssCls:"-ok"}}],n:50,r:"recommended"}," ",{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"property.locked"}]}," ",{t:4,f:[{t:7,e:"p",a:{class:["settings__indent checkbox__desc ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}]},f:[{t:3,r:"desc"}," ",{t:4,f:[{t:8,x:{r:["getYield","descYield"],s:"_0(_1)"}}],n:50,r:"descYield"}," ",{t:4,f:[{t:7,e:"span",o:{n:"insertCompoElem",d:[{t:2,r:"descCompoElem"}]}}],n:50,r:"descCompoElem"}]}],n:50,r:"desc"}," ",{t:4,f:[{t:7,e:"div",a:{class:["settings__indent ",{t:4,f:["-disabled"],n:50,x:{r:["value","property.value","property.locked","property.disabled","property.controllable"],s:"_0!==_1||_2||_3||!_4"}}]},f:[{t:4,f:[{t:8,x:{r:["getYield","customYield"],s:"_0(_1)"}}],n:50,r:"customYield"}," ",{t:4,f:[{t:7,e:"span",o:{n:"insertCompoElem",d:[{t:2,r:"customCompoElem"}]}}],n:50,r:"customCompoElem"}]}],n:50,x:{r:["customYield","customCompoElem"],s:"_0||_1"}}]}],r:"property.options"}]}]}]},data:()=>({getYield:function(e){return this.partials[e]||(this.partials[e]="{{yield "+e+"}}"),e}}),decorators:{insertCompoElem:function(e,t){return t&&e.replaceWith(t),{teardown:function(){}}}},oninit(){this.on("changeProp",(e=>{this.set("property.value",e.context.value)})),this._super()},focusElem(){this.find('input[value="'+this.get("property.value")+'"]').focus()}}),ua=ca.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"settings__row slider__row",id:[{t:2,r:"idAttr"},"__container"]},f:[{t:4,f:[{t:7,e:"label",a:{for:[{t:2,r:"idAttr"}],class:["p -small -secondary -margins ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}]},f:[{t:2,r:"property.desc"}]}],n:50,r:"property.desc"}," ",{t:7,e:"input",o:"registerInput",a:{class:["slider -white ",{t:2,r:"cssCls"}],type:"range",min:[{t:2,r:"min"}],max:[{t:2,r:"max"}],step:"1",value:[{t:2,r:"property.value"}],disabled:[{t:4,f:["true"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}],"data-test":[{t:2,r:"testAttr"}],id:[{t:2,r:"idAttr"}]},v:{mouseup:"changeProp",keyup:"changeProp"}}," ",{t:7,e:"label",a:{class:["slider__label ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}]},f:[{t:4,f:[{t:3,r:"label"}],n:50,r:"label"}]}," ",{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"property.locked"}]}]},data:()=>({cssCls:null}),computed:{label:function(){return this.get("property.options."+this.get("property.value")+".label")},min:function(){return this.get("property.options")?0:this.get("property.min")},max:function(){const e=this.get("property.options");return e?e.length-1:this.get("property.max")}},getUiValue(e){const t=this.get("property.options");return t?t.findIndex((t=>t.value===e)):e},getValueToStore(e){const t=this.get("property.options");return t?t[e.value].value:e.value}}),ga=ca.extend({template:{v:3,t:[{t:7,e:"div",a:{class:["settings__row ",{t:2,x:{r:["wrapCssCls"],s:'_0||""'}}],id:[{t:2,r:"idAttr"},"__container"]},f:[{t:4,f:[{t:4,f:[{t:7,e:"label",a:{for:[{t:2,r:"idAttr"}],class:["p -secondary -small g-margin-bottom--5 ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}]},f:[{t:3,r:"property.label"}]}],n:50,r:"labelSmall"},{t:4,n:51,f:[{t:7,e:"label",a:{for:[{t:2,r:"idAttr"}],class:["input__label ",{t:2,x:{r:["inline"],s:'_0?"-inline":""'}}," ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}]},f:[{t:3,r:"property.label"}]}],r:"labelSmall"}],n:50,r:"property.label"}," ",{t:7,e:"select",o:"registerInput",a:{value:[{t:2,r:"property.value"}],disabled:[{t:4,f:["true"],n:50,x:{r:["property.locked","property.disabled","property.controllable"],s:"_0||_1||!_2"}}],"data-test":[{t:2,r:"testAttr"}],class:"input -dark",id:[{t:2,r:"idAttr"}]},v:{change:"changeProp"},f:[{t:4,f:[{t:7,e:"option",a:{value:[{t:2,r:"value"}]},f:[{t:3,r:"label"}]}],n:52,r:"property.options"}]}," ",{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"property.locked"}," ",{t:16}]}]},data:()=>({inline:null,wrapCssCls:null})}),ha=w.extend({template:{v:3,t:[{t:7,e:"div",a:{class:"tab__block -margins"},f:[{t:7,e:"div",a:{class:"tab__wrap"},f:[{t:4,f:[{t:7,e:"button",a:{role:"tab","aria-selected":[{t:2,x:{r:["selectedTabId","id"],s:"_0===_1"}}],class:["tab ",{t:4,f:["-active"],n:50,x:{r:["selectedTabId","id"],s:"_0===_1"}}],id:[{t:2,r:"id"}],"data-test":[{t:2,x:{r:["testAttr","id"],s:"_0||_1"}}]},v:{click:"selectTab"},f:[{t:3,r:"title"}]}],r:"tabs"}]}," ",{t:4,f:[{t:7,e:"div",a:{class:"tab__pane"},f:[{t:4,f:[{t:7,e:"div",m:[{t:4,f:['style="display: none"'],n:50,x:{r:["id","selectedTabId"],s:"_0!==_1"}}],f:[{t:8,rx:{r:".",m:["id"]}}]}],r:"tabs"}]}],n:50,r:"selectedTabId"}]}]},data:()=>({tabs:null,selectedTabId:null,watchedTabsHeightContainer:null}),oninit(){this.on("selectTab",(e=>{this.selectTab(e.context)})),this.observe("tabs",this.onTabsChanged.bind(this)),this.observe("selectedTabId",(e=>{this.fire("selectedTabChanged",e)})),e.on("settings.selectTab",(e=>{this.get("tabs").some((t=>t.id===e))&&this.set("selectedTabId",e)}))},onrender(){setTimeout((()=>{this.fixEndOfPage()}))},selectTab(e){e.hash?window.location.hash=e.hash:(this.set("selectedTabId",e.id),this.fixEndOfPage())},onTabsChanged(e,t){t&&t.forEach((e=>{delete this.components[e.id],delete this.partials[e.id]})),e.forEach((e=>{if(e.compo){let t="";if(e.compoParams)for(const s in e.compoParams)t+=" "+s+'="'+e.compoParams[s]+'"';this.components[e.id]=e.compo,this.partials[e.id]="<"+e.id+t+" />"}else this.partials[e.id]="{{yield "+e.id+"}}"})),this.setSelectedTab()},setSelectedTab(){const e=this.get("tabs");e.some((e=>e.id===this.get("selectedTabId")))||this.set("selectedTabId",e&&e[0].id)},fixEndOfPage(){const e=this.get("watchedTabsHeightContainer");if(!e)return;const t=this.find(".tab__pane"),s=document.querySelector(e);this.maxTabHeight=this.maxTabHeight||0,this.maxTabHeight=Math.max(this.maxTabHeight,t.clientHeight),this.maxTabHeight>t.clientHeight?(this.emptySpaceDiv||(this.emptySpaceDiv=document.createElement("div"),this.emptySpaceDiv.classList.add("settings__tab-empty-space"),s.appendChild(this.emptySpaceDiv)),this.emptySpaceDiv.style.height=this.maxTabHeight-t.clientHeight):this.emptySpaceDiv&&(this.emptySpaceDiv.style.height=0)},onteardown(){this.emptySpaceDiv&&(this.emptySpaceDiv.remove(),this.emptySpaceDiv=void 0)}});var ma=".stg_input__wrapper {\n position: relative;\n}\n.stg_input__wrapper.-full {\n display: block;\n}\n.stg_input__wrapper > button {\n position: absolute;\n right: 10px;\n top: 50%;\n transform: translateY(-50%);\n}\n";Le(ma);const fa=ca.extend({template:{v:3,t:[{t:4,f:[{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"property.locked"}," ",{t:4,f:[{t:7,e:"label",a:{for:[{t:2,r:"idAttr"}],class:["input__label -inline ",{t:4,f:["-disabled"],n:50,x:{r:["property.disabled","property.locked"],s:"_0||_1"}}],id:[{t:2,r:"idAttr"},"__container"]},f:[{t:3,r:"property.label"}]}," ",{t:8,r:"input"}],n:50,r:"property.label"},{t:4,n:51,f:[{t:7,e:"label",a:{for:[{t:2,r:"idAttr"}],id:[{t:2,r:"idAttr"},"__container"]},f:[{t:8,r:"input"}]}],r:"property.label"}],n:50,r:"inline"},{t:4,n:51,f:[{t:7,e:"div",a:{class:["settings__row ",{t:2,x:{r:["wrapCssCls"],s:'_0||""'}}],id:[{t:2,r:"idAttr"},"__container"]},f:[{t:4,f:[{t:7,e:"SettingsBadge"}],n:50,r:"property.locked"}," ",{t:4,f:[{t:7,e:"label",a:{class:[{t:2,x:{r:["labelSmall"],s:'_0?"p -secondary -small g-margin-bottom--5":"input__label"'}}," ",{t:4,f:["-disabled"],n:50,x:{r:["property.locked","property.disabled"],s:"_0||_1"}}],for:[{t:2,r:"idAttr"}]},f:[{t:3,r:"property.label"}]}],n:50,r:"property.label"}," ",{t:8,r:"input"}]}],r:"inline"}],p:{input:[{t:7,e:"span",a:{class:["stg_input__wrapper ",{t:2,r:"cssCls"}]},f:[{t:7,e:"input",a:{type:[{t:2,x:{r:["passwordShown","inputType"],s:'_0?"text":_1'}}],value:[{t:2,r:"property.value"}],id:[{t:2,r:"idAttr"}],"data-test":[{t:2,r:"testAttr"}],disabled:[{t:4,f:["true"],n:50,x:{r:["property.locked","property.disabled"],s:"_0||_1"}}],class:["input -field ",{t:2,x:{r:["property.storedValue","property.error"],s:'_0!==undefined&&_1?"-error":""'}}," ",{t:2,r:"cssCls"}]},m:[{t:4,f:['placeholder="',{t:2,r:"placeholderText"},'"'],n:50,r:"placeholderText"},{t:4,f:[' maxlength="',{t:2,x:{r:["property.maxValue"],s:'(_0+"").length'}},'"'],n:50,r:"property.maxValue"},{t:4,n:51,f:[{t:4,n:50,x:{r:["property.maxLength"],s:"_0"},f:['maxlength="',{t:2,r:"property.maxLength"},'"']}],r:"property.maxValue"}],v:{keyup:"inputKeyup",blur:"changeProp"}}," ",{t:4,f:[{t:7,e:"button",a:{type:"button",title:[{t:2,x:{r:["nls","passwordShown"],s:'_0(_1?"global.hidePassword":"global.showPassword")'}}]},v:{click:"togglePasswordShown"},f:[{t:7,e:"kin-icon",a:{name:[{t:2,x:{r:["passwordShown"],s:'_0?"icon-m-eye-striked":"icon-m-eye"'}}],size:"22"}}]}],n:50,x:{r:["property.type"],s:'_0==="password"'}}," ",{t:4,f:[{t:7,e:"span",f:[{t:16,n:"labelRight"}]}],n:50,x:{r:["partialExists"],s:'_0("labelRight")'}}]}]}},css:ma,data:()=>({property:null,style:null,inline:!1,wrapCssCls:null,cssCls:null,placeholderText:null,passwordShown:!1}),computed:{inputType:function(){const e=this.get("property");return e.type&&"number"!==e.type?e.type:"text"}},oninit(){this._super(),this.on("inputKeyup",(e=>{13===e.original.keyCode?e.node.blur():this.validateValue()})),this.on("togglePasswordShown",(()=>{this.toggle("passwordShown")}))},validateValue(){const e=this.get("property");let t;return t=e.regex&&!e.regex.test(e.value)?{valid:!1}:null!=e.minValue||null!=e.maxValue?Qn(e):Zn(e),t.valid&&this.set("property.value",t.value),this.set("property.error",!t.valid),t}}),ba=w.extend({template:{v:3,t:[{t:7,e:"p",a:{class:"settings__row"},f:[{t:7,e:"button",a:{class:"a -small -secondary","data-test":"openWhiteAndBlackList"},v:{click:"openWhiteAndBlackList"},f:[{t:2,x:{r:["nls"],s:'_0("settings.viewAllowedAndBlockedApps")'}}]}]}]},oninit(){this.on("openWhiteAndBlackList",(()=>{location.hash="Settings/blockedAndAllowedApps"}))}}),_a=w.extend({template:{v:3,t:[{t:7,e:"div",a:{class:["settings__badge ",{t:2,x:{r:["cssCls"],s:'_0?_0:""'}}]},f:[{t:4,f:[{t:7,e:"Icon",a:{name:[{t:2,r:"icon"}]}}],n:50,r:"icon"}," ",{t:4,f:[{t:7,e:"span",f:[{t:2,r:"label"}]}],n:50,r:"label"}]}]},data:()=>({label:null,icon:"lock-full",cssCls:null})}),va=Object.freeze({__proto__:null,SettingsContainer:Jn,SettingsCheckbox:da,SettingsRadio:pa,SettingsRange:ua,SettingsSelect:ga,SettingsTabs:ha,SettingsTextInput:fa,SettingsWhiteAndBlackList:ba,SettingsBadge:_a});function Sa(e,t,s){const n=e.slice();return n[25]=t[s].id,n[26]=t[s].transId,n}function ya(e,t,s){const n=e.slice();return n[25]=t[s].id,n[26]=t[s].transId,n[29]=t[s].icon,n}function xa(e){let t,s;return{c(){t=F("kin-icon"),Y(t,"name",s=e[29]),Y(t,"size","32"),Y(t,"class","nui_menu__icon")},m(e,s){G(e,t,s)},p(e,n){32&n[0]&&s!==(s=e[29])&&Y(t,"name",s)},d(e){e&&j(t)}}}function wa(e){let t,s,n,a,o,r,i=u(e[26]||e[25])+"",l=e[29]&&xa(e);return{c(){t=F("a"),l&&l.c(),s=z(),n=B(i),a=z(),q(t,"href",o="#Settings/category/"+e[25]),q(t,"class","settings__item"),q(t,"aria-current",r=e[3].id===e[25]),Q(t,"-active",e[3].id===e[25])},m(e,o){G(e,t,o),l&&l.m(t,null),O(t,s),O(t,n),O(t,a)},p(e,a){e[29]?l?l.p(e,a):(l=xa(e),l.c(),l.m(t,s)):l&&(l.d(1),l=null),32&a[0]&&i!==(i=u(e[26]||e[25])+"")&&K(n,i),32&a[0]&&o!==(o="#Settings/category/"+e[25])&&q(t,"href",o),40&a[0]&&r!==(r=e[3].id===e[25])&&q(t,"aria-current",r),40&a[0]&&Q(t,"-active",e[3].id===e[25])},d(e){e&&j(t),l&&l.d()}}}function ka(e){let t,s=e[3].sections,n=[];for(let a=0;a<s.length;a+=1)n[a]=Ta(Sa(e,s,a));return{c(){t=F("nav");for(let e=0;e<n.length;e+=1)n[e].c();q(t,"class","settings__submenu")},m(e,s){G(e,t,s);for(let a=0;a<n.length;a+=1)n[a].m(t,null)},p(e,a){if(24&a[0]){let o;for(s=e[3].sections,o=0;o<s.length;o+=1){const r=Sa(e,s,o);n[o]?n[o].p(r,a):(n[o]=Ta(r),n[o].c(),n[o].m(t,null))}for(;o<n.length;o+=1)n[o].d(1);n.length=s.length}},d(e){e&&j(t),V(n,e)}}}function Ta(e){let t,s,n,a,o,r=u(e[26]||e[25])+"";return{c(){t=F("a"),s=B(r),n=z(),q(t,"href",a="#Settings/"+e[25]),q(t,"class","settings__subitem"),q(t,"aria-current",o=e[4].id===e[25]?"":void 0),Q(t,"-active",e[4].id===e[25])},m(e,a){G(e,t,a),O(t,s),O(t,n)},p(e,n){8&n[0]&&r!==(r=u(e[26]||e[25])+"")&&K(s,r),8&n[0]&&a!==(a="#Settings/"+e[25])&&q(t,"href",a),24&n[0]&&o!==(o=e[4].id===e[25]?"":void 0)&&q(t,"aria-current",o),24&n[0]&&Q(t,"-active",e[4].id===e[25])},d(e){e&&j(t)}}}function Aa(e){let t;return{c(){t=F("kin-loading"),Y(t,"fullscreen","true")},m(e,s){G(e,t,s)},p:E,d(e){e&&j(t)}}}function Ia(e){let t,s,n,a,o,r,i,l,c,d=e[4].id+"",p=e[4].id+"";return{c(){t=F("h2"),s=B(d),n=B(" ERROR"),a=z(),o=F("div"),r=F("p"),i=B("Loading settings of "),l=B(p),c=B(" failed."),q(t,"class","h2 -margins")},m(e,d){G(e,t,d),O(t,s),O(t,n),G(e,a,d),G(e,o,d),O(o,r),O(r,i),O(r,l),O(r,c)},p(e,t){16&t[0]&&d!==(d=e[4].id+"")&&K(s,d),16&t[0]&&p!==(p=e[4].id+"")&&K(l,p)},d(e){e&&j(t),e&&j(a),e&&j(o)}}}function Ea(e){let t,s,n,a,o,r,i,l,c,d,p=e[5],g=[];for(let u=0;u<p.length;u+=1)g[u]=wa(ya(e,p,u));let h=e[3].sections&&!e[3].hideSubmenu&&ka(e);function m(e,t){return e[6]?Ia:e[2]?void 0:Aa}let f=m(e),b=f&&f(e);return{c(){t=F("nav"),s=F("button"),s.textContent=`${u("global.skipToMainContent")}`,n=z();for(let e=0;e<g.length;e+=1)g[e].c();a=z(),h&&h.c(),o=z(),r=F("main"),i=F("section"),l=z(),b&&b.c(),q(s,"class","nui_menu__skip"),q(t,"class","settings__menu"),q(i,"class","settings__section svelte-gpg6a1"),Q(i,"visibilityHidden",!e[2]),q(r,"class","settings__content svelte-gpg6a1"),Q(r,"overflowHidden",!e[2])},m(p,u){G(p,t,u),O(t,s),O(t,n);for(let e=0;e<g.length;e+=1)g[e].m(t,null);G(p,a,u),h&&h.m(p,u),G(p,o,u),G(p,r,u),O(r,i),e[10](i),O(r,l),b&&b.m(r,null),e[11](r),c||(d=H(s,"click",(function(){N(e[1])&&e[1].apply(this,arguments)})),c=!0)},p(s,n){if(e=s,40&n[0]){let s;for(p=e[5],s=0;s<p.length;s+=1){const a=ya(e,p,s);g[s]?g[s].p(a,n):(g[s]=wa(a),g[s].c(),g[s].m(t,null))}for(;s<g.length;s+=1)g[s].d(1);g.length=p.length}e[3].sections&&!e[3].hideSubmenu?h?h.p(e,n):(h=ka(e),h.c(),h.m(o.parentNode,o)):h&&(h.d(1),h=null),4&n[0]&&Q(i,"visibilityHidden",!e[2]),f===(f=m(e))&&b?b.p(e,n):(b&&b.d(1),b=f&&f(e),b&&(b.c(),b.m(r,null))),4&n[0]&&Q(r,"overflowHidden",!e[2])},i:E,o:E,d(s){s&&j(t),V(g,s),s&&j(a),h&&h.d(s),s&&j(o),s&&j(r),e[10](null),b&&b.d(),e[11](null),c=!1,d()}}}function Pa(t,s,n){const o=r.createLogger("settings.mainLayout");let i,l,d,{router:p}=s,{structure:u}=s,{contentElem:g}=s,{focusMainContent:h}=s,m={},f={},b=null,_=!1,S={};p.on("/",w),p.on("/:section/*",w),p.on("/category/:category",w),k();const y=e.on("product.change.feature.*.licensed",k),x=new Promise((e=>se(e)));function w(e){o.debug("handleRoute",e);const t=e.wildcard;let s=null,r=null;if(e.category?s=e.category:e.section&&(s=S[e.section],r=s&&e.section),n(3,m=s?i.find((e=>e.id===s)):i[0]),r){const e=m.sections.find((e=>e.id===r));e&&function(e,t){f.id===e.id?T(t):setTimeout((()=>{n(4,f=e),function(e){return n(2,_=!1),n(6,l=!1),x.then((()=>function(e){return Hn[e.id]?Promise.resolve(Hn[e.id]):a.importModule(e.module||e.id,e.view||"settings")}(e))).then((e=>{n(0,g.scrollTop=0,g),I(),e.prototype.teardown?b=c(e,{isolated:!0,el:d,components:va}):(n(7,d.innerHTML="",d),b=c(e,{target:d})),n(2,_=!0)})).catch((e=>{o.error(e),n(6,l=!0)}))}(e).then((()=>T(t)))}),0)}(e,t)}else{A(m.sections.map((e=>"Settings/"+e.id)))}}function k(){S={},u.forEach((e=>{e.sections.forEach((t=>{S[t.id]=e.id}))})),n(5,i=u)}function T(e){b&&b.router&&b.router.emit(e||"")}function A(e,t=0){return v.isHashLocked("#"+e[t]).then((s=>{if(s){const s=t<e.length-1?t+1:0;return A(e,s)}window.location.hash=e[t]}))}function I(){b&&(b.$destroy(),b=null)}return ne((()=>{o.debug("onDestroy"),I(),p.removeAllListeners(),y()})),t.$$set=e=>{"router"in e&&n(8,p=e.router),"structure"in e&&n(9,u=e.structure),"contentElem"in e&&n(0,g=e.contentElem),"focusMainContent"in e&&n(1,h=e.focusMainContent)},t.$$.update=()=>{4&t.$$.dirty[0]&&_&&oa()},[g,h,_,m,f,i,l,d,p,u,function(e){re[e?"unshift":"push"]((()=>{d=e,n(7,d)}))},function(e){re[e?"unshift":"push"]((()=>{g=e,n(0,g)}))}]}class Ca extends Ce{constructor(e){var t;super(),document.getElementById("svelte-gpg6a1-style")||((t=F("style")).id="svelte-gpg6a1-style",t.textContent=".overflowHidden.svelte-gpg6a1{overflow:hidden}.visibilityHidden.svelte-gpg6a1{visibility:hidden}",O(document.head,t)),Pe(this,e,Pa,Ea,R,{router:8,structure:9,contentElem:0,focusMainContent:1},[-1,-1])}}const La="checkbox",Na="number",Ra="text",Ma="select",Da="button";I();const $a=e=>({}),Ua=e=>({}),Oa=e=>({}),Ga=e=>({}),ja=e=>({}),Va=e=>({}),Fa=e=>({}),Ba=e=>({});function za(e){let t,s,n;return{c(){t=F("div"),q(t,"class","sve_modal__overlay__close")},m(a,o){G(a,t,o),s||(n=H(t,"click",e[14]),s=!0)},p:E,d(e){e&&j(t),s=!1,n()}}}function Wa(e){let t,s;return{c(){t=F("h2"),s=B(e[0]),q(t,"class","sve_modal__title")},m(e,n){G(e,t,n),O(t,s)},p(e,t){1&t&&K(s,e[0])},d(e){e&&j(t)}}}function Ha(e){let t,s;return{c(){t=F("p"),s=B(e[1]),q(t,"class","sve_modal__subtitle")},m(e,n){G(e,t,n),O(t,s)},p(e,t){2&t&&K(s,e[1])},d(e){e&&j(t)}}}function qa(e){let t,s,n,a,o;return{c(){t=F("button"),s=F("kin-icon"),Y(s,"name","icon-s-controls-close"),Y(s,"size","12"),q(t,"class","sve_modal__close"),q(t,"data-test","close"),q(t,"title",n=u("global.closeModalWindow"))},m(n,r){G(n,t,r),O(t,s),a||(o=H(t,"click",e[15]),a=!0)},p:E,d(e){e&&j(t),a=!1,o()}}}function Ya(e){let t,s,n;const a=e[13]["modal-ipm"],o=M(a,e,e[12],Ua);return{c(){t=F("div"),o&&o.c(),q(t,"class","sve_modal__ipm"),q(t,"style",s=`${e[7]} margin-top: 0;`)},m(e,s){G(e,t,s),o&&o.m(t,null),n=!0},p(e,r){o&&o.p&&4096&r&&$(o,a,e,e[12],r,$a,Ua),(!n||128&r&&s!==(s=`${e[7]} margin-top: 0;`))&&q(t,"style",s)},i(e){n||(ye(o,e),n=!0)},o(e){xe(o,e),n=!1},d(e){e&&j(t),o&&o.d(e)}}}function Ka(e){let t,s,n,a,o,r,i,l,c,p,u,g,h,m,f,b,_,v,S=e[3]&&za(e),y=e[0]&&Wa(e),x=e[1]&&Ha(e);const w=e[13]["modal-header"],k=M(w,e,e[12],Ba);let T=e[3]&&qa(e);const A=e[13]["modal-content"],I=M(A,e,e[12],Va),E=e[13]["modal-footer"],P=M(E,e,e[12],Ga);let C=e[5]&&Ya(e);return{c(){t=F("div"),S&&S.c(),s=z(),n=F("div"),a=F("div"),y&&y.c(),o=z(),x&&x.c(),r=z(),k&&k.c(),i=z(),T&&T.c(),l=z(),c=F("div"),I&&I.c(),p=z(),u=F("div"),P&&P.c(),g=z(),C&&C.c(),q(a,"class","sve_modal__header"),q(c,"class","sve_modal__content"),q(u,"class","sve_modal__footer"),q(n,"class","sve_modal"),q(n,"style",h=`${e[6]}`),q(t,"class",m="sve_modal__overlay "+e[4]),q(t,"data-test",e[2])},m(h,m){G(h,t,m),S&&S.m(t,null),O(t,s),O(t,n),O(n,a),y&&y.m(a,null),O(a,o),x&&x.m(a,null),O(a,r),k&&k.m(a,null),O(n,i),T&&T.m(n,null),O(n,l),O(n,c),I&&I.m(c,null),O(n,p),O(n,u),P&&P.m(u,null),O(n,g),C&&C.m(n,null),b=!0,_||(v=[H(window,"keydown",e[9],!0),U(f=d.call(null,t))],_=!0)},p(e,[i]){e[3]?S?S.p(e,i):(S=za(e),S.c(),S.m(t,s)):S&&(S.d(1),S=null),e[0]?y?y.p(e,i):(y=Wa(e),y.c(),y.m(a,o)):y&&(y.d(1),y=null),e[1]?x?x.p(e,i):(x=Ha(e),x.c(),x.m(a,r)):x&&(x.d(1),x=null),k&&k.p&&4096&i&&$(k,w,e,e[12],i,Fa,Ba),e[3]?T?T.p(e,i):(T=qa(e),T.c(),T.m(n,l)):T&&(T.d(1),T=null),I&&I.p&&4096&i&&$(I,A,e,e[12],i,ja,Va),P&&P.p&&4096&i&&$(P,E,e,e[12],i,Oa,Ga),e[5]?C?(C.p(e,i),32&i&&ye(C,1)):(C=Ya(e),C.c(),ye(C,1),C.m(n,null)):C&&(ve(),xe(C,1,1,(()=>{C=null})),Se()),(!b||64&i&&h!==(h=`${e[6]}`))&&q(n,"style",h),(!b||16&i&&m!==(m="sve_modal__overlay "+e[4]))&&q(t,"class",m),(!b||4&i)&&q(t,"data-test",e[2])},i(e){b||(ye(k,e),ye(I,e),ye(P,e),ye(C),b=!0)},o(e){xe(k,e),xe(I,e),xe(P,e),xe(C),b=!1},d(e){e&&j(t),S&&S.d(),y&&y.d(),x&&x.d(),k&&k.d(e),T&&T.d(),I&&I.d(e),P&&P.d(e),C&&C.d(),_=!1,L(v)}}}function Xa(e,t,s){let{$$slots:n={},$$scope:a}=t;const o=ae();let r,{title:i=null}=t,{subtitle:l=null}=t,{testId:c=""}=t,{closable:d=!0}=t,{cssCls:p=""}=t,{ipm:u=!1}=t,{width:g}=t,{ipmHeight:h}=t,m="",f="";se((()=>{r=document.activeElement})),ne((()=>{document.body.contains(r)&&r.focus()}));return e.$$set=e=>{"title"in e&&s(0,i=e.title),"subtitle"in e&&s(1,l=e.subtitle),"testId"in e&&s(2,c=e.testId),"closable"in e&&s(3,d=e.closable),"cssCls"in e&&s(4,p=e.cssCls),"ipm"in e&&s(5,u=e.ipm),"width"in e&&s(10,g=e.width),"ipmHeight"in e&&s(11,h=e.ipmHeight),"$$scope"in e&&s(12,a=e.$$scope)},e.$$.update=()=>{1024&e.$$.dirty&&g&&s(6,m=`width: ${g}px;`),2080&e.$$.dirty&&u&&h&&s(7,f=`height: ${h}px;`)},[i,l,c,d,p,u,m,f,o,function(e){"Escape"===e.code&&(o("close"),e.preventDefault(),e.stopPropagation())},g,h,a,n,()=>o("close"),()=>o("close")]}class Ja extends Ce{constructor(e){super(),Pe(this,e,Xa,Ka,R,{title:0,subtitle:1,testId:2,closable:3,cssCls:4,ipm:5,width:10,ipmHeight:11})}}const Qa=e=>({}),Za=e=>({}),eo=e=>({}),to=e=>({}),so=e=>({}),no=e=>({}),ao=e=>({}),oo=e=>({}),ro=e=>({}),io=e=>({});function lo(e){let t,s;const n=e[10].input,a=M(n,e,e[9],io);return{c(){t=F("div"),a&&a.c(),q(t,"class","row__input sve-one_row__input svelte-11y2jvb"),Q(t,"-disabled",e[2]||e[3])},m(e,n){G(e,t,n),a&&a.m(t,null),s=!0},p(e,s){a&&a.p&&512&s&&$(a,n,e,e[9],s,ro,io),12&s&&Q(t,"-disabled",e[2]||e[3])},i(e){s||(ye(a,e),s=!0)},o(e){xe(a,e),s=!1},d(e){e&&j(t),a&&a.d(e)}}}function co(e){let t,s,n,a;const o=[uo,po],r=[];function i(e,t){return e[2]?0:1}return s=i(e),n=r[s]=o[s](e),{c(){t=F("div"),n.c(),q(t,"class","row__icon sve-one_row__icon svelte-11y2jvb")},m(e,n){G(e,t,n),r[s].m(t,null),a=!0},p(e,a){let l=s;s=i(e),s===l?r[s].p(e,a):(ve(),xe(r[l],1,1,(()=>{r[l]=null})),Se(),n=r[s],n?n.p(e,a):(n=r[s]=o[s](e),n.c()),ye(n,1),n.m(t,null))},i(e){a||(ye(n),a=!0)},o(e){xe(n),a=!1},d(e){e&&j(t),r[s].d()}}}function po(e){let t;const s=e[10].icon,n=M(s,e,e[9],oo);return{c(){n&&n.c()},m(e,s){n&&n.m(e,s),t=!0},p(e,t){n&&n.p&&512&t&&$(n,s,e,e[9],t,ao,oo)},i(e){t||(ye(n,e),t=!0)},o(e){xe(n,e),t=!1},d(e){n&&n.d(e)}}}function uo(e){let t;return{c(){t=F("kin-loading"),Y(t,"inline",""),Y(t,"size","small")},m(e,s){G(e,t,s)},p:E,i:E,o:E,d(e){e&&j(t)}}}function go(e){let t;const s=e[10]["actions-content"],n=M(s,e,e[9],to);return{c(){n&&n.c()},m(e,s){n&&n.m(e,s),t=!0},p(e,t){n&&n.p&&512&t&&$(n,s,e,e[9],t,eo,to)},i(e){t||(ye(n,e),t=!0)},o(e){xe(n,e),t=!1},d(e){n&&n.d(e)}}}function ho(e){let t,s,n,a,o,r;return{c(){t=F("kin-button"),s=F("kin-icon"),Y(s,"name",n=e[0]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"),Y(s,"size","16"),Y(t,"size","small"),Y(t,"type","blank"),Y(t,"icononly","true"),Y(t,"title",a=e[0]?u("global.showLess"):u("global.showMore"))},m(n,a){G(n,t,a),O(t,s),o||(r=H(t,"click",e[7]),o=!0)},p(e,o){1&o&&n!==(n=e[0]?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down")&&Y(s,"name",n),1&o&&a!==(a=e[0]?u("global.showLess"):u("global.showMore"))&&Y(t,"title",a)},i:E,o:E,d(e){e&&j(t),o=!1,r()}}}function mo(e){let t,s,n,a,o,r,i,l,c,d,p,u,g=e[4]&&lo(e),h=!e[6]&&co(e);const m=e[10]["main-content"],f=M(m,e,e[9],no),b=[ho,go],_=[];function v(e,t){return e[1]&&!e[2]?0:1}l=v(e),c=_[l]=b[l](e);const S=e[10]["expanded-content"],y=M(S,e,e[9],Za);return{c(){t=F("div"),s=F("div"),g&&g.c(),n=z(),h&&h.c(),a=z(),o=F("div"),f&&f.c(),r=z(),i=F("div"),c.c(),d=z(),p=F("div"),y&&y.c(),q(o,"class","row__main sve-one_row__main svelte-11y2jvb"),q(i,"class","row__actions sve-one_row__actions svelte-11y2jvb"),q(s,"class","row sve-one_row svelte-11y2jvb"),Q(s,"-expanded",e[0]),Q(s,"-selectable",e[4]),Q(s,"-disabled",e[3]),Q(s,"-faq",e[6]),q(p,"class","row_expanded sve-one_row__expanded svelte-11y2jvb"),Q(p,"-selectable",e[4]),Q(p,"-invisible",!e[0]||e[2]),Q(p,"-faq",e[6]),q(t,"class","sve-one_row__wrap svelte-11y2jvb"),Q(t,"-bg",e[5])},m(e,c){G(e,t,c),O(t,s),g&&g.m(s,null),O(s,n),h&&h.m(s,null),O(s,a),O(s,o),f&&f.m(o,null),O(s,r),O(s,i),_[l].m(i,null),O(t,d),O(t,p),y&&y.m(p,null),u=!0},p(e,[o]){e[4]?g?(g.p(e,o),16&o&&ye(g,1)):(g=lo(e),g.c(),ye(g,1),g.m(s,n)):g&&(ve(),xe(g,1,1,(()=>{g=null})),Se()),e[6]?h&&(ve(),xe(h,1,1,(()=>{h=null})),Se()):h?(h.p(e,o),64&o&&ye(h,1)):(h=co(e),h.c(),ye(h,1),h.m(s,a)),f&&f.p&&512&o&&$(f,m,e,e[9],o,so,no);let r=l;l=v(e),l===r?_[l].p(e,o):(ve(),xe(_[r],1,1,(()=>{_[r]=null})),Se(),c=_[l],c?c.p(e,o):(c=_[l]=b[l](e),c.c()),ye(c,1),c.m(i,null)),1&o&&Q(s,"-expanded",e[0]),16&o&&Q(s,"-selectable",e[4]),8&o&&Q(s,"-disabled",e[3]),64&o&&Q(s,"-faq",e[6]),y&&y.p&&512&o&&$(y,S,e,e[9],o,Qa,Za),16&o&&Q(p,"-selectable",e[4]),5&o&&Q(p,"-invisible",!e[0]||e[2]),64&o&&Q(p,"-faq",e[6]),32&o&&Q(t,"-bg",e[5])},i(e){u||(ye(g),ye(h),ye(f,e),ye(c),ye(y,e),u=!0)},o(e){xe(g),xe(h),xe(f,e),xe(c),xe(y,e),u=!1},d(e){e&&j(t),g&&g.d(),h&&h.d(),f&&f.d(e),_[l].d(),y&&y.d(e)}}}function fo(e,t,s){let{$$slots:n={},$$scope:a}=t,{expandable:o=!1}=t,{expanded:r=!1}=t,{loading:i=!1}=t,{disabled:l=!1}=t,{selectable:c=!1}=t,{background:d=!1}=t,{faq:p=!1}=t;const u=ae();return e.$$set=e=>{"expandable"in e&&s(1,o=e.expandable),"expanded"in e&&s(0,r=e.expanded),"loading"in e&&s(2,i=e.loading),"disabled"in e&&s(3,l=e.disabled),"selectable"in e&&s(4,c=e.selectable),"background"in e&&s(5,d=e.background),"faq"in e&&s(6,p=e.faq),"$$scope"in e&&s(9,a=e.$$scope)},[r,o,i,l,c,d,p,function(){s(0,r=!r),u("propUpdate",{keyPath:"expanded",value:r})},["expandable","expanded","loading","selectable","background","faq"],a,n]}class bo extends Ce{constructor(e){var t;super(),document.getElementById("svelte-11y2jvb-style")||((t=F("style")).id="svelte-11y2jvb-style",t.textContent=".sve-one_row.svelte-11y2jvb{position:relative;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;text-align:start;width:100%;min-height:7.2rem;padding:0.6rem;border-bottom:1px solid var(--table-border)}.sve-one_row__wrap.svelte-11y2jvb{display:block}.sve-one_row__wrap.-bg.svelte-11y2jvb{background:var(--table-selected)}.sve-one_row.-expanded.svelte-11y2jvb{border-bottom:1px solid transparent}.sve-one_row.-faq.svelte-11y2jvb{min-height:4.2rem}.sve-one_row__icon.svelte-11y2jvb,.sve-one_row__input.svelte-11y2jvb{flex-grow:0;margin-right:1rem;margin-bottom:1rem;position:relative}.sve-one_row__input.-disabled.svelte-11y2jvb{pointer-events:none;opacity:0.5}.sve-one_row__main.svelte-11y2jvb{flex-grow:1;margin:0 0.6rem;width:54%}.sve-one_row__actions.svelte-11y2jvb{flex-shrink:0}.sve-one_row__expanded.svelte-11y2jvb{padding-left:4rem}.sve-one_row__expanded.-selectable.svelte-11y2jvb{padding-left:8rem}.sve-one_row__expanded.-invisible.svelte-11y2jvb{display:none}.sve-one_row__expanded.-faq.svelte-11y2jvb{padding:0 4rem 2rem 1.2rem;border-bottom:1px solid var(--table-border);color:var(--color-text-secondary);text-align:left}.sve-one_row__title{font-weight:bold !important;font-size:var(--font-size) !important}.sve-one_row__desc{margin-top:0.5rem !important;color:var(--color-text-secondary) !important;font-size:var(--font-size-small) !important}.sve-one_row__expanded [slot='table-header']{padding-top:0}.sve-one_row__status{position:absolute;top:20%;left:20%;margin:1rem 0 0 1rem}",O(document.head,t)),Pe(this,e,fo,mo,R,{expandable:1,expanded:0,loading:2,disabled:3,selectable:4,background:5,faq:6,exportedProps:8})}get expandable(){return this.$$.ctx[1]}set expandable(e){this.$set({expandable:e}),me()}get expanded(){return this.$$.ctx[0]}set expanded(e){this.$set({expanded:e}),me()}get loading(){return this.$$.ctx[2]}set loading(e){this.$set({loading:e}),me()}get disabled(){return this.$$.ctx[3]}set disabled(e){this.$set({disabled:e}),me()}get selectable(){return this.$$.ctx[4]}set selectable(e){this.$set({selectable:e}),me()}get background(){return this.$$.ctx[5]}set background(e){this.$set({background:e}),me()}get faq(){return this.$$.ctx[6]}set faq(e){this.$set({faq:e}),me()}get exportedProps(){return this.$$.ctx[8]}}for(var _o="object"==typeof bt&&bt&&bt.Object===Object&&bt,vo="object"==typeof self&&self&&self.Object===Object&&self,So=(_o||vo||Function("return this")(),function(e){return e.replace(/[^\u0000-\u007e]/g,(function(e){return xo[e]||e}))}),yo=[{base:" ",chars:" "},{base:"0",chars:"߀"},{base:"A",chars:"ⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",chars:"Ꜳ"},{base:"AE",chars:"ÆǼǢ"},{base:"AO",chars:"Ꜵ"},{base:"AU",chars:"Ꜷ"},{base:"AV",chars:"ꜸꜺ"},{base:"AY",chars:"Ꜽ"},{base:"B",chars:"ⒷBḂḄḆɃƁ"},{base:"C",chars:"ⒸCꜾḈĆCĈĊČÇƇȻ"},{base:"D",chars:"ⒹDḊĎḌḐḒḎĐƊƉᴅꝹ"},{base:"Dh",chars:"Ð"},{base:"DZ",chars:"DZDŽ"},{base:"Dz",chars:"DzDž"},{base:"E",chars:"ɛⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎᴇ"},{base:"F",chars:"ꝼⒻFḞƑꝻ"},{base:"G",chars:"ⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾɢ"},{base:"H",chars:"ⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",chars:"ⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",chars:"ⒿJĴɈȷ"},{base:"K",chars:"ⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",chars:"ⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",chars:"LJ"},{base:"Lj",chars:"Lj"},{base:"M",chars:"ⓂMḾṀṂⱮƜϻ"},{base:"N",chars:"ꞤȠⓃNǸŃÑṄŇṆŅṊṈƝꞐᴎ"},{base:"NJ",chars:"NJ"},{base:"Nj",chars:"Nj"},{base:"O",chars:"ⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OE",chars:"Œ"},{base:"OI",chars:"Ƣ"},{base:"OO",chars:"Ꝏ"},{base:"OU",chars:"Ȣ"},{base:"P",chars:"ⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",chars:"ⓆQꝖꝘɊ"},{base:"R",chars:"ⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",chars:"ⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",chars:"ⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"Th",chars:"Þ"},{base:"TZ",chars:"Ꜩ"},{base:"U",chars:"ⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",chars:"ⓋVṼṾƲꝞɅ"},{base:"VY",chars:"Ꝡ"},{base:"W",chars:"ⓌWẀẂŴẆẄẈⱲ"},{base:"X",chars:"ⓍXẊẌ"},{base:"Y",chars:"ⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",chars:"ⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",chars:"ⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐɑ"},{base:"aa",chars:"ꜳ"},{base:"ae",chars:"æǽǣ"},{base:"ao",chars:"ꜵ"},{base:"au",chars:"ꜷ"},{base:"av",chars:"ꜹꜻ"},{base:"ay",chars:"ꜽ"},{base:"b",chars:"ⓑbḃḅḇƀƃɓƂ"},{base:"c",chars:"cⓒćĉċčçḉƈȼꜿↄ"},{base:"d",chars:"ⓓdḋďḍḑḓḏđƌɖɗƋᏧԁꞪ"},{base:"dh",chars:"ð"},{base:"dz",chars:"dzdž"},{base:"e",chars:"ⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇǝ"},{base:"f",chars:"ⓕfḟƒ"},{base:"ff",chars:"ff"},{base:"fi",chars:"fi"},{base:"fl",chars:"fl"},{base:"ffi",chars:"ffi"},{base:"ffl",chars:"ffl"},{base:"g",chars:"ⓖgǵĝḡğġǧģǥɠꞡꝿᵹ"},{base:"h",chars:"ⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",chars:"ƕ"},{base:"i",chars:"ⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",chars:"ⓙjĵǰɉ"},{base:"k",chars:"ⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",chars:"ⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇɭ"},{base:"lj",chars:"lj"},{base:"m",chars:"ⓜmḿṁṃɱɯ"},{base:"n",chars:"ⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥлԉ"},{base:"nj",chars:"nj"},{base:"o",chars:"ⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿꝋꝍɵɔᴑ"},{base:"oe",chars:"œ"},{base:"oi",chars:"ƣ"},{base:"oo",chars:"ꝏ"},{base:"ou",chars:"ȣ"},{base:"p",chars:"ⓟpṕṗƥᵽꝑꝓꝕρ"},{base:"q",chars:"ⓠqɋꝗꝙ"},{base:"r",chars:"ⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",chars:"ⓢsśṥŝṡšṧṣṩșşȿꞩꞅẛʂ"},{base:"ss",chars:"ß"},{base:"t",chars:"ⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"th",chars:"þ"},{base:"tz",chars:"ꜩ"},{base:"u",chars:"ⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",chars:"ⓥvṽṿʋꝟʌ"},{base:"vy",chars:"ꝡ"},{base:"w",chars:"ⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",chars:"ⓧxẋẍ"},{base:"y",chars:"ⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",chars:"ⓩzźẑżžẓẕƶȥɀⱬꝣ"}],xo={},wo=0;wo<yo.length;wo+=1)for(var ko=yo[wo].chars,To=0;To<ko.length;To+=1)xo[ko[To]]=yo[wo].base;const Ao=r.createLogger("settings.search");class Io{constructor(e,t=[],s={}){this.searchStrings=[],this.structure=e,this.moduleSearchStrings=t,this.options=s}updateSearchStrings(e){this.customSearchStrings=e,this.customSearchStrings?this.searchStrings=this.customSearchStrings:this.buildSearchStrings()}getResults(e){return e&&e.length>2?this.searchQueryInStrings(e):[]}buildSearchStrings(){const e=[];this.structure.forEach((t=>{t.sections.forEach((t=>{t.route=t.route||"Settings/"+t.id,e.push(t)}))}));const t=e.map((e=>this._loadSectionSearchStrings(e)));Promise.all(t).then((t=>{this.searchStrings=[],t.forEach(((t,s)=>this._buildSectionSearchStrings(e[s],t)))}))}_loadSectionSearchStrings(e){if(this.moduleSearchStrings[e.id])return"function"==typeof this.moduleSearchStrings[e.id]?this.moduleSearchStrings[e.id]():this.moduleSearchStrings[e.id];{const t=e.module||e.id,s=e.view?e.view+"SearchStrings":"settingsSearchStrings";return a.importModule(t,s).then((e=>"function"==typeof e?e():e)).catch((()=>(Ao.warn("loading search strings of "+e.id+" failed"),{title:e.transId||e.id})))}}_buildSectionSearchStrings(e,t){ra(e)?(this._buildSectionSearchString({title:t.title,desc:t.desc,others:t.others,isSectionTitle:!0,section:e}),this._buildSectionSearchStringItems(t.items,e),t.subpages&&t.subpages.forEach((t=>this._buildSubpageSearchStrings(t,e)))):this.customSearchStrings||this._buildSectionSearchString({title:t.title,desc:t.desc,isSectionTitle:!0,section:e})}_buildSubpageSearchStrings(e,t){const s="function"==typeof e.search?e.search():e.search;(s instanceof Promise?s:Promise.resolve(s)).then((s=>{const n={title:s.title,subroute:s.subroute};this._buildSectionSearchString({title:s.title,desc:s.desc,section:t,subpage:n,elemId:e.id,tabId:"tab"===e.type?e.id:null,isSectionTitle:!0}),this._buildSectionSearchStringItems(s.items,t,n),s.subpages&&s.subpages.forEach((e=>this._buildSubpageSearchStrings(e,t)))})).catch((s=>{console.error("Getting search strings of a subpage failed",s,e,t)}))}_buildSectionSearchString(e){const t=e.title,s=e.desc,n=e.others,a=e.isSectionTitle;if(!t)return;const o=[{string:u(t),stringEn:this._nlsEn(t),score:2}];let r;s&&o.push({string:u(s),stringEn:this._nlsEn(s),score:1}),n&&n.forEach((e=>{o.push({string:u(e),stringEn:this._nlsEn(e)})})),r=a?s&&u(s):u(t),this.searchStrings.push({section:e.section,subpage:e.subpage,tabId:e.tabId,elemId:e.elemId,napiEvent:e.napiEvent,napiEventParams:e.napiEventParams,title:r,strings:o})}_buildSectionSearchStringItems(e,t,s){if(!e)return;let n=Object.keys(e).map((t=>e[t]));const a=[];n.forEach((e=>{e&&"tab"===e.type&&e.search&&e.search.items&&Object.keys(e.search.items).map((t=>e.search.items[t])).forEach((t=>{t.tabId=e.id,a.push(t)}))})),n=n.concat(a),n.forEach((n=>{if(!n)return void console.error("[Settings] {SearchEngine} Section is broken:",t,"with items:",e);const a=n.search?sa(n):null,o=n.tabId||"tab"===n.type&&n.id;"object"==typeof n.search&&null!=n.search?this._buildSectionSearchString({elemId:a,title:n.search.title,desc:n.search.desc,others:n.search.others,section:t,subpage:s,tabId:o,napiEvent:n.search.napiEvent,napiEventParams:n.search.napiEventParams}):null!=n.search&&this._buildSectionSearchString({elemId:a,title:n.search,section:t,subpage:s,tabId:o})}))}searchQueryInStrings(e){const t=[];if(this.options.geekAreaDisabled||"geek:area"!==e&&"about:config"!==e&&"about:flags"!==e){const s=e=>{const t=p.stripHtml(e||"");return So(t).replace(/[\!@#\$\^\&%\*\(\)\+\=\-\[\]\\\/\{\}\|\:<>\?,\._'"`]/g,"")},n=s(e);if(this.searchStrings&&n.length){const e=new RegExp(n,"i");this.searchStrings.forEach((n=>{let a;n.strings.forEach((t=>{(e.test(s(t.string))||e.test(s(t.stringEn)))&&(a||(a={title:n.title,section:n.section,subpage:n.subpage,tabId:n.tabId,elemId:n.elemId,napiEvent:n.napiEvent,napiEventParams:n.napiEventParams,score:0}),a.score+=t.score||0)})),a&&t.push(a)}))}}else t.push(this._getGeekAreaResult());return t.sort(((e,t)=>t.score-e.score))}_nlsEn(e){const t=h(e,"en");return t&&t[0]}_getGeekAreaResult(){return{section:{id:"geekArea",transId:"settings.geekArea"},title:u("settings.geekArea.desc")}}}const{window:Eo}=we;function Po(e,t,s){const n=e.slice();return n[31]=t[s],n}function Co(e,t,s){const n=e.slice();return n[34]=t[s],n[36]=s,n}const Lo=e=>({}),No=e=>({});function Ro(e){let t,s;return t=new Ja({props:{cssCls:"-search",$$slots:{default:[Fo],"modal-footer":[Vo],"modal-content":[jo],"modal-header":[Mo]},$$scope:{ctx:e}}}),t.$on("close",e[19]),{c(){Te(t.$$.fragment)},m(e,n){Ae(t,e,n),s=!0},p(e,s){const n={};1048605&s[0]&&(n.$$scope={dirty:s,ctx:e}),t.$set(n)},i(e){s||(ye(t.$$.fragment,e),s=!0)},o(e){xe(t.$$.fragment,e),s=!1},d(e){Ie(t,e)}}}function Mo(e){let t,s,n,a,o,r,i;return{c(){t=F("div"),s=F("kin-input"),Y(s,"value",e[0]),Y(s,"type","search"),Y(s,"size","large"),Y(s,"id","stg_search-input"),Y(s,"label",n=u("settings.searchPlaceholder")),Y(s,"title",a=""===e[0]?u("settings.searchPlaceholder"):u("settings.searchHint")),q(t,"slot","modal-header")},m(n,a){G(n,t,a),O(t,s),r||(i=[H(s,"input",e[15]),U(o=zo.call(null,s))],r=!0)},p(e,t){1&t[0]&&Y(s,"value",e[0]),1&t[0]&&a!==(a=""===e[0]?u("settings.searchPlaceholder"):u("settings.searchHint"))&&Y(s,"title",a)},d(e){e&&j(t),r=!1,L(i)}}}function Do(e){let t,s,n=m(e[34].subpage.title)+"";return{c(){t=B("> "),s=B(n)},m(e,n){G(e,t,n),G(e,s,n)},p(e,t){8&t[0]&&n!==(n=m(e[34].subpage.title)+"")&&K(s,n)},d(e){e&&j(t),e&&j(s)}}}function $o(e){let t,s,n=p.stripHtml(e[34].title)+"";return{c(){t=B("> "),s=B(n)},m(e,n){G(e,t,n),G(e,s,n)},p(e,t){8&t[0]&&n!==(n=p.stripHtml(e[34].title)+"")&&K(s,n)},d(e){e&&j(t),e&&j(s)}}}function Uo(e){let t,s,n,a,o,r,i,l,c,d=m(e[34].section.transId||e[34].section.id)+"",p=e[34].subpage&&Do(e),g=e[34].title&&$o(e);function h(){return e[16](e[34])}function f(){return e[17](e[36])}return{c(){t=F("button"),s=F("span"),n=B(d),a=z(),p&&p.c(),o=z(),g&&g.c(),r=z(),q(s,"class","stg_search__item__highlight svelte-vw2t48"),q(t,"class","stg_search__item svelte-vw2t48"),q(t,"title",i=u("settings.search.goToResult")),Q(t,"-hover",e[4]===e[36])},m(e,i){G(e,t,i),O(t,s),O(s,n),O(s,a),p&&p.m(s,null),O(t,o),g&&g.m(t,null),O(t,r),l||(c=[H(t,"click",h),H(t,"focus",f)],l=!0)},p(a,o){e=a,8&o[0]&&d!==(d=m(e[34].section.transId||e[34].section.id)+"")&&K(n,d),e[34].subpage?p?p.p(e,o):(p=Do(e),p.c(),p.m(s,null)):p&&(p.d(1),p=null),e[34].title?g?g.p(e,o):(g=$o(e),g.c(),g.m(t,r)):g&&(g.d(1),g=null),16&o[0]&&Q(t,"-hover",e[4]===e[36])},d(e){e&&j(t),p&&p.d(),g&&g.d(),l=!1,L(c)}}}function Oo(e){let t,s,n,a,o=e[2],r=[];for(let i=0;i<o.length;i+=1)r[i]=Go(Po(e,o,i));return{c(){t=F("div"),s=F("div"),s.textContent=`${u("settings.recommended")}`,n=z(),a=F("div");for(let e=0;e<r.length;e+=1)r[e].c();q(s,"class","stg_recommended__title svelte-vw2t48"),q(a,"class","stg_recommended__items"),q(t,"class","stg_recommended svelte-vw2t48")},m(e,o){G(e,t,o),O(t,s),O(t,n),O(t,a);for(let t=0;t<r.length;t+=1)r[t].m(a,null)},p(e,t){if(516&t[0]){let s;for(o=e[2],s=0;s<o.length;s+=1){const n=Po(e,o,s);r[s]?r[s].p(n,t):(r[s]=Go(n),r[s].c(),r[s].m(a,null))}for(;s<r.length;s+=1)r[s].d(1);r.length=o.length}},d(e){e&&j(t),V(r,e)}}}function Go(e){let t,s,n,a,o,r,i,l,c,d=e[31].title+"";function p(){return e[18](e[31])}return{c(){t=F("a"),s=F("kin-icon"),a=z(),o=B(d),r=z(),Y(s,"name",n=e[31].icon),Y(s,"size","20"),Y(s,"class","g-margin-right--10"),q(t,"class","stg_recommended__item svelte-vw2t48"),q(t,"href",i="#"+e[31].route)},m(e,n){G(e,t,n),O(t,s),O(t,a),O(t,o),O(t,r),l||(c=H(t,"click",p),l=!0)},p(a,r){e=a,4&r[0]&&n!==(n=e[31].icon)&&Y(s,"name",n),4&r[0]&&d!==(d=e[31].title+"")&&K(o,d),4&r[0]&&i!==(i="#"+e[31].route)&&q(t,"href",i)},d(e){e&&j(t),l=!1,c()}}}function jo(e){let t,s,n,a,o,r,i=e[3],l=[];for(let d=0;d<i.length;d+=1)l[d]=Uo(Co(e,i,d));let c=!e[3].length&&e[2]&&Oo(e);return{c(){t=F("div"),s=F("div");for(let e=0;e<l.length;e+=1)l[e].c();a=z(),c&&c.c(),q(t,"slot","modal-content")},m(i,d){G(i,t,d),O(t,s);for(let e=0;e<l.length;e+=1)l[e].m(s,null);O(t,a),c&&c.m(t,null),o||(r=U(n=e[5].call(null,s)),o=!0)},p(e,n){if(280&n[0]){let t;for(i=e[3],t=0;t<i.length;t+=1){const a=Co(e,i,t);l[t]?l[t].p(a,n):(l[t]=Uo(a),l[t].c(),l[t].m(s,null))}for(;t<l.length;t+=1)l[t].d(1);l.length=i.length}!e[3].length&&e[2]?c?c.p(e,n):(c=Oo(e),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},d(e){e&&j(t),V(l,e),c&&c.d(),o=!1,r()}}}function Vo(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f,b=u("settings.search.toNavigate")+"",_=u("settings.search.toSelect")+"",v=u("settings.search.toClose")+"";return{c(){t=F("div"),s=F("span"),n=F("kin-icon"),a=z(),o=B(b),r=z(),i=F("span"),l=F("kin-icon"),c=z(),d=B(_),p=z(),g=F("span"),h=F("strong"),h.textContent="esc",m=z(),f=B(v),Y(n,"name","navigate"),Y(n,"size","16"),Y(n,"class","svelte-vw2t48"),q(s,"class","stg_search__footer__item g-margin-right--20 svelte-vw2t48"),Y(l,"name","return"),Y(l,"size","16"),Y(l,"class","svelte-vw2t48"),q(i,"class","stg_search__footer__item g-margin-right--20 svelte-vw2t48"),q(h,"class","svelte-vw2t48"),q(g,"class","stg_search__footer__item svelte-vw2t48"),q(t,"slot","modal-footer")},m(e,u){G(e,t,u),O(t,s),O(s,n),O(s,a),O(s,o),O(t,r),O(t,i),O(i,l),O(i,c),O(i,d),O(t,p),O(t,g),O(g,h),O(g,m),O(g,f)},p:E,d(e){e&&j(t)}}}function Fo(e){let t,s;return{c(){t=z(),s=z()},m(e,n){G(e,t,n),G(e,s,n)},p:E,d(e){e&&j(t),e&&j(s)}}}function Bo(e){let t,s,n,a,o;const r=e[14].searchButton,i=M(r,e,e[20],No);let l=e[1]&&Ro(e);return{c(){i&&i.c(),t=z(),l&&l.c(),s=W()},m(r,c){i&&i.m(r,c),G(r,t,c),l&&l.m(r,c),G(r,s,c),n=!0,a||(o=H(Eo,"keydown",e[6]),a=!0)},p(e,t){i&&i.p&&1048576&t[0]&&$(i,r,e,e[20],t,Lo,No),e[1]?l?(l.p(e,t),2&t[0]&&ye(l,1)):(l=Ro(e),l.c(),ye(l,1),l.m(s.parentNode,s)):l&&(ve(),xe(l,1,1,(()=>{l=null})),Se())},i(e){n||(ye(i,e),ye(l),n=!0)},o(e){xe(i,e),xe(l),n=!1},d(e){i&&i.d(e),e&&j(t),l&&l.d(e),e&&j(s),a=!1,o()}}}function zo(e){e.focus()}function Wo(t,s,n){let{$$slots:a={},$$scope:o}=s;const i=r.createLogger("settings.search"),l=ae();let{structure:c}=s,{customSearchStrings:d}=s,{mainLayoutContentElem:p}=s,{recommendedItems:u=null}=s,{geekAreaDisabled:g=!1}=s,{isVisible:h=!1}=s,{query:m}=s;const f=new Io(c,qn,{geekAreaDisabled:g});let b,_,v=[],S=[],y=0;function x(){f.updateSearchStrings(d)}function w(t,s){e.emit("Settings.hideSearch"),h&&(s&&e.emit("Settings.gaTrack","Close the search dialog"),n(1,h=!1),n(4,y=0),t&&n(0,m=null))}function k(t){const s="geekArea"===t.section.id;if(e.emit("Settings.gaTrack","Searched expression",m),i.debug("goToResult",t),w(s),s)l("geekArea");else{const e=window.location.hash.replace("#","");let s=t.section.route;if(s&&(s+=t.subpage&&t.subpage.subroute?"/"+t.subpage.subroute:""),"Settings/geekArea"!==e&&e!==s&&s){try{localStorage.settingsSearchResult=JSON.stringify(t)}catch(n){console.error("Saving search result to localStorage failed",n)}window.location.hash=s}else oa(t),!t.elemId&&p&&p.scrollTo(0,0)}}function T(e){e&&l("trackClick",{burgerLabel:e}),w(!1,!1)}se((()=>{_=e.on("product.change",x)})),function(e){te().$$.after_update.push(e)}((function(){setTimeout((()=>{S=b?b.querySelectorAll(".stg_search__item"):[]}))})),ne((()=>{_&&_()}));return t.$$set=e=>{"structure"in e&&n(10,c=e.structure),"customSearchStrings"in e&&n(11,d=e.customSearchStrings),"mainLayoutContentElem"in e&&n(12,p=e.mainLayoutContentElem),"recommendedItems"in e&&n(2,u=e.recommendedItems),"geekAreaDisabled"in e&&n(13,g=e.geekAreaDisabled),"isVisible"in e&&n(1,h=e.isVisible),"query"in e&&n(0,m=e.query),"$$scope"in e&&n(20,o=e.$$scope)},t.$$.update=()=>{1&t.$$.dirty[0]&&n(3,v=f.getResults(m)),2048&t.$$.dirty[0]&&x()},[m,h,u,v,y,function(e){b=e},function(t){let s,a=S.length;if("geek:area"!==m&&"about:config"!==m&&"about:flags"!==m||(a=1,s=y),"KeyF"===t.code&&t.ctrlKey)h||(e.emit("Settings.gaTrack","Open the search dialog"),n(1,h=!0),oa(void 0));else if(h&&a)switch(t.code){case"ArrowDown":s=(y+1)%a,S[s].focus();break;case"ArrowUp":s=0===y?a-1:y-1,S[s].focus();break;case"Enter":case"NumpadEnter":t.preventDefault(),k(v[y])}},w,k,T,c,d,p,g,a,e=>n(0,m=e.target.value),e=>k(e),e=>n(4,y=e),e=>T(e.burgerLabel),()=>w(!0,!0),o]}class Ho extends Ce{constructor(e){var t;super(),document.getElementById("svelte-vw2t48-style")||((t=F("style")).id="svelte-vw2t48-style",t.textContent=".stg_recommended.svelte-vw2t48.svelte-vw2t48{text-align:start}.stg_recommended__title.svelte-vw2t48.svelte-vw2t48{text-transform:uppercase;color:var(--color-ok);padding:2rem 1rem 0.2rem;font-size:var(--font-size-tiny)}.stg_recommended__item.svelte-vw2t48.svelte-vw2t48{padding:1rem 0.8rem;width:100%;text-align:start;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:var(--font-size-small);color:var(--color-text);cursor:pointer;font-weight:bold;text-decoration:none}.stg_recommended__item.svelte-vw2t48.svelte-vw2t48:hover,.stg_recommended__item.svelte-vw2t48.svelte-vw2t48:focus{background-color:var(--button-bg-hover-layer)}.stg_search__item.svelte-vw2t48.svelte-vw2t48{padding:1rem 0.8rem;width:100%;text-align:start;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:var(--font-size-small);color:var(--color-text-secondary);cursor:pointer}.stg_search__item__highlight.svelte-vw2t48.svelte-vw2t48{font-weight:bold;color:var(--color-text)}.stg_search__item.svelte-vw2t48.svelte-vw2t48:hover,.stg_search__item.-hover.svelte-vw2t48.svelte-vw2t48{background-color:var(--button-bg-hover-layer)}.stg_search__footer__item.svelte-vw2t48.svelte-vw2t48{color:var(--color-text-secondary);font-size:var(--font-size-small)}.stg_search__footer__item.svelte-vw2t48 strong.svelte-vw2t48,.stg_search__footer__item.svelte-vw2t48 kin-icon.svelte-vw2t48{color:var(--color-text);font-weight:bold}",O(document.head,t)),Pe(this,e,Wo,Bo,R,{structure:10,customSearchStrings:11,mainLayoutContentElem:12,recommendedItems:2,geekAreaDisabled:13,isVisible:1,query:0},[-1,-1])}}function qo(e){let t,s,n,a;return{c(){t=F("span")},m(o,r){G(o,t,r),n||(a=U(s=e[0].call(null,t)),n=!0)},p:E,i:E,o:E,d(e){e&&j(t),n=!1,a()}}}function Yo(e,t,s){let n,{label:a=null}=t,{icon:o=null}=t,{cssCls:r=null}=t;return ne((()=>n&&n.teardown())),e.$$set=e=>{"label"in e&&s(1,a=e.label),"icon"in e&&s(2,o=e.icon),"cssCls"in e&&s(3,r=e.cssCls)},[function(e){n=new _a({el:e,data:{label:a,icon:o,cssCls:r}})},a,o,r]}class Ko extends Ce{constructor(e){super(),Pe(this,e,Yo,qo,R,{label:1,icon:2,cssCls:3})}}function Xo(e,t,s){const n=e.slice();return n[11]=t[s],n}function Jo(e){let t,s;return t=new Ko({}),{c(){Te(t.$$.fragment)},m(e,n){Ae(t,e,n),s=!0},i(e){s||(ye(t.$$.fragment,e),s=!0)},o(e){xe(t.$$.fragment,e),s=!1},d(e){Ie(t,e)}}}function Qo(e){let t,s,n;return{c(){t=F("button"),t.textContent="Perform",q(t,"class","btn")},m(a,o){G(a,t,o),s||(n=H(t,"click",e[3]),s=!0)},p:E,d(e){e&&j(t),s=!1,n()}}}function Zo(e){let t,s,n,a,o=e[0].options,r=[];for(let i=0;i<o.length;i+=1)r[i]=sr(Xo(e,o,i));return{c(){t=F("select");for(let e=0;e<r.length;e+=1)r[e].c();q(t,"class","input svelte-12111j5"),t.disabled=s=e[0].locked||!e[0].controllable,void 0===e[0].value&&pe((()=>e[6].call(t)))},m(s,o){G(s,t,o);for(let e=0;e<r.length;e+=1)r[e].m(t,null);J(t,e[0].value),n||(a=[H(t,"change",e[6]),H(t,"blur",e[1])],n=!0)},p(e,n){if(1&n){let s;for(o=e[0].options,s=0;s<o.length;s+=1){const a=Xo(e,o,s);r[s]?r[s].p(a,n):(r[s]=sr(a),r[s].c(),r[s].m(t,null))}for(;s<r.length;s+=1)r[s].d(1);r.length=o.length}1&n&&s!==(s=e[0].locked||!e[0].controllable)&&(t.disabled=s),1&n&&J(t,e[0].value)},d(e){e&&j(t),V(r,e),n=!1,L(a)}}}function er(e){let t,s,n,a,o,r,i=e[0].unit&&nr(e);return{c(){t=F("input"),n=z(),i&&i.c(),a=W(),q(t,"class","input -field svelte-12111j5"),q(t,"type","text"),t.disabled=s=e[0].locked||!e[0].controllable,Q(t,"-error",e[0].error),Q(t,"-number",e[0].type===Na)},m(s,l){G(s,t,l),X(t,e[0].value),G(s,n,l),i&&i.m(s,l),G(s,a,l),o||(r=[H(t,"input",e[5]),H(t,"keyup",e[2]),H(t,"change",e[1])],o=!0)},p(e,n){1&n&&s!==(s=e[0].locked||!e[0].controllable)&&(t.disabled=s),1&n&&t.value!==e[0].value&&X(t,e[0].value),1&n&&Q(t,"-error",e[0].error),1&n&&Q(t,"-number",e[0].type===Na),e[0].unit?i?i.p(e,n):(i=nr(e),i.c(),i.m(a.parentNode,a)):i&&(i.d(1),i=null)},d(e){e&&j(t),e&&j(n),i&&i.d(e),e&&j(a),o=!1,L(r)}}}function tr(e){let t,s,n,a;return{c(){t=F("input"),q(t,"type","checkbox"),q(t,"class","checkbox"),t.disabled=s=e[0].locked||!e[0].controllable},m(s,o){G(s,t,o),t.checked=e[0].value,n||(a=[H(t,"change",e[4]),H(t,"change",e[1])],n=!0)},p(e,n){1&n&&s!==(s=e[0].locked||!e[0].controllable)&&(t.disabled=s),1&n&&(t.checked=e[0].value)},d(e){e&&j(t),n=!1,L(a)}}}function sr(e){let t,s,n,a=e[11].label+"";return{c(){t=F("option"),s=B(a),t.__value=n=e[11].value,t.value=t.__value},m(e,n){G(e,t,n),O(t,s)},p(e,o){1&o&&a!==(a=e[11].label+"")&&K(s,a),1&o&&n!==(n=e[11].value)&&(t.__value=n,t.value=t.__value)},d(e){e&&j(t)}}}function nr(e){let t,s=e[0].unit+"";return{c(){t=B(s)},m(e,s){G(e,t,s)},p(e,n){1&n&&s!==(s=e[0].unit+"")&&K(t,s)},d(e){e&&j(t)}}}function ar(e){let t,s,n,a,o,r,i,l,c,d,p,g,h=e[0].label+"",m=u(e[0].desc)+"",f=e[0].locked&&Jo();function b(e,t){return e[0].type===La?tr:e[0].type===Ra||e[0].type===Na?er:e[0].type===Ma?Zo:e[0].type===Da?Qo:void 0}let _=b(e),v=_&&_(e);return{c(){t=F("tr"),s=F("td"),n=F("p"),a=B(h),o=z(),f&&f.c(),r=z(),i=F("p"),l=B(m),c=z(),d=F("td"),v&&v.c(),q(n,"class","p"),q(i,"class","p -secondary -small"),q(d,"class","stg_geek__field svelte-12111j5"),q(t,"id",p=e[0].elemId)},m(e,p){G(e,t,p),O(t,s),O(s,n),O(n,a),O(n,o),f&&f.m(n,null),O(s,r),O(s,i),O(i,l),O(t,c),O(t,d),v&&v.m(d,null),g=!0},p(e,[s]){(!g||1&s)&&h!==(h=e[0].label+"")&&K(a,h),e[0].locked?f?1&s&&ye(f,1):(f=Jo(),f.c(),ye(f,1),f.m(n,null)):f&&(ve(),xe(f,1,1,(()=>{f=null})),Se()),(!g||1&s)&&m!==(m=u(e[0].desc)+"")&&K(l,m),_===(_=b(e))&&v?v.p(e,s):(v&&v.d(1),v=_&&_(e),v&&(v.c(),v.m(d,null))),(!g||1&s&&p!==(p=e[0].elemId))&&q(t,"id",p)},i(e){g||(ye(f),g=!0)},o(e){xe(f),g=!1},d(e){e&&j(t),f&&f.d(),v&&v.d()}}}function or(s,n,a){const o=r.createLogger("settings.geekRow"),i=[];let{prop:l}=n;function c(){if(!l.path&&!l.load)return;let e;if(l.load)e=l.load&&l.load();else{const s="string"==typeof l.path?{name:l.path}:l.path;e=t("app.settings.Get",s)}return e.then((e=>(e?(a(0,l.value=l.type===La?1==e.value:e.value,l),a(0,l.storedValue=l.value,l),a(0,l.locked="1"==e.locked,l),a(0,l.controllable=!0,l),a(0,l._valueType=typeof l.value,l),a(0,l.error=!1,l)):(o.error("the response is not supposed to be empty",l),a(0,l.controllable=!1,l)),l)))}function d(){let e;return e=l.regex&&!l.regex.test(l.value)?{valid:!1}:"number"===l.type?Qn(l):Zn(l),e.valid&&a(0,l.value=e.value,l),a(0,l.error=!e.valid,l),e.valid}function p(){return l.track&&l.track.subject||l.label}return se((()=>{l.updateOnEvent&&i.push(e.on(l.updateOnEvent,c)),c()})),ne((()=>{i.forEach((e=>e()))})),s.$$set=e=>{"prop"in e&&a(0,l=e.prop)},[l,function(){if(o.debug("changeProperty",l),a(0,l.controllable=!1,l),d()){const s=ea(l);let n=l.change&&l.change(s);if(e.emit("Settings.gaTrack",p(),l.value),!n){const e={value:s};l.path.name?Object.assign(e,l.path):e.name=l.path,n=t("app.settings.Set",e)}n.then((()=>{a(0,l.storedValue=l.value,l),a(0,l.controllable=!0,l),l.emitOnChange&&e.emit(l.emitOnChange)})).catch((()=>{a(0,l.value=l.storedValue,l),a(0,l.controllable=!0,l)}))}else a(0,l.controllable=!0,l)},d,function(){e.emit("Settings.gaTrack",p(),"Perform"),l.action()},function(){l.value=this.checked,a(0,l)},function(){l.value=this.value,a(0,l)},function(){l.value=function(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}(this),a(0,l)}]}class rr extends Ce{constructor(e){var t;super(),document.getElementById("svelte-12111j5-style")||((t=F("style")).id="svelte-12111j5-style",t.textContent=".stg_geek__field.svelte-12111j5.svelte-12111j5{position:relative}.stg_geek__field.svelte-12111j5 input[type='text'].svelte-12111j5,.stg_geek__field.svelte-12111j5 select.svelte-12111j5{width:100%}.stg_geek__field.svelte-12111j5 input.-number.svelte-12111j5{width:50%}",O(document.head,t)),Pe(this,e,or,ar,R,{prop:0})}}function ir(e,t,s){const n=e.slice();return n[8]=t[s],n}function lr(e,t,s){const n=e.slice();return n[11]=t[s],n}function cr(e){let t;return{c(){t=F("kin-loading"),Y(t,"fullscreen","true")},m(e,s){G(e,t,s)},p:E,i:E,o:E,d(e){e&&j(t)}}}function dr(e){let t,s,n=e[0],a=[];for(let r=0;r<n.length;r+=1)a[r]=ur(ir(e,n,r));const o=e=>xe(a[e],1,1,(()=>{a[e]=null}));return{c(){t=F("div");for(let e=0;e<a.length;e+=1)a[e].c();q(t,"class","settings__upgrade")},m(e,n){G(e,t,n);for(let s=0;s<a.length;s+=1)a[s].m(t,null);s=!0},p(e,s){if(1&s){let r;for(n=e[0],r=0;r<n.length;r+=1){const o=ir(e,n,r);a[r]?(a[r].p(o,s),ye(a[r],1)):(a[r]=ur(o),a[r].c(),ye(a[r],1),a[r].m(t,null))}for(ve(),r=n.length;r<a.length;r+=1)o(r);Se()}},i(e){if(!s){for(let e=0;e<n.length;e+=1)ye(a[e]);s=!0}},o(e){a=a.filter(Boolean);for(let t=0;t<a.length;t+=1)xe(a[t]);s=!1},d(e){e&&j(t),V(a,e)}}}function pr(e){let t,s;return t=new rr({props:{prop:e[11]}}),{c(){Te(t.$$.fragment)},m(e,n){Ae(t,e,n),s=!0},p(e,s){const n={};1&s&&(n.prop=e[11]),t.$set(n)},i(e){s||(ye(t.$$.fragment,e),s=!0)},o(e){xe(t.$$.fragment,e),s=!1},d(e){Ie(t,e)}}}function ur(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f=u(e[8].transId||e[8].id)+"",b=e[8].properties,_=[];for(let u=0;u<b.length;u+=1)_[u]=pr(lr(e,b,u));const v=e=>xe(_[e],1,1,(()=>{_[e]=null}));return{c(){t=F("h4"),s=B(f),a=z(),o=F("table"),r=F("colgroup"),r.innerHTML='<col width="75%"/> \n\t\t\t\t\t\t\t\t<col width="25%"/>',i=z(),l=F("tr"),c=F("th"),c.textContent=`${u("settings.geekArea.item")}`,d=z(),p=F("th"),p.textContent=`${u("settings.geekArea.value")}`,g=z();for(let e=0;e<_.length;e+=1)_[e].c();h=z(),q(t,"class","h4 settings__title g-margin-top--30"),q(t,"id",n=e[8].elemId),q(o,"class","table -no-border -fixed")},m(e,n){G(e,t,n),O(t,s),G(e,a,n),G(e,o,n),O(o,r),O(o,i),O(o,l),O(l,c),O(l,d),O(l,p),O(o,g);for(let t=0;t<_.length;t+=1)_[t].m(o,null);O(o,h),m=!0},p(e,a){if((!m||1&a)&&f!==(f=u(e[8].transId||e[8].id)+"")&&K(s,f),(!m||1&a&&n!==(n=e[8].elemId))&&q(t,"id",n),1&a){let t;for(b=e[8].properties,t=0;t<b.length;t+=1){const s=lr(e,b,t);_[t]?(_[t].p(s,a),ye(_[t],1)):(_[t]=pr(s),_[t].c(),ye(_[t],1),_[t].m(o,h))}for(ve(),t=b.length;t<_.length;t+=1)v(t);Se()}},i(e){if(!m){for(let e=0;e<b.length;e+=1)ye(_[e]);m=!0}},o(e){_=_.filter(Boolean);for(let t=0;t<_.length;t+=1)xe(_[t]);m=!1},d(e){e&&j(t),e&&j(a),e&&j(o),V(_,e)}}}function gr(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f,b,_,v,S,y,x,w,k,T=u("settings.geekArea")+"",A=u("settings.geekArea.desc")+"";const I=[dr,cr],E=[];function P(e,t){return e[0]?0:1}return S=P(e),y=E[S]=I[S](e),{c(){t=F("nav"),s=F("div"),n=F("kin-icon"),a=z(),o=B(T),r=z(),i=F("div"),l=F("p"),l.textContent=`${u("settings.geekArea.doYouWantToLeave")}`,c=z(),d=F("button"),d.textContent=`${u("settings.geekArea.goBack")}`,p=z(),g=F("main"),h=F("section"),m=F("div"),f=F("h3"),f.textContent=`${u("settings.geekArea")}`,b=z(),_=F("p"),v=z(),y.c(),Y(n,"name","icon-m-eye"),q(s,"class","settings__item -geek -active"),q(s,"aria-current",""),q(l,"class","p -secondary -small"),q(d,"class","btn g-margin-top--15"),q(i,"class","settings__item -geek"),q(t,"class","settings__menu"),q(f,"class","h3 settings__title"),q(_,"class","settings__desc"),q(m,"id","stg-section-geekArea"),q(h,"class","settings__section"),q(g,"class","settings__content -no-submenu")},m(u,y){G(u,t,y),O(t,s),O(s,n),O(s,a),O(s,o),O(t,r),O(t,i),O(i,l),O(i,c),O(i,d),G(u,p,y),G(u,g,y),O(g,h),O(h,m),O(m,f),O(m,b),O(m,_),_.innerHTML=A,O(m,v),E[S].m(m,null),x=!0,w||(k=H(d,"click",e[3]),w=!0)},p(e,[t]){let s=S;S=P(e),S===s?E[S].p(e,t):(ve(),xe(E[s],1,1,(()=>{E[s]=null})),Se(),y=E[S],y?y.p(e,t):(y=E[S]=I[S](e),y.c()),ye(y,1),y.m(m,null))},i(e){x||(ye(y),x=!0)},o(e){xe(y),x=!1},d(e){e&&j(t),e&&j(p),e&&j(g),E[S].d(),w=!1,k()}}}function hr(e){const t=e.map((e=>function(e){const t=e.map((e=>e.cond||!0));return Promise.all(t).then((t=>e.filter(((e,s)=>t[s])))).catch((e=>(console.log("validating section definitions failed",e),[])))}(e)));return Promise.all(t)}function mr(e,t,s){const n=r.createLogger("settings.geekArea"),o=ae();let i,{structure:l}=t;(function(){const e=[],t=[];return l.forEach((s=>{s.sections.forEach((s=>{if(ra(s))if(e.push(s),Yn[s.id])t.push(Yn[s.id]);else{const e=s.module||s.id,n=s.view?s.view+"Geek":"settingsGeek",o=a.importModule(e,n,{silent:!0}).then((e=>"function"==typeof e?e():e)).catch((()=>[]));t.push(o)}}))})),e.push({id:"general",transId:"settings.general"}),t.push([{path:"avcfg://settings/Common/ReputationServices",label:"Enable reputation services",desc:u("geek.reputation.services.desc"),type:"checkbox"},{path:"avcfg://settings/BrowserCleanup/ScheduledMode",label:"Check my browsers regularly for toolbars with bad user ratings",type:"checkbox"}]),Promise.all(t).then(hr).then((t=>e.filter(((e,s)=>(e.properties=t[s],e.properties.length))))).catch((e=>{n.error("loading property definitions failed",e)}))})().then((e=>{e.forEach((e=>{e.elemId="settings_geekArea_"+e.id,e.properties.forEach((e=>{let t;t=e.path?"string"==typeof e.path?e.path:JSON.stringify(e.path):e.id,e.elemId=t&&"settings_geekArea_"+t.replace(/[^a-zA-Z0-9]+/g,"_")}))})),s(0,i=e)})).then((function(){const e=[];i.forEach((t=>{e.push({section:t,elemId:t.elemId,strings:[{string:u(t.transId||t.id),score:2}]}),t.properties.forEach((s=>{s.unsearchable||e.push({section:t,title:s.label,elemId:s.elemId,strings:[{string:s.label,score:1},{string:s.desc}]})}))})),o("searchStrings",e)}));return e.$$set=e=>{"structure"in e&&s(2,l=e.structure)},[i,o,l,()=>o("close")]}class fr extends Ce{constructor(e){super(),Pe(this,e,mr,gr,R,{structure:2})}}function br(e){let t,s,n,a,o,r,i,l;function c(t){e[15].call(null,t)}function d(t){e[16].call(null,t)}let p={structure:e[2],customSearchStrings:e[4],mainLayoutContentElem:e[5],$$slots:{searchButton:[Sr]},$$scope:{ctx:e}};void 0!==e[6]&&(p.isVisible=e[6]),void 0!==e[7]&&(p.query=e[7]),s=new Ho({props:p}),re.push((()=>ke(s,"isVisible",c))),re.push((()=>ke(s,"query",d))),s.$on("geekArea",e[10]);const u=[xr,yr],g=[];function h(e,t){return e[3]?0:1}return r=h(e),i=g[r]=u[r](e),{c(){t=F("div"),Te(s.$$.fragment),o=z(),i.c(),q(t,"class","settings stg")},m(e,n){G(e,t,n),Ae(s,t,null),O(t,o),g[r].m(t,null),l=!0},p(e,o){const l={};4&o&&(l.structure=e[2]),16&o&&(l.customSearchStrings=e[4]),32&o&&(l.mainLayoutContentElem=e[5]),16777408&o&&(l.$$scope={dirty:o,ctx:e}),!n&&64&o&&(n=!0,l.isVisible=e[6],ue((()=>n=!1))),!a&&128&o&&(a=!0,l.query=e[7],ue((()=>a=!1))),s.$set(l);let c=r;r=h(e),r===c?g[r].p(e,o):(ve(),xe(g[c],1,1,(()=>{g[c]=null})),Se(),i=g[r],i?i.p(e,o):(i=g[r]=u[r](e),i.c()),ye(i,1),i.m(t,null))},i(e){l||(ye(s.$$.fragment,e),ye(i),l=!0)},o(e){xe(s.$$.fragment,e),xe(i),l=!1},d(e){e&&j(t),Ie(s),g[r].d()}}}function _r(e){let t;return{c(){t=F("kin-loading"),Y(t,"fullscreen","true")},m(e,s){G(e,t,s)},p:E,i:E,o:E,d(e){e&&j(t)}}}function vr(e){let t,s,n;return{c(){t=B(": '"),s=B(e[7]),n=B("'")},m(e,a){G(e,t,a),G(e,s,a),G(e,n,a)},p(e,t){128&t&&K(s,e[7])},d(e){e&&j(t),e&&j(s),e&&j(n)}}}function Sr(e){let t,s,n,a,o,r,i,l,c=u("global.search")+"",d=e[7]&&vr(e);return{c(){t=F("kin-button"),s=F("span"),n=F("kin-icon"),a=z(),o=F("span"),r=B(c),d&&d.c(),Y(n,"name","search"),Y(n,"class","g-margin-right--5"),Y(n,"size","16"),q(s,"class","g-ellipsis"),Y(t,"slot","searchButton"),Y(t,"type","blank"),Y(t,"size","small"),Y(t,"class","settings__searchbar nui_caption_client nui_caption_client-overlay"),Y(t,"data-test","settings_showSearch")},m(c,p){G(c,t,p),O(t,s),O(s,n),O(s,a),O(s,o),O(o,r),d&&d.m(o,null),i||(l=H(t,"click",e[14]),i=!0)},p(e,t){e[7]?d?d.p(e,t):(d=vr(e),d.c(),d.m(o,null)):d&&(d.d(1),d=null)},d(e){e&&j(t),d&&d.d(),i=!1,l()}}}function yr(e){let t,s,n;function a(t){e[17].call(null,t)}let o={structure:e[2],router:e[8],focusMainContent:e[0]};return void 0!==e[5]&&(o.contentElem=e[5]),t=new Ca({props:o}),re.push((()=>ke(t,"contentElem",a))),{c(){Te(t.$$.fragment)},m(e,s){Ae(t,e,s),n=!0},p(e,n){const a={};4&n&&(a.structure=e[2]),1&n&&(a.focusMainContent=e[0]),!s&&32&n&&(s=!0,a.contentElem=e[5],ue((()=>s=!1))),t.$set(a)},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){xe(t.$$.fragment,e),n=!1},d(e){Ie(t,e)}}}function xr(e){let t,s;return t=new fr({props:{structure:e[2]}}),t.$on("close",e[11]),t.$on("searchStrings",e[9]),{c(){Te(t.$$.fragment)},m(e,n){Ae(t,e,n),s=!0},p(e,s){const n={};4&s&&(n.structure=e[2]),t.$set(n)},i(e){s||(ye(t.$$.fragment,e),s=!0)},o(e){xe(t.$$.fragment,e),s=!1},d(e){Ie(t,e)}}}function wr(e){let t,s,n,a;const o=[_r,br],r=[];function i(e,t){return e[1]?0:1}return t=i(e),s=r[t]=o[t](e),{c(){s.c(),n=W()},m(e,s){r[t].m(e,s),G(e,n,s),a=!0},p(e,[a]){let l=t;t=i(e),t===l?r[t].p(e,a):(ve(),xe(r[l],1,1,(()=>{r[l]=null})),Se(),s=r[t],s?s.p(e,a):(s=r[t]=o[t](e),s.c()),ye(s,1),s.m(n.parentNode,n))},i(e){a||(ye(s),a=!0)},o(e){xe(s),a=!1},d(e){r[t].d(e),e&&j(n)}}}function kr(s,n,a){const l=r.createLogger("settings.index");let{brandParams:c}=n;const d=new i;let{focusMainContent:p}=n;const u=new i;let g,h,m,f,b,_=!0,v=!1,S="";d.on("/*",(function(e){x.then((()=>{l.debug("handleRoute",e);const t=e.wildcard,s=0===t.indexOf("geekArea");a(3,h=s),s||setTimeout((()=>u.emit(t)),0)}))}));const y=e.on("Settings.gaTrack",(function(e,t,s){const n=s?{cd21:s}:null;o.event("Settings",t,e,null,n)})),x=c.structurePromise.then((e=>{a(2,g=e),a(1,_=!1)})).catch((e=>{l.error("loading structure failed",e)}));ne((()=>{d.removeAllListeners(),y(),t("app.settings.ApplySettings")}));return s.$$set=e=>{"brandParams"in e&&a(12,c=e.brandParams),"focusMainContent"in e&&a(0,p=e.focusMainContent)},[p,_,g,h,m,b,v,S,u,function(e){a(4,m=e.detail)},function(){f=window.location.hash,window.location.hash="Settings/geekArea"},function(){a(4,m=null),window.location.hash=f||"Settings",f=null},c,d,()=>a(6,v=!0),function(e){v=e,a(6,v)},function(e){S=e,a(7,S)},function(e){b=e,a(5,b)}]}class Tr extends Ce{constructor(e){super(),Pe(this,e,kr,wr,R,{brandParams:12,router:13,focusMainContent:0})}get brandParams(){return this.$$.ctx[12]}set brandParams(e){this.$set({brandParams:e}),me()}get router(){return this.$$.ctx[13]}get focusMainContent(){return this.$$.ctx[0]}set focusMainContent(e){this.$set({focusMainContent:e}),me()}}function Ar(e){let t,s,n,a,o,r,i,l;const c=e[13].default,d=M(c,e,e[12],null);return{c(){t=F("span"),n=z(),a=F("div"),d&&d.c()},m(c,p){G(c,t,p),G(c,n,p),G(c,a,p),d&&d.m(a,null),r=!0,i||(l=[U(s=e[0].call(null,t)),U(o=e[1].call(null,a))],i=!0)},p(e,[t]){d&&d.p&&4096&t&&$(d,c,e,e[12],t,null,null)},i(e){r||(ye(d,e),r=!0)},o(e){xe(d,e),r=!1},d(e){e&&j(t),e&&j(n),e&&j(a),d&&d.d(e),i=!1,L(l)}}}function Ir(e,t,s){let n,a,o,{$$slots:r={},$$scope:i}=t,{title:l}=t,{desc:c=null}=t,{component:d=null}=t,{ipmBuyElm:p=null}=t,{noInstall:u=!1}=t,{noEnable:g=!1}=t,{componentService:h=null}=t,{stopOptions:m=null}=t,{notSupported:f=!1}=t,{notSupportedMsg:b=null}=t;function _(){a&&o&&(n=new Jn({el:a,data:{component:d,ipmBuyElm:p,title:l,desc:c,noInstall:u,noEnable:g,componentService:h,stopOptions:m,notSupported:f,notSupportedMsg:b,yieldElem:o}}))}return ne((()=>{n&&n.teardown()})),e.$$set=e=>{"title"in e&&s(2,l=e.title),"desc"in e&&s(3,c=e.desc),"component"in e&&s(4,d=e.component),"ipmBuyElm"in e&&s(5,p=e.ipmBuyElm),"noInstall"in e&&s(6,u=e.noInstall),"noEnable"in e&&s(7,g=e.noEnable),"componentService"in e&&s(8,h=e.componentService),"stopOptions"in e&&s(9,m=e.stopOptions),"notSupported"in e&&s(10,f=e.notSupported),"notSupportedMsg"in e&&s(11,b=e.notSupportedMsg),"$$scope"in e&&s(12,i=e.$$scope)},[function(e){a=e,_()},function(e){o=e,_()},l,c,d,p,u,g,h,m,f,b,i,r]}function Er(e){let t,s,n,a,o,r,i,l;const c=e[5].default,d=M(c,e,e[4],null);return{c(){t=F("span"),n=z(),a=F("div"),d&&d.c()},m(c,p){G(c,t,p),G(c,n,p),G(c,a,p),d&&d.m(a,null),r=!0,i||(l=[U(s=e[0].call(null,t)),U(o=e[1].call(null,a))],i=!0)},p(e,[t]){d&&d.p&&16&t&&$(d,c,e,e[4],t,null,null)},i(e){r||(ye(d,e),r=!0)},o(e){xe(d,e),r=!1},d(e){e&&j(t),e&&j(n),e&&j(a),d&&d.d(e),i=!1,L(l)}}}function Pr(e,t,s){let n,a,o,{$$slots:r={},$$scope:i}=t,{property:l}=t;function c(){a&&o&&(s(3,n=new da({el:a,data:{property:l,yieldElem:o}})),n.observe("property",(e=>s(2,l=e))))}return ne((()=>n&&n.teardown())),e.$$set=e=>{"property"in e&&s(2,l=e.property),"$$scope"in e&&s(4,i=e.$$scope)},e.$$.update=()=>{12&e.$$.dirty&&l&&n&&(n.set("property.label",l.label),n.set("property.desc",l.desc),n.set("property.disabled",l.disabled))},[function(e){a=e,c()},function(e){o=e,c()},l,n,i,r]}function Cr(e,t,s){const n=e.slice();return n[8]=t[s],n}function Lr(e){let t,s,n,a,o,r;var i=e[8].descCompo;return i&&(s=new i({})),{c(){t=F("span"),s&&Te(s.$$.fragment)},m(i,l){G(i,t,l),s&&Ae(s,t,null),a=!0,o||(r=U(n=e[1].call(null,t,{type:"desc",option:e[8]})),o=!0)},p(a,o){if(i!==(i=(e=a)[8].descCompo)){if(s){ve();const e=s;xe(e.$$.fragment,1,0,(()=>{Ie(e,1)})),Se()}i?(s=new i({}),Te(s.$$.fragment),ye(s.$$.fragment,1),Ae(s,t,null)):s=null}n&&N(n.update)&&1&o&&n.update.call(null,{type:"desc",option:e[8]})},i(e){a||(s&&ye(s.$$.fragment,e),a=!0)},o(e){s&&xe(s.$$.fragment,e),a=!1},d(e){e&&j(t),s&&Ie(s),o=!1,r()}}}function Nr(e){let t,s,n,a,o,r;var i=e[8].customCompo;return i&&(s=new i({})),{c(){t=F("span"),s&&Te(s.$$.fragment)},m(i,l){G(i,t,l),s&&Ae(s,t,null),a=!0,o||(r=U(n=e[1].call(null,t,{type:"custom",option:e[8]})),o=!0)},p(a,o){if(i!==(i=(e=a)[8].customCompo)){if(s){ve();const e=s;xe(e.$$.fragment,1,0,(()=>{Ie(e,1)})),Se()}i?(s=new i({}),Te(s.$$.fragment),ye(s.$$.fragment,1),Ae(s,t,null)):s=null}n&&N(n.update)&&1&o&&n.update.call(null,{type:"custom",option:e[8]})},i(e){a||(s&&ye(s.$$.fragment,e),a=!0)},o(e){s&&xe(s.$$.fragment,e),a=!1},d(e){e&&j(t),s&&Ie(s),o=!1,r()}}}function Rr(e){let t,s,n,a=e[8].descCompo&&Lr(e),o=e[8].customCompo&&Nr(e);return{c(){a&&a.c(),t=z(),o&&o.c(),s=W()},m(e,r){a&&a.m(e,r),G(e,t,r),o&&o.m(e,r),G(e,s,r),n=!0},p(e,n){e[8].descCompo?a?(a.p(e,n),1&n&&ye(a,1)):(a=Lr(e),a.c(),ye(a,1),a.m(t.parentNode,t)):a&&(ve(),xe(a,1,1,(()=>{a=null})),Se()),e[8].customCompo?o?(o.p(e,n),1&n&&ye(o,1)):(o=Nr(e),o.c(),ye(o,1),o.m(s.parentNode,s)):o&&(ve(),xe(o,1,1,(()=>{o=null})),Se())},i(e){n||(ye(a),ye(o),n=!0)},o(e){xe(a),xe(o),n=!1},d(e){a&&a.d(e),e&&j(t),o&&o.d(e),e&&j(s)}}}function Mr(e){let t,s,n,a,o,r,i,l=e[0].options,c=[];for(let p=0;p<l.length;p+=1)c[p]=Rr(Cr(e,l,p));const d=e=>xe(c[e],1,1,(()=>{c[e]=null}));return{c(){t=F("span"),n=z();for(let e=0;e<c.length;e+=1)c[e].c();a=W()},m(l,d){G(l,t,d),G(l,n,d);for(let e=0;e<c.length;e+=1)c[e].m(l,d);G(l,a,d),o=!0,r||(i=U(s=e[2].call(null,t)),r=!0)},p(e,[t]){if(1&t){let s;for(l=e[0].options,s=0;s<l.length;s+=1){const n=Cr(e,l,s);c[s]?(c[s].p(n,t),ye(c[s],1)):(c[s]=Rr(n),c[s].c(),ye(c[s],1),c[s].m(a.parentNode,a))}for(ve(),s=l.length;s<c.length;s+=1)d(s);Se()}},i(e){if(!o){for(let e=0;e<l.length;e+=1)ye(c[e]);o=!0}},o(e){c=c.filter(Boolean);for(let t=0;t<c.length;t+=1)xe(c[t]);o=!1},d(e){e&&j(t),e&&j(n),V(c,e),e&&j(a),r=!1,i()}}}function Dr(e,t,s){let n,a,{property:o}=t,r=0,i=0;function l(){!n||i>r||(a=new pa({el:n,data:{property:o}}),a.observe("property",(e=>s(0,o=e))))}return o.options.forEach((e=>{e.descCompo&&i++,e.customCompo&&i++})),ne((()=>a&&a.teardown())),e.$$set=e=>{"property"in e&&s(0,o=e.property)},[o,function(e,{type:t,option:s}){switch(t){case"desc":s.descCompoElem=e,r++;break;case"custom":s.customCompoElem=e,r++}e.parentNode.removeChild(e),l()},function(e){n=e,l()}]}function $r(e){let t,s,n,a;return{c(){t=F("span")},m(o,r){G(o,t,r),n||(a=U(s=e[0].call(null,t)),n=!0)},p:E,i:E,o:E,d(e){e&&j(t),n=!1,a()}}}function Ur(e,t,s){let n,{property:a}=t,{cssCls:o}=t;return ne((()=>n&&n.teardown())),e.$$set=e=>{"property"in e&&s(1,a=e.property),"cssCls"in e&&s(2,o=e.cssCls)},[function(e){n=new ua({el:e,data:{property:a,cssCls:o}}),n.observe("property",(e=>s(1,a=e)))},a,o]}function Or(e){let t,s,n,a;return{c(){t=F("span")},m(o,r){G(o,t,r),n||(a=U(s=e[0].call(null,t)),n=!0)},p:E,i:E,o:E,d(e){e&&j(t),n=!1,a()}}}function Gr(e,t,s){let n,{property:a}=t,{inline:o}=t,{wrapCssCls:r}=t;return ne((()=>n&&n.teardown())),e.$$set=e=>{"property"in e&&s(1,a=e.property),"inline"in e&&s(2,o=e.inline),"wrapCssCls"in e&&s(3,r=e.wrapCssCls)},[function(e){n=new ga({el:e,data:{property:a,inline:o,wrapCssCls:r}}),n.observe("property",(e=>s(1,a=e)))},a,o,r]}function jr(e){let t,s,n,a;return{c(){t=F("span")},m(o,r){G(o,t,r),n||(a=U(s=e[0].call(null,t)),n=!0)},p:E,i:E,o:E,d(e){e&&j(t),n=!1,a()}}}function Vr(e,t,s){let n,{tabs:a}=t,{selectedTabId:o}=t,{watchedTabsHeightContainer:r}=t;return ne((()=>n&&n.teardown())),e.$$set=e=>{"tabs"in e&&s(1,a=e.tabs),"selectedTabId"in e&&s(2,o=e.selectedTabId),"watchedTabsHeightContainer"in e&&s(3,r=e.watchedTabsHeightContainer)},[function(e){a&&a.forEach((e=>{e.compo&&e.compo.prototype.teardown&&(e.compo.components=va)})),n=new ha({el:e,data:{tabs:a,selectedTabId:o,watchedTabsHeightContainer:r}})},a,o,r]}function Fr(e){let t,s,n,a;return{c(){t=F("span")},m(o,r){G(o,t,r),n||(a=U(s=e[0].call(null,t)),n=!0)},p:E,i:E,o:E,d(e){e&&j(t),n=!1,a()}}}function Br(e,t,s){let n,{property:a}=t,{style:o}=t,{inline:r}=t,{wrapCssCls:i}=t,{cssCls:l}=t,{placeholderText:c}=t;return ne((()=>n&&n.teardown())),e.$$set=e=>{"property"in e&&s(1,a=e.property),"style"in e&&s(2,o=e.style),"inline"in e&&s(3,r=e.inline),"wrapCssCls"in e&&s(4,i=e.wrapCssCls),"cssCls"in e&&s(5,l=e.cssCls),"placeholderText"in e&&s(6,c=e.placeholderText)},[function(e){n=new fa({el:e,data:{property:a,style:o,inline:r,wrapCssCls:i,cssCls:l,placeholderText:c}}),n.observe("property",(e=>s(1,a=e)))},a,o,r,i,l,c]}function zr(e){let t,s,n,a;return{c(){t=F("span")},m(o,r){G(o,t,r),n||(a=U(s=e[0].call(null,t)),n=!0)},p:E,i:E,o:E,d(e){e&&j(t),n=!1,a()}}}function Wr(e){let t;return ne((()=>t&&t.teardown())),[function(e){t=new ba({el:e})}]}function Hr(e,t,s){const n=e.slice();return n[16]=t[s],n[18]=s,n}function qr(e,t,s){const n=e.slice();return n[19]=t[s],n[18]=s,n}function Yr(e){let t;return{c(){t=F("div"),t.innerHTML='<kin-icon name="icon-m-action-block" size="24"></kin-icon>',q(t,"slot","icon")},m(e,s){G(e,t,s)},d(e){e&&j(t)}}}function Kr(e){let t,s,n,a,o,r,i=u(e[4],e[0].length)+"",l=f.getArrayEllipsis(e[0].map(ri))+"";return{c(){t=F("div"),s=F("div"),n=B(i),a=z(),o=F("div"),r=B(l),q(s,"class","sve-one_row__title"),q(o,"class","sve-one_row__desc"),q(t,"slot","main-content")},m(e,i){G(e,t,i),O(t,s),O(s,n),O(t,a),O(t,o),O(o,r)},p(e,t){1&t&&i!==(i=u(e[4],e[0].length)+"")&&K(n,i),1&t&&l!==(l=f.getArrayEllipsis(e[0].map(ri))+"")&&K(r,l)},d(e){e&&j(t)}}}function Xr(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f,b=e[19].name+"";function _(){return e[8](e[19])}return{c(){t=F("div"),s=F("div"),n=F("img"),r=z(),i=F("div"),l=B(b),c=z(),d=F("div"),p=F("kin-button"),g=F("kin-icon"),q(n,"class","kin-img"),q(n,"height","24"),n.src!==(a="data:gif/png;base64,"+e[19].icon)&&q(n,"src",a),q(n,"alt",o=e[19].name),Y(g,"name","icon-s-controls-close"),Y(g,"size","18"),Y(p,"size","small"),Y(p,"type","blank"),Y(p,"icononly","true"),Y(p,"title",h=e[19].name+" - "+u("global.remove")),q(d,"class","kin_table__end"),q(t,"role","row"),q(t,"class","kin_table__row baa_row svelte-3n1x49")},m(e,a){G(e,t,a),O(t,s),O(s,n),O(t,r),O(t,i),O(i,l),O(t,c),O(t,d),O(d,p),O(p,g),m||(f=H(p,"click",_),m=!0)},p(t,s){e=t,1&s&&n.src!==(a="data:gif/png;base64,"+e[19].icon)&&q(n,"src",a),1&s&&o!==(o=e[19].name)&&q(n,"alt",o),1&s&&b!==(b=e[19].name+"")&&K(l,b),1&s&&h!==(h=e[19].name+" - "+u("global.remove"))&&Y(p,"title",h)},d(e){e&&j(t),m=!1,f()}}}function Jr(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f,b=e[0],_=[];for(let u=0;u<b.length;u+=1)_[u]=Xr(qr(e,b,u));return{c(){t=F("div"),s=F("kin-table"),n=F("div");for(let e=0;e<_.length;e+=1)_[e].c();a=z(),o=F("div"),r=F("div"),i=F("kin-button"),l=F("kin-icon"),d=z(),p=F("div"),p.textContent=`${u("settings.blockedAndAllowedApps.blockedApps.addLabel")}`,g=z(),h=F("div"),Y(l,"name","icon-s-add"),Y(l,"size","18"),Y(i,"size","small"),Y(i,"type","blank"),Y(i,"icononly","true"),Y(i,"title",c=u("settings.blockedAndAllowedApps.blockedApps.addLabel")),q(h,"class","kin_table__end"),q(o,"role","row"),q(o,"class","kin_table__row -hoverable baa_row svelte-3n1x49"),q(n,"slot","table-body"),q(t,"slot","expanded-content")},m(c,u){G(c,t,u),O(t,s),O(s,n);for(let e=0;e<_.length;e+=1)_[e].m(n,null);O(n,a),O(n,o),O(o,r),O(r,i),O(i,l),O(o,d),O(o,p),O(o,g),O(o,h),m||(f=H(o,"click",e[9]),m=!0)},p(e,t){if(33&t){let s;for(b=e[0],s=0;s<b.length;s+=1){const o=qr(e,b,s);_[s]?_[s].p(o,t):(_[s]=Xr(o),_[s].c(),_[s].m(n,a))}for(;s<_.length;s+=1)_[s].d(1);_.length=b.length}},d(e){e&&j(t),V(_,e),m=!1,f()}}}function Qr(e){let t,s;return{c(){t=z(),s=z()},m(e,n){G(e,t,n),G(e,s,n)},p:E,d(e){e&&j(t),e&&j(s)}}}function Zr(e){let t;return{c(){t=F("div"),t.innerHTML='<kin-icon name="circle-ok-neutral" size="24"></kin-icon>',q(t,"slot","icon")},m(e,s){G(e,t,s)},d(e){e&&j(t)}}}function ei(e){let t,s,n,a,o,r,i=u(e[3],e[1].length)+"",l=f.getArrayEllipsis(e[1].map(ii))+"";return{c(){t=F("div"),s=F("div"),n=B(i),a=z(),o=F("div"),r=B(l),q(s,"class","sve-one_row__title"),q(o,"class","sve-one_row__desc"),q(t,"slot","main-content")},m(e,i){G(e,t,i),O(t,s),O(s,n),O(t,a),O(t,o),O(o,r)},p(e,t){2&t&&i!==(i=u(e[3],e[1].length)+"")&&K(n,i),2&t&&l!==(l=f.getArrayEllipsis(e[1].map(ii))+"")&&K(r,l)},d(e){e&&j(t)}}}function ti(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f,b=e[16].name+"";function _(){return e[10](e[16])}return{c(){t=F("div"),s=F("div"),n=F("img"),r=z(),i=F("div"),l=B(b),c=z(),d=F("div"),p=F("kin-button"),g=F("kin-icon"),q(n,"class","kin-img"),q(n,"height","24"),n.src!==(a="data:gif/png;base64,"+e[16].icon)&&q(n,"src",a),q(n,"alt",o=e[16].name),Y(g,"name","icon-s-controls-close"),Y(g,"size","10"),Y(p,"size","small"),Y(p,"type","blank"),Y(p,"icononly","true"),Y(p,"title",h=e[16].name+" - "+u("global.remove")),q(d,"class","kin_table__end"),q(t,"role","row"),q(t,"class","kin_table__row baa_row svelte-3n1x49")},m(e,a){G(e,t,a),O(t,s),O(s,n),O(t,r),O(t,i),O(i,l),O(t,c),O(t,d),O(d,p),O(p,g),m||(f=H(p,"click",_),m=!0)},p(t,s){e=t,2&s&&n.src!==(a="data:gif/png;base64,"+e[16].icon)&&q(n,"src",a),2&s&&o!==(o=e[16].name)&&q(n,"alt",o),2&s&&b!==(b=e[16].name+"")&&K(l,b),2&s&&h!==(h=e[16].name+" - "+u("global.remove"))&&Y(p,"title",h)},d(e){e&&j(t),m=!1,f()}}}function si(e){let t,s,n,a,o,r,i,l,c,d,p,g,h,m,f,b=e[1],_=[];for(let u=0;u<b.length;u+=1)_[u]=ti(Hr(e,b,u));return{c(){t=F("div"),s=F("kin-table"),n=F("div");for(let e=0;e<_.length;e+=1)_[e].c();a=z(),o=F("div"),r=F("div"),i=F("kin-button"),l=F("kin-icon"),d=z(),p=F("div"),p.textContent=`${u("settings.blockedAndAllowedApps.allowedApps.addLabel")}`,g=z(),h=F("div"),Y(l,"name","icon-s-add"),Y(l,"size","18"),Y(i,"size","small"),Y(i,"type","blank"),Y(i,"icononly","true"),Y(i,"title",c=u("settings.blockedAndAllowedApps.allowedApps.addLabel")),q(h,"class","kin_table__end"),q(o,"role","row"),q(o,"class","kin_table__row -hoverable baa_row svelte-3n1x49"),q(n,"slot","table-body"),q(t,"slot","expanded-content")},m(c,u){G(c,t,u),O(t,s),O(s,n);for(let e=0;e<_.length;e+=1)_[e].m(n,null);O(n,a),O(n,o),O(o,r),O(r,i),O(i,l),O(o,d),O(o,p),O(o,g),O(o,h),m||(f=H(o,"click",e[11]),m=!0)},p(e,t){if(34&t){let s;for(b=e[1],s=0;s<b.length;s+=1){const o=Hr(e,b,s);_[s]?_[s].p(o,t):(_[s]=ti(o),_[s].c(),_[s].m(n,a))}for(;s<_.length;s+=1)_[s].d(1);_.length=b.length}},d(e){e&&j(t),V(_,e),m=!1,f()}}}function ni(e){let t,s;return{c(){t=z(),s=z()},m(e,n){G(e,t,n),G(e,s,n)},p:E,d(e){e&&j(t),e&&j(s)}}}function ai(e){let t,s,n,a;return{c(){t=F("div")},m(o,r){G(o,t,r),n||(a=U(s=e[6].call(null,t)),n=!0)},d(e){e&&j(t),n=!1,a()}}}function oi(e){let t,s,n,a,o,r,i,l,c,d;n=new bo({props:{expandable:"true",background:"true",$$slots:{default:[Qr],"expanded-content":[Jr],"main-content":[Kr],icon:[Yr]},$$scope:{ctx:e}}}),i=new bo({props:{expandable:"true",background:"true",$$slots:{default:[ni],"expanded-content":[si],"main-content":[ei],icon:[Zr]},$$scope:{ctx:e}}});let p=e[2]&&ai(e);return{c(){t=F("h2"),t.textContent=`${u("settings.blockedAndAllowedApps.blockedApps")}`,s=z(),Te(n.$$.fragment),a=z(),o=F("h2"),o.textContent=`${u("settings.blockedAndAllowedApps.allowedApps")}`,r=z(),Te(i.$$.fragment),l=z(),p&&p.c(),c=W(),q(t,"class","sve_one-page__title g-margin-bottom--20"),q(o,"class","sve_one-page__title g-margin-top--40 g-margin-bottom--20")},m(e,u){G(e,t,u),G(e,s,u),Ae(n,e,u),G(e,a,u),G(e,o,u),G(e,r,u),Ae(i,e,u),G(e,l,u),p&&p.m(e,u),G(e,c,u),d=!0},p(e,[t]){const s={};2097157&t&&(s.$$scope={dirty:t,ctx:e}),n.$set(s);const a={};2097158&t&&(a.$$scope={dirty:t,ctx:e}),i.$set(a),e[2]?p||(p=ai(e),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},i(e){d||(ye(n.$$.fragment,e),ye(i.$$.fragment,e),d=!0)},o(e){xe(n.$$.fragment,e),xe(i.$$.fragment,e),d=!1},d(e){e&&j(t),e&&j(s),Ie(n,e),e&&j(a),e&&j(o),e&&j(r),Ie(i,e),e&&j(l),p&&p.d(e),e&&j(c)}}}const ri=e=>e.name,ii=e=>e.name;function li(e,t,s){let{featureName:n=""}=t;xs.init();const a={AntiRansomwareShield:{allowedTitle:"antiransomware.allowedApps.title",blockedTitle:"antiransomware.blockedApps.title"},WebCamProtection:{allowedTitle:"webcamshield.allowedApps.title",blockedTitle:"webcamshield.blockedApps.title"},SensitiveDataScan:{allowedTitle:"sensitivedata.allowedApps.title",blockedTitle:"sensitivedata.blockedApps.title"},AvPasswordProtection:{allowedTitle:"passwordProtection.allowedApps.title",blockedTitle:"passwordProtection.blockedApps.title"}},o=a[n]&&a[n].allowedTitle||"",r=a[n]&&a[n].blockedTitle||"",i=xs.getShields(),l=xs.on(xs.EVENTS.appsChanged,u);let c=[],d=[],p=null;function u(){return xs.loadApps().then((e=>{const t=[],n=[];e.forEach((e=>{const s=i.some((t=>"blocked"===e.shields[t])),a=i.some((t=>"allowed"===e.shields[t]));s&&t.push(e),a&&n.push(e)})),s(0,c=t),s(1,d=n)}))}function g(e,t){i.forEach((t=>e.shields[t]=null)),xs.fakeAllShieldsActiveBeforeDelete(e.path,t),xs.saveApp(e)}u(),ne((()=>{l(),xs.destroy()}));return e.$$set=e=>{"featureName"in e&&s(7,n=e.featureName)},[c,d,p,o,r,g,function(e){const t=new T.InstalledApps({el:e});return t.on("close",(()=>s(2,p=null))),t.on("appSelected",(e=>{e.shields={},i.forEach((t=>e.shields[t]=p)),xs.saveApp(e).then((()=>s(2,p=null)))})),{destroy:t.teardown.bind(t)}},n,e=>g(e,"blocked"),()=>s(2,p="blocked"),e=>g(e,"allowed"),()=>s(2,p="allowed")]}const ci=Object.freeze({__proto__:null,Container:class extends Ce{constructor(e){super(),Pe(this,e,Ir,Ar,R,{title:2,desc:3,component:4,ipmBuyElm:5,noInstall:6,noEnable:7,componentService:8,stopOptions:9,notSupported:10,notSupportedMsg:11})}},Checkbox:class extends Ce{constructor(e){super(),Pe(this,e,Pr,Er,R,{property:2})}},Radio:class extends Ce{constructor(e){super(),Pe(this,e,Dr,Mr,R,{property:0})}},Range:class extends Ce{constructor(e){super(),Pe(this,e,Ur,$r,R,{property:1,cssCls:2})}},Select:class extends Ce{constructor(e){super(),Pe(this,e,Gr,Or,R,{property:1,inline:2,wrapCssCls:3})}},Tabs:class extends Ce{constructor(e){super(),Pe(this,e,Vr,jr,R,{tabs:1,selectedTabId:2,watchedTabsHeightContainer:3})}},TextInput:class extends Ce{constructor(e){super(),Pe(this,e,Br,Fr,R,{property:1,style:2,inline:3,wrapCssCls:4,cssCls:5,placeholderText:6})}},WhiteAndBlackList:class extends Ce{constructor(e){super(),Pe(this,e,Wr,zr,R,{})}},Badge:Ko,BlockedAndAllowedApps:class extends Ce{constructor(e){var t;super(),document.getElementById("svelte-3n1x49-style")||((t=F("style")).id="svelte-3n1x49-style",t.textContent=".baa_row.svelte-3n1x49{grid-template-columns:7% 68% 25%}",O(document.head,t)),Pe(this,e,li,oi,R,{featureName:7})}}}),di=ta([{id:"general",transId:"settings.general",icon:"icon-m-tools-core-shields",sections:[{id:"languages",transId:"settings.languages"},{id:"update",transId:"settings.update"},{id:"notifications",transId:"settings.notifications"},{id:"exceptions",transId:"settings.exceptions"},{id:"blockedAndAllowedApps",transId:"settings.blockedAndAllowedApps"},{id:"password",transId:"settings.password"},{id:"personalPrivacy",transId:"settings.personalPrivacy"},{id:"troubleshooting",transId:"settings.troubleshooting"}]},{id:"security",icon:"icon-m-tools-protection",sections:[{id:"Scans",transId:"scans"},{id:"Shields",transId:"shields"},{id:"VirusChest",transId:"viruschest"},{id:"SecurityNetwork",transId:"network"},{id:"ras",transId:"remoteAccessShield",componentId:"ais_cmp_rdp"},{id:"AntiRansomware",transId:"antiransomware",componentId:"ais_shl_rsw"},{id:"Firewall",transId:"firewall",componentId:"ais_cmp_fw"},{id:"SecureDNS",transId:"secureDNS",componentId:"ais_cmp_secdns"},{id:"Sandbox",transId:"sandbox",componentId:"ais_cmp_snx"},{id:"exchange",transId:"settings.exchange",componentId:"ais_shl_exch"},{id:"sharepoint",transId:"settings.sharepoint",componentId:"ais_shl_shp"}]},{id:"privacy",icon:"icon-m-tools-privacy",sections:[{id:"WebCam",transId:"webcamshield",componentId:"ais_cmp_webcam"},{id:"SensitiveData",transId:"sensitivedata",componentId:"ais_cmp_datascan_full"},{id:"DataShredder",transId:"datashredder",componentId:"ais_cmp_shredder"},{id:"Antispam",transId:"antispam",componentId:"ais_shl_spm",cond:function(){return b.isInstalled("ais_shl_spm")||b.isAfbEdition()}},{id:"passwordProtection",transId:"passwordProtection",componentId:"ais_cmp_avpap"},{id:"legacyPasswords",transId:"settings.legacyPasswords",cond:function(){return Promise.allSettled([t("app.avast.lis.get.all",{}),t("app.pam.GetPAMState",!0)]).then((([e,t])=>{const s=b.isInstalled("ais_cmp_pwdman"),n=e.value&&e.value.products||{},a=Boolean(t.value&&t.value.vaultPwdCount>0),o=Boolean(n.pam&&n.pam.license&&"paid"===n.pam.license.type);return s&&!(a||o)}))}}]},{id:"performance",icon:"icon-m-tools-performance",sections:[{id:"DoNotDisturb",transId:"doNotDisturb.name",componentId:"ais_cmp_gamingmode"},{id:"Software",transId:"softwarehealth",componentId:"ais_cmp_swhealth"}]},{id:"smarthome.hub",icon:"shield",cond:function(){return"omni"===b.getProduct()&&t("app.ring.stateInfo").then((e=>"ADMIN_FINISHED"===e.state)).catch((()=>!1))},sections:[{id:"smarthomeTroubleshooting",transId:"smarthome.hub.troubleshooting.title"},{id:"smarthomePersonalPrivacy",transId:"smarthome.personalPrivacy.title",cond:function(){return a.importModule("Smarthome","store").then((e=>!0!==e.get().prescout)).catch((()=>!1))}}]}]);export default class extends Tr{constructor(e={}){e.props=e.props||{},e.props.brandParams={structurePromise:di},super(e)}}export{ia as common,va as ractiveComponents,ci as svelteComponents};const pi={name:"Settings",version:"1.2.966",created:"2021-03-09T09:16:04.870Z"};export{pi as metadata};