/**
* This file is automatically generated
* DO NOT EDIT MANUALLY!
*
* You can update the list of MimeType Aliases in config/mimetypealiases.json
* The list of files is fetched from core/img/filetypes
* To regenerate this file run ./occ maintenance:mimetype:update-js
*/
OC.MimeTypeList={
	aliases: {
    "application/coreldraw": "image",
    "application/epub+zip": "text",
    "application/font-sfnt": "font",
    "application/font-woff": "font",
    "application/gpx+xml": "location",
    "application/gzip": "package/x-generic",
    "application/illustrator": "image",
    "application/internet-shortcut": "link",
    "application/javascript": "text/code",
    "application/json": "text/code",
    "application/km": "mindmap",
    "application/msaccess": "file",
    "application/msexcel": "x-office/spreadsheet",
    "application/msonenote": "x-office/document",
    "application/mspowerpoint": "x-office/presentation",
    "application/msword": "x-office/document",
    "application/octet-stream": "file",
    "application/postscript": "image",
    "application/rss+xml": "application/xml",
    "application/vnd.android.package-archive": "package/x-generic",
    "application/vnd.excalidraw+json": "whiteboard",
    "application/vnd.garmin.tcx+xml": "location",
    "application/vnd.google-earth.kml+xml": "location",
    "application/vnd.google-earth.kmz": "location",
    "application/vnd.lotus-wordpro": "x-office/document",
    "application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet",
    "application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet",
    "application/vnd.ms-excel.sheet.macroEnabled.12": "x-office/spreadsheet",
    "application/vnd.ms-excel.template.macroEnabled.12": "x-office/spreadsheet",
    "application/vnd.ms-excel": "x-office/spreadsheet",
    "application/vnd.ms-fontobject": "font",
    "application/vnd.ms-powerpoint.addin.macroEnabled.12": "x-office/presentation",
    "application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation",
    "application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation",
    "application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation",
    "application/vnd.ms-powerpoint": "x-office/presentation",
    "application/vnd.ms-visio.drawing.macroEnabled.12": "application/vnd.visio",
    "application/vnd.ms-visio.drawing": "application/vnd.visio",
    "application/vnd.ms-visio.stencil.macroEnabled.12": "application/vnd.visio",
    "application/vnd.ms-visio.stencil": "application/vnd.visio",
    "application/vnd.ms-visio.template.macroEnabled.12": "application/vnd.visio",
    "application/vnd.ms-visio.template": "application/vnd.visio",
    "application/vnd.ms-word.document.macroEnabled.12": "x-office/document",
    "application/vnd.ms-word.template.macroEnabled.12": "x-office/document",
    "application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
    "application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
    "application/vnd.oasis.opendocument.graphics": "x-office/drawing",
    "application/vnd.oasis.opendocument.presentation-flat-xml": "x-office/presentation",
    "application/vnd.oasis.opendocument.presentation-template": "x-office/presentation",
    "application/vnd.oasis.opendocument.presentation": "x-office/presentation",
    "application/vnd.oasis.opendocument.spreadsheet-flat-xml": "x-office/spreadsheet",
    "application/vnd.oasis.opendocument.spreadsheet-template": "x-office/spreadsheet",
    "application/vnd.oasis.opendocument.spreadsheet": "x-office/spreadsheet",
    "application/vnd.oasis.opendocument.text-flat-xml": "x-office/document",
    "application/vnd.oasis.opendocument.text-master": "x-office/document",
    "application/vnd.oasis.opendocument.text-template": "x-office/document",
    "application/vnd.oasis.opendocument.text-web": "x-office/document",
    "application/vnd.oasis.opendocument.text": "x-office/document",
    "application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
    "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
    "application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "x-office/spreadsheet",
    "application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document",
    "application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document",
    "application/vnd.visio": "x-office/document",
    "application/vnd.wordperfect": "x-office/document",
    "application/vnd.xmind.workbook": "mindmap",
    "application/x-7z-compressed": "package/x-generic",
    "application/x-bzip2": "package/x-generic",
    "application/x-cbr": "text",
    "application/x-dcraw": "image",
    "application/x-deb": "package/x-generic",
    "application/x-fictionbook+xml": "text",
    "application/x-font": "font",
    "application/x-freemind": "mindmap",
    "application/x-gimp": "image",
    "application/x-gzip": "application/gzip",
    "application/x-iwork-keynote-sffkey": "x-office/presentation",
    "application/x-iwork-numbers-sffnumbers": "x-office/spreadsheet",
    "application/x-iwork-pages-sffpages": "x-office/document",
    "application/x-mobipocket-ebook": "text",
    "application/x-perl": "text/code",
    "application/x-photoshop": "image",
    "application/x-php": "text/code",
    "application/x-rar-compressed": "package/x-generic",
    "application/x-tar": "package/x-generic",
    "application/x-tex": "text",
    "application/xml": "text/html",
    "application/yaml": "text/code",
    "application/zip": "package/x-generic",
    "application/zstd": "package/x-generic",
    "database": "file",
    "httpd/unix-directory": "dir",
    "image/targa": "image/tga",
    "image/x-emf": "image/emf",
    "text/css": "text/code",
    "text/csv": "x-office/spreadsheet",
    "text/html": "text/code",
    "text/x-c": "text/code",
    "text/x-c++src": "text/code",
    "text/x-h": "text/code",
    "text/x-java-source": "text/code",
    "text/x-ldif": "text/code",
    "text/x-nfo": "text/code",
    "text/x-python": "text/code",
    "text/x-rst": "text",
    "text/x-shellscript": "text/code",
    "web": "text/code"
},
	files: [
    "application",
    "application-pdf",
    "audio",
    "file",
    "folder",
    "folder-drag-accept",
    "folder-encrypted",
    "folder-external",
    "folder-public",
    "folder-shared",
    "folder-starred",
    "font",
    "image",
    "link",
    "location",
    "mindmap",
    "package-x-generic",
    "text",
    "text-calendar",
    "text-code",
    "text-vcard",
    "video",
    "whiteboard",
    "x-office-document",
    "x-office-drawing",
    "x-office-form",
    "x-office-form-template",
    "x-office-presentation",
    "x-office-spreadsheet"
],
	themes: [],
	names: {'application/cmd': t('core', "Windows Command Script"),
'application/epub+zip': t('core', "Electronic book document"),
'application/font-sfnt': t('core', "TrueType Font Collection"),
'application/font-woff': t('core', "Web Open Font Format"),
'application/gpx+xml': t('core', "GPX geographic data"),
'application/gzip': t('core', "Gzip archive"),
'application/illustrator': t('core', "Adobe Illustrator document"),
'application/java': t('core', "Java source code"),
'application/javascript': t('core', "JavaScript source code"),
'application/json': t('core', "JSON document"),
'application/msaccess': t('core', "Microsoft Access database"),
'application/msonenote': t('core', "Microsoft OneNote document"),
'application/msword': t('core', "Microsoft Word document"),
'application/octet-stream': t('core', "Unknown"),
'application/pdf': t('core', "PDF document"),
'application/postscript': t('core', "PostScript document"),
'application/rss+xml': t('core', "RSS summary"),
'application/vnd.android.package-archive': t('core', "Android package"),
'application/vnd.google-earth.kml+xml': t('core', "KML geographic data"),
'application/vnd.google-earth.kmz': t('core', "KML geographic compressed data"),
'application/vnd.lotus-wordpro': t('core', "Lotus Word Pro document"),
'application/vnd.ms-excel': t('core', "Excel spreadsheet"),
'application/vnd.ms-excel.addin.macroEnabled.12': t('core', "Excel add-in"),
'application/vnd.ms-excel.sheet.binary.macroEnabled.12': t('core', "Excel 2007 binary spreadsheet"),
'application/vnd.ms-excel.sheet.macroEnabled.12': t('core', "Excel spreadsheet"),
'application/vnd.ms-excel.template.macroEnabled.12': t('core', "Excel spreadsheet template"),
'application/vnd.ms-outlook': t('core', "Outlook Message"),
'application/vnd.ms-powerpoint': t('core', "PowerPoint presentation"),
'application/vnd.ms-powerpoint.addin.macroEnabled.12': t('core', "PowerPoint add-in"),
'application/vnd.ms-powerpoint.presentation.macroEnabled.12': t('core', "PowerPoint presentation"),
'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': t('core', "PowerPoint presentation"),
'application/vnd.ms-powerpoint.template.macroEnabled.12': t('core', "PowerPoint presentation template"),
'application/vnd.ms-word.document.macroEnabled.12': t('core', "Word document"),
'application/vnd.oasis.opendocument.formula': t('core', "ODF formula"),
'application/vnd.oasis.opendocument.graphics': t('core', "ODG drawing"),
'application/vnd.oasis.opendocument.graphics-flat-xml': t('core', "ODG drawing (Flat XML)"),
'application/vnd.oasis.opendocument.graphics-template': t('core', "ODG template"),
'application/vnd.oasis.opendocument.presentation': t('core', "ODP presentation"),
'application/vnd.oasis.opendocument.presentation-flat-xml': t('core', "ODP presentation (Flat XML)"),
'application/vnd.oasis.opendocument.presentation-template': t('core', "ODP template"),
'application/vnd.oasis.opendocument.spreadsheet': t('core', "ODS spreadsheet"),
'application/vnd.oasis.opendocument.spreadsheet-flat-xml': t('core', "ODS spreadsheet (Flat XML)"),
'application/vnd.oasis.opendocument.spreadsheet-template': t('core', "ODS template"),
'application/vnd.oasis.opendocument.text': t('core', "ODT document"),
'application/vnd.oasis.opendocument.text-flat-xml': t('core', "ODT document (Flat XML)"),
'application/vnd.oasis.opendocument.text-template': t('core', "ODT template"),
'application/vnd.openxmlformats-officedocument.presentationml.presentation': t('core', "PowerPoint 2007 presentation"),
'application/vnd.openxmlformats-officedocument.presentationml.slideshow': t('core', "PowerPoint 2007 show"),
'application/vnd.openxmlformats-officedocument.presentationml.template': t('core', "PowerPoint 2007 presentation template"),
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': t('core', "Excel 2007 spreadsheet"),
'application/vnd.openxmlformats-officedocument.spreadsheetml.template': t('core', "Excel 2007 spreadsheet template"),
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': t('core', "Word 2007 document"),
'application/vnd.openxmlformats-officedocument.wordprocessingml.template': t('core', "Word 2007 document template"),
'application/vnd.visio': t('core', "Microsoft Visio document"),
'application/vnd.wordperfect': t('core', "WordPerfect document"),
'application/x-7z-compressed': t('core', "7-zip archive"),
'application/x-blender': t('core', "Blender scene"),
'application/x-bzip2': t('core', "Bzip2 archive"),
'application/x-deb': t('core', "Debian package"),
'application/x-fictionbook+xml': t('core', "FictionBook document"),
'application/x-font': t('core', "Unknown font"),
'application/x-krita': t('core', "Krita document"),
'application/x-mobipocket-ebook': t('core', "Mobipocket e-book"),
'application/x-msi': t('core', "Windows Installer package"),
'application/x-perl': t('core', "Perl script"),
'application/x-php': t('core', "PHP script"),
'application/x-tar': t('core', "Tar archive"),
'application/xml': t('core', "XML document"),
'application/yaml': t('core', "YAML document"),
'application/zip': t('core', "Zip archive"),
'application/zstd': t('core', "Zstandard archive"),
'audio/aac': t('core', "AAC audio"),
'audio/flac': t('core', "FLAC audio"),
'audio/mp4': t('core', "MPEG-4 audio"),
'audio/mpeg': t('core', "MP3 audio"),
'audio/ogg': t('core', "Ogg audio"),
'audio/wav': t('core', "RIFF\/WAVe standard Audio"),
'audio/webm': t('core', "WebM audio"),
'audio/x-scpls': t('core', "MP3 ShoutCast playlist"),
'image/bmp': t('core', "Windows BMP image"),
'image/bpg': t('core', "Better Portable Graphics image"),
'image/emf': t('core', "EMF image"),
'image/gif': t('core', "GIF image"),
'image/heic': t('core', "HEIC image"),
'image/heif': t('core', "HEIF image"),
'image/jp2': t('core', "JPEG-2000 JP2 image"),
'image/jpeg': t('core', "JPEG image"),
'image/png': t('core', "PNG image"),
'image/svg+xml': t('core', "SVG image"),
'image/tga': t('core', "Truevision Targa image"),
'image/tiff': t('core', "TIFF image"),
'image/webp': t('core', "WebP image"),
'image/x-dcraw': t('core', "Digital raw image"),
'image/x-icon': t('core', "Windows Icon"),
'message/rfc822': t('core', "Email message"),
'text/calendar': t('core', "VCS\/ICS calendar"),
'text/css': t('core', "CSS stylesheet"),
'text/csv': t('core', "CSV document"),
'text/html': t('core', "HTML document"),
'text/markdown': t('core', "Markdown document"),
'text/org': t('core', "Org-mode file"),
'text/plain': t('core', "Plain text document"),
'text/rtf': t('core', "Rich Text document"),
'text/vcard': t('core', "Electronic business card"),
'text/x-c++src': t('core', "C++ source code"),
'text/x-java-source': t('core', "Java source code"),
'text/x-ldif': t('core', "LDIF address book"),
'text/x-nfo': t('core', "NFO document"),
'text/x-php': t('core', "PHP source"),
'text/x-python': t('core', "Python script"),
'text/x-rst': t('core', "ReStructuredText document"),
'video/3gpp': t('core', "3GPP multimedia file"),
'video/MP2T': t('core', "MPEG video"),
'video/dv': t('core', "DV video"),
'video/mp2t': t('core', "MPEG-2 transport stream"),
'video/mp4': t('core', "MPEG-4 video"),
'video/mpeg': t('core', "MPEG video"),
'video/ogg': t('core', "Ogg video"),
'video/quicktime': t('core', "QuickTime video"),
'video/webm': t('core', "WebM video"),
'video/x-flv': t('core', "Flash video"),
'video/x-matroska': t('core', "Matroska video"),
'video/x-ms-wmv': t('core', "Windows Media video"),
'video/x-msvideo': t('core', "AVI video"),
},
};


/**
 * SPDX-FileCopyrightText: 2016 ownCloud Inc.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

/* global Select2 */

/**
 * Select2 extension for toggling values in a multi-select dropdown
 *
 * @param Select2
 */
(function(Select2) {
	const Select2FindHighlightableChoices = Select2.class.multi.prototype.findHighlightableChoices
	Select2.class.multi.prototype.findHighlightableChoices = function() {
		if (this.opts.toggleSelect) {
			return this.results.find('.select2-result-selectable:not(.select2-disabled)')
		}
		return Select2FindHighlightableChoices.apply(this, arguments)
	}

	const Select2TriggerSelect = Select2.class.multi.prototype.triggerSelect
	Select2.class.multi.prototype.triggerSelect = function(data) {
		if (this.opts.toggleSelect && this.val().indexOf(this.id(data)) !== -1) {
			const self = this
			const val = this.id(data)

			const selectionEls = this.container.find('.select2-search-choice').filter(function() {
				return (self.id($(this).data('select2-data')) === val)
			})

			if (this.unselect(selectionEls)) {
				// also unselect in dropdown
				this.results.find('.select2-result.select2-selected').each(function() {
					const $this = $(this)
					if (self.id($this.data('select2-data')) === val) {
						$this.removeClass('select2-selected')
					}
				})
				this.clearSearch()
			}

			return false
		} else {
			return Select2TriggerSelect.apply(this, arguments)
		}
	}
})(Select2)


