!function(){"use strict";functione(e,a){e.state("preferences",{abstract:!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}},resolve:{statePreferences:t}}).state("preferences.general",{url:"/general",views:{module:{templateUrl:"generalPreferences.html"}}}).state("preferences.calendars",{url:"/calendars",views:{module:{templateUrl:"calendarsPreferences.html"}}}).state("preferences.addressbooks",{url:"/addressbooks",views:{module:{templateUrl:"addressbooksPreferences.html"}}}).state("preferences.mailer",{url:"/mailer",views:{module:{templateUrl:"mailerPreferences.html"}}}),a.otherwise("/general")}functiont(e){returne}functiona(e){e.$on("$routeChangeError",function(e,t,a,n){console.error(e,t,a,n)})}angular.module("SOGo.PreferencesUI",["ui.router","ck","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication","as.sortable"]).config(e).run(a),e.$inject=["$stateProvider","$urlRouterProvider"],t.$inject=["Preferences"],a.$inject=["$rootScope"]}(),function(){"use strict";functione(e,t,a,n,r){functiono(){return!(n>0)&&!r}functionl(){e.cancel()}functions(){e.hide()}vari=this;i.defaultPort=143,i.defaults=t,i.account=a,i.accountId=n,i.customFromIsReadonly=o,i.cancel=l,i.save=s,i.hostnameRE=n>0?/^(?!(127\.0\.0\.1|localhost(?:\.localdomain)?)$)/:/./,i.account.encryption?"ssl"==i.account.encryption&&(i.defaultPort=993):i.account.encryption="none"}e.$inject=["$mdDialog","defaults","account","accountId","mailCustomFromEnabled"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";functione(e,t,a,n,r,o){functions(){a.cancel()}functioni(){returng.filter.rules&&g.filter.rules.length>0&&g.filter.actions&&g.filter.actions.length>0}functionc(e){a.hide()}functiond(e){g.filter.rules||(g.filter.rules=[]),g.filter.rules.push({field:"subject",operator:"contains"})}functionf(e){g.filter.rules.splice(e,1)}functionu(e){g.filter.actions||(g.filter.actions=[]),g.filter.actions.push({method:"discard"})}functionm(e){g.filter.actions.splice(e,1)}varg=this,p=t.sieveCapabilities,h=t.forwardEnabled;t.vacationEnabled;g.filter=n,g.mailboxes=r,g.labels=o,g.cancel=s,g.hasRulesAndActions=i,g.save=c,g.addMailFilterRule=d,g.removeMailFilterRule=f,g.addMailFilterAction=u,g.removeMailFilterAction=m,g.fieldLabels={subject:l("Subject"),from:l("From"),to:l("To"),cc:l("Cc"),to_or_cc:l("To or Cc"),size:l("Size (Kb)"),header:l("Header")},p.indexOf("body")>-1&&(g.fieldLabels.body=l("Body")),g.methodLabels={discard:l("Discard the message"),keep:l("Keep the message"),stop:l("Stop processing filter rules")},h&&(g.methodLabels.redirect=l("Forward the message to")),p.indexOf("reject")>-1&&(g.methodLabels.reject=l("Send a reject message")),p.indexOf("fileinto")>-1&&(g.methodLabels.fileinto=l("File the message in")),(p.indexOf("imapflags")>-1||p.indexOf("imap4flags")>-1)&&(g.methodLabels.addflag=l("Flag the message with")),g.numberOperatorLabels={under:l("is under"),over:l("is over")},g.textOperatorLabels={is:l("is"),is_not:l("is not"),contains:l("contains"),contains_not:l("does not contain"),matches:l("matches"),matches_not:l("does not match")},p.indexOf("regex")>-1&&(g.textOperatorLabels.regex=l("matches regex"),g.textOperatorLabels.regex_not=l("does not match regex")),g.flagLabels={seen:l("Seen"),deleted:l("Deleted"),answered:l("Answered"),flagged:l("Flagged"),junk:l("Junk"),not_junk:l("Not Junk")}}e.$inject=["$scope","$window","$mdDialog","filter","mailboxes","labels"],angular.module("SOGo.PreferencesUI").controller("FiltersDialogController",e)}(),function(){"use strict";functione(e,t,a,n,r,o,s,i,c,d,f,u,m,g){functionp(e,t){t.$valid&&(n("xs")&&r("left").close(),a.go("preferences."+e))}functionh(e){d.confirm(l("Warning"),l("Save preferences and reload page now?"),{ok:l("Yes"),cancel:l("No")}).then(function(){L(e,{quick:!0}).then(function(){t.location.reload(!0)})})}functionw(e){Z.preferences.defaults.SOGoCalendarCategoriesColors["New category"]="#aaa",Z.preferences.defaults.SOGoCalendarCategories.push("New category"),c("calendarCategory_