",' ',' error_outline'," "+l("An error occured while importing contacts.")+"","
",""].join(""),position:"top right",hideDelay:3e3})}}),e.close=function(){b.hide()}}g.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:"UIxContactsImportDialog",controller:c,controllerAs:"$CardsImportDialogController",locals:{folder:b}}),c.$inject=["scope","$mdDialog","folder"]}function D(a){function b(a,b){function c(){a.hide()}this.addressbook=b,this.close=c}g.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,templateUrl:a.id+"/links",controller:b,controllerAs:"links",locals:{addressbook:a}}),b.$inject=["$mdDialog","addressbook"]}function E(a){function b(a,b,c){function d(){f.addressbook.$save().then(function(){c.init(f.addressbook.$omit()),b.hide()})}function e(){b.cancel()}var f=this;f.addressbook=new q(c.$omit()),f.saveProperties=d,f.close=e}g.show({templateUrl:a.id+"/properties",controller:b,controllerAs:"properties",clickOutsideToClose:!0,escapeToClose:!0,locals:{srcAddressBook:a}})["catch"](function(){}),b.$inject=["$scope","$mdDialog","srcAddressBook"]}function F(a){a.$acl.$users().then(function(){g.show({templateUrl:a.id+"/UIxAclEditor",controller:"AclController",controllerAs:"acl",clickOutsideToClose:!0,escapeToClose:!0,locals:{usersWithACL:a.$acl.users,User:t,folder:a}})})}function G(a){console.debug("subscribeToFolder "+a.owner+a.name),q.$subscribe(a.owner,a.name).then(function(a){h.show(h.simple().content(l("Successfully subscribed to address book")).position("top right").hideDelay(3e3))})}function H(a,b){return b.id!=a.id&&(b.isOwned||b.acls.objectCreator)}function I(b,c,d){var e,f,g,i,j,k,m;e=c.id,j=!1,f=b.$selectedCards(),0===f.length&&(f=[b.$selectedCard()]),g=_.filter(f,function(a){return a.$isCard()}),g.length!=f.length&&h.show(h.simple().content(l("Lists can't be moved or copied.")).position("top right").hideDelay(2e3)),g.length&&("copy"==d?(k=b.$copyCards(g,e),m=l("%{0} card(s) copied",g.length)):(k=b.$moveCards(g,e),m=l("%{0} card(s) moved",g.length),i=_.map(g,"id"),j=b.selectedCard&&i.indexOf(b.selectedCard)>=0),k.then(function(){j&&a.go("app.addressbook"),h.show(h.simple().content(m).position("top right").hideDelay(2e3))}))}var J=this,K=[];J.activeUser=s.activeUser,J.service=q,J.select=w,J.newAddressbook=x,J.edit=y,J.revertEditing=z,J.save=A,J.confirmDelete=B,J.importCards=C,J.showLinks=D,J.showProperties=E,J.share=F,J.subscribeToFolder=G,J.isDroppableFolder=H,J.dragSelectedCards=I,v(K),b.$on("$destroy",function(){_.forEach(K,function(a){n.deregisterHotkey(a)})})}a.$inject=["$state","$scope","$rootScope","$stateParams","$timeout","$window","$mdDialog","$mdToast","$mdMedia","$mdSidenav","FileUploader","sgConstant","sgHotkeys","sgFocus","Card","AddressBook","Dialog","sgSettings","User","stateAddressbooks"],angular.module("SOGo.ContactsUI").controller("AddressBooksController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n){function o(a){a.push(i.createHotkey({key:"backspace",description:l("Delete"),callback:function(a){0===E.currentFolder.$selectedCount()&&C(),a.preventDefault()}})),_.forEach(a,function(a){i.registerHotkey(a)})}function p(a){return angular.isString(a)?{value:a}:a}function q(){var a=E.card.$addOrgUnit("");j("orgUnit_"+a)}function r(){E.card.birthday=new Date}function s(){E.card.$addScreenName("")}function t(){var a=E.card.$addEmail("");j("email_"+a)}function u(){var a=E.card.$addPhone("");j("phone_"+a)}function v(){var a=E.card.$addUrl("","");j("url_"+a)}function w(){var a=E.card.$addAddress("","","","","","","","");j("address_"+a)}function x(a,b){return a.length