VaultItemBaseDisplay.prototype.isAccepted=function(){return!1};VaultItemBaseDisplay.prototype.isDeclined=function(){return!1};VaultItemBaseDisplay.prototype.isPending=function(){return!1};
SharedFolderItem=function(a,b){if(!a&&b.sharedata){var c=atob(b.sharedata),d=[];bg.parsemobile(c,c.length,100,0,null,[],null,null,null,null,null,null,!0,!1,null,null,null,null,null,null,null,null,d,null,null,null,null,null,null,null,null,!1);1===d.length&&$.extend(b,d[0]);a=new SharedGroup({group:b.decsharename||b.name,aid:b.shareid,shareid:b.shareid},b)}else $.extend(a._shareInfo,b);VaultItemBaseDisplay.call(this,a)};SharedFolderItem.prototype=Object.create(VaultItemBaseDisplay.prototype);
SharedFolderItem.prototype.constructor=SharedFolderItem;var SharedItem=function(a,b){VaultItemBaseDisplay.call(this,a);VaultItemBase.call(this,b);this._itemModelDisplay=a.newDisplayObject()};SharedItem.prototype=Object.create(VaultItemBase.prototype);$.extend(SharedItem.prototype,VaultItemBaseDisplay.prototype);SharedItem.prototype.constructor=SharedItem;SharedItem.prototype.updateTextElements=function(){this._itemModelDisplay.updateTextElements()};SharedItem.prototype.toString=function(){return this._model.toString()};
SharedItem.prototype.getID=function(){return this._model.getID()};SharedItem.prototype.getDialogActions=function(){for(var a=[],b=this._itemModelDisplay.getItemButtonActions(),c=0,d=b.length;c<d;++c)this._itemModelDisplay.isExcludedAction(b[c])||a.push(b[c]);return a};
PendingReceivedSharedItem=function(a){VaultItemBase.call(this,a);var b=null;this.getKey=function(){if(null===b){var a=new bg.RSAKey;LPProxy.parsePrivateKey(a);b=a.decrypt(this._data.sharekeyenchex)}return b};this.decrypt=function(){var a=this.getKey();this._name=LPProxy.decrypt(this._data.sharename,a);this._username=LPProxy.decrypt(this._data.username,a);this._sender=bg.AES.hex2bin(this._data.sharerusername)}};PendingReceivedSharedItem.prototype=Object.create(VaultItemBase.prototype);
PendingReceivedSharedItem.prototype.constructor=PendingReceivedSharedItem;PendingReceivedSharedItem.prototype.getDisplayClass=function(){return PendingReceivedSharedItemDisplay};var PendingReceivedSharedItemDisplay=function(a){VaultItemBaseDisplay.call(this,a);a.decrypt()};PendingReceivedSharedItemDisplay.prototype=Object.create(VaultItemBaseDisplay.prototype);PendingReceivedSharedItemDisplay.prototype.constructor=PendingReceivedSharedItemDisplay;
PendingReceivedSharedItemDisplay.prototype.isPending=function(){return!0};PendingSentSharedItem=function(a,b){SharedItem.call(this,a,b)};PendingSentSharedItem.prototype=Object.create(SharedItem.prototype);PendingSentSharedItem.prototype.constructor=PendingSentSharedItem;PendingSentSharedItem.prototype.getEmailLabel=function(){return Strings.Vault.SHARED_WITH};PendingSentSharedItem.prototype.isPending=function(){return!0};
PendingSentSharedItem.prototype.getItemButtonActions=function(){return[Constants.ACTION_EDIT,Constants.ACTION_SHARE,Constants.ACTION_EMAIL,Constants.ACTION_CANCEL]};PendingSentSharedItem.prototype.getContextMenuItems=function(a){var b=[];a||(b.push(new LPTools.ContextMenuItem(Constants.ACTION_EDIT)),b.push(new LPTools.ContextMenuItem(Constants.ACTION_SHARE)),b.push(new LPTools.ContextMenuItem(Constants.ACTION_EMAIL)),b.push(new LPTools.ContextMenuItem(Constants.ACTION_CANCEL)));return b};
PendingSentSharedItem.prototype.handleClickEvent=function(a){switch(a){case Constants.ACTION_EMAIL:this.resendInvitation();break;case Constants.ACTION_CANCEL:this.cancel();break;default:SharedItem.prototype.handleClickEvent.apply(this,arguments)}};
PendingSentSharedItem.prototype.resendInvitation=function(){var a=function(){Topics.get(Topics.SUCCESS).publish(Strings.translateString("Pending invitation for %1 was resent to %2",this.toString(),this.getEmail()))};return function(){LPRequest.makeLockItemUpdateRequest(LPProxy.resendShareInvitation,{params:{emails:this.getEmail(),aids:this.getID()},items:this,success:this.createHandler(a)})}}();
PendingSentSharedItem.prototype.cancel=function(){var a=function(){this.destruct()};return function(){LPRequest.makeLockItemUpdateRequest(LPProxy.unshareItem,{params:{id:this.getID(),email:this.getEmail()},items:this,success:this.createHandler(a),successMessage:Strings.translateString("Pending invitation for %1 was cancelled for %2",this.toString(),this.getEmail()),confirm:{title:Strings.Vault.CANCEL_INVITE,text:Strings.translateString("Are you sure you want to cancel this invitation?")},requestSuccessOptions:{closeDialog:!1}})}}();
AcceptedSentSharedItem=function(a,b){SharedItem.call(this,a,b)};AcceptedSentSharedItem.prototype=Object.create(SharedItem.prototype);AcceptedSentSharedItem.prototype.constructor=AcceptedSentSharedItem;AcceptedSentSharedItem.prototype.getEmailLabel=function(){return Strings.Vault.SHARED_WITH};AcceptedSentSharedItem.prototype.isAccepted=function(){return!0};AcceptedSentSharedItem.prototype.getItemButtonActions=function(){return[Constants.ACTION_EDIT,Constants.ACTION_SHARE,Constants.ACTION_REVOKE]};
AcceptedSentSharedItem.prototype.getContextMenuItems=function(a){var b=[];a||(b.push(new LPTools.ContextMenuItem(Constants.ACTION_EDIT)),b.push(new LPTools.ContextMenuItem(Constants.ACTION_SHARE)),b.push(new LPTools.ContextMenuItem(Constants.ACTION_REVOKE)));return b};AcceptedSentSharedItem.prototype.handleClickEvent=function(a){switch(a){case Constants.ACTION_REVOKE:this.revoke();break;default:SharedItem.prototype.handleClickEvent.apply(this,arguments)}};
AcceptedSentSharedItem.prototype.revoke=function(){var a=function(){this.destruct()};return function(){LPRequest.makeLockItemUpdateRequest(LPProxy.unshareItem,{params:{id:this.getID(),email:this.getEmail()},items:this,success:this.createHandler(a),confirm:{title:Strings.Vault.REVOKE,text:Strings.translateString("Are you sure you want to revoke access for %1? They will no longer be able to access this item.",this.getEmail())},requestSuccessOptions:{closeDialog:!1}})}}();
var AcceptedReceivedSharedItem=function(a,b){SharedItem.call(this,a,b)};AcceptedReceivedSharedItem.prototype=Object.create(SharedItem.prototype);AcceptedReceivedSharedItem.prototype.constructor=AcceptedReceivedSharedItem;AcceptedReceivedSharedItem.prototype.getEmailLabel=function(){return Strings.Vault.SHARED_BY};AcceptedReceivedSharedItem.prototype.isAccepted=function(){return!0};AcceptedReceivedSharedItem.prototype.getItemButtonActions=function(){return[Constants.ACTION_EDIT,Constants.ACTION_REMOVE]};
AcceptedReceivedSharedItem.prototype.getContextMenuItems=function(a){var b=[];a||b.push(new LPTools.ContextMenuItem(Constants.ACTION_EDIT));b.push(new LPTools.ContextMenuItem(Constants.ACTION_REMOVE));return b};AcceptedReceivedSharedItem.prototype.handleClickEvent=function(a,b){switch(a){case Constants.ACTION_REMOVE:SharedItem.prototype.handleClickEvent.call(this,Constants.ACTION_DELETE,b);break;default:SharedItem.prototype.handleClickEvent.apply(this,arguments)}};
DeclinedSentSharedItem=function(a,b){SharedItem.call(this,a,b)};DeclinedSentSharedItem.prototype=Object.create(SharedItem.prototype);DeclinedSentSharedItem.prototype.constructor=DeclinedSentSharedItem;DeclinedSentSharedItem.prototype.getEmailLabel=function(){return Strings.Vault.SHARED_WITH};DeclinedSentSharedItem.prototype.isDeclined=function(){return!0};DeclinedSentSharedItem.prototype.getItemButtonActions=PendingSentSharedItem.prototype.getItemButtonActions;
DeclinedSentSharedItem.prototype.getContextMenuItems=PendingSentSharedItem.prototype.getContextMenuItems;SharingContainer=function(a,b){Container.call(this,a,b)};SharingContainer.prototype=Object.create(Container.prototype);SharingContainer.prototype.constructor=SharingContainer;
IndividualShareContainer=function(){var a=function(a){for(var c=[],d=[],e=[],f=0,h=a.length;f<h;++f){var g=a[f];g.isAccepted()?d.push(g):g.isPending()?c.push(g):e.push(g)}a=[];0<c.length&&a.push(new SharedSiteGroup(Strings.translateString("Pending"),"pendingFolder",c));0<e.length&&a.push(new SharedSiteGroup(Strings.translateString("Declined"),"declinedFolder",e));0<d.length&&a.push(new SharedSiteGroup(Strings.translateString("Accepted"),"acceptedFolder",d));return a};return function(b,c){SharingContainer.call(this,
a(b),c)}}();IndividualShareContainer.prototype=Object.create(SharingContainer.prototype);IndividualShareContainer.prototype.constructor=IndividualShareContainer;var SharedFolderContainer=function(a,b){this.adminGroup=new SharedSiteGroup(Strings.translateString("Administrator"));this.defaultGroup=new SharedSiteGroup(Strings.translateString("Non-Administrator"));SharingContainer.call(this,[this.adminGroup,this.defaultGroup],b);for(var c=0,d=a.length;c<d;++c)this.addChild(a[c])};
SharedFolderContainer.prototype=Object.create(SharingContainer.prototype);SharedFolderContainer.prototype.constructor=SharedFolderContainer;SharedFolderContainer.prototype.addChild=function(){var a=function(a){a._model.canAdminister()?this.adminGroup.addChild(a):this.defaultGroup.addChild(a)};return function(){this.checkForStateChange(a,arguments)}}();SharedSiteGroup=function(a,b,c){DefaultGroupDisplay.call(this,new DummyGroup(a),c);this._css=b||null};SharedSiteGroup.prototype=Object.create(DefaultGroupDisplay.prototype);
SharedSiteGroup.prototype.constructor=SharedSiteGroup;var Invitee=function(a){VaultItemBaseDisplay.call(this,this);VaultItemBase.call(this,a)};Invitee.prototype=Object.create(VaultItemBase.prototype);$.extend(Invitee.prototype,VaultItemBaseDisplay.prototype);Invitee.prototype.constructor=Invitee;Invitee.prototype.setEditable=function(a){this.editable=a};
Invitee.prototype.edit=function(){if(this.editable){var a=LPTools.createElement("input",{"class":"dialogInput",type:"text",spellcheck:!1});a.value=this.getName();var b=this,c=$(a);c.bind("blur",function(){b.setName(a.value);a.parentElement.insertBefore(b._element,a);a.parentElement.removeChild(a);b.updateTextElements();c.unbind()});this._element.parentElement.insertBefore(a,this._element);this._element.parentElement.removeChild(this._element);a.focus()}};
Invitee.prototype.build=function(){var a=VaultItemBaseDisplay.prototype.build.apply(this,arguments);a.setAttribute("vaultaction",Constants.ACTION_EDIT);return a};Invitee.prototype.remove=function(){this._parent.removeChild(this);Topics.get(Topics.REMOVED_SHARED_FOLDER_USER).publish(this)};Invitee.prototype.handleClickEvent=function(a){switch(a){case Constants.ACTION_REMOVE:this.remove();break;default:VaultItemBaseDisplay.prototype.handleClickEvent.apply(this,arguments)}};
Invitee.prototype.buildItemIconElement=function(){return null};Invitee.prototype.getItemButtonActions=function(){return[Constants.ACTION_REMOVE]};Invitee.prototype.getContextMenuItems=function(){return[new LPTools.ContextMenuItem(Constants.ACTION_REMOVE)]};Invitee.prototype.getEmail=function(){return this._data.email};Invitee.prototype.getName=function(){return this._data.email};Invitee.prototype.setName=function(a){this._data.email=a};
var SharedFolderMember=function(a,b){Invitee.call(this,a);this._pending=!1;this._sharedGroup=b;this._checkboxes={}};SharedFolderMember.prototype=Object.create(Invitee.prototype);SharedFolderMember.prototype.constructor=SharedFolderMember;
SharedFolderMember.prototype.buildCheckbox=function(a,b){var c=LPTools.createElement("td"),d=LPTools.createElement("input",{"class":"checkbox",type:"checkbox"});this.isMissingSharedFolderUser()&&d.setAttributeNode(document.createAttribute("disabled"));this._checkboxes[a]={element:d,invert:b};c.appendChild(d);c.appendChild(LPTools.createElement("label","noText"));return c};
SharedFolderMember.prototype.updatePermissions=function(a){this._data.readonly=a.readonly;this._data.can_administer=a.canadminister;this._data.give=a.give};SharedFolderMember.prototype.isModified=function(){for(var a in this._checkboxes)if(this._data[a]!==this.getCheckboxValue(a))return!0;return!1};SharedFolderMember.prototype.getCheckboxValue=function(a){var b=this._checkboxes[a],c=b.invert?"0":"1",b=b.invert?"1":"0";return this._checkboxes[a].element.checked?c:b};
SharedFolderMember.prototype.build=function(a){if(this._pending)return Invitee.prototype.build.apply(this,arguments);var b=null,b=LPTools.createElement("tr","settingsRow"),c=this.createTextElement("td",this.getName);if(LPProxy.isEnterpriseUser()&&"1"===this._data.external){var d=LPTools.createElement("p","small infoLabel",Strings.Vault.OUTSIDE_ENT);d.insertBefore(LPTools.createElement("i","badge warn small"),d.firstChild);c.appendChild(d)}this.isMissingSharedFolderUser()&&(d=LPTools.createElement("p",
"small infoLabel",Strings.Vault.NO_SHARING_KEYS),d.insertBefore(LPTools.createElement("i","badge danger small"),d.firstChild),c.appendChild(d));b.appendChild(c);b.appendChild(this.buildCheckbox("readonly"));LPProxy.isEnterpriseUser()&&b.appendChild(this.buildCheckbox("can_administer"));b.appendChild(this.buildCheckbox("give",!0));b.appendChild(LPTools.createElement("td",void 0,"1"===this._data.accepted?"Yes":"No"));c=LPTools.createElement("td","actionCell");d=LPTools.createElement("div","centerItemButtons");
c.appendChild(d);for(var e=this.getItemButtonActions(),f=0;f<e.length;++f)d.appendChild(LPTools.buildItemButton(e[f]));b.appendChild(c);return b};var checkboxHandler=function(a){var b=a.target.previousElementSibling;b.checked=!b.checked;a.stopPropagation()};
SharedFolderMember.prototype.postBuild=function(a,b){Invitee.prototype.postBuild.apply(this,arguments);for(var c in this._checkboxes){var d=this._checkboxes[c];d.element.checked=this._data[c]===(d.invert?"0":"1");this.isMissingSharedFolderUser()||LPPlatform.addEventListener(d.element.nextElementSibling,"click",checkboxHandler)}};SharedFolderMember.prototype.getName=function(){var a=VaultItemBase.prototype.getName.apply(this);if(void 0===a||null===a||0===a.length)a=this._data.username;return a};
SharedFolderMember.prototype.setName=function(a){this._data.username=a};SharedFolderMember.prototype.getID=function(){return this._data.uid};SharedFolderMember.prototype.getShareID=function(){return this._sharedGroup.getID()};SharedFolderMember.prototype.setID=function(a){this._data.uid=a};SharedFolderMember.prototype.isMissingSharedFolderUser=function(){return"1"===this._data.msfuser};
SharedFolderMember.prototype.getContextMenuItems=function(){var a=Invitee.prototype.getContextMenuItems.apply(this,arguments);this._pending||a.unshift(new LPTools.ContextMenuItem(Constants.ACTION_EDIT,{text:Strings.Vault.EDIT_ACCESS}));return a};SharedFolderMember.prototype.getItemButtonActions=function(){var a=Invitee.prototype.getItemButtonActions.apply(this,arguments);!this._pending&&!this.isMissingSharedFolderUser()&&a.unshift(Constants.ACTION_EDIT);return a};
SharedFolderMember.prototype.handleClickEvent=function(a,b){switch(a){case Constants.ACTION_EDIT:this._pending||Topics.get(Topics.EDIT_SHARED_FOLDER_ACCESS).publish(this);break;default:Invitee.prototype.handleClickEvent.apply(this,arguments)}};
SharedFolderMember.prototype.remove=function(){this._pending?Invitee.prototype.remove.apply(this,arguments):LPRequest.makeUpdateRequest(LPProxy.removeSharedFolderMember,{parameters:this,success:function(a){return function(){a._parent.removeChild(a);a.publishSuccess(Strings.Vault.REMOVED);Topics.get(Topics.REMOVED_SHARED_FOLDER_USER).publish(a)}}(this),confirm:{title:Strings.Vault.REMOVE,text:Strings.translateString("Are you sure you want to remove %1? They will no longer be able to access items in this folder.",
this.toString())}})};SharedFolderUser=function(a,b){SharedFolderMember.call(this,a,b);this._data.type=this._data.type||"companyuser"};SharedFolderUser.prototype=Object.create(SharedFolderMember.prototype);SharedFolderUser.prototype.constructor=SharedFolderUser;SharedFolderUser.prototype.toString=function(){return Strings.Vault.USER+": "+this.getName()};SharedFolderUserGroup=function(a,b){SharedFolderMember.call(this,a,b);this._data.type=this._data.type||"group"};SharedFolderUserGroup.prototype=Object.create(SharedFolderMember.prototype);
SharedFolderUserGroup.prototype.constructor=SharedFolderUserGroup;SharedFolderUserGroup.prototype.newDisplayObject=function(){var a=new SharedFolderUserGroup(this._data,this._sharedGroup);a._pending=this._pending;return a};SharedFolderUserGroup.prototype.toString=function(){return Strings.Vault.USER_GROUP+": "+this.getName()};SharedFolderUserGroup.prototype.getID=function(a){var b=SharedFolderMember.prototype.getID.apply(this,arguments);return a?"group:"+b:b};
(function(){var a=function(a,b){return VaultItemBase.prototype.sortByTextFunction(a,b,"getEmail",!0)},b=function(a,b){return VaultItemBase.prototype.sortByTextFunction(a,b,"getEmail",!1)};SharingContainer.prototype.displayItemsInSpecifiedGroup=function(){return!1};SharingContainer.prototype.buildItems=function(a,b,e){delete e.sortFunction;Container.prototype.buildItems.apply(this,arguments)};SharingContainer.prototype.sortByEmail=function(c){c=c?a:b;if(c!==this.sortFunction){this._buildOptions.sortFunction=
c;for(var d=this.getChildren(),e=0,f=d.length;e<f;++e)d[e].sortChildren(c)}};SharingContainer.prototype.sortByName=function(a){a=a?this.sortByNameAsc:this.sortByNameDesc;if(a!==this._buildOptions.sortFunction){this._buildOptions.sortFunction=a;for(var b=this.getChildren(),e=0,f=b.length;e<f;++e)b[e].sortChildren(a)}};SharingContainer.prototype.sortByFolder=function(){};SharingContainer.prototype.sortItemsByMostRecent=function(){if(this._buildOptions.sortFunction!==this.sortByMostRecent){this._buildOptions.sortFunction=
this.sortByMostRecent;for(var a=this.getChildren(),b=0,e=a.length;b<e;++b)a[b].sortChildren(this.sortByMostRecent)}};SharingContainer.prototype.removeChild=function(){}})();
(function(){var a=function(){return this.buildItemInfoTextElement([LPTools.createElement("p","small infoLabel",this.getEmailLabel()),this.createTextElement("p",this.getEmail,"small")])};SharedItem.prototype.getItemClass=function(){return VaultItemBaseDisplay.prototype.DISPLAY_LIST};SharedItem.prototype.isDraggable=function(){return!1};SharedItem.prototype.buildItemInfoTextElements=function(b){var c=[];LPTools.getOption(b,"minimized",!1)||(c=this._itemModelDisplay.buildItemInfoTextElements(),c.splice(1,
1));c.push(a.call(this));return c};SharedItem.prototype.getEmail=function(){return this._data.email};SharedItem.prototype.getLastTouchValue=function(){return this._data.sharedate};SharedItem.prototype.buildItemIconElement=function(a){return!LPTools.getOption(a,"minimized",!1)?this._itemModelDisplay.buildItemIconElement():null};PendingReceivedSharedItemDisplay.prototype.getEmailLabel=function(){return Strings.Vault.SHARED_BY};PendingReceivedSharedItemDisplay.prototype.getLaunchElementAction=function(){return Constants.ACTION_ACCEPT};
PendingReceivedSharedItemDisplay.prototype.buildItemIconElement=function(){var a=VaultItemBaseDisplay.prototype.buildItemIconElement.apply(this,arguments);this.bigImg||a.setAttribute("class",a.getAttribute("class")+" smallIcon");return a};PendingReceivedSharedItemDisplay.prototype.getIconElement=AccountDisplay.prototype.getIconElement;PendingReceivedSharedItemDisplay.prototype.buildItemInfoTextElements=function(){var b=VaultItemBaseDisplay.prototype.buildItemInfoTextElements.apply(this,arguments);
b.push(a.call(this));return b};PendingReceivedSharedItemDisplay.prototype.getContextMenuItems=function(a){var c=VaultItemBaseDisplay.prototype.getContextMenuItems.apply(this,arguments);a||(c.push(new LPTools.ContextMenuItem(Constants.ACTION_ACCEPT)),c.push(new LPTools.ContextMenuItem(Constants.ACTION_REJECT)));return c};PendingReceivedSharedItemDisplay.prototype.getEmail=function(){return this._model._sender};PendingReceivedSharedItemDisplay.prototype.getItemButtonActions=function(){return[Constants.ACTION_ACCEPT,
Constants.ACTION_REJECT]};PendingReceivedSharedItemDisplay.prototype.getUsernameValue=function(){return this._model.getUsername()};PendingReceivedSharedItemDisplay.prototype.createSecondaryNameTextElement=function(){if(this.getUsernameValue())return this.createTextElement("p",this.getUsernameValue,"small infoLabel")}})();
(function(){PendingReceivedSharedItem.prototype.getID=function(){return this._data.id};PendingReceivedSharedItem.prototype.getName=function(){return this._name||""};PendingReceivedSharedItem.prototype.getUsername=function(){return this._username||""};PendingReceivedSharedItem.prototype.getLastTouch=function(){return this._data.sharedate};PendingReceivedSharedItem.prototype.getSearchTokens=function(){return[this.getName(),this.getUsername(),this._sender]};PendingReceivedSharedItem.prototype.toString=
function(){return Strings.Vault.PENDING_SHARE+": "+this.getName()};PendingReceivedSharedItem.prototype.handleClickEvent=function(a){switch(a){case Constants.ACTION_REJECT:this.reject();break;case Constants.ACTION_ACCEPT:Topics.get(Topics.ACCEPT_SHARE).publish(this);break;default:VaultItemBase.prototype.handleClickEvent.apply(this,arguments)}};PendingReceivedSharedItem.prototype.getFormData=function(){this.decrypt();var a={};a.name=this.getName();a.group="(Accepted Share Offers)";a.message=this._data.sharemessage;
return a};PendingReceivedSharedItem.prototype.accept=function(a,c){LPProxy.logEvent("v_apt");LPRequest.makeRequest(LPProxy.acceptShare,{params:$.extend(a,{pendingShare:this._data,key:c.getKey(),pendingShareKey:this.getKey()})})};var a=function(){Topics.get(Topics.REFRESH_NOTIFICATIONS).publish();this.deleteUpdates(!1)};PendingReceivedSharedItem.prototype.reject=function(){LPProxy.logEvent("v_rjt");LPRequest.makeLockItemUpdateRequest(LPProxy.rejectShare,{params:{id:this.getID()},items:this,success:this.createHandler(a),
confirm:{title:Strings.Vault.REJECT,text:Strings.translateString("Are you sure you want to reject %1?",this.toString())}})}})();
(function(){SharedFolderItem.prototype.createSecondaryNameTextElement=function(){if("1"===this._model._shareInfo.invisible){var a=LPTools.createElement("p","small infoLabel",Strings.translateString("Shared by Policy"));a.insertBefore(LPTools.createElement("i","badge success small"),a.firstChild);return a}if(this._model.isDeleted())return a=LPTools.createElement("p","small infoLabel",Strings.translateString("Deleted")),a.insertBefore(LPTools.createElement("i","badge danger small"),a.firstChild),a;
if(this._model.isDownloaded())return null;a=LPTools.createElement("p","small infoLabel",Strings.Vault.NOT_DOWNLOADED);a.insertBefore(LPTools.createElement("i","badge warn small"),a.firstChild);return a};SharedFolderItem.prototype.updateView=function(){this.rebuild()||VaultItemBaseDisplay.prototype.update.apply(this,arguments);var a=this.getContainer();a&&a.applyFilter(a._filter,{forceFilter:!0})};SharedFolderItem.prototype.getLaunchElementAction=function(){return this._model.canAdminister()?Constants.ACTION_MANAGE:
null};SharedFolderItem.prototype.getIconElement=function(){return LPTools.createElement("img",{src:"images/vault_4.0/Shared_Folder.png","class":"bigIcon"})};SharedFolderItem.prototype.getItemButtonActions=function(){return this._model.canAdminister()?[Constants.ACTION_MANAGE,Constants.ACTION_DELETE]:[]};SharedFolderItem.prototype.getDeletedItemButtonActions=function(){return[Constants.ACTION_RESTORE_SHARED_FOLDER,Constants.ACTION_PURGE_SHARED_FOLDER]};SharedFolderItem.prototype.getContextMenuItems=
function(a){var b=VaultItemBaseDisplay.prototype.getContextMenuItems.apply(this,arguments);this._model.isDownloaded()?b.push(new LPTools.ContextMenuItem(Constants.ACTION_STOP_DOWNLOADING)):b.push(new LPTools.ContextMenuItem(Constants.ACTION_START_DOWNLOADING));this._model.canAdminister()&&(a||(b.push(new LPTools.ContextMenuItem(Constants.ACTION_MANAGE)),b.push(new LPTools.ContextMenuItem(Constants.ACTION_RENAME))),b.push(new LPTools.ContextMenuItem(Constants.ACTION_DELETE)));return b};SharedFolderItem.prototype.getDeletedContextMenuItems=
function(){return[new LPTools.ContextMenuItem(Constants.ACTION_RESTORE_SHARED_FOLDER),new LPTools.ContextMenuItem(Constants.ACTION_PURGE_SHARED_FOLDER)]}})();(function(){SharedSiteGroup.prototype.build=function(){var a=GroupDisplay.prototype.build.apply(this,arguments);LPTools.addClass(a.children[0].children[0],this._css);return a};SharedSiteGroup.prototype.handleContextMenu=function(){}})();ShareRecipient=function(a){Invitee.call(this,a)};ShareRecipient.prototype=Object.create(Invitee.prototype);
ShareRecipient.prototype.constructor=ShareRecipient;ShareRecipient.prototype.getLabel=function(){var a=this._data.name;void 0===a||""===a?a=this._data.email:""!==this._data.email&&(a+=" ("+this._data.email+")");return a};ShareRecipient.prototype.getID=function(){return this._data.email};
