(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{1322:function(t,e,n){"use strict";n.r(e);var o=n(3016),s=n(1761);for(var r in s)"default"!==r&&function(t){n.d(e,t,(function(){return s[t]}))}(r);n(2597);var a=n(0),l=n(2599),p=n.n(l),i=Object(a.a)(s.default,o.a,o.b,!1,null,"ce9217a2",null);"function"==typeof p.a&&p()(i),e.default=i.exports},1432:function(t,e,n){"use strict";var o=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.updateCron=e.getCron=e.restoreBackup=e.getRestoreFiles=e.scheduleBackup=e.getRestoreOptions=e.getScheduleOptions=e.getSettings=e.updateSettings=e.deleteCrons=e.duplicateCrons=e.getEncryptionStatus=e.getCrons=void 0;var s=o(n(2)),r=o(n(30));function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function l(t){for(var e=1;e🔒","").trim()}}))}))}))}});e.getCrons=i;var u=r.default.get({id:"BACKUP_ENCRYPTION_STATUS",url:p,after:function(t){return t.flow(t.project({enabled:"settings.allow_backup_encryption",password:"settings.encryption_password"}),t.mapProp("enabled",t.convert.toAppBoolean))}});e.getEncryptionStatus=u;var c=r.default.select({url:p,params:{duplicate:!0}});e.duplicateCrons=c;var f=r.default.select({url:p,params:{delete:!0}});e.deleteCrons=f;var d=r.default.post({url:p,params:{action:"setting"},schema:{message:r.default.REQUIRED_BOOL,local_ns:r.default.REQUIRED_BOOL,restore_spf:r.default.REQUIRED_BOOL}});e.updateSettings=d;var _=r.default.get({id:"USER_BACKUP_SETTINGS",url:p,after:function(t){return t.flow(t.project({local_ns:"settings.local_ns",message:"settings.message",restore_spf:"settings.restore_spf"}),t.mapValues(t.convert.toAppBoolean))}});e.getSettings=_;var h=r.default.get({id:"USER_BACKUP_SCHEDULE_OPTIONS",url:p,after:function(t){return t.flow(t.project({settings:"settings","settings.append":"append_to_path",where:"where",users:"users",location:"files_location"}),t.mapProps({users:t.flow(t.deleteProp("info"),t.toArray,t.mapArray(t.getProp("user"))),settings:t.flow(t.project({ip:"ftp_ip",password:"ftp_password",path:"ftp_path",port:"ftp_port",secure:"ftp_secure",username:"ftp_username",append:"append"}),t.mapProps({secure:t.convert.toAppBoolean,append:function(t){var e=Object.values(t),n=e.find((function(t){return t.selected})),o=e.reduce((function(t,e){return l({},t,(0,s.default)({},e.value,e.text))}),{});return{value:n.value,options:o}}}))}))}});e.getScheduleOptions=h;var v=r.default.get({id:"USER_BACKUP_RESTORE_OPTIONS",url:p,after:function(t){return t.flow(t.project({settings:"settings",where:"where",location:"files_location",ips:"ip_list",files:"files"}),t.mapProps({files:t.flow(t.deleteProp("info"),t.toArray),settings:t.flow(t.getProps(["ftp_ip","ftp_password","ftp_path","ftp_port","ftp_secure","ftp_username"]),t.mapProps({ftp_secure:t.convert.toAppBoolean})),ips:function(t){var e=Object.values(t),n=e.find((function(t){return t.selected})),o=e.reduce((function(t,e){return l({},t,(0,s.default)({},e.value,e.text))}),{});return{value:n.value,options:o}}}))}});e.getRestoreOptions=v;var m=r.default.post({url:p,params:{action:"create",form_version:"3"},schema:{who:r.default.REQUIRED_STRING,select:{type:Array,required:!1},skip_suspended:r.default.OPTIONAL_BOOL,when:r.default.REQUIRED_STRING,minute:r.default.OPTIONAL_STRING,hour:r.default.OPTIONAL_STRING,dayofmonth:r.default.OPTIONAL_STRING,month:r.default.OPTIONAL_STRING,dayofweek:r.default.OPTIONAL_STRING,where:r.default.REQUIRED_STRING,ftp_ip:r.default.OPTIONAL_STRING,ftp_username:r.default.OPTIONAL_STRING,ftp_password:r.default.OPTIONAL_STRING,ftp_path:r.default.OPTIONAL_STRING,ftp_port:r.default.OPTIONAL_STRING,ftp_secure:r.default.OPTIONAL_STRING,append_to_path:r.default.OPTIONAL_STRING,custom_append:r.default.OPTIONAL_STRING,encryption_password:r.default.OPTIONAL_STRING}});e.scheduleBackup=m;var w=r.default.get({url:p,id:"USER_BACKUP_RESTORE_FILES",params:{action:"update_files"},schema:{where:r.default.REQUIRED_STRING,ftp_ip:r.default.OPTIONAL_STRING,ftp_username:r.default.OPTIONAL_STRING,ftp_password:r.default.OPTIONAL_STRING,ftp_path:r.default.OPTIONAL_STRING,ftp_port:r.default.OPTIONAL_STRING,ftp_secure:r.default.OPTIONAL_STRING},after:function(t){return t.flow(t.getProp("files"),t.deleteProp("info"),t.toArray)}});e.getRestoreFiles=w;var O=r.default.post({url:p,params:{action:"restore"},schema:{where:r.default.REQUIRED_STRING,ftp_ip:r.default.OPTIONAL_STRING,ftp_username:r.default.OPTIONAL_STRING,ftp_password:r.default.OPTIONAL_STRING,ftp_path:r.default.OPTIONAL_STRING,ftp_port:r.default.OPTIONAL_STRING,ftp_secure:r.default.OPTIONAL_STRING,ip_choice:r.default.REQUIRED_STRING,ip:r.default.OPTIONAL_STRING,select:{type:Array,required:!0},encryption_password:r.default.OPTIONAL_STRING}});e.restoreBackup=O;var P=r.default.post({url:"/CMD_USER_BACKUP_MODIFY",id:"USER_BACKUP_CRON",schema:{id:r.default.REQUIRED_STRING},notifySuccess:!1,notifyError:!0,after:function(t){return t.flow(t.moveProp({append_to_path:"append","settings.where":"where"}),t.mapProps({settings:t.mapProp("ftp_secure",t.convert.toAppBoolean),who:t.mapProps({skip_suspended:t.convert.toAppBoolean,users:t.flow(t.deleteProp("info"),t.toArray,t.mapArray(t.getProp("user"))),select:t.feedWith(1,t.flow(t.getProp("users"),t.deleteProp("info"),t.filter(t.flow(t.getProp("checkbox"),t.isEqual("checked"))),t.mapValues(t.getProp("user")),t.toArray))}),append:t.flow(t.mapProps({options:t.feedWith(1,t.transformObject((function(t){var e=t.value,n=t.text;return(0,s.default)({},e,n)}))),value:t.feedWith(1,t.flow(t.find(t.getProp("selected")),t.getProp("value")))}),t.getProps(["value","options"])),custom_append:t.feedWith(1,t.getProp("append.custom_append"))}))}});e.getCron=P;var y=r.default.post({url:p,params:{action:"modify",when:"cron",form_version:"3"},schema:{id:r.default.REQUIRED_STRING,who:r.default.REQUIRED_STRING,select:{type:Array,required:!1},skip_suspended:r.default.OPTIONAL_BOOL,minute:r.default.REQUIRED_STRING,hour:r.default.REQUIRED_STRING,dayofmonth:r.default.REQUIRED_STRING,month:r.default.REQUIRED_STRING,dayofweek:r.default.REQUIRED_STRING,where:r.default.REQUIRED_STRING,ftp_ip:r.default.OPTIONAL_STRING,ftp_username:r.default.OPTIONAL_STRING,ftp_password:r.default.OPTIONAL_STRING,ftp_path:r.default.OPTIONAL_STRING,ftp_port:r.default.OPTIONAL_STRING,ftp_secure:r.default.OPTIONAL_STRING,append_to_path:r.default.REQUIRED_STRING,custom_append:r.default.OPTIONAL_STRING}});e.updateCron=y},1761:function(t,e,n){"use strict";n.r(e);var o=n(1762),s=n.n(o);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e.default=s.a},1762:function(t,e,n){"use strict";var o=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=o(n(2)),r=n(1432),a=n(23);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}var p={preload:[r.getCron,r.getEncryptionStatus],api:[{command:r.getCron,bind:"cron"},{command:r.getEncryptionStatus,bind:{"response.enabled":"encryption",response:"encryptionStatus"}}],mixins:[(0,a.$bindTab)({defaultTab:"who",param:"step"})],data:function(){return{who:"all",where:"local",whoData:{select:[],skip_suspended:!1},cron:{minute:"",hour:"",dayofmonth:"",month:"",dayofweek:""},ftp:{ftp_ip:"",ftp_username:"",ftp_password:"",ftp_path:"",ftp_port:"",ftp_secure:!1},append_to_path:"nothing",custom_append:"",encrypt:!1,password:""}},props:{id:{type:String,required:!0}},computed:{validWho:function(){return"all"===this.who||!!this.whoData.select.length},validWhen:function(){return"now"===this.when||!!this.cron.minute&&!!this.cron.hour&&!!this.cron.dayofmonth&&!!this.cron.month&&!!this.cron.dayofweek},validWhere:function(){return"local"===this.where||!!this.ftp.ftp_ip&&!!this.ftp.ftp_username&&!!this.ftp.ftp_password&&!!this.ftp.ftp_path&&!!this.ftp.ftp_port}},methods:{submit:function(){(0,r.updateCron)(function(t){for(var e=1;e