From 177849cd3ce2f5ff3964ef0a1053d4ac8cf423c6 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Wed, 19 Apr 2023 16:52:06 -0700 Subject: [PATCH] Remove legacy systemtags code Signed-off-by: Christopher Ng --- apps/systemtags/src/filesplugin.js | 61 ----- apps/systemtags/src/systemtags.js | 2 - apps/systemtags/src/systemtagsinfoview.js | 194 -------------- .../tests/js/systemtagsinfoviewSpec.js | 252 ------------------ core/css/systemtags.css | 2 +- core/css/systemtags.css.map | 2 +- core/css/systemtags.scss | 1 - dist/core-systemtags.js | 4 +- dist/core-systemtags.js.map | 2 +- dist/systemtags-systemtags.js | 4 +- dist/systemtags-systemtags.js.LICENSE.txt | 26 -- dist/systemtags-systemtags.js.map | 2 +- 12 files changed, 8 insertions(+), 544 deletions(-) delete mode 100644 apps/systemtags/src/filesplugin.js delete mode 100644 apps/systemtags/src/systemtagsinfoview.js delete mode 100644 apps/systemtags/tests/js/systemtagsinfoviewSpec.js diff --git a/apps/systemtags/src/filesplugin.js b/apps/systemtags/src/filesplugin.js deleted file mode 100644 index 067a059093e..00000000000 --- a/apps/systemtags/src/filesplugin.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) 2015 Vincent Petry - * - * @author Joas Schilling - * @author John Molakvoæ - * @author Vincent Petry - * - * @license AGPL-3.0-or-later - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -(function() { - OCA.SystemTags = _.extend({}, OCA.SystemTags) - if (!OCA.SystemTags) { - /** - * @namespace - */ - OCA.SystemTags = {} - } - - /** - * @namespace - */ - OCA.SystemTags.FilesPlugin = { - ignoreLists: [ - 'trashbin', - 'files.public', - ], - - attach(fileList) { - if (this.ignoreLists.indexOf(fileList.id) >= 0) { - return - } - - // only create and attach once - // FIXME: this should likely be done on a different code path now - // for the sidebar to only have it registered once - if (!OCA.SystemTags.View) { - const systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView() - fileList.registerDetailView(systemTagsInfoView) - OCA.SystemTags.View = systemTagsInfoView - } - }, - } - -})() - -OC.Plugins.register('OCA.Files.FileList', OCA.SystemTags.FilesPlugin) diff --git a/apps/systemtags/src/systemtags.js b/apps/systemtags/src/systemtags.js index a96d78a5dea..ab2f8ff4126 100644 --- a/apps/systemtags/src/systemtags.js +++ b/apps/systemtags/src/systemtags.js @@ -23,8 +23,6 @@ import './app.js' import './systemtagsfilelist.js' -import './filesplugin.js' -import './systemtagsinfoview.js' import './css/systemtagsfilelist.scss' window.OCA.SystemTags = OCA.SystemTags diff --git a/apps/systemtags/src/systemtagsinfoview.js b/apps/systemtags/src/systemtagsinfoview.js deleted file mode 100644 index b9a55a8e283..00000000000 --- a/apps/systemtags/src/systemtagsinfoview.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Copyright (c) 2015 - * - * @author Daniel Calviño Sánchez - * @author Joas Schilling - * @author John Molakvoæ - * @author Julius Härtl - * @author Vincent Petry - * - * @license AGPL-3.0-or-later - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -(function(OCA) { - - /** - * @param {any} model - - */ - function modelToSelection(model) { - const data = model.toJSON() - if (!OC.isUserAdmin() && !data.canAssign) { - data.locked = true - } - return data - } - - /** - * @class OCA.SystemTags.SystemTagsInfoView - * @classdesc - * - * Displays a file's system tags - * - */ - const SystemTagsInfoView = OCA.Files.DetailFileInfoView.extend( - /** @lends OCA.SystemTags.SystemTagsInfoView.prototype */ { - - _rendered: false, - - className: 'systemTagsInfoView', - name: 'systemTags', - - /* required by the new files sidebar to check if the view is unique */ - id: 'systemTagsInfoView', - - /** - * @type {OC.SystemTags.SystemTagsInputField} - */ - _inputView: null, - - initialize(options) { - const self = this - options = options || {} - - this._inputView = new OC.SystemTags.SystemTagsInputField({ - multiple: true, - allowActions: true, - allowCreate: true, - isAdmin: OC.isUserAdmin(), - initSelection(element, callback) { - callback(self.selectedTagsCollection.map(modelToSelection)) - }, - }) - - this.selectedTagsCollection = new OC.SystemTags.SystemTagsMappingCollection([], { objectType: 'files' }) - - this._inputView.collection.on('change:name', this._onTagRenamedGlobally, this) - this._inputView.collection.on('remove', this._onTagDeletedGlobally, this) - - this._inputView.on('select', this._onSelectTag, this) - this._inputView.on('deselect', this._onDeselectTag, this) - }, - - /** - * Event handler whenever a tag was selected - * - * @param {object} tag the tag to create - */ - _onSelectTag(tag) { - // create a mapping entry for this tag - this.selectedTagsCollection.create(tag.toJSON()) - }, - - /** - * Event handler whenever a tag gets deselected. - * Removes the selected tag from the mapping collection. - * - * @param {string} tagId tag id - */ - _onDeselectTag(tagId) { - this.selectedTagsCollection.get(tagId).destroy() - }, - - /** - * Event handler whenever a tag was renamed globally. - * - * This will automatically adjust the tag mapping collection to - * container the new name. - * - * @param {OC.Backbone.Model} changedTag tag model that has changed - */ - _onTagRenamedGlobally(changedTag) { - // also rename it in the selection, if applicable - const selectedTagMapping = this.selectedTagsCollection.get(changedTag.id) - if (selectedTagMapping) { - selectedTagMapping.set(changedTag.toJSON()) - } - }, - - /** - * Event handler whenever a tag was deleted globally. - * - * This will automatically adjust the tag mapping collection to - * container the new name. - * - * @param {OC.Backbone.Model} tagId tag model that has changed - */ - _onTagDeletedGlobally(tagId) { - // also rename it in the selection, if applicable - this.selectedTagsCollection.remove(tagId) - }, - - setFileInfo(fileInfo) { - const self = this - if (!this._rendered) { - this.render() - } - - if (fileInfo) { - this.selectedTagsCollection.setObjectId(fileInfo.id) - this.selectedTagsCollection.fetch({ - success(collection) { - collection.fetched = true - - const appliedTags = collection.map(modelToSelection) - self._inputView.setData(appliedTags) - if (appliedTags.length > 0) { - self.show() - } - }, - }) - } - - this.hide() - }, - - /** - * Renders this details view - */ - render() { - this.$el.append(this._inputView.$el) - this._inputView.render() - }, - - isVisible() { - return !this.$el.hasClass('hidden') - }, - - show() { - this.$el.removeClass('hidden') - }, - - hide() { - this.$el.addClass('hidden') - }, - - toggle() { - this.$el.toggleClass('hidden') - }, - - openDropdown() { - this.$el.find('.systemTagsInputField').select2('open') - }, - - remove() { - this._inputView.remove() - }, - }) - - OCA.SystemTags.SystemTagsInfoView = SystemTagsInfoView - -})(OCA) diff --git a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js deleted file mode 100644 index 5c4b5bf6bd1..00000000000 --- a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js +++ /dev/null @@ -1,252 +0,0 @@ -/** -* @copyright 2016 Vincent Petry - * - * @author Daniel Calviño Sánchez - * @author John Molakvoæ - * @author Vincent Petry - * - * @license AGPL-3.0-or-later - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -describe('OCA.SystemTags.SystemTagsInfoView tests', function() { - var isAdminStub; - var view; - var clock; - - beforeEach(function() { - clock = sinon.useFakeTimers(); - view = new OCA.SystemTags.SystemTagsInfoView(); - $('#testArea').append(view.$el); - isAdminStub = sinon.stub(OC, 'isUserAdmin').returns(true); - }); - afterEach(function() { - isAdminStub.restore(); - clock.restore(); - view.remove(); - view = undefined; - }); - describe('rendering', function() { - it('renders input field view', function() { - view.render(); - expect(view.$el.find('input[name=tags]').length).toEqual(1); - }); - it('fetches selected tags then renders when setting file info', function() { - var fetchStub = sinon.stub(OC.SystemTags.SystemTagsMappingCollection.prototype, 'fetch'); - var setDataStub = sinon.stub(OC.SystemTags.SystemTagsInputField.prototype, 'setData'); - - expect(view.$el.hasClass('hidden')).toEqual(false); - - view.setFileInfo({id: '123'}); - expect(view.$el.find('input[name=tags]').length).toEqual(1); - - expect(fetchStub.calledOnce).toEqual(true); - expect(view.selectedTagsCollection.url()) - .toEqual(OC.linkToRemote('dav') + '/systemtags-relations/files/123'); - - view.selectedTagsCollection.add([ - {id: '1', name: 'test1'}, - {id: '3', name: 'test3'} - ]); - - fetchStub.yieldTo('success', view.selectedTagsCollection); - expect(setDataStub.calledOnce).toEqual(true); - expect(setDataStub.getCall(0).args[0]).toEqual([{ - id: '1', name: 'test1', userVisible: true, userAssignable: true, canAssign: true - }, { - id: '3', name: 'test3', userVisible: true, userAssignable: true, canAssign: true - }]); - - expect(view.$el.hasClass('hidden')).toEqual(false); - - fetchStub.restore(); - setDataStub.restore(); - }); - it('overrides initSelection to use the local collection', function() { - var inputViewSpy = sinon.spy(OC.SystemTags, 'SystemTagsInputField'); - var element = $(''); - view.remove(); - view = new OCA.SystemTags.SystemTagsInfoView(); - view.selectedTagsCollection.add([ - {id: '1', name: 'test1'}, - {id: '3', name: 'test3', userVisible: false, userAssignable: false, canAssign: false} - ]); - - var callback = sinon.stub(); - inputViewSpy.getCall(0).args[0].initSelection(element, callback); - - expect(callback.calledOnce).toEqual(true); - expect(callback.getCall(0).args[0]).toEqual([{ - id: '1', name: 'test1', userVisible: true, userAssignable: true, canAssign: true - }, { - id: '3', name: 'test3', userVisible: false, userAssignable: false, canAssign: false - }]); - - inputViewSpy.restore(); - }); - it('sets locked flag on non-assignable tags when user is not an admin', function() { - isAdminStub.returns(false); - - var inputViewSpy = sinon.spy(OC.SystemTags, 'SystemTagsInputField'); - var element = $(''); - view.remove(); - view = new OCA.SystemTags.SystemTagsInfoView(); - view.selectedTagsCollection.add([ - {id: '1', name: 'test1'}, - {id: '3', name: 'test3', userAssignable: false, canAssign: false} - ]); - - var callback = sinon.stub(); - inputViewSpy.getCall(0).args[0].initSelection(element, callback); - - expect(callback.calledOnce).toEqual(true); - expect(callback.getCall(0).args[0]).toEqual([{ - id: '1', name: 'test1', userVisible: true, userAssignable: true, canAssign: true - }, { - id: '3', name: 'test3', userVisible: true, userAssignable: false, canAssign: false, locked: true - }]); - - inputViewSpy.restore(); - }); - it('does not set locked flag on non-assignable tags when canAssign overrides it with true', function() { - isAdminStub.returns(false); - - var inputViewSpy = sinon.spy(OC.SystemTags, 'SystemTagsInputField'); - var element = $(''); - view.remove(); - view = new OCA.SystemTags.SystemTagsInfoView(); - view.selectedTagsCollection.add([ - {id: '1', name: 'test1'}, - {id: '4', name: 'test4', userAssignable: false, canAssign: true} - ]); - - var callback = sinon.stub(); - inputViewSpy.getCall(0).args[0].initSelection(element, callback); - - expect(callback.calledOnce).toEqual(true); - expect(callback.getCall(0).args[0]).toEqual([{ - id: '1', name: 'test1', userVisible: true, userAssignable: true, canAssign: true - }, { - id: '4', name: 'test4', userVisible: true, userAssignable: false, canAssign: true - }]); - - inputViewSpy.restore(); - }); - }); - describe('events', function() { - var allTagsCollection; - beforeEach(function() { - allTagsCollection = view._inputView.collection; - - allTagsCollection.add([ - {id: '1', name: 'test1'}, - {id: '2', name: 'test2'}, - {id: '3', name: 'test3'} - ]); - - view.selectedTagsCollection.add([ - {id: '1', name: 'test1'}, - {id: '3', name: 'test3'} - ]); - view.render(); - }); - - it('renames model in selection collection on rename', function() { - allTagsCollection.get('3').set('name', 'test3_renamed'); - - expect(view.selectedTagsCollection.get('3').get('name')).toEqual('test3_renamed'); - }); - - it('adds tag to selection collection when selected by input', function() { - var createStub = sinon.stub(OC.SystemTags.SystemTagsMappingCollection.prototype, 'create'); - view._inputView.trigger('select', allTagsCollection.get('2')); - - expect(createStub.calledOnce).toEqual(true); - expect(createStub.getCall(0).args[0]).toEqual({ - id: '2', - name: 'test2', - userVisible: true, - userAssignable: true, - canAssign: true - }); - - createStub.restore(); - }); - it('removes tag from selection collection when deselected by input', function() { - var destroyStub = sinon.stub(OC.SystemTags.SystemTagModel.prototype, 'destroy'); - view._inputView.trigger('deselect', '3'); - - expect(destroyStub.calledOnce).toEqual(true); - expect(destroyStub.calledOn(view.selectedTagsCollection.get('3'))).toEqual(true); - - destroyStub.restore(); - }); - - it('removes tag from selection whenever the tag was deleted globally', function() { - expect(view.selectedTagsCollection.get('3')).not.toBeFalsy(); - - allTagsCollection.remove('3'); - - expect(view.selectedTagsCollection.get('3')).toBeFalsy(); - - }); - }); - describe('visibility', function() { - it('reports visibility based on the "hidden" class name', function() { - view.$el.addClass('hidden'); - - expect(view.isVisible()).toBeFalsy(); - - view.$el.removeClass('hidden'); - - expect(view.isVisible()).toBeTruthy(); - }); - it('is visible after rendering', function() { - view.render(); - - expect(view.isVisible()).toBeTruthy(); - }); - it('shows and hides the element', function() { - view.show(); - - expect(view.isVisible()).toBeTruthy(); - - view.hide(); - - expect(view.isVisible()).toBeFalsy(); - - view.show(); - - expect(view.isVisible()).toBeTruthy(); - }); - }); - describe('select2', function() { - var select2Stub; - - beforeEach(function() { - select2Stub = sinon.stub($.fn, 'select2'); - }); - afterEach(function() { - select2Stub.restore(); - }); - it('opens dropdown', function() { - view.openDropdown(); - - expect(select2Stub.calledOnce).toBeTruthy(); - expect(select2Stub.withArgs('open')).toBeTruthy(); - }); - }); -}); diff --git a/core/css/systemtags.css b/core/css/systemtags.css index 29e29b82c14..58077d09419 100644 --- a/core/css/systemtags.css +++ b/core/css/systemtags.css @@ -1 +1 @@ -.systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices,.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}/*# sourceMappingURL=systemtags.css.map */ +.systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemtags-select2-container{width:100%}.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}/*# sourceMappingURL=systemtags.css.map */ diff --git a/core/css/systemtags.css.map b/core/css/systemtags.css.map index ce18867c239..b2e8be85a37 100644 --- a/core/css/systemtags.css.map +++ b/core/css/systemtags.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["systemtags.scss"],"names":[],"mappings":"AAcE,8DACC,kBACA,iBACA,iBACA,YAED,iFACC,aAGF,gFACC,mBAED,yDACC,qBACA,WACA,gEACC,YAGF,iDACC,kBACA,UAED,qDACC,qBACA,wBACA,SACA,kBACA,2DACC,qBACA,YACA,wBAGF,oCACC,UACA,qBACA,gBACA,uBACA,2CACC,aAGF,kCACC,iBAED,8CACC,qBACA,YACA,WAED,mDACC,YAIF,kDAEC,WAEA,oFACC,4BACA,gBAGD,8KACC,WAIF,6EACC","file":"systemtags.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["systemtags.scss"],"names":[],"mappings":"AAcE,8DACC,kBACA,iBACA,iBACA,YAED,iFACC,aAGF,gFACC,mBAED,yDACC,qBACA,WACA,gEACC,YAGF,iDACC,kBACA,UAED,qDACC,qBACA,wBACA,SACA,kBACA,2DACC,qBACA,YACA,wBAGF,oCACC,UACA,qBACA,gBACA,uBACA,2CACC,aAGF,kCACC,iBAED,8CACC,qBACA,YACA,WAED,mDACC,YAIF,8BACC,WAEA,+CACC,4BACA,gBAGD,4FACC,WAIF,6EACC","file":"systemtags.css"} \ No newline at end of file diff --git a/core/css/systemtags.scss b/core/css/systemtags.scss index 6e100b12a92..c159db8322e 100644 --- a/core/css/systemtags.scss +++ b/core/css/systemtags.scss @@ -69,7 +69,6 @@ } } -.systemTagsInfoView, .systemtags-select2-container { width: 100%; diff --git a/dist/core-systemtags.js b/dist/core-systemtags.js index 871bf31fb6b..427ae9ea1aa 100644 --- a/dist/core-systemtags.js +++ b/dist/core-systemtags.js @@ -1,3 +1,3 @@ /*! For license information please see core-systemtags.js.LICENSE.txt */ -(()=>{var e,n={16558:(e,n,s)=>{"use strict";var l=s(95573),i=s.n(l);!function(e){e.SystemTags={getDescriptiveTag:function(e){_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON());var n,s=document.createElement("span");if(_.isUndefined(e.name))return s.classList.add("non-existing-tag"),s.textContent=t("core","Non-existing tag #{tag}",{tag:e}),s;if(s.textContent=i()(e.name),e.userAssignable||(n=t("core","Restricted")),e.userVisible||(n=t("core","Invisible")),n){var l=document.createElement("em");l.textContent=" ("+n+")",s.appendChild(l)}return s}}}(OC),s(53076);var a=s(79753);!function(e){const t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url(){return(0,a.generateRemoteUrl)("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId(e){this._objectId=e},setObjectType(e){this._objectType=e},initialize(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC),s(75026);var o=s(69318),c=s.n(o),r=s(25759),u=s.n(r),d=s(82188),p=s.n(d);!function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return''},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(e){var n=$(e.target).closest(".systemtags-item"),s=n.attr("data-id"),l=this.collection.get(s).get("name"),i=$(u()({cid:this.cid,name:l,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return n.find(".label").after(i),n.find(".label, .systemtags-actions").addClass("hidden"),n.closest(".select2-result").addClass("has-form"),i.find("[title]").tooltip({placement:"bottom",container:"body"}),i.find("input").focus().selectRange(0,l.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),s=n.attr("data-id"),l=this.collection.get(s),i=$(e.target).find("input").val().trim();i&&i!==l.get("name")&&(l.save({name:i}),n.find(".label").text(i)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,s){409===s.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var s=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});s.length&&(s=s[0],n._addToSelect2Selection(s.toJSON()),n.trigger("select",s))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var s=n.filterByName(e.term.trim());t._isAdmin||(s=_.filter(s,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(s,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return c()(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n).innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return p()(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t).innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,s=$(e).val().split(",");function l(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,l)}(s))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var s=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,l){var i=s.indexOf(t.id)>=0,a=s.indexOf(l.id)>=0;if(i===a){var o=n._lastUsedTags.indexOf(t.id),c=n._lastUsedTags.indexOf(l.id);return o!==c?-1===c?-1:-1===o?1:o{!function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});const t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:e=>({id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign})});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},75026:()=>{!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||this.working||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();this.working=!0;var s=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,n.working=!1,s)return s.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},9529:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(87537),l=n.n(s),i=n(23645),a=n.n(i)()(l());a.push([e.id,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices,.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}","",{version:3,sources:["webpack://./core/css/systemtags.scss"],names:[],mappings:"AAcE,8DACC,iBAAA,CACA,gBAAA,CACA,gBAAA,CACA,WAAA,CAED,iFACC,YAAA,CAGF,gFACC,kBAAA,CAED,yDACC,oBAAA,CACA,UAAA,CACA,gEACC,WAAA,CAGF,iDACC,iBAAA,CACA,SAAA,CAED,qDACC,oBAAA,CACA,uBAAA,CACA,QAAA,CACA,iBAAA,CACA,2DACC,oBAAA,CACA,WAAA,CACA,uBAAA,CAGF,oCACC,SAAA,CACA,oBAAA,CACA,eAAA,CACA,sBAAA,CACA,2CACC,YAAA,CAGF,kCACC,gBAAA,CAED,8CACC,oBAAA,CACA,WAAA,CACA,UAAA,CAED,mDACC,WAAA,CAIF,kDAEC,UAAA,CAEA,oFACC,2BAAA,CACA,eAAA,CAGD,8KACC,UAAA,CAIF,6EACC,WAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2016, John Molakvoæ \n * @copyright Copyright (c) 2016, Robin Appelman \n * @copyright Copyright (c) 2016, Jan-Christoph Borchardt \n * @copyright Copyright (c) 2016, Vincent Petry \n * @copyright Copyright (c) 2016, Erik Pellikka \n * @copyright Copyright (c) 2015, Vincent Petry \n *\n * @license GNU AGPL version 3 or any later version\n *\n */\n\n.systemtags-select2-dropdown {\n\t.select2-result-label {\n\t\t.checkmark {\n\t\t\tvisibility: hidden;\n\t\t\tmargin-left: -5px;\n\t\t\tmargin-right: 5px;\n\t\t\tpadding: 4px;\n\t\t}\n\t\t.new-item .systemtags-actions {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t.select2-selected .select2-result-label .checkmark {\n\t\tvisibility: visible;\n\t}\n\t.select2-result-label .icon {\n\t\tdisplay: inline-block;\n\t\topacity: .5;\n\t\t&.rename {\n\t\t\tpadding: 4px;\n\t\t}\n\t}\n\t.systemtags-actions {\n\t\tposition: absolute;\n\t\tright: 5px;\n\t}\n\t.systemtags-rename-form {\n\t\tdisplay: inline-block;\n\t\twidth: calc(100% - 20px);\n\t\ttop: -6px;\n\t\tposition: relative;\n\t\tinput {\n\t\t\tdisplay: inline-block;\n\t\t\theight: 30px;\n\t\t\twidth: calc(100% - 40px);\n\t\t}\n\t}\n\t.label {\n\t\twidth: 85%;\n\t\tdisplay: inline-block;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t&.hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\tspan {\n\t\tline-height: 25px;\n\t}\n\t.systemtags-item {\n\t\tdisplay: inline-block;\n\t\theight: 25px;\n\t\twidth: 100%;\n\t}\n\t.select2-result-label {\n\t\theight: 25px;\n\t}\n}\n\n.systemTagsInfoView,\n.systemtags-select2-container {\n\twidth: 100%;\n\n\t.select2-choices {\n\t\tflex-wrap: nowrap !important;\n\t\tmax-height: 44px;\n\t}\n\n\t.select2-choices .select2-search-choice.select2-locked .label {\n\t\topacity: 0.5;\n\t}\n}\n\n#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result {\n\tpadding: 5px;\n}\n"],sourceRoot:""}]);const o=a},69318:(e,t,n)=>{var s=n(40202);e.exports=(s.default||s).template({1:function(e,t,n,s,l){return" new-item"},3:function(e,t,n,s,l){var i,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t'+(null!=(i="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:l,loc:{start:{line:4,column:22},end:{line:4,column:37}}}):a)?i:"")+"\n"},5:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"name")||(null!=t?a(t,"name"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:l,loc:{start:{line:6,column:22},end:{line:6,column:30}}}):i)+"\n"},7:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t\n\t\t\t\n\t\t\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,l){var i,a,o,c=null!=t?t:e.nullContext||{},r=e.hooks.helperMissing,u="function",d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},p='\n\n'+(null!=(i=d(n,"if").call(c,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(3,l,0),inverse:e.program(5,l,0),data:l,loc:{start:{line:3,column:1},end:{line:7,column:8}}}))?i:"");return a=null!=(a=d(n,"allowActions")||(null!=t?d(t,"allowActions"):t))?a:r,o={name:"allowActions",hash:{},fn:e.program(7,l,0),inverse:e.noop,data:l,loc:{start:{line:8,column:1},end:{line:12,column:18}}},i=typeof a===u?a.call(c,o):a,d(n,"allowActions")||(i=e.hooks.blockHelperMissing.call(t,i,o)),null!=i&&(p+=i),p+"\n"},useData:!0})},25759:(e,t,n)=>{var s=n(40202);e.exports=(s.default||s).template({1:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,l){var i,a,o=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,r="function",u=e.escapeExpression,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'
\n\t \n\t\n'+(null!=(i=d(n,"if").call(o,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.noop,data:l,loc:{start:{line:4,column:1},end:{line:6,column:8}}}))?i:"")+"
\n"},useData:!0})},82188:(e,t,n)=>{var s=n(40202);e.exports=(s.default||s).template({1:function(e,t,n,s,l){var i,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t'+(null!=(i="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:l,loc:{start:{line:2,column:21},end:{line:2,column:36}}}):a)?i:"")+"\n"},3:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"name")||(null!=t?a(t,"name"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:l,loc:{start:{line:4,column:21},end:{line:4,column:29}}}):i)+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(n,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.program(3,l,0),data:l,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:""},useData:!0})}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,l),i.loaded=!0,i.exports}l.m=n,e=[],l.O=(t,n,s,i)=>{if(!n){var a=1/0;for(u=0;u=i)&&Object.keys(l.O).every((e=>l.O[e](n[c])))?n.splice(c--,1):(o=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,s,i]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.j=1686,(()=>{l.b=document.baseURI||self.location.href;var e={1686:0};l.O.j=t=>0===e[t];var t=(t,n)=>{var s,i,a=n[0],o=n[1],c=n[2],r=0;if(a.some((t=>0!==e[t]))){for(s in o)l.o(o,s)&&(l.m[s]=o[s]);if(c)var u=c(l)}for(t&&t(n);rl(16558)));i=l.O(i)})(); -//# sourceMappingURL=core-systemtags.js.map?v=3b6afef7beaf74feec59 \ No newline at end of file +(()=>{var e,n={16558:(e,n,s)=>{"use strict";var l=s(95573),i=s.n(l);!function(e){e.SystemTags={getDescriptiveTag:function(e){_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON());var n,s=document.createElement("span");if(_.isUndefined(e.name))return s.classList.add("non-existing-tag"),s.textContent=t("core","Non-existing tag #{tag}",{tag:e}),s;if(s.textContent=i()(e.name),e.userAssignable||(n=t("core","Restricted")),e.userVisible||(n=t("core","Invisible")),n){var l=document.createElement("em");l.textContent=" ("+n+")",s.appendChild(l)}return s}}}(OC),s(53076);var a=s(79753);!function(e){const t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url(){return(0,a.generateRemoteUrl)("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId(e){this._objectId=e},setObjectType(e){this._objectType=e},initialize(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC),s(75026);var o=s(69318),r=s.n(o),c=s(25759),u=s.n(c),d=s(82188),p=s.n(d);!function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return''},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(e){var n=$(e.target).closest(".systemtags-item"),s=n.attr("data-id"),l=this.collection.get(s).get("name"),i=$(u()({cid:this.cid,name:l,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return n.find(".label").after(i),n.find(".label, .systemtags-actions").addClass("hidden"),n.closest(".select2-result").addClass("has-form"),i.find("[title]").tooltip({placement:"bottom",container:"body"}),i.find("input").focus().selectRange(0,l.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),s=n.attr("data-id"),l=this.collection.get(s),i=$(e.target).find("input").val().trim();i&&i!==l.get("name")&&(l.save({name:i}),n.find(".label").text(i)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,s){409===s.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var s=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});s.length&&(s=s[0],n._addToSelect2Selection(s.toJSON()),n.trigger("select",s))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var s=n.filterByName(e.term.trim());t._isAdmin||(s=_.filter(s,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(s,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return r()(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n).innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return p()(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t).innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,s=$(e).val().split(",");function l(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,l)}(s))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var s=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,l){var i=s.indexOf(t.id)>=0,a=s.indexOf(l.id)>=0;if(i===a){var o=n._lastUsedTags.indexOf(t.id),r=n._lastUsedTags.indexOf(l.id);return o!==r?-1===r?-1:-1===o?1:o{!function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});const t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:e=>({id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign})});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},75026:()=>{!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||this.working||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();this.working=!0;var s=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,n.working=!1,s)return s.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},9529:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(87537),l=n.n(s),i=n(23645),a=n.n(i)()(l());a.push([e.id,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemtags-select2-container{width:100%}.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}","",{version:3,sources:["webpack://./core/css/systemtags.scss"],names:[],mappings:"AAcE,8DACC,iBAAA,CACA,gBAAA,CACA,gBAAA,CACA,WAAA,CAED,iFACC,YAAA,CAGF,gFACC,kBAAA,CAED,yDACC,oBAAA,CACA,UAAA,CACA,gEACC,WAAA,CAGF,iDACC,iBAAA,CACA,SAAA,CAED,qDACC,oBAAA,CACA,uBAAA,CACA,QAAA,CACA,iBAAA,CACA,2DACC,oBAAA,CACA,WAAA,CACA,uBAAA,CAGF,oCACC,SAAA,CACA,oBAAA,CACA,eAAA,CACA,sBAAA,CACA,2CACC,YAAA,CAGF,kCACC,gBAAA,CAED,8CACC,oBAAA,CACA,WAAA,CACA,UAAA,CAED,mDACC,WAAA,CAIF,8BACC,UAAA,CAEA,+CACC,2BAAA,CACA,eAAA,CAGD,4FACC,UAAA,CAIF,6EACC,WAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2016, John Molakvoæ \n * @copyright Copyright (c) 2016, Robin Appelman \n * @copyright Copyright (c) 2016, Jan-Christoph Borchardt \n * @copyright Copyright (c) 2016, Vincent Petry \n * @copyright Copyright (c) 2016, Erik Pellikka \n * @copyright Copyright (c) 2015, Vincent Petry \n *\n * @license GNU AGPL version 3 or any later version\n *\n */\n\n.systemtags-select2-dropdown {\n\t.select2-result-label {\n\t\t.checkmark {\n\t\t\tvisibility: hidden;\n\t\t\tmargin-left: -5px;\n\t\t\tmargin-right: 5px;\n\t\t\tpadding: 4px;\n\t\t}\n\t\t.new-item .systemtags-actions {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t.select2-selected .select2-result-label .checkmark {\n\t\tvisibility: visible;\n\t}\n\t.select2-result-label .icon {\n\t\tdisplay: inline-block;\n\t\topacity: .5;\n\t\t&.rename {\n\t\t\tpadding: 4px;\n\t\t}\n\t}\n\t.systemtags-actions {\n\t\tposition: absolute;\n\t\tright: 5px;\n\t}\n\t.systemtags-rename-form {\n\t\tdisplay: inline-block;\n\t\twidth: calc(100% - 20px);\n\t\ttop: -6px;\n\t\tposition: relative;\n\t\tinput {\n\t\t\tdisplay: inline-block;\n\t\t\theight: 30px;\n\t\t\twidth: calc(100% - 40px);\n\t\t}\n\t}\n\t.label {\n\t\twidth: 85%;\n\t\tdisplay: inline-block;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t&.hidden {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\tspan {\n\t\tline-height: 25px;\n\t}\n\t.systemtags-item {\n\t\tdisplay: inline-block;\n\t\theight: 25px;\n\t\twidth: 100%;\n\t}\n\t.select2-result-label {\n\t\theight: 25px;\n\t}\n}\n\n.systemtags-select2-container {\n\twidth: 100%;\n\n\t.select2-choices {\n\t\tflex-wrap: nowrap !important;\n\t\tmax-height: 44px;\n\t}\n\n\t.select2-choices .select2-search-choice.select2-locked .label {\n\t\topacity: 0.5;\n\t}\n}\n\n#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result {\n\tpadding: 5px;\n}\n"],sourceRoot:""}]);const o=a},69318:(e,t,n)=>{var s=n(40202);e.exports=(s.default||s).template({1:function(e,t,n,s,l){return" new-item"},3:function(e,t,n,s,l){var i,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t'+(null!=(i="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:l,loc:{start:{line:4,column:22},end:{line:4,column:37}}}):a)?i:"")+"\n"},5:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"name")||(null!=t?a(t,"name"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:l,loc:{start:{line:6,column:22},end:{line:6,column:30}}}):i)+"\n"},7:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t\n\t\t\t\n\t\t\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,l){var i,a,o,r=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u="function",d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},p='\n\n'+(null!=(i=d(n,"if").call(r,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(3,l,0),inverse:e.program(5,l,0),data:l,loc:{start:{line:3,column:1},end:{line:7,column:8}}}))?i:"");return a=null!=(a=d(n,"allowActions")||(null!=t?d(t,"allowActions"):t))?a:c,o={name:"allowActions",hash:{},fn:e.program(7,l,0),inverse:e.noop,data:l,loc:{start:{line:8,column:1},end:{line:12,column:18}}},i=typeof a===u?a.call(r,o):a,d(n,"allowActions")||(i=e.hooks.blockHelperMissing.call(t,i,o)),null!=i&&(p+=i),p+"\n"},useData:!0})},25759:(e,t,n)=>{var s=n(40202);e.exports=(s.default||s).template({1:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t\t\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,l){var i,a,o=null!=t?t:e.nullContext||{},r=e.hooks.helperMissing,c="function",u=e.escapeExpression,d=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'
\n\t \n\t\n'+(null!=(i=d(n,"if").call(o,null!=t?d(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.noop,data:l,loc:{start:{line:4,column:1},end:{line:6,column:8}}}))?i:"")+"
\n"},useData:!0})},82188:(e,t,n)=>{var s=n(40202);e.exports=(s.default||s).template({1:function(e,t,n,s,l){var i,a,o=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t'+(null!=(i="function"==typeof(a=null!=(a=o(n,"tagMarkup")||(null!=t?o(t,"tagMarkup"):t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:l,loc:{start:{line:2,column:21},end:{line:2,column:36}}}):a)?i:"")+"\n"},3:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return'\t'+e.escapeExpression("function"==typeof(i=null!=(i=a(n,"name")||(null!=t?a(t,"name"):t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:l,loc:{start:{line:4,column:21},end:{line:4,column:29}}}):i)+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,l){var i,a=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(i=a(n,"if").call(null!=t?t:e.nullContext||{},null!=t?a(t,"isAdmin"):t,{name:"if",hash:{},fn:e.program(1,l,0),inverse:e.program(3,l,0),data:l,loc:{start:{line:1,column:0},end:{line:5,column:7}}}))?i:""},useData:!0})}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,l),i.loaded=!0,i.exports}l.m=n,e=[],l.O=(t,n,s,i)=>{if(!n){var a=1/0;for(u=0;u=i)&&Object.keys(l.O).every((e=>l.O[e](n[r])))?n.splice(r--,1):(o=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,s,i]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.j=1686,(()=>{l.b=document.baseURI||self.location.href;var e={1686:0};l.O.j=t=>0===e[t];var t=(t,n)=>{var s,i,a=n[0],o=n[1],r=n[2],c=0;if(a.some((t=>0!==e[t]))){for(s in o)l.o(o,s)&&(l.m[s]=o[s]);if(r)var u=r(l)}for(t&&t(n);cl(16558)));i=l.O(i)})(); +//# sourceMappingURL=core-systemtags.js.map?v=28e1ef581116ba8ea2c2 \ No newline at end of file diff --git a/dist/core-systemtags.js.map b/dist/core-systemtags.js.map index e132e3856d0..6a89f01635b 100644 --- a/dist/core-systemtags.js.map +++ b/dist/core-systemtags.js.map @@ -1 +1 @@ -{"version":3,"file":"core-systemtags.js?v=3b6afef7beaf74feec59","mappings":";UAAIA,2DC6BJ,SAAUC,GAITA,EAAGC,WAAa,CAMfC,kBAAmB,SAASC,GACvBC,EAAEC,YAAYF,EAAIG,QAAUF,EAAEC,YAAYF,EAAII,UACjDJ,EAAMA,EAAII,UAGX,IAYIC,EAZAC,EAAQC,SAASC,cAAc,QAEnC,GAAIP,EAAEC,YAAYF,EAAIG,MAKrB,OAJAG,EAAMG,UAAUC,IAAI,oBACpBJ,EAAMK,YAAcC,EAAE,OAAQ,0BAA2B,CACvDZ,IAAKA,IAEAM,EAaR,GAVAA,EAAMK,YAAcE,IAAWb,EAAIG,MAG9BH,EAAIc,iBACRT,EAAQO,EAAE,OAAQ,eAEdZ,EAAIe,cAERV,EAAQO,EAAE,OAAQ,cAEfP,EAAO,CACV,IAAIW,EAAST,SAASC,cAAc,MACpCQ,EAAOL,YAAc,KAAON,EAAQ,IACp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GL,EAAS0C,MAAMnQ,GAAgC,IAAxB6P,EAAgB7P,KAAa,CACtD,IAAIkN,KAAY+C,EACZhD,EAAoB0B,EAAEsB,EAAa/C,KACrCD,EAAoBK,EAAEJ,GAAY+C,EAAY/C,IAGhD,GAAGgD,EAAS,IAAI1C,EAAS0C,EAAQjD,EAClC,CAEA,IADG+C,GAA4BA,EAA2BxP,GACrDsN,EAAIL,EAAS9J,OAAQmK,IACzBgC,EAAUrC,EAASK,GAChBb,EAAoB0B,EAAEkB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO7C,EAAoBM,EAAEC,EAAO,EAGjC4C,EAAqB/O,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1F+O,EAAmBC,QAAQN,EAAqBtO,KAAK,KAAM,IAC3D2O,EAAmB1L,KAAOqL,EAAqBtO,KAAK,KAAM2O,EAAmB1L,KAAKjD,KAAK2O,QClDvFnD,EAAoBqD,QAAKnI,ECGzB,IAAIoI,EAAsBtD,EAAoBM,OAAEpF,EAAW,CAAC,OAAO,IAAO8E,EAAoB,SAC9FsD,EAAsBtD,EAAoBM,EAAEgD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/core/src/systemtags/systemtags.js","webpack:///nextcloud/core/src/systemtags/systemtagsmappingcollection.js","webpack:///nextcloud/core/src/systemtags/systemtagsinputfield.js","webpack://nextcloud/./core/css/systemtags.scss?38f5","webpack:///nextcloud/core/src/systemtags/systemtagmodel.js","webpack:///nextcloud/core/src/systemtags/systemtagscollection.js","webpack:///nextcloud/core/css/systemtags.scss","webpack:///nextcloud/core/src/systemtags/templates/result.handlebars","webpack:///nextcloud/core/src/systemtags/templates/result_form.handlebars","webpack:///nextcloud/core/src/systemtags/templates/selection.handlebars","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * Copyright (c) 2016\n *\n * @author Gary Kim \n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n/* eslint-disable */\nimport escapeHTML from 'escape-html'\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @returns {HTMLElement}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON()\n\t\t\t}\n\n\t\t\tvar $span = document.createElement('span')\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\t$span.classList.add('non-existing-tag')\n\t\t\t\t$span.textContent = t('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t})\n\t\t\t\treturn $span\n\t\t\t}\n\n\t\t\t$span.textContent = escapeHTML(tag.name)\n\n\t\t\tvar scope\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'Restricted')\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'Invisible')\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\tvar $scope = document.createElement('em')\n\t\t\t\t$scope.textContent = ' (' + scope + ')'\n\t\t\t\t$span.appendChild($scope)\n\t\t\t}\n\t\t\treturn $span\n\t\t}\n\t}\n})(OC)\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tconst SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t\t * Use PUT instead of PROPPATCH\n\t\t\t */\n\t\t\tusePUT: true,\n\n\t\t\t/**\n\t\t\t * Id of the file for which to filter activities by\n\t\t\t *\n\t\t\t * @member int\n\t\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t\t * Type of the object to filter by\n\t\t\t *\n\t\t\t * @member string\n\t\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl() {\n\t\t\t\treturn generateRemoteUrl('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Sets the object id to filter by or null for all.\n\t\t\t *\n\t\t\t * @param {number} objectId file id or null\n\t\t\t */\n\t\t\tsetObjectId(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Sets the object type to filter by or null for all.\n\t\t\t *\n\t\t\t * @param {number} objectType file id or null\n\t\t\t */\n\t\t\tsetObjectType(objectType) {\n\t\t\t\tthis._objectType = objectType\n\t\t\t},\n\n\t\t\tinitialize(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetTagIds() {\n\t\t\t\treturn this.map(function(model) {\n\t\t\t\t\treturn model.id\n\t\t\t\t})\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection\n})(OC)\n","/**\n * Copyright (c) 2015\n *\n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n/* eslint-disable */\nimport templateResult from './templates/result.handlebars'\nimport templateResultForm from './templates/result_form.handlebars'\nimport templateSelection from './templates/selection.handlebars'\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\t_newTag: null,\n\n\t\t\t_lastUsedTags: [],\n\n\t\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\t\ttemplate: function(data) {\n\t\t\t\treturn ''\n\t\t\t},\n\n\t\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {boolean} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {boolean} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {boolean} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {boolean} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\t\tinitialize: function(options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._multiple = !!options.multiple\n\t\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions\n\t\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate\n\t\t\t\tthis._isAdmin = !!options.isAdmin\n\n\t\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\t\tthis._initSelection = options.initSelection\n\t\t\t\t}\n\n\t\t\t\tthis.collection = options.collection || OC.SystemTags.collection\n\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t\t_.defer(self._refreshSelection)\n\t\t\t\t})\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\n\t\t\t\t_.bindAll(\n\t\t\t\t\tthis,\n\t\t\t\t\t'_refreshSelection',\n\t\t\t\t\t'_onClickRenameTag',\n\t\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t\t'_onSelectTag',\n\t\t\t\t\t'_onDeselectTag',\n\t\t\t\t\t'_onSubmitRenameTag'\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_getLastUsedTags: function() {\n\t\t\t\tvar self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t\t_refreshSelection: function() {\n\t\t\t\tthis.$tagsField.select2('val', this.$tagsField.val())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t\t_onClickRenameTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\n\t\t\t\tvar oldName = tagModel.get('name')\n\t\t\t\tvar $renameForm = $(templateResultForm({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tname: oldName,\n\t\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}))\n\t\t\t\t$item.find('.label').after($renameForm)\n\t\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden')\n\t\t\t\t$item.closest('.select2-result').addClass('has-form')\n\n\t\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\tcontainer: 'body'\n\t\t\t\t})\n\t\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length)\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server.\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onSubmitRenameTag: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $form = $(ev.target)\n\t\t\t\tvar $item = $form.closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\t\t\t\tvar newName = $(ev.target).find('input').val().trim()\n\t\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\t\ttagModel.save({ 'name': newName })\n\t\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t\t$item.find('.label').text(newName)\n\t\t\t\t}\n\t\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden')\n\t\t\t\t$form.remove()\n\t\t\t\t$item.closest('.select2-result').removeClass('has-form')\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onClickDeleteTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tthis.collection.get(tagId).destroy()\n\t\t\t\t$(ev.target).tooltip('hide')\n\t\t\t\t$item.closest('.select2-result').remove()\n\t\t\t\t// TODO: spinner\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_addToSelect2Selection: function(selection) {\n\t\t\t\tvar data = this.$tagsField.select2('data')\n\t\t\t\tdata.push(selection)\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onSelectTag: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar tag\n\t\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\t\ttag = this.collection.create({\n\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tcanAssign: true\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\tself._lastUsedTags.unshift(model.id)\n\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\t\tself.collection.reset()\n\t\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\t\tmodel = model[0]\n\t\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\t\t\t\t\tself.trigger('select', model)\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\t\t\t\t\t})\n\t\t\t\t\tthis.$tagsField.select2('close')\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\ttag = this.collection.get(e.object.id)\n\t\t\t\t\tthis._lastUsedTags.unshift(tag.id)\n\t\t\t\t}\n\t\t\t\tthis._newTag = null\n\t\t\t\tthis.trigger('select', tag)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onDeselectTag: function(e) {\n\t\t\t\tthis.trigger('deselect', e.choice.id)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t\t_queryTagsAutocomplete: function(query) {\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim())\n\t\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\t\treturn tagModel.get('canAssign')\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_preventDefault: function(e) {\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatDropDownResult: function(data) {\n\t\t\t\treturn templateResult(_.extend({\n\t\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\t\tallowActions: this._allowActions,\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data).innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatSelection: function(data) {\n\t\t\t\treturn templateSelection(_.extend({\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data).innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @returns {Object} dummy tag\n\t\t */\n\t\t\t_createSearchChoice: function(term) {\n\t\t\t\tterm = term.trim()\n\t\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term\n\t\t\t\t}).length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this._newTag) {\n\t\t\t\t\tthis._newTag = {\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\tname: term,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tcanAssign: true,\n\t\t\t\t\t\tisNew: true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._newTag.name = term\n\t\t\t\t}\n\n\t\t\t\treturn this._newTag\n\t\t\t},\n\n\t\t\t_initSelection: function(element, callback) {\n\t\t\t\tvar self = this\n\t\t\t\tvar ids = $(element).val().split(',')\n\n\t\t\t\tfunction modelToSelection(model) {\n\t\t\t\t\tvar data = model.toJSON()\n\t\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\t\tdata.locked = true\n\t\t\t\t\t}\n\t\t\t\t\treturn data\n\t\t\t\t}\n\n\t\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'))\n\t\t\t\t\t})\n\t\t\t\t\treturn _.map(selectedModels, modelToSelection)\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tcallback(findSelectedObjects(ids))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\tthis.$el.find('[title]').tooltip({ placement: 'bottom' })\n\t\t\t\tthis.$tagsField = this.$el.find('[name=tags]')\n\t\t\t\tthis.$tagsField.select2({\n\t\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\t\tcloseOnSelect: false,\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: this._multiple,\n\t\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\t\tid: function(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\t\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\t\tsortResults: function(results) {\n\t\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id')\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0\n\t\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0\n\t\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\t\treturn t('core', 'No tags found')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t\t.on('select2-removing', this._onDeselectTag)\n\n\t\t\t\tvar $dropDown = this.$tagsField.select2('dropdown')\n\t\t\t\t// register events for inside the dropdown\n\t\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag)\n\t\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag)\n\t\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault)\n\t\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag)\n\n\t\t\t\tthis.delegateEvents()\n\t\t\t},\n\n\t\t\tremove: function() {\n\t\t\t\tif (this.$tagsField) {\n\t\t\t\t\tthis.$tagsField.select2('destroy')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetValues: function() {\n\t\t\t\tthis.$tagsField.select2('val')\n\t\t\t},\n\n\t\t\tsetValues: function(values) {\n\t\t\t\tthis.$tagsField.select2('val', values)\n\t\t\t},\n\n\t\t\tsetData: function(data) {\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField\n\n})(OC)\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Michael Jobst \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID: '{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME: '{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable',\n\t})\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tconst SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tuserVisible: true,\n\t\t\t\tuserAssignable: true,\n\t\t\t\tcanAssign: true,\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\tid: OC.Files.Client.PROPERTY_FILEID,\n\t\t\t\tname: OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t\tuserVisible: OC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t\tuserAssignable: OC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t\tcanAssign: OC.Files.Client.PROPERTY_CAN_ASSIGN,\n\t\t\t},\n\n\t\t\tparse(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tname: data.name,\n\t\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true',\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagModel = SystemTagModel\n})(OC)\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n/* eslint-disable */\n(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase()\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags/'\n\t\t\t},\n\n\t\t\tfilterByName: function(name) {\n\t\t\t\treturn this.filter(function(model) {\n\t\t\t\t\treturn filterFunction(model, name)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis.fetched = false\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param {any} options -\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\t\tfetch: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\toptions = options || {}\n\t\t\t\tif (this.fetched || this.working || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success(this, null, options)\n\t\t\t\t\t}\n\t\t\t\t\t// trigger sync event\n\t\t\t\t\tthis.trigger('sync', this, null, options)\n\t\t\t\t\treturn Promise.resolve()\n\t\t\t\t}\n\n\t\t\t\tthis.working = true\n\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({}, options)\n\t\t\t\toptions.success = function() {\n\t\t\t\t\tself.fetched = true\n\t\t\t\t\tself.working = false\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\treturn success.apply(this, arguments)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection()\n})(OC)\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices,.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./core/css/systemtags.scss\"],\"names\":[],\"mappings\":\"AAcE,8DACC,iBAAA,CACA,gBAAA,CACA,gBAAA,CACA,WAAA,CAED,iFACC,YAAA,CAGF,gFACC,kBAAA,CAED,yDACC,oBAAA,CACA,UAAA,CACA,gEACC,WAAA,CAGF,iDACC,iBAAA,CACA,SAAA,CAED,qDACC,oBAAA,CACA,uBAAA,CACA,QAAA,CACA,iBAAA,CACA,2DACC,oBAAA,CACA,WAAA,CACA,uBAAA,CAGF,oCACC,SAAA,CACA,oBAAA,CACA,eAAA,CACA,sBAAA,CACA,2CACC,YAAA,CAGF,kCACC,gBAAA,CAED,8CACC,oBAAA,CACA,WAAA,CACA,UAAA,CAED,mDACC,WAAA,CAIF,kDAEC,UAAA,CAEA,oFACC,2BAAA,CACA,eAAA,CAGD,8KACC,UAAA,CAIF,6EACC,WAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2016, John Molakvoæ \\n * @copyright Copyright (c) 2016, Robin Appelman \\n * @copyright Copyright (c) 2016, Jan-Christoph Borchardt \\n * @copyright Copyright (c) 2016, Vincent Petry \\n * @copyright Copyright (c) 2016, Erik Pellikka \\n * @copyright Copyright (c) 2015, Vincent Petry \\n *\\n * @license GNU AGPL version 3 or any later version\\n *\\n */\\n\\n.systemtags-select2-dropdown {\\n\\t.select2-result-label {\\n\\t\\t.checkmark {\\n\\t\\t\\tvisibility: hidden;\\n\\t\\t\\tmargin-left: -5px;\\n\\t\\t\\tmargin-right: 5px;\\n\\t\\t\\tpadding: 4px;\\n\\t\\t}\\n\\t\\t.new-item .systemtags-actions {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\t.select2-selected .select2-result-label .checkmark {\\n\\t\\tvisibility: visible;\\n\\t}\\n\\t.select2-result-label .icon {\\n\\t\\tdisplay: inline-block;\\n\\t\\topacity: .5;\\n\\t\\t&.rename {\\n\\t\\t\\tpadding: 4px;\\n\\t\\t}\\n\\t}\\n\\t.systemtags-actions {\\n\\t\\tposition: absolute;\\n\\t\\tright: 5px;\\n\\t}\\n\\t.systemtags-rename-form {\\n\\t\\tdisplay: inline-block;\\n\\t\\twidth: calc(100% - 20px);\\n\\t\\ttop: -6px;\\n\\t\\tposition: relative;\\n\\t\\tinput {\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\theight: 30px;\\n\\t\\t\\twidth: calc(100% - 40px);\\n\\t\\t}\\n\\t}\\n\\t.label {\\n\\t\\twidth: 85%;\\n\\t\\tdisplay: inline-block;\\n\\t\\toverflow: hidden;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\t&.hidden {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\tspan {\\n\\t\\tline-height: 25px;\\n\\t}\\n\\t.systemtags-item {\\n\\t\\tdisplay: inline-block;\\n\\t\\theight: 25px;\\n\\t\\twidth: 100%;\\n\\t}\\n\\t.select2-result-label {\\n\\t\\theight: 25px;\\n\\t}\\n}\\n\\n.systemTagsInfoView,\\n.systemtags-select2-container {\\n\\twidth: 100%;\\n\\n\\t.select2-choices {\\n\\t\\tflex-wrap: nowrap !important;\\n\\t\\tmax-height: 44px;\\n\\t}\\n\\n\\t.select2-choices .select2-search-choice.select2-locked .label {\\n\\t\\topacity: 0.5;\\n\\t}\\n}\\n\\n#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result {\\n\\tpadding: 5px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":22},\"end\":{\"line\":4,\"column\":37}}}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":6,\"column\":22},\"end\":{\"line\":6,\"column\":30}}}) : helper)))\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\\n\t\t\t\\n\t\t\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }, buffer = \n \"\\n\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":1},\"end\":{\"line\":7,\"column\":8}}})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = lookupProperty(helpers,\"allowActions\") || (depth0 != null ? lookupProperty(depth0,\"allowActions\") : depth0)) != null ? helper : alias2),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":8,\"column\":1},\"end\":{\"line\":12,\"column\":18}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"allowActions\")) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\\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, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"
\\n\t \\n\t\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":1},\"end\":{\"line\":6,\"column\":8}}})) != null ? stack1 : \"\")\n + \"
\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":21},\"end\":{\"line\":2,\"column\":36}}}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":21},\"end\":{\"line\":4,\"column\":29}}}) : helper)))\n + \"\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":5,\"column\":7}}})) != null ? stack1 : \"\");\n},\"useData\":true});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 1686;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1686: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(16558)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","name","toJSON","scope","$span","document","createElement","classList","add","textContent","t","escapeHTML","userAssignable","userVisible","$scope","appendChild","SystemTagsMappingCollection","Backbone","Collection","extend","sync","davSync","usePUT","_objectId","_objectType","model","SystemTagModel","url","generateRemoteUrl","this","setObjectId","objectId","setObjectType","objectType","initialize","models","options","getTagIds","map","id","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","template","data","_multiple","multiple","_allowActions","allowActions","_allowCreate","allowCreate","_isAdmin","isAdmin","isFunction","initSelection","_initSelection","collection","self","on","defer","_refreshSelection","bind","_getLastUsedTags","bindAll","$","ajax","type","generateUrl","success","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","get","$renameForm","templateResultForm","cid","deleteTooltip","renameLabel","find","after","addClass","tooltip","placement","container","focus","selectRange","length","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","text","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","object","isNew","create","canAssign","unshift","trigger","error","xhr","status","reset","fetch","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","filterByName","term","filter","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","templateResult","renameTooltip","tagMarkup","innerHTML","_formatSelection","templateSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","Model","defaults","davProperties","parse","SystemTagsCollection","linkToRemote","substr","toLowerCase","filterFunction","fetched","prototype","apply","arguments","working","force","Promise","resolve","call","___CSS_LOADER_EXPORT___","module","Handlebars","exports","depth0","helpers","partials","stack1","helper","lookupProperty","parent","propertyName","Object","hasOwnProperty","hooks","helperMissing","nullContext","escapeExpression","alias1","alias2","alias3","buffer","program","noop","blockHelperMissing","alias4","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","n","getter","__esModule","d","definition","o","defineProperty","enumerable","g","globalThis","Function","window","obj","prop","Symbol","toStringTag","value","nmd","paths","children","baseURI","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"core-systemtags.js?v=28e1ef581116ba8ea2c2","mappings":";UAAIA,2DC6BJ,SAAUC,GAITA,EAAGC,WAAa,CAMfC,kBAAmB,SAASC,GACvBC,EAAEC,YAAYF,EAAIG,QAAUF,EAAEC,YAAYF,EAAII,U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EAAoBsC,IAAOhE,IAC1BA,EAAOiE,MAAQ,GACVjE,EAAOkE,WAAUlE,EAAOkE,SAAW,IACjClE,GCHR0B,EAAoBe,EAAI,WCAxBf,EAAoBxE,EAAI3K,SAAS4R,SAAWrO,KAAKsO,SAASC,KAK1D,IAAIC,EAAkB,CACrB,KAAM,GAaP5C,EAAoBM,EAAES,EAAK8B,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BxP,KACvD,IAKI0M,EAAU4C,EALVrC,EAAWjN,EAAK,GAChByP,EAAczP,EAAK,GACnB0P,EAAU1P,EAAK,GAGIsN,EAAI,EAC3B,GAAGL,EAAS0C,MAAMnQ,GAAgC,IAAxB6P,EAAgB7P,KAAa,CACtD,IAAIkN,KAAY+C,EACZhD,EAAoB0B,EAAEsB,EAAa/C,KACrCD,EAAoBK,EAAEJ,GAAY+C,EAAY/C,IAGhD,GAAGgD,EAAS,IAAI1C,EAAS0C,EAAQjD,EAClC,CAEA,IADG+C,GAA4BA,EAA2BxP,GACrDsN,EAAIL,EAAS9J,OAAQmK,IACzBgC,EAAUrC,EAASK,GAChBb,EAAoB0B,EAAEkB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO7C,EAAoBM,EAAEC,EAAO,EAGjC4C,EAAqB/O,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1F+O,EAAmBC,QAAQN,EAAqBtO,KAAK,KAAM,IAC3D2O,EAAmB1L,KAAOqL,EAAqBtO,KAAK,KAAM2O,EAAmB1L,KAAKjD,KAAK2O,QClDvFnD,EAAoBqD,QAAKnI,ECGzB,IAAIoI,EAAsBtD,EAAoBM,OAAEpF,EAAW,CAAC,OAAO,IAAO8E,EAAoB,SAC9FsD,EAAsBtD,EAAoBM,EAAEgD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/core/src/systemtags/systemtags.js","webpack:///nextcloud/core/src/systemtags/systemtagsmappingcollection.js","webpack:///nextcloud/core/src/systemtags/systemtagsinputfield.js","webpack://nextcloud/./core/css/systemtags.scss?38f5","webpack:///nextcloud/core/src/systemtags/systemtagmodel.js","webpack:///nextcloud/core/src/systemtags/systemtagscollection.js","webpack:///nextcloud/core/css/systemtags.scss","webpack:///nextcloud/core/src/systemtags/templates/result.handlebars","webpack:///nextcloud/core/src/systemtags/templates/result_form.handlebars","webpack:///nextcloud/core/src/systemtags/templates/selection.handlebars","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * Copyright (c) 2016\n *\n * @author Gary Kim \n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n/* eslint-disable */\nimport escapeHTML from 'escape-html'\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @returns {HTMLElement}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON()\n\t\t\t}\n\n\t\t\tvar $span = document.createElement('span')\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\t$span.classList.add('non-existing-tag')\n\t\t\t\t$span.textContent = t('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t})\n\t\t\t\treturn $span\n\t\t\t}\n\n\t\t\t$span.textContent = escapeHTML(tag.name)\n\n\t\t\tvar scope\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'Restricted')\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'Invisible')\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\tvar $scope = document.createElement('em')\n\t\t\t\t$scope.textContent = ' (' + scope + ')'\n\t\t\t\t$span.appendChild($scope)\n\t\t\t}\n\t\t\treturn $span\n\t\t}\n\t}\n})(OC)\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\nimport { generateRemoteUrl } from '@nextcloud/router'\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tconst SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t\t * Use PUT instead of PROPPATCH\n\t\t\t */\n\t\t\tusePUT: true,\n\n\t\t\t/**\n\t\t\t * Id of the file for which to filter activities by\n\t\t\t *\n\t\t\t * @member int\n\t\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t\t * Type of the object to filter by\n\t\t\t *\n\t\t\t * @member string\n\t\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl() {\n\t\t\t\treturn generateRemoteUrl('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Sets the object id to filter by or null for all.\n\t\t\t *\n\t\t\t * @param {number} objectId file id or null\n\t\t\t */\n\t\t\tsetObjectId(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Sets the object type to filter by or null for all.\n\t\t\t *\n\t\t\t * @param {number} objectType file id or null\n\t\t\t */\n\t\t\tsetObjectType(objectType) {\n\t\t\t\tthis._objectType = objectType\n\t\t\t},\n\n\t\t\tinitialize(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetTagIds() {\n\t\t\t\treturn this.map(function(model) {\n\t\t\t\t\treturn model.id\n\t\t\t\t})\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection\n})(OC)\n","/**\n * Copyright (c) 2015\n *\n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n/* eslint-disable */\nimport templateResult from './templates/result.handlebars'\nimport templateResultForm from './templates/result_form.handlebars'\nimport templateSelection from './templates/selection.handlebars'\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\t_newTag: null,\n\n\t\t\t_lastUsedTags: [],\n\n\t\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\t\ttemplate: function(data) {\n\t\t\t\treturn ''\n\t\t\t},\n\n\t\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {boolean} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {boolean} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {boolean} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {boolean} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\t\tinitialize: function(options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._multiple = !!options.multiple\n\t\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions\n\t\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate\n\t\t\t\tthis._isAdmin = !!options.isAdmin\n\n\t\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\t\tthis._initSelection = options.initSelection\n\t\t\t\t}\n\n\t\t\t\tthis.collection = options.collection || OC.SystemTags.collection\n\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t\t_.defer(self._refreshSelection)\n\t\t\t\t})\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\n\t\t\t\t_.bindAll(\n\t\t\t\t\tthis,\n\t\t\t\t\t'_refreshSelection',\n\t\t\t\t\t'_onClickRenameTag',\n\t\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t\t'_onSelectTag',\n\t\t\t\t\t'_onDeselectTag',\n\t\t\t\t\t'_onSubmitRenameTag'\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_getLastUsedTags: function() {\n\t\t\t\tvar self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t\t_refreshSelection: function() {\n\t\t\t\tthis.$tagsField.select2('val', this.$tagsField.val())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t\t_onClickRenameTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\n\t\t\t\tvar oldName = tagModel.get('name')\n\t\t\t\tvar $renameForm = $(templateResultForm({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tname: oldName,\n\t\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}))\n\t\t\t\t$item.find('.label').after($renameForm)\n\t\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden')\n\t\t\t\t$item.closest('.select2-result').addClass('has-form')\n\n\t\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\tcontainer: 'body'\n\t\t\t\t})\n\t\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length)\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server.\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onSubmitRenameTag: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $form = $(ev.target)\n\t\t\t\tvar $item = $form.closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\t\t\t\tvar newName = $(ev.target).find('input').val().trim()\n\t\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\t\ttagModel.save({ 'name': newName })\n\t\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t\t$item.find('.label').text(newName)\n\t\t\t\t}\n\t\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden')\n\t\t\t\t$form.remove()\n\t\t\t\t$item.closest('.select2-result').removeClass('has-form')\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onClickDeleteTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tthis.collection.get(tagId).destroy()\n\t\t\t\t$(ev.target).tooltip('hide')\n\t\t\t\t$item.closest('.select2-result').remove()\n\t\t\t\t// TODO: spinner\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_addToSelect2Selection: function(selection) {\n\t\t\t\tvar data = this.$tagsField.select2('data')\n\t\t\t\tdata.push(selection)\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onSelectTag: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar tag\n\t\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\t\ttag = this.collection.create({\n\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tcanAssign: true\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\tself._lastUsedTags.unshift(model.id)\n\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\t\tself.collection.reset()\n\t\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\t\tmodel = model[0]\n\t\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\t\t\t\t\tself.trigger('select', model)\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\t\t\t\t\t})\n\t\t\t\t\tthis.$tagsField.select2('close')\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\ttag = this.collection.get(e.object.id)\n\t\t\t\t\tthis._lastUsedTags.unshift(tag.id)\n\t\t\t\t}\n\t\t\t\tthis._newTag = null\n\t\t\t\tthis.trigger('select', tag)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onDeselectTag: function(e) {\n\t\t\t\tthis.trigger('deselect', e.choice.id)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t\t_queryTagsAutocomplete: function(query) {\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim())\n\t\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\t\treturn tagModel.get('canAssign')\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_preventDefault: function(e) {\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatDropDownResult: function(data) {\n\t\t\t\treturn templateResult(_.extend({\n\t\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\t\tallowActions: this._allowActions,\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data).innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatSelection: function(data) {\n\t\t\t\treturn templateSelection(_.extend({\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data).innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @returns {Object} dummy tag\n\t\t */\n\t\t\t_createSearchChoice: function(term) {\n\t\t\t\tterm = term.trim()\n\t\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term\n\t\t\t\t}).length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this._newTag) {\n\t\t\t\t\tthis._newTag = {\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\tname: term,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tcanAssign: true,\n\t\t\t\t\t\tisNew: true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._newTag.name = term\n\t\t\t\t}\n\n\t\t\t\treturn this._newTag\n\t\t\t},\n\n\t\t\t_initSelection: function(element, callback) {\n\t\t\t\tvar self = this\n\t\t\t\tvar ids = $(element).val().split(',')\n\n\t\t\t\tfunction modelToSelection(model) {\n\t\t\t\t\tvar data = model.toJSON()\n\t\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\t\tdata.locked = true\n\t\t\t\t\t}\n\t\t\t\t\treturn data\n\t\t\t\t}\n\n\t\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'))\n\t\t\t\t\t})\n\t\t\t\t\treturn _.map(selectedModels, modelToSelection)\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tcallback(findSelectedObjects(ids))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\tthis.$el.find('[title]').tooltip({ placement: 'bottom' })\n\t\t\t\tthis.$tagsField = this.$el.find('[name=tags]')\n\t\t\t\tthis.$tagsField.select2({\n\t\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\t\tcloseOnSelect: false,\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: this._multiple,\n\t\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\t\tid: function(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\t\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\t\tsortResults: function(results) {\n\t\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id')\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0\n\t\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0\n\t\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\t\treturn t('core', 'No tags found')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t\t.on('select2-removing', this._onDeselectTag)\n\n\t\t\t\tvar $dropDown = this.$tagsField.select2('dropdown')\n\t\t\t\t// register events for inside the dropdown\n\t\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag)\n\t\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag)\n\t\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault)\n\t\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag)\n\n\t\t\t\tthis.delegateEvents()\n\t\t\t},\n\n\t\t\tremove: function() {\n\t\t\t\tif (this.$tagsField) {\n\t\t\t\t\tthis.$tagsField.select2('destroy')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetValues: function() {\n\t\t\t\tthis.$tagsField.select2('val')\n\t\t\t},\n\n\t\t\tsetValues: function(values) {\n\t\t\t\tthis.$tagsField.select2('val', values)\n\t\t\t},\n\n\t\t\tsetData: function(data) {\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField\n\n})(OC)\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Michael Jobst \n * @author Roeland Jago Douma \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID: '{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME: '{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable',\n\t})\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tconst SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tuserVisible: true,\n\t\t\t\tuserAssignable: true,\n\t\t\t\tcanAssign: true,\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\tid: OC.Files.Client.PROPERTY_FILEID,\n\t\t\t\tname: OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t\tuserVisible: OC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t\tuserAssignable: OC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t\tcanAssign: OC.Files.Client.PROPERTY_CAN_ASSIGN,\n\t\t\t},\n\n\t\t\tparse(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tname: data.name,\n\t\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true',\n\t\t\t\t}\n\t\t\t},\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagModel = SystemTagModel\n})(OC)\n","/**\n * Copyright (c) 2015\n *\n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n/* eslint-disable */\n(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase()\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags/'\n\t\t\t},\n\n\t\t\tfilterByName: function(name) {\n\t\t\t\treturn this.filter(function(model) {\n\t\t\t\t\treturn filterFunction(model, name)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis.fetched = false\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param {any} options -\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\t\tfetch: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\toptions = options || {}\n\t\t\t\tif (this.fetched || this.working || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success(this, null, options)\n\t\t\t\t\t}\n\t\t\t\t\t// trigger sync event\n\t\t\t\t\tthis.trigger('sync', this, null, options)\n\t\t\t\t\treturn Promise.resolve()\n\t\t\t\t}\n\n\t\t\t\tthis.working = true\n\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({}, options)\n\t\t\t\toptions.success = function() {\n\t\t\t\t\tself.fetched = true\n\t\t\t\t\tself.working = false\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\treturn success.apply(this, arguments)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection()\n})(OC)\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemtags-select2-container{width:100%}.systemtags-select2-container .select2-choices{flex-wrap:nowrap !important;max-height:44px}.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./core/css/systemtags.scss\"],\"names\":[],\"mappings\":\"AAcE,8DACC,iBAAA,CACA,gBAAA,CACA,gBAAA,CACA,WAAA,CAED,iFACC,YAAA,CAGF,gFACC,kBAAA,CAED,yDACC,oBAAA,CACA,UAAA,CACA,gEACC,WAAA,CAGF,iDACC,iBAAA,CACA,SAAA,CAED,qDACC,oBAAA,CACA,uBAAA,CACA,QAAA,CACA,iBAAA,CACA,2DACC,oBAAA,CACA,WAAA,CACA,uBAAA,CAGF,oCACC,SAAA,CACA,oBAAA,CACA,eAAA,CACA,sBAAA,CACA,2CACC,YAAA,CAGF,kCACC,gBAAA,CAED,8CACC,oBAAA,CACA,WAAA,CACA,UAAA,CAED,mDACC,WAAA,CAIF,8BACC,UAAA,CAEA,+CACC,2BAAA,CACA,eAAA,CAGD,4FACC,UAAA,CAIF,6EACC,WAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2016, John Molakvoæ \\n * @copyright Copyright (c) 2016, Robin Appelman \\n * @copyright Copyright (c) 2016, Jan-Christoph Borchardt \\n * @copyright Copyright (c) 2016, Vincent Petry \\n * @copyright Copyright (c) 2016, Erik Pellikka \\n * @copyright Copyright (c) 2015, Vincent Petry \\n *\\n * @license GNU AGPL version 3 or any later version\\n *\\n */\\n\\n.systemtags-select2-dropdown {\\n\\t.select2-result-label {\\n\\t\\t.checkmark {\\n\\t\\t\\tvisibility: hidden;\\n\\t\\t\\tmargin-left: -5px;\\n\\t\\t\\tmargin-right: 5px;\\n\\t\\t\\tpadding: 4px;\\n\\t\\t}\\n\\t\\t.new-item .systemtags-actions {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\t.select2-selected .select2-result-label .checkmark {\\n\\t\\tvisibility: visible;\\n\\t}\\n\\t.select2-result-label .icon {\\n\\t\\tdisplay: inline-block;\\n\\t\\topacity: .5;\\n\\t\\t&.rename {\\n\\t\\t\\tpadding: 4px;\\n\\t\\t}\\n\\t}\\n\\t.systemtags-actions {\\n\\t\\tposition: absolute;\\n\\t\\tright: 5px;\\n\\t}\\n\\t.systemtags-rename-form {\\n\\t\\tdisplay: inline-block;\\n\\t\\twidth: calc(100% - 20px);\\n\\t\\ttop: -6px;\\n\\t\\tposition: relative;\\n\\t\\tinput {\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t\\theight: 30px;\\n\\t\\t\\twidth: calc(100% - 40px);\\n\\t\\t}\\n\\t}\\n\\t.label {\\n\\t\\twidth: 85%;\\n\\t\\tdisplay: inline-block;\\n\\t\\toverflow: hidden;\\n\\t\\ttext-overflow: ellipsis;\\n\\t\\t&.hidden {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t}\\n\\tspan {\\n\\t\\tline-height: 25px;\\n\\t}\\n\\t.systemtags-item {\\n\\t\\tdisplay: inline-block;\\n\\t\\theight: 25px;\\n\\t\\twidth: 100%;\\n\\t}\\n\\t.select2-result-label {\\n\\t\\theight: 25px;\\n\\t}\\n}\\n\\n.systemtags-select2-container {\\n\\twidth: 100%;\\n\\n\\t.select2-choices {\\n\\t\\tflex-wrap: nowrap !important;\\n\\t\\tmax-height: 44px;\\n\\t}\\n\\n\\t.select2-choices .select2-search-choice.select2-locked .label {\\n\\t\\topacity: 0.5;\\n\\t}\\n}\\n\\n#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result {\\n\\tpadding: 5px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":22},\"end\":{\"line\":4,\"column\":37}}}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":6,\"column\":22},\"end\":{\"line\":6,\"column\":30}}}) : helper)))\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\\n\t\t\t\\n\t\t\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }, buffer = \n \"\\n\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":3,\"column\":1},\"end\":{\"line\":7,\"column\":8}}})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = lookupProperty(helpers,\"allowActions\") || (depth0 != null ? lookupProperty(depth0,\"allowActions\") : depth0)) != null ? helper : alias2),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":8,\"column\":1},\"end\":{\"line\":12,\"column\":18}}}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!lookupProperty(helpers,\"allowActions\")) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\t\\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, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"
\\n\t \\n\t\\n\"\n + ((stack1 = lookupProperty(helpers,\"if\").call(alias1,(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":1},\"end\":{\"line\":6,\"column\":8}}})) != null ? stack1 : \"\")\n + \"
\\n\";\n},\"useData\":true});","var Handlebars = require(\"../../../../node_modules/handlebars/runtime.js\");\nfunction __default(obj) { return obj && (obj.__esModule ? obj[\"default\"] : obj); }\nmodule.exports = (Handlebars[\"default\"] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\"\n + ((stack1 = ((helper = (helper = lookupProperty(helpers,\"tagMarkup\") || (depth0 != null ? lookupProperty(depth0,\"tagMarkup\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":2,\"column\":21},\"end\":{\"line\":2,\"column\":36}}}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return \"\t\"\n + container.escapeExpression(((helper = (helper = lookupProperty(helpers,\"name\") || (depth0 != null ? lookupProperty(depth0,\"name\") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":4,\"column\":21},\"end\":{\"line\":4,\"column\":29}}}) : helper)))\n + \"\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n };\n\n return ((stack1 = lookupProperty(helpers,\"if\").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,\"isAdmin\") : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":5,\"column\":7}}})) != null ? stack1 : \"\");\n},\"useData\":true});","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 1686;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1686: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(16558)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","name","toJSON","scope","$span","document","createElement","classList","add","textContent","t","escapeHTML","userAssignable","userVisible","$scope","appendChild","SystemTagsMappingCollection","Backbone","Collection","extend","sync","davSync","usePUT","_objectId","_objectType","model","SystemTagModel","url","generateRemoteUrl","this","setObjectId","objectId","setObjectType","objectType","initialize","models","options","getTagIds","map","id","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","template","data","_multiple","multiple","_allowActions","allowActions","_allowCreate","allowCreate","_isAdmin","isAdmin","isFunction","initSelection","_initSelection","collection","self","on","defer","_refreshSelection","bind","_getLastUsedTags","bindAll","$","ajax","type","generateUrl","success","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","get","$renameForm","templateResultForm","cid","deleteTooltip","renameLabel","find","after","addClass","tooltip","placement","container","focus","selectRange","length","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","text","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","object","isNew","create","canAssign","unshift","trigger","error","xhr","status","reset","fetch","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","filterByName","term","filter","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","templateResult","renameTooltip","tagMarkup","innerHTML","_formatSelection","templateSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","Model","defaults","davProperties","parse","SystemTagsCollection","linkToRemote","substr","toLowerCase","filterFunction","fetched","prototype","apply","arguments","working","force","Promise","resolve","call","___CSS_LOADER_EXPORT___","module","Handlebars","exports","depth0","helpers","partials","stack1","helper","lookupProperty","parent","propertyName","Object","hasOwnProperty","hooks","helperMissing","nullContext","escapeExpression","alias1","alias2","alias3","buffer","program","noop","blockHelperMissing","alias4","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","key","splice","r","n","getter","__esModule","d","definition","o","defineProperty","enumerable","g","globalThis","Function","window","obj","prop","Symbol","toStringTag","value","nmd","paths","children","baseURI","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/systemtags-systemtags.js b/dist/systemtags-systemtags.js index c5c3b9dadb7..ca73bce01e0 100644 --- a/dist/systemtags-systemtags.js +++ b/dist/systemtags-systemtags.js @@ -1,3 +1,3 @@ /*! For license information please see systemtags-systemtags.js.LICENSE.txt */ -(()=>{var e,s={30213:()=>{OCA.SystemTags||(OCA.SystemTags={}),OCA.SystemTags.App={initFileList(e){if(this._fileList)return this._fileList;const s=new URL(window.location.href).searchParams.get("tags"),i=s?s.split(",").map(parseInt):[];return this._fileList=new OCA.SystemTags.FileList(e,{id:"systemtags",fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0,systemTagIds:i}),this._fileList.appName=t("systemtags","Tags"),this._fileList},removeFileList(){this._fileList&&this._fileList.$fileList.empty()},_createFileActions(){const e=new OCA.Files.FileActions;return e.registerDefaultActions(),e.merge(OCA.Files.fileActions),this._globalActionsInitialized||(this._onActionsUpdated=_.bind(this._onActionsUpdated,this),OCA.Files.fileActions.on("setDefault.app-systemtags",this._onActionsUpdated),OCA.Files.fileActions.on("registerAction.app-systemtags",this._onActionsUpdated),this._globalActionsInitialized=!0),e.register("dir","Open",OC.PERMISSION_READ,"",(function(e,t){OCA.Files.App.setActiveView("files",{silent:!0}),OCA.Files.App.fileList.changeDirectory(OC.joinPaths(t.$file.attr("data-path"),e),!0,!0)})),e.setDefault("dir","Open"),e},_onActionsUpdated(e){this._fileList&&(e.action?this._fileList.fileActions.registerAction(e.action):e.defaultAction&&this._fileList.fileActions.setDefault(e.defaultAction.mime,e.defaultAction.name))},destroy(){OCA.Files.fileActions.off("setDefault.app-systemtags",this._onActionsUpdated),OCA.Files.fileActions.off("registerAction.app-systemtags",this._onActionsUpdated),this.removeFileList(),this._fileList=null,delete this._globalActionsInitialized}},window.addEventListener("DOMContentLoaded",(function(){$("#app-content-systemtagsfilter").on("show",(function(e){OCA.SystemTags.App.initFileList($(e.target))})),$("#app-content-systemtagsfilter").on("hide",(function(){OCA.SystemTags.App.removeFileList()}))}))},22609:()=>{OCA.SystemTags=_.extend({},OCA.SystemTags),OCA.SystemTags||(OCA.SystemTags={}),OCA.SystemTags.FilesPlugin={ignoreLists:["trashbin","files.public"],attach(e){if(!(this.ignoreLists.indexOf(e.id)>=0||OCA.SystemTags.View)){const t=new OCA.SystemTags.SystemTagsInfoView;e.registerDetailView(t),OCA.SystemTags.View=t}}},OC.Plugins.register("OCA.Files.FileList",OCA.SystemTags.FilesPlugin)},19294:(e,t,s)=>{"use strict";s(30213),s(99641),s(22609),s(36670);var i=s(93379),l=s.n(i),n=s(7795),a=s.n(n),o=s(90569),r=s.n(o),d=s(3565),c=s.n(d),h=s(19216),g=s.n(h),p=s(44589),f=s.n(p),m=s(79891),y={};y.styleTagTransform=f(),y.setAttributes=c(),y.insert=r().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=g(),l()(m.Z,y),m.Z&&m.Z.locals&&m.Z.locals,window.OCA.SystemTags=OCA.SystemTags},99641:()=>{!function(){const e=function(e,t){this.initialize(e,t)};e.prototype=_.extend({},OCA.Files.FileList.prototype,{id:"systemtagsfilter",appName:t("systemtags","Tagged files"),_systemTagIds:[],_lastUsedTags:[],_clientSideSort:!0,_allowSelection:!1,_filterField:null,initialize(e,t){if(OCA.Files.FileList.prototype.initialize.apply(this,arguments),this.initialized)return;t&&t.systemTagIds&&(this._systemTagIds=t.systemTagIds),OC.Plugins.attach("OCA.SystemTags.FileList",this);const s=this.$el.find(".files-controls").empty();_.defer(_.bind(this._getLastUsedTags,this)),this._initFilterField(s)},destroy(){this.$filterField.remove(),OCA.Files.FileList.prototype.destroy.apply(this,arguments)},_getLastUsedTags(){const e=this;$.ajax({type:"GET",url:OC.generateUrl("/apps/systemtags/lastused"),success(t){e._lastUsedTags=t}})},_initFilterField(e){const s=this;return this.$filterField=$(''),this.$filterField.val(this._systemTagIds.join(",")),e.append(this.$filterField),this.$filterField.select2({placeholder:t("systemtags","Select tags to filter by"),allowClear:!1,multiple:!0,toggleSelect:!0,separator:",",query:_.bind(this._queryTagsAutocomplete,this),id:e=>e.id,initSelection(e,t){const i=$(e).val().trim();if(i){const l=i.split(","),n=[];OC.SystemTags.collection.fetch({success(){_.each(l,(function(e){const t=OC.SystemTags.collection.get(e);_.isUndefined(t)||n.push(t.toJSON())})),t(n),s._onTagsChanged({target:e})}})}else t([])},formatResult:e=>OC.SystemTags.getDescriptiveTag(e),formatSelection:e=>OC.SystemTags.getDescriptiveTag(e).outerHTML,sortResults:e=>(e.sort((function(e,t){const i=s._lastUsedTags.indexOf(e.id),l=s._lastUsedTags.indexOf(t.id);return i!==l?-1===l?-1:-1===i?1:ie,formatNoMatches:()=>t("systemtags","No tags found")}),this.$filterField.parent().children(".select2-container").attr("aria-expanded","false"),this.$filterField.on("select2-open",(()=>{this.$filterField.parent().children(".select2-container").attr("aria-expanded","true")})),this.$filterField.on("select2-close",(()=>{this.$filterField.parent().children(".select2-container").attr("aria-expanded","false")})),this.$filterField.on("change",_.bind(this._onTagsChanged,this)),this.$filterField},_queryTagsAutocomplete(e){OC.SystemTags.collection.fetch({success(){const t=OC.SystemTags.collection.filterByName(e.term);e.callback({results:_.invoke(t,"toJSON")})}})},_onUrlChanged(e){if(e.dir){const t=_.filter(e.dir.split("/"),(function(e){return""!==e.trim()}));this.$filterField.select2("val",t||[]),this._systemTagIds=t,this.reload()}},_onTagsChanged(e){const t=$(e.target).val().trim();this._systemTagIds=""!==t?t.split(","):[],this.$el.trigger($.Event("changeDirectory",{dir:this._systemTagIds.join("/")})),this.reload()},updateEmptyContent(){"/"===this.getCurrentDirectory()?(this._systemTagIds.length?this.$el.find(".emptyfilelist.emptycontent").html('

'+t("systemtags","No files found for the selected tags")+"

"):this.$el.find(".emptyfilelist.emptycontent").html('

'+t("systemtags","Please select tags to filter by")+"

"),this.$el.find(".emptyfilelist.emptycontent").toggleClass("hidden",!this.isEmpty),this.$el.find(".files-filestable thead th").toggleClass("hidden",this.isEmpty)):OCA.Files.FileList.prototype.updateEmptyContent.apply(this,arguments)},getDirectoryPermissions:()=>OC.PERMISSION_READ|OC.PERMISSION_DELETE,updateStorageStatistics(){},reload(){if(this._setCurrentDir("/",!1),!this._systemTagIds.length)return this.updateEmptyContent(),this.setFiles([]),$.Deferred().resolve();this._selectedFiles={},this._selectionSummary.clear(),this._currentFileModel&&this._currentFileModel.off(),this._currentFileModel=null,this.$el.find(".select-all").prop("checked",!1),this.showMask(),this._reloadCall=this.filesClient.getFilteredFiles({systemTagIds:this._systemTagIds},{properties:this._getWebdavProperties()}),this._detailsView&&this._updateDetailsView(null);const e=this.reloadCallback.bind(this);return this._reloadCall.then(e,e)},reloadCallback(e,t){return t&&t.unshift({}),OCA.Files.FileList.prototype.reloadCallback.call(this,e,t)}}),OCA.SystemTags.FileList=e}()},36670:()=>{!function(e){function t(e){const t=e.toJSON();return OC.isUserAdmin()||t.canAssign||(t.locked=!0),t}const s=e.Files.DetailFileInfoView.extend({_rendered:!1,className:"systemTagsInfoView",name:"systemTags",id:"systemTagsInfoView",_inputView:null,initialize(e){const s=this;e=e||{},this._inputView=new OC.SystemTags.SystemTagsInputField({multiple:!0,allowActions:!0,allowCreate:!0,isAdmin:OC.isUserAdmin(),initSelection(e,i){i(s.selectedTagsCollection.map(t))}}),this.selectedTagsCollection=new OC.SystemTags.SystemTagsMappingCollection([],{objectType:"files"}),this._inputView.collection.on("change:name",this._onTagRenamedGlobally,this),this._inputView.collection.on("remove",this._onTagDeletedGlobally,this),this._inputView.on("select",this._onSelectTag,this),this._inputView.on("deselect",this._onDeselectTag,this)},_onSelectTag(e){this.selectedTagsCollection.create(e.toJSON())},_onDeselectTag(e){this.selectedTagsCollection.get(e).destroy()},_onTagRenamedGlobally(e){const t=this.selectedTagsCollection.get(e.id);t&&t.set(e.toJSON())},_onTagDeletedGlobally(e){this.selectedTagsCollection.remove(e)},setFileInfo(e){const s=this;this._rendered||this.render(),e&&(this.selectedTagsCollection.setObjectId(e.id),this.selectedTagsCollection.fetch({success(e){e.fetched=!0;const i=e.map(t);s._inputView.setData(i),i.length>0&&s.show()}})),this.hide()},render(){this.$el.append(this._inputView.$el),this._inputView.render()},isVisible(){return!this.$el.hasClass("hidden")},show(){this.$el.removeClass("hidden")},hide(){this.$el.addClass("hidden")},toggle(){this.$el.toggleClass("hidden")},openDropdown(){this.$el.find(".systemTagsInputField").select2("open")},remove(){this._inputView.remove()}});e.SystemTags.SystemTagsInfoView=s}(OCA)},79891:(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});var i=s(87537),l=s.n(i),n=s(23645),a=s.n(n)()(l());a.push([e.id,"#app-content-systemtagsfilter .select2-container{width:30%;margin-left:10px}#app-sidebar .app-sidebar-header__action .tag-label{cursor:pointer;padding:13px 0;display:flex;color:var(--color-text-light);position:relative;margin-top:-20px}","",{version:3,sources:["webpack://./apps/systemtags/src/css/systemtagsfilelist.scss"],names:[],mappings:"AASA,iDACC,SAAA,CACA,gBAAA,CAGD,oDACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["/*\n * Copyright (c) 2016\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#app-content-systemtagsfilter .select2-container {\n\twidth: 30%;\n\tmargin-left: 10px;\n}\n\n#app-sidebar .app-sidebar-header__action .tag-label {\n\tcursor: pointer;\n\tpadding: 13px 0;\n\tdisplay: flex;\n\tcolor: var(--color-text-light);\n\tposition: relative;\n\tmargin-top: -20px;\n}\n"],sourceRoot:""}]);const o=a}},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.m=s,e=[],l.O=(t,s,i,n)=>{if(!s){var a=1/0;for(c=0;c=n)&&Object.keys(l.O).every((e=>l.O[e](s[r])))?s.splice(r--,1):(o=!1,n0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[s,i,n]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var s in t)l.o(t,s)&&!l.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.j=9698,(()=>{l.b=document.baseURI||self.location.href;var e={9698:0};l.O.j=t=>0===e[t];var t=(t,s)=>{var i,n,a=s[0],o=s[1],r=s[2],d=0;if(a.some((t=>0!==e[t]))){for(i in o)l.o(o,i)&&(l.m[i]=o[i]);if(r)var c=r(l)}for(t&&t(s);dl(19294)));n=l.O(n)})(); -//# sourceMappingURL=systemtags-systemtags.js.map?v=3f4781139573f4ce3161 \ No newline at end of file +(()=>{var e,s={30213:()=>{OCA.SystemTags||(OCA.SystemTags={}),OCA.SystemTags.App={initFileList(e){if(this._fileList)return this._fileList;const s=new URL(window.location.href).searchParams.get("tags"),i=s?s.split(",").map(parseInt):[];return this._fileList=new OCA.SystemTags.FileList(e,{id:"systemtags",fileActions:this._createFileActions(),config:OCA.Files.App.getFilesConfig(),shown:!0,systemTagIds:i}),this._fileList.appName=t("systemtags","Tags"),this._fileList},removeFileList(){this._fileList&&this._fileList.$fileList.empty()},_createFileActions(){const t=new OCA.Files.FileActions;return t.registerDefaultActions(),t.merge(OCA.Files.fileActions),this._globalActionsInitialized||(this._onActionsUpdated=_.bind(this._onActionsUpdated,this),OCA.Files.fileActions.on("setDefault.app-systemtags",this._onActionsUpdated),OCA.Files.fileActions.on("registerAction.app-systemtags",this._onActionsUpdated),this._globalActionsInitialized=!0),t.register("dir","Open",OC.PERMISSION_READ,"",(function(t,e){OCA.Files.App.setActiveView("files",{silent:!0}),OCA.Files.App.fileList.changeDirectory(OC.joinPaths(e.$file.attr("data-path"),t),!0,!0)})),t.setDefault("dir","Open"),t},_onActionsUpdated(t){this._fileList&&(t.action?this._fileList.fileActions.registerAction(t.action):t.defaultAction&&this._fileList.fileActions.setDefault(t.defaultAction.mime,t.defaultAction.name))},destroy(){OCA.Files.fileActions.off("setDefault.app-systemtags",this._onActionsUpdated),OCA.Files.fileActions.off("registerAction.app-systemtags",this._onActionsUpdated),this.removeFileList(),this._fileList=null,delete this._globalActionsInitialized}},window.addEventListener("DOMContentLoaded",(function(){$("#app-content-systemtagsfilter").on("show",(function(t){OCA.SystemTags.App.initFileList($(t.target))})),$("#app-content-systemtagsfilter").on("hide",(function(){OCA.SystemTags.App.removeFileList()}))}))},19294:(t,e,s)=>{"use strict";s(30213),s(99641);var i=s(93379),l=s.n(i),n=s(7795),a=s.n(n),o=s(90569),r=s.n(o),d=s(3565),c=s.n(d),p=s(19216),h=s.n(p),f=s(44589),g=s.n(f),m=s(79891),A={};A.styleTagTransform=g(),A.setAttributes=c(),A.insert=r().bind(null,"head"),A.domAPI=a(),A.insertStyleElement=h(),l()(m.Z,A),m.Z&&m.Z.locals&&m.Z.locals,window.OCA.SystemTags=OCA.SystemTags},99641:()=>{!function(){const e=function(t,e){this.initialize(t,e)};e.prototype=_.extend({},OCA.Files.FileList.prototype,{id:"systemtagsfilter",appName:t("systemtags","Tagged files"),_systemTagIds:[],_lastUsedTags:[],_clientSideSort:!0,_allowSelection:!1,_filterField:null,initialize(t,e){if(OCA.Files.FileList.prototype.initialize.apply(this,arguments),this.initialized)return;e&&e.systemTagIds&&(this._systemTagIds=e.systemTagIds),OC.Plugins.attach("OCA.SystemTags.FileList",this);const s=this.$el.find(".files-controls").empty();_.defer(_.bind(this._getLastUsedTags,this)),this._initFilterField(s)},destroy(){this.$filterField.remove(),OCA.Files.FileList.prototype.destroy.apply(this,arguments)},_getLastUsedTags(){const t=this;$.ajax({type:"GET",url:OC.generateUrl("/apps/systemtags/lastused"),success(e){t._lastUsedTags=e}})},_initFilterField(e){const s=this;return this.$filterField=$(''),this.$filterField.val(this._systemTagIds.join(",")),e.append(this.$filterField),this.$filterField.select2({placeholder:t("systemtags","Select tags to filter by"),allowClear:!1,multiple:!0,toggleSelect:!0,separator:",",query:_.bind(this._queryTagsAutocomplete,this),id:t=>t.id,initSelection(t,e){const i=$(t).val().trim();if(i){const l=i.split(","),n=[];OC.SystemTags.collection.fetch({success(){_.each(l,(function(t){const e=OC.SystemTags.collection.get(t);_.isUndefined(e)||n.push(e.toJSON())})),e(n),s._onTagsChanged({target:t})}})}else e([])},formatResult:t=>OC.SystemTags.getDescriptiveTag(t),formatSelection:t=>OC.SystemTags.getDescriptiveTag(t).outerHTML,sortResults:t=>(t.sort((function(t,e){const i=s._lastUsedTags.indexOf(t.id),l=s._lastUsedTags.indexOf(e.id);return i!==l?-1===l?-1:-1===i?1:it,formatNoMatches:()=>t("systemtags","No tags found")}),this.$filterField.parent().children(".select2-container").attr("aria-expanded","false"),this.$filterField.on("select2-open",(()=>{this.$filterField.parent().children(".select2-container").attr("aria-expanded","true")})),this.$filterField.on("select2-close",(()=>{this.$filterField.parent().children(".select2-container").attr("aria-expanded","false")})),this.$filterField.on("change",_.bind(this._onTagsChanged,this)),this.$filterField},_queryTagsAutocomplete(t){OC.SystemTags.collection.fetch({success(){const e=OC.SystemTags.collection.filterByName(t.term);t.callback({results:_.invoke(e,"toJSON")})}})},_onUrlChanged(t){if(t.dir){const e=_.filter(t.dir.split("/"),(function(t){return""!==t.trim()}));this.$filterField.select2("val",e||[]),this._systemTagIds=e,this.reload()}},_onTagsChanged(t){const e=$(t.target).val().trim();this._systemTagIds=""!==e?e.split(","):[],this.$el.trigger($.Event("changeDirectory",{dir:this._systemTagIds.join("/")})),this.reload()},updateEmptyContent(){"/"===this.getCurrentDirectory()?(this._systemTagIds.length?this.$el.find(".emptyfilelist.emptycontent").html('

'+t("systemtags","No files found for the selected tags")+"

"):this.$el.find(".emptyfilelist.emptycontent").html('

'+t("systemtags","Please select tags to filter by")+"

"),this.$el.find(".emptyfilelist.emptycontent").toggleClass("hidden",!this.isEmpty),this.$el.find(".files-filestable thead th").toggleClass("hidden",this.isEmpty)):OCA.Files.FileList.prototype.updateEmptyContent.apply(this,arguments)},getDirectoryPermissions:()=>OC.PERMISSION_READ|OC.PERMISSION_DELETE,updateStorageStatistics(){},reload(){if(this._setCurrentDir("/",!1),!this._systemTagIds.length)return this.updateEmptyContent(),this.setFiles([]),$.Deferred().resolve();this._selectedFiles={},this._selectionSummary.clear(),this._currentFileModel&&this._currentFileModel.off(),this._currentFileModel=null,this.$el.find(".select-all").prop("checked",!1),this.showMask(),this._reloadCall=this.filesClient.getFilteredFiles({systemTagIds:this._systemTagIds},{properties:this._getWebdavProperties()}),this._detailsView&&this._updateDetailsView(null);const t=this.reloadCallback.bind(this);return this._reloadCall.then(t,t)},reloadCallback(t,e){return e&&e.unshift({}),OCA.Files.FileList.prototype.reloadCallback.call(this,t,e)}}),OCA.SystemTags.FileList=e}()},79891:(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});var i=s(87537),l=s.n(i),n=s(23645),a=s.n(n)()(l());a.push([t.id,"#app-content-systemtagsfilter .select2-container{width:30%;margin-left:10px}#app-sidebar .app-sidebar-header__action .tag-label{cursor:pointer;padding:13px 0;display:flex;color:var(--color-text-light);position:relative;margin-top:-20px}","",{version:3,sources:["webpack://./apps/systemtags/src/css/systemtagsfilelist.scss"],names:[],mappings:"AASA,iDACC,SAAA,CACA,gBAAA,CAGD,oDACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,gBAAA",sourcesContent:["/*\n * Copyright (c) 2016\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#app-content-systemtagsfilter .select2-container {\n\twidth: 30%;\n\tmargin-left: 10px;\n}\n\n#app-sidebar .app-sidebar-header__action .tag-label {\n\tcursor: pointer;\n\tpadding: 13px 0;\n\tdisplay: flex;\n\tcolor: var(--color-text-light);\n\tposition: relative;\n\tmargin-top: -20px;\n}\n"],sourceRoot:""}]);const o=a}},i={};function l(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={id:t,loaded:!1,exports:{}};return s[t].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.m=s,e=[],l.O=(t,s,i,n)=>{if(!s){var a=1/0;for(c=0;c=n)&&Object.keys(l.O).every((t=>l.O[t](s[r])))?s.splice(r--,1):(o=!1,n0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[s,i,n]},l.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return l.d(e,{a:e}),e},l.d=(t,e)=>{for(var s in e)l.o(e,s)&&!l.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},l.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),l.j=9698,(()=>{l.b=document.baseURI||self.location.href;var t={9698:0};l.O.j=e=>0===t[e];var e=(e,s)=>{var i,n,a=s[0],o=s[1],r=s[2],d=0;if(a.some((e=>0!==t[e]))){for(i in o)l.o(o,i)&&(l.m[i]=o[i]);if(r)var c=r(l)}for(e&&e(s);dl(19294)));n=l.O(n)})(); +//# sourceMappingURL=systemtags-systemtags.js.map?v=3d68c59f2596519769b5 \ No newline at end of file diff --git a/dist/systemtags-systemtags.js.LICENSE.txt b/dist/systemtags-systemtags.js.LICENSE.txt index 981b9b5b459..3b6dfe9eca0 100644 --- a/dist/systemtags-systemtags.js.LICENSE.txt +++ b/dist/systemtags-systemtags.js.LICENSE.txt @@ -21,32 +21,6 @@ * */ -/** - * Copyright (c) 2015 - * - * @author Daniel Calviño Sánchez - * @author Joas Schilling - * @author John Molakvoæ - * @author Julius Härtl - * @author Vincent Petry - * - * @license AGPL-3.0-or-later - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - /** * Copyright (c) 2016 Vincent Petry * diff --git a/dist/systemtags-systemtags.js.map b/dist/systemtags-systemtags.js.map index 49c35ca11cb..d5b85d0f92f 100644 --- a/dist/systemtags-systemtags.js.map +++ b/dist/systemtags-systemtags.js.map @@ -1 +1 @@ -{"version":3,"file":"systemtags-systemtags.js?v=3f4781139573f4ce3161","mappings":";UAAIA,gBC0BEC,IAAIC,aAIRD,IAAIC,WAAa,CAAC,GAGnBD,IAAIC,WAAWC,IAAM,CAEpBC,aAAaC,GACZ,GAAIC,KAAKC,UACR,OAAOD,KAAKC,UAGb,MAAMC,EAAa,IAAIC,IAAIC,OAAOC,SAASC,MAAOC,aAAaC,IAAI,QAC7DC,EAAcP,EAAYA,EAAUQ,MAAM,KAAKC,IAAIC,UAAY,GAkBrE,OAhBAZ,KAAKC,UAAY,IAAIN,IAAIC,WAAWiB,SACnCd,EACA,CACCe,GAAI,aACJC,YAAaf,KAAKgB,qBAClBC,OAAQtB,IAAIuB,MAAMrB,IAAIsB,iBAKtBC,OAAO,EACPC,aAAcZ,IAIhBT,KAAKC,UAAUqB,QAAUC,EAAE,a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CAEA,IADG6C,GAA4BA,EAA2BtF,GACrDsD,EAAIL,EAASlF,OAAQuF,IACzB8B,EAAUnC,EAASK,GAChBb,EAAoB2B,EAAEe,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO3C,EAAoBO,EAAErD,EAAO,EAGjC+F,EAAqB1L,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1F0L,EAAmBC,QAAQN,EAAqBjP,KAAK,KAAM,IAC3DsP,EAAmB3J,KAAOsJ,EAAqBjP,KAAK,KAAMsP,EAAmB3J,KAAK3F,KAAKsP,QClDvFjD,EAAoBmD,QAAKhD,ECGzB,IAAIiD,EAAsBpD,EAAoBO,OAAEJ,EAAW,CAAC,OAAO,IAAOH,EAAoB,SAC9FoD,EAAsBpD,EAAoBO,EAAE6C","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/systemtags/src/app.js","webpack:///nextcloud/apps/systemtags/src/filesplugin.js","webpack://nextcloud/./apps/systemtags/src/css/systemtagsfilelist.scss?3cf4","webpack:///nextcloud/apps/systemtags/src/systemtags.js","webpack:///nextcloud/apps/systemtags/src/systemtagsfilelist.js","webpack:///nextcloud/apps/systemtags/src/systemtagsinfoview.js","webpack:///nextcloud/apps/systemtags/src/css/systemtagsfilelist.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * Copyright (c) 2015 Vincent Petry \n *\n * @author Christoph Wurst \n * @author Daniel Calviño Sánchez \n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function() {\n\tif (!OCA.SystemTags) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.SystemTags = {}\n\t}\n\n\tOCA.SystemTags.App = {\n\n\t\tinitFileList($el) {\n\t\t\tif (this._fileList) {\n\t\t\t\treturn this._fileList\n\t\t\t}\n\n\t\t\tconst tagsParam = (new URL(window.location.href)).searchParams.get('tags')\n\t\t\tconst initialTags = tagsParam ? tagsParam.split(',').map(parseInt) : []\n\n\t\t\tthis._fileList = new OCA.SystemTags.FileList(\n\t\t\t\t$el,\n\t\t\t\t{\n\t\t\t\t\tid: 'systemtags',\n\t\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t\t// The file list is created when a \"show\" event is handled,\n\t\t\t\t\t// so it should be marked as \"shown\" like it would have been\n\t\t\t\t\t// done if handling the event with the file list already\n\t\t\t\t\t// created.\n\t\t\t\t\tshown: true,\n\t\t\t\t\tsystemTagIds: initialTags,\n\t\t\t\t}\n\t\t\t)\n\n\t\t\tthis._fileList.appName = t('systemtags', 'Tags')\n\t\t\treturn this._fileList\n\t\t},\n\n\t\tremoveFileList() {\n\t\t\tif (this._fileList) {\n\t\t\t\tthis._fileList.$fileList.empty()\n\t\t\t}\n\t\t},\n\n\t\t_createFileActions() {\n\t\t\t// inherit file actions from the files app\n\t\t\tconst fileActions = new OCA.Files.FileActions()\n\t\t\t// note: not merging the legacy actions because legacy apps are not\n\t\t\t// compatible with the sharing overview and need to be adapted first\n\t\t\tfileActions.registerDefaultActions()\n\t\t\tfileActions.merge(OCA.Files.fileActions)\n\n\t\t\tif (!this._globalActionsInitialized) {\n\t\t\t\t// in case actions are registered later\n\t\t\t\tthis._onActionsUpdated = _.bind(this._onActionsUpdated, this)\n\t\t\t\tOCA.Files.fileActions.on('setDefault.app-systemtags', this._onActionsUpdated)\n\t\t\t\tOCA.Files.fileActions.on('registerAction.app-systemtags', this._onActionsUpdated)\n\t\t\t\tthis._globalActionsInitialized = true\n\t\t\t}\n\n\t\t\t// when the user clicks on a folder, redirect to the corresponding\n\t\t\t// folder in the files app instead of opening it directly\n\t\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {\n\t\t\t\tOCA.Files.App.setActiveView('files', { silent: true })\n\t\t\t\tOCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true)\n\t\t\t})\n\t\t\tfileActions.setDefault('dir', 'Open')\n\t\t\treturn fileActions\n\t\t},\n\n\t\t_onActionsUpdated(ev) {\n\t\t\tif (!this._fileList) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (ev.action) {\n\t\t\t\tthis._fileList.fileActions.registerAction(ev.action)\n\t\t\t} else if (ev.defaultAction) {\n\t\t\t\tthis._fileList.fileActions.setDefault(\n\t\t\t\t\tev.defaultAction.mime,\n\t\t\t\t\tev.defaultAction.name\n\t\t\t\t)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Destroy the app\n\t\t */\n\t\tdestroy() {\n\t\t\tOCA.Files.fileActions.off('setDefault.app-systemtags', this._onActionsUpdated)\n\t\t\tOCA.Files.fileActions.off('registerAction.app-systemtags', this._onActionsUpdated)\n\t\t\tthis.removeFileList()\n\t\t\tthis._fileList = null\n\t\t\tdelete this._globalActionsInitialized\n\t\t},\n\t}\n\n})()\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\t$('#app-content-systemtagsfilter').on('show', function(e) {\n\t\tOCA.SystemTags.App.initFileList($(e.target))\n\t})\n\t$('#app-content-systemtagsfilter').on('hide', function() {\n\t\tOCA.SystemTags.App.removeFileList()\n\t})\n})\n","/**\n * Copyright (c) 2015 Vincent Petry \n *\n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function() {\n\tOCA.SystemTags = _.extend({}, OCA.SystemTags)\n\tif (!OCA.SystemTags) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.SystemTags = {}\n\t}\n\n\t/**\n\t * @namespace\n\t */\n\tOCA.SystemTags.FilesPlugin = {\n\t\tignoreLists: [\n\t\t\t'trashbin',\n\t\t\t'files.public',\n\t\t],\n\n\t\tattach(fileList) {\n\t\t\tif (this.ignoreLists.indexOf(fileList.id) >= 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// only create and attach once\n\t\t\t// FIXME: this should likely be done on a different code path now\n\t\t\t// for the sidebar to only have it registered once\n\t\t\tif (!OCA.SystemTags.View) {\n\t\t\t\tconst systemTagsInfoView = new OCA.SystemTags.SystemTagsInfoView()\n\t\t\t\tfileList.registerDetailView(systemTagsInfoView)\n\t\t\t\tOCA.SystemTags.View = systemTagsInfoView\n\t\t\t}\n\t\t},\n\t}\n\n})()\n\nOC.Plugins.register('OCA.Files.FileList', OCA.SystemTags.FilesPlugin)\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./systemtagsfilelist.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./systemtagsfilelist.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma \n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\nimport './app.js'\nimport './systemtagsfilelist.js'\nimport './filesplugin.js'\nimport './systemtagsinfoview.js'\nimport './css/systemtagsfilelist.scss'\n\nwindow.OCA.SystemTags = OCA.SystemTags\n","/**\n * Copyright (c) 2016 Vincent Petry \n *\n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function() {\n\t/**\n\t * @class OCA.SystemTags.FileList\n\t * @augments OCA.Files.FileList\n\t *\n\t * @classdesc SystemTags file list.\n\t * Contains a list of files filtered by system tags.\n\t *\n\t * @param {object} $el container element with existing markup for the .files-controls and a table\n\t * @param {Array} [options] map of options, see other parameters\n\t * @param {Array.} [options.systemTagIds] array of system tag ids to\n\t * filter by\n\t */\n\tconst FileList = function($el, options) {\n\t\tthis.initialize($el, options)\n\t}\n\tFileList.prototype = _.extend(\n\t\t{},\n\t\tOCA.Files.FileList.prototype,\n\t\t/** @lends OCA.SystemTags.FileList.prototype */ {\n\t\t\tid: 'systemtagsfilter',\n\t\t\tappName: t('systemtags', 'Tagged files'),\n\n\t\t\t/**\n\t\t\t * Array of system tag ids to filter by\n\t\t\t *\n\t\t\t * @type {Array.}\n\t\t\t */\n\t\t\t_systemTagIds: [],\n\t\t\t_lastUsedTags: [],\n\n\t\t\t_clientSideSort: true,\n\t\t\t_allowSelection: false,\n\n\t\t\t_filterField: null,\n\n\t\t\t/**\n\t\t\t * @private\n\t\t\t * @param {object} $el container element\n\t\t\t * @param {object} [options] map of options, see other parameters\n\t\t\t */\n\t\t\tinitialize($el, options) {\n\t\t\t\tOCA.Files.FileList.prototype.initialize.apply(this, arguments)\n\t\t\t\tif (this.initialized) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tif (options && options.systemTagIds) {\n\t\t\t\t\tthis._systemTagIds = options.systemTagIds\n\t\t\t\t}\n\n\t\t\t\tOC.Plugins.attach('OCA.SystemTags.FileList', this)\n\n\t\t\t\tconst $controls = this.$el.find('.files-controls').empty()\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\t\t\t\tthis._initFilterField($controls)\n\t\t\t},\n\n\t\t\tdestroy() {\n\t\t\t\tthis.$filterField.remove()\n\n\t\t\t\tOCA.Files.FileList.prototype.destroy.apply(this, arguments)\n\t\t\t},\n\n\t\t\t_getLastUsedTags() {\n\t\t\t\tconst self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_initFilterField($container) {\n\t\t\t\tconst self = this\n\t\t\t\tthis.$filterField = $('')\n\t\t\t\tthis.$filterField.val(this._systemTagIds.join(','))\n\t\t\t\t$container.append(this.$filterField)\n\t\t\t\tthis.$filterField.select2({\n\t\t\t\t\tplaceholder: t('systemtags', 'Select tags to filter by'),\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ttoggleSelect: true,\n\t\t\t\t\tseparator: ',',\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\n\t\t\t\t\tid(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\n\t\t\t\t\tinitSelection(element, callback) {\n\t\t\t\t\t\tconst val = $(element)\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\tif (val) {\n\t\t\t\t\t\t\tconst tagIds = val.split(',')\n\t\t\t\t\t\t\tconst tags = []\n\n\t\t\t\t\t\t\tOC.SystemTags.collection.fetch({\n\t\t\t\t\t\t\t\tsuccess() {\n\t\t\t\t\t\t\t\t\t_.each(tagIds, function(tagId) {\n\t\t\t\t\t\t\t\t\t\tconst tag = OC.SystemTags.collection.get(\n\t\t\t\t\t\t\t\t\t\t\ttagId\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\tif (!_.isUndefined(tag)) {\n\t\t\t\t\t\t\t\t\t\t\ttags.push(tag.toJSON())\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\tcallback(tags)\n\t\t\t\t\t\t\t\t\tself._onTagsChanged({ target: element })\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// eslint-disable-next-line n/no-callback-literal\n\t\t\t\t\t\t\tcallback([])\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\tformatResult(tag) {\n\t\t\t\t\t\treturn OC.SystemTags.getDescriptiveTag(tag)\n\t\t\t\t\t},\n\n\t\t\t\t\tformatSelection(tag) {\n\t\t\t\t\t\treturn OC.SystemTags.getDescriptiveTag(tag).outerHTML\n\t\t\t\t\t},\n\n\t\t\t\t\tsortResults(results) {\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tconst aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\tconst bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\n\t\t\t\t\tescapeMarkup(m) {\n\t\t\t\t\t\t// prevent double markup escape\n\t\t\t\t\t\treturn m\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches() {\n\t\t\t\t\t\treturn t('systemtags', 'No tags found')\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tthis.$filterField.parent().children('.select2-container').attr('aria-expanded', 'false')\n\t\t\t\tthis.$filterField.on('select2-open', () => {\n\t\t\t\t\tthis.$filterField.parent().children('.select2-container').attr('aria-expanded', 'true')\n\t\t\t\t})\n\t\t\t\tthis.$filterField.on('select2-close', () => {\n\t\t\t\t\tthis.$filterField.parent().children('.select2-container').attr('aria-expanded', 'false')\n\t\t\t\t})\n\t\t\t\tthis.$filterField.on(\n\t\t\t\t\t'change',\n\t\t\t\t\t_.bind(this._onTagsChanged, this)\n\t\t\t\t)\n\t\t\t\treturn this.$filterField\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Autocomplete function for dropdown results\n\t\t\t *\n\t\t\t * @param {object} query select2 query object\n\t\t\t */\n\t\t\t_queryTagsAutocomplete(query) {\n\t\t\t\tOC.SystemTags.collection.fetch({\n\t\t\t\t\tsuccess() {\n\t\t\t\t\t\tconst results = OC.SystemTags.collection.filterByName(\n\t\t\t\t\t\t\tquery.term\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(results, 'toJSON'),\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Event handler for when the URL changed\n\t\t\t *\n\t\t\t * @param {Event} e the urlchanged event\n\t\t\t */\n\t\t\t_onUrlChanged(e) {\n\t\t\t\tif (e.dir) {\n\t\t\t\t\tconst tags = _.filter(e.dir.split('/'), function(val) {\n\t\t\t\t\t\treturn val.trim() !== ''\n\t\t\t\t\t})\n\t\t\t\t\tthis.$filterField.select2('val', tags || [])\n\t\t\t\t\tthis._systemTagIds = tags\n\t\t\t\t\tthis.reload()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onTagsChanged(ev) {\n\t\t\t\tconst val = $(ev.target)\n\t\t\t\t\t.val()\n\t\t\t\t\t.trim()\n\t\t\t\tif (val !== '') {\n\t\t\t\t\tthis._systemTagIds = val.split(',')\n\t\t\t\t} else {\n\t\t\t\t\tthis._systemTagIds = []\n\t\t\t\t}\n\n\t\t\t\tthis.$el.trigger(\n\t\t\t\t\t$.Event('changeDirectory', {\n\t\t\t\t\t\tdir: this._systemTagIds.join('/'),\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t\tthis.reload()\n\t\t\t},\n\n\t\t\tupdateEmptyContent() {\n\t\t\t\tconst dir = this.getCurrentDirectory()\n\t\t\t\tif (dir === '/') {\n\t\t\t\t\t// root has special permissions\n\t\t\t\t\tif (!this._systemTagIds.length) {\n\t\t\t\t\t\t// no tags selected\n\t\t\t\t\t\tthis.$el\n\t\t\t\t\t\t\t.find('.emptyfilelist.emptycontent')\n\t\t\t\t\t\t\t.html(\n\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\t+ t(\n\t\t\t\t\t\t\t\t\t\t'systemtags',\n\t\t\t\t\t\t\t\t\t\t'Please select tags to filter by'\n\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)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// tags selected but no results\n\t\t\t\t\t\tthis.$el\n\t\t\t\t\t\t\t.find('.emptyfilelist.emptycontent')\n\t\t\t\t\t\t\t.html(\n\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\t+ t(\n\t\t\t\t\t\t\t\t\t\t'systemtags',\n\t\t\t\t\t\t\t\t\t\t'No files found for the selected tags'\n\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)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$el\n\t\t\t\t\t\t.find('.emptyfilelist.emptycontent')\n\t\t\t\t\t\t.toggleClass('hidden', !this.isEmpty)\n\t\t\t\t\tthis.$el\n\t\t\t\t\t\t.find('.files-filestable thead th')\n\t\t\t\t\t\t.toggleClass('hidden', this.isEmpty)\n\t\t\t\t} else {\n\t\t\t\t\tOCA.Files.FileList.prototype.updateEmptyContent.apply(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\targuments\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetDirectoryPermissions() {\n\t\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE\n\t\t\t},\n\n\t\t\tupdateStorageStatistics() {\n\t\t\t\t// no op because it doesn't have\n\t\t\t\t// storage info like free space / used space\n\t\t\t},\n\n\t\t\treload() {\n\t\t\t\t// there is only root\n\t\t\t\tthis._setCurrentDir('/', false)\n\n\t\t\t\tif (!this._systemTagIds.length) {\n\t\t\t\t\t// don't reload\n\t\t\t\t\tthis.updateEmptyContent()\n\t\t\t\t\tthis.setFiles([])\n\t\t\t\t\treturn $.Deferred().resolve()\n\t\t\t\t}\n\n\t\t\t\tthis._selectedFiles = {}\n\t\t\t\tthis._selectionSummary.clear()\n\t\t\t\tif (this._currentFileModel) {\n\t\t\t\t\tthis._currentFileModel.off()\n\t\t\t\t}\n\t\t\t\tthis._currentFileModel = null\n\t\t\t\tthis.$el.find('.select-all').prop('checked', false)\n\t\t\t\tthis.showMask()\n\t\t\t\tthis._reloadCall = this.filesClient.getFilteredFiles(\n\t\t\t\t\t{\n\t\t\t\t\t\tsystemTagIds: this._systemTagIds,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tproperties: this._getWebdavProperties(),\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\tif (this._detailsView) {\n\t\t\t\t\t// close sidebar\n\t\t\t\t\tthis._updateDetailsView(null)\n\t\t\t\t}\n\t\t\t\tconst callBack = this.reloadCallback.bind(this)\n\t\t\t\treturn this._reloadCall.then(callBack, callBack)\n\t\t\t},\n\n\t\t\treloadCallback(status, result) {\n\t\t\t\tif (result) {\n\t\t\t\t\t// prepend empty dir info because original handler\n\t\t\t\t\tresult.unshift({})\n\t\t\t\t}\n\n\t\t\t\treturn OCA.Files.FileList.prototype.reloadCallback.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tstatus,\n\t\t\t\t\tresult\n\t\t\t\t)\n\t\t\t},\n\t\t}\n\t)\n\n\tOCA.SystemTags.FileList = FileList\n})()\n","/**\n * Copyright (c) 2015\n *\n * @author Daniel Calviño Sánchez \n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Julius Härtl \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function(OCA) {\n\n\t/**\n\t * @param {any} model -\n\t */\n\tfunction modelToSelection(model) {\n\t\tconst data = model.toJSON()\n\t\tif (!OC.isUserAdmin() && !data.canAssign) {\n\t\t\tdata.locked = true\n\t\t}\n\t\treturn data\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsInfoView\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tconst SystemTagsInfoView = OCA.Files.DetailFileInfoView.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagsInfoView.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\tclassName: 'systemTagsInfoView',\n\t\t\tname: 'systemTags',\n\n\t\t\t/* required by the new files sidebar to check if the view is unique */\n\t\t\tid: 'systemTagsInfoView',\n\n\t\t\t/**\n\t\t\t * @type {OC.SystemTags.SystemTagsInputField}\n\t\t\t */\n\t\t\t_inputView: null,\n\n\t\t\tinitialize(options) {\n\t\t\t\tconst self = this\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._inputView = new OC.SystemTags.SystemTagsInputField({\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\tallowActions: true,\n\t\t\t\t\tallowCreate: true,\n\t\t\t\t\tisAdmin: OC.isUserAdmin(),\n\t\t\t\t\tinitSelection(element, callback) {\n\t\t\t\t\t\tcallback(self.selectedTagsCollection.map(modelToSelection))\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tthis.selectedTagsCollection = new OC.SystemTags.SystemTagsMappingCollection([], { objectType: 'files' })\n\n\t\t\t\tthis._inputView.collection.on('change:name', this._onTagRenamedGlobally, this)\n\t\t\t\tthis._inputView.collection.on('remove', this._onTagDeletedGlobally, this)\n\n\t\t\t\tthis._inputView.on('select', this._onSelectTag, this)\n\t\t\t\tthis._inputView.on('deselect', this._onDeselectTag, this)\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Event handler whenever a tag was selected\n\t\t\t *\n\t\t\t * @param {object} tag the tag to create\n\t\t\t */\n\t\t\t_onSelectTag(tag) {\n\t\t\t// create a mapping entry for this tag\n\t\t\t\tthis.selectedTagsCollection.create(tag.toJSON())\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Event handler whenever a tag gets deselected.\n\t\t\t * Removes the selected tag from the mapping collection.\n\t\t\t *\n\t\t\t * @param {string} tagId tag id\n\t\t\t */\n\t\t\t_onDeselectTag(tagId) {\n\t\t\t\tthis.selectedTagsCollection.get(tagId).destroy()\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Event handler whenever a tag was renamed globally.\n\t\t\t *\n\t\t\t * This will automatically adjust the tag mapping collection to\n\t\t\t * container the new name.\n\t\t\t *\n\t\t\t * @param {OC.Backbone.Model} changedTag tag model that has changed\n\t\t\t */\n\t\t\t_onTagRenamedGlobally(changedTag) {\n\t\t\t// also rename it in the selection, if applicable\n\t\t\t\tconst selectedTagMapping = this.selectedTagsCollection.get(changedTag.id)\n\t\t\t\tif (selectedTagMapping) {\n\t\t\t\t\tselectedTagMapping.set(changedTag.toJSON())\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Event handler whenever a tag was deleted globally.\n\t\t\t *\n\t\t\t * This will automatically adjust the tag mapping collection to\n\t\t\t * container the new name.\n\t\t\t *\n\t\t\t * @param {OC.Backbone.Model} tagId tag model that has changed\n\t\t\t */\n\t\t\t_onTagDeletedGlobally(tagId) {\n\t\t\t// also rename it in the selection, if applicable\n\t\t\t\tthis.selectedTagsCollection.remove(tagId)\n\t\t\t},\n\n\t\t\tsetFileInfo(fileInfo) {\n\t\t\t\tconst self = this\n\t\t\t\tif (!this._rendered) {\n\t\t\t\t\tthis.render()\n\t\t\t\t}\n\n\t\t\t\tif (fileInfo) {\n\t\t\t\t\tthis.selectedTagsCollection.setObjectId(fileInfo.id)\n\t\t\t\t\tthis.selectedTagsCollection.fetch({\n\t\t\t\t\t\tsuccess(collection) {\n\t\t\t\t\t\t\tcollection.fetched = true\n\n\t\t\t\t\t\t\tconst appliedTags = collection.map(modelToSelection)\n\t\t\t\t\t\t\tself._inputView.setData(appliedTags)\n\t\t\t\t\t\t\tif (appliedTags.length > 0) {\n\t\t\t\t\t\t\t\tself.show()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthis.hide()\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Renders this details view\n\t\t\t */\n\t\t\trender() {\n\t\t\t\tthis.$el.append(this._inputView.$el)\n\t\t\t\tthis._inputView.render()\n\t\t\t},\n\n\t\t\tisVisible() {\n\t\t\t\treturn !this.$el.hasClass('hidden')\n\t\t\t},\n\n\t\t\tshow() {\n\t\t\t\tthis.$el.removeClass('hidden')\n\t\t\t},\n\n\t\t\thide() {\n\t\t\t\tthis.$el.addClass('hidden')\n\t\t\t},\n\n\t\t\ttoggle() {\n\t\t\t\tthis.$el.toggleClass('hidden')\n\t\t\t},\n\n\t\t\topenDropdown() {\n\t\t\t\tthis.$el.find('.systemTagsInputField').select2('open')\n\t\t\t},\n\n\t\t\tremove() {\n\t\t\t\tthis._inputView.remove()\n\t\t\t},\n\t\t})\n\n\tOCA.SystemTags.SystemTagsInfoView = SystemTagsInfoView\n\n})(OCA)\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#app-content-systemtagsfilter .select2-container{width:30%;margin-left:10px}#app-sidebar .app-sidebar-header__action .tag-label{cursor:pointer;padding:13px 0;display:flex;color:var(--color-text-light);position:relative;margin-top:-20px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/systemtagsfilelist.scss\"],\"names\":[],\"mappings\":\"AASA,iDACC,SAAA,CACA,gBAAA,CAGD,oDACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,gBAAA\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2016\\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#app-content-systemtagsfilter .select2-container {\\n\\twidth: 30%;\\n\\tmargin-left: 10px;\\n}\\n\\n#app-sidebar .app-sidebar-header__action .tag-label {\\n\\tcursor: pointer;\\n\\tpadding: 13px 0;\\n\\tdisplay: flex;\\n\\tcolor: var(--color-text-light);\\n\\tposition: relative;\\n\\tmargin-top: -20px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 9698;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9698: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(19294)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","OCA","SystemTags","App","initFileList","$el","this","_fileList","tagsParam","URL","window","location","href","searchParams","get","initialTags","split","map","parseInt","FileList","id","fileActions","_createFileActions","config","Files","getFilesConfig","shown","systemTagIds","appName","t","removeFileList","$fileList","empty","FileActions","registerDefaultActions","merge","_globalActionsInitialized","_onActionsUpdated","_","bind","on","register","OC","PERMISSION_READ","filename","context","setActiveView","silent","fileList","changeDirectory","joinPaths","$file","attr","setDefault","ev","action","registerAction","defaultAction","mime","name","destroy","off","addEventListener","$","e","target","extend","FilesPlugin","ignoreLists","attach","indexOf","View","systemTagsInfoView","SystemTagsInfoView","registerDetailView","Plugins","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","initialize","prototype","_systemTagIds","_lastUsedTags","_clientSideSort","_allowSelection","_filterField","apply","arguments","initialized","$controls","find","defer","_getLastUsedTags","_initFilterField","$filterField","remove","self","ajax","type","url","generateUrl","success","response","$container","val","join","append","select2","placeholder","allowClear","multiple","toggleSelect","separator","query","_queryTagsAutocomplete","tag","initSelection","element","callback","trim","tagIds","tags","collection","fetch","each","tagId","isUndefined","push","toJSON","_onTagsChanged","formatResult","getDescriptiveTag","formatSelection","outerHTML","sortResults","results","sort","a","b","aLastUsed","bLastUsed","Util","naturalSortCompare","escapeMarkup","m","formatNoMatches","parent","children","filterByName","term","invoke","_onUrlChanged","dir","filter","reload","trigger","Event","updateEmptyContent","getCurrentDirectory","length","html","toggleClass","isEmpty","getDirectoryPermissions","PERMISSION_DELETE","updateStorageStatistics","_setCurrentDir","setFiles","Deferred","resolve","_selectedFiles","_selectionSummary","clear","_currentFileModel","prop","showMask","_reloadCall","filesClient","getFilteredFiles","properties","_getWebdavProperties","_detailsView","_updateDetailsView","callBack","reloadCallback","then","status","result","unshift","call","modelToSelection","model","data","isUserAdmin","canAssign","locked","DetailFileInfoView","_rendered","className","_inputView","SystemTagsInputField","allowActions","allowCreate","isAdmin","selectedTagsCollection","SystemTagsMappingCollection","objectType","_onTagRenamedGlobally","_onTagDeletedGlobally","_onSelectTag","_onDeselectTag","create","changedTag","selectedTagMapping","set","setFileInfo","fileInfo","render","setObjectId","fetched","appliedTags","setData","show","hide","isVisible","hasClass","removeClass","addClass","toggle","openDropdown","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","definition","o","defineProperty","enumerable","g","globalThis","Function","obj","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","document","baseURI","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end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cloud/apps/systemtags/src/app.js","webpack://nextcloud/./apps/systemtags/src/css/systemtagsfilelist.scss?3cf4","webpack:///nextcloud/apps/systemtags/src/systemtags.js","webpack:///nextcloud/apps/systemtags/src/systemtagsfilelist.js","webpack:///nextcloud/apps/systemtags/src/css/systemtagsfilelist.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * Copyright (c) 2015 Vincent Petry \n *\n * @author Christoph Wurst \n * @author Daniel Calviño Sánchez \n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function() {\n\tif (!OCA.SystemTags) {\n\t\t/**\n\t\t * @namespace\n\t\t */\n\t\tOCA.SystemTags = {}\n\t}\n\n\tOCA.SystemTags.App = {\n\n\t\tinitFileList($el) {\n\t\t\tif (this._fileList) {\n\t\t\t\treturn this._fileList\n\t\t\t}\n\n\t\t\tconst tagsParam = (new URL(window.location.href)).searchParams.get('tags')\n\t\t\tconst initialTags = tagsParam ? tagsParam.split(',').map(parseInt) : []\n\n\t\t\tthis._fileList = new OCA.SystemTags.FileList(\n\t\t\t\t$el,\n\t\t\t\t{\n\t\t\t\t\tid: 'systemtags',\n\t\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\t\t// The file list is created when a \"show\" event is handled,\n\t\t\t\t\t// so it should be marked as \"shown\" like it would have been\n\t\t\t\t\t// done if handling the event with the file list already\n\t\t\t\t\t// created.\n\t\t\t\t\tshown: true,\n\t\t\t\t\tsystemTagIds: initialTags,\n\t\t\t\t}\n\t\t\t)\n\n\t\t\tthis._fileList.appName = t('systemtags', 'Tags')\n\t\t\treturn this._fileList\n\t\t},\n\n\t\tremoveFileList() {\n\t\t\tif (this._fileList) {\n\t\t\t\tthis._fileList.$fileList.empty()\n\t\t\t}\n\t\t},\n\n\t\t_createFileActions() {\n\t\t\t// inherit file actions from the files app\n\t\t\tconst fileActions = new OCA.Files.FileActions()\n\t\t\t// note: not merging the legacy actions because legacy apps are not\n\t\t\t// compatible with the sharing overview and need to be adapted first\n\t\t\tfileActions.registerDefaultActions()\n\t\t\tfileActions.merge(OCA.Files.fileActions)\n\n\t\t\tif (!this._globalActionsInitialized) {\n\t\t\t\t// in case actions are registered later\n\t\t\t\tthis._onActionsUpdated = _.bind(this._onActionsUpdated, this)\n\t\t\t\tOCA.Files.fileActions.on('setDefault.app-systemtags', this._onActionsUpdated)\n\t\t\t\tOCA.Files.fileActions.on('registerAction.app-systemtags', this._onActionsUpdated)\n\t\t\t\tthis._globalActionsInitialized = true\n\t\t\t}\n\n\t\t\t// when the user clicks on a folder, redirect to the corresponding\n\t\t\t// folder in the files app instead of opening it directly\n\t\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {\n\t\t\t\tOCA.Files.App.setActiveView('files', { silent: true })\n\t\t\t\tOCA.Files.App.fileList.changeDirectory(OC.joinPaths(context.$file.attr('data-path'), filename), true, true)\n\t\t\t})\n\t\t\tfileActions.setDefault('dir', 'Open')\n\t\t\treturn fileActions\n\t\t},\n\n\t\t_onActionsUpdated(ev) {\n\t\t\tif (!this._fileList) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (ev.action) {\n\t\t\t\tthis._fileList.fileActions.registerAction(ev.action)\n\t\t\t} else if (ev.defaultAction) {\n\t\t\t\tthis._fileList.fileActions.setDefault(\n\t\t\t\t\tev.defaultAction.mime,\n\t\t\t\t\tev.defaultAction.name\n\t\t\t\t)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Destroy the app\n\t\t */\n\t\tdestroy() {\n\t\t\tOCA.Files.fileActions.off('setDefault.app-systemtags', this._onActionsUpdated)\n\t\t\tOCA.Files.fileActions.off('registerAction.app-systemtags', this._onActionsUpdated)\n\t\t\tthis.removeFileList()\n\t\t\tthis._fileList = null\n\t\t\tdelete this._globalActionsInitialized\n\t\t},\n\t}\n\n})()\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\t$('#app-content-systemtagsfilter').on('show', function(e) {\n\t\tOCA.SystemTags.App.initFileList($(e.target))\n\t})\n\t$('#app-content-systemtagsfilter').on('hide', function() {\n\t\tOCA.SystemTags.App.removeFileList()\n\t})\n})\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./systemtagsfilelist.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./systemtagsfilelist.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2016 Roeland Jago Douma \n *\n * @author John Molakvoæ \n * @author Roeland Jago Douma \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\nimport './app.js'\nimport './systemtagsfilelist.js'\nimport './css/systemtagsfilelist.scss'\n\nwindow.OCA.SystemTags = OCA.SystemTags\n","/**\n * Copyright (c) 2016 Vincent Petry \n *\n * @author Joas Schilling \n * @author John Molakvoæ \n * @author Vincent Petry \n *\n * @license AGPL-3.0-or-later\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 .\n *\n */\n\n(function() {\n\t/**\n\t * @class OCA.SystemTags.FileList\n\t * @augments OCA.Files.FileList\n\t *\n\t * @classdesc SystemTags file list.\n\t * Contains a list of files filtered by system tags.\n\t *\n\t * @param {object} $el container element with existing markup for the .files-controls and a table\n\t * @param {Array} [options] map of options, see other parameters\n\t * @param {Array.} [options.systemTagIds] array of system tag ids to\n\t * filter by\n\t */\n\tconst FileList = function($el, options) {\n\t\tthis.initialize($el, options)\n\t}\n\tFileList.prototype = _.extend(\n\t\t{},\n\t\tOCA.Files.FileList.prototype,\n\t\t/** @lends OCA.SystemTags.FileList.prototype */ {\n\t\t\tid: 'systemtagsfilter',\n\t\t\tappName: t('systemtags', 'Tagged files'),\n\n\t\t\t/**\n\t\t\t * Array of system tag ids to filter by\n\t\t\t *\n\t\t\t * @type {Array.}\n\t\t\t */\n\t\t\t_systemTagIds: [],\n\t\t\t_lastUsedTags: [],\n\n\t\t\t_clientSideSort: true,\n\t\t\t_allowSelection: false,\n\n\t\t\t_filterField: null,\n\n\t\t\t/**\n\t\t\t * @private\n\t\t\t * @param {object} $el container element\n\t\t\t * @param {object} [options] map of options, see other parameters\n\t\t\t */\n\t\t\tinitialize($el, options) {\n\t\t\t\tOCA.Files.FileList.prototype.initialize.apply(this, arguments)\n\t\t\t\tif (this.initialized) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tif (options && options.systemTagIds) {\n\t\t\t\t\tthis._systemTagIds = options.systemTagIds\n\t\t\t\t}\n\n\t\t\t\tOC.Plugins.attach('OCA.SystemTags.FileList', this)\n\n\t\t\t\tconst $controls = this.$el.find('.files-controls').empty()\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\t\t\t\tthis._initFilterField($controls)\n\t\t\t},\n\n\t\t\tdestroy() {\n\t\t\t\tthis.$filterField.remove()\n\n\t\t\t\tOCA.Files.FileList.prototype.destroy.apply(this, arguments)\n\t\t\t},\n\n\t\t\t_getLastUsedTags() {\n\t\t\t\tconst self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_initFilterField($container) {\n\t\t\t\tconst self = this\n\t\t\t\tthis.$filterField = $('')\n\t\t\t\tthis.$filterField.val(this._systemTagIds.join(','))\n\t\t\t\t$container.append(this.$filterField)\n\t\t\t\tthis.$filterField.select2({\n\t\t\t\t\tplaceholder: t('systemtags', 'Select tags to filter by'),\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ttoggleSelect: true,\n\t\t\t\t\tseparator: ',',\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\n\t\t\t\t\tid(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\n\t\t\t\t\tinitSelection(element, callback) {\n\t\t\t\t\t\tconst val = $(element)\n\t\t\t\t\t\t\t.val()\n\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\tif (val) {\n\t\t\t\t\t\t\tconst tagIds = val.split(',')\n\t\t\t\t\t\t\tconst tags = []\n\n\t\t\t\t\t\t\tOC.SystemTags.collection.fetch({\n\t\t\t\t\t\t\t\tsuccess() {\n\t\t\t\t\t\t\t\t\t_.each(tagIds, function(tagId) {\n\t\t\t\t\t\t\t\t\t\tconst tag = OC.SystemTags.collection.get(\n\t\t\t\t\t\t\t\t\t\t\ttagId\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\tif (!_.isUndefined(tag)) {\n\t\t\t\t\t\t\t\t\t\t\ttags.push(tag.toJSON())\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\tcallback(tags)\n\t\t\t\t\t\t\t\t\tself._onTagsChanged({ target: element })\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// eslint-disable-next-line n/no-callback-literal\n\t\t\t\t\t\t\tcallback([])\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\n\t\t\t\t\tformatResult(tag) {\n\t\t\t\t\t\treturn OC.SystemTags.getDescriptiveTag(tag)\n\t\t\t\t\t},\n\n\t\t\t\t\tformatSelection(tag) {\n\t\t\t\t\t\treturn OC.SystemTags.getDescriptiveTag(tag).outerHTML\n\t\t\t\t\t},\n\n\t\t\t\t\tsortResults(results) {\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tconst aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\tconst bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\n\t\t\t\t\tescapeMarkup(m) {\n\t\t\t\t\t\t// prevent double markup escape\n\t\t\t\t\t\treturn m\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches() {\n\t\t\t\t\t\treturn t('systemtags', 'No tags found')\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tthis.$filterField.parent().children('.select2-container').attr('aria-expanded', 'false')\n\t\t\t\tthis.$filterField.on('select2-open', () => {\n\t\t\t\t\tthis.$filterField.parent().children('.select2-container').attr('aria-expanded', 'true')\n\t\t\t\t})\n\t\t\t\tthis.$filterField.on('select2-close', () => {\n\t\t\t\t\tthis.$filterField.parent().children('.select2-container').attr('aria-expanded', 'false')\n\t\t\t\t})\n\t\t\t\tthis.$filterField.on(\n\t\t\t\t\t'change',\n\t\t\t\t\t_.bind(this._onTagsChanged, this)\n\t\t\t\t)\n\t\t\t\treturn this.$filterField\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Autocomplete function for dropdown results\n\t\t\t *\n\t\t\t * @param {object} query select2 query object\n\t\t\t */\n\t\t\t_queryTagsAutocomplete(query) {\n\t\t\t\tOC.SystemTags.collection.fetch({\n\t\t\t\t\tsuccess() {\n\t\t\t\t\t\tconst results = OC.SystemTags.collection.filterByName(\n\t\t\t\t\t\t\tquery.term\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(results, 'toJSON'),\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Event handler for when the URL changed\n\t\t\t *\n\t\t\t * @param {Event} e the urlchanged event\n\t\t\t */\n\t\t\t_onUrlChanged(e) {\n\t\t\t\tif (e.dir) {\n\t\t\t\t\tconst tags = _.filter(e.dir.split('/'), function(val) {\n\t\t\t\t\t\treturn val.trim() !== ''\n\t\t\t\t\t})\n\t\t\t\t\tthis.$filterField.select2('val', tags || [])\n\t\t\t\t\tthis._systemTagIds = tags\n\t\t\t\t\tthis.reload()\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onTagsChanged(ev) {\n\t\t\t\tconst val = $(ev.target)\n\t\t\t\t\t.val()\n\t\t\t\t\t.trim()\n\t\t\t\tif (val !== '') {\n\t\t\t\t\tthis._systemTagIds = val.split(',')\n\t\t\t\t} else {\n\t\t\t\t\tthis._systemTagIds = []\n\t\t\t\t}\n\n\t\t\t\tthis.$el.trigger(\n\t\t\t\t\t$.Event('changeDirectory', {\n\t\t\t\t\t\tdir: this._systemTagIds.join('/'),\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t\tthis.reload()\n\t\t\t},\n\n\t\t\tupdateEmptyContent() {\n\t\t\t\tconst dir = this.getCurrentDirectory()\n\t\t\t\tif (dir === '/') {\n\t\t\t\t\t// root has special permissions\n\t\t\t\t\tif (!this._systemTagIds.length) {\n\t\t\t\t\t\t// no tags selected\n\t\t\t\t\t\tthis.$el\n\t\t\t\t\t\t\t.find('.emptyfilelist.emptycontent')\n\t\t\t\t\t\t\t.html(\n\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\t+ t(\n\t\t\t\t\t\t\t\t\t\t'systemtags',\n\t\t\t\t\t\t\t\t\t\t'Please select tags to filter by'\n\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)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// tags selected but no results\n\t\t\t\t\t\tthis.$el\n\t\t\t\t\t\t\t.find('.emptyfilelist.emptycontent')\n\t\t\t\t\t\t\t.html(\n\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\t+ t(\n\t\t\t\t\t\t\t\t\t\t'systemtags',\n\t\t\t\t\t\t\t\t\t\t'No files found for the selected tags'\n\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)\n\t\t\t\t\t}\n\t\t\t\t\tthis.$el\n\t\t\t\t\t\t.find('.emptyfilelist.emptycontent')\n\t\t\t\t\t\t.toggleClass('hidden', !this.isEmpty)\n\t\t\t\t\tthis.$el\n\t\t\t\t\t\t.find('.files-filestable thead th')\n\t\t\t\t\t\t.toggleClass('hidden', this.isEmpty)\n\t\t\t\t} else {\n\t\t\t\t\tOCA.Files.FileList.prototype.updateEmptyContent.apply(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\targuments\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetDirectoryPermissions() {\n\t\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE\n\t\t\t},\n\n\t\t\tupdateStorageStatistics() {\n\t\t\t\t// no op because it doesn't have\n\t\t\t\t// storage info like free space / used space\n\t\t\t},\n\n\t\t\treload() {\n\t\t\t\t// there is only root\n\t\t\t\tthis._setCurrentDir('/', false)\n\n\t\t\t\tif (!this._systemTagIds.length) {\n\t\t\t\t\t// don't reload\n\t\t\t\t\tthis.updateEmptyContent()\n\t\t\t\t\tthis.setFiles([])\n\t\t\t\t\treturn $.Deferred().resolve()\n\t\t\t\t}\n\n\t\t\t\tthis._selectedFiles = {}\n\t\t\t\tthis._selectionSummary.clear()\n\t\t\t\tif (this._currentFileModel) {\n\t\t\t\t\tthis._currentFileModel.off()\n\t\t\t\t}\n\t\t\t\tthis._currentFileModel = null\n\t\t\t\tthis.$el.find('.select-all').prop('checked', false)\n\t\t\t\tthis.showMask()\n\t\t\t\tthis._reloadCall = this.filesClient.getFilteredFiles(\n\t\t\t\t\t{\n\t\t\t\t\t\tsystemTagIds: this._systemTagIds,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tproperties: this._getWebdavProperties(),\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\tif (this._detailsView) {\n\t\t\t\t\t// close sidebar\n\t\t\t\t\tthis._updateDetailsView(null)\n\t\t\t\t}\n\t\t\t\tconst callBack = this.reloadCallback.bind(this)\n\t\t\t\treturn this._reloadCall.then(callBack, callBack)\n\t\t\t},\n\n\t\t\treloadCallback(status, result) {\n\t\t\t\tif (result) {\n\t\t\t\t\t// prepend empty dir info because original handler\n\t\t\t\t\tresult.unshift({})\n\t\t\t\t}\n\n\t\t\t\treturn OCA.Files.FileList.prototype.reloadCallback.call(\n\t\t\t\t\tthis,\n\t\t\t\t\tstatus,\n\t\t\t\t\tresult\n\t\t\t\t)\n\t\t\t},\n\t\t}\n\t)\n\n\tOCA.SystemTags.FileList = FileList\n})()\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"#app-content-systemtagsfilter .select2-container{width:30%;margin-left:10px}#app-sidebar .app-sidebar-header__action .tag-label{cursor:pointer;padding:13px 0;display:flex;color:var(--color-text-light);position:relative;margin-top:-20px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/systemtagsfilelist.scss\"],\"names\":[],\"mappings\":\"AASA,iDACC,SAAA,CACA,gBAAA,CAGD,oDACC,cAAA,CACA,cAAA,CACA,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,gBAAA\",\"sourcesContent\":[\"/*\\n * Copyright (c) 2016\\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#app-content-systemtagsfilter .select2-container {\\n\\twidth: 30%;\\n\\tmargin-left: 10px;\\n}\\n\\n#app-sidebar .app-sidebar-header__action .tag-label {\\n\\tcursor: pointer;\\n\\tpadding: 13px 0;\\n\\tdisplay: flex;\\n\\tcolor: var(--color-text-light);\\n\\tposition: relative;\\n\\tmargin-top: -20px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 9698;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9698: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(19294)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","OCA","SystemTags","App","initFileList","$el","this","_fileList","tagsParam","URL","window","location","href","searchParams","get","initialTags","split","map","parseInt","FileList","id","fileActions","_createFileActions","config","Files","getFilesConfig","shown","systemTagIds","appName","t","removeFileList","$fileList","empty","FileActions","registerDefaultActions","merge","_globalActionsInitialized","_onActionsUpdated","_","bind","on","register","OC","PERMISSION_READ","filename","context","setActiveView","silent","fileList","changeDirectory","joinPaths","$file","attr","setDefault","ev","action","registerAction","defaultAction","mime","name","destroy","off","addEventListener","$","e","target","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","initialize","prototype","extend","_systemTagIds","_lastUsedTags","_clientSideSort","_allowSelection","_filterField","apply","arguments","initialized","Plugins","attach","$controls","find","defer","_getLastUsedTags","_initFilterField","$filterField","remove","self","ajax","type","url","generateUrl","success","response","$container","val","join","append","select2","placeholder","allowClear","multiple","toggleSelect","separator","query","_queryTagsAutocomplete","tag","initSelection","element","callback","trim","tagIds","tags","collection","fetch","each","tagId","isUndefined","push","toJSON","_onTagsChanged","formatResult","getDescriptiveTag","formatSelection","outerHTML","sortResults","results","sort","a","b","aLastUsed","indexOf","bLastUsed","Util","naturalSortCompare","escapeMarkup","m","formatNoMatches","parent","children","filterByName","term","invoke","_onUrlChanged","dir","filter","reload","trigger","Event","updateEmptyContent","getCurrentDirectory","length","html","toggleClass","isEmpty","getDirectoryPermissions","PERMISSION_DELETE","updateStorageStatistics","_setCurrentDir","setFiles","Deferred","resolve","_selectedFiles","_selectionSummary","clear","_currentFileModel","prop","showMask","_reloadCall","filesClient","getFilteredFiles","properties","_getWebdavProperties","_detailsView","_updateDetailsView","callBack","reloadCallback","then","status","result","unshift","call","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","loaded","__webpack_modules__","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","n","getter","__esModule","d","definition","o","defineProperty","enumerable","g","globalThis","Function","obj","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","document","baseURI","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","chunkLoadingGlobal","forEach","nc","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file