nextcloud/core/js/dist/share_backend.js.map

1 line
366 KiB
Plaintext

{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/merged-share-backend.js","webpack:///./core/js/shareconfigmodel.js","webpack:///./core/js/sharetemplates.js","webpack:///./core/js/shareitemmodel.js","webpack:///./core/js/sharesocialmanager.js","webpack:///./core/js/sharedialogresharerinfoview.js","webpack:///./core/js/sharedialoglinkshareview.js","webpack:///./core/js/sharedialogshareelistview.js","webpack:///./core/js/sharedialogview.js","webpack:///./core/js/share.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","Share","Types","ShareConfigModel","Backbone","Model","extend","defaults","publicUploadEnabled","enforcePasswordForPublicLink","appConfig","core","enableLinkPasswordByDefault","isDefaultExpireDateEnforced","defaultExpireDateEnforced","isDefaultExpireDateEnabled","defaultExpireDateEnabled","isRemoteShareAllowed","remoteShareAllowed","isMailShareAllowed","undefined","shareByMailEnabled","defaultExpireDate","isResharingAllowed","resharingAllowed","isPasswordForMailSharesRequired","shareByMail","enforcePasswordProtection","allowGroupSharing","isPublicUploadEnabled","$","data","isShareWithLinkAllowed","val","getFederatedShareDocLink","federatedCloudShareDoc","getDefaultExpirationDateString","expireDateString","this","date","moment","utc","expireAfterDays","add","format","template","templates","Handlebars","Templates","container","depth0","helpers","partials","stack1","alias1","nullContext","nolinkShares","program","noop","each","linkShares","helper","alias2","hooks","helperMissing","alias4","escapeExpression","newShareId","newShareLabel","showPending","newShareTitle","unless","pendingPopoverMenu","alias3","cid","linkShareCreationDate","linkShareLabel","shareLinkURL","copyLabel","popoverMenu","noSharingPlaceholder","shareAllowed","publicUploadRValue","publicUploadRChecked","publicUploadRLabel","publicUploadRWValue","publicUploadRWChecked","publicUploadRWLabel","publicUploadWValue","publicUploadWChecked","publicUploadWLabel","publicEditingChecked","publicEditingLabel","isPasswordByTalkSet","passwordByTalkLabel","expireDate","url","newWindow","iconClass","label","publicUpload","publicEditing","hideDownload","hideDownloadLabel","isPasswordSet","isPasswordEnforced","enablePasswordLabel","passwordPlaceholder","showPasswordByTalkCheckBox","hasExpireDate","isExpirationEnforced","expireDateLabel","expirationDate","expirationLabel","expirationDatePlaceholder","maxDate","addNoteLabel","hasNote","shareNote","shareId","social","unshareLinkLabel","enforcedPasswordLabel","minPasswordLength","reshareOwner","sharedByText","hasShareNote","isShareWithCurrentUser","shareType","shareWith","modSeed","shareWithAvatar","shareWithDisplayName","shareWithTitle","canUpdateShareSettings","editPermissionPossible","canEditLabel","shareInitiator","shareInitiatorText","unshareLabel","sharees","linkReshares","sharePermissionPossible","isMailShare","hasSharePermission","sharePermission","canShareLabel","createPermissionPossible","updatePermissionPossible","deletePermissionPossible","hasCreatePermission","createPermission","createPermissionLabel","hasUpdatePermission","updatePermission","updatePermissionLabel","hasDeletePermission","deletePermission","deletePermissionLabel","passwordLabel","password","passwordValue","isTalkEnabled","secureDropMode","readPermission","secureDropLabel","passwordByTalkPlaceholder","isFolder","isNoteAvailable","shareLabel","sharePlaceholder","isSharingAllowed","SHARE_RESPONSE_INT_PROPS","ShareItemModel","_linkShareId","initialize","attributes","options","_","isUndefined","configModel","fileInfoModel","bindAll","allowPublicUploadStatus","permissions","saveLinkShare","expiration","shareIndex","findIndex","share","id","length","updateShare","passwordChanged","sendPasswordByTalk","PERMISSION_READ","SHARE_TYPE_LINK","addShare","defaultPermissions","getCapabilities","PERMISSION_ALL","possiblePermissions","PERMISSION_UPDATE","PERMISSION_CREATE","PERMISSION_DELETE","PERMISSION_SHARE","path","getFullPath","_addOrUpdateShare","type","_getUrl","dataType","attrs","encodeURIComponent","ajaxSettings","self","ajax","always","isFunction","complete","done","fetch","success","fail","xhr","msg","result","responseJSON","ocs","meta","message","error","dialogs","alert","removeShare","isPublicUploadAllowed","isPublicEditingAllowed","isHideFileListSet","isFile","hasReshare","reshare","isObject","uid_owner","hasUserShares","getSharesWithCurrentItem","hasLinkShares","getReshareOwner","getReshareOwnerDisplayname","displayname_owner","getReshareNote","note","getReshareWith","share_with","getReshareWithDisplayName","share_with_displayname","getReshareType","share_type","getExpireDate","_shareExpireDate","getNote","_shareNote","shares","fileId","filter","item_source","getShareWith","getShareWithDisplayName","getShareWithAvatar","share_with_avatar","getSharedBy","getSharedByDisplayName","getFileOwnerUid","uid_file_owner","findShareWithIndex","isArray","getShareType","_shareHasPermission","permission","getPermissions","hasReadPermission","editPermissionState","hcp","hup","hdp","linkSharePermissions","base","params","linkToOCS","buildQueryString","_fetchShares","reshares","_fetchReshare","_reshareFetched","Deferred","resolve","shared_with_me","_groupReshares","superShare","shift","combinedPermissions","SHARE_TYPE_USER","SHARE_TYPE_GROUP","model","trigger","deferred","when","data1","data2","sharesMap","shareItem","set","parse","_legacyFillCurrentShares","statuses","currentShares","itemShares","currentShareStatus","link","push","console","warn","currentUser","allowPublicEditingStatus","hideFileListStatus","map","prop","parseInt","reject","file_source","window","location","protocol","host","token","generateUrl","fullPath","isDirectory","linkTo","hide_download","send_password_by_talk","_parseTime","time","isString","isNaN","getShareTypes","pluck","uniq","Social","SocialModel","SocialCollection","Collection","comparator","ShareDialogResharerInfoView","View","tagName","className","_template","view","on","render","$el","empty","reshareTemplate","ownerDisplayName","group","owner","escape","SHARE_TYPE_CIRCLE","circle","SHARE_TYPE_ROOM","conversation","html","find","$this","avatar","contactsMenu","PASSWORD_PLACEHOLDER_MESSAGE","PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL","ShareDialogLinkShareView","showLink","events","previousLinkShares","previous","clipboard","Clipboard","e","$trigger","tooltip","attr","placement","delay","$menu","next","$linkTextMenu","$input","closest","showMenu","actionMsg","test","navigator","userAgent","removeClass","select","newShare","event","$li","target","$loading","hasClass","addClass","hideMenus","shareData","defaultExpireDays","focus","response","Notification","showTemporary","then","enforcedPasswordSet","preventDefault","onLinkTextClick","onHideDownloadChange","$checkbox","siblings","is","obj","onShowPasswordClick","slideToggle","menuSpeed","toggleClass","Util","isIE","onPasswordKeyUp","keyCode","onPasswordEntered","parent","$container","onPasswordByTalkChange","onAllowPublicEditingChange","onPublicUploadChange","currentTarget","showNoteForm","stopPropagation","$element","$form","deleteNote","sendNote","updateNote","prev","trim","$submit","$error","hide","method","show","setTimeout","linkShareTemplate","templateData","passwordPlaceholderInitial","publicEditable","minDate","Date","setDate","getDate","datepicker","setDefaults","dateFormat","password_policy","minLength","popoverBase","urlLabel","mailPrivatePlaceholder","mailButtonText","pendingPopover","pendingPopoverMenuTemplate","getShareeList","replace","popover","getPopoverObject","popoverMenuTemplate","delegateEvents","autosize","onToggleMenu","isPasswordEnabledByDefault","onPopUpClick","left","screen","width","top","height","open","href","onExpireDateChange","datePicker","state","showDatePicker","setExpirationDate","expirationDatePicker","onSelect","onChangeExpirationDate","list","index","getShareeObject","stime","appswebroots","shareTime","isNumber","stripTime","getTime","onUnshare","eq","remove","ShareDialogShareeListView","_menuOpen","_renderPermissionChange","sharedBy","sharedByDisplayName","fileOwnerUid","SHARE_TYPE_REMOTE","SHARE_TYPE_REMOTE_GROUP","SHARE_TYPE_EMAIL","getCurrentUser","uid","sharer","hasPassword","isRemoteShare","isRemoteGroupShare","isCircleShare","isFileSharedByMail","getShareProperties","crudsLabel","triangleSImage","imagePath","universal","getLinkReshares","shareInitiatorDisplayName","permissionChangeShareId","shareWithIndex","sharee","replaceWith","css","imageplaceholder","_this","forEach","$edit","datePickerClass","datePickerInput","expireDateCheckbox","liSelector","log","onMailSharePasswordProtectChange","element","passwordContainerClass","passwordContainer","loading","inputClass","passwordField","passwordByTalkElement","passwordByTalkState","passwordByTalkContainerClass","onMailSharePasswordProtectByTalkChange","passwordByTalkContainer","passwordByTalkField","passwordElement","passwordState","onMailSharePasswordKeyUp","onMailSharePasswordEntered","startsWith","blur","onPermissionChange","checked","$checkboxes","not","numberChecked","$editCb","checkbox","enableCb","elem","onSecureDropChange","ShareDialogView","_templates","_showLink","_lookup","_lookupAllowed","resharerInfoView","linkShareView","shareeListView","_lastSuggestions","_lastRecommendations","_pendingOperationsCount","_onRequest","_onEndRequest","subViewOptions","subViews","Plugins","attach","onShareWithFieldChanged","onShareWithFieldFocus","$shareWithField","autocomplete","_getSuggestions","searchTerm","perPage","lookup","promise","search","itemType","statuscode","users","groups","remotes","remote_groups","emails","circles","rooms","usersLength","groupsLength","remotesLength","remoteGroupsLength","emailsLength","circlesLength","roomsLength","j","splice","sharesLength","exact","exactUsers","exactGroups","exactRemotes","exactRemoteGroups","exactEmails","exactCircles","exactRooms","exactMatches","concat","remoteGroups","lookupEnabled","grouped","sort","a","b","aProperty","bProperty","previousUuid","groupedLength","uuid","merged","moreResultsAvailable","config","Math","min","max","_getRecommendations","recommendationHandler","suggestions","info","autocompleteHandler","term","$confirm","count","title","append","autocompleteRenderItem","ul","item","icon","text","escapeHTML","description","getTranslatedType","circleInfo","circleOwner","insert","appendTo","RegExp","_onSelectRecipient","debug","stopImmediatePropagation","_confirmShare","restoreUI","_toggleLoading","_loading","_loadingOnce","baseTemplate","_renderSharePlaceholderPart","$shareField","source","numberOfItems","size","_renderItem","setShowLink","allowRemoteSharing","allowMailSharing","SHARE_TYPE_GUEST","_REMOTE_OWNER_REGEXP","droppedDown","loadIcons","fileList","callback","dirInfo","subfiles","it","updateIcons","$fileList","currentDir","OCA","Files","App","getCurrentDirectory","hasLink","img","file","shareFolder","markFileAsShared","dir","last","actions","files","image","prepend","dirname","updateIcon","itemSource","$tr","filterAttr","String","_formatRemoteShare","parts","exec","userName","userDomain","server","_formatShareList","recipients","_parent","toArray","localeCompare","recipient","hasShares","avatars","shareFolderIcon","action","ownerId","mountType","MimeType","getIconUrl","indexOf","removeAttr","showDropDown","filename","itemModel","dialogView","$dialog","slideDown","hideDropDown","slideUp","FileActions","document","ready","monthNames","monthNamesShort","dayNames","dayNamesMin","dayNamesShort","firstDay","click","isMatched","has"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAAS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ACrF/L,GAAGC,MAAMivB","file":"share_backend.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './shareconfigmodel.js';\nimport './sharetemplates.js';\nimport './shareitemmodel.js';\nimport './sharesocialmanager.js';\nimport './sharedialogresharerinfoview.js';\nimport './sharedialoglinkshareview.js';\nimport './sharedialogshareelistview.js';\nimport './sharedialogview.js';\nimport './share.js';\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global moment, OC */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {};\n\t\tOC.Share.Types = {};\n\t}\n\n\t// FIXME: the config model should populate its own model attributes based on\n\t// the old DOM-based config\n\tvar ShareConfigModel = OC.Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\tpublicUploadEnabled: false,\n\t\t\tenforcePasswordForPublicLink: OC.appConfig.core.enforcePasswordForPublicLink,\n\t\t\tenableLinkPasswordByDefault: OC.appConfig.core.enableLinkPasswordByDefault,\n\t\t\tisDefaultExpireDateEnforced: OC.appConfig.core.defaultExpireDateEnforced === true,\n\t\t\tisDefaultExpireDateEnabled: OC.appConfig.core.defaultExpireDateEnabled === true,\n\t\t\tisRemoteShareAllowed: OC.appConfig.core.remoteShareAllowed,\n\t\t\tisMailShareAllowed: OC.appConfig.shareByMailEnabled !== undefined,\n\t\t\tdefaultExpireDate: OC.appConfig.core.defaultExpireDate,\n\t\t\tisResharingAllowed: OC.appConfig.core.resharingAllowed,\n\t\t\tisPasswordForMailSharesRequired: (OC.appConfig.shareByMail === undefined) ? false : OC.appConfig.shareByMail.enforcePasswordProtection,\n\t\t\tallowGroupSharing: OC.appConfig.core.allowGroupSharing\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisPublicUploadEnabled: function() {\n\t\t\tvar publicUploadEnabled = $('#filestable').data('allow-public-upload');\n\t\t\treturn publicUploadEnabled === 'yes';\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisShareWithLinkAllowed: function() {\n\t\t\treturn $('#allowShareWithLink').val() === 'yes';\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetFederatedShareDocLink: function() {\n\t\t\treturn OC.appConfig.core.federatedCloudShareDoc;\n\t\t},\n\n\t\tgetDefaultExpirationDateString: function () {\n\t\t\tvar expireDateString = '';\n\t\t\tif (this.get('isDefaultExpireDateEnabled')) {\n\t\t\t\tvar date = moment.utc();\n\t\t\t\tvar expireAfterDays = this.get('defaultExpireDate');\n\t\t\t\tdate.add(expireAfterDays, 'days');\n\t\t\t\texpireDateString = date.format('YYYY-MM-DD 00:00:00');\n\t\t\t}\n\t\t\treturn expireDateString;\n\t\t}\n\t});\n\n\n\tOC.Share.ShareConfigModel = ShareConfigModel;\n})();\n","(function() {\n var template = Handlebars.template, templates = OC.Share.Templates = OC.Share.Templates || {};\ntemplates['sharedialoglinkshareview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<ul class=\\\"shareWithList\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.nolinkShares : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.linkShares : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</ul>\\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias4(((helper = (helper = helpers.newShareId || (depth0 != null ? depth0.newShareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newShareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar icon-public-white\\\"></div>\\n\t\t\t<span class=\\\"username\\\">\"\n + alias4(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\t\t\t\t<div class=\\\"share-menu\\\">\\n\t\t\t\t\t<a href=\\\"#\\\" class=\\\"icon icon-add new-share has-tooltip \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.newShareTitle || (depth0 != null ? depth0.newShareTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newShareTitle\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t\t\t\t<span class=\\\"icon icon-loading-small \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t</div>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var stack1, helper;\n\n return \"\t\t\t\t\t\t\"\n + ((stack1 = ((helper = (helper = helpers.pendingPopoverMenu || (depth0 != null ? depth0.pendingPopoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"pendingPopoverMenu\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar icon-public-white\\\"></div>\\n\t\t\t<span class=\\\"username\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.linkShareCreationDate || (depth0 != null ? depth0.linkShareCreationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"linkShareCreationDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.linkShareLabel || (depth0 != null ? depth0.linkShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"linkShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\\n\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"clipboard-button icon icon-clippy has-tooltip\\\" data-clipboard-text=\\\"\"\n + alias4(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.copyLabel || (depth0 != null ? depth0.copyLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"copyLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t\t\t<div class=\\\"share-menu\\\">\\n\t\t\t\t\t<a href=\\\"#\\\" class=\\\"icon icon-more \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"></a>\\n\t\t\t\t\t<span class=\\\"icon icon-loading-small \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.program(8, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t</div>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var stack1, helper;\n\n return \"\t\t\t\t\t\t\"\n + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"popoverMenu\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.noSharingPlaceholder : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<input id=\\\"shareWith-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.noSharingPlaceholder || (depth0 != null ? depth0.noSharingPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"noSharingPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" disabled=\\\"disabled\\\" />\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.shareAllowed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(10, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});\ntemplates['sharedialoglinkshareview_popover_menu'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"radio\\\" name=\\\"publicUpload\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.publicUploadRValue || (depth0 != null ? depth0.publicUploadRValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" id=\\\"sharingDialogAllowPublicUpload-r-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicUploadRChecked || (depth0 != null ? depth0.publicUploadRChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-r-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.publicUploadRLabel || (depth0 != null ? depth0.publicUploadRLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"radio\\\" name=\\\"publicUpload\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.publicUploadRWValue || (depth0 != null ? depth0.publicUploadRWValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" id=\\\"sharingDialogAllowPublicUpload-rw-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicUploadRWChecked || (depth0 != null ? depth0.publicUploadRWChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-rw-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.publicUploadRWLabel || (depth0 != null ? depth0.publicUploadRWLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"radio\\\" name=\\\"publicUpload\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.publicUploadWValue || (depth0 != null ? depth0.publicUploadWValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" id=\\\"sharingDialogAllowPublicUpload-w-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicUploadWChecked || (depth0 != null ? depth0.publicUploadWChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-w-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.publicUploadWLabel || (depth0 != null ? depth0.publicUploadWLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<li id=\\\"allowPublicEditingWrapper\\\">\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"allowPublicEditing\\\" id=\\\"sharingDialogAllowPublicEditing-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox publicEditingCheckbox\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicEditingChecked || (depth0 != null ? depth0.publicEditingChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicEditingChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicEditing-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.publicEditingLabel || (depth0 != null ? depth0.publicEditingLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicEditingLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \"checked=\\\"checked\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n return \"disabled=\\\"disabled\\\"\";\n},\"9\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"shareOption menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"passwordByTalk\\\" id=\\\"passwordByTalk-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox passwordByTalkCheckbox\\\"\\n\t\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"passwordByTalk-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n return \"datepicker\";\n},\"15\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"expireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"17\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"defaultExpireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"19\":function(container,depth0,helpers,partials,data) {\n return \"readonly\";\n},\"21\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"menuitem pop-up\\\" data-url=\\\"\"\n + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"url\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-window=\\\"\"\n + alias4(((helper = (helper = helpers.newWindow || (depth0 != null ? depth0.newWindow : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newWindow\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t\t\t<span class=\\\"icon \"\n + alias4(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconClass\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></span>\\n\t\t\t\t\t<span>\"\n + alias4(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"label\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<div class=\\\"popovermenu menu\\\">\\n\t<ul>\\n\t\t<li class=\\\"hidden linkTextMenu\\\">\\n\t\t\t<span class=\\\"menuitem icon-link-text\\\">\\n\t\t\t\t<input id=\\\"linkText-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"linkText\\\" type=\\\"text\\\" readonly=\\\"readonly\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.publicUpload : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.publicEditing : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"hideDownload\\\" id=\\\"sharingDialogHideDownload-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox hideDownloadCheckbox\\\"\\n\t\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hideDownload : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogHideDownload-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.hideDownloadLabel || (depth0 != null ? depth0.hideDownloadLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"hideDownloadLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"showPassword\\\" id=\\\"showPassword-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox showPasswordCheckbox\\\"\\n\t\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isPasswordEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" value=\\\"1\\\" />\\n\t\t\t\t\t<label for=\\\"showPassword-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.enablePasswordLabel || (depth0 != null ? depth0.enablePasswordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"enablePasswordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"\"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" linkPassMenu\\\">\\n\t\t\t\t<span class=\\\"menuitem icon-share-pass\\\">\\n\t\t\t\t\t<input id=\\\"linkPassText-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"linkPassText\\\" type=\\\"password\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"new-password\\\" />\\n\t\t\t\t\t<input type=\\\"submit\\\" class=\\\"icon-confirm share-pass-submit\\\" value=\\\"\\\" />\\n\t\t\t\t\t<span class=\\\"icon icon-loading-small hidden\\\"></span>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPasswordByTalkCheckBox : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t<input id=\\\"expireDate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\"\\n\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isExpirationEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t<label for=\\\"expireDate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expireDateLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t</span>\\n\t\t</li>\\n\t\t<li class=\\\"\"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t<span class=\\\"menuitem icon-expiredate expirationDateContainer-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t<!-- do not use the datepicker if enforced -->\\n\t\t\t\t<input id=\\\"expirationDatePicker-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"\"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isExpirationEnforced : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(13, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" type=\\\"text\\\"\\n\t\t\t\t\tplaceholder=\\\"\"\n + alias4(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(15, data, 0),\"inverse\":container.program(17, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"\\n\t\t\t\t\tdata-max-date=\\\"\"\n + alias4(((helper = (helper = helpers.maxDate || (depth0 != null ? depth0.maxDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"maxDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isExpirationEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(19, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t</span>\\n\t\t\t</li>\\n\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"share-add\\\">\\n\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t<span class=\\\"icon icon-edit\\\"></span>\\n\t\t\t\t<span>\"\n + alias4(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"addNoteLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\t<input type=\\\"button\\\" class=\\\"share-note-delete icon-delete \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t</a>\\n\t\t</li>\\n\t\t<li class=\\\"share-note-form share-note-link \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t<span class=\\\"menuitem icon-note\\\">\\n\t\t\t\t<textarea class=\\\"share-note\\\">\"\n + alias4(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n + \"</textarea>\\n\t\t\t\t<input type=\\\"submit\\\" class=\\\"icon-confirm share-note-submit\\\" value=\\\"\\\" id=\\\"add-note-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.social : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(21, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"unshare\\\"><span class=\\\"icon-loading-small hidden\\\"></span><span class=\\\"icon icon-delete\\\"></span><span>\"\n + alias4(((helper = (helper = helpers.unshareLinkLabel || (depth0 != null ? depth0.unshareLinkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"unshareLinkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span></a>\\n\t\t</li>\\n\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"new-share\\\">\\n\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t<span class=\\\"icon icon-add\\\"></span>\\n\t\t\t\t<span>\"\n + alias4(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t</a>\\n\t\t</li>\\n\t</ul>\\n</div>\\n\";\n},\"useData\":true});\ntemplates['sharedialoglinkshareview_popover_menu_pending'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem icon-info\\\">\\n\t\t\t\t\t<p>\"\n + alias4(((helper = (helper = helpers.enforcedPasswordLabel || (depth0 != null ? depth0.enforcedPasswordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"enforcedPasswordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"linkPassMenu\\\">\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<form autocomplete=\\\"off\\\" class=\\\"enforcedPassForm\\\">\\n\t\t\t\t\t\t<input id=\\\"enforcedPassText\\\" required class=\\\"enforcedPassText\\\" type=\\\"password\\\"\\n\t\t\t\t\t\t\tplaceholder=\\\"\"\n + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"enforcedPassText\\\" minlength=\\\"\"\n + alias4(((helper = (helper = helpers.minPasswordLength || (depth0 != null ? depth0.minPasswordLength : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"minPasswordLength\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\" \\\" class=\\\"primary icon-checkmark-white\\\">\\n\t\t\t\t\t</form>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \"<div class=\\\"popovermenu open menu pending\\\">\\n\t<ul>\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPasswordEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t</ul>\\n</div>\\n\";\n},\"useData\":true});\ntemplates['sharedialogresharerinfoview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"<div class=\\\"share-note\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<span class=\\\"reshare\\\">\\n\t<div class=\\\"avatar\\\" data-userName=\\\"\"\n + alias4(((helper = (helper = helpers.reshareOwner || (depth0 != null ? depth0.reshareOwner : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"reshareOwner\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></div>\\n\t\"\n + alias4(((helper = (helper = helpers.sharedByText || (depth0 != null ? depth0.sharedByText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharedByText\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\n</span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasShareNote : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"useData\":true});\ntemplates['sharedialogshareelistview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isShareWithCurrentUser : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-share-type=\\\"\"\n + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-share-with=\\\"\"\n + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.modSeed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-username=\\\"\"\n + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-avatar=\\\"\"\n + alias4(((helper = (helper = helpers.shareWithAvatar || (depth0 != null ? depth0.shareWithAvatar : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithAvatar\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-displayname=\\\"\"\n + alias4(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.modSeed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"></div>\\n\t\t\t<span class=\\\"username\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.shareWithTitle || (depth0 != null ? depth0.shareWithTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithTitle\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.canUpdateShareSettings : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t</li>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"imageplaceholderseed\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"data-seed=\\\"\"\n + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.editPermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t<div tabindex=\\\"0\\\" class=\\\"share-menu\\\"><span class=\\\"icon icon-more\\\"></span>\\n\t\t\t\t\t\"\n + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(alias1,{\"name\":\"popoverMenu\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"\\n\t\t\t\t</div>\\n\t\t\t</span>\\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t\t<span>\\n\t\t\t\t\t\t<input id=\\\"canEdit-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"edit\\\" class=\\\"permissions checkbox\\\" />\\n\t\t\t\t\t\t<label for=\\\"canEdit-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.canEditLabel || (depth0 != null ? depth0.canEditLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"canEditLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-share-type=\\\"\"\n + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar\\\" data-username=\\\"\"\n + alias4(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></div>\\n\t\t\t<span class=\\\"has-tooltip username\\\" title=\\\"\"\n + alias4(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.shareInitiatorText || (depth0 != null ? depth0.shareInitiatorText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiatorText\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"unshare\\\"><span class=\\\"icon-loading-small hidden\\\"></span><span class=\\\"icon icon-delete\\\"></span><span class=\\\"hidden-visually\\\">\"\n + alias4(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"unshareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span></a>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<ul id=\\\"shareWithList\\\" class=\\\"shareWithList\\\">\\n\"\n + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.sharees : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.linkReshares : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(10, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</ul>\\n\";\n},\"useData\":true});\ntemplates['sharedialogshareelistview_popover_menu'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \" \"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.sharePermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \" \"\n + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<input id=\\\"canShare-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"share\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasSharePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias4(((helper = (helper = helpers.sharePermission || (depth0 != null ? depth0.sharePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharePermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t\t\t<label for=\\\"canShare-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.canShareLabel || (depth0 != null ? depth0.canShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"canShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n return \"checked=\\\"checked\\\"\";\n},\"6\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.createPermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.updatePermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(10, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.deletePermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(13, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"8\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"canCreate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"create\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasCreatePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias4(((helper = (helper = helpers.createPermission || (depth0 != null ? depth0.createPermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"createPermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canCreate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.createPermissionLabel || (depth0 != null ? depth0.createPermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"createPermissionLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"11\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"canUpdate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"update\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasUpdatePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias4(((helper = (helper = helpers.updatePermission || (depth0 != null ? depth0.updatePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"updatePermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canUpdate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.updatePermissionLabel || (depth0 != null ? depth0.updatePermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"updatePermissionLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\t\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(14, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"14\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"canDelete-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"delete\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasDeletePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias4(((helper = (helper = helpers.deletePermission || (depth0 != null ? depth0.deletePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"deletePermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canDelete-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.deletePermissionLabel || (depth0 != null ? depth0.deletePermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"deletePermissionLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\t\";\n},\"16\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasCreatePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(17, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<input id=\\\"password-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"password\\\" class=\\\"password checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(19, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" />\\n\t\t\t\t\t<label for=\\\"password-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"passwordMenu-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t<span class=\\\"passwordContainer-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" icon-passwordmail menuitem\\\">\\n\t\t\t\t\t<label for=\\\"passwordField-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t<input id=\\\"passwordField-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"new-password\\\" />\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isTalkEnabled : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(24, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"17\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"secureDrop-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"secureDrop\\\" class=\\\"checkbox secureDrop\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.secureDropMode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias4(((helper = (helper = helpers.readPermission || (depth0 != null ? depth0.readPermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"readPermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"secureDrop-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.secureDropLabel || (depth0 != null ? depth0.secureDropLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"secureDropLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\";\n},\"19\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPasswordForMailSharesRequired : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(20, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"20\":function(container,depth0,helpers,partials,data) {\n return \"disabled=\\\"\\\"\";\n},\"22\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"24\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"passwordByTalk-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"passwordByTalk\\\" class=\\\"passwordByTalk checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t\t<label for=\\\"passwordByTalk-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\t<li class=\\\"passwordByTalkMenu-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t\t<span class=\\\"passwordByTalkContainer-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" icon-passwordtalk menuitem\\\">\\n\t\t\t\t\t\t<label for=\\\"passwordByTalkField-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t\t<input id=\\\"passwordByTalkField-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.passwordByTalkPlaceholder || (depth0 != null ? depth0.passwordByTalkPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"new-password\\\" />\\n\t\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\";\n},\"26\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"expireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"28\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"defaultExpireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"30\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"share-add\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<span class=\\\"icon icon-edit\\\"></span>\\n\t\t\t\t\t<span>\"\n + alias4(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"addNoteLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\t\t<input type=\\\"button\\\" class=\\\"share-note-delete icon-delete \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"share-note-form \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t<span class=\\\"menuitem icon-note\\\">\\n\t\t\t\t\t<textarea class=\\\"share-note\\\">\"\n + alias4(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n + \"</textarea>\\n\t\t\t\t\t<input type=\\\"submit\\\" class=\\\"icon-confirm share-note-submit\\\" value=\\\"\\\" id=\\\"add-note-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<div class=\\\"popovermenu bubble hidden menu\\\">\\n\t<ul>\\n\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isResharingAllowed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isFolder : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(16, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t<input id=\\\"expireDate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" />\\n\t\t\t\t<label for=\\\"expireDate-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expireDateLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t</span>\\n\t\t</li>\\n\t\t<li class=\\\"expirationDateMenu-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + ((stack1 = helpers.unless.call(alias1,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t<span class=\\\"expirationDateContainer-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" icon-expiredate menuitem\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias4(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t<input id=\\\"expirationDatePicker-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"datepicker\\\" type=\\\"text\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(26, data, 0),\"inverse\":container.program(28, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isNoteAvailable : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(30, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"unshare\\\"><span class=\\\"icon-loading-small hidden\\\"></span><span class=\\\"icon icon-delete\\\"></span><span>\"\n + alias4(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"unshareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span></a>\\n\t\t</li>\\n\t</ul>\\n</div>\\n\";\n},\"useData\":true});\ntemplates['sharedialogview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t<label for=\\\"shareWith-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\">\"\n + alias4(((helper = (helper = helpers.shareLabel || (depth0 != null ? depth0.shareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t<div class=\\\"oneline\\\">\\n\t\t<input id=\\\"shareWith-\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n + alias4(((helper = (helper = helpers.sharePlaceholder || (depth0 != null ? depth0.sharePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t<span class=\\\"shareWithLoading icon-loading-small hidden\\\"></span>\\n\t\t<span class=\\\"shareWithConfirm icon icon-confirm\\\"></span>\\n\t</div>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \"<div class=\\\"resharerInfoView subView\\\"></div>\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isSharingAllowed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"<div class=\\\"linkShareView subView\\\"></div>\\n<div class=\\\"shareeListView subView\\\"></div>\\n<div class=\\\"loading hidden\\\" style=\\\"height: 50px\\\"></div>\\n\";\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\tif(!OC.Share) {\n\t\tOC.Share = {};\n\t\tOC.Share.Types = {};\n\t}\n\n\t/**\n\t * @typedef {object} OC.Share.Types.LinkShareInfo\n\t * @property {string} token\n\t * @property {bool} hideDownload\n\t * @property {string|null} password\n\t * @property {bool} sendPasswordByTalk\n\t * @property {number} permissions\n\t * @property {Date} expiration\n\t * @property {number} stime share time\n\t */\n\n\t/**\n\t * @typedef {object} OC.Share.Types.Reshare\n\t * @property {string} uid_owner\n\t * @property {number} share_type\n\t * @property {string} share_with\n\t * @property {string} displayname_owner\n\t * @property {number} permissions\n\t */\n\n\t/**\n\t * @typedef {object} OC.Share.Types.ShareInfo\n\t * @property {number} share_type\n\t * @property {number} permissions\n\t * @property {number} file_source optional\n\t * @property {number} item_source\n\t * @property {string} token\n\t * @property {string} share_with\n\t * @property {string} share_with_displayname\n\t * @property {string} share_with_avatar\n\t * @property {string} mail_send\n\t * @property {Date} expiration optional?\n\t * @property {number} stime optional?\n\t * @property {string} uid_owner\n\t * @property {string} displayname_owner\n\t */\n\n\t/**\n\t * @typedef {object} OC.Share.Types.ShareItemInfo\n\t * @property {OC.Share.Types.Reshare} reshare\n\t * @property {OC.Share.Types.ShareInfo[]} shares\n\t * @property {OC.Share.Types.LinkShareInfo|undefined} linkShare\n\t */\n\n\t/**\n\t * These properties are sometimes returned by the server as strings instead\n\t * of integers, so we need to convert them accordingly...\n\t */\n\tvar SHARE_RESPONSE_INT_PROPS = [\n\t\t'id', 'file_parent', 'mail_send', 'file_source', 'item_source', 'permissions',\n\t\t'storage', 'share_type', 'parent', 'stime'\n\t];\n\n\t/**\n\t * @class OCA.Share.ShareItemModel\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t * // FIXME: use OC Share API once #17143 is done\n\t *\n\t * // TODO: this really should be a collection of share item models instead,\n\t * where the link share is one of them\n\t */\n\tvar ShareItemModel = OC.Backbone.Model.extend({\n\t\t/**\n\t\t * share id of the link share, if applicable\n\t\t */\n\t\t_linkShareId: null,\n\n\t\tinitialize: function(attributes, options) {\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t}\n\t\t\tif(!_.isUndefined(options.fileInfoModel)) {\n\t\t\t\t/** @type {OC.Files.FileInfo} **/\n\t\t\t\tthis.fileInfoModel = options.fileInfoModel;\n\t\t\t}\n\n\t\t\t_.bindAll(this, 'addShare');\n\t\t},\n\n\t\tdefaults: {\n\t\t\tallowPublicUploadStatus: false,\n\t\t\tpermissions: 0,\n\t\t\tlinkShares: []\n\t\t},\n\n\t\t/**\n\t\t * Saves the current link share information.\n\t\t *\n\t\t * This will trigger an ajax call and, if successful, refetch the model\n\t\t * afterwards. Callbacks \"success\", \"error\" and \"complete\" can be given\n\t\t * in the options object; \"success\" is called after a successful save\n\t\t * once the model is refetch, \"error\" is called after a failed save, and\n\t\t * \"complete\" is called both after a successful save and after a failed\n\t\t * save. Note that \"complete\" is called before \"success\" and \"error\" are\n\t\t * called (unlike in jQuery, in which it is called after them); this\n\t\t * ensures that \"complete\" is called even if refetching the model fails.\n\t\t *\n\t\t * TODO: this should be a separate model\n\t\t */\n\t\tsaveLinkShare: function(attributes, options) {\n\t\t\toptions = options || {};\n\t\t\tattributes = _.extend({}, attributes);\n\n\t\t\tvar shareId = null;\n\t\t\tvar call;\n\n\t\t\t// oh yeah...\n\t\t\tif (attributes.expiration) {\n\t\t\t\tattributes.expireDate = attributes.expiration;\n\t\t\t\tdelete attributes.expiration;\n\t\t\t}\n\n\t\t\tvar linkShares = this.get('linkShares');\n\t\t\tvar shareIndex = _.findIndex(linkShares, function(share) {return share.id === attributes.cid})\n\n\t\t\tif (linkShares.length > 0 && shareIndex !== -1) {\n\t\t\t\tshareId = linkShares[shareIndex].id;\n\n\t\t\t\t// note: update can only update a single value at a time\n\t\t\t\tcall = this.updateShare(shareId, attributes, options);\n\t\t\t} else {\n\t\t\t\tattributes = _.defaults(attributes, {\n\t\t\t\t\thideDownload: false,\n\t\t\t\t\tpassword: '',\n\t\t\t\t\tpasswordChanged: false,\n\t\t\t\t\tsendPasswordByTalk: false,\n\t\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\t\texpireDate: this.configModel.getDefaultExpirationDateString(),\n\t\t\t\t\tshareType: OC.Share.SHARE_TYPE_LINK\n\t\t\t\t});\n\n\t\t\t\tcall = this.addShare(attributes, options);\n\t\t\t}\n\n\t\t\treturn call;\n\t\t},\n\n\t\taddShare: function(attributes, options) {\n\t\t\tvar shareType = attributes.shareType;\n\t\t\tattributes = _.extend({}, attributes);\n\n\t\t\t// get default permissions\n\t\t\tvar defaultPermissions = OC.getCapabilities()['files_sharing']['default_permissions'] || OC.PERMISSION_ALL;\n\t\t\tvar possiblePermissions = OC.PERMISSION_READ;\n\n\t\t\tif (this.updatePermissionPossible()) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_UPDATE;\n\t\t\t}\n\t\t\tif (this.createPermissionPossible()) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_CREATE;\n\t\t\t}\n\t\t\tif (this.deletePermissionPossible()) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_DELETE;\n\t\t\t}\n\t\t\tif (this.configModel.get('isResharingAllowed') && (this.sharePermissionPossible())) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_SHARE;\n\t\t\t}\n\n\t\t\tattributes.permissions = defaultPermissions & possiblePermissions;\n\t\t\tif (_.isUndefined(attributes.path)) {\n\t\t\t\tattributes.path = this.fileInfoModel.getFullPath();\n\t\t\t}\n\n\t\t\treturn this._addOrUpdateShare({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: this._getUrl('shares'),\n\t\t\t\tdata: attributes,\n\t\t\t\tdataType: 'json'\n\t\t\t}, options);\n\t\t},\n\n\t\tupdateShare: function(shareId, attrs, options) {\n\t\t\treturn this._addOrUpdateShare({\n\t\t\t\ttype: 'PUT',\n\t\t\t\turl: this._getUrl('shares/' + encodeURIComponent(shareId)),\n\t\t\t\tdata: attrs,\n\t\t\t\tdataType: 'json'\n\t\t\t}, options);\n\t\t},\n\n\t\t_addOrUpdateShare: function(ajaxSettings, options) {\n\t\t\tvar self = this;\n\t\t\toptions = options || {};\n\n\t\t\treturn $.ajax(\n\t\t\t\tajaxSettings\n\t\t\t).always(function() {\n\t\t\t\tif (_.isFunction(options.complete)) {\n\t\t\t\t\toptions.complete(self);\n\t\t\t\t}\n\t\t\t}).done(function() {\n\t\t\t\tself.fetch().done(function() {\n\t\t\t\t\tif (_.isFunction(options.success)) {\n\t\t\t\t\t\toptions.success(self);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}).fail(function(xhr) {\n\t\t\t\tvar msg = t('core', 'Error');\n\t\t\t\tvar result = xhr.responseJSON;\n\t\t\t\tif (result && result.ocs && result.ocs.meta) {\n\t\t\t\t\tmsg = result.ocs.meta.message;\n\t\t\t\t}\n\n\t\t\t\tif (_.isFunction(options.error)) {\n\t\t\t\t\toptions.error(self, msg);\n\t\t\t\t} else {\n\t\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Deletes the share with the given id\n\t\t *\n\t\t * @param {int} shareId share id\n\t\t * @return {jQuery}\n\t\t */\n\t\tremoveShare: function(shareId, options) {\n\t\t\tvar self = this;\n\t\t\toptions = options || {};\n\t\t\treturn $.ajax({\n\t\t\t\ttype: 'DELETE',\n\t\t\t\turl: this._getUrl('shares/' + encodeURIComponent(shareId)),\n\t\t\t}).done(function() {\n\t\t\t\tself.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tif (_.isFunction(options.success)) {\n\t\t\t\t\t\t\toptions.success(self);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}).fail(function(xhr) {\n\t\t\t\tvar msg = t('core', 'Error');\n\t\t\t\tvar result = xhr.responseJSON;\n\t\t\t\tif (result.ocs && result.ocs.meta) {\n\t\t\t\t\tmsg = result.ocs.meta.message;\n\t\t\t\t}\n\n\t\t\t\tif (_.isFunction(options.error)) {\n\t\t\t\t\toptions.error(self, msg);\n\t\t\t\t} else {\n\t\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error removing share'));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisPublicUploadAllowed: function() {\n\t\t\treturn this.get('allowPublicUploadStatus');\n\t\t},\n\n\t\tisPublicEditingAllowed: function() {\n\t\t\treturn this.get('allowPublicEditingStatus');\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisHideFileListSet: function() {\n\t\t\treturn this.get('hideFileListStatus');\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFolder: function() {\n\t\t\treturn this.get('itemType') === 'folder';\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFile: function() {\n\t\t\treturn this.get('itemType') === 'file';\n\t\t},\n\n\t\t/**\n\t\t * whether this item has reshare information\n\t\t * @returns {boolean}\n\t\t */\n\t\thasReshare: function() {\n\t\t\tvar reshare = this.get('reshare');\n\t\t\treturn _.isObject(reshare) && !_.isUndefined(reshare.uid_owner);\n\t\t},\n\n\t\t/**\n\t\t * whether this item has user share information\n\t\t * @returns {boolean}\n\t\t */\n\t\thasUserShares: function() {\n\t\t\treturn this.getSharesWithCurrentItem().length > 0;\n\t\t},\n\n\t\t/**\n\t\t * Returns whether this item has link shares\n\t\t *\n\t\t * @return {bool} true if a link share exists, false otherwise\n\t\t */\n\t\thasLinkShares: function() {\n\t\t\tvar linkShares = this.get('linkShares');\n\t\t\tif (linkShares && linkShares.length > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareOwner: function() {\n\t\t\treturn this.get('reshare').uid_owner;\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareOwnerDisplayname: function() {\n\t\t\treturn this.get('reshare').displayname_owner;\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareNote: function() {\n\t\t\treturn this.get('reshare').note;\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareWith: function() {\n\t\t\treturn this.get('reshare').share_with;\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareWithDisplayName: function() {\n\t\t\tvar reshare = this.get('reshare');\n\t\t\treturn reshare.share_with_displayname || reshare.share_with;\n\t\t},\n\n\t\t/**\n\t\t * @returns {number}\n\t\t */\n\t\tgetReshareType: function() {\n\t\t\treturn this.get('reshare').share_type;\n\t\t},\n\n\t\tgetExpireDate: function(shareIndex) {\n\t\t\treturn this._shareExpireDate(shareIndex);\n\t\t},\n\n\t\tgetNote: function(shareIndex) {\n\t\t\treturn this._shareNote(shareIndex);\n\t\t},\n\n\t\t/**\n\t\t * Returns all share entries that only apply to the current item\n\t\t * (file/folder)\n\t\t *\n\t\t * @return {Array.<OC.Share.Types.ShareInfo>}\n\t\t */\n\t\tgetSharesWithCurrentItem: function() {\n\t\t\tvar shares = this.get('shares') || [];\n\t\t\tvar fileId = this.fileInfoModel.get('id');\n\t\t\treturn _.filter(shares, function(share) {\n\t\t\t\treturn share.item_source === fileId;\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetShareWith: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.share_with;\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetShareWithDisplayName: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.share_with_displayname;\n\t\t},\n\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetShareWithAvatar: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.share_with_avatar;\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetSharedBy: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.uid_owner;\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetSharedByDisplayName: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.displayname_owner;\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetFileOwnerUid: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.uid_file_owner;\n\t\t},\n\n\t\t/**\n\t\t * returns the array index of a sharee for a provided shareId\n\t\t *\n\t\t * @param shareId\n\t\t * @returns {number}\n\t\t */\n\t\tfindShareWithIndex: function(shareId) {\n\t\t\tvar shares = this.get('shares');\n\t\t\tif(!_.isArray(shares)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\tfor(var i = 0; i < shares.length; i++) {\n\t\t\t\tvar shareWith = shares[i];\n\t\t\t\tif(shareWith.id === shareId) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow \"Unknown Sharee\";\n\t\t},\n\n\t\tgetShareType: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.share_type;\n\t\t},\n\n\t\t/**\n\t\t * whether a share from shares has the requested permission\n\t\t *\n\t\t * @param {number} shareIndex\n\t\t * @param {number} permission\n\t\t * @returns {boolean}\n\t\t * @private\n\t\t */\n\t\t_shareHasPermission: function(shareIndex, permission) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn (share.permissions & permission) === permission;\n\t\t},\n\n\n\t\t_shareExpireDate: function(shareIndex) {\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\tvar date2 = share.expiration;\n\t\t\treturn date2;\n\t\t},\n\n\n\t\t_shareNote: function(shareIndex) {\n\t\t\tvar share = this.get('shares')[shareIndex];\n\t\t\tif(!_.isObject(share)) {\n\t\t\t\tthrow \"Unknown Share\";\n\t\t\t}\n\t\t\treturn share.note;\n\t\t},\n\n\t\t/**\n\t\t * @return {int}\n\t\t */\n\t\tgetPermissions: function() {\n\t\t\treturn this.get('permissions');\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tsharePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_SHARE) === OC.PERMISSION_SHARE;\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasSharePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_SHARE);\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tcreatePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_CREATE) === OC.PERMISSION_CREATE;\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasCreatePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_CREATE);\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tupdatePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_UPDATE) === OC.PERMISSION_UPDATE;\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasUpdatePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_UPDATE);\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tdeletePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_DELETE) === OC.PERMISSION_DELETE;\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasDeletePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_DELETE);\n\t\t},\n\n\t\thasReadPermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_READ);\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\teditPermissionPossible: function() {\n\t\t\treturn this.createPermissionPossible()\n\t\t\t\t || this.updatePermissionPossible()\n\t\t\t\t || this.deletePermissionPossible();\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t * The state that the 'can edit' permission checkbox should have.\n\t\t * Possible values:\n\t\t * - empty string: no permission\n\t\t * - 'checked': all applicable permissions\n\t\t * - 'indeterminate': some but not all permissions\n\t\t */\n\t\teditPermissionState: function(shareIndex) {\n\t\t\tvar hcp = this.hasCreatePermission(shareIndex);\n\t\t\tvar hup = this.hasUpdatePermission(shareIndex);\n\t\t\tvar hdp = this.hasDeletePermission(shareIndex);\n\t\t\tif (this.isFile()) {\n\t\t\t\tif (hcp || hup || hdp) {\n\t\t\t\t\treturn 'checked';\n\t\t\t\t}\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tif (!hcp && !hup && !hdp) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\tif ( (this.createPermissionPossible() && !hcp)\n\t\t\t\t|| (this.updatePermissionPossible() && !hup)\n\t\t\t\t|| (this.deletePermissionPossible() && !hdp) ) {\n\t\t\t\treturn 'indeterminate';\n\t\t\t}\n\t\t\treturn 'checked';\n\t\t},\n\n\t\t/**\n\t\t * @returns {int}\n\t\t */\n\t\tlinkSharePermissions: function(shareId) {\n\t\t\tvar linkShares = this.get('linkShares');\n\t\t\tvar shareIndex = _.findIndex(linkShares, function(share) {return share.id === shareId})\n\n\t\t\tif (!this.hasLinkShares()) {\n\t\t\t\treturn -1;\n\t\t\t} else if (linkShares.length > 0 && shareIndex !== -1) {\n\t\t\t\treturn linkShares[shareIndex].permissions;\n\t\t\t}\n\t\t\treturn -1;\n\t\t},\n\n\t\t_getUrl: function(base, params) {\n\t\t\tparams = _.extend({format: 'json'}, params || {});\n\t\t\treturn OC.linkToOCS('apps/files_sharing/api/v1', 2) + base + '?' + OC.buildQueryString(params);\n\t\t},\n\n\t\t_fetchShares: function() {\n\t\t\tvar path = this.fileInfoModel.getFullPath();\n\t\t\treturn $.ajax({\n\t\t\t\ttype: 'GET',\n\t\t\t\turl: this._getUrl('shares', {path: path, reshares: true})\n\t\t\t});\n\t\t},\n\n\t\t_fetchReshare: function() {\n\t\t\t// only fetch original share once\n\t\t\tif (!this._reshareFetched) {\n\t\t\t\tvar path = this.fileInfoModel.getFullPath();\n\t\t\t\tthis._reshareFetched = true;\n\t\t\t\treturn $.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: this._getUrl('shares', {path: path, shared_with_me: true})\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn $.Deferred().resolve([{\n\t\t\t\t\tocs: {\n\t\t\t\t\t\tdata: [this.get('reshare')]\n\t\t\t\t\t}\n\t\t\t\t}]);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Group reshares into a single super share element.\n\t\t * Does this by finding the most precise share and\n\t\t * combines the permissions to be the most permissive.\n\t\t *\n\t\t * @param {Array} reshares\n\t\t * @return {Object} reshare\n\t\t */\n\t\t_groupReshares: function(reshares) {\n\t\t\tif (!reshares || !reshares.length) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar superShare = reshares.shift();\n\t\t\tvar combinedPermissions = superShare.permissions;\n\t\t\t_.each(reshares, function(reshare) {\n\t\t\t\t// use share have higher priority than group share\n\t\t\t\tif (reshare.share_type === OC.Share.SHARE_TYPE_USER && superShare.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\tsuperShare = reshare;\n\t\t\t\t}\n\t\t\t\tcombinedPermissions |= reshare.permissions;\n\t\t\t});\n\n\t\t\tsuperShare.permissions = combinedPermissions;\n\t\t\treturn superShare;\n\t\t},\n\n\t\tfetch: function(options) {\n\t\t\tvar model = this;\n\t\t\tthis.trigger('request', this);\n\n\t\t\tvar deferred = $.when(\n\t\t\t\tthis._fetchShares(),\n\t\t\t\tthis._fetchReshare()\n\t\t\t);\n\t\t\tdeferred.done(function(data1, data2) {\n\t\t\t\tmodel.trigger('sync', 'GET', this);\n\t\t\t\tvar sharesMap = {};\n\t\t\t\t_.each(data1[0].ocs.data, function(shareItem) {\n\t\t\t\t\tsharesMap[shareItem.id] = shareItem;\n\t\t\t\t});\n\n\t\t\t\tvar reshare = false;\n\t\t\t\tif (data2[0].ocs.data.length) {\n\t\t\t\t\treshare = model._groupReshares(data2[0].ocs.data);\n\t\t\t\t}\n\n\t\t\t\tmodel.set(model.parse({\n\t\t\t\t\tshares: sharesMap,\n\t\t\t\t\treshare: reshare\n\t\t\t\t}));\n\n\t\t\t\tif(!_.isUndefined(options) && _.isFunction(options.success)) {\n\t\t\t\t\toptions.success();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn deferred;\n\t\t},\n\n\t\t/**\n\t\t * Updates OC.Share.itemShares and OC.Share.statuses.\n\t\t *\n\t\t * This is required in case the user navigates away and comes back,\n\t\t * the share statuses from the old arrays are still used to fill in the icons\n\t\t * in the file list.\n\t\t */\n\t\t_legacyFillCurrentShares: function(shares) {\n\t\t\tvar fileId = this.fileInfoModel.get('id');\n\t\t\tif (!shares || !shares.length) {\n\t\t\t\tdelete OC.Share.statuses[fileId];\n\t\t\t\tOC.Share.currentShares = {};\n\t\t\t\tOC.Share.itemShares = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar currentShareStatus = OC.Share.statuses[fileId];\n\t\t\tif (!currentShareStatus) {\n\t\t\t\tcurrentShareStatus = {link: false};\n\t\t\t\tOC.Share.statuses[fileId] = currentShareStatus;\n\t\t\t}\n\t\t\tcurrentShareStatus.link = false;\n\n\t\t\tOC.Share.currentShares = {};\n\t\t\tOC.Share.itemShares = [];\n\t\t\t_.each(shares,\n\t\t\t\t/**\n\t\t\t\t * @param {OC.Share.Types.ShareInfo} share\n\t\t\t\t */\n\t\t\t\tfunction(share) {\n\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\tOC.Share.itemShares[share.share_type] = true;\n\t\t\t\t\t\tcurrentShareStatus.link = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!OC.Share.itemShares[share.share_type]) {\n\t\t\t\t\t\t\tOC.Share.itemShares[share.share_type] = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tOC.Share.itemShares[share.share_type].push(share.share_with);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\tparse: function(data) {\n\t\t\tif(data === false) {\n\t\t\t\tconsole.warn('no data was returned');\n\t\t\t\tthis.trigger('fetchError');\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tvar permissions = this.fileInfoModel.get('permissions');\n\t\t\tif(!_.isUndefined(data.reshare) && !_.isUndefined(data.reshare.permissions) && data.reshare.uid_owner !== OC.currentUser) {\n\t\t\t\tpermissions = permissions & data.reshare.permissions;\n\t\t\t}\n\n\t\t\tvar allowPublicUploadStatus = false;\n\t\t\tif(!_.isUndefined(data.shares)) {\n\t\t\t\t$.each(data.shares, function (key, value) {\n\t\t\t\t\tif (value.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\tallowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tvar allowPublicEditingStatus = true;\n\t\t\tif(!_.isUndefined(data.shares)) {\n\t\t\t\t$.each(data.shares, function (key, value) {\n\t\t\t\t\tif (value.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\tallowPublicEditingStatus = (value.permissions & OC.PERMISSION_UPDATE) ? true : false;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t\tvar hideFileListStatus = false;\n\t\t\tif(!_.isUndefined(data.shares)) {\n\t\t\t\t$.each(data.shares, function (key, value) {\n\t\t\t\t\tif (value.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\thideFileListStatus = (value.permissions & OC.PERMISSION_READ) ? false : true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t/** @type {OC.Share.Types.ShareInfo[]} **/\n\t\t\tvar shares = _.map(data.shares, function(share) {\n\t\t\t\t// properly parse some values because sometimes the server\n\t\t\t\t// returns integers as string...\n\t\t\t\tvar i;\n\t\t\t\tfor (i = 0; i < SHARE_RESPONSE_INT_PROPS.length; i++) {\n\t\t\t\t\tvar prop = SHARE_RESPONSE_INT_PROPS[i];\n\t\t\t\t\tif (!_.isUndefined(share[prop])) {\n\t\t\t\t\t\tshare[prop] = parseInt(share[prop], 10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn share;\n\t\t\t});\n\n\t\t\tthis._legacyFillCurrentShares(shares);\n\n\t\t\tvar linkShares = [];\n\t\t\t// filter out the share by link\n\t\t\tshares = _.reject(shares,\n\t\t\t\t/**\n\t\t\t\t * @param {OC.Share.Types.ShareInfo} share\n\t\t\t\t */\n\t\t\t\tfunction(share) {\n\t\t\t\t\tvar isShareLink =\n\t\t\t\t\t\tshare.share_type === OC.Share.SHARE_TYPE_LINK\n\t\t\t\t\t\t&& ( share.file_source === this.get('itemSource')\n\t\t\t\t\t\t|| share.item_source === this.get('itemSource'));\n\n\t\t\t\t\tif (isShareLink) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Ignore reshared link shares for now\n\t\t\t\t\t\t * FIXME: Find a way to display properly\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (share.uid_owner !== OC.currentUser) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar link = window.location.protocol + '//' + window.location.host;\n\t\t\t\t\t\tif (!share.token) {\n\t\t\t\t\t\t\t// pre-token link\n\t\t\t\t\t\t\tvar fullPath = this.fileInfoModel.get('path') + '/' +\n\t\t\t\t\t\t\t\tthis.fileInfoModel.get('name');\n\t\t\t\t\t\t\tvar location = '/' + OC.currentUser + '/files' + fullPath;\n\t\t\t\t\t\t\tvar type = this.fileInfoModel.isDirectory() ? 'folder' : 'file';\n\t\t\t\t\t\t\tlink += OC.linkTo('', 'public.php') + '?service=files&' +\n\t\t\t\t\t\t\t\ttype + '=' + encodeURIComponent(location);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlink += OC.generateUrl('/s/') + share.token;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlinkShares.push(_.extend({}, share, {\n\t\t\t\t\t\t\t// hide_download is returned as an int, so force it\n\t\t\t\t\t\t\t// to a boolean\n\t\t\t\t\t\t\thideDownload: !!share.hide_download,\n\t\t\t\t\t\t\tpassword: share.share_with,\n\t\t\t\t\t\t\tsendPasswordByTalk: share.send_password_by_talk\n\t\t\t\t\t\t}));\n\n\t\t\t\t\t\treturn share;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tthis\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\treshare: data.reshare,\n\t\t\t\tshares: shares,\n\t\t\t\tlinkShares: linkShares,\n\t\t\t\tpermissions: permissions,\n\t\t\t\tallowPublicUploadStatus: allowPublicUploadStatus,\n\t\t\t\tallowPublicEditingStatus: allowPublicEditingStatus,\n\t\t\t\thideFileListStatus: hideFileListStatus\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * Parses a string to an valid integer (unix timestamp)\n\t\t * @param time\n\t\t * @returns {*}\n\t\t * @internal Only used to work around a bug in the backend\n\t\t */\n\t\t_parseTime: function(time) {\n\t\t\tif (_.isString(time)) {\n\t\t\t\t// skip empty strings and hex values\n\t\t\t\tif (time === '' || (time.length > 1 && time[0] === '0' && time[1] === 'x')) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\ttime = parseInt(time, 10);\n\t\t\t\tif(isNaN(time)) {\n\t\t\t\t\ttime = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn time;\n\t\t},\n\n\t\t/**\n\t\t * Returns a list of share types from the existing shares.\n\t\t *\n\t\t * @return {Array.<int>} array of share types\n\t\t */\n\t\tgetShareTypes: function() {\n\t\t\tvar result;\n\t\t\tresult = _.pluck(this.getSharesWithCurrentItem(), 'share_type');\n\t\t\tif (this.hasLinkShares()) {\n\t\t\t\tresult.push(OC.Share.SHARE_TYPE_LINK);\n\t\t\t}\n\t\t\treturn _.uniq(result);\n\t\t}\n\t});\n\n\tOC.Share.ShareItemModel = ShareItemModel;\n})();\n","/**\n * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\tOC.Share.Social = {};\n\n\tvar SocialModel = OC.Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\t/** used for sorting social buttons */\n\t\t\tkey: null,\n\t\t\t/** url to open, {{reference}} will be replaced with the link */\n\t\t\turl: null,\n\t\t\t/** Name to show in the tooltip */\n\t\t\tname: null,\n\t\t\t/** Icon class to display */\n\t\t\ticonClass: null,\n\t\t\t/** Open in new windows */\n\t\t\tnewWindow: true\n\t\t}\n\t});\n\n\tOC.Share.Social.Model = SocialModel;\n\n\tvar SocialCollection = OC.Backbone.Collection.extend({\n\t\tmodel: OC.Share.Social.Model,\n\n\t\tcomparator: 'key'\n\t});\n\n\n\tOC.Share.Social.Collection = new SocialCollection;\n})();\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogResharerInfoView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogResharerInfo',\n\n\t\t/** @type {string} **/\n\t\ttagName: 'div',\n\n\t\t/** @type {string} **/\n\t\tclassName: 'reshare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {Function} **/\n\t\t_template: undefined,\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this;\n\n\t\t\tthis.model.on('change:reshare', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel';\n\t\t\t}\n\t\t},\n\n\t\trender: function() {\n\t\t\tif (!this.model.hasReshare()\n\t\t\t\t|| this.model.getReshareOwner() === OC.currentUser)\n\t\t\t{\n\t\t\t\tthis.$el.empty();\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar reshareTemplate = this.template();\n\t\t\tvar ownerDisplayName = this.model.getReshareOwnerDisplayname();\n\t\t\tvar shareNote = this.model.getReshareNote();\n\t\t\t\n\t\t\tvar sharedByText = '';\n\n\t\t\tif (this.model.getReshareType() === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tsharedByText = t(\n\t\t\t\t\t'core',\n\t\t\t\t\t'Shared with you and the group {group} by {owner}',\n\t\t\t\t\t{\n\t\t\t\t\t\tgroup: this.model.getReshareWithDisplayName(),\n\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t},\n\t\t\t\t\tundefined,\n\t\t\t\t\t{escape: false}\n\t\t\t\t);\n\t\t\t} else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\tsharedByText = t(\n\t\t\t\t\t'core',\n\t\t\t\t\t'Shared with you and {circle} by {owner}',\n\t\t\t\t\t{\n\t\t\t\t\t\tcircle: this.model.getReshareWithDisplayName(),\n\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t},\n\t\t\t\t\tundefined,\n\t\t\t\t\t{escape: false}\n\t\t\t\t);\n\t\t\t} else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\tif (this.model.get('reshare').share_with_displayname) {\n\t\t\t\t\tsharedByText = t(\n\t\t\t\t\t\t'core',\n\t\t\t\t\t\t'Shared with you and the conversation {conversation} by {owner}',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconversation: this.model.getReshareWithDisplayName(),\n\t\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t{escape: false}\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tsharedByText = t(\n\t\t\t\t\t\t'core',\n\t\t\t\t\t\t'Shared with you in a conversation by {owner}',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t{escape: false}\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsharedByText = t(\n\t\t\t\t\t'core',\n\t\t\t\t\t'Shared with you by {owner}',\n\t\t\t\t\t{ owner: ownerDisplayName },\n\t\t\t\t\tundefined,\n\t\t\t\t\t{escape: false}\n\t\t\t\t);\n\t\t\t}\n\n\n\n\t\t\tthis.$el.html(reshareTemplate({\n\t\t\t\treshareOwner: this.model.getReshareOwner(),\n\t\t\t\tsharedByText: sharedByText,\n\t\t\t\tshareNote: shareNote,\n\t\t\t\thasShareNote: shareNote !== ''\n\t\t\t}));\n\n\t\t\tthis.$el.find('.avatar').each(function() {\n\t\t\t\tvar $this = $(this);\n\t\t\t\t$this.avatar($this.data('username'), 32);\n\t\t\t});\n\n\t\t\tthis.$el.find('.reshare').contactsMenu(\n\t\t\t\tthis.model.getReshareOwner(),\n\t\t\t\tOC.Share.SHARE_TYPE_USER,\n\t\t\t\tthis.$el);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function () {\n\t\t\treturn OC.Share.Templates['sharedialogresharerinfoview'];\n\t\t}\n\n\t});\n\n\tOC.Share.ShareDialogResharerInfoView = ShareDialogResharerInfoView;\n\n})();\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Clipboard, Handlebars */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\tvar PASSWORD_PLACEHOLDER = '**********';\n\tvar PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the public link');\n\tvar PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL = t('core', 'Choose a password for the public link or press the \"Enter\" key');\n\n\t/**\n\t * @class OCA.Share.ShareDialogLinkShareView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogLinkShareView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogLinkShare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {boolean} **/\n\t\tshowLink: true,\n\n\t\t/** @type {boolean} **/\n\t\tshowPending: false,\n\n\t\t/** @type {string} **/\n\t\tpassword: '',\n\n\t\t/** @type {string} **/\n\t\tnewShareId: 'new-share',\n\n\t\tevents: {\n\t\t\t// open menu\n\t\t\t'click .share-menu .icon-more': 'onToggleMenu',\n\t\t\t// hide download\n\t\t\t'change .hideDownloadCheckbox': 'onHideDownloadChange',\n\t\t\t// password\n\t\t\t'click input.share-pass-submit': 'onPasswordEntered', \n\t\t\t'keyup input.linkPassText': 'onPasswordKeyUp', // check for the enter key\n\t\t\t'change .showPasswordCheckbox': 'onShowPasswordClick',\n\t\t\t'change .passwordByTalkCheckbox': 'onPasswordByTalkChange',\n\t\t\t'change .publicEditingCheckbox': 'onAllowPublicEditingChange',\n\t\t\t// copy link url\n\t\t\t'click .linkText': 'onLinkTextClick',\n\t\t\t// social\n\t\t\t'click .pop-up': 'onPopUpClick',\n\t\t\t// permission change\n\t\t\t'change .publicUploadRadio': 'onPublicUploadChange',\n\t\t\t// expire date\n\t\t\t'click .expireDate' : 'onExpireDateChange',\n\t\t\t'change .datepicker': 'onChangeExpirationDate',\n\t\t\t'click .datepicker' : 'showDatePicker',\n\t\t\t// note\n\t\t\t'click .share-add': 'showNoteForm',\n\t\t\t'click .share-note-delete': 'deleteNote',\n\t\t\t'click .share-note-submit': 'updateNote',\n\t\t\t// remove\n\t\t\t'click .unshare': 'onUnshare',\n\t\t\t// new share\n\t\t\t'click .new-share': 'newShare',\n\t\t\t// enforced pass set\n\t\t\t'submit .enforcedPassForm': 'enforcedPasswordSet',\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this;\n\n\t\t\tthis.model.on('change:permissions', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tthis.model.on('change:itemType', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tthis.model.on('change:allowPublicUploadStatus', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tthis.model.on('change:hideFileListStatus', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tthis.model.on('change:linkShares', function(model, linkShares) {\n\t\t\t\t// The \"Password protect by Talk\" item is shown only when there\n\t\t\t\t// is a password. Unfortunately there is no fine grained\n\t\t\t\t// rendering of items in the link shares, so the whole view\n\t\t\t\t// needs to be rendered again when the password of a share\n\t\t\t\t// changes.\n\t\t\t\t// Note that this event handler is concerned only about password\n\t\t\t\t// changes; other changes in the link shares does not trigger\n\t\t\t\t// a rendering, so the view must be rendered again as needed in\n\t\t\t\t// those cases (for example, when a link share is removed).\n\t\t\t\t\n\t\t\t\tvar previousLinkShares = model.previous('linkShares');\n\t\t\t\tif (previousLinkShares.length !== linkShares.length) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar i;\n\t\t\t\tfor (i = 0; i < linkShares.length; i++) {\n\t\t\t\t\tif (linkShares[i].id !== previousLinkShares[i].id) {\n\t\t\t\t\t\t// A resorting should never happen, but just in case.\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (linkShares[i].password !== previousLinkShares[i].password) {\n\t\t\t\t\t\tview.render();\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel';\n\t\t\t}\n\n\t\t\tvar clipboard = new Clipboard('.clipboard-button');\n\t\t\tclipboard.on('success', function(e) {\n\t\t\t\tvar $trigger = $(e.trigger);\n\n\t\t\t\t$trigger.tooltip('hide')\n\t\t\t\t\t.attr('data-original-title', t('core', 'Copied!'))\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip({placement: 'bottom', trigger: 'manual'})\n\t\t\t\t\t.tooltip('show');\n\t\t\t\t_.delay(function() {\n\t\t\t\t\t$trigger.tooltip('hide')\n\t\t\t\t\t\t.attr('data-original-title', t('core', 'Copy link'))\n\t\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t}, 3000);\n\t\t\t});\n\t\t\tclipboard.on('error', function (e) {\n\t\t\t\tvar $trigger = $(e.trigger);\n\t\t\t\tvar $menu = $trigger.next('.share-menu').find('.popovermenu');\n\t\t\t\tvar $linkTextMenu = $menu.find('li.linkTextMenu');\n\t\t\t\tvar $input = $linkTextMenu.find('.linkText');\n\n\t\t\t\tvar $li = $trigger.closest('li[data-share-id]');\n\t\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\t\t// show menu\n\t\t\t\tOC.showMenu(null, $menu);\n\n\t\t\t\tvar actionMsg = '';\n\t\t\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\t\t\tactionMsg = t('core', 'Not supported!');\n\t\t\t\t} else if (/Mac/i.test(navigator.userAgent)) {\n\t\t\t\t\tactionMsg = t('core', 'Press ⌘-C to copy.');\n\t\t\t\t} else {\n\t\t\t\t\tactionMsg = t('core', 'Press Ctrl-C to copy.');\n\t\t\t\t}\n\n\t\t\t\t$linkTextMenu.removeClass('hidden');\n\t\t\t\t$input.select();\n\t\t\t\t$input.tooltip('hide')\n\t\t\t\t\t.attr('data-original-title', actionMsg)\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip({placement: 'bottom', trigger: 'manual'})\n\t\t\t\t\t.tooltip('show');\n\t\t\t\t_.delay(function () {\n\t\t\t\t\t$input.tooltip('hide');\n\t\t\t\t\t$input.attr('data-original-title', t('core', 'Copy'))\n\t\t\t\t\t\t .tooltip('fixTitle');\n\t\t\t\t}, 3000);\n\t\t\t});\n\t\t},\n\n\t\tnewShare: function(event) {\n\t\t\tvar self = this;\n\t\t\tvar $target = $(event.target);\n\t\t\tvar $li = $target.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $loading = $li.find('.share-menu > .icon-loading-small');\n\n\t\t\tif(!$loading.hasClass('hidden') && this.password === '') {\n\t\t\t\t// in process\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// hide all icons and show loading\n\t\t\t$li.find('.icon').addClass('hidden');\n\t\t\t$loading.removeClass('hidden');\n\n\t\t\t// hide menu\n\t\t\tOC.hideMenus();\n\n\t\t\tvar shareData = {}\n\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink');\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced');\n\n\t\t\t// set default expire date\n\t\t\tif (isExpirationEnforced) {\n\t\t\t\tvar defaultExpireDays = this.configModel.get('defaultExpireDate');\n\t\t\t\tvar expireDate = moment().add(defaultExpireDays, 'day').format('DD-MM-YYYY')\n\t\t\t\tshareData.expireDate = expireDate;\n\t\t\t}\n\n\t\t\t// if password is set, add to data\n\t\t\tif (isPasswordEnforced && this.password !== '') {\n\t\t\t\tshareData.password = this.password\n\t\t\t}\n\n\t\t\tvar newShareId = false;\n\n\t\t\t// We need a password before the share creation\n\t\t\tif (isPasswordEnforced && !this.showPending && this.password === '') {\n\t\t\t\tthis.showPending = shareId;\n\t\t\t\tvar self = this.render();\n\t\t\t\tself.$el.find('.pending #enforcedPassText').focus();\n\t\t\t} else {\n\t\t\t\t// else, we have a password or it is not enforced\n\t\t\t\t$.when(this.model.saveLinkShare(shareData, {\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t\t$li.find('.icon').removeClass('hidden');\n\t\t\t\t\t\tself.render();\n\t\t\t\t\t\t// open the menu by default\n\t\t\t\t\t\t// we can only do that after the render\n\t\t\t\t\t\tif (newShareId) {\n\t\t\t\t\t\t\tvar shares = self.$el.find('li[data-share-id]');\n\t\t\t\t\t\t\tvar $newShare = self.$el.find('li[data-share-id=\"'+newShareId+'\"]');\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\t// empty function to override the default Dialog warning\n\t\t\t\t\t}\n\t\t\t\t})).fail(function(response) {\n\t\t\t\t\t// password failure? Show error\n\t\t\t\t\tself.password = ''\n\t\t\t\t\tif (isPasswordEnforced && response && response.responseJSON && response.responseJSON.ocs.meta && response.responseJSON.ocs.meta.message) {\n\t\t\t\t\t\tvar $input = self.$el.find('.pending #enforcedPassText')\n\t\t\t\t\t\t$input.tooltip('destroy');\n\t\t\t\t\t\t$input.attr('title', response.responseJSON.ocs.meta.message);\n\t\t\t\t\t\t$input.tooltip({placement: 'bottom', trigger: 'manual'});\n\t\t\t\t\t\t$input.tooltip('show');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to create a link share'));\n\t\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t\t$li.find('.icon').removeClass('hidden');\n\t\t\t\t\t}\n\t\t\t\t}).then(function(response) {\n\t\t\t\t\t// resolve before success\n\t\t\t\t\tnewShareId = response.ocs.data.id\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tenforcedPasswordSet: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tvar $form = $(event.target);\n\t\t\tvar $input = $form.find('input.enforcedPassText');\n\t\t\tthis.password = $input.val();\n\t\t\tthis.showPending = false;\n\t\t\tthis.newShare(event);\n\t\t},\n\n\t\tonLinkTextClick: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $el = $li.find('.linkText');\n\t\t\t$el.focus();\n\t\t\t$el.select();\n\t\t},\n\n\t\tonHideDownloadChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $checkbox = $li.find('.hideDownloadCheckbox');\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');\n\n\t\t\tvar hideDownload = false;\n\t\t\tif($checkbox.is(':checked')) {\n\t\t\t\thideDownload = true;\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\thideDownload: hideDownload,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'));\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonShowPasswordClick: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\t$li.find('.linkPass').slideToggle(OC.menuSpeed);\n\t\t\t$li.find('.linkPassMenu').toggleClass('hidden');\n\t\t\tif(!$li.find('.showPasswordCheckbox').is(':checked')) {\n\t\t\t\tthis.model.saveLinkShare({\n\t\t\t\t\tpassword: '',\n\t\t\t\t\tcid: shareId\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (!OC.Util.isIE()) {\n\t\t\t\t\t$li.find('.linkPassText').focus();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonPasswordKeyUp: function(event) {\n\t\t\tif(event.keyCode === 13) {\n\t\t\t\tthis.onPasswordEntered(event);\n\t\t\t}\n\t\t},\n\n\t\tonPasswordEntered: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $loading = $li.find('.linkPassMenu .icon-loading-small');\n\t\t\tif (!$loading.hasClass('hidden')) {\n\t\t\t\t// still in process\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar $input = $li.find('.linkPassText');\n\t\t\t$input.removeClass('error');\n\t\t\t$input.parent().find('input').removeClass('error');\n\t\t\tvar password = $input.val();\n\n\t\t\tif ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {\n\n\t\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\t\tif(password === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {\n\t\t\t\t\tpassword = '';\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\t\tif(password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$loading\n\t\t\t\t.removeClass('hidden')\n\t\t\t\t.addClass('inlineblock');\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpassword: password,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tcomplete: function(model) {\n\t\t\t\t\t$loading.removeClass('inlineblock').addClass('hidden');\n\t\t\t\t},\n\t\t\t\terror: function(model, msg) {\n\t\t\t\t\t// Add visual feedback to both the input and the submit button\n\t\t\t\t\t$input.parent().find('input').addClass('error');\n\n\t\t\t\t\t// destroy old tooltips\n\t\t\t\t\tvar $container = $input.parent();\n\t\t\t\t\t$container.tooltip('destroy');\n\t\t\t\t\t$input.addClass('error');\n\t\t\t\t\t$container.attr('title', msg);\n\t\t\t\t\t$container.tooltip({placement: 'bottom', trigger: 'manual'});\n\t\t\t\t\t$container.tooltip('show');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonPasswordByTalkChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $checkbox = $li.find('.passwordByTalkCheckbox');\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');\n\n\t\t\tvar sendPasswordByTalk = false;\n\t\t\tif($checkbox.is(':checked')) {\n\t\t\t\tsendPasswordByTalk = true;\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tsendPasswordByTalk: sendPasswordByTalk,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'));\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonAllowPublicEditingChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $checkbox = $li.find('.publicEditingCheckbox');\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');\n\n\t\t\tvar permissions = OC.PERMISSION_READ;\n\t\t\tif($checkbox.is(':checked')) {\n\t\t\t\tpermissions = OC.PERMISSION_UPDATE | OC.PERMISSION_READ;\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpermissions: permissions,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'));\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\tonPublicUploadChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar permissions = event.currentTarget.value;\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpermissions: permissions,\n\t\t\t\tcid: shareId\n\t\t\t});\n\t\t},\n\n\t\tshowNoteForm: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\t// show elements\n\t\t\t$menu.find('.share-note-delete').toggleClass('hidden');\n\t\t\t$form.toggleClass('hidden');\n\t\t\t$form.find('textarea').focus();\n\t\t},\n\n\t\tdeleteNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\t$form.find('.share-note').val('');\n\n\t\t\t$form.addClass('hidden');\n\t\t\t$menu.find('.share-note-delete').addClass('hidden');\n\n\t\t\tself.sendNote('', shareId, $menu);\n\t\t},\n\n\t\tupdateNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $form = $element.closest('li.share-note-form');\n\t\t\tvar $menu = $form.prev('li');\n\t\t\tvar message = $form.find('.share-note').val().trim();\n\n\t\t\tif (message.length < 1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.sendNote(message, shareId, $menu);\n\t\t},\n\n\t\tsendNote: function(note, shareId, $menu) {\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\t\t\tvar $submit = $form.find('input.share-note-submit');\n\t\t\tvar $error = $form.find('input.share-note-error');\n\n\t\t\t$submit.prop('disabled', true);\n\t\t\t$menu.find('.icon-loading-small').removeClass('hidden');\n\t\t\t$menu.find('.icon-edit').hide();\n\n\t\t\tvar complete = function() {\n\t\t\t\t$submit.prop('disabled', false);\n\t\t\t\t$menu.find('.icon-loading-small').addClass('hidden');\n\t\t\t\t$menu.find('.icon-edit').show();\n\t\t\t};\n\t\t\tvar error = function() {\n\t\t\t\t$error.show();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$error.hide();\n\t\t\t\t}, 3000);\n\t\t\t};\n\n\t\t\t// send data\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares',2) + shareId + '?' + OC.buildQueryString({format: 'json'}),\n\t\t\t\tdata: { note: note },\n\t\t\t\tcomplete : complete,\n\t\t\t\terror: error\n\t\t\t});\n\t\t},\n\n\t\trender: function() {\n\t\t\tthis.$el.find('.has-tooltip').tooltip();\n\n\t\t\t// reset previously set passwords\n\t\t\tthis.password = '';\n\n\t\t\tvar linkShareTemplate = this.template();\n\t\t\tvar resharingAllowed = this.model.sharePermissionPossible();\n\n\t\t\tif(!resharingAllowed\n\t\t\t\t|| !this.showLink\n\t\t\t\t|| !this.configModel.isShareWithLinkAllowed())\n\t\t\t{\n\t\t\t\tvar templateData = {shareAllowed: false};\n\t\t\t\tif (!resharingAllowed) {\n\t\t\t\t\t// add message\n\t\t\t\t\ttemplateData.noSharingPlaceholder = t('core', 'Resharing is not allowed');\n\t\t\t\t}\n\t\t\t\tthis.$el.html(linkShareTemplate(templateData));\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar publicUpload =\n\t\t\t\tthis.model.isFolder()\n\t\t\t\t&& this.model.createPermissionPossible()\n\t\t\t\t&& this.configModel.isPublicUploadEnabled();\n\n\n\t\t\tvar publicEditingChecked = '';\n\t\t\tif(this.model.isPublicEditingAllowed()) {\n\t\t\t\tpublicEditingChecked = 'checked=\"checked\"';\n\t\t\t}\n\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink');\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true;\n\t\t\tvar passwordPlaceholderInitial = this.configModel.get('enforcePasswordForPublicLink')\n\t\t\t\t? PASSWORD_PLACEHOLDER_MESSAGE : PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL;\n\n\t\t\tvar publicEditable =\n\t\t\t\t!this.model.isFolder()\n\t\t\t\t&& this.model.updatePermissionPossible();\n\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced');\n\n\t\t\t// what if there is another date picker on that page?\n\t\t\tvar minDate = new Date();\n\t\t\t// min date should always be the next day\n\t\t\tminDate.setDate(minDate.getDate()+1);\n\n\t\t\t$.datepicker.setDefaults({\n\t\t\t\tminDate: minDate\n\t\t\t});\n\n\t\t\tthis.$el.find('.datepicker').datepicker({dateFormat : 'dd-mm-yy'});\n\n\t\t\tvar minPasswordLength = 4\n\t\t\t// password policy?\n\t\t\tif(OC.getCapabilities().password_policy && OC.getCapabilities().password_policy.minLength) {\n\t\t\t\tminPasswordLength = OC.getCapabilities().password_policy.minLength;\n\t\t\t}\n\n\t\t\tvar popoverBase = {\n\t\t\t\turlLabel: t('core', 'Link'),\n\t\t\t\thideDownloadLabel: t('core', 'Hide download'),\n\t\t\t\tenablePasswordLabel: isPasswordEnforced ? t('core', 'Password protection enforced') : t('core', 'Password protect'),\n\t\t\t\tpasswordLabel: t('core', 'Password'),\n\t\t\t\tpasswordPlaceholderInitial: passwordPlaceholderInitial,\n\t\t\t\tpublicUpload: publicUpload,\n\t\t\t\tpublicEditing: publicEditable,\n\t\t\t\tpublicEditingChecked: publicEditingChecked,\n\t\t\t\tpublicEditingLabel: t('core', 'Allow editing'),\n\t\t\t\tmailPrivatePlaceholder: t('core', 'Email link to person'),\n\t\t\t\tmailButtonText: t('core', 'Send'),\n\t\t\t\tpublicUploadRWLabel: t('core', 'Allow upload and editing'),\n\t\t\t\tpublicUploadRLabel: t('core', 'Read only'),\n\t\t\t\tpublicUploadWLabel: t('core', 'File drop (upload only)'),\n\t\t\t\tpublicUploadRWValue: OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE,\n\t\t\t\tpublicUploadRValue: OC.PERMISSION_READ,\n\t\t\t\tpublicUploadWValue: OC.PERMISSION_CREATE,\n\t\t\t\texpireDateLabel: isExpirationEnforced ? t('core', 'Expiration date enforced') : t('core', 'Set expiration date'),\n\t\t\t\texpirationLabel: t('core', 'Expiration'),\n\t\t\t\texpirationDatePlaceholder: t('core', 'Expiration date'),\n\t\t\t\tisExpirationEnforced: isExpirationEnforced,\n\t\t\t\tisPasswordEnforced: isPasswordEnforced,\n\t\t\t\tdefaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today\n\t\t\t\taddNoteLabel: t('core', 'Note to recipient'),\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t\tunshareLinkLabel: t('core', 'Delete share link'),\n\t\t\t\tnewShareLabel: t('core', 'Add another link'),\n\t\t\t};\n\n\t\t\tvar pendingPopover = {\n\t\t\t\tisPasswordEnforced: isPasswordEnforced,\n\t\t\t\tenforcedPasswordLabel: t('core', 'Password protection for links is mandatory'),\n\t\t\t\tpasswordPlaceholder: passwordPlaceholderInitial,\n\t\t\t\tminPasswordLength: minPasswordLength,\n\t\t\t};\n\t\t\tvar pendingPopoverMenu = this.pendingPopoverMenuTemplate(_.extend({}, pendingPopover))\n\n\t\t\tvar linkShares = this.getShareeList();\n\t\t\tif(_.isArray(linkShares)) {\n\t\t\t\tfor (var i = 0; i < linkShares.length; i++) {\n\t\t\t\t\tvar social = [];\n\t\t\t\t\tOC.Share.Social.Collection.each(function (model) {\n\t\t\t\t\t\tvar url = model.get('url');\n\t\t\t\t\t\turl = url.replace('{{reference}}', linkShares[i].shareLinkURL);\n\t\t\t\t\t\tsocial.push({\n\t\t\t\t\t\t\turl: url,\n\t\t\t\t\t\t\tlabel: t('core', 'Share to {name}', {name: model.get('name')}),\n\t\t\t\t\t\t\tname: model.get('name'),\n\t\t\t\t\t\t\ticonClass: model.get('iconClass'),\n\t\t\t\t\t\t\tnewWindow: model.get('newWindow')\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tvar popover = this.getPopoverObject(linkShares[i])\n\t\t\t\t\tlinkShares[i].popoverMenu = this.popoverMenuTemplate(_.extend({}, popoverBase, popover, {social: social}));\n\t\t\t\t\tlinkShares[i].pendingPopoverMenu = pendingPopoverMenu\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.$el.html(linkShareTemplate({\n\t\t\t\tlinkShares: linkShares,\n\t\t\t\tshareAllowed: true,\n\t\t\t\tnolinkShares: linkShares.length === 0,\n\t\t\t\tnewShareLabel: t('core', 'Share link'),\n\t\t\t\tnewShareTitle: t('core', 'New share link'),\n\t\t\t\tpendingPopoverMenu: pendingPopoverMenu,\n\t\t\t\tshowPending: this.showPending === this.newShareId,\n\t\t\t\tnewShareId: this.newShareId,\n\t\t\t}));\n\n\t\t\tthis.delegateEvents();\n\n\t\t\t// new note autosize\n\t\t\tautosize(this.$el.find('.share-note-form .share-note'));\n\n\t\t\treturn this;\n\t\t},\n\n\t\tonToggleMenu: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $menu = $li.find('.sharingOptionsGroup .popovermenu');\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tOC.showMenu(null, $menu);\n\n\t\t\t// focus the password if not set and enforced\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true;\n\t\t\tvar haspassword = $menu.find('.linkPassText').val() !== '';\n\n\t\t\tif (!haspassword && isPasswordEnabledByDefault) {\n\t\t\t\t$menu.find('.linkPassText').focus();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function () {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview'];\n\t\t},\n\n\t\t/**\n\t\t * renders the popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview_popover_menu'](data);\n\t\t},\n\n\t\t/**\n\t\t * renders the pending popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpendingPopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview_popover_menu_pending'](data);\n\t\t},\n\n\t\tonPopUpClick: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\n\t\t\tvar url = $(event.currentTarget).data('url');\n\t\t\tvar newWindow = $(event.currentTarget).data('window');\n\t\t\t$(event.currentTarget).tooltip('hide');\n\t\t\tif (url) {\n\t\t\t\tif (newWindow === true) {\n\t\t\t\t\tvar width = 600;\n\t\t\t\t\tvar height = 400;\n\t\t\t\t\tvar left = (screen.width / 2) - (width / 2);\n\t\t\t\t\tvar top = (screen.height / 2) - (height / 2);\n\n\t\t\t\t\twindow.open(url, 'name', 'width=' + width + ', height=' + height + ', top=' + top + ', left=' + left);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonExpireDateChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar expirationDatePicker = '#expirationDateContainer-' + shareId;\n\t\t\tvar datePicker = $(expirationDatePicker);\n\t\t\tvar state = $element.prop('checked');\n\t\t\tdatePicker.toggleClass('hidden', !state);\n\n\t\t\tif (!state) {\n\t\t\t\t// disabled, let's hide the input and\n\t\t\t\t// set the expireDate to nothing\n\t\t\t\t$element.closest('li').next('li').addClass('hidden');\n\t\t\t\tthis.setExpirationDate('', shareId);\n\t\t\t} else {\n\t\t\t\t// enabled, show the input and the datepicker\n\t\t\t\t$element.closest('li').next('li').removeClass('hidden');\n\t\t\t\tthis.showDatePicker(event);\n\n\t\t\t}\n\t\t},\n\n\t\tshowDatePicker: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar maxDate = $element.data('max-date');\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + shareId;\n\t\t\tvar self = this;\n\n\t\t\t$(expirationDatePicker).datepicker({\n\t\t\t\tdateFormat : 'dd-mm-yy',\n\t\t\t\tonSelect: function (expireDate) {\n\t\t\t\t\tself.setExpirationDate(expireDate, shareId);\n\t\t\t\t},\n\t\t\t\tmaxDate: maxDate\n\t\t\t});\n\t\t\t$(expirationDatePicker).datepicker('show');\n\t\t\t$(expirationDatePicker).focus();\n\n\t\t},\n\n\t\tsetExpirationDate: function(expireDate, shareId) {\n\t\t\tthis.model.saveLinkShare({expireDate: expireDate, cid: shareId});\n\t\t},\n\n\t\tonChangeExpirationDate: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar expireDate = $element.val();\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + shareId;\n\n\t\t\tthis.setExpirationDate(expireDate, shareId);\n\t\t\t$(expirationDatePicker).datepicker('hide');\n\t\t},\n\n\t\t/**\n\t\t * get an array of sharees' share properties\n\t\t *\n\t\t * @returns {Array}\n\t\t */\n\t\tgetShareeList: function() {\n\t\t\tvar shares = this.model.get('linkShares');\n\n\t\t\tif(!this.model.hasLinkShares()) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tvar list = [];\n\t\t\tfor(var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index);\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, share));\n\t\t\t}\n\n\t\t\treturn list;\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {OC.Share.Types.ShareInfo} shareInfo\n\t\t * @returns {object}\n\t\t */\n\t\tgetShareeObject: function(shareIndex) {\n\t\t\tvar share = this.model.get('linkShares')[shareIndex];\n\n\t\t\treturn _.extend({}, share, {\n\t\t\t\tcid: share.id,\n\t\t\t\tshareAllowed: true,\n\t\t\t\tlinkShareLabel: share.label ? share.label : t('core', 'Share link'),\n\t\t\t\tpopoverMenu: {},\n\t\t\t\tshareLinkURL: share.url,\n\t\t\t\tnewShareTitle: t('core', 'New share link'),\n\t\t\t\tcopyLabel: t('core', 'Copy link'),\n\t\t\t\tshowPending: this.showPending === share.id,\n\t\t\t\tlinkShareCreationDate: t('core', 'Created on {time}', { time: moment(share.stime * 1000).format('LLLL') })\n\t\t\t})\n\t\t},\n\n\t\tgetPopoverObject: function(share) {\n\t\t\tvar publicUploadRWChecked = '';\n\t\t\tvar publicUploadRChecked = '';\n\t\t\tvar publicUploadWChecked = '';\n\n\t\t\tswitch (this.model.linkSharePermissions(share.id)) {\n\t\t\t\tcase OC.PERMISSION_READ:\n\t\t\t\t\tpublicUploadRChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_CREATE:\n\t\t\t\t\tpublicUploadWChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE:\n\t\t\t\t\tpublicUploadRWChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tvar isPasswordSet = !!share.password;\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true;\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink');\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced');\n\t\t\tvar defaultExpireDays = this.configModel.get('defaultExpireDate');\n\t\t\tvar hasExpireDate = !!share.expiration || isExpirationEnforced;\n\n\t\t\tvar expireDate;\n\t\t\tif (hasExpireDate) {\n\t\t\t\texpireDate = moment(share.expiration, 'YYYY-MM-DD').format('DD-MM-YYYY');\n\t\t\t}\n\n\t\t\tvar isTalkEnabled = OC.appswebroots['spreed'] !== undefined;\n\t\t\tvar sendPasswordByTalk = share.sendPasswordByTalk;\n\n\t\t\tvar hideDownload = share.hideDownload;\n\n\t\t\tvar maxDate = null;\n\n\t\t\tif(hasExpireDate) {\n\t\t\t\tif(isExpirationEnforced) {\n\t\t\t\t\t// TODO: hack: backend returns string instead of integer\n\t\t\t\t\tvar shareTime = share.stime;\n\t\t\t\t\tif (_.isNumber(shareTime)) {\n\t\t\t\t\t\tshareTime = new Date(shareTime * 1000);\n\t\t\t\t\t}\n\t\t\t\t\tif (!shareTime) {\n\t\t\t\t\t\tshareTime = new Date(); // now\n\t\t\t\t\t}\n\t\t\t\t\tshareTime = OC.Util.stripTime(shareTime).getTime();\n\t\t\t\t\tmaxDate = new Date(shareTime + defaultExpireDays * 24 * 3600 * 1000);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcid: share.id,\n\t\t\t\tshareLinkURL: share.url,\n\t\t\t\tpasswordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t\tisPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,\n\t\t\t\tshowPasswordByTalkCheckBox: isTalkEnabled && isPasswordSet,\n\t\t\t\tpasswordByTalkLabel: t('core', 'Password protect by Talk'),\n\t\t\t\tisPasswordByTalkSet: sendPasswordByTalk,\n\t\t\t\tpublicUploadRWChecked: publicUploadRWChecked,\n\t\t\t\tpublicUploadRChecked: publicUploadRChecked,\n\t\t\t\tpublicUploadWChecked: publicUploadWChecked,\n\t\t\t\thasExpireDate: hasExpireDate,\n\t\t\t\texpireDate: expireDate,\n\t\t\t\tshareNote: share.note,\n\t\t\t\thasNote: share.note !== '',\n\t\t\t\tmaxDate: maxDate,\n\t\t\t\thideDownload: hideDownload,\n\t\t\t\tisExpirationEnforced: isExpirationEnforced,\n\t\t\t}\n\t\t},\n\n\t\tonUnshare: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tif (!$element.is('a')) {\n\t\t\t\t$element = $element.closest('a');\n\t\t\t}\n\n\t\t\tvar $loading = $element.find('.icon-loading-small').eq(0);\n\t\t\tif(!$loading.hasClass('hidden')) {\n\t\t\t\t// in process\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$loading.removeClass('hidden');\n\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tself.model.removeShare(shareId, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$li.remove();\n\t\t\t\t\tself.render()\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Could not unshare'));\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn false;\n\t\t},\n\n\n\t});\n\n\tOC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView;\n\n})();\n","/* global OC, Handlebars */\n\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\n\tvar PASSWORD_PLACEHOLDER = '**********';\n\tvar PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the mail share');\n\n\tif (!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogShareeListView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the sharee list part in the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogShareeListView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogLinkShare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t_menuOpen: false,\n\n\t\t/** @type {boolean|number} **/\n\t\t_renderPermissionChange: false,\n\n\t\tevents: {\n\t\t\t'click .unshare': 'onUnshare',\n\t\t\t'click .share-add': 'showNoteForm',\n\t\t\t'click .share-note-delete': 'deleteNote',\n\t\t\t'click .share-note-submit': 'updateNote',\n\t\t\t'click .share-menu .icon-more': 'onToggleMenu',\n\t\t\t'click .permissions': 'onPermissionChange',\n\t\t\t'click .expireDate' : 'onExpireDateChange',\n\t\t\t'click .password' : 'onMailSharePasswordProtectChange',\n\t\t\t'click .passwordByTalk' : 'onMailSharePasswordProtectByTalkChange',\n\t\t\t'click .secureDrop' : 'onSecureDropChange',\n\t\t\t'keyup input.passwordField': 'onMailSharePasswordKeyUp',\n\t\t\t'focusout input.passwordField': 'onMailSharePasswordEntered',\n\t\t\t'change .datepicker': 'onChangeExpirationDate',\n\t\t\t'click .datepicker' : 'showDatePicker'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel';\n\t\t\t}\n\n\t\t\tvar view = this;\n\t\t\tthis.model.on('change:shares', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {OC.Share.Types.ShareInfo} shareInfo\n\t\t * @returns {object}\n\t\t */\n\t\tgetShareeObject: function(shareIndex) {\n\t\t\tvar shareWith = this.model.getShareWith(shareIndex);\n\t\t\tvar shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex);\n\t\t\tvar shareWithAvatar = this.model.getShareWithAvatar(shareIndex);\n\t\t\tvar shareWithTitle = '';\n\t\t\tvar shareType = this.model.getShareType(shareIndex);\n\t\t\tvar sharedBy = this.model.getSharedBy(shareIndex);\n\t\t\tvar sharedByDisplayName = this.model.getSharedByDisplayName(shareIndex);\n\t\t\tvar fileOwnerUid = this.model.getFileOwnerUid(shareIndex);\n\n\t\t\tvar hasPermissionOverride = {};\n\t\t\tif (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'group') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'remote') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'remote group') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'email') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'conversation') + ')';\n\t\t\t}\n\n\t\t\tif (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'group') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'remote') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'remote group') + ')';\n\t\t\t}\n\t\t\telse if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'email') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\tshareWithTitle = shareWith;\n\t\t\t\t// Force \"shareWith\" in the template to a safe value, as the\n\t\t\t\t// original \"shareWith\" returned by the model may contain\n\t\t\t\t// problematic characters like \"'\".\n\t\t\t\tshareWith = 'circle-' + shareIndex;\n\t\t\t}\n\n\t\t\tif (sharedBy !== OC.getCurrentUser().uid) {\n\t\t\t\tvar empty = shareWithTitle === '';\n\t\t\t\tif (!empty) {\n\t\t\t\t\tshareWithTitle += ' (';\n\t\t\t\t}\n\t\t\t\tshareWithTitle += t('core', 'shared by {sharer}', {sharer: sharedByDisplayName});\n\t\t\t\tif (!empty) {\n\t\t\t\t\tshareWithTitle += ')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar share = this.model.get('shares')[shareIndex];\n\t\t\tvar password = share.password;\n\t\t\tvar hasPassword = password !== null && password !== '';\n\t\t\tvar sendPasswordByTalk = share.send_password_by_talk;\n\n\t\t\tvar shareNote = this.model.getNote(shareIndex);\n\n\t\t\treturn _.extend(hasPermissionOverride, {\n\t\t\t\tcid: this.cid,\n\t\t\t\thasSharePermission: this.model.hasSharePermission(shareIndex),\n\t\t\t\teditPermissionState: this.model.editPermissionState(shareIndex),\n\t\t\t\thasCreatePermission: this.model.hasCreatePermission(shareIndex),\n\t\t\t\thasUpdatePermission: this.model.hasUpdatePermission(shareIndex),\n\t\t\t\thasDeletePermission: this.model.hasDeletePermission(shareIndex),\n\t\t\t\tsharedBy: sharedBy,\n\t\t\t\tsharedByDisplayName: sharedByDisplayName,\n\t\t\t\tshareWith: shareWith,\n\t\t\t\tshareWithDisplayName: shareWithDisplayName,\n\t\t\t\tshareWithAvatar: shareWithAvatar,\n\t\t\t\tshareWithTitle: shareWithTitle,\n\t\t\t\tshareType: shareType,\n\t\t\t\tshareId: this.model.get('shares')[shareIndex].id,\n\t\t\t\tmodSeed: shareWithAvatar || (shareType !== OC.Share.SHARE_TYPE_USER && shareType !== OC.Share.SHARE_TYPE_CIRCLE && shareType !== OC.Share.SHARE_TYPE_ROOM),\n\t\t\t\towner: fileOwnerUid,\n\t\t\t\tisShareWithCurrentUser: (shareType === OC.Share.SHARE_TYPE_USER && shareWith === OC.getCurrentUser().uid),\n\t\t\t\tcanUpdateShareSettings: (sharedBy === OC.getCurrentUser().uid || fileOwnerUid === OC.getCurrentUser().uid),\n\t\t\t\tisRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE,\n\t\t\t\tisRemoteGroupShare: shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP,\n\t\t\t\tisNoteAvailable: shareType !== OC.Share.SHARE_TYPE_REMOTE && shareType !== OC.Share.SHARE_TYPE_REMOTE_GROUP,\n\t\t\t\tisMailShare: shareType === OC.Share.SHARE_TYPE_EMAIL,\n\t\t\t\tisCircleShare: shareType === OC.Share.SHARE_TYPE_CIRCLE,\n\t\t\t\tisFileSharedByMail: shareType === OC.Share.SHARE_TYPE_EMAIL && !this.model.isFolder(),\n\t\t\t\tisPasswordSet: hasPassword && !sendPasswordByTalk,\n\t\t\t\tisPasswordByTalkSet: hasPassword && sendPasswordByTalk,\n\t\t\t\tisTalkEnabled: OC.appswebroots['spreed'] !== undefined,\n\t\t\t\tsecureDropMode: !this.model.hasReadPermission(shareIndex),\n\t\t\t\thasExpireDate: this.model.getExpireDate(shareIndex) !== null,\n\t\t\t\tshareNote: shareNote,\n\t\t\t\thasNote: shareNote !== '',\n\t\t\t\texpireDate: moment(this.model.getExpireDate(shareIndex), 'YYYY-MM-DD').format('DD-MM-YYYY'),\n\t\t\t\t// The password placeholder does not take into account if\n\t\t\t\t// sending the password by Talk is enabled or not; when\n\t\t\t\t// switching from sending the password by Talk to sending the\n\t\t\t\t// password by email the password is reused and the share\n\t\t\t\t// updated, so the placeholder already shows the password in the\n\t\t\t\t// brief time between disabling sending the password by email\n\t\t\t\t// and receiving the updated share.\n\t\t\t\tpasswordPlaceholder: hasPassword ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t\tpasswordByTalkPlaceholder: (hasPassword && sendPasswordByTalk)? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t});\n\t\t},\n\n\t\tgetShareProperties: function() {\n\t\t\treturn {\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t\taddNoteLabel: t('core', 'Note to recipient'),\n\t\t\t\tcanShareLabel: t('core', 'Can reshare'),\n\t\t\t\tcanEditLabel: t('core', 'Can edit'),\n\t\t\t\tcreatePermissionLabel: t('core', 'Can create'),\n\t\t\t\tupdatePermissionLabel: t('core', 'Can change'),\n\t\t\t\tdeletePermissionLabel: t('core', 'Can delete'),\n\t\t\t\tsecureDropLabel: t('core', 'File drop (upload only)'),\n\t\t\t\texpireDateLabel: t('core', 'Set expiration date'),\n\t\t\t\tpasswordLabel: t('core', 'Password protect'),\n\t\t\t\tpasswordByTalkLabel: t('core', 'Password protect by Talk'),\n\t\t\t\tcrudsLabel: t('core', 'Access control'),\n\t\t\t\texpirationDatePlaceholder: t('core', 'Expiration date'),\n\t\t\t\tdefaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today\n\t\t\t\ttriangleSImage: OC.imagePath('core', 'actions/triangle-s'),\n\t\t\t\tisResharingAllowed: this.configModel.get('isResharingAllowed'),\n\t\t\t\tisPasswordForMailSharesRequired: this.configModel.get('isPasswordForMailSharesRequired'),\n\t\t\t\tsharePermissionPossible: this.model.sharePermissionPossible(),\n\t\t\t\teditPermissionPossible: this.model.editPermissionPossible(),\n\t\t\t\tcreatePermissionPossible: this.model.createPermissionPossible(),\n\t\t\t\tupdatePermissionPossible: this.model.updatePermissionPossible(),\n\t\t\t\tdeletePermissionPossible: this.model.deletePermissionPossible(),\n\t\t\t\tsharePermission: OC.PERMISSION_SHARE,\n\t\t\t\tcreatePermission: OC.PERMISSION_CREATE,\n\t\t\t\tupdatePermission: OC.PERMISSION_UPDATE,\n\t\t\t\tdeletePermission: OC.PERMISSION_DELETE,\n\t\t\t\treadPermission: OC.PERMISSION_READ,\n\t\t\t\tisFolder: this.model.isFolder()\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * get an array of sharees' share properties\n\t\t *\n\t\t * @returns {Array}\n\t\t */\n\t\tgetShareeList: function() {\n\t\t\tvar universal = this.getShareProperties();\n\n\t\t\tif(!this.model.hasUserShares()) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tvar shares = this.model.get('shares');\n\t\t\tvar list = [];\n\t\t\tfor(var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index);\n\n\t\t\t\tif (share.shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, universal, share));\n\t\t\t}\n\n\t\t\treturn list;\n\t\t},\n\n\t\tgetLinkReshares: function() {\n\t\t\tvar universal = {\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t};\n\n\t\t\tif(!this.model.hasUserShares()) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tvar shares = this.model.get('shares');\n\t\t\tvar list = [];\n\t\t\tfor(var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index);\n\n\t\t\t\tif (share.shareType !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, universal, share, {\n\t\t\t\t\tshareInitiator: shares[index].uid_owner,\n\t\t\t\t\tshareInitiatorText: t('core', '{shareInitiatorDisplayName} shared via link', {shareInitiatorDisplayName: shares[index].displayname_owner})\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\treturn list;\n\t\t},\n\n\t\trender: function() {\n\t\t\tif(!this._renderPermissionChange) {\n\t\t\t\tthis.$el.html(this.template({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tsharees: this.getShareeList(),\n\t\t\t\t\tlinkReshares: this.getLinkReshares()\n\t\t\t\t}));\n\n\t\t\t\tthis.$('.avatar').each(function () {\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\tif ($this.hasClass('imageplaceholderseed')) {\n\t\t\t\t\t\t$this.css({width: 32, height: 32});\n\t\t\t\t\t\tif ($this.data('avatar')) {\n\t\t\t\t\t\t\t$this.css('border-radius', '0%');\n\t\t\t\t\t\t\t$this.css('background', 'url(' + $this.data('avatar') + ') no-repeat');\n\t\t\t\t\t\t\t$this.css('background-size', '31px');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.imageplaceholder($this.data('seed'));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// user, size, ie8fix, hidedefault, callback, displayname\n\t\t\t\t\t\t$this.avatar($this.data('username'), 32, undefined, undefined, undefined, $this.data('displayname'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.$('.has-tooltip').tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\n\t\t\t\tthis.$('ul.shareWithList > li').each(function() {\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\tvar shareWith = $this.data('share-with');\n\t\t\t\t\tvar shareType = $this.data('share-type');\n\n\t\t\t\t\t$this.find('div.avatar, span.username').contactsMenu(shareWith, shareType, $this);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tvar permissionChangeShareId = parseInt(this._renderPermissionChange, 10);\n\t\t\t\tvar shareWithIndex = this.model.findShareWithIndex(permissionChangeShareId);\n\t\t\t\tvar sharee = this.getShareeObject(shareWithIndex);\n\t\t\t\t$.extend(sharee, this.getShareProperties());\n\t\t\t\tvar $li = this.$('li[data-share-id=' + permissionChangeShareId + ']');\n\t\t\t\t$li.find('.sharingOptionsGroup .popovermenu').replaceWith(this.popoverMenuTemplate(sharee));\n\t\t\t}\n\n\t\t\tvar _this = this;\n\t\t\tthis.getShareeList().forEach(function(sharee) {\n\t\t\t\tvar $edit = _this.$('#canEdit-' + _this.cid + '-' + sharee.shareId);\n\t\t\t\tif($edit.length === 1) {\n\t\t\t\t\t$edit.prop('checked', sharee.editPermissionState === 'checked');\n\t\t\t\t\tif (sharee.isFolder) {\n\t\t\t\t\t\t$edit.prop('indeterminate', sharee.editPermissionState === 'indeterminate');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.$('.popovermenu').on('afterHide', function() {\n\t\t\t\t_this._menuOpen = false;\n\t\t\t});\n\t\t\tthis.$('.popovermenu').on('beforeHide', function() {\n\t\t\t\tvar shareId = parseInt(_this._menuOpen, 10);\n\t\t\t\tif(!_.isNaN(shareId)) {\n\t\t\t\t\tvar datePickerClass = '.expirationDateContainer-' + _this.cid + '-' + shareId;\n\t\t\t\t\tvar datePickerInput = '#expirationDatePicker-' + _this.cid + '-' + shareId;\n\t\t\t\t\tvar expireDateCheckbox = '#expireDate-' + _this.cid + '-' + shareId;\n\t\t\t\t\tif ($(expireDateCheckbox).prop('checked')) {\n\t\t\t\t\t\t$(datePickerInput).removeClass('hidden-visually');\n\t\t\t\t\t\t$(datePickerClass).removeClass('hasDatepicker');\n\t\t\t\t\t\t$(datePickerClass + ' .ui-datepicker').hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (this._menuOpen !== false) {\n\t\t\t\t// Open menu again if it was opened before\n\t\t\t\tvar shareId = parseInt(this._menuOpen, 10);\n\t\t\t\tif(!_.isNaN(shareId)) {\n\t\t\t\t\tvar liSelector = 'li[data-share-id=' + shareId + ']';\n\t\t\t\t\tOC.showMenu(null, this.$(liSelector + ' .sharingOptionsGroup .popovermenu'));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._renderPermissionChange = false;\n\n\t\t\t// new note autosize\n\t\t\tautosize(this.$el.find('.share-note-form .share-note'));\n\n\t\t\tthis.delegateEvents();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function (data) {\n\t\t\tvar sharees = data.sharees;\n\t\t\tif(_.isArray(sharees)) {\n\t\t\t\tfor (var i = 0; i < sharees.length; i++) {\n\t\t\t\t\tdata.sharees[i].popoverMenu = this.popoverMenuTemplate(sharees[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn OC.Share.Templates['sharedialogshareelistview'](data);\n\t\t},\n\n\t\t/**\n\t\t * renders the popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialogshareelistview_popover_menu'](data);\n\t\t},\n\n\t\tshowNoteForm: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\t// show elements\n\t\t\t$menu.find('.share-note-delete').toggleClass('hidden');\n\t\t\t$form.toggleClass('hidden');\n\t\t\t$form.find('textarea').focus();\n\t\t},\n\n\t\tdeleteNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\tconsole.log($form.find('.share-note'));\n\t\t\t$form.find('.share-note').val('');\n\t\t\t\n\t\t\t$form.addClass('hidden');\n\t\t\t$menu.find('.share-note-delete').addClass('hidden');\n\n\t\t\tself.sendNote('', shareId, $menu);\n\t\t},\n\n\t\tupdateNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $form = $element.closest('li.share-note-form');\n\t\t\tvar $menu = $form.prev('li');\n\t\t\tvar message = $form.find('.share-note').val().trim();\n\n\t\t\tif (message.length < 1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.sendNote(message, shareId, $menu);\n\n\t\t},\n\n\t\tsendNote: function(note, shareId, $menu) {\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\t\t\tvar $submit = $form.find('input.share-note-submit');\n\t\t\tvar $error = $form.find('input.share-note-error');\n\n\t\t\t$submit.prop('disabled', true);\n\t\t\t$menu.find('.icon-loading-small').removeClass('hidden');\n\t\t\t$menu.find('.icon-edit').hide();\n\n\t\t\tvar complete = function() {\n\t\t\t\t$submit.prop('disabled', false);\n\t\t\t\t$menu.find('.icon-loading-small').addClass('hidden');\n\t\t\t\t$menu.find('.icon-edit').show();\n\t\t\t};\n\t\t\tvar error = function() {\n\t\t\t\t$error.show();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$error.hide();\n\t\t\t\t}, 3000);\n\t\t\t};\n\n\t\t\t// send data\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares',2) + shareId + '?' + OC.buildQueryString({format: 'json'}),\n\t\t\t\tdata: { note: note },\n\t\t\t\tcomplete : complete,\n\t\t\t\terror: error\n\t\t\t});\n\t\t},\n\n\t\tonUnshare: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tif (!$element.is('a')) {\n\t\t\t\t$element = $element.closest('a');\n\t\t\t}\n\n\t\t\tvar $loading = $element.find('.icon-loading-small').eq(0);\n\t\t\tif(!$loading.hasClass('hidden')) {\n\t\t\t\t// in process\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$loading.removeClass('hidden');\n\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tself.model.removeShare(shareId)\n\t\t\t\t.done(function() {\n\t\t\t\t\t$li.remove();\n\t\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Could not unshare'));\n\t\t\t\t});\n\t\t\treturn false;\n\t\t},\n\n\t\tonToggleMenu: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $menu = $li.find('.sharingOptionsGroup .popovermenu');\n\n\t\t\tOC.showMenu(null, $menu);\n\t\t\tthis._menuOpen = $li.data('share-id');\n\t\t},\n\n\t\tonExpireDateChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar datePickerClass = '.expirationDateContainer-' + this.cid + '-' + shareId;\n\t\t\tvar datePicker = $(datePickerClass);\n\t\t\tvar state = $element.prop('checked');\n\t\t\tdatePicker.toggleClass('hidden', !state);\n\t\t\tif (!state) {\n\t\t\t\t// disabled, let's hide the input and\n\t\t\t\t// set the expireDate to nothing\n\t\t\t\t$element.closest('li').next('li').addClass('hidden');\n\t\t\t\tthis.setExpirationDate(shareId, '');\n\t\t\t} else {\n\t\t\t\t// enabled, show the input and the datepicker\n\t\t\t\t$element.closest('li').next('li').removeClass('hidden');\n\t\t\t\tthis.showDatePicker(event);\n\n\t\t\t}\n\t\t},\n\n\t\tshowDatePicker: function(event) {\n\t\t\tvar element = $(event.target);\n\t\t\tvar li = element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + this.cid + '-' + shareId;\n\t\t\tvar view = this;\n\t\t\t$(expirationDatePicker).datepicker({\n\t\t\t\tdateFormat : 'dd-mm-yy',\n\t\t\t\tonSelect: function (expireDate) {\n\t\t\t\t\tview.setExpirationDate(shareId, expireDate);\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(expirationDatePicker).focus();\n\n\t\t},\n\n\t\tsetExpirationDate: function(shareId, expireDate) {\n\t\t\tthis.model.updateShare(shareId, {expireDate: expireDate}, {});\n\t\t},\n\n\t\tonMailSharePasswordProtectChange: function(event) {\n\t\t\tvar element = $(event.target);\n\t\t\tvar li = element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId;\n\t\t\tvar passwordContainer = $(passwordContainerClass);\n\t\t\tvar loading = this.$el.find(passwordContainerClass + ' .icon-loading-small');\n\t\t\tvar inputClass = '#passwordField-' + this.cid + '-' + shareId;\n\t\t\tvar passwordField = $(inputClass);\n\t\t\tvar state = element.prop('checked');\n\t\t\tvar passwordByTalkElement = $('#passwordByTalk-' + this.cid + '-' + shareId);\n\t\t\tvar passwordByTalkState = passwordByTalkElement.prop('checked');\n\t\t\tif (!state && !passwordByTalkState) {\n\t\t\t\tthis.model.updateShare(shareId, {password: '', sendPasswordByTalk: false});\n\t\t\t\tpasswordField.attr('value', '');\n\t\t\t\tpasswordField.removeClass('error');\n\t\t\t\tpasswordField.tooltip('hide');\n\t\t\t\tloading.addClass('hidden');\n\t\t\t\tpasswordField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE);\n\t\t\t\t// We first need to reset the password field before we hide it\n\t\t\t\tpasswordContainer.toggleClass('hidden', !state);\n\t\t\t} else if (state) {\n\t\t\t\tif (passwordByTalkState) {\n\t\t\t\t\t// Switching from sending the password by Talk to sending\n\t\t\t\t\t// the password by mail can be done keeping the previous\n\t\t\t\t\t// password sent by Talk.\n\t\t\t\t\tthis.model.updateShare(shareId, {sendPasswordByTalk: false});\n\n\t\t\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId;\n\t\t\t\t\tvar passwordByTalkContainer = $(passwordByTalkContainerClass);\n\t\t\t\t\tpasswordByTalkContainer.addClass('hidden');\n\t\t\t\t\tpasswordByTalkElement.prop('checked', false);\n\t\t\t\t}\n\n\t\t\t\tpasswordContainer.toggleClass('hidden', !state);\n\t\t\t\tpasswordField = '#passwordField-' + this.cid + '-' + shareId;\n\t\t\t\tthis.$(passwordField).focus();\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordProtectByTalkChange: function(event) {\n\t\t\tvar element = $(event.target);\n\t\t\tvar li = element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId;\n\t\t\tvar passwordByTalkContainer = $(passwordByTalkContainerClass);\n\t\t\tvar loading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small');\n\t\t\tvar inputClass = '#passwordByTalkField-' + this.cid + '-' + shareId;\n\t\t\tvar passwordByTalkField = $(inputClass);\n\t\t\tvar state = element.prop('checked');\n\t\t\tvar passwordElement = $('#password-' + this.cid + '-' + shareId);\n\t\t\tvar passwordState = passwordElement.prop('checked');\n\t\t\tif (!state) {\n\t\t\t\tthis.model.updateShare(shareId, {password: '', sendPasswordByTalk: false});\n\t\t\t\tpasswordByTalkField.attr('value', '');\n\t\t\t\tpasswordByTalkField.removeClass('error');\n\t\t\t\tpasswordByTalkField.tooltip('hide');\n\t\t\t\tloading.addClass('hidden');\n\t\t\t\tpasswordByTalkField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE);\n\t\t\t\t// We first need to reset the password field before we hide it\n\t\t\t\tpasswordByTalkContainer.toggleClass('hidden', !state);\n\t\t\t} else if (state) {\n\t\t\t\tif (passwordState) {\n\t\t\t\t\t// Enabling sending the password by Talk requires a new\n\t\t\t\t\t// password to be given (the one sent by mail is not reused,\n\t\t\t\t\t// as it would defeat the purpose of checking the identity\n\t\t\t\t\t// of the sharee by Talk if it was already sent by mail), so\n\t\t\t\t\t// the share is not updated until the user explicitly gives\n\t\t\t\t\t// the new password.\n\n\t\t\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId;\n\t\t\t\t\tvar passwordContainer = $(passwordContainerClass);\n\t\t\t\t\tpasswordContainer.addClass('hidden');\n\t\t\t\t\tpasswordElement.prop('checked', false);\n\t\t\t\t}\n\n\t\t\t\tpasswordByTalkContainer.toggleClass('hidden', !state);\n\t\t\t\tpasswordByTalkField = '#passwordByTalkField-' + this.cid + '-' + shareId;\n\t\t\t\tthis.$(passwordByTalkField).focus();\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordKeyUp: function(event) {\n\t\t\tif(event.keyCode === 13) {\n\t\t\t\tthis.onMailSharePasswordEntered(event);\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordEntered: function(event) {\n\t\t\tvar passwordField = $(event.target);\n\t\t\tvar li = passwordField.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId;\n\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId;\n\t\t\tvar sendPasswordByTalk = passwordField.attr('id').startsWith('passwordByTalk');\n\t\t\tvar loading;\n\t\t\tif (sendPasswordByTalk) {\n\t\t\t\tloading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small');\n\t\t\t} else {\n\t\t\t\tloading = this.$el.find(passwordContainerClass + ' .icon-loading-small');\n\t\t\t}\n\t\t\tif (!loading.hasClass('hidden')) {\n\t\t\t\t// still in process\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tpasswordField.removeClass('error');\n\t\t\tvar password = passwordField.val();\n\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\tif(password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tloading\n\t\t\t\t.removeClass('hidden')\n\t\t\t\t.addClass('inlineblock');\n\n\n\t\t\tthis.model.updateShare(shareId, {\n\t\t\t\tpassword: password,\n\t\t\t\tsendPasswordByTalk: sendPasswordByTalk\n\t\t\t}, {\n\t\t\t\terror: function(model, msg) {\n\t\t\t\t\t// destroy old tooltips\n\t\t\t\t\tpasswordField.tooltip('destroy');\n\t\t\t\t\tloading.removeClass('inlineblock').addClass('hidden');\n\t\t\t\t\tpasswordField.addClass('error');\n\t\t\t\t\tpasswordField.attr('title', msg);\n\t\t\t\t\tpasswordField.tooltip({placement: 'bottom', trigger: 'manual'});\n\t\t\t\t\tpasswordField.tooltip('show');\n\t\t\t\t},\n\t\t\t\tsuccess: function(model, msg) {\n\t\t\t\t\tpasswordField.blur();\n\t\t\t\t\tpasswordField.attr('value', '');\n\t\t\t\t\tpasswordField.attr('placeholder', PASSWORD_PLACEHOLDER);\n\t\t\t\t\tloading.removeClass('inlineblock').addClass('hidden');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonPermissionChange: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tvar permissions = OC.PERMISSION_READ;\n\n\t\t\tif (this.model.isFolder()) {\n\t\t\t\t// adjust checkbox states\n\t\t\t\tvar $checkboxes = $('.permissions', $li).not('input[name=\"edit\"]').not('input[name=\"share\"]');\n\t\t\t\tvar checked;\n\t\t\t\tif ($element.attr('name') === 'edit') {\n\t\t\t\t\tchecked = $element.is(':checked');\n\t\t\t\t\t// Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck\n\t\t\t\t\t$($checkboxes).prop('checked', checked);\n\t\t\t\t\tif (checked) {\n\t\t\t\t\t\tpermissions |= OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar numberChecked = $checkboxes.filter(':checked').length;\n\t\t\t\t\tchecked = numberChecked === $checkboxes.length;\n\t\t\t\t\tvar $editCb = $('input[name=\"edit\"]', $li);\n\t\t\t\t\t$editCb.prop('checked', checked);\n\t\t\t\t\t$editCb.prop('indeterminate', !checked && numberChecked > 0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($element.attr('name') === 'edit' && $element.is(':checked')) {\n\t\t\t\t\tpermissions |= OC.PERMISSION_UPDATE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$('.permissions', $li).not('input[name=\"edit\"]').filter(':checked').each(function(index, checkbox) {\n\t\t\t\tpermissions |= $(checkbox).data('permissions');\n\t\t\t});\n\n\n\t\t\t/** disable checkboxes during save operation to avoid race conditions **/\n\t\t\t$li.find('input[type=checkbox]').prop('disabled', true);\n\t\t\tvar enableCb = function() {\n\t\t\t\t$li.find('input[type=checkbox]').prop('disabled', false);\n\t\t\t};\n\t\t\tvar errorCb = function(elem, msg) {\n\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'));\n\t\t\t\tenableCb();\n\t\t\t};\n\n\t\t\tthis.model.updateShare(shareId, {permissions: permissions}, {error: errorCb, success: enableCb});\n\n\t\t\tthis._renderPermissionChange = shareId;\n\t\t},\n\n\t\tonSecureDropChange: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tvar permissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE | OC.PERMISSION_READ;\n\t\t\tif ($element.is(':checked')) {\n\t\t\t\tpermissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE;\n\t\t\t}\n\n\t\t\t/** disable checkboxes during save operation to avoid race conditions **/\n\t\t\t$li.find('input[type=checkbox]').prop('disabled', true);\n\t\t\tvar enableCb = function() {\n\t\t\t\t$li.find('input[type=checkbox]').prop('disabled', false);\n\t\t\t};\n\t\t\tvar errorCb = function(elem, msg) {\n\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'));\n\t\t\t\tenableCb();\n\t\t\t};\n\n\t\t\tthis.model.updateShare(shareId, {permissions: permissions}, {error: errorCb, success: enableCb});\n\n\t\t\tthis._renderPermissionChange = shareId;\n\t\t}\n\n\t});\n\n\tOC.Share.ShareDialogShareeListView = ShareDialogShareeListView;\n\n})();\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\tif(!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogView = OC.Backbone.View.extend({\n\t\t/** @type {Object} **/\n\t\t_templates: {},\n\n\t\t/** @type {boolean} **/\n\t\t_showLink: true,\n\n\t\t_lookup: false,\n\n\t\t_lookupAllowed: false,\n\n\t\t/** @type {string} **/\n\t\ttagName: 'div',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {object} **/\n\t\tresharerInfoView: undefined,\n\n\t\t/** @type {object} **/\n\t\tlinkShareView: undefined,\n\n\t\t/** @type {object} **/\n\t\tshareeListView: undefined,\n\n\t\t/** @type {object} **/\n\t\t_lastSuggestions: undefined,\n\n\t\t/** @type {object} **/\n\t\t_lastRecommendations: undefined,\n\n\t\t/** @type {int} **/\n\t\t_pendingOperationsCount: 0,\n\n\t\tevents: {\n\t\t\t'focus .shareWithField': 'onShareWithFieldFocus',\n\t\t\t'input .shareWithField': 'onShareWithFieldChanged',\n\t\t\t'click .shareWithConfirm': '_confirmShare'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this;\n\n\t\t\tthis.model.on('fetchError', function() {\n\t\t\t\tOC.Notification.showTemporary(t('core', 'Share details could not be loaded for this item.'));\n\t\t\t});\n\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel';\n\t\t\t}\n\n\t\t\tthis.configModel.on('change:isRemoteShareAllowed', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\t\t\tthis.configModel.on('change:isRemoteGroupShareAllowed', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\t\t\tthis.model.on('change:permissions', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tthis.model.on('request', this._onRequest, this);\n\t\t\tthis.model.on('sync', this._onEndRequest, this);\n\n\t\t\tvar subViewOptions = {\n\t\t\t\tmodel: this.model,\n\t\t\t\tconfigModel: this.configModel\n\t\t\t};\n\n\t\t\tvar subViews = {\n\t\t\t\tresharerInfoView: 'ShareDialogResharerInfoView',\n\t\t\t\tlinkShareView: 'ShareDialogLinkShareView',\n\t\t\t\tshareeListView: 'ShareDialogShareeListView'\n\t\t\t};\n\n\t\t\tfor(var name in subViews) {\n\t\t\t\tvar className = subViews[name];\n\t\t\t\tthis[name] = _.isUndefined(options[name])\n\t\t\t\t\t? new OC.Share[className](subViewOptions)\n\t\t\t\t\t: options[name];\n\t\t\t}\n\n\t\t\t_.bindAll(this,\n\t\t\t\t'autocompleteHandler',\n\t\t\t\t'_onSelectRecipient',\n\t\t\t\t'onShareWithFieldChanged',\n\t\t\t\t'onShareWithFieldFocus'\n\t\t\t);\n\n\t\t\tOC.Plugins.attach('OC.Share.ShareDialogView', this);\n\t\t},\n\n\t\tonShareWithFieldChanged: function() {\n\t\t\tvar $el = this.$el.find('.shareWithField');\n\t\t\tif ($el.val().length < 2) {\n\t\t\t\t$el.removeClass('error').tooltip('hide');\n\t\t\t}\n\t\t},\n\n\t\t/* trigger search after the field was re-selected */\n\t\tonShareWithFieldFocus: function() {\n\t\t\tvar $shareWithField = this.$el.find('.shareWithField');\n\t\t\t$shareWithField.autocomplete(\"search\", $shareWithField.val());\n\t\t},\n\n\t\t_getSuggestions: function(searchTerm, perPage, model, lookup) {\n\t\t\tif (this._lastSuggestions &&\n\t\t\t\tthis._lastSuggestions.searchTerm === searchTerm &&\n\t\t\t\tthis._lastSuggestions.lookup === lookup &&\n\t\t\t\tthis._lastSuggestions.perPage === perPage &&\n\t\t\t\tthis._lastSuggestions.model === model) {\n\t\t\t\treturn this._lastSuggestions.promise;\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred();\n\t\t\tvar view = this;\n\n\t\t\t$.get(\n\t\t\t\tOC.linkToOCS('apps/files_sharing/api/v1') + 'sharees',\n\t\t\t\t{\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\tsearch: searchTerm,\n\t\t\t\t\tlookup: lookup,\n\t\t\t\t\tperPage: perPage,\n\t\t\t\t\titemType: model.get('itemType')\n\t\t\t\t},\n\t\t\t\tfunction (result) {\n\t\t\t\t\tif (result.ocs.meta.statuscode === 100) {\n\t\t\t\t\t\tvar filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {\n\t\t\t\t\t\t\tif (typeof(emails) === 'undefined') {\n\t\t\t\t\t\t\t\temails = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(circles) === 'undefined') {\n\t\t\t\t\t\t\t\tcircles = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(rooms) === 'undefined') {\n\t\t\t\t\t\t\t\trooms = [];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar usersLength;\n\t\t\t\t\t\t\tvar groupsLength;\n\t\t\t\t\t\t\tvar remotesLength;\n\t\t\t\t\t\t\tvar remoteGroupsLength;\n\t\t\t\t\t\t\tvar emailsLength;\n\t\t\t\t\t\t\tvar circlesLength;\n\t\t\t\t\t\t\tvar roomsLength;\n\n\t\t\t\t\t\t\tvar i, j;\n\n\t\t\t\t\t\t\t//Filter out the current user\n\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\tif (users[i].value.shareWith === OC.currentUser) {\n\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Filter out the owner of the share\n\t\t\t\t\t\t\tif (model.hasReshare()) {\n\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\tfor (i = 0 ; i < usersLength; i++) {\n\t\t\t\t\t\t\t\t\tif (users[i].value.shareWith === model.getReshareOwner()) {\n\t\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar shares = model.get('shares');\n\t\t\t\t\t\t\tvar sharesLength = shares.length;\n\n\t\t\t\t\t\t\t// Now filter out all sharees that are already shared with\n\t\t\t\t\t\t\tfor (i = 0; i < sharesLength; i++) {\n\t\t\t\t\t\t\t\tvar share = shares[i];\n\n\t\t\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < usersLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (users[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tusers.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\t\tgroupsLength = groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < groupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tgroups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\t\tremotesLength = remotes.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remotesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remotes[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremotes.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\t\t\t\t\t\tremoteGroupsLength = remote_groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remoteGroupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remote_groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremote_groups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\t\temailsLength = emails.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < emailsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (emails[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\temails.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\t\tcirclesLength = circles.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < circlesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (circles[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tcircles.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\t\troomsLength = rooms.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < roomsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (rooms[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\trooms.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.exact.users,\n\t\t\t\t\t\t\tresult.ocs.data.exact.groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.emails,\n\t\t\t\t\t\t\tresult.ocs.data.exact.circles,\n\t\t\t\t\t\t\tresult.ocs.data.exact.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar exactUsers = result.ocs.data.exact.users;\n\t\t\t\t\t\tvar exactGroups = result.ocs.data.exact.groups;\n\t\t\t\t\t\tvar exactRemotes = result.ocs.data.exact.remotes;\n\t\t\t\t\t\tvar exactRemoteGroups = result.ocs.data.exact.remote_groups;\n\t\t\t\t\t\tvar exactEmails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\texactEmails = result.ocs.data.exact.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactCircles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\texactCircles = result.ocs.data.exact.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactRooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\texactRooms = result.ocs.data.exact.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms);\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.users,\n\t\t\t\t\t\t\tresult.ocs.data.groups,\n\t\t\t\t\t\t\tresult.ocs.data.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.emails,\n\t\t\t\t\t\t\tresult.ocs.data.circles,\n\t\t\t\t\t\t\tresult.ocs.data.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar users = result.ocs.data.users;\n\t\t\t\t\t\tvar groups = result.ocs.data.groups;\n\t\t\t\t\t\tvar remotes = result.ocs.data.remotes;\n\t\t\t\t\t\tvar remoteGroups = result.ocs.data.remote_groups;\n\t\t\t\t\t\tvar lookup = result.ocs.data.lookup;\n\t\t\t\t\t\tvar lookupEnabled = result.ocs.data.lookupEnabled;\n\t\t\t\t\t\tvar emails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\temails = result.ocs.data.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar circles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\tcircles = result.ocs.data.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar rooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\trooms = result.ocs.data.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup);\n\n\t\t\t\t\t\tfunction dynamicSort(property) {\n\t\t\t\t\t\t\treturn function (a,b) {\n\t\t\t\t\t\t\t\tvar aProperty = '';\n\t\t\t\t\t\t\t\tvar bProperty = '';\n\t\t\t\t\t\t\t\tif (typeof a[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\taProperty = a[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof b[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\tbProperty = b[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Sort share entries by uuid to properly group them\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar grouped = suggestions.sort(dynamicSort('uuid'));\n\n\t\t\t\t\t\tvar previousUuid = null;\n\t\t\t\t\t\tvar groupedLength = grouped.length;\n\t\t\t\t\t\tvar result = [];\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * build the result array that only contains all contact entries from\n\t\t\t\t\t\t * merged contacts, if the search term matches its contact name\n\t\t\t\t\t\t */\n\t\t\t\t\t\tfor (var i = 0; i < groupedLength; i++) {\n\t\t\t\t\t\t\tif (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {\n\t\t\t\t\t\t\t\tgrouped[i].merged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (searchTerm === grouped[i].name || typeof grouped[i].merged === 'undefined') {\n\t\t\t\t\t\t\t\tresult.push(grouped[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpreviousUuid = grouped[i].uuid;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar moreResultsAvailable =\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tOC.config['sharing.maxAutocompleteResults'] > 0\n\t\t\t\t\t\t\t\t&& Math.min(perPage, OC.config['sharing.maxAutocompleteResults'])\n\t\t\t\t\t\t\t\t\t<= Math.max(\n\t\t\t\t\t\t\t\t\t\tusers.length + exactUsers.length,\n\t\t\t\t\t\t\t\t\t\tgroups.length + exactGroups.length,\n\t\t\t\t\t\t\t\t\t\tremoteGroups.length + exactRemoteGroups.length,\n\t\t\t\t\t\t\t\t\t\tremotes.length + exactRemotes.length,\n\t\t\t\t\t\t\t\t\t\temails.length + exactEmails.length,\n\t\t\t\t\t\t\t\t\t\tcircles.length + exactCircles.length,\n\t\t\t\t\t\t\t\t\t\trooms.length + exactRooms.length,\n\t\t\t\t\t\t\t\t\t\tlookup.length\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!view._lookup && lookupEnabled) {\n\t\t\t\t\t\t\tresult.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: t('core', 'Search globally'),\n\t\t\t\t\t\t\t\t\tvalue: {},\n\t\t\t\t\t\t\t\t\tlookup: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, moreResultsAvailable, lookupEnabled);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.reject(result.ocs.meta.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t).fail(function() {\n\t\t\t\tdeferred.reject();\n\t\t\t});\n\n\t\t\tthis._lastSuggestions = {\n\t\t\t\tsearchTerm: searchTerm,\n\t\t\t\tlookup: lookup,\n\t\t\t\tperPage: perPage,\n\t\t\t\tmodel: model,\n\t\t\t\tpromise: deferred.promise()\n\t\t\t};\n\n\t\t\treturn this._lastSuggestions.promise;\n\t\t},\n\n\t\t_getRecommendations: function(model) {\n\t\t\tif (this._lastRecommendations &&\n\t\t\t\tthis._lastRecommendations.model === model) {\n\t\t\t\treturn this._lastRecommendations.promise;\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred();\n\n\t\t\t$.get(\n\t\t\t\tOC.linkToOCS('apps/files_sharing/api/v1') + 'sharees_recommended',\n\t\t\t\t{\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\titemType: model.get('itemType')\n\t\t\t\t},\n\t\t\t\tfunction (result) {\n\t\t\t\t\tif (result.ocs.meta.statuscode === 100) {\n\t\t\t\t\t\tvar filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {\n\t\t\t\t\t\t\tif (typeof(emails) === 'undefined') {\n\t\t\t\t\t\t\t\temails = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(circles) === 'undefined') {\n\t\t\t\t\t\t\t\tcircles = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(rooms) === 'undefined') {\n\t\t\t\t\t\t\t\trooms = [];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar usersLength;\n\t\t\t\t\t\t\tvar groupsLength;\n\t\t\t\t\t\t\tvar remotesLength;\n\t\t\t\t\t\t\tvar remoteGroupsLength;\n\t\t\t\t\t\t\tvar emailsLength;\n\t\t\t\t\t\t\tvar circlesLength;\n\t\t\t\t\t\t\tvar roomsLength;\n\n\t\t\t\t\t\t\tvar i, j;\n\n\t\t\t\t\t\t\t//Filter out the current user\n\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\tif (users[i].value.shareWith === OC.currentUser) {\n\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Filter out the owner of the share\n\t\t\t\t\t\t\tif (model.hasReshare()) {\n\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\tfor (i = 0 ; i < usersLength; i++) {\n\t\t\t\t\t\t\t\t\tif (users[i].value.shareWith === model.getReshareOwner()) {\n\t\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar shares = model.get('shares');\n\t\t\t\t\t\t\tvar sharesLength = shares.length;\n\n\t\t\t\t\t\t\t// Now filter out all sharees that are already shared with\n\t\t\t\t\t\t\tfor (i = 0; i < sharesLength; i++) {\n\t\t\t\t\t\t\t\tvar share = shares[i];\n\n\t\t\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < usersLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (users[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tusers.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\t\tgroupsLength = groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < groupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tgroups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\t\tremotesLength = remotes.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remotesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remotes[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremotes.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\t\t\t\t\t\tremoteGroupsLength = remote_groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remoteGroupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remote_groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremote_groups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\t\temailsLength = emails.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < emailsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (emails[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\temails.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\t\tcirclesLength = circles.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < circlesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (circles[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tcircles.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\t\troomsLength = rooms.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < roomsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (rooms[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\trooms.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.exact.users,\n\t\t\t\t\t\t\tresult.ocs.data.exact.groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.emails,\n\t\t\t\t\t\t\tresult.ocs.data.exact.circles,\n\t\t\t\t\t\t\tresult.ocs.data.exact.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar exactUsers = result.ocs.data.exact.users;\n\t\t\t\t\t\tvar exactGroups = result.ocs.data.exact.groups;\n\t\t\t\t\t\tvar exactRemotes = result.ocs.data.exact.remotes || [];\n\t\t\t\t\t\tvar exactRemoteGroups = result.ocs.data.exact.remote_groups || [];\n\t\t\t\t\t\tvar exactEmails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\texactEmails = result.ocs.data.exact.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactCircles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\texactCircles = result.ocs.data.exact.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactRooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\texactRooms = result.ocs.data.exact.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms);\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.users,\n\t\t\t\t\t\t\tresult.ocs.data.groups,\n\t\t\t\t\t\t\tresult.ocs.data.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.emails,\n\t\t\t\t\t\t\tresult.ocs.data.circles,\n\t\t\t\t\t\t\tresult.ocs.data.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar users = result.ocs.data.users;\n\t\t\t\t\t\tvar groups = result.ocs.data.groups;\n\t\t\t\t\t\tvar remotes = result.ocs.data.remotes || [];\n\t\t\t\t\t\tvar remoteGroups = result.ocs.data.remote_groups || [];\n\t\t\t\t\t\tvar lookup = result.ocs.data.lookup || [];\n\t\t\t\t\t\tvar emails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\temails = result.ocs.data.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar circles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\tcircles = result.ocs.data.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar rooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\trooms = result.ocs.data.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup);\n\n\t\t\t\t\t\tfunction dynamicSort(property) {\n\t\t\t\t\t\t\treturn function (a,b) {\n\t\t\t\t\t\t\t\tvar aProperty = '';\n\t\t\t\t\t\t\t\tvar bProperty = '';\n\t\t\t\t\t\t\t\tif (typeof a[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\taProperty = a[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof b[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\tbProperty = b[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Sort share entries by uuid to properly group them\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar grouped = suggestions.sort(dynamicSort('uuid'));\n\n\t\t\t\t\t\tvar previousUuid = null;\n\t\t\t\t\t\tvar groupedLength = grouped.length;\n\t\t\t\t\t\tvar result = [];\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * build the result array that only contains all contact entries from\n\t\t\t\t\t\t * merged contacts, if the search term matches its contact name\n\t\t\t\t\t\t */\n\t\t\t\t\t\tfor (var i = 0; i < groupedLength; i++) {\n\t\t\t\t\t\t\tif (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {\n\t\t\t\t\t\t\t\tgrouped[i].merged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof grouped[i].merged === 'undefined') {\n\t\t\t\t\t\t\t\tresult.push(grouped[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpreviousUuid = grouped[i].uuid;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.reject(result.ocs.meta.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t).fail(function() {\n\t\t\t\tdeferred.reject();\n\t\t\t});\n\n\t\t\tthis._lastRecommendations = {\n\t\t\t\tmodel: model,\n\t\t\t\tpromise: deferred.promise()\n\t\t\t};\n\n\t\t\treturn this._lastRecommendations.promise;\n\t\t},\n\n\t\trecommendationHandler: function (response) {\n\t\t\tvar view = this;\n\t\t\tvar $shareWithField = $('.shareWithField');\n\t\t\tthis._getRecommendations(\n\t\t\t\tview.model\n\t\t\t).done(function(suggestions) {\n\t\t\t\tconsole.info('recommendations', suggestions);\n\t\t\t\tif (suggestions.length > 0) {\n\t\t\t\t\t$shareWithField\n\t\t\t\t\t\t.autocomplete(\"option\", \"autoFocus\", true);\n\n\t\t\t\t\tresponse(suggestions);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.info('no sharing recommendations found');\n\t\t\t\t\tresponse();\n\t\t\t\t}\n\t\t\t}).fail(function(message) {\n\t\t\t\tconsole.error('could not load recommendations', message)\n\t\t\t});\n\t\t},\n\n\t\tautocompleteHandler: function (search, response) {\n\t\t\t// If nothing is entered we show recommendations instead of search\n\t\t\t// results\n\t\t\tif (search.term.length === 0) {\n\t\t\t\tconsole.info(search.term, 'empty search term -> using recommendations');\n\t\t\t\tthis.recommendationHandler(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar $shareWithField = $('.shareWithField'),\n\t\t\t\tview = this,\n\t\t\t\t$loading = this.$el.find('.shareWithLoading'),\n\t\t\t\t$confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\tvar count = OC.config['sharing.minSearchStringLength'];\n\t\t\tif (search.term.trim().length < count) {\n\t\t\t\tvar title = n('core',\n\t\t\t\t\t'At least {count} character is needed for autocompletion',\n\t\t\t\t\t'At least {count} characters are needed for autocompletion',\n\t\t\t\t\tcount,\n\t\t\t\t\t{ count: count }\n\t\t\t\t);\n\t\t\t\t$shareWithField.addClass('error')\n\t\t\t\t\t.attr('data-original-title', title)\n\t\t\t\t\t.tooltip('hide')\n\t\t\t\t\t.tooltip({\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\ttrigger: 'manual'\n\t\t\t\t\t})\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip('show');\n\t\t\t\tresponse();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\t$shareWithField.removeClass('error')\n\t\t\t\t.tooltip('hide');\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200;\n\t\t\tthis._getSuggestions(\n\t\t\t\tsearch.term.trim(),\n\t\t\t\tperPage,\n\t\t\t\tview.model,\n\t\t\t\tview._lookup\n\t\t\t).done(function(suggestions, exactMatches, moreResultsAvailable) {\n\t\t\t\tview._pendingOperationsCount--;\n\t\t\t\tif (view._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\tif (suggestions.length > 0) {\n\t\t\t\t\t$shareWithField\n\t\t\t\t\t\t.autocomplete(\"option\", \"autoFocus\", true);\n\n\t\t\t\t\tresponse(suggestions);\n\n\t\t\t\t\t// show a notice that the list is truncated\n\t\t\t\t\t// this is the case if one of the search results is at least as long as the max result config option\n\t\t\t\t\tif(moreResultsAvailable) {\n\t\t\t\t\t\tvar message = t('core', 'This list is maybe truncated - please refine your search term to see more results.');\n\t\t\t\t\t\t$('.ui-autocomplete').append('<li class=\"autocomplete-note\">' + message + '</li>');\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tvar title = t('core', 'No users or groups found for {search}', {search: $shareWithField.val()});\n\t\t\t\t\tif (!view.configModel.get('allowGroupSharing')) {\n\t\t\t\t\t\ttitle = t('core', 'No users found for {search}', {search: $('.shareWithField').val()});\n\t\t\t\t\t}\n\t\t\t\t\t$shareWithField.addClass('error')\n\t\t\t\t\t\t.attr('data-original-title', title)\n\t\t\t\t\t\t.tooltip('hide')\n\t\t\t\t\t\t.tooltip({\n\t\t\t\t\t\t\tplacement: 'top',\n\t\t\t\t\t\t\ttrigger: 'manual'\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t\t.tooltip('show');\n\t\t\t\t\tresponse();\n\t\t\t\t}\n\t\t\t}).fail(function(message) {\n\t\t\t\tview._pendingOperationsCount--;\n\t\t\t\tif (view._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\tif (message) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'An error occurred (\"{message}\"). Please try again', { message: message }));\n\t\t\t\t} else {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'An error occurred. Please try again'));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tautocompleteRenderItem: function(ul, item) {\n\t\t\tvar icon = 'icon-user';\n\t\t\tvar text = escapeHTML(item.label);\n\t\t\tvar description = '';\n\t\t\tvar type = '';\n\t\t\tvar getTranslatedType = function(type) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'HOME':\n\t\t\t\t\t\treturn t('core', 'Home');\n\t\t\t\t\tcase 'WORK':\n\t\t\t\t\t\treturn t('core', 'Work');\n\t\t\t\t\tcase 'OTHER':\n\t\t\t\t\t\treturn t('core', 'Other');\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn '' + type;\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (typeof item.type !== 'undefined' && item.type !== null) {\n\t\t\t\ttype = getTranslatedType(item.type) + ' ';\n\t\t\t}\n\n\t\t\tif (typeof item.name !== 'undefined') {\n\t\t\t\ttext = escapeHTML(item.name);\n\t\t\t}\n\t\t\tif (item.value.shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\ticon = 'icon-contacts-dark';\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\ticon = 'icon-shared';\n\t\t\t\tdescription += item.value.shareWith;\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\ttext = t('core', '{sharee} (remote group)', { sharee: text }, undefined, { escape: false });\n\t\t\t\ticon = 'icon-shared';\n\t\t\t\tdescription += item.value.shareWith;\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\ticon = 'icon-mail';\n\t\t\t\tdescription += item.value.shareWith;\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\ttext = t('core', '{sharee} ({type}, {owner})', {sharee: text, type: item.value.circleInfo, owner: item.value.circleOwner}, undefined, {escape: false});\n\t\t\t\ticon = 'icon-circle';\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\ticon = 'icon-talk';\n\t\t\t}\n\n\t\t\tvar insert = $(\"<div class='share-autocomplete-item'/>\");\n\t\t\tif (item.merged) {\n\t\t\t\tinsert.addClass('merged');\n\t\t\t\ttext = item.value.shareWith;\n\t\t\t\tdescription = type;\n\t\t\t} else if (item.lookup) {\n\t\t\t\ttext = item.label;\n\t\t\t\ticon = false;\n\t\t\t\tinsert.append('<span class=\"icon icon-search search-globally\"></span>');\n\t\t\t} else {\n\t\t\t\tvar avatar = $(\"<div class='avatardiv'></div>\").appendTo(insert);\n\t\t\t\tif (item.value.shareType === OC.Share.SHARE_TYPE_USER || item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\tavatar.avatar(item.value.shareWith, 32, undefined, undefined, undefined, item.label);\n\t\t\t\t} else {\n\t\t\t\t\tif (typeof item.uuid === 'undefined') {\n\t\t\t\t\t\titem.uuid = text;\n\t\t\t\t\t}\n\t\t\t\t\tavatar.imageplaceholder(item.uuid, text, 32);\n\t\t\t\t}\n\t\t\t\tdescription = type + description;\n\t\t\t}\n\t\t\tif (description !== '') {\n\t\t\t\tinsert.addClass('with-description');\n\t\t\t}\n\n\t\t\t$(\"<div class='autocomplete-item-text'></div>\")\n\t\t\t\t.html(\n\t\t\t\t\ttext.replace(\n\t\t\t\t\tnew RegExp(this.term, \"gi\"),\n\t\t\t\t\t\"<span class='ui-state-highlight'>$&</span>\")\n\t\t\t\t\t+ '<span class=\"autocomplete-item-details\">' + description + '</span>'\n\t\t\t\t)\n\t\t\t\t.appendTo(insert);\n\t\t\tinsert.attr('title', item.value.shareWith);\n\t\t\tif (icon) {\n\t\t\t\tinsert.append('<span class=\"icon ' + icon + '\" title=\"' + text + '\"></span>');\n\t\t\t}\n\t\t\tinsert = $(\"<a>\")\n\t\t\t\t.append(insert);\n\t\t\treturn $(\"<li>\")\n\t\t\t\t.addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user')\n\t\t\t\t.append(insert)\n\t\t\t\t.appendTo(ul);\n\t\t},\n\n\t\t_onSelectRecipient: function(e, s) {\n\t\t\tvar self = this;\n\n\t\t\tif (e.keyCode == 9) {\n\t\t\t\te.preventDefault();\n\t\t\t\tif (typeof s.item.name !== 'undefined') {\n\t\t\t\t\te.target.value = s.item.name;\n\t\t\t\t} else {\n\t\t\t\t\te.target.value = s.item.label;\n\t\t\t\t}\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t\t.autocomplete('search', $(e.target).val());\n\t\t\t\t}, 0);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (s.item.lookup) {\n\t\t\t\t// Retrigger search but with global lookup this time\n\t\t\t\tthis._lookup = true;\n\t\t\t\tvar $shareWithField = this.$el.find('.shareWithField');\n\t\t\t\tvar val = $shareWithField.val();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tconsole.debug('searching again, but globally. search term: ' + val);\n\t\t\t\t\t$shareWithField.autocomplete(\"search\", val);\n\t\t\t\t}, 0);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\t// Ensure that the keydown handler for the input field is not\n\t\t\t// called; otherwise it would try to add the recipient again, which\n\t\t\t// would fail.\n\t\t\te.stopImmediatePropagation();\n\t\t\t$(e.target).attr('disabled', true)\n\t\t\t\t.val(s.item.label);\n\n\t\t\tvar $loading = this.$el.find('.shareWithLoading');\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\tthis.model.addShare(s.item.value, {success: function() {\n\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\tself._lastSuggestions = undefined;\n\n\t\t\t\t$(e.target).val('')\n\t\t\t\t\t.attr('disabled', false);\n\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\t\t\t}, error: function(obj, msg) {\n\t\t\t\tOC.Notification.showTemporary(msg);\n\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t.autocomplete('search', $(e.target).val());\n\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\t\t\t}});\n\t\t},\n\n\t\t_confirmShare: function() {\n\t\t\tvar self = this;\n\t\t\tvar $shareWithField = $('.shareWithField');\n\t\t\tvar $loading = this.$el.find('.shareWithLoading');\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\t$shareWithField.prop('disabled', true);\n\n\t\t\t// Disabling the autocompletion does not clear its search timeout;\n\t\t\t// removing the focus from the input field does, but only if the\n\t\t\t// autocompletion is not disabled when the field loses the focus.\n\t\t\t// Thus, the field has to be disabled before disabling the\n\t\t\t// autocompletion to prevent an old pending search result from\n\t\t\t// appearing once the field is enabled again.\n\t\t\t$shareWithField.autocomplete('close');\n\t\t\t$shareWithField.autocomplete('disable');\n\n\t\t\tvar restoreUI = function() {\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\t$shareWithField.prop('disabled', false);\n\t\t\t\t$shareWithField.focus();\n\t\t\t};\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200;\n\t\t\tthis._getSuggestions(\n\t\t\t\t$shareWithField.val(),\n\t\t\t\tperPage,\n\t\t\t\tthis.model,\n\t\t\t\tthis._lookup\n\t\t\t).done(function(suggestions, exactMatches) {\n\t\t\t\tif (suggestions.length === 0) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\t// There is no need to show an error message here; it will\n\t\t\t\t\t// be automatically shown when the autocomplete is activated\n\t\t\t\t\t// again (due to the focus on the field) and it finds no\n\t\t\t\t\t// matches.\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (exactMatches.length !== 1) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar actionSuccess = function() {\n\t\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\t\tself._lastSuggestions = undefined;\n\n\t\t\t\t\t$shareWithField.val('');\n\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\t\t\t\t};\n\n\t\t\t\tvar actionError = function(obj, msg) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\tOC.Notification.showTemporary(msg);\n\t\t\t\t};\n\n\t\t\t\tself.model.addShare(exactMatches[0].value, {\n\t\t\t\t\tsuccess: actionSuccess,\n\t\t\t\t\terror: actionError\n\t\t\t\t});\n\t\t\t}).fail(function(message) {\n\t\t\t\trestoreUI();\n\n\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t// There is no need to show an error message here; it will be\n\t\t\t\t// automatically shown when the autocomplete is activated again\n\t\t\t\t// (due to the focus on the field) and getting the suggestions\n\t\t\t\t// fail.\n\t\t\t});\n\t\t},\n\n\t\t_toggleLoading: function(state) {\n\t\t\tthis._loading = state;\n\t\t\tthis.$el.find('.subView').toggleClass('hidden', state);\n\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state);\n\t\t},\n\n\t\t_onRequest: function() {\n\t\t\t// only show the loading spinner for the first request (for now)\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._toggleLoading(true);\n\t\t\t}\n\t\t},\n\n\t\t_onEndRequest: function() {\n\t\t\tvar self = this;\n\t\t\tthis._toggleLoading(false);\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._loadingOnce = true;\n\t\t\t}\n\t\t},\n\n\t\trender: function() {\n\t\t\tvar self = this;\n\t\t\tvar baseTemplate = OC.Share.Templates['sharedialogview'];\n\n\t\t\tthis.$el.html(baseTemplate({\n\t\t\t\tcid: this.cid,\n\t\t\t\tshareLabel: t('core', 'Share'),\n\t\t\t\tsharePlaceholder: this._renderSharePlaceholderPart(),\n\t\t\t\tisSharingAllowed: this.model.sharePermissionPossible()\n\t\t\t}));\n\n\t\t\tvar $shareField = this.$el.find('.shareWithField');\n\t\t\tif ($shareField.length) {\n\t\t\t\tvar shareFieldKeydownHandler = function(event) {\n\t\t\t\t\tif (event.keyCode !== 13) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tself._confirmShare();\n\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\n\t\t\t\t$shareField.autocomplete({\n\t\t\t\t\tminLength: 0,\n\t\t\t\t\tdelay: 750,\n\t\t\t\t\tfocus: function(event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tsource: this.autocompleteHandler,\n\t\t\t\t\tselect: this._onSelectRecipient,\n\t\t\t\t\topen: function() {\n\t\t\t\t\t\tvar autocomplete = $(this).autocomplete('widget');\n\t\t\t\t\t\tvar numberOfItems = autocomplete.find('li').size();\n\t\t\t\t\t\tautocomplete.removeClass('item-count-1');\n\t\t\t\t\t\tautocomplete.removeClass('item-count-2');\n\t\t\t\t\t\tif (numberOfItems <= 2) {\n\t\t\t\t\t\t\tautocomplete.addClass('item-count-' + numberOfItems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).data('ui-autocomplete')._renderItem = this.autocompleteRenderItem;\n\n\t\t\t\t$shareField.on('keydown', null, shareFieldKeydownHandler);\n\t\t\t}\n\n\t\t\tthis.resharerInfoView.$el = this.$el.find('.resharerInfoView');\n\t\t\tthis.resharerInfoView.render();\n\n\t\t\tthis.linkShareView.$el = this.$el.find('.linkShareView');\n\t\t\tthis.linkShareView.render();\n\n\t\t\tthis.shareeListView.$el = this.$el.find('.shareeListView');\n\t\t\tthis.shareeListView.render();\n\n\t\t\tthis.$el.find('.hasTooltip').tooltip();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * sets whether share by link should be displayed or not. Default is\n\t\t * true.\n\t\t *\n\t\t * @param {bool} showLink\n\t\t */\n\t\tsetShowLink: function(showLink) {\n\t\t\tthis._showLink = (typeof showLink === 'boolean') ? showLink : true;\n\t\t\tthis.linkShareView.showLink = this._showLink;\n\t\t},\n\n\t\t_renderSharePlaceholderPart: function () {\n\t\t\tvar allowRemoteSharing = this.configModel.get('isRemoteShareAllowed');\n\t\t\tvar allowMailSharing = this.configModel.get('isMailShareAllowed');\n\n\t\t\tif (!allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or email address...');\n\t\t\t}\n\t\t\tif (allowRemoteSharing && !allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or federated cloud ID...');\n\t\t\t}\n\t\t\tif (allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name, federated cloud ID or email address...');\n\t\t\t}\n\n\t\t\treturn \tt('core', 'Name...');\n\t\t},\n\n\t});\n\n\tOC.Share.ShareDialogView = ShareDialogView;\n\n})();\n","/* global escapeHTML */\n\n/**\n * @namespace\n */\nOC.Share = _.extend(OC.Share || {}, {\n\tSHARE_TYPE_USER:0,\n\tSHARE_TYPE_GROUP:1,\n\tSHARE_TYPE_LINK:3,\n\tSHARE_TYPE_EMAIL:4,\n\tSHARE_TYPE_REMOTE:6,\n\tSHARE_TYPE_CIRCLE:7,\n\tSHARE_TYPE_GUEST:8,\n\tSHARE_TYPE_REMOTE_GROUP:9,\n\tSHARE_TYPE_ROOM:10,\n\n\t/**\n\t * Regular expression for splitting parts of remote share owners:\n\t * \"user@example.com/path/to/owncloud\"\n\t * \"user@anotherexample.com@example.com/path/to/owncloud\n\t */\n\t_REMOTE_OWNER_REGEXP: new RegExp(\"^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$\"),\n\n\t/**\n\t * @deprecated use OC.Share.currentShares instead\n\t */\n\titemShares:[],\n\t/**\n\t * Full list of all share statuses\n\t */\n\tstatuses:{},\n\t/**\n\t * Shares for the currently selected file.\n\t * (for which the dropdown is open)\n\t *\n\t * Key is item type and value is an array or\n\t * shares of the given item type.\n\t */\n\tcurrentShares: {},\n\t/**\n\t * Whether the share dropdown is opened.\n\t */\n\tdroppedDown:false,\n\t/**\n\t * Loads ALL share statuses from server, stores them in\n\t * OC.Share.statuses then calls OC.Share.updateIcons() to update the\n\t * files \"Share\" icon to \"Shared\" according to their share status and\n\t * share type.\n\t *\n\t * If a callback is specified, the update step is skipped.\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance, defaults to OCA.Files.App.fileList\n\t * @param callback function to call after the shares were loaded\n\t */\n\tloadIcons:function(itemType, fileList, callback) {\n\t\tvar path = fileList.dirInfo.path;\n\t\tif (path === '/') {\n\t\t\tpath = '';\n\t\t}\n\t\tpath += '/' + fileList.dirInfo.name;\n\n\t\t// Load all share icons\n\t\t$.get(\n\t\t\tOC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',\n\t\t\t{\n\t\t\t\tsubfiles: 'true',\n\t\t\t\tpath: path,\n\t\t\t\tformat: 'json'\n\t\t\t}, function(result) {\n\t\t\t\tif (result && result.ocs.meta.statuscode === 200) {\n\t\t\t\t\tOC.Share.statuses = {};\n\t\t\t\t\t$.each(result.ocs.data, function(it, share) {\n\t\t\t\t\t\tif (!(share.item_source in OC.Share.statuses)) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = {link: false};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = {link: true};\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (_.isFunction(callback)) {\n\t\t\t\t\t\tcallback(OC.Share.statuses);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Share.updateIcons(itemType, fileList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\t/**\n\t * Updates the files' \"Share\" icons according to the known\n\t * sharing states stored in OC.Share.statuses.\n\t * (not reloaded from server)\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance\n\t * defaults to OCA.Files.App.fileList\n\t */\n\tupdateIcons:function(itemType, fileList){\n\t\tvar item;\n\t\tvar $fileList;\n\t\tvar currentDir;\n\t\tif (!fileList && OCA.Files) {\n\t\t\tfileList = OCA.Files.App.fileList;\n\t\t}\n\t\t// fileList is usually only defined in the files app\n\t\tif (fileList) {\n\t\t\t$fileList = fileList.$fileList;\n\t\t\tcurrentDir = fileList.getCurrentDirectory();\n\t\t}\n\t\t// TODO: iterating over the files might be more efficient\n\t\tfor (item in OC.Share.statuses){\n\t\t\tvar iconClass = 'icon-shared';\n\t\t\tvar data = OC.Share.statuses[item];\n\t\t\tvar hasLink = data.link;\n\t\t\t// Links override shared in terms of icon display\n\t\t\tif (hasLink) {\n\t\t\t\ticonClass = 'icon-public';\n\t\t\t}\n\t\t\tif (itemType !== 'file' && itemType !== 'folder') {\n\t\t\t\t$('a.share[data-item=\"'+item+'\"] .icon').removeClass('icon-shared icon-public').addClass(iconClass);\n\t\t\t} else {\n\t\t\t\t// TODO: ultimately this part should be moved to files_sharing app\n\t\t\t\tvar file = $fileList.find('tr[data-id=\"'+item+'\"]');\n\t\t\t\tvar shareFolder = OC.imagePath('core', 'filetypes/folder-shared');\n\t\t\t\tvar img;\n\t\t\t\tif (file.length > 0) {\n\t\t\t\t\tthis.markFileAsShared(file, true, hasLink);\n\t\t\t\t} else {\n\t\t\t\t\tvar dir = currentDir;\n\t\t\t\t\tif (dir.length > 1) {\n\t\t\t\t\t\tvar last = '';\n\t\t\t\t\t\tvar path = dir;\n\t\t\t\t\t\t// Search for possible parent folders that are shared\n\t\t\t\t\t\twhile (path != last) {\n\t\t\t\t\t\t\tif (path === data.path && !data.link) {\n\t\t\t\t\t\t\t\tvar actions = $fileList.find('.fileactions .action[data-action=\"Share\"]');\n\t\t\t\t\t\t\t\tvar files = $fileList.find('.filename');\n\t\t\t\t\t\t\t\tvar i;\n\t\t\t\t\t\t\t\tfor (i = 0; i < actions.length; i++) {\n\t\t\t\t\t\t\t\t\t// TODO: use this.markFileAsShared()\n\t\t\t\t\t\t\t\t\timg = $(actions[i]).find('img');\n\t\t\t\t\t\t\t\t\tif (img.attr('src') !== OC.imagePath('core', 'actions/public')) {\n\t\t\t\t\t\t\t\t\t\timg.attr('src', image);\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).addClass('permanent');\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).html('<span> '+t('core', 'Shared')+'</span>').prepend(img);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor(i = 0; i < files.length; i++) {\n\t\t\t\t\t\t\t\t\tif ($(files[i]).closest('tr').data('type') === 'dir') {\n\t\t\t\t\t\t\t\t\t\t$(files[i]).find('.thumbnail').css('background-image', 'url('+shareFolder+')');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlast = path;\n\t\t\t\t\t\t\tpath = OC.Share.dirname(path);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tupdateIcon:function(itemType, itemSource) {\n\t\tvar shares = false;\n\t\tvar link = false;\n\t\tvar iconClass = '';\n\t\t$.each(OC.Share.itemShares, function(index) {\n\t\t\tif (OC.Share.itemShares[index]) {\n\t\t\t\tif (index == OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tif (OC.Share.itemShares[index] == true) {\n\t\t\t\t\t\tshares = true;\n\t\t\t\t\t\ticonClass = 'icon-public';\n\t\t\t\t\t\tlink = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else if (OC.Share.itemShares[index].length > 0) {\n\t\t\t\t\tshares = true;\n\t\t\t\t\ticonClass = 'icon-shared';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (itemType != 'file' && itemType != 'folder') {\n\t\t\t$('a.share[data-item=\"'+itemSource+'\"] .icon').removeClass('icon-shared icon-public').addClass(iconClass);\n\t\t} else {\n\t\t\tvar $tr = $('tr').filterAttr('data-id', String(itemSource));\n\t\t\tif ($tr.length > 0) {\n\t\t\t\t// it might happen that multiple lists exist in the DOM\n\t\t\t\t// with the same id\n\t\t\t\t$tr.each(function() {\n\t\t\t\t\tOC.Share.markFileAsShared($(this), shares, link);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (shares) {\n\t\t\tOC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {};\n\t\t\tOC.Share.statuses[itemSource].link = link;\n\t\t} else {\n\t\t\tdelete OC.Share.statuses[itemSource];\n\t\t}\n\t},\n\t/**\n\t * Format a remote address\n\t *\n\t * @param {String} shareWith userid, full remote share, or whatever\n\t * @param {String} shareWithDisplayName\n\t * @param {String} message\n\t * @return {String} HTML code to display\n\t */\n\t_formatRemoteShare: function(shareWith, shareWithDisplayName, message) {\n\t\tvar parts = this._REMOTE_OWNER_REGEXP.exec(shareWith);\n\t\tif (!parts) {\n\t\t\t// display avatar of the user\n\t\t\tvar avatar = '<span class=\"avatar\" data-username=\"' + escapeHTML(shareWith) + '\" title=\"' + message + \" \" + escapeHTML(shareWithDisplayName) + '\"></span>';\n\t\t\tvar hidden = '<span class=\"hidden-visually\">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> ';\n\t\t\treturn avatar + hidden;\n\t\t}\n\n\t\tvar userName = parts[1];\n\t\tvar userDomain = parts[3];\n\t\tvar server = parts[4];\n\t\tvar tooltip = message + ' ' + userName;\n\t\tif (userDomain) {\n\t\t\ttooltip += '@' + userDomain;\n\t\t}\n\t\tif (server) {\n\t\t\tif (!userDomain) {\n\t\t\t\tuserDomain = '…';\n\t\t\t}\n\t\t\ttooltip += '@' + server;\n\t\t}\n\n\t\tvar html = '<span class=\"remoteAddress\" title=\"' + escapeHTML(tooltip) + '\">';\n\t\thtml += '<span class=\"username\">' + escapeHTML(userName) + '</span>';\n\t\tif (userDomain) {\n\t\t\thtml += '<span class=\"userDomain\">@' + escapeHTML(userDomain) + '</span>';\n\t\t}\n\t\thtml += '</span> ';\n\t\treturn html;\n\t},\n\t/**\n\t * Loop over all recipients in the list and format them using\n\t * all kind of fancy magic.\n\t *\n\t * @param {Object} recipients array of all the recipients\n\t * @return {String[]} modified list of recipients\n\t */\n\t_formatShareList: function(recipients) {\n\t\tvar _parent = this;\n\t\trecipients = _.toArray(recipients);\n\t\trecipients.sort(function(a, b) {\n\t\t\treturn a.shareWithDisplayName.localeCompare(b.shareWithDisplayName);\n\t\t});\n\t\treturn $.map(recipients, function(recipient) {\n\t\t\treturn _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'));\n\t\t});\n\t},\n\t/**\n\t * Marks/unmarks a given file as shared by changing its action icon\n\t * and folder icon.\n\t *\n\t * @param $tr file element to mark as shared\n\t * @param hasShares whether shares are available\n\t * @param hasLink whether link share is available\n\t */\n\tmarkFileAsShared: function($tr, hasShares, hasLink) {\n\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]');\n\t\tvar type = $tr.data('type');\n\t\tvar icon = action.find('.icon');\n\t\tvar message, recipients, avatars;\n\t\tvar ownerId = $tr.attr('data-share-owner-id');\n\t\tvar owner = $tr.attr('data-share-owner');\n\t\tvar mountType = $tr.attr('data-mounttype');\n\t\tvar shareFolderIcon;\n\t\tvar iconClass = 'icon-shared';\n\t\taction.removeClass('shared-style');\n\t\t// update folder icon\n\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\n\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType);\n\t\t\t} else if (hasLink) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public');\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared');\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');\n\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t} else if (type === 'dir') {\n\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted');\n\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\n\t\t\t// need to refactor the icon logic into a single code path eventually\n\t\t\tif (isEncrypted === 'true') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted');\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external');\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir');\n\t\t\t\t// back to default\n\t\t\t\t$tr.removeAttr('data-icon');\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');\n\t\t}\n\t\t// update share action text / icon\n\t\tif (hasShares || ownerId) {\n\t\t\trecipients = $tr.data('share-recipient-data');\n\t\t\taction.addClass('shared-style');\n\n\t\t\tavatars = '<span>' + t('core', 'Shared') + '</span>';\n\t\t\t// even if reshared, only show \"Shared by\"\n\t\t\tif (ownerId) {\n\t\t\t\tmessage = t('core', 'Shared by');\n\t\t\t\tavatars = this._formatRemoteShare(ownerId, owner, message);\n\t\t\t} else if (recipients) {\n\t\t\t\tavatars = this._formatShareList(recipients);\n\t\t\t}\n\t\t\taction.html(avatars).prepend(icon);\n\n\t\t\tif (ownerId || recipients) {\n\t\t\t\tvar avatarElement = action.find('.avatar');\n\t\t\t\tavatarElement.each(function () {\n\t\t\t\t\t$(this).avatar($(this).data('username'), 32);\n\t\t\t\t});\n\t\t\t\taction.find('span[title]').tooltip({placement: 'top'});\n\t\t\t}\n\t\t} else {\n\t\t\taction.html('<span class=\"hidden-visually\">' + t('core', 'Shared') + '</span>').prepend(icon);\n\t\t}\n\t\tif (hasLink) {\n\t\t\ticonClass = 'icon-public';\n\t\t}\n\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass);\n\t},\n\tshowDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {\n\t\tvar configModel = new OC.Share.ShareConfigModel();\n\t\tvar attributes = {itemType: itemType, itemSource: itemSource, possiblePermissions: possiblePermissions};\n\t\tvar itemModel = new OC.Share.ShareItemModel(attributes, {configModel: configModel});\n\t\tvar dialogView = new OC.Share.ShareDialogView({\n\t\t\tid: 'dropdown',\n\t\t\tmodel: itemModel,\n\t\t\tconfigModel: configModel,\n\t\t\tclassName: 'drop shareDropDown',\n\t\t\tattributes: {\n\t\t\t\t'data-item-source-name': filename,\n\t\t\t\t'data-item-type': itemType,\n\t\t\t\t'data-item-source': itemSource\n\t\t\t}\n\t\t});\n\t\tdialogView.setShowLink(link);\n\t\tvar $dialog = dialogView.render().$el;\n\t\t$dialog.appendTo(appendTo);\n\t\t$dialog.slideDown(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = true;\n\t\t});\n\t\titemModel.fetch();\n\t},\n\thideDropDown:function(callback) {\n\t\tOC.Share.currentShares = null;\n\t\t$('#dropdown').slideUp(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = false;\n\t\t\t$('#dropdown').remove();\n\t\t\tif (typeof FileActions !== 'undefined') {\n\t\t\t\t$('tr').removeClass('mouseOver');\n\t\t\t}\n\t\t\tif (callback) {\n\t\t\t\tcallback.call();\n\t\t\t}\n\t\t});\n\t},\n\tdirname:function(path) {\n\t\treturn path.replace(/\\\\/g,'/').replace(/\\/[^\\/]*$/, '');\n\t}\n});\n\n$(document).ready(function() {\n\tif(typeof monthNames != 'undefined'){\n\t\t// min date should always be the next day\n\t\tvar minDate = new Date();\n\t\tminDate.setDate(minDate.getDate()+1);\n\t\t$.datepicker.setDefaults({\n\t\t\tmonthNames: monthNames,\n\t\t\tmonthNamesShort: monthNamesShort,\n\t\t\tdayNames: dayNames,\n\t\t\tdayNamesMin: dayNamesMin,\n\t\t\tdayNamesShort: dayNamesShort,\n\t\t\tfirstDay: firstDay,\n\t\t\tminDate : minDate\n\t\t});\n\t}\n\n\t$(this).click(function(event) {\n\t\tvar target = $(event.target);\n\t\tvar isMatched = !target.is('.drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon')\n\t\t\t&& !target.closest('#ui-datepicker-div').length && !target.closest('.ui-autocomplete').length;\n\t\tif (OC.Share && OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) {\n\t\t\tOC.Share.hideDropDown();\n\t\t}\n\t});\n\n\n\n});\n"],"sourceRoot":""}