From 649337c3e53ae256b93680046dc78022bedae86f Mon Sep 17 00:00:00 2001 From: InverseBot Date: Wed, 6 Sep 2017 00:32:04 -0400 Subject: [PATCH] (js/css) Update generated files --- UI/WebServerResources/js/Common.js | 2 +- UI/WebServerResources/js/Common.js.map | 2 +- UI/WebServerResources/js/Mailer.services.js | 2 +- UI/WebServerResources/js/Mailer.services.js.map | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UI/WebServerResources/js/Common.js b/UI/WebServerResources/js/Common.js index c98f7843d..0e38d29a9 100644 --- a/UI/WebServerResources/js/Common.js +++ b/UI/WebServerResources/js/Common.js @@ -1,2 +1,2 @@ -function l(){var e,t,n=arguments[0],r=n,i=arguments;for(labels[n]?r=labels[n]:clabels[n]&&(r=clabels[n]),e=1,t=0;e1&&(r=r.replace(/%((%)|s|d)/g,function(t){var n=null;if(t[2])n=t[2];else{switch(n=i[e],t){case"%d":n=parseFloat(n),isNaN(n)&&(n=0)}e++}return n})),r}function hexToRgb(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function contrast(e){var t,n,r=1;if(t=hexToRgb(e)){n=[t.r/255,t.g/255,t.b/255];for(var i=0;i.179?"black":"white"}function guid(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(e()+e()+"-"+e()+"-4"+e().substr(0,3)+"-"+e()+"-"+e()+e()+e()).toLowerCase()}!function(){"use strict";function e(e,t,n,r,i){r.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"fafafa",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),r.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]}),r.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1000:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:["800","900"]}),r.theme("default").primaryPalette("sogo-blue",{default:"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{default:"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}),DebugEnabled||(e.debugEnabled(!1),t.debugInfoEnabled(!1),i.disableWarnings(),r.generateThemesOnDemand(!0)),n.interceptors.push("AuthInterceptor"),n.interceptors.push("ErrorInterceptor")}function t(e,t){return{response:function(n){return n&&/^application\/json/.test(n.config.headers.Accept)&&/^[\n\r ]*/.test(n.data)?(e.location.reload(!0),t.reject()):n}}}function n(e,t,n,r){return{responseError:function(i){var o,s;if(/^application\/json/.test(i.config.headers.Accept)){if(t.usesCASAuthentication&&-1==i.status)return o=n.defer(),(s=angular.element('')).on("load",function(){r.get("$http")(i.config).then(o.resolve,o.reject),s.remove()}),document.body.appendChild(s[0]),o.promise;e.$broadcast("http:Error",i)}return n.reject(i)}}}angular.module("SOGo.Common",["ngAnimate","ngMessages","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopup:document.body.classList.contains("popup"),baseURL:function(){return ApplicationBaseURL||null},resourcesURL:function(){return ResourcesURL||null},activeUser:function(e){var t={login:UserLogin||null,identification:UserIdentification||null,email:UserEmail||null,language:UserLanguage||null,folderURL:UserFolderURL||null,isSuperUser:IsSuperUser||null,path:{calendar:UserCalendarPath||null,contacts:UserContactsPath||null,mail:UserMailPath||null,preferences:UserPreferencesPath||null,administration:IsSuperUser?UserAdministrationPath:null,help:HelpURL||null,logoff:UserLogoffPath||null}};return e?t[e]:t},minimumSearchLength:function(){return angular.isNumber(minimumSearchLength)?minimumSearchLength:2}}).constant("sgColors",{selection:["#FFFFFF","#330033","#C0C0C0","#999999","#666666","#333333","#000000","#FFCCCC","#FF6666","#FF0000","#CC0000","#990000","#660000","#330000","#FFCC99","#FF9966","#FF9900","#FF6600","#CC6600","#993300","#663300","#FFFF99","#FFFF66","#FFCC66","#FFCC33","#CC9933","#996633","#663333","#FFFFCC","#FFFF33","#FFFF00","#FFCC00","#999900","#666600","#333300","#CCCCCC","#66FF99","#33FF33","#33CC00","#009900","#006600","#003300","#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#99FF99"]}).constant("sgConstant",{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1023px)","gt-md":"(min-width: 1024px)",lg:"(min-width: 1024px) and (max-width: 1279px)","gt-lg":"(min-width: 1280px)",xl:"(min-width: 1920px)",print:"print"}).config(e).factory("AuthInterceptor",t).factory("ErrorInterceptor",n),e.$inject=["$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","$mdAriaProvider"],t.$inject=["$window","$q"],n.$inject=["$rootScope","$window","$q","$injector"]}(),function(){"use strict";function e(e){n=e}function t(e,t,r){function i(e){return e.join("")}function o(e,t,n,r,i,o){if(i){var s={theme:n,palette:r,value:"rgb("+i.value[0]+","+i.value[1]+","+i.value[2]+")",contrast:"rgb("+i.contrast[0]+","+i.contrast[1]+","+i.contrast[2]+")",hue:o};y.insertRule(e(s),v),v+=1,y.insertRule(t(s),v),v+=1}}function s(e,t,n,r,i){if(r){var o="rgb("+r.value[0]+","+r.value[1]+","+r.value[2]+")";y.insertRule(e({theme:t,palette:n,value:o,hue:i}),v),v+=1}}for(var a=e(i([".md-{{theme}}-theme",".md-fg"])+" { color:{{value}};}"),l=e(i([".md-{{theme}}-theme",".md-bg"])+" { background-color:{{value}};}"),c=e(i([".md-{{theme}}-theme",".md-bdr"])+" { border-color:{{value}};}"),u=e(i([".md-{{theme}}-theme",".md-{{hue}}",".md-fg"])+" { color:{{value}};}"),d=e(i([".md-{{theme}}-theme",".md-{{hue}}",".md-bg"])+" { background-color:{{value}};}"),h=e(i([".md-{{theme}}-theme",".md-{{palette}}",".md-fg"])+" { color:{{value}};}"),m=e(i([".md-{{theme}}-theme",".md-{{palette}}",".md-bg"])+" { background-color:{{value}}; color:{{contrast}} !important; }"),g=e(i([".md-{{theme}}-theme",".md-{{palette}}",".md-bdr"])+" { border-color:{{value}};}"),p=e(i([".md-{{theme}}-theme",".md-{{palette}}.md-{{hue}}",".md-fg"])+" { color:{{value}};}"),f=e(i([".md-{{theme}}-theme",".md-{{palette}}.md-{{hue}}",".md-bg"])+" { background-color:{{value}};}"),y=function(){var e=t[0].head.querySelector('style[title="Dynamic-Generated-by-mdColors"]');return null===e&&((e=t[0].createElement("style")).title="Dynamic-Generated-by-mdColors",e.appendChild(t[0].createTextNode("")),t[0].head.appendChild(e)),e.sheet}(),v=0;y.cssRules.length>0;)y.deleteRule(0);angular.forEach(n._THEMES,function(e,t){o(a,l,t,"primary",n._PALETTES[e.colors.primary.name][e.colors.primary.hues.default]),o(u,d,t,"primary",n._PALETTES[e.colors.primary.name][e.colors.primary.hues["hue-2"]],"hue-2"),o(u,d,t,"primary",n._PALETTES[e.colors.primary.name][e.colors.primary.hues["hue-3"]],"hue-3"),o(u,d,t,"primary",n._PALETTES[e.colors.primary.name][e.colors.primary.hues["hue-1"]],"hue-1"),s(c,t,"primary",n._PALETTES[e.colors.primary.name][e.colors.primary.hues.default]),angular.forEach(e.colors,function(e,r){o(h,m,t,r,n._PALETTES[e.name][e.hues.default]),s(g,t,r,n._PALETTES[e.name][e.hues.default]),o(p,f,t,r,n._PALETTES[e.name][e.hues["hue-2"]],"hue-2"),o(p,f,t,r,n._PALETTES[e.name][e.hues["hue-3"]],"hue-3"),o(p,f,t,r,n._PALETTES[e.name][e.hues["hue-1"]],"hue-1")})})}var n;angular.module("mdColors",["ngMaterial"]).config(e).run(t),e.$inject=["$mdThemingProvider"],t.$inject=["$interpolate","$document","$log"]}(),function(){"use strict";function e(e){return e.decodeURIComponent}e.$inject=["$window"],angular.module("SOGo.Common").filter("decodeUri",e)}(),function(){"use strict";function e(e){return e.encodeURIComponent}e.$inject=["$window"],angular.module("SOGo.Common").filter("encodeUri",e)}(),function(){"use strict";function e(e){return function(t){var n=angular.element("
"+t+"
");return n.find("a").attr("target","_blank"),e.trustAs("html",n.html())}}e.$inject=["$sce"],angular.module("SOGo.Common").filter("ensureTarget",e)}(),function(){"use strict";function e(){return l}angular.module("SOGo.Common").filter("loc",e)}(),function(){"use strict";function e(){return function(e){for(var t=[],n=0;n"):void 0}}e.$inject=["linkyFilter"],angular.module("SOGo.Common").filter("txt2html",e)}(),function(){"use strict";function e(e,t,n,r,i,o){function s(e){return i.$filter(e,o.$acl.users)}function a(){o.$acl.$resetUsersRights(),t.hide()}function c(){o.$acl.$saveUsersRights().then(function(){t.hide()},function(e,t){n.alert(l("Warning"),l("An error occured please try again."))})}function u(e){var t=e.$confirmRights(f.folder);t&&(f.confirmation.showing=!0,f.confirmation.message=t)}function d(t){e(function(){o.$acl.$removeUser(t.uid)},500)}function h(e){e&&o.$acl.$addUser(e).then(function(e){f.userToAdd="",f.searchText="",f.selectedUid=null,e&&g(e)})}function m(e){o.$acl.$selectAllRights(e)}function g(e,t){if(t&&t.target.parentNode.classList.contains("md-secondary"))return!1;f.selectedUid==e.uid?f.selectedUid=null:(f.selectedUid=e.uid,f.selectedUser=e,e.inactive||f.selectedUser.$rights())}function p(e){return f.selectedUid==e.uid&&!e.inactive}var f=this;f.users=r,f.folder=o,f.selectedUser=null,f.selectedUid=null,f.userToAdd="",f.searchText="",f.userFilter=s,f.closeModal=a,f.saveModal=c,f.confirmChange=u,f.removeUser=d,f.addUser=h,f.selectAllRights=m,f.selectUser=g,f.showRights=p,f.confirmation={showing:!1,message:""}}e.$inject=["$timeout","$mdDialog","Dialog","usersWithACL","User","folder"],angular.module("SOGo.Common").controller("AclController",e)}(),function(){"use strict";function e(e,t,n,r,i,o,s,a,c,u,d,h,m,g){function p(){return!s("left").isOpen()}function f(e,t){var n;t.data&&t.data.message&&angular.isString(t.data.message)?n=t.data.message:t.status&&(n=t.statusText),n?a.show({template:["",'
',' error_outline'," "+l(n)+"","
","
"].join(""),hideDelay:5e3,position:"top right"}):u.debug("untrap error")}var y=new m(h.baseURL(),h.activeUser());t.isPopup=h.isPopup,t.activeUser=h.activeUser(),t.baseURL=h.baseURL(),t.leftIsClose=!c(d["gt-md"]),t.centerIsClose=!!o.centerIsClose&&!t.leftIsClose,t.currentDay=window.currentDay,n(function(){r(function(){i.get("../date").then(function(e){t.currentDay=e})},864e5)},1e3*window.currentDay.secondsBeforeTomorrow),t.toggleLeft=function(){t.isGtMedium?t.leftIsClose=!t.leftIsClose:(t.leftIsClose=p(),t.leftIsClose&&angular.element(o).triggerHandler("resize"),s("left").toggle().then(function(){u.debug("toggle left is done")}))},t.toggleRight=function(){s("right").toggle().then(function(){u.debug("toggle right is done")})},t.toggleCenter=function(e){t.centerIsClose=!t.centerIsClose,e&&e.save&&y.post(null,"saveListState",{state:t.centerIsClose?"collapse":"rise"})},t.$watch(function(){return c(d["gt-md"])},function(e){t.isGtMedium=e,e&&(t.leftIsClose=!1)}),e.$on("http:Error",f),h.activeUser("path").calendar&&g.getAlarms()}e.$inject=["$rootScope","$scope","$timeout","$interval","$http","$window","$mdSidenav","$mdToast","$mdMedia","$log","sgConstant","sgSettings","Resource","Alarm"],angular.module("SOGo.Common").controller("navController",e)}(),function(){"use strict";function e(e){this.folderId=e}e.factory=["$q","$timeout","sgSettings","Resource","User",function(t,n,r,i,o){return angular.extend(e,{$q:t,$timeout:n,$$resource:new i(r.activeUser("folderURL"),r.activeUser()),$User:o}),e}],angular.module("SOGo.Common").factory("Acl",e.factory),e.prototype.$users=function(t){var n,r=this,i=e.$q.defer();if(!this.users){return(angular.isDefined(t)?e.$$resource.userResource(t).fetch(this.folderId,"acls"):e.$$resource.fetch(this.folderId,"acls")).then(function(o){return r.users=[],angular.forEach(o.users,function(i){(n=new e.$User(i)).canSubscribeUser=n.isSubscribed,n.wasSubscribed=n.isSubscribed,n.$rights=angular.bind(n,n.$acl,r.folderId,t),r.users.push(n)}),i.resolve(r.users),r.users})}return i.resolve(this.users),i.promise},e.prototype.$addUser=function(t,n){var r=this,i=e.$q.defer(),o={uid:t.uid};if(!t.uid||_.indexOf(_.map(this.users,"uid"),t.uid)>-1)i.resolve();else{(angular.isDefined(n)?e.$$resource.userResource(n).fetch(this.folderId,"addUserInAcls",o):e.$$resource.fetch(this.folderId,"addUserInAcls",o)).then(function(){t.wasSubscribed=!1,t.userClass=t.isGroup?"normal-group":"normal-user",t.$rights=angular.bind(t,t.$acl,r.folderId,n),r.users.push(t),i.resolve(t)},function(e,t){i.reject(l("An error occured please try again."))})}return i.promise},e.prototype.$removeUser=function(t,n){var r=this,i={uid:t};return(angular.isDefined(n)?e.$$resource.userResource(n).fetch(this.folderId,"removeUserFromAcls",i):e.$$resource.fetch(this.folderId,"removeUserFromAcls",i)).then(function(){var e=_.indexOf(_.map(r.users,"uid"),t);e>=0&&(r.users[e].$shadowRights=null,r.users.splice(e,1))})},e.prototype.$selectAllRights=function(e){_.forEach(e.rights,function(t,n){angular.isNumber(e.rights[n])&&(e.rights[n]=1)})},e.prototype.$resetUsersRights=function(){angular.forEach(this.users,function(e){e.$resetRights()})},e.prototype.$saveUsersRights=function(t){var n=this,r=e.$q.defer(),i=e.$q.defer(),o={action:"saveUserRights"},s=[];if(angular.forEach(this.users,function(e){e.$rightsAreDirty()&&s.push(e.$omit())}),s.length){(angular.isDefined(t)?e.$$resource.userResource(t).save(this.folderId,s,o):e.$$resource.save(this.folderId,s,o)).then(function(){angular.forEach(n.users,function(e){e.$rightsAreDirty()&&(e.$shadowRights=angular.copy(e.rights))}),r.resolve()},r.reject)}else r.resolve();return s=[],angular.forEach(this.users,function(e){!e.wasSubscribed&&e.isSubscribed&&s.push(e.uid)}),s.length?(o={uids:s.join(",")},e.$$resource.fetch(this.folderId,"subscribeUsers",o).then(function(){angular.forEach(n.users,function(e){e.wasSubscribed=e.isSubscribed}),i.resolve()},i.reject)):i.resolve(),e.$q.all([r.promise,i.promise])}}(),function(){"use strict";function e(){this.currentAlarm=null}function t(t,n,r,i){return angular.extend(e,{$timeout:t,$$resource:new r(n.activeUser("folderURL")+"Calendar",n.activeUser()),$toast:i}),e}e.getAlarms=function(){var t=this,n=new Date,r=Math.floor(n.getTime()/1e3);this.$$resource.fetch("","alarmslist?browserTime="+r).then(function(n){var r=n.alarms.sort(function(e,t){var n=parseInt(e[2]);return parseInt(t[2])-n});if(r.length>0){var i=r.pop(),o=new Date,s=Math.floor(o.getTime()/1e3),a=i[0]+"/"+i[1],l=parseInt(i[2]),c=l;l>0&&(c-=s);new Date(1e3*l);var u=angular.bind(t,e.showAlarm,a);t.currentAlarm&&t.$timeout.cancel(t.currentAlarm),t.currentAlarm=t.$timeout(u,1e3*c)}})},e.showAlarm=function(e){var t=this;this.$$resource.fetch(e,"?resetAlarm=yes").then(function(n){function r(e,r,i){e.summary=n.summary,e.reminder="10",e.close=function(){r.hide()},e.snooze=function(){t.$$resource.fetch(i,"view?snoozeAlarm="+e.reminder),r.hide()}}t.$toast.show({position:"top right",hideDelay:0,template:["",'
','
','

{{ summary }}

','
'," ",' ',' ',' ',l("5 minutes")," ",' ',l("10 minutes")," ",' ',l("15 minutes")," ",' ',l("30 minutes")," ",' ',l("45 minutes")," ",' ',l("1 hour")," ",' ',l("1 day")," "," "," ",' ',l("Snooze")," ",' ',l("Close")," ","
","
","
","
"].join(""),locals:{url:e},controller:r}),r.$inject=["scope","$mdToast","url"]})},t.$inject=["$timeout","sgSettings","Resource","$mdToast"],angular.module("SOGo.Common").factory("Alarm",t)}(),function(){"use strict";function e(){function e(e,t){var n,r,i,o,s;return n=e,t&&(n+="@"+t.value),r=""+window.location.href,"/"==(i=ApplicationBaseURL+encodeURIComponent(n))[0]&&(s=(o=r.split("/"))[2],i=o[0]+"//"+s+i),r.startsWith(i)&&!r.endsWith("/logoff")?r:i}function t(t,n,r,i){function o(){var e=null,t=r.get("0xHIGHFLYxSOGo");return t&&t.length>8&&(e=decodeURIComponent(t.substr(8)).base64decode().split(":")),e}return{login:function(r){var s,a=t.defer(),c=r.username,u=r.password,d=r.domain,h=r.rememberLogin?1:0;return r.loginSuffix&&!c.endsWith(r.loginSuffix)&&(c+=loginSuffix,d=!1),r.language&&"WONoSelectionString"!=r.language&&(s=r.language),n({method:"POST",url:"/SOGo/connect",data:{userName:c,password:u,domain:d,language:s,rememberLogin:h}}).then(function(t){var n=t.data;o()?void 0!==n.expire&&void 0!==n.grace?n.expire<0&&n.grace>0?a.reject({grace:n.grace}):n.expire>0&&-1==n.grace?a.reject({expire:n.expire}):a.resolve({cn:n.cn,url:e(c,d)}):a.resolve({url:e(c,d)}):a.reject(l("cookiesNotEnabled"))},function(e){var t,n,r=e.data;t=r&&r.LDAPPasswordPolicyError?(n=r.LDAPPasswordPolicyError)==i.PolicyNoError?l("Wrong username or password."):n==i.PolicyAccountLocked?l("Your account was locked due to too many failed attempts."):l("Login failed due to unhandled error case: ")+n:l("Unhandled error response"),a.reject({error:t})}),a.promise},changePassword:function(e){var s=t.defer(),a=o(),c=r.get("XSRF-TOKEN");return r.remove("XSRF-TOKEN",{path:"/SOGo/"}),n({method:"POST",url:"/SOGo/so/changePassword",headers:{"X-XSRF-TOKEN":c},data:{userName:a[0],password:a[1],newPassword:e}}).then(s.resolve,function(e){var t,n=e.data.LDAPPasswordPolicyError;n?n==i.PolicyNoError?t=l("Password change failed"):n==i.PolicyPasswordModNotAllowed?t=l("Password change failed - Permission denied"):n==i.PolicyInsufficientPasswordQuality?t=l("Password change failed - Insufficient password quality"):n==i.PolicyPasswordTooShort?t=l("Password change failed - Password is too short"):n==i.PolicyPasswordTooYoung?t=l("Password change failed - Password is too young"):n==i.PolicyPasswordInHistory?t=l("Password change failed - Password is in history"):(t=l("Unhandled policy error: %{0}").formatted(n),n=i.PolicyPasswordUnknown):(n=i.PolicyPasswordSystemUnknown,t=_("Unhandled error response")),r.put("XSRF-TOKEN",c,{path:"/SOGo/"}),s.reject(t)}),s.promise}}}this.$get=t,t.$inject=["$q","$http","$cookies","passwordPolicyConfig"]}angular.module("SOGo.Authentication",["ngCookies"]).constant("passwordPolicyConfig",{PolicyPasswordChangeUnsupported:-3,PolicyPasswordSystemUnknown:-2,PolicyPasswordUnknown:-1,PolicyPasswordExpired:0,PolicyAccountLocked:1,PolicyChangeAfterReset:2,PolicyPasswordModNotAllowed:3,PolicyMustSupplyOldPassword:4,PolicyInsufficientPasswordQuality:5,PolicyPasswordTooShort:6,PolicyPasswordTooYoung:7,PolicyPasswordInHistory:8,PolicyNoError:65535}).provider("Authentication",e)}(),function(){"use strict";function e(){}function t(t,n){return angular.extend(e,{$q:t,$modal:n}),e}e.alert=function(e,t){var n=this.$modal.alert().title(e).htmlContent(t).ok(l("OK"));this.$modal.show(n)},e.confirm=function(e,t,n){var r=this.$modal.confirm().title(e).htmlContent(t).ok(n&&n.ok?n.ok:l("OK")).cancel(n&&n.cancel?n.cancel:l("Cancel"));return this.$modal.show(r)},e.prompt=function(e,t,n){function r(t,n){t.title=e,t.name="",t.cancel=function(){s.reject(),n.hide()},t.ok=function(){s.resolve(t.name),n.hide()}}var i=n||{},o=e.asCSSIdentifier(),s=this.$q.defer();return this.$modal.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,template:['','
',' ','

'," "," ",' '," ","
"," ",' '," "+l("Cancel")," ",' '," "+l("OK")," "," ","
","
"].join(""),controller:r}),r.$inject=["scope","$mdDialog"],s.promise},t.$inject=["$q","$mdDialog"],angular.module("SOGo.Common").factory("Dialog",t)}(),function(){"use strict";function e(){return function(e,t,n,r){var i,o,s,a=t,l=n;return e?((i=e.indexOf("<"))>=0&&(o=e.indexOf(">",i))>i&&(e=e.substring(i+1,o)),t||(a=48),s=e.md5(),l&&"none"!=l||(n=r&&r.no_404?"mm":"404"),"https://www.gravatar.com/avatar/"+s+"?s="+a+"&d="+n):""}}angular.module("SOGo.Common").factory("Gravatar",e)}(),function(){"use strict";function e(e,t,n,r,i){angular.extend(this,{_http:e,_q:t,_path:n,_activeUser:r}),angular.extend(this,i),this._path=this._path.replace(/\/$/,"")}e.$factory=["$http","$q",function(t,n){return function(r,i,o){return new e(t,n,r,i,o)}}],angular.module("SOGo.Common").factory("Resource",e.$factory),e.prototype.userResource=function(t){var n=_.compact(this._activeUser.folderURL.split("/"));return t&&n.splice(n.length-1,1,escape(t)),new e(this._http,this._q,"/"+n.join("/"),this._activeUser)},e.prototype.path=function(){var e=[this._path];return arguments.length>0&&Array.prototype.push.apply(e,Array.prototype.slice.call(arguments)),e.join("/")},e.prototype.fetch=function(e,t,n){var r=this._q.defer(),i=[this._path];return e&&i.push(e.split("/")),t&&i.push(t),i=_.compact(_.flatten(i)).join("/"),this._http({method:"GET",url:i,params:n}).then(function(e){return r.resolve(e.data)},r.reject),r.promise},e.prototype.newguid=function(e){var t=this._q.defer(),n=this._path+"/"+e+"/newguid";return this._http.get(n).then(function(e){return t.resolve(e.data)},t.reject),t.promise},e.prototype.create=function(e,t){var n=this._q.defer(),r=this._path+"/"+e;return this._http.post(r,{name:t}).then(function(e){return n.resolve(e.data)},n.reject),n.promise},e.prototype.post=function(e,t,n){var r=this._q.defer(),i=[this._path];return e&&i.push(e),t&&i.push(t),i=_.compact(_.flatten(i)).join("/"),this._http.post(i,n).then(function(e){return r.resolve(e.data)},r.reject),r.promise},e.prototype.save=function(e,t,n){var r=n&&n.action?n.action:"save";return this.post(e,r,t)},e.prototype.download=function(e,t,n,r){function i(e){return e?e.split(";")[1].trim().split("=")[1].replace(/"/g,""):null}this._q.defer();var o=r&&r.type?r.type:"application/zip",s=[this._path];return e&&s.push(e),t&&s.push(t),s=_.compact(_.flatten(s)).join("/"),this._http({method:"POST",url:s,data:n,headers:{accept:o},responseType:"arraybuffer",cache:!1,transformResponse:function(e,t,n){var s,a=null;if(n<200||n>299)throw new Error("Bad gateway");if(e&&(a=new Blob([e],{type:o})),r&&r.filename?s=r.filename:i(t("content-disposition")),!saveAs)throw new Error("To use Resource.download, FileSaver.js must be loaded.");saveAs(a,s)}})},e.prototype.remove=function(e){var t=this._q.defer(),n=this._path+"/"+e+"/delete";return this._http.get(n).then(function(e){return t.resolve(e.data)},t.reject),t.promise}}(),function(){"use strict";function e(e,t){return function(n){t(function(){e.$broadcast("sgFocusOn",n)})}}e.$inject=["$rootScope","$timeout"],angular.module("SOGo.Common").factory("sgFocus",e)}(),function(){"use strict";function e(){function e(e,r){var i=function(t){return function(n,r){e.$apply(function(){t.call(this,n,r)}.bind(this))}},o=function(e){this.id=e.id||guid(),this.key=e.key,this.description=e.description||null,this.context=e.context||null,this.callback=e.callback,this.preventInClass=e.preventInClass,this.args=e.args,this.onKeyUp=!1,this.key.length>1&&(this.lkey=l("key_"+this.key))};o.prototype.clone=function(){return new o(this)};var s=function(){this._hotkeys={},this._hotkeysUp={},this._preventIn=["INPUT","SELECT","TEXTAREA","MD-OPTION"],this._preventInClass=["md-chip-content"],this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this),this._onKeypress=this._onKeypress.bind(this),this.initialize()};return s.prototype.initialize=function(){this.registerHotkey(this.createHotkey({key:"?",description:l("Show or hide this help"),callback:this._toggleCheatSheet.bind(this)})),r.addEventListener("keydown",this._onKeydown,!0),r.addEventListener("keyup",this._onKeyup,!0),r.addEventListener("keypress",this._onKeypress,!0)},s.prototype._invokeHotkeyHandlers=function(e,t,n){for(var r=0,i=n.length;r=0;n--){var r=e.clone();r.key=e.key[n];var i=this._deregisterHotkey(r);void 0!==i&&t.push(i[0])}else t.push(this._deregisterHotkey(e));return t},s.prototype._validateHotkey=function(e){if(!(e instanceof o))throw new TypeError("Hotkeys: Expected a hotkey object be instance of HotKey")},s.prototype._registerKey=function(e){var t=this._hotkeys;return e.onKeyUp&&(t=this._hotkeysUp),t[e.key]=t[e.key]||[],t[e.key].push(e),e},s.prototype._registerKeys=function(e){var t=[];if(angular.isArray(e.key))for(var n=e.key.length-1;n>=0;n--){var r=e.clone();r.id=guid(),r.key=e.key[n],t.push(this._registerKey(r))}else t.push(this._registerKey(e));return t},s.prototype.registerHotkey=function(e){return this._validateHotkey(e),this._registerKeys(e)},s.prototype.registerHotkeyUp=function(e){this._validateHotkey(e),e.onKeyUp=!0,this._registerKeys(e)},s.prototype.createHotkey=function(e){if(null===e.key||void 0===e.key)throw new TypeError('HotKeys: Argument "key" is required');if(null===e.callback||void 0===e.callback)throw new TypeError('HotKeys: Argument "callback" is required');return e.callback=i(e.callback),new o(e)},s.prototype.match=function(e,t){angular.isArray(t)||(t=[t]);var n=this.keyStringFromEvent(e);return Boolean(~t.indexOf(n))},s.prototype._toggleCheatSheet=function(){function e(e,t){e.hotkeys=t,e.closeDialog=function(){s.$modal.hide()}}var t=this;this._cheatSheet?(s.$modal.hide(),this._cheatSheet=null):this._cheatSheet=s.$modal.show({clickOutsideToClose:!0,escapeToClose:!0,template:[""," "," ",' ','
'," {{keys[0].lkey || hotkey}}","
"," {{keys[0].description}}","
","
","
","
"].join(""),controller:e,locals:{hotkeys:t._hotkeys}}).finally(function(){t._cheatSheet=null}),e.$inject=["$scope","hotkeys"]},s}var t={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"escape",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"delete",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},n={42:"*",63:"?"};this.$get=e,e.$inject=["$rootScope","$window"]}function t(e,t){return angular.extend(t,{$modal:e}),new t}t.$inject=["$mdDialog","$sgHotkeys"],angular.module("SOGo.Common").service("sgHotkeys",t).provider("$sgHotkeys",e)}(),function(){"use strict";function e(e){e&&this.init(e)}e.factory=["$q","$log","sgSettings","Resource",function(t,n,r,i){return angular.extend(e,{$q:t,$log:n,$$resource:new i(r.activeUser("folderURL"),r.activeUser()),$query:"",$users:[]}),e}],angular.module("SOGo.Common").factory("User",e.factory),e.$filter=function(t,n,r){var i=e.$$resource,o={search:t};if(r&&r.dry)r&&r.uid&&(i=e.$$resource.userResource(r.uid));else{if(!t)return e.$users.splice(0,e.$users.length),e.$q.when(e.$users);if(e.$query==t)return e.$q.when(e.$users);e.$query=t}return i.fetch(null,"usersSearch",o).then(function(t){var i,o,s,a,l=function(e){return this.uid==e.uid};for(r?r.dry?a=[]:r.results&&(a=r.results):a=e.$users,i=n?_.filter(t.users,function(e){return!_.find(n,_.bind(l,e))}):t.users,o=a.length-1;o>=0;o--)s=a[o],_.find(i,_.bind(l,s))||a.splice(o,1);return _.forEach(i,function(t,n){if(_.isUndefined(_.find(a,_.bind(l,t)))){var r=new e(t);a.splice(n,0,r)}}),e.$log.debug(a),a})},e.prototype.init=function(e){angular.extend(this,e),this.$$shortFormat||(this.$$shortFormat=this.$shortFormat()),this.$$image||(this.$$image=this.image),this.$avatarIcon=this.$isGroup()||this.$isSpecial()?"group":"person",this.empty=" "},e.prototype.$fullname=function(){var e=this.cn||this.uid;return this.c_info&&(e+=" ("+this.c_info.split("\n").join("; ")+")"),e},e.prototype.$shortFormat=function(e){var t=this.$fullname(),n=this.c_email;return!(e&&!1===e.email)&&n&&t!=n&&(t+=" <"+n+">"),t},e.prototype.$acl=function(t,n){var r=this,i=e.$q.defer(),o={uid:this.uid};if(this.$shadowRights)i.resolve(this.rights);else{(angular.isDefined(n)?e.$$resource.userResource(n).fetch(t,"userRights",o):e.$$resource.fetch(t,"userRights",o)).then(function(e){return r.rights=e,r.$shadowRights=angular.copy(e),i.resolve(e),e})}return i.promise},e.prototype.$isGroup=function(){return this.isGroup||this.userClass&&"normal-group"==this.userClass},e.prototype.$isAnonymous=function(){return"anonymous"==this.uid},e.prototype.$isSpecial=function(){return this.userClass&&"public-user"==this.userClass},e.prototype.$confirmRights=function(e){var t=!1;return!this.$confirmation&&(_.some(_.values(this.rights))&&("anonymous"==this.uid?"AddressBook"==e.constructor.name?t=l('Potentially anyone on the Internet will be able to access your address book "%{0}", even if they do not have an account on this system. Is this information suitable for the public Internet?',e.name):"Calendar"==e.constructor.name&&(t=l('Potentially anyone on the Internet will be able to access your calendar "%{0}", even if they do not have an account on this system. Is this information suitable for the public Internet?',e.name)):"anyone"!=this.uid&&""!=this.uid||("AddressBook"==e.constructor.name?t=l('Any user with an account on this system will be able to access your address book "%{0}". Are you certain you trust them all?',e.name):"Calendar"==e.constructor.name?t=l('Any user with an account on this system will be able to access your calendar "%{0}". Are you certain you trust them all?',e.name):"Mailbox"==e.constructor.name&&(t=l('Any user with an account on this system will be able to access your mailbox "%{0}". Are you certain you trust them all?',e.name)))),this.$confirmation=t,t)},e.prototype.$rightsAreDirty=function(){return this.rights&&!_.isEqual(this.rights,this.$shadowRights)},e.prototype.$resetRights=function(e){var t=this;e?_.map(_.keys(this.rights),function(e){angular.isString(t.rights[e])?t.rights[e]="None":t.rights[e]=0}):this.$shadowRights&&(this.rights=angular.copy(this.$shadowRights))},e.prototype.$folders=function(t){var n=this,r=e.$q.defer(),i={type:t};return this.$$folders?r.resolve(this.$$folders):e.$$resource.userResource(this.uid).fetch(null,"foldersSearch",i).then(function(e){n.$$folders=e.folders,r.resolve(e.folders)}),r.promise},e.prototype.$omit=function(){var e={};return angular.forEach(this,function(t,n){"constructor"!=n&&"$"!=n[0]&&(e[n]=t)}),e},e.prototype.toString=function(){return"[User "+this.c_email+"]"}}(),function(){"use strict";function e(){function e(e,t,n,r){var i,o=t.find("img"),s=t.find("md-icon"),a=angular.element(s[0]),l=angular.element(s[1]);n.size&&(o.attr("width",n.size),o.attr("height",n.size),a.css("font-size",n.size+"px"),l.css("font-size",parseInt(.4*n.size)+"px")),angular.isDefined(n.ngDisabled)&&(i=e.$watch(n.ngDisabled,function(e){n.disabled&&l.css({display:"block"}),i()})),r.img=o,r.genericImg=a}return{restrict:"AE",scope:{},bindToController:{size:"@",email:"=sgEmail",src:"=sgSrc"},transclude:!0,template:['
'," ",' ',' ',"
"].join(""),link:e,controller:"sgAvatarImageController",controllerAs:"vm"}}function t(e,t,n,r,i,o){function s(e){var t=o(e,u.size,i.defaults.SOGoAlternateAvatar);n({method:"GET",url:t,cache:!0,headers:{Accept:"image/*"}}).then(function(){u.url||(u.url=t,u.urlEmail=e,l())},function(){a()})}function a(){u.url=null,u.urlEmail=null,u.img.addClass("ng-hide"),u.genericImg.removeClass("ng-hide")}function l(){u.genericImg.addClass("ng-hide"),u.img.removeClass("ng-hide")}function c(){t.addClass("sg-avatar-image--zoomable"),d=function(){t.toggleClass("sg-avatar-image--zoom")},t.on("click",d)}var u,d;u=this,e.$on("$destroy",function(){d&&t.off("click",d)}),e.$watch(function(){return u.email},function(e,t){e&&u.urlEmail!=e?(a(),i.defaults.SOGoGravatarEnabled&&s(e)):e||a()}),"sg-src"in t[0].attributes&&e.$watch(function(){return u.src},function(e){e&&(u.url=e,u.urlEmail=""+u.email,c(),l())})}t.$inject=["$scope","$element","$http","$q","Preferences","Gravatar"],angular.module("SOGo.Common").directive("sgAvatarImage",e).controller("sgAvatarImageController",t)}(),function(){"use strict";function e(e,t,n,r){function i(i,s){return i.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()}),function(i,s,a,l){function c(e,t,n,r,i){var o;if(angular.isDefined(r)){if(!(o=e(r)).constant)throw Error("Expected constant expression for `"+n+"`, but saw `"+r+"`.");return o(t)}return i}function u(e){s[0].hasAttribute("disabled")||i.$apply(function(){var t=l.$viewValue==h?m:h;l.$setViewValue(t,e&&e.type),l.$render()})}function d(){l.$viewValue==h?s.addClass(o):s.removeClass(o)}var h=c(e,i,"sgTrueValue",a.sgTrueValue,!0),m=c(e,i,"sgFalseValue",a.sgFalseValue,!1);l=l||r.fakeNgModel(),n(s),t.expectWithText(s,"aria-label"),s.on("click",u),l.$render=d}}var o="sg-checked";return{restrict:"E",replace:!0,transclude:!0,require:"?ngModel",template:['