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AI,EAC3B,GAAGglB,EAAS/4B,MAAMP,GAAgC,IAAxBy8B,EAAgBz8B,KAAa,CACtD,IAAIi5B,KAAYiE,EACZlE,EAAoBgB,EAAEkD,EAAajE,KACrCD,EAAoB5jB,EAAE6jB,GAAYiE,EAAYjE,IAGhD,GAAGkE,EAAS,IAAI5uB,EAAS4uB,EAAQnE,EAClC,CAEA,IADGiE,GAA4BA,EAA2B/xB,GACrDoJ,EAAIglB,EAAS15B,OAAQ0U,IACzB6lB,EAAUb,EAAShlB,GAChB0kB,EAAoBgB,EAAEyC,EAAiBtC,IAAYsC,EAAgBtC,IACrEsC,EAAgBtC,GAAS,KAE1BsC,EAAgBtC,GAAW,EAE5B,OAAOnB,EAAoBK,EAAE9qB,EAAO,EAGjC6uB,EAAqBniB,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FmiB,EAAmB50B,QAAQw0B,EAAqBrB,KAAK,KAAM,IAC3DyB,EAAmBt1B,KAAOk1B,EAAqBrB,KAAK,KAAMyB,EAAmBt1B,KAAK6zB,KAAKyB,G,KCvFvFpE,EAAoBiC,QAAKx4B,ECGzB,IAAI46B,EAAsBrE,EAAoBK,OAAE52B,EAAW,CAAC,OAAO,IAAOu2B,EAAoB,SAC9FqE,EAAsBrE,EAAoBK,EAAEgE,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts","webpack:///nextcloud/apps/files/src/logger.ts","webpack:///nextcloud/apps/files/src/utils/actionUtils.ts","webpack:///nextcloud/apps/files/src/store/active.ts","webpack:///nextcloud/apps/files/src/store/index.ts","webpack:///nextcloud/apps/systemtags/src/services/systemtags.ts","webpack:///nextcloud/apps/systemtags/src/files_views/systemtagsView.ts","webpack://nextcloud/./apps/systemtags/src/css/fileEntryInlineSystemTags.scss?0a01","webpack:///nextcloud/apps/systemtags/src/files_actions/inlineSystemTagsAction.ts","webpack:///nextcloud/apps/systemtags/src/files_actions/openInFilesAction.ts","webpack:///nextcloud/apps/systemtags/src/init.ts","webpack:///nextcloud/apps/systemtags/src/services/HotKeysService.ts","webpack:///nextcloud/apps/systemtags/src/logger.ts","webpack:///nextcloud/apps/systemtags/src/services/api.ts","webpack:///nextcloud/apps/systemtags/src/services/davClient.ts","webpack:///nextcloud/apps/systemtags/src/utils.ts","webpack:///nextcloud/apps/systemtags/src/utils/colorUtils.ts","webpack:///nextcloud/node_modules/color-convert/conversions.js","webpack:///nextcloud/node_modules/color-convert/index.js","webpack:///nextcloud/node_modules/color-convert/route.js","webpack:///nextcloud/node_modules/color-name/index.js","webpack:///nextcloud/node_modules/color-string/index.js","webpack:///nextcloud/node_modules/color/index.js","webpack:///nextcloud/apps/systemtags/src/css/fileEntryInlineSystemTags.scss","webpack:///nextcloud/node_modules/simple-swizzle/index.js","webpack:///nextcloud/node_modules/simple-swizzle/node_modules/is-arrayish/index.js","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.mjs","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","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/publicPath","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};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { Permission } from '@nextcloud/files';\nimport { defineAsyncComponent } from 'vue';\nimport { FileAction } from '@nextcloud/files';\nimport { isPublicShare } from '@nextcloud/sharing/public';\nimport { spawnDialog } from '@nextcloud/dialogs';\nimport { t } from '@nextcloud/l10n';\nimport TagMultipleSvg from '@mdi/svg/svg/tag-multiple.svg?raw';\n/**\n *\n * @param nodes\n */\nasync function execBatch(nodes) {\n const response = await new Promise((resolve) => {\n spawnDialog(defineAsyncComponent(() => import('../components/SystemTagPicker.vue')), {\n nodes,\n }, (status) => {\n resolve(status);\n });\n });\n return Array(nodes.length).fill(response);\n}\nexport const action = new FileAction({\n id: 'systemtags:bulk',\n displayName: () => t('systemtags', 'Manage tags'),\n iconSvgInline: () => TagMultipleSvg,\n // If the app is disabled, the action is not available anyway\n enabled(nodes) {\n if (isPublicShare()) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // Disabled for non dav resources\n if (nodes.some((node) => !node.isDavRessource)) {\n return false;\n }\n // We need to have the update permission on all nodes\n return !nodes.some((node) => (node.permissions & Permission.UPDATE) === 0);\n },\n async exec(node) {\n return execBatch([node])[0];\n },\n execBatch,\n});\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('files')\n .detectUser()\n .build();\n","import { NodeStatus } from '@nextcloud/files';\nimport { showError, showSuccess } from '@nextcloud/dialogs';\nimport { t } from '@nextcloud/l10n';\nimport Vue from 'vue';\nimport { getPinia } from '../store';\nimport { useActiveStore } from '../store/active';\nimport logger from '../logger';\n/**\n * Execute an action on the current active node\n *\n * @param action The action to execute\n */\nexport const executeAction = async (action) => {\n const activeStore = useActiveStore(getPinia());\n const currentDir = (window?.OCP?.Files?.Router?.query?.dir || '/');\n const currentNode = activeStore.activeNode;\n const currentView = activeStore.activeView;\n if (!currentNode || !currentView) {\n logger.error('No active node or view', { node: currentNode, view: currentView });\n return;\n }\n if (currentNode.status === NodeStatus.LOADING) {\n logger.debug('Node is already loading', { node: currentNode });\n return;\n }\n if (!action.enabled([currentNode], currentView)) {\n logger.debug('Action is not not available for the current context', { action, node: currentNode, view: currentView });\n return;\n }\n let displayName = action.id;\n try {\n displayName = action.displayName([currentNode], currentView);\n }\n catch (error) {\n logger.error('Error while getting action display name', { action, error });\n }\n try {\n // Set the loading marker\n Vue.set(currentNode, 'status', NodeStatus.LOADING);\n activeStore.setActiveAction(action);\n const success = await action.exec(currentNode, currentView, currentDir);\n // If the action returns null, we stay silent\n if (success === null || success === undefined) {\n return;\n }\n if (success) {\n showSuccess(t('files', '\"{displayName}\" action executed successfully', { displayName }));\n return;\n }\n showError(t('files', '\"{displayName}\" action failed', { displayName }));\n }\n catch (error) {\n logger.error('Error while executing action', { action, error });\n showError(t('files', '\"{displayName}\" action failed', { displayName }));\n }\n finally {\n // Reset the loading marker\n Vue.set(currentNode, 'status', undefined);\n activeStore.clearActiveAction();\n }\n};\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { defineStore } from 'pinia';\nimport { getNavigation } from '@nextcloud/files';\nimport { subscribe } from '@nextcloud/event-bus';\nimport logger from '../logger.ts';\nexport const useActiveStore = function (...args) {\n const store = defineStore('active', {\n state: () => ({\n _initialized: false,\n activeNode: null,\n activeView: null,\n activeAction: null,\n }),\n actions: {\n setActiveNode(node) {\n if (!node) {\n throw new Error('Use clearActiveNode to clear the active node');\n }\n logger.debug('Setting active node', { node });\n this.activeNode = node;\n },\n clearActiveNode() {\n this.activeNode = null;\n },\n onDeletedNode(node) {\n if (this.activeNode && this.activeNode.source === node.source) {\n this.clearActiveNode();\n }\n },\n setActiveAction(action) {\n this.activeAction = action;\n },\n clearActiveAction() {\n this.activeAction = null;\n },\n onChangedView(view = null) {\n logger.debug('Setting active view', { view });\n this.activeView = view;\n this.clearActiveNode();\n },\n },\n });\n const activeStore = store(...args);\n const navigation = getNavigation();\n // Make sure we only register the listeners once\n if (!activeStore._initialized) {\n subscribe('files:node:deleted', activeStore.onDeletedNode);\n activeStore._initialized = true;\n activeStore.onChangedView(navigation.active);\n // Or you can react to changes of the current active view\n navigation.addEventListener('updateActive', (event) => {\n activeStore.onChangedView(event.detail);\n });\n }\n return activeStore;\n};\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { createPinia } from 'pinia';\nexport const getPinia = () => {\n if (window._nc_files_pinia) {\n return window._nc_files_pinia;\n }\n window._nc_files_pinia = createPinia();\n return window._nc_files_pinia;\n};\n","import { getCurrentUser } from '@nextcloud/auth';\nimport { Folder, Permission, getDavNameSpaces, getDavProperties, davGetClient, davResultToNode, davRemoteURL, davRootPath } from '@nextcloud/files';\nimport { fetchTags } from './api';\nconst rootPath = '/systemtags';\nconst client = davGetClient();\nconst resultToNode = (node) => davResultToNode(node);\nconst formatReportPayload = (tagId) => `\n\n\t\n\t\t${getDavProperties()}\n\t\n\t\n\t\t${tagId}\n\t\n`;\nconst tagToNode = function (tag) {\n return new Folder({\n id: tag.id,\n source: `${davRemoteURL}${rootPath}/${tag.id}`,\n owner: String(getCurrentUser()?.uid ?? 'anonymous'),\n root: rootPath,\n displayname: tag.displayName,\n permissions: Permission.READ,\n attributes: {\n ...tag,\n 'is-tag': true,\n },\n });\n};\nexport const getContents = async (path = '/') => {\n // List tags in the root\n const tagsCache = (await fetchTags()).filter(tag => tag.userVisible);\n if (path === '/') {\n return {\n folder: new Folder({\n id: 0,\n source: `${davRemoteURL}${rootPath}`,\n owner: getCurrentUser()?.uid,\n root: rootPath,\n permissions: Permission.NONE,\n }),\n contents: tagsCache.map(tagToNode),\n };\n }\n const tagId = parseInt(path.split('/', 2)[1]);\n const tag = tagsCache.find(tag => tag.id === tagId);\n if (!tag) {\n throw new Error('Tag not found');\n }\n const folder = tagToNode(tag);\n const contentsResponse = await client.getDirectoryContents(davRootPath, {\n details: true,\n // Only filter favorites if we're at the root\n data: formatReportPayload(tagId),\n headers: {\n // Patched in WebdavClient.ts\n method: 'REPORT',\n },\n });\n return {\n folder,\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport { getContents } from '../services/systemtags.js';\nimport svgTagMultiple from '@mdi/svg/svg/tag-multiple.svg?raw';\nexport const systemTagsViewId = 'tags';\n/**\n * Register the system tags files view\n */\nexport function registerSystemTagsView() {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: systemTagsViewId,\n name: t('systemtags', 'Tags'),\n caption: t('systemtags', 'List of tags and their associated files and folders.'),\n emptyTitle: t('systemtags', 'No tags found'),\n emptyCaption: t('systemtags', 'Tags you have created will show up here.'),\n icon: svgTagMultiple,\n order: 25,\n getContents,\n }));\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!./fileEntryInlineSystemTags.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\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!./fileEntryInlineSystemTags.scss\";\n export default content && content.locals ? content.locals : undefined;\n","import { FileAction } from '@nextcloud/files';\nimport { subscribe } from '@nextcloud/event-bus';\nimport { t } from '@nextcloud/l10n';\nimport '../css/fileEntryInlineSystemTags.scss';\nimport { elementColor, isDarkModeEnabled } from '../utils/colorUtils';\nimport { fetchTags } from '../services/api';\nimport { getNodeSystemTags } from '../utils';\nimport logger from '../logger.ts';\n// Init tag cache\nconst cache = [];\nconst renderTag = function (tag, isMore = false) {\n const tagElement = document.createElement('li');\n tagElement.classList.add('files-list__system-tag');\n tagElement.setAttribute('data-systemtag-name', tag);\n tagElement.textContent = tag;\n // Set the color if it exists\n const cachedTag = cache.find((t) => t.displayName === tag);\n if (cachedTag?.color) {\n // Make sure contrast is good and follow WCAG guidelines\n const mainBackgroundColor = getComputedStyle(document.body)\n .getPropertyValue('--color-main-background')\n .replace('#', '') || (isDarkModeEnabled() ? '000000' : 'ffffff');\n const primaryElement = elementColor(`#${cachedTag.color}`, `#${mainBackgroundColor}`);\n tagElement.style.setProperty('--systemtag-color', primaryElement);\n tagElement.setAttribute('data-systemtag-color', 'true');\n }\n if (isMore) {\n tagElement.classList.add('files-list__system-tag--more');\n }\n return tagElement;\n};\nconst renderInline = async function (node) {\n // Ensure we have the system tags as an array\n const tags = getNodeSystemTags(node);\n const systemTagsElement = document.createElement('ul');\n systemTagsElement.classList.add('files-list__system-tags');\n systemTagsElement.setAttribute('aria-label', t('files', 'Assigned collaborative tags'));\n systemTagsElement.setAttribute('data-systemtags-fileid', node.fileid?.toString() || '');\n if (tags.length === 0) {\n return systemTagsElement;\n }\n // Fetch the tags if the cache is empty\n if (cache.length === 0) {\n try {\n // Best would be to support attributes from webdav,\n // but currently the library does not support it\n cache.push(...await fetchTags());\n }\n catch (error) {\n logger.error('Failed to fetch tags', { error });\n }\n }\n systemTagsElement.append(renderTag(tags[0]));\n if (tags.length === 2) {\n // Special case only two tags:\n // the overflow fake tag would take the same space as this, so render it\n systemTagsElement.append(renderTag(tags[1]));\n }\n else if (tags.length > 1) {\n // More tags than the one we're showing\n // So we add a overflow element indicating there are more tags\n const moreTagElement = renderTag('+' + (tags.length - 1), true);\n moreTagElement.setAttribute('title', tags.slice(1).join(', '));\n // because the title is not accessible we hide this element for screen readers (see alternative below)\n moreTagElement.setAttribute('aria-hidden', 'true');\n moreTagElement.setAttribute('role', 'presentation');\n systemTagsElement.append(moreTagElement);\n // For accessibility the tags are listed, as the title is not accessible\n // but those tags are visually hidden\n for (const tag of tags.slice(1)) {\n const tagElement = renderTag(tag);\n tagElement.classList.add('hidden-visually');\n systemTagsElement.append(tagElement);\n }\n }\n return systemTagsElement;\n};\nexport const action = new FileAction({\n id: 'system-tags',\n displayName: () => '',\n iconSvgInline: () => '',\n enabled(nodes) {\n // Only show the action on single nodes\n if (nodes.length !== 1) {\n return false;\n }\n // Always show the action, even if there are no tags\n // This will render an empty tag list and allow events to update it\n return true;\n },\n exec: async () => null,\n renderInline,\n order: 0,\n});\n// Update the system tags html when the node is updated\nconst updateSystemTagsHtml = function (node) {\n renderInline(node).then((systemTagsHtml) => {\n document.querySelectorAll(`[data-systemtags-fileid=\"${node.fileid}\"]`).forEach((element) => {\n element.replaceWith(systemTagsHtml);\n });\n });\n};\n// Add and remove tags from the cache\nconst addTag = function (tag) {\n cache.push(tag);\n};\nconst removeTag = function (tag) {\n cache.splice(cache.findIndex((t) => t.id === tag.id), 1);\n};\nconst updateTag = function (tag) {\n const index = cache.findIndex((t) => t.id === tag.id);\n if (index !== -1) {\n cache[index] = tag;\n }\n updateSystemTagsColorAttribute(tag);\n};\n// Update the color attribute of the system tags\nconst updateSystemTagsColorAttribute = function (tag) {\n document.querySelectorAll(`[data-systemtag-name=\"${tag.displayName}\"]`).forEach((element) => {\n element.style.setProperty('--systemtag-color', `#${tag.color}`);\n });\n};\n// Subscribe to the events\nsubscribe('systemtags:node:updated', updateSystemTagsHtml);\nsubscribe('systemtags:tag:created', addTag);\nsubscribe('systemtags:tag:deleted', removeTag);\nsubscribe('systemtags:tag:updated', updateTag);\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport {} from '@nextcloud/files';\nimport { FileType, FileAction, DefaultType } from '@nextcloud/files';\nimport { t } from '@nextcloud/l10n';\nimport { systemTagsViewId } from '../files_views/systemtagsView';\nexport const action = new FileAction({\n id: 'systemtags:open-in-files',\n displayName: () => t('systemtags', 'Open in Files'),\n iconSvgInline: () => '',\n enabled(nodes, view) {\n // Only for the system tags view\n if (view.id !== systemTagsViewId) {\n return false;\n }\n // Only for single nodes\n if (nodes.length !== 1) {\n return false;\n }\n // Do not open tags (keep the default action) and only open folders\n return nodes[0].attributes['is-tag'] !== true\n && nodes[0].type === FileType.Folder;\n },\n async exec(node) {\n let dir = node.dirname;\n if (node.type === FileType.Folder) {\n dir = node.path;\n }\n window.OCP.Files.Router.goToRoute(null, // use default route\n { view: 'files', fileid: String(node.fileid) }, { dir, openfile: 'true' });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\n","/**\n * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { registerDavProperty, registerFileAction } from '@nextcloud/files';\nimport { registerHotkeys } from './services/HotKeysService';\nimport { registerSystemTagsView } from './files_views/systemtagsView';\nimport { action as bulkSystemTagsAction } from './files_actions/bulkSystemTagsAction';\nimport { action as inlineSystemTagsAction } from './files_actions/inlineSystemTagsAction';\nimport { action as openInFilesAction } from './files_actions/openInFilesAction';\nregisterDavProperty('nc:system-tags');\nregisterFileAction(bulkSystemTagsAction);\nregisterFileAction(inlineSystemTagsAction);\nregisterFileAction(openInFilesAction);\nregisterSystemTagsView();\ndocument.addEventListener('DOMContentLoaded', () => {\n registerHotkeys();\n});\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { useHotKey } from '@nextcloud/vue/dist/Composables/useHotKey.js';\nimport { action as manageTagAction } from '../files_actions/bulkSystemTagsAction.ts';\nimport { executeAction } from '../../../files/src/utils/actionUtils.ts';\nimport logger from '../logger.ts';\n/**\n * This register the hotkeys for the Files app.\n * As much as possible, we try to have all the hotkeys in one place.\n * Please make sure to add tests for the hotkeys after adding a new one.\n */\nexport const registerHotkeys = function () {\n // t opens the tag management dialog\n useHotKey('t', () => executeAction(manageTagAction), {\n stop: true,\n prevent: true,\n });\n logger.debug('Hotkeys registered');\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('systemtags')\n .detectUser()\n .build();\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport axios from '@nextcloud/axios';\nimport { generateUrl } from '@nextcloud/router';\nimport { t } from '@nextcloud/l10n';\nimport { davClient } from './davClient.js';\nimport { formatTag, parseIdFromLocation, parseTags } from '../utils';\nimport logger from '../logger.ts';\nimport { emit } from '@nextcloud/event-bus';\nexport const fetchTagsPayload = `\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n`;\nexport const fetchTags = async () => {\n const path = '/systemtags';\n try {\n const { data: tags } = await davClient.getDirectoryContents(path, {\n data: fetchTagsPayload,\n details: true,\n glob: '/systemtags/*', // Filter out first empty tag\n });\n return parseTags(tags);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tags'), { error });\n throw new Error(t('systemtags', 'Failed to load tags'));\n }\n};\nexport const fetchTag = async (tagId) => {\n const path = '/systemtags/' + tagId;\n try {\n const { data: tag } = await davClient.stat(path, {\n data: fetchTagsPayload,\n details: true,\n });\n return parseTags([tag])[0];\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load tag'), { error });\n throw new Error(t('systemtags', 'Failed to load tag'));\n }\n};\nexport const fetchLastUsedTagIds = async () => {\n const url = generateUrl('/apps/systemtags/lastused');\n try {\n const { data: lastUsedTagIds } = await axios.get(url);\n return lastUsedTagIds.map(Number);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to load last used tags'), { error });\n throw new Error(t('systemtags', 'Failed to load last used tags'));\n }\n};\n/**\n * Create a tag and return the Id of the newly created tag.\n *\n * @param tag The tag to create\n */\nexport const createTag = async (tag) => {\n const path = '/systemtags';\n const tagToPost = formatTag(tag);\n try {\n const { headers } = await davClient.customRequest(path, {\n method: 'POST',\n data: tagToPost,\n });\n const contentLocation = headers.get('content-location');\n if (contentLocation) {\n emit('systemtags:tag:created', tag);\n return parseIdFromLocation(contentLocation);\n }\n logger.error(t('systemtags', 'Missing \"Content-Location\" header'));\n throw new Error(t('systemtags', 'Missing \"Content-Location\" header'));\n }\n catch (error) {\n if (error?.response?.status === 409) {\n logger.error(t('systemtags', 'A tag with the same name already exists'), { error });\n throw new Error(t('systemtags', 'A tag with the same name already exists'));\n }\n logger.error(t('systemtags', 'Failed to create tag'), { error });\n throw new Error(t('systemtags', 'Failed to create tag'));\n }\n};\nexport const updateTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${tag.displayName}\n\t\t\t\t${tag.userVisible}\n\t\t\t\t${tag.userAssignable}\n\t\t\t\t${tag?.color || null}\n\t\t\t\n\t\t\n\t`;\n try {\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n });\n emit('systemtags:tag:updated', tag);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to update tag'), { error });\n throw new Error(t('systemtags', 'Failed to update tag'));\n }\n};\nexport const deleteTag = async (tag) => {\n const path = '/systemtags/' + tag.id;\n try {\n await davClient.deleteFile(path);\n emit('systemtags:tag:deleted', tag);\n }\n catch (error) {\n logger.error(t('systemtags', 'Failed to delete tag'), { error });\n throw new Error(t('systemtags', 'Failed to delete tag'));\n }\n};\nexport const getTagObjects = async function (tag, type) {\n const path = `/systemtags/${tag.id}/${type}`;\n const data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t`;\n const response = await davClient.stat(path, { data, details: true });\n const etag = response?.data?.props?.getetag || '\"\"';\n const objects = Object.values(response?.data?.props?.['object-ids'] || []).flat();\n return {\n etag,\n objects,\n };\n};\n/**\n * Set the objects for a tag.\n * Warning: This will overwrite the existing objects.\n * @param tag The tag to set the objects for\n * @param type The type of the objects\n * @param objectIds The objects to set\n * @param etag Strongly recommended to avoid conflict and data loss.\n */\nexport const setTagObjects = async function (tag, type, objectIds, etag = '') {\n const path = `/systemtags/${tag.id}/${type}`;\n let data = `\n\t\n\t\t\n\t\t\t\n\t\t\t\t${objectIds.map(({ id, type }) => `${id}${type}`).join('')}\n\t\t\t\n\t\t\n\t`;\n if (objectIds.length === 0) {\n data = `\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t`;\n }\n await davClient.customRequest(path, {\n method: 'PROPPATCH',\n data,\n headers: {\n 'if-match': etag,\n },\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth';\n// init webdav client\nconst rootUrl = generateRemoteUrl('dav');\nexport const davClient = createClient(rootUrl);\n// set CSRF token header\nconst setHeaders = (token) => {\n davClient.setHeaders({\n // Add this so the server knows it is an request from the browser\n 'X-Requested-With': 'XMLHttpRequest',\n // Inject user auth\n requesttoken: token ?? '',\n });\n};\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders);\nsetHeaders(getRequestToken());\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport camelCase from 'camelcase';\nimport Vue from 'vue';\nexport const defaultBaseTag = {\n userVisible: true,\n userAssignable: true,\n canAssign: true,\n};\nexport const parseTags = (tags) => {\n return tags.map(({ props }) => Object.fromEntries(Object.entries(props)\n .map(([key, value]) => [camelCase(key), camelCase(key) === 'displayName' ? String(value) : value])));\n};\n/**\n * Parse id from `Content-Location` header\n * @param url URL to parse\n */\nexport const parseIdFromLocation = (url) => {\n const queryPos = url.indexOf('?');\n if (queryPos > 0) {\n url = url.substring(0, queryPos);\n }\n const parts = url.split('/');\n let result;\n do {\n result = parts[parts.length - 1];\n parts.pop();\n // note: first result can be empty when there is a trailing slash,\n // so we take the part before that\n } while (!result && parts.length > 0);\n return Number(result);\n};\nexport const formatTag = (initialTag) => {\n if ('name' in initialTag && !('displayName' in initialTag)) {\n return { ...initialTag };\n }\n const tag = { ...initialTag };\n tag.name = tag.displayName;\n delete tag.displayName;\n return tag;\n};\nexport const getNodeSystemTags = function (node) {\n const tags = node.attributes?.['system-tags']?.['system-tag'];\n if (tags === undefined) {\n return [];\n }\n return [tags].flat();\n};\nexport const setNodeSystemTags = function (node, tags) {\n Vue.set(node.attributes, 'system-tags', {\n 'system-tag': tags,\n });\n};\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport Color from 'color';\n/**\n * Is the current theme dark?\n */\nexport function isDarkModeEnabled() {\n const darkModePreference = window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches;\n const darkModeSetting = document.body.getAttribute('data-themes')?.includes('dark');\n return darkModeSetting || darkModePreference || false;\n}\n/**\n * Is the current theme high contrast?\n */\nexport function isHighContrastModeEnabled() {\n const highContrastPreference = window?.matchMedia?.('(forced-colors: active)')?.matches;\n const highContrastSetting = document.body.getAttribute('data-themes')?.includes('highcontrast');\n return highContrastSetting || highContrastPreference || false;\n}\n/**\n * Should we invert the text on this background color?\n * @param color RGB color value as a hex string\n * @return boolean\n */\nexport function invertTextColor(color) {\n return colorContrast(color, '#ffffff') < 4.5;\n}\n/**\n * Is this color too bright?\n * @param color RGB color value as a hex string\n * @return boolean\n */\nexport function isBrightColor(color) {\n return calculateLuma(color) > 0.6;\n}\n/**\n * Get color for on-page elements\n * theme color by default, grey if theme color is too bright.\n * @param color the color to contrast against, e.g. #ffffff\n * @param backgroundColor the background color to contrast against, e.g. #000000\n */\nexport function elementColor(color, backgroundColor) {\n const brightBackground = isBrightColor(backgroundColor);\n const blurredBackground = mix(backgroundColor, brightBackground ? color : '#ffffff', 66);\n let contrast = colorContrast(color, blurredBackground);\n const minContrast = isHighContrastModeEnabled() ? 5.6 : 3.2;\n let iteration = 0;\n let result = color;\n const epsilon = (brightBackground ? -100 : 100) / 255;\n while (contrast < minContrast && iteration++ < 100) {\n const hsl = hexToHSL(result);\n const l = Math.max(0, Math.min(255, hsl.l + epsilon));\n result = hslToHex({ h: hsl.h, s: hsl.s, l });\n contrast = colorContrast(result, blurredBackground);\n }\n return result;\n}\n/**\n * Get color for on-page text:\n * black if background is bright, white if background is dark.\n * @param color1 the color to contrast against, e.g. #ffffff\n * @param color2 the background color to contrast against, e.g. #000000\n * @param factor the factor to mix the colors between -100 and 100, e.g. 66\n */\nexport function mix(color1, color2, factor) {\n if (factor < -100 || factor > 100) {\n throw new RangeError('Factor must be between -100 and 100');\n }\n return new Color(color2).mix(new Color(color1), (factor + 100) / 200).hex();\n}\n/**\n * Lighten a color by a factor\n * @param color the color to lighten, e.g. #000000\n * @param factor the factor to lighten the color by between -100 and 100, e.g. -41\n */\nexport function lighten(color, factor) {\n if (factor < -100 || factor > 100) {\n throw new RangeError('Factor must be between -100 and 100');\n }\n return new Color(color).lighten((factor + 100) / 200).hex();\n}\n/**\n * Darken a color by a factor\n * @param color the color to darken, e.g. #ffffff\n * @param factor the factor to darken the color by between -100 and 100, e.g. 32\n */\nexport function darken(color, factor) {\n if (factor < -100 || factor > 100) {\n throw new RangeError('Factor must be between -100 and 100');\n }\n return new Color(color).darken((factor + 100) / 200).hex();\n}\n/**\n * Calculate the luminance of a color\n * @param color the color to calculate the luminance of, e.g. #ffffff\n */\nexport function calculateLuminance(color) {\n return hexToHSL(color).l;\n}\n/**\n * Calculate the luma of a color\n * @param color the color to calculate the luma of, e.g. #ffffff\n */\nexport function calculateLuma(color) {\n const rgb = hexToRGB(color).map((value) => {\n value /= 255;\n return value <= 0.03928\n ? value / 12.92\n : Math.pow((value + 0.055) / 1.055, 2.4);\n });\n const [red, green, blue] = rgb;\n return 0.2126 * red + 0.7152 * green + 0.0722 * blue;\n}\n/**\n * Calculate the contrast between two colors\n * @param color1 the first color to calculate the contrast of, e.g. #ffffff\n * @param color2 the second color to calculate the contrast of, e.g. #000000\n */\nexport function colorContrast(color1, color2) {\n const luminance1 = calculateLuma(color1) + 0.05;\n const luminance2 = calculateLuma(color2) + 0.05;\n return Math.max(luminance1, luminance2) / Math.min(luminance1, luminance2);\n}\n/**\n * Convert hex color to RGB\n * @param color RGB color value as a hex string\n */\nexport function hexToRGB(color) {\n return new Color(color).rgb().array();\n}\n/**\n * Convert RGB color to hex\n * @param color RGB color value as a hex string\n */\nexport function hexToHSL(color) {\n const hsl = new Color(color).hsl();\n return { h: hsl.color[0], s: hsl.color[1], l: hsl.color[2] };\n}\n/**\n * Convert HSL color to hex\n * @param hsl HSL color value as an object\n * @param hsl.h hue\n * @param hsl.s saturation\n * @param hsl.l lightness\n */\nexport function hslToHex(hsl) {\n return new Color(hsl).hex();\n}\n/**\n * Convert RGB color to hex\n * @param r red\n * @param g green\n * @param b blue\n */\nexport function rgbToHex(r, g, b) {\n const hex = ((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1);\n return `#${hex}`;\n}\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\nvar hasOwnProperty = Object.hasOwnProperty;\n\nvar reverseNames = Object.create(null);\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (hasOwnProperty.call(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar keyword = /^(\\w+)$/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!hasOwnProperty.call(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = Math.round(num).toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","const colorString = require('color-string');\nconst convert = require('color-convert');\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...args) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (args.length > 0) {\n\t\t\treturn new Color(args, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...args) {\n\t\tlet color = args[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(args, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nmodule.exports = Color;\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, `.files-list__system-tags{--min-size: 32px;display:none;justify-content:center;align-items:center;min-width:calc(var(--min-size)*2);max-width:300px}.files-list__system-tag{padding:5px 10px;border:1px solid;border-radius:var(--border-radius-pill);border-color:var(--color-border);color:var(--color-text-maxcontrast);height:var(--min-size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:20px;text-align:center}.files-list__system-tag--more{overflow:visible;text-overflow:initial}.files-list__system-tag+.files-list__system-tag{margin-inline-start:5px}.files-list__system-tag[data-systemtag-color]{border-color:var(--systemtag-color);color:var(--systemtag-color);border-width:2px;line-height:18px}@media(min-width: 512px){.files-list__system-tags{display:flex}}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/systemtags/src/css/fileEntryInlineSystemTags.scss\"],\"names\":[],\"mappings\":\"AAKA,yBACC,gBAAA,CACA,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCAAA,CACA,eAAA,CAGD,wBACC,gBAAA,CACA,gBAAA,CACA,uCAAA,CACA,gCAAA,CACA,mCAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,gBAAA,CACA,iBAAA,CAEA,8BACC,gBAAA,CACA,qBAAA,CAID,gDACC,uBAAA,CAID,8CACC,mCAAA,CACA,4BAAA,CACA,gBAAA,CACA,gBAAA,CAIF,yBACC,yBACC,YAAA,CAAA\",\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","import { o as logger } from \"./chunks/dav-Co9y-hkg.mjs\";\nimport { q, F, s, N, t, P, c, l, m, n, a, g, p, b, r, d, h, f, k, j, e, i } from \"./chunks/dav-Co9y-hkg.mjs\";\nimport { getCapabilities } from \"@nextcloud/capabilities\";\nimport { extname, basename } from \"path\";\nimport { getCanonicalLocale, getLanguage } from \"@nextcloud/l10n\";\nimport { TypedEventTarget } from \"typescript-event-target\";\nvar NewMenuEntryCategory = /* @__PURE__ */ ((NewMenuEntryCategory2) => {\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"UploadFromDevice\"] = 0] = \"UploadFromDevice\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"CreateNew\"] = 1] = \"CreateNew\";\n NewMenuEntryCategory2[NewMenuEntryCategory2[\"Other\"] = 2] = \"Other\";\n return NewMenuEntryCategory2;\n})(NewMenuEntryCategory || {});\nclass NewFileMenu {\n _entries = [];\n registerEntry(entry) {\n this.validateEntry(entry);\n entry.category = entry.category ?? 1;\n this._entries.push(entry);\n }\n unregisterEntry(entry) {\n const entryIndex = typeof entry === \"string\" ? this.getEntryIndex(entry) : this.getEntryIndex(entry.id);\n if (entryIndex === -1) {\n logger.warn(\"Entry not found, nothing removed\", { entry, entries: this.getEntries() });\n return;\n }\n this._entries.splice(entryIndex, 1);\n }\n /**\n * Get the list of registered entries\n *\n * @param {Folder} context the creation context. Usually the current folder\n */\n getEntries(context) {\n if (context) {\n return this._entries.filter((entry) => typeof entry.enabled === \"function\" ? entry.enabled(context) : true);\n }\n return this._entries;\n }\n getEntryIndex(id) {\n return this._entries.findIndex((entry) => entry.id === id);\n }\n validateEntry(entry) {\n if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass) || !entry.handler) {\n throw new Error(\"Invalid entry\");\n }\n if (typeof entry.id !== \"string\" || typeof entry.displayName !== \"string\") {\n throw new Error(\"Invalid id or displayName property\");\n }\n if (entry.iconClass && typeof entry.iconClass !== \"string\" || entry.iconSvgInline && typeof entry.iconSvgInline !== \"string\") {\n throw new Error(\"Invalid icon provided\");\n }\n if (entry.enabled !== void 0 && typeof entry.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (typeof entry.handler !== \"function\") {\n throw new Error(\"Invalid handler property\");\n }\n if (\"order\" in entry && typeof entry.order !== \"number\") {\n throw new Error(\"Invalid order property\");\n }\n if (this.getEntryIndex(entry.id) !== -1) {\n throw new Error(\"Duplicate entry\");\n }\n }\n}\nconst getNewFileMenu = function() {\n if (typeof window._nc_newfilemenu === \"undefined\") {\n window._nc_newfilemenu = new NewFileMenu();\n logger.debug(\"NewFileMenu initialized\");\n }\n return window._nc_newfilemenu;\n};\nvar DefaultType = /* @__PURE__ */ ((DefaultType2) => {\n DefaultType2[\"DEFAULT\"] = \"default\";\n DefaultType2[\"HIDDEN\"] = \"hidden\";\n return DefaultType2;\n})(DefaultType || {});\nclass FileAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get title() {\n return this._action.title;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n get execBatch() {\n return this._action.execBatch;\n }\n get order() {\n return this._action.order;\n }\n get parent() {\n return this._action.parent;\n }\n get default() {\n return this._action.default;\n }\n get destructive() {\n return this._action.destructive;\n }\n get inline() {\n return this._action.inline;\n }\n get renderInline() {\n return this._action.renderInline;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"title\" in action && typeof action.title !== \"function\") {\n throw new Error(\"Invalid title function\");\n }\n if (!action.iconSvgInline || typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (\"execBatch\" in action && typeof action.execBatch !== \"function\") {\n throw new Error(\"Invalid execBatch function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (action.destructive !== void 0 && typeof action.destructive !== \"boolean\") {\n throw new Error(\"Invalid destructive flag\");\n }\n if (\"parent\" in action && typeof action.parent !== \"string\") {\n throw new Error(\"Invalid parent\");\n }\n if (action.default && !Object.values(DefaultType).includes(action.default)) {\n throw new Error(\"Invalid default\");\n }\n if (\"inline\" in action && typeof action.inline !== \"function\") {\n throw new Error(\"Invalid inline function\");\n }\n if (\"renderInline\" in action && typeof action.renderInline !== \"function\") {\n throw new Error(\"Invalid renderInline function\");\n }\n }\n}\nconst registerFileAction = function(action) {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n if (window._nc_fileactions.find((search) => search.id === action.id)) {\n logger.error(`FileAction ${action.id} already registered`, { action });\n return;\n }\n window._nc_fileactions.push(action);\n};\nconst getFileActions = function() {\n if (typeof window._nc_fileactions === \"undefined\") {\n window._nc_fileactions = [];\n logger.debug(\"FileActions initialized\");\n }\n return window._nc_fileactions;\n};\nclass FileListAction {\n _action;\n constructor(action) {\n this.validateAction(action);\n this._action = action;\n }\n get id() {\n return this._action.id;\n }\n get displayName() {\n return this._action.displayName;\n }\n get iconSvgInline() {\n return this._action.iconSvgInline;\n }\n get order() {\n return this._action.order;\n }\n get enabled() {\n return this._action.enabled;\n }\n get exec() {\n return this._action.exec;\n }\n validateAction(action) {\n if (!action.id || typeof action.id !== \"string\") {\n throw new Error(\"Invalid id\");\n }\n if (!action.displayName || typeof action.displayName !== \"function\") {\n throw new Error(\"Invalid displayName function\");\n }\n if (\"iconSvgInline\" in action && typeof action.iconSvgInline !== \"function\") {\n throw new Error(\"Invalid iconSvgInline function\");\n }\n if (\"order\" in action && typeof action.order !== \"number\") {\n throw new Error(\"Invalid order\");\n }\n if (\"enabled\" in action && typeof action.enabled !== \"function\") {\n throw new Error(\"Invalid enabled function\");\n }\n if (!action.exec || typeof action.exec !== \"function\") {\n throw new Error(\"Invalid exec function\");\n }\n }\n}\nconst registerFileListAction = (action) => {\n if (typeof window._nc_filelistactions === \"undefined\") {\n window._nc_filelistactions = [];\n }\n if (window._nc_filelistactions.find((listAction) => listAction.id === action.id)) {\n logger.error(`FileListAction with id \"${action.id}\" is already registered`, { action });\n return;\n }\n window._nc_filelistactions.push(action);\n};\nconst getFileListActions = () => {\n if (typeof window._nc_filelistactions === \"undefined\") {\n window._nc_filelistactions = [];\n }\n return window._nc_filelistactions;\n};\nclass Header {\n _header;\n constructor(header) {\n this.validateHeader(header);\n this._header = header;\n }\n get id() {\n return this._header.id;\n }\n get order() {\n return this._header.order;\n }\n get enabled() {\n return this._header.enabled;\n }\n get render() {\n return this._header.render;\n }\n get updated() {\n return this._header.updated;\n }\n validateHeader(header) {\n if (!header.id || !header.render || !header.updated) {\n throw new Error(\"Invalid header: id, render and updated are required\");\n }\n if (typeof header.id !== \"string\") {\n throw new Error(\"Invalid id property\");\n }\n if (header.enabled !== void 0 && typeof header.enabled !== \"function\") {\n throw new Error(\"Invalid enabled property\");\n }\n if (header.render && typeof header.render !== \"function\") {\n throw new Error(\"Invalid render property\");\n }\n if (header.updated && typeof header.updated !== \"function\") {\n throw new Error(\"Invalid updated property\");\n }\n }\n}\nconst registerFileListHeaders = function(header) {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n if (window._nc_filelistheader.find((search) => search.id === header.id)) {\n logger.error(`Header ${header.id} already registered`, { header });\n return;\n }\n window._nc_filelistheader.push(header);\n};\nconst getFileListHeaders = function() {\n if (typeof window._nc_filelistheader === \"undefined\") {\n window._nc_filelistheader = [];\n logger.debug(\"FileListHeaders initialized\");\n }\n return window._nc_filelistheader;\n};\nvar InvalidFilenameErrorReason = /* @__PURE__ */ ((InvalidFilenameErrorReason2) => {\n InvalidFilenameErrorReason2[\"ReservedName\"] = \"reserved name\";\n InvalidFilenameErrorReason2[\"Character\"] = \"character\";\n InvalidFilenameErrorReason2[\"Extension\"] = \"extension\";\n return InvalidFilenameErrorReason2;\n})(InvalidFilenameErrorReason || {});\nclass InvalidFilenameError extends Error {\n constructor(options) {\n super(`Invalid ${options.reason} '${options.segment}' in filename '${options.filename}'`, { cause: options });\n }\n /**\n * The filename that was validated\n */\n get filename() {\n return this.cause.filename;\n }\n /**\n * Reason why the validation failed\n */\n get reason() {\n return this.cause.reason;\n }\n /**\n * Part of the filename that caused this error\n */\n get segment() {\n return this.cause.segment;\n }\n}\nfunction validateFilename(filename) {\n const capabilities = getCapabilities().files;\n const forbiddenCharacters = capabilities.forbidden_filename_characters ?? window._oc_config?.forbidden_filenames_characters ?? [\"/\", \"\\\\\"];\n for (const character of forbiddenCharacters) {\n if (filename.includes(character)) {\n throw new InvalidFilenameError({ segment: character, reason: \"character\", filename });\n }\n }\n filename = filename.toLocaleLowerCase();\n const forbiddenFilenames = capabilities.forbidden_filenames ?? [\".htaccess\"];\n if (forbiddenFilenames.includes(filename)) {\n throw new InvalidFilenameError({\n filename,\n segment: filename,\n reason: \"reserved name\"\n /* ReservedName */\n });\n }\n const endOfBasename = filename.indexOf(\".\", 1);\n const basename2 = filename.substring(0, endOfBasename === -1 ? void 0 : endOfBasename);\n const forbiddenFilenameBasenames = capabilities.forbidden_filename_basenames ?? [];\n if (forbiddenFilenameBasenames.includes(basename2)) {\n throw new InvalidFilenameError({\n filename,\n segment: basename2,\n reason: \"reserved name\"\n /* ReservedName */\n });\n }\n const forbiddenFilenameExtensions = capabilities.forbidden_filename_extensions ?? [\".part\", \".filepart\"];\n for (const extension of forbiddenFilenameExtensions) {\n if (filename.length > extension.length && filename.endsWith(extension)) {\n throw new InvalidFilenameError({ segment: extension, reason: \"extension\", filename });\n }\n }\n}\nfunction isFilenameValid(filename) {\n try {\n validateFilename(filename);\n return true;\n } catch (error) {\n if (error instanceof InvalidFilenameError) {\n return false;\n }\n throw error;\n }\n}\nfunction getUniqueName(name, otherNames, options) {\n const opts = {\n suffix: (n2) => `(${n2})`,\n ignoreFileExtension: false,\n ...options\n };\n let newName = name;\n let i2 = 1;\n while (otherNames.includes(newName)) {\n const ext = opts.ignoreFileExtension ? \"\" : extname(name);\n const base = basename(name, ext);\n newName = `${base} ${opts.suffix(i2++)}${ext}`;\n }\n return newName;\n}\nconst humanList = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\"];\nconst humanListBinary = [\"B\", \"KiB\", \"MiB\", \"GiB\", \"TiB\", \"PiB\"];\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false, base1000 = false) {\n binaryPrefixes = binaryPrefixes && !base1000;\n if (typeof size === \"string\") {\n size = Number(size);\n }\n let order = size > 0 ? Math.floor(Math.log(size) / Math.log(base1000 ? 1e3 : 1024)) : 0;\n order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n let relativeSize = (size / Math.pow(base1000 ? 1e3 : 1024, order)).toFixed(1);\n if (skipSmallSizes === true && order === 0) {\n return (relativeSize !== \"0.0\" ? \"< 1 \" : \"0 \") + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n }\n if (order < 2) {\n relativeSize = parseFloat(relativeSize).toFixed(0);\n } else {\n relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n }\n return relativeSize + \" \" + readableFormat;\n}\nfunction parseFileSize(value, forceBinary = false) {\n try {\n value = `${value}`.toLocaleLowerCase().replaceAll(/\\s+/g, \"\").replaceAll(\",\", \".\");\n } catch (e2) {\n return null;\n }\n const match = value.match(/^([0-9]*(\\.[0-9]*)?)([kmgtp]?)(i?)b?$/);\n if (match === null || match[1] === \".\" || match[1] === \"\") {\n return null;\n }\n const bytesArray = {\n \"\": 0,\n k: 1,\n m: 2,\n g: 3,\n t: 4,\n p: 5,\n e: 6\n };\n const decimalString = `${match[1]}`;\n const base = match[4] === \"i\" || forceBinary ? 1024 : 1e3;\n return Math.round(Number.parseFloat(decimalString) * base ** bytesArray[match[3]]);\n}\nfunction stringify(value) {\n if (value instanceof Date) {\n return value.toISOString();\n }\n return String(value);\n}\nfunction orderBy(collection, identifiers2, orders) {\n identifiers2 = identifiers2 ?? [(value) => value];\n orders = orders ?? [];\n const sorting = identifiers2.map((_, index) => (orders[index] ?? \"asc\") === \"asc\" ? 1 : -1);\n const collator = Intl.Collator(\n [getLanguage(), getCanonicalLocale()],\n {\n // handle 10 as ten and not as one-zero\n numeric: true,\n usage: \"sort\"\n }\n );\n return [...collection].sort((a2, b2) => {\n for (const [index, identifier] of identifiers2.entries()) {\n const value = collator.compare(stringify(identifier(a2)), stringify(identifier(b2)));\n if (value !== 0) {\n return value * sorting[index];\n }\n }\n return 0;\n });\n}\nvar FilesSortingMode = /* @__PURE__ */ ((FilesSortingMode2) => {\n FilesSortingMode2[\"Name\"] = \"basename\";\n FilesSortingMode2[\"Modified\"] = \"mtime\";\n FilesSortingMode2[\"Size\"] = \"size\";\n return FilesSortingMode2;\n})(FilesSortingMode || {});\nfunction sortNodes(nodes, options = {}) {\n const sortingOptions = {\n // Default to sort by name\n sortingMode: \"basename\",\n // Default to sort ascending\n sortingOrder: \"asc\",\n ...options\n };\n const basename2 = (name) => name.lastIndexOf(\".\") > 0 ? name.slice(0, name.lastIndexOf(\".\")) : name;\n const identifiers2 = [\n // 1: Sort favorites first if enabled\n ...sortingOptions.sortFavoritesFirst ? [(v) => v.attributes?.favorite !== 1] : [],\n // 2: Sort folders first if sorting by name\n ...sortingOptions.sortFoldersFirst ? [(v) => v.type !== \"folder\"] : [],\n // 3: Use sorting mode if NOT basename (to be able to use display name too)\n ...sortingOptions.sortingMode !== \"basename\" ? [(v) => v[sortingOptions.sortingMode]] : [],\n // 4: Use display name if available, fallback to name\n (v) => basename2(v.displayname || v.attributes?.displayname || v.basename),\n // 5: Finally, use basename if all previous sorting methods failed\n (v) => v.basename\n ];\n const orders = [\n // (for 1): always sort favorites before normal files\n ...sortingOptions.sortFavoritesFirst ? [\"asc\"] : [],\n // (for 2): always sort folders before files\n ...sortingOptions.sortFoldersFirst ? [\"asc\"] : [],\n // (for 3): Reverse if sorting by mtime as mtime higher means edited more recent -> lower\n ...sortingOptions.sortingMode === \"mtime\" ? [sortingOptions.sortingOrder === \"asc\" ? \"desc\" : \"asc\"] : [],\n // (also for 3 so make sure not to conflict with 2 and 3)\n ...sortingOptions.sortingMode !== \"mtime\" && sortingOptions.sortingMode !== \"basename\" ? [sortingOptions.sortingOrder] : [],\n // for 4: use configured sorting direction\n sortingOptions.sortingOrder,\n // for 5: use configured sorting direction\n sortingOptions.sortingOrder\n ];\n return orderBy(nodes, identifiers2, orders);\n}\nclass Navigation extends TypedEventTarget {\n _views = [];\n _currentView = null;\n /**\n * Register a new view on the navigation\n * @param view The view to register\n * @throws `Error` is thrown if a view with the same id is already registered\n */\n register(view) {\n if (this._views.find((search) => search.id === view.id)) {\n throw new Error(`View id ${view.id} is already registered`);\n }\n this._views.push(view);\n this.dispatchTypedEvent(\"update\", new CustomEvent(\"update\"));\n }\n /**\n * Remove a registered view\n * @param id The id of the view to remove\n */\n remove(id) {\n const index = this._views.findIndex((view) => view.id === id);\n if (index !== -1) {\n this._views.splice(index, 1);\n this.dispatchTypedEvent(\"update\", new CustomEvent(\"update\"));\n }\n }\n /**\n * Set the currently active view\n * @fires UpdateActiveViewEvent\n * @param view New active view\n */\n setActive(view) {\n this._currentView = view;\n const event = new CustomEvent(\"updateActive\", { detail: view });\n this.dispatchTypedEvent(\"updateActive\", event);\n }\n /**\n * The currently active files view\n */\n get active() {\n return this._currentView;\n }\n /**\n * All registered views\n */\n get views() {\n return this._views;\n }\n}\nconst getNavigation = function() {\n if (typeof window._nc_navigation === \"undefined\") {\n window._nc_navigation = new Navigation();\n logger.debug(\"Navigation service initialized\");\n }\n return window._nc_navigation;\n};\nclass Column {\n _column;\n constructor(column) {\n isValidColumn(column);\n this._column = column;\n }\n get id() {\n return this._column.id;\n }\n get title() {\n return this._column.title;\n }\n get render() {\n return this._column.render;\n }\n get sort() {\n return this._column.sort;\n }\n get summary() {\n return this._column.summary;\n }\n}\nconst isValidColumn = function(column) {\n if (!column.id || typeof column.id !== \"string\") {\n throw new Error(\"A column id is required\");\n }\n if (!column.title || typeof column.title !== \"string\") {\n throw new Error(\"A column title is required\");\n }\n if (!column.render || typeof column.render !== \"function\") {\n throw new Error(\"A render function is required\");\n }\n if (column.sort && typeof column.sort !== \"function\") {\n throw new Error(\"Column sortFunction must be a function\");\n }\n if (column.summary && typeof column.summary !== \"function\") {\n throw new Error(\"Column summary must be a function\");\n }\n return true;\n};\nfunction getDefaultExportFromCjs(x) {\n return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, \"default\") ? x[\"default\"] : x;\n}\nvar validator$2 = {};\nvar util$3 = {};\n(function(exports) {\n const nameStartChar = \":A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n const nameChar = nameStartChar + \"\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n const nameRegexp = \"[\" + nameStartChar + \"][\" + nameChar + \"]*\";\n const regexName = new RegExp(\"^\" + nameRegexp + \"$\");\n const getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n };\n const isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === \"undefined\");\n };\n exports.isExist = function(v) {\n return typeof v !== \"undefined\";\n };\n exports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n };\n exports.merge = function(target, a2, arrayMode) {\n if (a2) {\n const keys = Object.keys(a2);\n const len = keys.length;\n for (let i2 = 0; i2 < len; i2++) {\n if (arrayMode === \"strict\") {\n target[keys[i2]] = [a2[keys[i2]]];\n } else {\n target[keys[i2]] = a2[keys[i2]];\n }\n }\n }\n };\n exports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return \"\";\n }\n };\n exports.isName = isName;\n exports.getAllMatches = getAllMatches;\n exports.nameRegexp = nameRegexp;\n})(util$3);\nconst util$2 = util$3;\nconst defaultOptions$2 = {\n allowBooleanAttributes: false,\n //A tag can have attributes without any value\n unpairedTags: []\n};\nvalidator$2.validate = function(xmlData, options) {\n options = Object.assign({}, defaultOptions$2, options);\n const tags = [];\n let tagFound = false;\n let reachedRoot = false;\n if (xmlData[0] === \"\\uFEFF\") {\n xmlData = xmlData.substr(1);\n }\n for (let i2 = 0; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"<\" && xmlData[i2 + 1] === \"?\") {\n i2 += 2;\n i2 = readPI(xmlData, i2);\n if (i2.err) return i2;\n } else if (xmlData[i2] === \"<\") {\n let tagStartPos = i2;\n i2++;\n if (xmlData[i2] === \"!\") {\n i2 = readCommentAndCDATA(xmlData, i2);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i2] === \"/\") {\n closingTag = true;\n i2++;\n }\n let tagName = \"\";\n for (; i2 < xmlData.length && xmlData[i2] !== \">\" && xmlData[i2] !== \" \" && xmlData[i2] !== \"\t\" && xmlData[i2] !== \"\\n\" && xmlData[i2] !== \"\\r\"; i2++) {\n tagName += xmlData[i2];\n }\n tagName = tagName.trim();\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substring(0, tagName.length - 1);\n i2--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\" + tagName + \"' is an invalid name.\";\n }\n return getErrorObject(\"InvalidTag\", msg, getLineNumberForPosition(xmlData, i2));\n }\n const result = readAttributeStr(xmlData, i2);\n if (result === false) {\n return getErrorObject(\"InvalidAttr\", \"Attributes for '\" + tagName + \"' have open quote.\", getLineNumberForPosition(xmlData, i2));\n }\n let attrStr = result.value;\n i2 = result.index;\n if (attrStr[attrStr.length - 1] === \"/\") {\n const attrStrStart = i2 - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n } else {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i2));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject(\"InvalidTag\", \"Closing tag '\" + tagName + \"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject(\n \"InvalidTag\",\n \"Expected closing tag '\" + otg.tagName + \"' (opened in line \" + openPos.line + \", col \" + openPos.col + \") instead of closing tag '\" + tagName + \"'.\",\n getLineNumberForPosition(xmlData, tagStartPos)\n );\n }\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i2 - attrStr.length + isValid.err.line));\n }\n if (reachedRoot === true) {\n return getErrorObject(\"InvalidXml\", \"Multiple possible root nodes found.\", getLineNumberForPosition(xmlData, i2));\n } else if (options.unpairedTags.indexOf(tagName) !== -1) ;\n else {\n tags.push({ tagName, tagStartPos });\n }\n tagFound = true;\n }\n for (i2++; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"<\") {\n if (xmlData[i2 + 1] === \"!\") {\n i2++;\n i2 = readCommentAndCDATA(xmlData, i2);\n continue;\n } else if (xmlData[i2 + 1] === \"?\") {\n i2 = readPI(xmlData, ++i2);\n if (i2.err) return i2;\n } else {\n break;\n }\n } else if (xmlData[i2] === \"&\") {\n const afterAmp = validateAmpersand(xmlData, i2);\n if (afterAmp == -1)\n return getErrorObject(\"InvalidChar\", \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i2));\n i2 = afterAmp;\n } else {\n if (reachedRoot === true && !isWhiteSpace(xmlData[i2])) {\n return getErrorObject(\"InvalidXml\", \"Extra text at the end\", getLineNumberForPosition(xmlData, i2));\n }\n }\n }\n if (xmlData[i2] === \"<\") {\n i2--;\n }\n }\n } else {\n if (isWhiteSpace(xmlData[i2])) {\n continue;\n }\n return getErrorObject(\"InvalidChar\", \"char '\" + xmlData[i2] + \"' is not expected.\", getLineNumberForPosition(xmlData, i2));\n }\n }\n if (!tagFound) {\n return getErrorObject(\"InvalidXml\", \"Start tag expected.\", 1);\n } else if (tags.length == 1) {\n return getErrorObject(\"InvalidTag\", \"Unclosed tag '\" + tags[0].tagName + \"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n } else if (tags.length > 0) {\n return getErrorObject(\"InvalidXml\", \"Invalid '\" + JSON.stringify(tags.map((t3) => t3.tagName), null, 4).replace(/\\r?\\n/g, \"\") + \"' found.\", { line: 1, col: 1 });\n }\n return true;\n};\nfunction isWhiteSpace(char) {\n return char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\";\n}\nfunction readPI(xmlData, i2) {\n const start = i2;\n for (; i2 < xmlData.length; i2++) {\n if (xmlData[i2] == \"?\" || xmlData[i2] == \" \") {\n const tagname = xmlData.substr(start, i2 - start);\n if (i2 > 5 && tagname === \"xml\") {\n return getErrorObject(\"InvalidXml\", \"XML declaration allowed only at the start of the document.\", getLineNumberForPosition(xmlData, i2));\n } else if (xmlData[i2] == \"?\" && xmlData[i2 + 1] == \">\") {\n i2++;\n break;\n } else {\n continue;\n }\n }\n }\n return i2;\n}\nfunction readCommentAndCDATA(xmlData, i2) {\n if (xmlData.length > i2 + 5 && xmlData[i2 + 1] === \"-\" && xmlData[i2 + 2] === \"-\") {\n for (i2 += 3; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"-\" && xmlData[i2 + 1] === \"-\" && xmlData[i2 + 2] === \">\") {\n i2 += 2;\n break;\n }\n }\n } else if (xmlData.length > i2 + 8 && xmlData[i2 + 1] === \"D\" && xmlData[i2 + 2] === \"O\" && xmlData[i2 + 3] === \"C\" && xmlData[i2 + 4] === \"T\" && xmlData[i2 + 5] === \"Y\" && xmlData[i2 + 6] === \"P\" && xmlData[i2 + 7] === \"E\") {\n let angleBracketsCount = 1;\n for (i2 += 8; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"<\") {\n angleBracketsCount++;\n } else if (xmlData[i2] === \">\") {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (xmlData.length > i2 + 9 && xmlData[i2 + 1] === \"[\" && xmlData[i2 + 2] === \"C\" && xmlData[i2 + 3] === \"D\" && xmlData[i2 + 4] === \"A\" && xmlData[i2 + 5] === \"T\" && xmlData[i2 + 6] === \"A\" && xmlData[i2 + 7] === \"[\") {\n for (i2 += 8; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"]\" && xmlData[i2 + 1] === \"]\" && xmlData[i2 + 2] === \">\") {\n i2 += 2;\n break;\n }\n }\n }\n return i2;\n}\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\nfunction readAttributeStr(xmlData, i2) {\n let attrStr = \"\";\n let startChar = \"\";\n let tagClosed = false;\n for (; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === doubleQuote || xmlData[i2] === singleQuote) {\n if (startChar === \"\") {\n startChar = xmlData[i2];\n } else if (startChar !== xmlData[i2]) ;\n else {\n startChar = \"\";\n }\n } else if (xmlData[i2] === \">\") {\n if (startChar === \"\") {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i2];\n }\n if (startChar !== \"\") {\n return false;\n }\n return {\n value: attrStr,\n index: i2,\n tagClosed\n };\n}\nconst validAttrStrRegxp = new RegExp(`(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*(['\"])(([\\\\s\\\\S])*?)\\\\5)?`, \"g\");\nfunction validateAttributeString(attrStr, options) {\n const matches = util$2.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n for (let i2 = 0; i2 < matches.length; i2++) {\n if (matches[i2][1].length === 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i2][2] + \"' has no space in starting.\", getPositionFromMatch(matches[i2]));\n } else if (matches[i2][3] !== void 0 && matches[i2][4] === void 0) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + matches[i2][2] + \"' is without value.\", getPositionFromMatch(matches[i2]));\n } else if (matches[i2][3] === void 0 && !options.allowBooleanAttributes) {\n return getErrorObject(\"InvalidAttr\", \"boolean attribute '\" + matches[i2][2] + \"' is not allowed.\", getPositionFromMatch(matches[i2]));\n }\n const attrName = matches[i2][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is an invalid name.\", getPositionFromMatch(matches[i2]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n attrNames[attrName] = 1;\n } else {\n return getErrorObject(\"InvalidAttr\", \"Attribute '\" + attrName + \"' is repeated.\", getPositionFromMatch(matches[i2]));\n }\n }\n return true;\n}\nfunction validateNumberAmpersand(xmlData, i2) {\n let re2 = /\\d/;\n if (xmlData[i2] === \"x\") {\n i2++;\n re2 = /[\\da-fA-F]/;\n }\n for (; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \";\")\n return i2;\n if (!xmlData[i2].match(re2))\n break;\n }\n return -1;\n}\nfunction validateAmpersand(xmlData, i2) {\n i2++;\n if (xmlData[i2] === \";\")\n return -1;\n if (xmlData[i2] === \"#\") {\n i2++;\n return validateNumberAmpersand(xmlData, i2);\n }\n let count = 0;\n for (; i2 < xmlData.length; i2++, count++) {\n if (xmlData[i2].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i2] === \";\")\n break;\n return -1;\n }\n return i2;\n}\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col\n }\n };\n}\nfunction validateAttrName(attrName) {\n return util$2.isName(attrName);\n}\nfunction validateTagName(tagname) {\n return util$2.isName(tagname);\n}\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\nvar OptionsBuilder = {};\nconst defaultOptions$1 = {\n preserveOrder: false,\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n removeNSPrefix: false,\n // remove NS from tag name or attribute name if true\n allowBooleanAttributes: false,\n //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseTagValue: true,\n parseAttributeValue: false,\n trimValues: true,\n //Trim string values of tag and attributes\n cdataPropName: false,\n numberParseOptions: {\n hex: true,\n leadingZeros: true,\n eNotation: true\n },\n tagValueProcessor: function(tagName, val2) {\n return val2;\n },\n attributeValueProcessor: function(attrName, val2) {\n return val2;\n },\n stopNodes: [],\n //nested tags will not be parsed even for errors\n alwaysCreateTextNode: false,\n isArray: () => false,\n commentPropName: false,\n unpairedTags: [],\n processEntities: true,\n htmlEntities: false,\n ignoreDeclaration: false,\n ignorePiTags: false,\n transformTagName: false,\n transformAttributeName: false,\n updateTag: function(tagName, jPath, attrs) {\n return tagName;\n }\n // skipEmptyListItem: false\n};\nconst buildOptions$1 = function(options) {\n return Object.assign({}, defaultOptions$1, options);\n};\nOptionsBuilder.buildOptions = buildOptions$1;\nOptionsBuilder.defaultOptions = defaultOptions$1;\nclass XmlNode {\n constructor(tagname) {\n this.tagname = tagname;\n this.child = [];\n this[\":@\"] = {};\n }\n add(key, val2) {\n if (key === \"__proto__\") key = \"#__proto__\";\n this.child.push({ [key]: val2 });\n }\n addChild(node) {\n if (node.tagname === \"__proto__\") node.tagname = \"#__proto__\";\n if (node[\":@\"] && Object.keys(node[\":@\"]).length > 0) {\n this.child.push({ [node.tagname]: node.child, [\":@\"]: node[\":@\"] });\n } else {\n this.child.push({ [node.tagname]: node.child });\n }\n }\n}\nvar xmlNode$1 = XmlNode;\nconst util$1 = util$3;\nfunction readDocType$1(xmlData, i2) {\n const entities = {};\n if (xmlData[i2 + 3] === \"O\" && xmlData[i2 + 4] === \"C\" && xmlData[i2 + 5] === \"T\" && xmlData[i2 + 6] === \"Y\" && xmlData[i2 + 7] === \"P\" && xmlData[i2 + 8] === \"E\") {\n i2 = i2 + 9;\n let angleBracketsCount = 1;\n let hasBody = false, comment = false;\n let exp = \"\";\n for (; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"<\" && !comment) {\n if (hasBody && isEntity(xmlData, i2)) {\n i2 += 7;\n [entityName, val, i2] = readEntityExp(xmlData, i2 + 1);\n if (val.indexOf(\"&\") === -1)\n entities[validateEntityName(entityName)] = {\n regx: RegExp(`&${entityName};`, \"g\"),\n val\n };\n } else if (hasBody && isElement(xmlData, i2)) i2 += 8;\n else if (hasBody && isAttlist(xmlData, i2)) i2 += 8;\n else if (hasBody && isNotation(xmlData, i2)) i2 += 9;\n else if (isComment) comment = true;\n else throw new Error(\"Invalid DOCTYPE\");\n angleBracketsCount++;\n exp = \"\";\n } else if (xmlData[i2] === \">\") {\n if (comment) {\n if (xmlData[i2 - 1] === \"-\" && xmlData[i2 - 2] === \"-\") {\n comment = false;\n angleBracketsCount--;\n }\n } else {\n angleBracketsCount--;\n }\n if (angleBracketsCount === 0) {\n break;\n }\n } else if (xmlData[i2] === \"[\") {\n hasBody = true;\n } else {\n exp += xmlData[i2];\n }\n }\n if (angleBracketsCount !== 0) {\n throw new Error(`Unclosed DOCTYPE`);\n }\n } else {\n throw new Error(`Invalid Tag instead of DOCTYPE`);\n }\n return { entities, i: i2 };\n}\nfunction readEntityExp(xmlData, i2) {\n let entityName2 = \"\";\n for (; i2 < xmlData.length && (xmlData[i2] !== \"'\" && xmlData[i2] !== '\"'); i2++) {\n entityName2 += xmlData[i2];\n }\n entityName2 = entityName2.trim();\n if (entityName2.indexOf(\" \") !== -1) throw new Error(\"External entites are not supported\");\n const startChar = xmlData[i2++];\n let val2 = \"\";\n for (; i2 < xmlData.length && xmlData[i2] !== startChar; i2++) {\n val2 += xmlData[i2];\n }\n return [entityName2, val2, i2];\n}\nfunction isComment(xmlData, i2) {\n if (xmlData[i2 + 1] === \"!\" && xmlData[i2 + 2] === \"-\" && xmlData[i2 + 3] === \"-\") return true;\n return false;\n}\nfunction isEntity(xmlData, i2) {\n if (xmlData[i2 + 1] === \"!\" && xmlData[i2 + 2] === \"E\" && xmlData[i2 + 3] === \"N\" && xmlData[i2 + 4] === \"T\" && xmlData[i2 + 5] === \"I\" && xmlData[i2 + 6] === \"T\" && xmlData[i2 + 7] === \"Y\") return true;\n return false;\n}\nfunction isElement(xmlData, i2) {\n if (xmlData[i2 + 1] === \"!\" && xmlData[i2 + 2] === \"E\" && xmlData[i2 + 3] === \"L\" && xmlData[i2 + 4] === \"E\" && xmlData[i2 + 5] === \"M\" && xmlData[i2 + 6] === \"E\" && xmlData[i2 + 7] === \"N\" && xmlData[i2 + 8] === \"T\") return true;\n return false;\n}\nfunction isAttlist(xmlData, i2) {\n if (xmlData[i2 + 1] === \"!\" && xmlData[i2 + 2] === \"A\" && xmlData[i2 + 3] === \"T\" && xmlData[i2 + 4] === \"T\" && xmlData[i2 + 5] === \"L\" && xmlData[i2 + 6] === \"I\" && xmlData[i2 + 7] === \"S\" && xmlData[i2 + 8] === \"T\") return true;\n return false;\n}\nfunction isNotation(xmlData, i2) {\n if (xmlData[i2 + 1] === \"!\" && xmlData[i2 + 2] === \"N\" && xmlData[i2 + 3] === \"O\" && xmlData[i2 + 4] === \"T\" && xmlData[i2 + 5] === \"A\" && xmlData[i2 + 6] === \"T\" && xmlData[i2 + 7] === \"I\" && xmlData[i2 + 8] === \"O\" && xmlData[i2 + 9] === \"N\") return true;\n return false;\n}\nfunction validateEntityName(name) {\n if (util$1.isName(name))\n return name;\n else\n throw new Error(`Invalid entity name ${name}`);\n}\nvar DocTypeReader = readDocType$1;\nconst hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\nconst consider = {\n hex: true,\n leadingZeros: true,\n decimalPoint: \".\",\n eNotation: true\n //skipLike: /regex/\n};\nfunction toNumber$1(str, options = {}) {\n options = Object.assign({}, consider, options);\n if (!str || typeof str !== \"string\") return str;\n let trimmedStr = str.trim();\n if (options.skipLike !== void 0 && options.skipLike.test(trimmedStr)) return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n } else {\n const match = numRegex.exec(trimmedStr);\n if (match) {\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]);\n const eNotation = match[4] || match[6];\n if (!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str;\n else if (!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str;\n else {\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if (numStr.search(/[eE]/) !== -1) {\n if (options.eNotation) return num;\n else return str;\n } else if (eNotation) {\n if (options.eNotation) return num;\n else return str;\n } else if (trimmedStr.indexOf(\".\") !== -1) {\n if (numStr === \"0\" && numTrimmedByZeros === \"\") return num;\n else if (numStr === numTrimmedByZeros) return num;\n else if (sign && numStr === \"-\" + numTrimmedByZeros) return num;\n else return str;\n }\n if (leadingZeros) {\n if (numTrimmedByZeros === numStr) return num;\n else if (sign + numTrimmedByZeros === numStr) return num;\n else return str;\n }\n if (trimmedStr === numStr) return num;\n else if (trimmedStr === sign + numStr) return num;\n return str;\n }\n } else {\n return str;\n }\n }\n}\nfunction trimZeros(numStr) {\n if (numStr && numStr.indexOf(\".\") !== -1) {\n numStr = numStr.replace(/0+$/, \"\");\n if (numStr === \".\") numStr = \"0\";\n else if (numStr[0] === \".\") numStr = \"0\" + numStr;\n else if (numStr[numStr.length - 1] === \".\") numStr = numStr.substr(0, numStr.length - 1);\n return numStr;\n }\n return numStr;\n}\nvar strnum = toNumber$1;\nfunction getIgnoreAttributesFn$2(ignoreAttributes2) {\n if (typeof ignoreAttributes2 === \"function\") {\n return ignoreAttributes2;\n }\n if (Array.isArray(ignoreAttributes2)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes2) {\n if (typeof pattern === \"string\" && attrName === pattern) {\n return true;\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true;\n }\n }\n };\n }\n return () => false;\n}\nvar ignoreAttributes = getIgnoreAttributesFn$2;\nconst util = util$3;\nconst xmlNode = xmlNode$1;\nconst readDocType = DocTypeReader;\nconst toNumber = strnum;\nconst getIgnoreAttributesFn$1 = ignoreAttributes;\nlet OrderedObjParser$1 = class OrderedObjParser {\n constructor(options) {\n this.options = options;\n this.currentNode = null;\n this.tagsNodeStack = [];\n this.docTypeEntities = {};\n this.lastEntities = {\n \"apos\": { regex: /&(apos|#39|#x27);/g, val: \"'\" },\n \"gt\": { regex: /&(gt|#62|#x3E);/g, val: \">\" },\n \"lt\": { regex: /&(lt|#60|#x3C);/g, val: \"<\" },\n \"quot\": { regex: /&(quot|#34|#x22);/g, val: '\"' }\n };\n this.ampEntity = { regex: /&(amp|#38|#x26);/g, val: \"&\" };\n this.htmlEntities = {\n \"space\": { regex: /&(nbsp|#160);/g, val: \" \" },\n // \"lt\" : { regex: /&(lt|#60);/g, val: \"<\" },\n // \"gt\" : { regex: /&(gt|#62);/g, val: \">\" },\n // \"amp\" : { regex: /&(amp|#38);/g, val: \"&\" },\n // \"quot\" : { regex: /&(quot|#34);/g, val: \"\\\"\" },\n // \"apos\" : { regex: /&(apos|#39);/g, val: \"'\" },\n \"cent\": { regex: /&(cent|#162);/g, val: \"¢\" },\n \"pound\": { regex: /&(pound|#163);/g, val: \"£\" },\n \"yen\": { regex: /&(yen|#165);/g, val: \"¥\" },\n \"euro\": { regex: /&(euro|#8364);/g, val: \"€\" },\n \"copyright\": { regex: /&(copy|#169);/g, val: \"©\" },\n \"reg\": { regex: /&(reg|#174);/g, val: \"®\" },\n \"inr\": { regex: /&(inr|#8377);/g, val: \"₹\" },\n \"num_dec\": { regex: /&#([0-9]{1,7});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 10)) },\n \"num_hex\": { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (_, str) => String.fromCharCode(Number.parseInt(str, 16)) }\n };\n this.addExternalEntities = addExternalEntities;\n this.parseXml = parseXml;\n this.parseTextData = parseTextData;\n this.resolveNameSpace = resolveNameSpace;\n this.buildAttributesMap = buildAttributesMap;\n this.isItStopNode = isItStopNode;\n this.replaceEntitiesValue = replaceEntitiesValue$1;\n this.readStopNodeData = readStopNodeData;\n this.saveTextToParentTag = saveTextToParentTag;\n this.addChild = addChild;\n this.ignoreAttributesFn = getIgnoreAttributesFn$1(this.options.ignoreAttributes);\n }\n};\nfunction addExternalEntities(externalEntities) {\n const entKeys = Object.keys(externalEntities);\n for (let i2 = 0; i2 < entKeys.length; i2++) {\n const ent = entKeys[i2];\n this.lastEntities[ent] = {\n regex: new RegExp(\"&\" + ent + \";\", \"g\"),\n val: externalEntities[ent]\n };\n }\n}\nfunction parseTextData(val2, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {\n if (val2 !== void 0) {\n if (this.options.trimValues && !dontTrim) {\n val2 = val2.trim();\n }\n if (val2.length > 0) {\n if (!escapeEntities) val2 = this.replaceEntitiesValue(val2);\n const newval = this.options.tagValueProcessor(tagName, val2, jPath, hasAttributes, isLeafNode);\n if (newval === null || newval === void 0) {\n return val2;\n } else if (typeof newval !== typeof val2 || newval !== val2) {\n return newval;\n } else if (this.options.trimValues) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n const trimmedVal = val2.trim();\n if (trimmedVal === val2) {\n return parseValue(val2, this.options.parseTagValue, this.options.numberParseOptions);\n } else {\n return val2;\n }\n }\n }\n }\n}\nfunction resolveNameSpace(tagname) {\n if (this.options.removeNSPrefix) {\n const tags = tagname.split(\":\");\n const prefix = tagname.charAt(0) === \"/\" ? \"/\" : \"\";\n if (tags[0] === \"xmlns\") {\n return \"\";\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\nconst attrsRegx = new RegExp(`([^\\\\s=]+)\\\\s*(=\\\\s*(['\"])([\\\\s\\\\S]*?)\\\\3)?`, \"gm\");\nfunction buildAttributesMap(attrStr, jPath, tagName) {\n if (this.options.ignoreAttributes !== true && typeof attrStr === \"string\") {\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length;\n const attrs = {};\n for (let i2 = 0; i2 < len; i2++) {\n const attrName = this.resolveNameSpace(matches[i2][1]);\n if (this.ignoreAttributesFn(attrName, jPath)) {\n continue;\n }\n let oldVal = matches[i2][4];\n let aName = this.options.attributeNamePrefix + attrName;\n if (attrName.length) {\n if (this.options.transformAttributeName) {\n aName = this.options.transformAttributeName(aName);\n }\n if (aName === \"__proto__\") aName = \"#__proto__\";\n if (oldVal !== void 0) {\n if (this.options.trimValues) {\n oldVal = oldVal.trim();\n }\n oldVal = this.replaceEntitiesValue(oldVal);\n const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);\n if (newVal === null || newVal === void 0) {\n attrs[aName] = oldVal;\n } else if (typeof newVal !== typeof oldVal || newVal !== oldVal) {\n attrs[aName] = newVal;\n } else {\n attrs[aName] = parseValue(\n oldVal,\n this.options.parseAttributeValue,\n this.options.numberParseOptions\n );\n }\n } else if (this.options.allowBooleanAttributes) {\n attrs[aName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (this.options.attributesGroupName) {\n const attrCollection = {};\n attrCollection[this.options.attributesGroupName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\nconst parseXml = function(xmlData) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n const xmlObj = new xmlNode(\"!xml\");\n let currentNode = xmlObj;\n let textData = \"\";\n let jPath = \"\";\n for (let i2 = 0; i2 < xmlData.length; i2++) {\n const ch = xmlData[i2];\n if (ch === \"<\") {\n if (xmlData[i2 + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i2, \"Closing Tag is not closed.\");\n let tagName = xmlData.substring(i2 + 2, closeIndex).trim();\n if (this.options.removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n }\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode) {\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n }\n const lastTagName = jPath.substring(jPath.lastIndexOf(\".\") + 1);\n if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {\n throw new Error(`Unpaired tag can not be used as closing tag: `);\n }\n let propIndex = 0;\n if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {\n propIndex = jPath.lastIndexOf(\".\", jPath.lastIndexOf(\".\") - 1);\n this.tagsNodeStack.pop();\n } else {\n propIndex = jPath.lastIndexOf(\".\");\n }\n jPath = jPath.substring(0, propIndex);\n currentNode = this.tagsNodeStack.pop();\n textData = \"\";\n i2 = closeIndex;\n } else if (xmlData[i2 + 1] === \"?\") {\n let tagData = readTagExp(xmlData, i2, false, \"?>\");\n if (!tagData) throw new Error(\"Pi Tag is not closed.\");\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n if (this.options.ignoreDeclaration && tagData.tagName === \"?xml\" || this.options.ignorePiTags) ;\n else {\n const childNode = new xmlNode(tagData.tagName);\n childNode.add(this.options.textNodeName, \"\");\n if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n }\n i2 = tagData.closeIndex + 1;\n } else if (xmlData.substr(i2 + 1, 3) === \"!--\") {\n const endIndex = findClosingIndex(xmlData, \"-->\", i2 + 4, \"Comment is not closed.\");\n if (this.options.commentPropName) {\n const comment = xmlData.substring(i2 + 4, endIndex - 2);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);\n }\n i2 = endIndex;\n } else if (xmlData.substr(i2 + 1, 2) === \"!D\") {\n const result = readDocType(xmlData, i2);\n this.docTypeEntities = result.entities;\n i2 = result.i;\n } else if (xmlData.substr(i2 + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i2, \"CDATA is not closed.\") - 2;\n const tagExp = xmlData.substring(i2 + 9, closeIndex);\n textData = this.saveTextToParentTag(textData, currentNode, jPath);\n let val2 = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);\n if (val2 == void 0) val2 = \"\";\n if (this.options.cdataPropName) {\n currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);\n } else {\n currentNode.add(this.options.textNodeName, val2);\n }\n i2 = closeIndex + 2;\n } else {\n let result = readTagExp(xmlData, i2, this.options.removeNSPrefix);\n let tagName = result.tagName;\n const rawTagName = result.rawTagName;\n let tagExp = result.tagExp;\n let attrExpPresent = result.attrExpPresent;\n let closeIndex = result.closeIndex;\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n if (currentNode && textData) {\n if (currentNode.tagname !== \"!xml\") {\n textData = this.saveTextToParentTag(textData, currentNode, jPath, false);\n }\n }\n const lastTag = currentNode;\n if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {\n currentNode = this.tagsNodeStack.pop();\n jPath = jPath.substring(0, jPath.lastIndexOf(\".\"));\n }\n if (tagName !== xmlObj.tagname) {\n jPath += jPath ? \".\" + tagName : tagName;\n }\n if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) {\n let tagContent = \"\";\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n i2 = result.closeIndex;\n } else if (this.options.unpairedTags.indexOf(tagName) !== -1) {\n i2 = result.closeIndex;\n } else {\n const result2 = this.readStopNodeData(xmlData, rawTagName, closeIndex + 1);\n if (!result2) throw new Error(`Unexpected end of ${rawTagName}`);\n i2 = result2.i;\n tagContent = result2.tagContent;\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n if (tagContent) {\n tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);\n }\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n childNode.add(this.options.textNodeName, tagContent);\n this.addChild(currentNode, childNode, jPath);\n } else {\n if (tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1) {\n if (tagName[tagName.length - 1] === \"/\") {\n tagName = tagName.substr(0, tagName.length - 1);\n jPath = jPath.substr(0, jPath.length - 1);\n tagExp = tagName;\n } else {\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n if (this.options.transformTagName) {\n tagName = this.options.transformTagName(tagName);\n }\n const childNode = new xmlNode(tagName);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n jPath = jPath.substr(0, jPath.lastIndexOf(\".\"));\n } else {\n const childNode = new xmlNode(tagName);\n this.tagsNodeStack.push(currentNode);\n if (tagName !== tagExp && attrExpPresent) {\n childNode[\":@\"] = this.buildAttributesMap(tagExp, jPath, tagName);\n }\n this.addChild(currentNode, childNode, jPath);\n currentNode = childNode;\n }\n textData = \"\";\n i2 = closeIndex;\n }\n }\n } else {\n textData += xmlData[i2];\n }\n }\n return xmlObj.child;\n};\nfunction addChild(currentNode, childNode, jPath) {\n const result = this.options.updateTag(childNode.tagname, jPath, childNode[\":@\"]);\n if (result === false) ;\n else if (typeof result === \"string\") {\n childNode.tagname = result;\n currentNode.addChild(childNode);\n } else {\n currentNode.addChild(childNode);\n }\n}\nconst replaceEntitiesValue$1 = function(val2) {\n if (this.options.processEntities) {\n for (let entityName2 in this.docTypeEntities) {\n const entity = this.docTypeEntities[entityName2];\n val2 = val2.replace(entity.regx, entity.val);\n }\n for (let entityName2 in this.lastEntities) {\n const entity = this.lastEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n if (this.options.htmlEntities) {\n for (let entityName2 in this.htmlEntities) {\n const entity = this.htmlEntities[entityName2];\n val2 = val2.replace(entity.regex, entity.val);\n }\n }\n val2 = val2.replace(this.ampEntity.regex, this.ampEntity.val);\n }\n return val2;\n};\nfunction saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {\n if (textData) {\n if (isLeafNode === void 0) isLeafNode = Object.keys(currentNode.child).length === 0;\n textData = this.parseTextData(\n textData,\n currentNode.tagname,\n jPath,\n false,\n currentNode[\":@\"] ? Object.keys(currentNode[\":@\"]).length !== 0 : false,\n isLeafNode\n );\n if (textData !== void 0 && textData !== \"\")\n currentNode.add(this.options.textNodeName, textData);\n textData = \"\";\n }\n return textData;\n}\nfunction isItStopNode(stopNodes, jPath, currentTagName) {\n const allNodesExp = \"*.\" + currentTagName;\n for (const stopNodePath in stopNodes) {\n const stopNodeExp = stopNodes[stopNodePath];\n if (allNodesExp === stopNodeExp || jPath === stopNodeExp) return true;\n }\n return false;\n}\nfunction tagExpWithClosingIndex(xmlData, i2, closingChar = \">\") {\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i2; index < xmlData.length; index++) {\n let ch = xmlData[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === closingChar[0]) {\n if (closingChar[1]) {\n if (xmlData[index + 1] === closingChar[1]) {\n return {\n data: tagExp,\n index\n };\n }\n } else {\n return {\n data: tagExp,\n index\n };\n }\n } else if (ch === \"\t\") {\n ch = \" \";\n }\n tagExp += ch;\n }\n}\nfunction findClosingIndex(xmlData, str, i2, errMsg) {\n const closingIndex = xmlData.indexOf(str, i2);\n if (closingIndex === -1) {\n throw new Error(errMsg);\n } else {\n return closingIndex + str.length - 1;\n }\n}\nfunction readTagExp(xmlData, i2, removeNSPrefix, closingChar = \">\") {\n const result = tagExpWithClosingIndex(xmlData, i2 + 1, closingChar);\n if (!result) return;\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.search(/\\s/);\n let tagName = tagExp;\n let attrExpPresent = true;\n if (separatorIndex !== -1) {\n tagName = tagExp.substring(0, separatorIndex);\n tagExp = tagExp.substring(separatorIndex + 1).trimStart();\n }\n const rawTagName = tagName;\n if (removeNSPrefix) {\n const colonIndex = tagName.indexOf(\":\");\n if (colonIndex !== -1) {\n tagName = tagName.substr(colonIndex + 1);\n attrExpPresent = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n return {\n tagName,\n tagExp,\n closeIndex,\n attrExpPresent,\n rawTagName\n };\n}\nfunction readStopNodeData(xmlData, tagName, i2) {\n const startIndex = i2;\n let openTagCount = 1;\n for (; i2 < xmlData.length; i2++) {\n if (xmlData[i2] === \"<\") {\n if (xmlData[i2 + 1] === \"/\") {\n const closeIndex = findClosingIndex(xmlData, \">\", i2, `${tagName} is not closed`);\n let closeTagName = xmlData.substring(i2 + 2, closeIndex).trim();\n if (closeTagName === tagName) {\n openTagCount--;\n if (openTagCount === 0) {\n return {\n tagContent: xmlData.substring(startIndex, i2),\n i: closeIndex\n };\n }\n }\n i2 = closeIndex;\n } else if (xmlData[i2 + 1] === \"?\") {\n const closeIndex = findClosingIndex(xmlData, \"?>\", i2 + 1, \"StopNode is not closed.\");\n i2 = closeIndex;\n } else if (xmlData.substr(i2 + 1, 3) === \"!--\") {\n const closeIndex = findClosingIndex(xmlData, \"-->\", i2 + 3, \"StopNode is not closed.\");\n i2 = closeIndex;\n } else if (xmlData.substr(i2 + 1, 2) === \"![\") {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i2, \"StopNode is not closed.\") - 2;\n i2 = closeIndex;\n } else {\n const tagData = readTagExp(xmlData, i2, \">\");\n if (tagData) {\n const openTagName = tagData && tagData.tagName;\n if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length - 1] !== \"/\") {\n openTagCount++;\n }\n i2 = tagData.closeIndex;\n }\n }\n }\n }\n}\nfunction parseValue(val2, shouldParse, options) {\n if (shouldParse && typeof val2 === \"string\") {\n const newval = val2.trim();\n if (newval === \"true\") return true;\n else if (newval === \"false\") return false;\n else return toNumber(val2, options);\n } else {\n if (util.isExist(val2)) {\n return val2;\n } else {\n return \"\";\n }\n }\n}\nvar OrderedObjParser_1 = OrderedObjParser$1;\nvar node2json = {};\nfunction prettify$1(node, options) {\n return compress(node, options);\n}\nfunction compress(arr, options, jPath) {\n let text;\n const compressedObj = {};\n for (let i2 = 0; i2 < arr.length; i2++) {\n const tagObj = arr[i2];\n const property = propName$1(tagObj);\n let newJpath = \"\";\n if (jPath === void 0) newJpath = property;\n else newJpath = jPath + \".\" + property;\n if (property === options.textNodeName) {\n if (text === void 0) text = tagObj[property];\n else text += \"\" + tagObj[property];\n } else if (property === void 0) {\n continue;\n } else if (tagObj[property]) {\n let val2 = compress(tagObj[property], options, newJpath);\n const isLeaf = isLeafTag(val2, options);\n if (tagObj[\":@\"]) {\n assignAttributes(val2, tagObj[\":@\"], newJpath, options);\n } else if (Object.keys(val2).length === 1 && val2[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {\n val2 = val2[options.textNodeName];\n } else if (Object.keys(val2).length === 0) {\n if (options.alwaysCreateTextNode) val2[options.textNodeName] = \"\";\n else val2 = \"\";\n }\n if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {\n if (!Array.isArray(compressedObj[property])) {\n compressedObj[property] = [compressedObj[property]];\n }\n compressedObj[property].push(val2);\n } else {\n if (options.isArray(property, newJpath, isLeaf)) {\n compressedObj[property] = [val2];\n } else {\n compressedObj[property] = val2;\n }\n }\n }\n }\n if (typeof text === \"string\") {\n if (text.length > 0) compressedObj[options.textNodeName] = text;\n } else if (text !== void 0) compressedObj[options.textNodeName] = text;\n return compressedObj;\n}\nfunction propName$1(obj) {\n const keys = Object.keys(obj);\n for (let i2 = 0; i2 < keys.length; i2++) {\n const key = keys[i2];\n if (key !== \":@\") return key;\n }\n}\nfunction assignAttributes(obj, attrMap, jpath, options) {\n if (attrMap) {\n const keys = Object.keys(attrMap);\n const len = keys.length;\n for (let i2 = 0; i2 < len; i2++) {\n const atrrName = keys[i2];\n if (options.isArray(atrrName, jpath + \".\" + atrrName, true, true)) {\n obj[atrrName] = [attrMap[atrrName]];\n } else {\n obj[atrrName] = attrMap[atrrName];\n }\n }\n }\n}\nfunction isLeafTag(obj, options) {\n const { textNodeName } = options;\n const propCount = Object.keys(obj).length;\n if (propCount === 0) {\n return true;\n }\n if (propCount === 1 && (obj[textNodeName] || typeof obj[textNodeName] === \"boolean\" || obj[textNodeName] === 0)) {\n return true;\n }\n return false;\n}\nnode2json.prettify = prettify$1;\nconst { buildOptions } = OptionsBuilder;\nconst OrderedObjParser2 = OrderedObjParser_1;\nconst { prettify } = node2json;\nconst validator$1 = validator$2;\nlet XMLParser$1 = class XMLParser {\n constructor(options) {\n this.externalEntities = {};\n this.options = buildOptions(options);\n }\n /**\n * Parse XML dats to JS object \n * @param {string|Buffer} xmlData \n * @param {boolean|Object} validationOption \n */\n parse(xmlData, validationOption) {\n if (typeof xmlData === \"string\") ;\n else if (xmlData.toString) {\n xmlData = xmlData.toString();\n } else {\n throw new Error(\"XML data is accepted in String or Bytes[] form.\");\n }\n if (validationOption) {\n if (validationOption === true) validationOption = {};\n const result = validator$1.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error(`${result.err.msg}:${result.err.line}:${result.err.col}`);\n }\n }\n const orderedObjParser = new OrderedObjParser2(this.options);\n orderedObjParser.addExternalEntities(this.externalEntities);\n const orderedResult = orderedObjParser.parseXml(xmlData);\n if (this.options.preserveOrder || orderedResult === void 0) return orderedResult;\n else return prettify(orderedResult, this.options);\n }\n /**\n * Add Entity which is not by default supported by this library\n * @param {string} key \n * @param {string} value \n */\n addEntity(key, value) {\n if (value.indexOf(\"&\") !== -1) {\n throw new Error(\"Entity value can't have '&'\");\n } else if (key.indexOf(\"&\") !== -1 || key.indexOf(\";\") !== -1) {\n throw new Error(\"An entity must be set without '&' and ';'. Eg. use '#xD' for ' '\");\n } else if (value === \"&\") {\n throw new Error(\"An entity with value '&' is not permitted\");\n } else {\n this.externalEntities[key] = value;\n }\n }\n};\nvar XMLParser_1 = XMLParser$1;\nconst EOL = \"\\n\";\nfunction toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n for (let i2 = 0; i2 < arr.length; i2++) {\n const tagObj = arr[i2];\n const tagName = propName(tagObj);\n if (tagName === void 0) continue;\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName;\n else newJPath = `${jPath}.${tagName}`;\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += ``;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + ``;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr2 = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\";\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"`;\n }\n isPreviousElementTag = true;\n }\n return xmlStr;\n}\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i2 = 0; i2 < keys.length; i2++) {\n const key = keys[i2];\n if (!obj.hasOwnProperty(key)) continue;\n if (key !== \":@\") return key;\n }\n}\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!attrMap.hasOwnProperty(attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i2 = 0; i2 < options.entities.length; i2++) {\n const entity = options.entities[i2];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\nvar orderedJs2Xml = toXml;\nconst buildFromOrderedJs = orderedJs2Xml;\nconst getIgnoreAttributesFn = ignoreAttributes;\nconst defaultOptions = {\n attributeNamePrefix: \"@_\",\n attributesGroupName: false,\n textNodeName: \"#text\",\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: \" \",\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a2) {\n return a2;\n },\n attributeValueProcessor: function(attrName, a2) {\n return a2;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },\n //it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"'\", \"g\"), val: \"'\" },\n { regex: new RegExp('\"', \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n this.isAttribute = function() {\n return false;\n };\n } else {\n this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes);\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n this.processTextOrObjNode = processTextOrObjNode;\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = \">\\n\";\n this.newLine = \"\\n\";\n } else {\n this.indentate = function() {\n return \"\";\n };\n this.tagEndChar = \">\";\n this.newLine = \"\";\n }\n}\nBuilder.prototype.build = function(jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n };\n }\n return this.j2x(jObj, 0, []).val;\n }\n};\nBuilder.prototype.j2x = function(jObj, level, ajPath) {\n let attrStr = \"\";\n let val2 = \"\";\n const jPath = ajPath.join(\".\");\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === \"undefined\") {\n if (this.isAttribute(key)) {\n val2 += \"\";\n }\n } else if (jObj[key] === null) {\n if (this.isAttribute(key)) {\n val2 += \"\";\n } else if (key[0] === \"?\") {\n val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n } else {\n val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n }\n } else if (jObj[key] instanceof Date) {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n } else if (typeof jObj[key] !== \"object\") {\n const attr = this.isAttribute(key);\n if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n attrStr += this.buildAttrPairStr(attr, \"\" + jObj[key]);\n } else if (!attr) {\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, \"\" + jObj[key]);\n val2 += this.replaceEntitiesValue(newval);\n } else {\n val2 += this.buildTextValNode(jObj[key], key, \"\", level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j2 = 0; j2 < arrLen; j2++) {\n const item = jObj[key][j2];\n if (typeof item === \"undefined\") ;\n else if (item === null) {\n if (key[0] === \"?\") val2 += this.indentate(level) + \"<\" + key + \"?\" + this.tagEndChar;\n else val2 += this.indentate(level) + \"<\" + key + \"/\" + this.tagEndChar;\n } else if (typeof item === \"object\") {\n if (this.options.oneListGroup) {\n const result = this.j2x(item, level + 1, ajPath.concat(key));\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr;\n }\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level, ajPath);\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, \"\", level);\n }\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val2 += listTagVal;\n } else {\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j2 = 0; j2 < L; j2++) {\n attrStr += this.buildAttrPairStr(Ks[j2], \"\" + jObj[key][Ks[j2]]);\n }\n } else {\n val2 += this.processTextOrObjNode(jObj[key], key, level, ajPath);\n }\n }\n }\n return { attrStr, val: val2 };\n};\nBuilder.prototype.buildAttrPairStr = function(attrName, val2) {\n val2 = this.options.attributeValueProcessor(attrName, \"\" + val2);\n val2 = this.replaceEntitiesValue(val2);\n if (this.options.suppressBooleanAttributes && val2 === \"true\") {\n return \" \" + attrName;\n } else return \" \" + attrName + '=\"' + val2 + '\"';\n};\nfunction processTextOrObjNode(object, key, level, ajPath) {\n const result = this.j2x(object, level + 1, ajPath.concat(key));\n if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\nBuilder.prototype.buildObjectNode = function(val2, key, attrStr, level) {\n if (val2 === \"\") {\n if (key[0] === \"?\") return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n else {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n let tagEndExp = \"\" + val2 + tagEndExp;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + piClosingChar + this.tagEndChar + val2 + this.indentate(level) + tagEndExp;\n }\n }\n};\nBuilder.prototype.closeTag = function(key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) {\n if (!this.options.suppressUnpairedNode) closeTag = \"/\";\n } else if (this.options.suppressEmptyNode) {\n closeTag = \"/\";\n } else {\n closeTag = `>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n } else if (key[0] === \"?\") {\n return this.indentate(level) + \"<\" + key + attrStr + \"?\" + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val2);\n textValue = this.replaceEntitiesValue(textValue);\n if (textValue === \"\") {\n return this.indentate(level) + \"<\" + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + \"<\" + key + attrStr + \">\" + textValue + \" 0 && this.options.processEntities) {\n for (let i2 = 0; i2 < this.options.entities.length; i2++) {\n const entity = this.options.entities[i2];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n};\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\nfunction isAttribute(name) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\nvar json2xml = Builder;\nconst validator = validator$2;\nconst XMLParser2 = XMLParser_1;\nconst XMLBuilder = json2xml;\nvar fxp = {\n XMLParser: XMLParser2,\n XMLValidator: validator,\n XMLBuilder\n};\nfunction isSvg(string) {\n if (typeof string !== \"string\") {\n throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n }\n string = string.trim();\n if (string.length === 0) {\n return false;\n }\n if (fxp.XMLValidator.validate(string) !== true) {\n return false;\n }\n let jsonObject;\n const parser = new fxp.XMLParser();\n try {\n jsonObject = parser.parse(string);\n } catch {\n return false;\n }\n if (!jsonObject) {\n return false;\n }\n if (!Object.keys(jsonObject).some((x) => x.toLowerCase() === \"svg\")) {\n return false;\n }\n return true;\n}\nclass View {\n _view;\n constructor(view) {\n isValidView(view);\n this._view = view;\n }\n get id() {\n return this._view.id;\n }\n get name() {\n return this._view.name;\n }\n get caption() {\n return this._view.caption;\n }\n get emptyTitle() {\n return this._view.emptyTitle;\n }\n get emptyCaption() {\n return this._view.emptyCaption;\n }\n get getContents() {\n return this._view.getContents;\n }\n get icon() {\n return this._view.icon;\n }\n set icon(icon) {\n this._view.icon = icon;\n }\n get order() {\n return this._view.order;\n }\n set order(order) {\n this._view.order = order;\n }\n get params() {\n return this._view.params;\n }\n set params(params) {\n this._view.params = params;\n }\n get columns() {\n return this._view.columns;\n }\n get emptyView() {\n return this._view.emptyView;\n }\n get parent() {\n return this._view.parent;\n }\n get sticky() {\n return this._view.sticky;\n }\n get expanded() {\n return this._view.expanded;\n }\n set expanded(expanded) {\n this._view.expanded = expanded;\n }\n get defaultSortKey() {\n return this._view.defaultSortKey;\n }\n get loadChildViews() {\n return this._view.loadChildViews;\n }\n}\nconst isValidView = function(view) {\n if (!view.id || typeof view.id !== \"string\") {\n throw new Error(\"View id is required and must be a string\");\n }\n if (!view.name || typeof view.name !== \"string\") {\n throw new Error(\"View name is required and must be a string\");\n }\n if (\"caption\" in view && typeof view.caption !== \"string\") {\n throw new Error(\"View caption must be a string\");\n }\n if (!view.getContents || typeof view.getContents !== \"function\") {\n throw new Error(\"View getContents is required and must be a function\");\n }\n if (!view.icon || typeof view.icon !== \"string\" || !isSvg(view.icon)) {\n throw new Error(\"View icon is required and must be a valid svg string\");\n }\n if (\"order\" in view && typeof view.order !== \"number\") {\n throw new Error(\"View order must be a number\");\n }\n if (view.columns) {\n view.columns.forEach((column) => {\n if (!(column instanceof Column)) {\n throw new Error(\"View columns must be an array of Column. Invalid column found\");\n }\n });\n }\n if (view.emptyView && typeof view.emptyView !== \"function\") {\n throw new Error(\"View emptyView must be a function\");\n }\n if (view.parent && typeof view.parent !== \"string\") {\n throw new Error(\"View parent must be a string\");\n }\n if (\"sticky\" in view && typeof view.sticky !== \"boolean\") {\n throw new Error(\"View sticky must be a boolean\");\n }\n if (\"expanded\" in view && typeof view.expanded !== \"boolean\") {\n throw new Error(\"View expanded must be a boolean\");\n }\n if (view.defaultSortKey && typeof view.defaultSortKey !== \"string\") {\n throw new Error(\"View defaultSortKey must be a string\");\n }\n if (view.loadChildViews && typeof view.loadChildViews !== \"function\") {\n throw new Error(\"View loadChildViews must be a function\");\n }\n return true;\n};\nconst debug$1 = typeof process === \"object\" && process.env && process.env.NODE_DEBUG && /\\bsemver\\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error(\"SEMVER\", ...args) : () => {\n};\nvar debug_1 = debug$1;\nconst SEMVER_SPEC_VERSION = \"2.0.0\";\nconst MAX_LENGTH$1 = 256;\nconst MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */\n9007199254740991;\nconst MAX_SAFE_COMPONENT_LENGTH = 16;\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;\nconst RELEASE_TYPES = [\n \"major\",\n \"premajor\",\n \"minor\",\n \"preminor\",\n \"patch\",\n \"prepatch\",\n \"prerelease\"\n];\nvar constants = {\n MAX_LENGTH: MAX_LENGTH$1,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 1,\n FLAG_LOOSE: 2\n};\nvar re$1 = { exports: {} };\n(function(module, exports) {\n const {\n MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2,\n MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH2,\n MAX_LENGTH: MAX_LENGTH2\n } = constants;\n const debug2 = debug_1;\n exports = module.exports = {};\n const re2 = exports.re = [];\n const safeRe = exports.safeRe = [];\n const src = exports.src = [];\n const t3 = exports.t = {};\n let R = 0;\n const LETTERDASHNUMBER = \"[a-zA-Z0-9-]\";\n const safeRegexReplacements = [\n [\"\\\\s\", 1],\n [\"\\\\d\", MAX_LENGTH2],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH2]\n ];\n const makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);\n }\n return value;\n };\n const createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value);\n const index = R++;\n debug2(name, index, value);\n t3[name] = index;\n src[index] = value;\n re2[index] = new RegExp(value, isGlobal ? \"g\" : void 0);\n safeRe[index] = new RegExp(safe, isGlobal ? \"g\" : void 0);\n };\n createToken(\"NUMERICIDENTIFIER\", \"0|[1-9]\\\\d*\");\n createToken(\"NUMERICIDENTIFIERLOOSE\", \"\\\\d+\");\n createToken(\"NONNUMERICIDENTIFIER\", `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);\n createToken(\"MAINVERSION\", `(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})\\\\.(${src[t3.NUMERICIDENTIFIER]})`);\n createToken(\"MAINVERSIONLOOSE\", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);\n createToken(\"PRERELEASEIDENTIFIER\", `(?:${src[t3.NUMERICIDENTIFIER]}|${src[t3.NONNUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASEIDENTIFIERLOOSE\", `(?:${src[t3.NUMERICIDENTIFIERLOOSE]}|${src[t3.NONNUMERICIDENTIFIER]})`);\n createToken(\"PRERELEASE\", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);\n createToken(\"PRERELEASELOOSE\", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);\n createToken(\"BUILDIDENTIFIER\", `${LETTERDASHNUMBER}+`);\n createToken(\"BUILD\", `(?:\\\\+(${src[t3.BUILDIDENTIFIER]}(?:\\\\.${src[t3.BUILDIDENTIFIER]})*))`);\n createToken(\"FULLPLAIN\", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);\n createToken(\"FULL\", `^${src[t3.FULLPLAIN]}$`);\n createToken(\"LOOSEPLAIN\", `[v=\\\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);\n createToken(\"LOOSE\", `^${src[t3.LOOSEPLAIN]}$`);\n createToken(\"GTLT\", \"((?:<|>)?=?)\");\n createToken(\"XRANGEIDENTIFIERLOOSE\", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`);\n createToken(\"XRANGEIDENTIFIER\", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\\\*`);\n createToken(\"XRANGEPLAIN\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGEPLAINLOOSE\", `[v=\\\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);\n createToken(\"XRANGE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAIN]}$`);\n createToken(\"XRANGELOOSE\", `^${src[t3.GTLT]}\\\\s*${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COERCEPLAIN\", `${\"(^|[^\\\\d])(\\\\d{1,\"}${MAX_SAFE_COMPONENT_LENGTH2}})(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?`);\n createToken(\"COERCE\", `${src[t3.COERCEPLAIN]}(?:$|[^\\\\d])`);\n createToken(\"COERCEFULL\", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\\\d])`);\n createToken(\"COERCERTL\", src[t3.COERCE], true);\n createToken(\"COERCERTLFULL\", src[t3.COERCEFULL], true);\n createToken(\"LONETILDE\", \"(?:~>?)\");\n createToken(\"TILDETRIM\", `(\\\\s*)${src[t3.LONETILDE]}\\\\s+`, true);\n exports.tildeTrimReplace = \"$1~\";\n createToken(\"TILDE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"TILDELOOSE\", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"LONECARET\", \"(?:\\\\^)\");\n createToken(\"CARETTRIM\", `(\\\\s*)${src[t3.LONECARET]}\\\\s+`, true);\n exports.caretTrimReplace = \"$1^\";\n createToken(\"CARET\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);\n createToken(\"CARETLOOSE\", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);\n createToken(\"COMPARATORLOOSE\", `^${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]})$|^$`);\n createToken(\"COMPARATOR\", `^${src[t3.GTLT]}\\\\s*(${src[t3.FULLPLAIN]})$|^$`);\n createToken(\"COMPARATORTRIM\", `(\\\\s*)${src[t3.GTLT]}\\\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);\n exports.comparatorTrimReplace = \"$1$2$3\";\n createToken(\"HYPHENRANGE\", `^\\\\s*(${src[t3.XRANGEPLAIN]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAIN]})\\\\s*$`);\n createToken(\"HYPHENRANGELOOSE\", `^\\\\s*(${src[t3.XRANGEPLAINLOOSE]})\\\\s+-\\\\s+(${src[t3.XRANGEPLAINLOOSE]})\\\\s*$`);\n createToken(\"STAR\", \"(<|>)?=?\\\\s*\\\\*\");\n createToken(\"GTE0\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$\");\n createToken(\"GTE0PRE\", \"^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$\");\n})(re$1, re$1.exports);\nvar reExports = re$1.exports;\nconst looseOption = Object.freeze({ loose: true });\nconst emptyOpts = Object.freeze({});\nconst parseOptions$1 = (options) => {\n if (!options) {\n return emptyOpts;\n }\n if (typeof options !== \"object\") {\n return looseOption;\n }\n return options;\n};\nvar parseOptions_1 = parseOptions$1;\nconst numeric = /^[0-9]+$/;\nconst compareIdentifiers$1 = (a2, b2) => {\n const anum = numeric.test(a2);\n const bnum = numeric.test(b2);\n if (anum && bnum) {\n a2 = +a2;\n b2 = +b2;\n }\n return a2 === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b2 ? -1 : 1;\n};\nconst rcompareIdentifiers = (a2, b2) => compareIdentifiers$1(b2, a2);\nvar identifiers = {\n compareIdentifiers: compareIdentifiers$1,\n rcompareIdentifiers\n};\nconst debug = debug_1;\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = constants;\nconst { safeRe: re, t: t2 } = reExports;\nconst parseOptions = parseOptions_1;\nconst { compareIdentifiers } = identifiers;\nlet SemVer$2 = class SemVer {\n constructor(version, options) {\n options = parseOptions(options);\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {\n return version;\n } else {\n version = version.version;\n }\n } else if (typeof version !== \"string\") {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`);\n }\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n );\n }\n debug(\"SemVer\", version, options);\n this.options = options;\n this.loose = !!options.loose;\n this.includePrerelease = !!options.includePrerelease;\n const m2 = version.trim().match(options.loose ? re[t2.LOOSE] : re[t2.FULL]);\n if (!m2) {\n throw new TypeError(`Invalid Version: ${version}`);\n }\n this.raw = version;\n this.major = +m2[1];\n this.minor = +m2[2];\n this.patch = +m2[3];\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError(\"Invalid major version\");\n }\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError(\"Invalid minor version\");\n }\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError(\"Invalid patch version\");\n }\n if (!m2[4]) {\n this.prerelease = [];\n } else {\n this.prerelease = m2[4].split(\".\").map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id;\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num;\n }\n }\n return id;\n });\n }\n this.build = m2[5] ? m2[5].split(\".\") : [];\n this.format();\n }\n format() {\n this.version = `${this.major}.${this.minor}.${this.patch}`;\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join(\".\")}`;\n }\n return this.version;\n }\n toString() {\n return this.version;\n }\n compare(other) {\n debug(\"SemVer.compare\", this.version, this.options, other);\n if (!(other instanceof SemVer)) {\n if (typeof other === \"string\" && other === this.version) {\n return 0;\n }\n other = new SemVer(other, this.options);\n }\n if (other.version === this.version) {\n return 0;\n }\n return this.compareMain(other) || this.comparePre(other);\n }\n compareMain(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);\n }\n comparePre(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n if (this.prerelease.length && !other.prerelease.length) {\n return -1;\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1;\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0;\n }\n let i2 = 0;\n do {\n const a2 = this.prerelease[i2];\n const b2 = other.prerelease[i2];\n debug(\"prerelease compare\", i2, a2, b2);\n if (a2 === void 0 && b2 === void 0) {\n return 0;\n } else if (b2 === void 0) {\n return 1;\n } else if (a2 === void 0) {\n return -1;\n } else if (a2 === b2) {\n continue;\n } else {\n return compareIdentifiers(a2, b2);\n }\n } while (++i2);\n }\n compareBuild(other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options);\n }\n let i2 = 0;\n do {\n const a2 = this.build[i2];\n const b2 = other.build[i2];\n debug(\"build compare\", i2, a2, b2);\n if (a2 === void 0 && b2 === void 0) {\n return 0;\n } else if (b2 === void 0) {\n return 1;\n } else if (a2 === void 0) {\n return -1;\n } else if (a2 === b2) {\n continue;\n } else {\n return compareIdentifiers(a2, b2);\n }\n } while (++i2);\n }\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc(release, identifier, identifierBase) {\n switch (release) {\n case \"premajor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor = 0;\n this.major++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"preminor\":\n this.prerelease.length = 0;\n this.patch = 0;\n this.minor++;\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prepatch\":\n this.prerelease.length = 0;\n this.inc(\"patch\", identifier, identifierBase);\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"prerelease\":\n if (this.prerelease.length === 0) {\n this.inc(\"patch\", identifier, identifierBase);\n }\n this.inc(\"pre\", identifier, identifierBase);\n break;\n case \"major\":\n if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {\n this.major++;\n }\n this.minor = 0;\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"minor\":\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++;\n }\n this.patch = 0;\n this.prerelease = [];\n break;\n case \"patch\":\n if (this.prerelease.length === 0) {\n this.patch++;\n }\n this.prerelease = [];\n break;\n case \"pre\": {\n const base = Number(identifierBase) ? 1 : 0;\n if (!identifier && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier is empty\");\n }\n if (this.prerelease.length === 0) {\n this.prerelease = [base];\n } else {\n let i2 = this.prerelease.length;\n while (--i2 >= 0) {\n if (typeof this.prerelease[i2] === \"number\") {\n this.prerelease[i2]++;\n i2 = -2;\n }\n }\n if (i2 === -1) {\n if (identifier === this.prerelease.join(\".\") && identifierBase === false) {\n throw new Error(\"invalid increment argument: identifier already exists\");\n }\n this.prerelease.push(base);\n }\n }\n if (identifier) {\n let prerelease = [identifier, base];\n if (identifierBase === false) {\n prerelease = [identifier];\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease;\n }\n } else {\n this.prerelease = prerelease;\n }\n }\n break;\n }\n default:\n throw new Error(`invalid increment argument: ${release}`);\n }\n this.raw = this.format();\n if (this.build.length) {\n this.raw += `+${this.build.join(\".\")}`;\n }\n return this;\n }\n};\nvar semver = SemVer$2;\nconst SemVer$1 = semver;\nconst parse$1 = (version, options, throwErrors = false) => {\n if (version instanceof SemVer$1) {\n return version;\n }\n try {\n return new SemVer$1(version, options);\n } catch (er) {\n if (!throwErrors) {\n return null;\n }\n throw er;\n }\n};\nvar parse_1 = parse$1;\nconst parse = parse_1;\nconst valid = (version, options) => {\n const v = parse(version, options);\n return v ? v.version : null;\n};\nvar valid_1 = valid;\nconst valid$1 = /* @__PURE__ */ getDefaultExportFromCjs(valid_1);\nconst SemVer2 = semver;\nconst major = (a2, loose) => new SemVer2(a2, loose).major;\nvar major_1 = major;\nconst major$1 = /* @__PURE__ */ getDefaultExportFromCjs(major_1);\nclass ProxyBus {\n bus;\n constructor(bus2) {\n if (typeof bus2.getVersion !== \"function\" || !valid$1(bus2.getVersion())) {\n console.warn(\"Proxying an event bus with an unknown or invalid version\");\n } else if (major$1(bus2.getVersion()) !== major$1(this.getVersion())) {\n console.warn(\n \"Proxying an event bus of version \" + bus2.getVersion() + \" with \" + this.getVersion()\n );\n }\n this.bus = bus2;\n }\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.bus.subscribe(name, handler);\n }\n unsubscribe(name, handler) {\n this.bus.unsubscribe(name, handler);\n }\n emit(name, event) {\n this.bus.emit(name, event);\n }\n}\nclass SimpleBus {\n handlers = /* @__PURE__ */ new Map();\n getVersion() {\n return \"3.3.1\";\n }\n subscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).concat(\n handler\n )\n );\n }\n unsubscribe(name, handler) {\n this.handlers.set(\n name,\n (this.handlers.get(name) || []).filter((h2) => h2 !== handler)\n );\n }\n emit(name, event) {\n (this.handlers.get(name) || []).forEach((h2) => {\n try {\n h2(event);\n } catch (e2) {\n console.error(\"could not invoke event listener\", e2);\n }\n });\n }\n}\nlet bus = null;\nfunction getBus() {\n if (bus !== null) {\n return bus;\n }\n if (typeof window === \"undefined\") {\n return new Proxy({}, {\n get: () => {\n return () => console.error(\n \"Window not available, EventBus can not be established!\"\n );\n }\n });\n }\n if (window.OC?._eventBus && typeof window._nc_event_bus === \"undefined\") {\n console.warn(\n \"found old event bus instance at OC._eventBus. Update your version!\"\n );\n window._nc_event_bus = window.OC._eventBus;\n }\n if (typeof window?._nc_event_bus !== \"undefined\") {\n bus = new ProxyBus(window._nc_event_bus);\n } else {\n bus = window._nc_event_bus = new SimpleBus();\n }\n return bus;\n}\nfunction emit(name, event) {\n getBus().emit(name, event);\n}\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nclass FileListFilter extends TypedEventTarget {\n id;\n order;\n constructor(id, order = 100) {\n super();\n this.id = id;\n this.order = order;\n }\n filter(nodes) {\n throw new Error(\"Not implemented\");\n }\n updateChips(chips) {\n this.dispatchTypedEvent(\"update:chips\", new CustomEvent(\"update:chips\", { detail: chips }));\n }\n filterUpdated() {\n this.dispatchTypedEvent(\"update:filter\", new CustomEvent(\"update:filter\"));\n }\n}\nfunction registerFileListFilter(filter) {\n if (!window._nc_filelist_filters) {\n window._nc_filelist_filters = /* @__PURE__ */ new Map();\n }\n if (window._nc_filelist_filters.has(filter.id)) {\n throw new Error(`File list filter \"${filter.id}\" already registered`);\n }\n window._nc_filelist_filters.set(filter.id, filter);\n emit(\"files:filter:added\", filter);\n}\nfunction unregisterFileListFilter(filterId) {\n if (window._nc_filelist_filters && window._nc_filelist_filters.has(filterId)) {\n window._nc_filelist_filters.delete(filterId);\n emit(\"files:filter:removed\", filterId);\n }\n}\nfunction getFileListFilters() {\n if (!window._nc_filelist_filters) {\n return [];\n }\n return [...window._nc_filelist_filters.values()];\n}\nconst addNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.registerEntry(entry);\n};\nconst removeNewFileMenuEntry = function(entry) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.unregisterEntry(entry);\n};\nconst getNewFileMenuEntries = function(context) {\n const newFileMenu = getNewFileMenu();\n return newFileMenu.getEntries(context).sort((a2, b2) => {\n if (a2.order !== void 0 && b2.order !== void 0 && a2.order !== b2.order) {\n return a2.order - b2.order;\n }\n return a2.displayName.localeCompare(b2.displayName, void 0, { numeric: true, sensitivity: \"base\" });\n });\n};\nexport {\n Column,\n DefaultType,\n q as File,\n FileAction,\n FileListAction,\n FileListFilter,\n F as FileType,\n FilesSortingMode,\n s as Folder,\n Header,\n InvalidFilenameError,\n InvalidFilenameErrorReason,\n Navigation,\n NewMenuEntryCategory,\n N as Node,\n t as NodeStatus,\n P as Permission,\n View,\n addNewFileMenuEntry,\n c as davGetClient,\n l as davGetDefaultPropfind,\n m as davGetFavoritesReport,\n n as davGetRecentSearch,\n a as davGetRemoteURL,\n g as davGetRootPath,\n p as davParsePermissions,\n b as davRemoteURL,\n r as davResultToNode,\n d as davRootPath,\n h as defaultDavNamespaces,\n f as defaultDavProperties,\n formatFileSize,\n k as getDavNameSpaces,\n j as getDavProperties,\n e as getFavoriteNodes,\n getFileActions,\n getFileListActions,\n getFileListFilters,\n getFileListHeaders,\n getNavigation,\n getNewFileMenuEntries,\n getUniqueName,\n isFilenameValid,\n orderBy,\n parseFileSize,\n i as registerDavProperty,\n registerFileAction,\n registerFileListAction,\n registerFileListFilter,\n registerFileListHeaders,\n removeNewFileMenuEntry,\n sortNodes,\n unregisterFileListFilter,\n validateFilename\n};\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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + {\"5365\":\"fa27a4e19e53f6fa6123\",\"5706\":\"3153330af47fc26a725a\",\"6127\":\"40fbb3532bb7846b7035\"}[chunkId] + \"\";\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 = 2766;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__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\t2766: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\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\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\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, [4208], () => (__webpack_require__(44563)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","async","execBatch","nodes","response","Promise","resolve","spawnDialog","defineAsyncComponent","status","Array","length","fill","action","FileAction","id","displayName","t","iconSvgInline","TagMultipleSvg","enabled","isPublicShare","some","node","isDavRessource","permissions","Permission","UPDATE","exec","getLoggerBuilder","setApp","detectUser","build","executeAction","activeStore","store","defineStore","state","_initialized","activeNode","activeView","activeAction","actions","setActiveNode","Error","logger","debug","this","clearActiveNode","onDeletedNode","source","setActiveAction","clearActiveAction","onChangedView","view","arguments","undefined","navigation","getNavigation","subscribe","active","addEventListener","event","detail","useActiveStore","window","_nc_files_pinia","createPinia","currentDir","OCP","Files","Router","query","dir","currentNode","currentView","error","NodeStatus","LOADING","Vue","success","showSuccess","showError","rootPath","client","davGetClient","resultToNode","davResultToNode","formatReportPayload","tagId","getDavNameSpaces","getDavProperties","tagToNode","tag","Folder","davRemoteURL","owner","String","getCurrentUser","uid","root","displayname","READ","attributes","systemTagsViewId","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","cache","renderTag","isMore","tagElement","document","createElement","classList","add","setAttribute","textContent","cachedTag","find","color","mainBackgroundColor","getComputedStyle","body","getPropertyValue","replace","isDarkModeEnabled","primaryElement","elementColor","style","setProperty","renderInline","tags","getNodeSystemTags","systemTagsElement","fileid","toString","push","fetchTags","append","moreTagElement","slice","join","order","then","systemTagsHtml","querySelectorAll","forEach","element","replaceWith","splice","findIndex","index","updateSystemTagsColorAttribute","type","FileType","dirname","path","goToRoute","openfile","default","DefaultType","HIDDEN","registerDavProperty","registerFileAction","bulkSystemTagsAction","inlineSystemTagsAction","openInFilesAction","register","View","name","caption","emptyTitle","emptyCaption","icon","svgTagMultiple","getContents","tagsCache","filter","userVisible","folder","NONE","contents","map","parseInt","split","getDirectoryContents","davRootPath","details","data","headers","method","useHotKey","manageTagAction","stop","prevent","fetchTagsPayload","davClient","glob","parseTags","fetchTag","stat","createTag","tagToPost","formatTag","customRequest","contentLocation","get","emit","parseIdFromLocation","updateTag","userAssignable","getTagObjects","etag","props","getetag","objects","Object","values","flat","setTagObjects","objectIds","_ref","rootUrl","generateRemoteUrl","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","fromEntries","entries","_ref2","key","value","camelCase","url","queryPos","indexOf","substring","parts","result","pop","Number","initialTag","setNodeSystemTags","darkModePreference","matchMedia","matches","darkModeSetting","getAttribute","includes","invertTextColor","colorContrast","backgroundColor","brightBackground","calculateLuma","isBrightColor","blurredBackground","color1","color2","Color","mix","hex","contrast","minContrast","highContrastPreference","highContrastSetting","isHighContrastModeEnabled","iteration","epsilon","hsl","hexToHSL","l","Math","max","min","hslToHex","h","s","rgb","array","hexToRGB","pow","red","green","blue","luminance1","luminance2","cssKeywords","reverseKeywords","keys","convert","channels","labels","hsv","hwb","cmyk","xyz","lab","lch","keyword","ansi16","ansi256","hcg","apple","gray","module","exports","model","defineProperty","r","g","b","delta","rdif","gdif","bdif","v","diff","diffc","c","w","k","reversed","currentClosestKeyword","currentClosestDistance","Infinity","distance","y","x","z","t2","t3","val","t1","i","smin","lmin","hi","floor","f","p","q","vmin","sl","wh","bl","ratio","n","m","y2","x2","z2","a","atan2","PI","sqrt","hr","cos","sin","args","saturation","round","ansi","mult","rem","string","toUpperCase","match","colorString","char","integer","chroma","grayscale","hue","pure","mg","conversions","route","fromModel","routes","toModel","fn","wrappedFn","arg0","len","conversion","wrapRounded","raw","wrapRaw","link","from","to","wrapConversion","graph","parent","cur","unshift","models","buildGraph","queue","current","adjacents","adjacent","deriveBFS","colorNames","swizzle","hasOwnProperty","reverseNames","create","call","cs","clamp","num","hexDouble","str","toLowerCase","hexAlpha","i2","parseFloat","alpha","isNaN","rgba","percent","hsla","hwba","skippedModels","hashedModelKeys","sort","limiters","object","valpha","newArray","prototype","zeroArray","hashedKeys","JSON","stringify","limit","freeze","toJSON","places","self","percentString","unitArray","unitObject","roundToPlace","getset","maxfn","saturationl","lightness","saturationv","white","wblack","cyan","magenta","yellow","black","hexa","rgbArray","alphaHex","rgbNumber","luminosity","lum","chan","lum1","lum2","level","contrastRatio","isDark","isLight","negate","lighten","darken","saturate","desaturate","whiten","blacken","fade","opaquer","rotate","degrees","mixinColor","weight","w1","w2","isArray","number","toFixed","roundTo","channel","modifier","___CSS_LOADER_EXPORT___","isArrayish","concat","results","arg","wrap","obj","Function","getOwnPropertyDescriptor","constructor","DefaultType2","_action","validateAction","title","destructive","inline","_nc_fileactions","search","humanList","humanListBinary","formatFileSize","size","skipSmallSizes","binaryPrefixes","base1000","log","readableFormat","relativeSize","toLocaleString","Date","toISOString","sortNodes","sortingOptions","sortingMode","sortingOrder","collection","identifiers2","orders","sorting","_","collator","Intl","Collator","numeric","usage","a2","b2","identifier","compare","orderBy","sortFavoritesFirst","favorite","sortFoldersFirst","basename2","basename","lastIndexOf","Navigation","_views","_currentView","dispatchTypedEvent","CustomEvent","remove","setActive","views","_nc_navigation","Column","_column","column","isValidColumn","render","summary","validator$2","util$3","nameStartChar","nameRegexp","regexName","RegExp","isExist","isEmptyObject","merge","target","arrayMode","getValue","isName","getAllMatches","regex","allmatches","startIndex","lastIndex","util$2","defaultOptions$2","allowBooleanAttributes","unpairedTags","isWhiteSpace","readPI","xmlData","start","tagname","substr","getErrorObject","getLineNumberForPosition","readCommentAndCDATA","angleBracketsCount","validate","assign","tagFound","reachedRoot","err","tagStartPos","closingTag","tagName","trim","msg","readAttributeStr","attrStr","attrStrStart","isValid","validateAttributeString","code","line","tagClosed","otg","openPos","col","afterAmp","validateAmpersand","doubleQuote","singleQuote","startChar","validAttrStrRegxp","attrNames","getPositionFromMatch","attrName","validateAttrName","re2","validateNumberAmpersand","count","message","lineNumber","lines","OptionsBuilder","defaultOptions$1","preserveOrder","attributeNamePrefix","attributesGroupName","textNodeName","ignoreAttributes","removeNSPrefix","parseTagValue","parseAttributeValue","trimValues","cdataPropName","numberParseOptions","leadingZeros","eNotation","tagValueProcessor","val2","attributeValueProcessor","stopNodes","alwaysCreateTextNode","commentPropName","processEntities","htmlEntities","ignoreDeclaration","ignorePiTags","transformTagName","transformAttributeName","jPath","attrs","buildOptions","defaultOptions","util$1","readEntityExp","entityName2","isComment","isEntity","isElement","isAttlist","isNotation","validateEntityName","hexRegex","numRegex","consider","decimalPoint","ignoreAttributes2","pattern","test","util","xmlNode","child","addChild","readDocType","entities","hasBody","comment","exp","entityName","regx","toNumber","trimmedStr","skipLike","sign","numTrimmedByZeros","numStr","getIgnoreAttributesFn$1","addExternalEntities","externalEntities","entKeys","ent","lastEntities","parseTextData","dontTrim","hasAttributes","isLeafNode","escapeEntities","replaceEntitiesValue","newval","parseValue","resolveNameSpace","prefix","charAt","attrsRegx","buildAttributesMap","ignoreAttributesFn","oldVal","aName","newVal","attrCollection","parseXml","xmlObj","textData","closeIndex","findClosingIndex","colonIndex","saveTextToParentTag","lastTagName","propIndex","tagsNodeStack","tagData","readTagExp","childNode","tagExp","attrExpPresent","endIndex","docTypeEntities","rawTagName","lastTag","isItStopNode","tagContent","result2","readStopNodeData","replaceEntitiesValue$1","entity","ampEntity","currentTagName","allNodesExp","stopNodePath","stopNodeExp","errMsg","closingIndex","closingChar","attrBoundary","ch","tagExpWithClosingIndex","separatorIndex","trimStart","openTagCount","shouldParse","node2json","compress","arr","text","compressedObj","tagObj","property","propName$1","newJpath","isLeaf","isLeafTag","assignAttributes","attrMap","jpath","atrrName","propCount","prettify","OrderedObjParser2","fromCharCode","validator$1","arrToStr","indentation","xmlStr","isPreviousElementTag","propName","newJPath","tagText","isStopNode","attStr2","attr_to_str","tempInd","piTextNodeName","newIdentation","indentBy","tagStart","tagValue","suppressUnpairedNode","suppressEmptyNode","endsWith","attr","attrVal","suppressBooleanAttributes","textValue","buildFromOrderedJs","jArray","format","getIgnoreAttributesFn","oneListGroup","Builder","isAttribute","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","ajPath","j2x","buildTextValNode","buildObjectNode","repeat","startsWith","jObj","arrayNodeName","buildAttrPairStr","arrLen","listTagVal","listTagAttr","j2","item","Ks","L","closeTag","tagEndExp","piClosingChar","fxp","XMLParser","parse","validationOption","orderedObjParser","orderedResult","addEntity","XMLValidator","XMLBuilder","_view","isValidView","params","columns","emptyView","sticky","expanded","defaultSortKey","loadChildViews","TypeError","jsonObject","parser","isSvg","debug_1","process","env","NODE_DEBUG","console","constants","MAX_LENGTH","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_LENGTH$1","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","re$1","MAX_SAFE_COMPONENT_LENGTH2","MAX_SAFE_BUILD_LENGTH2","MAX_LENGTH2","debug2","re","safeRe","src","R","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","tildeTrimReplace","LONECARET","caretTrimReplace","comparatorTrimReplace","reExports","loose","compareIdentifiers$1","anum","bnum","identifiers","compareIdentifiers","rcompareIdentifiers","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","O","chunkIds","priority","notFulfilled","fulfilled","j","every","getter","__esModule","d","definition","o","enumerable","e","chunkId","all","reduce","promises","u","globalThis","prop","done","script","needAttach","scripts","getElementsByTagName","charset","timeout","nc","onScriptComplete","prev","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","setTimeout","bind","head","appendChild","Symbol","toStringTag","nmd","paths","children","scriptUrl","importScripts","location","currentScript","baseURI","href","installedChunks","installedChunkData","promise","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}