{"version":3,"file":"eurooffice-listener.mjs","sources":["../node_modules/vue-router/dist/devtools-CVsCuYdF.js","../node_modules/vue-router/dist/vue-router.js","../node_modules/@nextcloud/vue/dist/chunks/useNcRadioGroup-D6llQmAl.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcCheckboxRadioSwitch-BMsPx74L.mjs","../node_modules/@nextcloud/vue/dist/chunks/customPickerElements-4pQTZUnk.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcEmptyContent-B8-90BSI.mjs","../node_modules/@nextcloud/vue/dist/chunks/autolink-U5pBzLgI.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcInputField-o5OFv3z6.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs","../node_modules/@nextcloud/vue/dist/chunks/referencePickerModal-D9HwChP3.mjs","../node_modules/@nextcloud/vue/dist/chunks/useCopy-CfYsbB0V.mjs","../node_modules/@nextcloud/vue/dist/chunks/NcRichText-DJlaHs_Q.mjs","../src/listener.js"],"sourcesContent":["/*!\n * vue-router v5.0.3\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { _ as isRouteComponent, b as isBrowser, c as ErrorTypes, g as isESModule, h as isArray, p as assign, r as matchedRouteKey, u as createRouterError } from \"./useApi-j1E6pMaV.js\";\nimport { getCurrentInstance, inject, onActivated, onDeactivated, onUnmounted, watch } from \"vue\";\nimport { setupDevtoolsPlugin } from \"@vue/devtools-api\";\n\n//#region src/warning.ts\nfunction warn$1(msg) {\n\tconst args = Array.from(arguments).slice(1);\n\tconsole.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\n\n//#endregion\n//#region src/encoding.ts\n/**\n* Encoding Rules (␣ = Space)\n* - Path: ␣ \" < > # ? { }\n* - Query: ␣ \" < > # & =\n* - Hash: ␣ \" < > `\n*\n* On top of that, the RFC3986 (https://tools.ietf.org/html/rfc3986#section-2.2)\n* defines some extra characters to be encoded. Most browsers do not encode them\n* in encodeURI https://github.com/whatwg/url/issues/369, so it may be safer to\n* also encode `!'()*`. Leaving un-encoded only ASCII alphanumeric(`a-zA-Z0-9`)\n* plus `-._~`. This extra safety should be applied to query by patching the\n* string returned by encodeURIComponent encodeURI also encodes `[\\]^`. `\\`\n* should be encoded to avoid ambiguity. Browsers (IE, FF, C) transform a `\\`\n* into a `/` if directly typed in. The _backtick_ (`````) should also be\n* encoded everywhere because some browsers like FF encode it when directly\n* written while others don't. Safari and IE don't encode ``\"<>{}``` in hash.\n*/\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\n/**\n* NOTE: It's not clear to me if we should encode the + symbol in queries, it\n* seems to be less flexible than not doing so and I can't find out the legacy\n* systems requiring this for regular requests like text/html. In the standard,\n* the encoding of the plus character is only mentioned for\n* application/x-www-form-urlencoded\n* (https://url.spec.whatwg.org/#urlencoded-parsing) and most browsers seems lo\n* leave the plus character as is in queries. To be more flexible, we allow the\n* plus character on the query, but it can also be manually encoded by the user.\n*\n* Resources:\n* - https://url.spec.whatwg.org/#urlencoded-parsing\n* - https://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20\n*/\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\n/**\n* Encode characters that need to be encoded on the path, search and hash\n* sections of the URL.\n*\n* @internal\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction commonEncode(text) {\n\treturn text == null ? \"\" : encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\n/**\n* Encode characters that need to be encoded on the hash section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeHash(text) {\n\treturn commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Encode characters that need to be encoded query values on the query\n* section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeQueryValue(text) {\n\treturn commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\n/**\n* Like `encodeQueryValue` but also encodes the `=` character.\n*\n* @param text - string to encode\n*/\nfunction encodeQueryKey(text) {\n\treturn encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodePath(text) {\n\treturn commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\n/**\n* Encode characters that need to be encoded on the path section of the URL as a\n* param. This function encodes everything {@link encodePath} does plus the\n* slash (`/`) character. If `text` is `null` or `undefined`, returns an empty\n* string instead.\n*\n* @param text - string to encode\n* @returns encoded string\n*/\nfunction encodeParam(text) {\n\treturn encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n\tif (text == null) return null;\n\ttry {\n\t\treturn decodeURIComponent(\"\" + text);\n\t} catch (err) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Error decoding \"${text}\". Using original value`);\n\t}\n\treturn \"\" + text;\n}\n\n//#endregion\n//#region src/location.ts\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\n/**\n* Transforms a URI into a normalized history location\n*\n* @param parseQuery\n* @param location - URI to normalize\n* @param currentLocation - current absolute location. Allows resolving relative\n* paths. Must start with `/`. Defaults to `/`\n* @returns a normalized history location\n*/\nfunction parseURL(parseQuery, location, currentLocation = \"/\") {\n\tlet path, query = {}, searchString = \"\", hash = \"\";\n\tconst hashPos = location.indexOf(\"#\");\n\tlet searchPos = location.indexOf(\"?\");\n\tsearchPos = hashPos >= 0 && searchPos > hashPos ? -1 : searchPos;\n\tif (searchPos >= 0) {\n\t\tpath = location.slice(0, searchPos);\n\t\tsearchString = location.slice(searchPos, hashPos > 0 ? hashPos : location.length);\n\t\tquery = parseQuery(searchString.slice(1));\n\t}\n\tif (hashPos >= 0) {\n\t\tpath = path || location.slice(0, hashPos);\n\t\thash = location.slice(hashPos, location.length);\n\t}\n\tpath = resolveRelativePath(path != null ? path : location, currentLocation);\n\treturn {\n\t\tfullPath: path + searchString + hash,\n\t\tpath,\n\t\tquery,\n\t\thash: decode(hash)\n\t};\n}\nfunction NEW_stringifyURL(stringifyQuery, path, query, hash = \"\") {\n\tconst searchText = stringifyQuery(query);\n\treturn path + (searchText && \"?\") + searchText + encodeHash(hash);\n}\n/**\n* Stringifies a URL object\n*\n* @param stringifyQuery\n* @param location\n*/\nfunction stringifyURL(stringifyQuery, location) {\n\tconst query = location.query ? stringifyQuery(location.query) : \"\";\n\treturn location.path + (query && \"?\") + query + (location.hash || \"\");\n}\n/**\n* Strips off the base from the beginning of a location.pathname in a non-case-sensitive way.\n*\n* @param pathname - location.pathname\n* @param base - base to strip off\n*/\nfunction stripBase(pathname, base) {\n\tif (!base || !pathname.toLowerCase().startsWith(base.toLowerCase())) return pathname;\n\treturn pathname.slice(base.length) || \"/\";\n}\n/**\n* Checks if two RouteLocation are equal. This means that both locations are\n* pointing towards the same {@link RouteRecord} and that all `params`, `query`\n* parameters and `hash` are the same\n*\n* @param stringifyQuery - A function that takes a query object of type LocationQueryRaw and returns a string representation of it.\n* @param a - first {@link RouteLocation}\n* @param b - second {@link RouteLocation}\n*/\nfunction isSameRouteLocation(stringifyQuery, a, b) {\n\tconst aLastIndex = a.matched.length - 1;\n\tconst bLastIndex = b.matched.length - 1;\n\treturn aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery(a.query) === stringifyQuery(b.query) && a.hash === b.hash;\n}\n/**\n* Check if two `RouteRecords` are equal. Takes into account aliases: they are\n* considered equal to the `RouteRecord` they are aliasing.\n*\n* @param a - first {@link RouteRecord}\n* @param b - second {@link RouteRecord}\n*/\nfunction isSameRouteRecord(a, b) {\n\treturn (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n\tif (Object.keys(a).length !== Object.keys(b).length) return false;\n\tfor (var key in a) if (!isSameRouteLocationParamsValue(a[key], b[key])) return false;\n\treturn true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n\treturn isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : (a && a.valueOf()) === (b && b.valueOf());\n}\n/**\n* Check if two arrays are the same or if an array with one single entry is the\n* same as another primitive value. Used to check query and parameters\n*\n* @param a - array of values\n* @param b - array of values or a single value\n*/\nfunction isEquivalentArray(a, b) {\n\treturn isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\n/**\n* Resolves a relative path that starts with `.`.\n*\n* @param to - path location we are resolving\n* @param from - currentLocation.path, should start with `/`\n*/\nfunction resolveRelativePath(to, from) {\n\tif (to.startsWith(\"/\")) return to;\n\tif (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n\t\twarn$1(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n\t\treturn to;\n\t}\n\tif (!to) return from;\n\tconst fromSegments = from.split(\"/\");\n\tconst toSegments = to.split(\"/\");\n\tconst lastToSegment = toSegments[toSegments.length - 1];\n\tif (lastToSegment === \"..\" || lastToSegment === \".\") toSegments.push(\"\");\n\tlet position = fromSegments.length - 1;\n\tlet toPosition;\n\tlet segment;\n\tfor (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n\t\tsegment = toSegments[toPosition];\n\t\tif (segment === \".\") continue;\n\t\tif (segment === \"..\") {\n\t\t\tif (position > 1) position--;\n\t\t} else break;\n\t}\n\treturn fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition).join(\"/\");\n}\n/**\n* Initial route location where the router is. Can be used in navigation guards\n* to differentiate the initial navigation.\n*\n* @example\n* ```js\n* import { START_LOCATION } from 'vue-router'\n*\n* router.beforeEach((to, from) => {\n*   if (from === START_LOCATION) {\n*     // initial navigation\n*   }\n* })\n* ```\n*/\nconst START_LOCATION_NORMALIZED = {\n\tpath: \"/\",\n\tname: void 0,\n\tparams: {},\n\tquery: {},\n\thash: \"\",\n\tfullPath: \"/\",\n\tmatched: [],\n\tmeta: {},\n\tredirectedFrom: void 0\n};\n\n//#endregion\n//#region src/history/common.ts\nlet NavigationType = /* @__PURE__ */ function(NavigationType) {\n\tNavigationType[\"pop\"] = \"pop\";\n\tNavigationType[\"push\"] = \"push\";\n\treturn NavigationType;\n}({});\nlet NavigationDirection = /* @__PURE__ */ function(NavigationDirection) {\n\tNavigationDirection[\"back\"] = \"back\";\n\tNavigationDirection[\"forward\"] = \"forward\";\n\tNavigationDirection[\"unknown\"] = \"\";\n\treturn NavigationDirection;\n}({});\n/**\n* Starting location for Histories\n*/\nconst START = \"\";\n/**\n* Normalizes a base by removing any trailing slash and reading the base tag if\n* present.\n*\n* @param base - base to normalize\n*/\nfunction normalizeBase(base) {\n\tif (!base) if (isBrowser) {\n\t\tconst baseEl = document.querySelector(\"base\");\n\t\tbase = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n\t\tbase = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n\t} else base = \"/\";\n\tif (base[0] !== \"/\" && base[0] !== \"#\") base = \"/\" + base;\n\treturn removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location) {\n\treturn base.replace(BEFORE_HASH_RE, \"#\") + location;\n}\n\n//#endregion\n//#region src/scrollBehavior.ts\nfunction getElementPosition(el, offset) {\n\tconst docRect = document.documentElement.getBoundingClientRect();\n\tconst elRect = el.getBoundingClientRect();\n\treturn {\n\t\tbehavior: offset.behavior,\n\t\tleft: elRect.left - docRect.left - (offset.left || 0),\n\t\ttop: elRect.top - docRect.top - (offset.top || 0)\n\t};\n}\nconst computeScrollPosition = () => ({\n\tleft: window.scrollX,\n\ttop: window.scrollY\n});\nfunction scrollToPosition(position) {\n\tlet scrollToOptions;\n\tif (\"el\" in position) {\n\t\tconst positionEl = position.el;\n\t\tconst isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n\t\t/**\n\t\t* `id`s can accept pretty much any characters, including CSS combinators\n\t\t* like `>` or `~`. It's still possible to retrieve elements using\n\t\t* `document.getElementById('~')` but it needs to be escaped when using\n\t\t* `document.querySelector('#\\\\~')` for it to be valid. The only\n\t\t* requirements for `id`s are them to be unique on the page and to not be\n\t\t* empty (`id=\"\"`). Because of that, when passing an id selector, it should\n\t\t* be properly escaped for it to work with `querySelector`. We could check\n\t\t* for the id selector to be simple (no CSS combinators `+ >~`) but that\n\t\t* would make things inconsistent since they are valid characters for an\n\t\t* `id` but would need to be escaped when using `querySelector`, breaking\n\t\t* their usage and ending up in no selector returned. Selectors need to be\n\t\t* escaped:\n\t\t*\n\t\t* - `#1-thing` becomes `#\\31 -thing`\n\t\t* - `#with~symbols` becomes `#with\\\\~symbols`\n\t\t*\n\t\t* - More information about  the topic can be found at\n\t\t*   https://mathiasbynens.be/notes/html5-id-class.\n\t\t* - Practical example: https://mathiasbynens.be/demo/html5-id\n\t\t*/\n\t\tif (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n\t\t\tif (!isIdSelector || !document.getElementById(position.el.slice(1))) try {\n\t\t\t\tconst foundEl = document.querySelector(position.el);\n\t\t\t\tif (isIdSelector && foundEl) {\n\t\t\t\t\twarn$1(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\twarn$1(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n\t\tif (!el) {\n\t\t\tprocess.env.NODE_ENV !== \"production\" && warn$1(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n\t\t\treturn;\n\t\t}\n\t\tscrollToOptions = getElementPosition(el, position);\n\t} else scrollToOptions = position;\n\tif (\"scrollBehavior\" in document.documentElement.style) window.scrollTo(scrollToOptions);\n\telse window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.scrollX, scrollToOptions.top != null ? scrollToOptions.top : window.scrollY);\n}\nfunction getScrollKey(path, delta) {\n\treturn (history.state ? history.state.position - delta : -1) + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n\tscrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n\tconst scroll = scrollPositions.get(key);\n\tscrollPositions.delete(key);\n\treturn scroll;\n}\n/**\n* ScrollBehavior instance used by the router to compute and restore the scroll\n* position when navigating.\n*/\n\n//#endregion\n//#region src/types/typeGuards.ts\nfunction isRouteLocation(route) {\n\treturn typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n\treturn typeof name === \"string\" || typeof name === \"symbol\";\n}\n\n//#endregion\n//#region src/query.ts\n/**\n* Transforms a queryString into a {@link LocationQuery} object. Accept both, a\n* version with the leading `?` and without Should work as URLSearchParams\n\n* @internal\n*\n* @param search - search string to parse\n* @returns a query object\n*/\nfunction parseQuery(search) {\n\tconst query = {};\n\tif (search === \"\" || search === \"?\") return query;\n\tconst searchParams = (search[0] === \"?\" ? search.slice(1) : search).split(\"&\");\n\tfor (let i = 0; i < searchParams.length; ++i) {\n\t\tconst searchParam = searchParams[i].replace(PLUS_RE, \" \");\n\t\tconst eqPos = searchParam.indexOf(\"=\");\n\t\tconst key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n\t\tconst value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n\t\tif (key in query) {\n\t\t\tlet currentValue = query[key];\n\t\t\tif (!isArray(currentValue)) currentValue = query[key] = [currentValue];\n\t\t\tcurrentValue.push(value);\n\t\t} else query[key] = value;\n\t}\n\treturn query;\n}\n/**\n* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it\n* doesn't prepend a `?`\n*\n* @internal\n*\n* @param query - query object to stringify\n* @returns string version of the query without the leading `?`\n*/\nfunction stringifyQuery(query) {\n\tlet search = \"\";\n\tfor (let key in query) {\n\t\tconst value = query[key];\n\t\tkey = encodeQueryKey(key);\n\t\tif (value == null) {\n\t\t\tif (value !== void 0) search += (search.length ? \"&\" : \"\") + key;\n\t\t\tcontinue;\n\t\t}\n\t\t(isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)]).forEach((value) => {\n\t\t\tif (value !== void 0) {\n\t\t\t\tsearch += (search.length ? \"&\" : \"\") + key;\n\t\t\t\tif (value != null) search += \"=\" + value;\n\t\t\t}\n\t\t});\n\t}\n\treturn search;\n}\n/**\n* Transforms a {@link LocationQueryRaw} into a {@link LocationQuery} by casting\n* numbers into strings, removing keys with an undefined value and replacing\n* undefined with null in arrays\n*\n* @param query - query object to normalize\n* @returns a normalized query object\n*/\nfunction normalizeQuery(query) {\n\tconst normalizedQuery = {};\n\tfor (const key in query) {\n\t\tconst value = query[key];\n\t\tif (value !== void 0) normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n\t}\n\treturn normalizedQuery;\n}\n\n//#endregion\n//#region src/utils/callbacks.ts\n/**\n* Create a list of callbacks that can be reset. Used to create before and after navigation guards list\n*/\nfunction useCallbacks() {\n\tlet handlers = [];\n\tfunction add(handler) {\n\t\thandlers.push(handler);\n\t\treturn () => {\n\t\t\tconst i = handlers.indexOf(handler);\n\t\t\tif (i > -1) handlers.splice(i, 1);\n\t\t};\n\t}\n\tfunction reset() {\n\t\thandlers = [];\n\t}\n\treturn {\n\t\tadd,\n\t\tlist: () => handlers.slice(),\n\t\treset\n\t};\n}\n\n//#endregion\n//#region src/navigationGuards.ts\nfunction registerGuard(activeRecordRef, name, guard) {\n\tconst record = activeRecordRef.value;\n\tif (!record) {\n\t\tif (process.env.NODE_ENV !== \"production\") warn$1(`No active route record was found when calling \\`${name === \"updateGuards\" ? \"onBeforeRouteUpdate\" : \"onBeforeRouteLeave\"}()\\`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?`);\n\t\treturn;\n\t}\n\tlet currentRecord = record;\n\tconst removeFromList = () => {\n\t\tcurrentRecord[name].delete(guard);\n\t};\n\tonUnmounted(removeFromList);\n\tonDeactivated(removeFromList);\n\tonActivated(() => {\n\t\tconst newRecord = activeRecordRef.value;\n\t\tif (process.env.NODE_ENV !== \"production\" && !newRecord) warn$1(\"No active route record was found when reactivating component with navigation guard. This is likely a bug in vue-router. Please report it.\");\n\t\tif (newRecord) currentRecord = newRecord;\n\t\tcurrentRecord[name].add(guard);\n\t});\n\tcurrentRecord[name].add(guard);\n}\n/**\n* Add a navigation guard that triggers whenever the component for the current\n* location is about to be left. Similar to {@link beforeRouteLeave} but can be\n* used in any component. The guard is removed when the component is unmounted.\n*\n* @param leaveGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteLeave(leaveGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"leaveGuards\", leaveGuard);\n}\n/**\n* Add a navigation guard that triggers whenever the current location is about\n* to be updated. Similar to {@link beforeRouteUpdate} but can be used in any\n* component. The guard is removed when the component is unmounted.\n*\n* @param updateGuard - {@link NavigationGuard}\n*/\nfunction onBeforeRouteUpdate(updateGuard) {\n\tif (process.env.NODE_ENV !== \"production\" && !getCurrentInstance()) {\n\t\twarn$1(\"getCurrentInstance() returned null. onBeforeRouteUpdate() must be called at the top of a setup function\");\n\t\treturn;\n\t}\n\tregisterGuard(inject(matchedRouteKey, {}), \"updateGuards\", updateGuard);\n}\nfunction guardToPromiseFn(guard, to, from, record, name, runWithContext = (fn) => fn()) {\n\tconst enterCallbackArray = record && (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n\treturn () => new Promise((resolve, reject) => {\n\t\tconst next = (valid) => {\n\t\t\tif (valid === false) reject(createRouterError(ErrorTypes.NAVIGATION_ABORTED, {\n\t\t\t\tfrom,\n\t\t\t\tto\n\t\t\t}));\n\t\t\telse if (valid instanceof Error) reject(valid);\n\t\t\telse if (isRouteLocation(valid)) reject(createRouterError(ErrorTypes.NAVIGATION_GUARD_REDIRECT, {\n\t\t\t\tfrom: to,\n\t\t\t\tto: valid\n\t\t\t}));\n\t\t\telse {\n\t\t\t\tif (enterCallbackArray && record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") enterCallbackArray.push(valid);\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\tconst guardReturn = runWithContext(() => guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? withDeprecationWarning(canOnlyBeCalledOnce(next, to, from)) : next));\n\t\tlet guardCall = Promise.resolve(guardReturn);\n\t\tif (guard.length < 3) guardCall = guardCall.then(next);\n\t\tif (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n\t\t\tconst message = `The \"next\" callback was never called inside of ${guard.name ? \"\\\"\" + guard.name + \"\\\"\" : \"\"}:\\n${guard.toString()}\\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n\t\t\tif (typeof guardReturn === \"object\" && \"then\" in guardReturn) guardCall = guardCall.then((resolvedValue) => {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t}\n\t\t\t\treturn resolvedValue;\n\t\t\t});\n\t\t\telse if (guardReturn !== void 0) {\n\t\t\t\tif (!next._called) {\n\t\t\t\t\twarn$1(message);\n\t\t\t\t\treject(/* @__PURE__ */ new Error(\"Invalid navigation guard\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tguardCall.catch((err) => reject(err));\n\t});\n}\n/**\n* Wraps the next callback to warn when it is used. Dev-only: when __DEV__ is\n* false (production builds), this branch is dead code and is stripped from the\n* bundle.\n*\n* @internal\n*/\nfunction withDeprecationWarning(next) {\n\tlet warned = false;\n\treturn function() {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\twarn$1(\"The `next()` callback in navigation guards is deprecated. Return the value instead of calling `next(value)`.\");\n\t\t}\n\t\treturn next.apply(this, arguments);\n\t};\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n\tlet called = 0;\n\treturn function() {\n\t\tif (called++ === 1) warn$1(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n\t\tnext._called = true;\n\t\tif (called === 1) next.apply(null, arguments);\n\t};\n}\nfunction extractComponentsGuards(matched, guardType, to, from, runWithContext = (fn) => fn()) {\n\tconst guards = [];\n\tfor (const record of matched) {\n\t\tif (process.env.NODE_ENV !== \"production\" && !record.components && record.children && !record.children.length) warn$1(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n\t\tfor (const name in record.components) {\n\t\t\tlet rawComponent = record.components[name];\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n\t\t\t\t\tthrow new Error(\"Invalid route component\");\n\t\t\t\t} else if (\"then\" in rawComponent) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n\t\t\t\t\tconst promise = rawComponent;\n\t\t\t\t\trawComponent = () => promise;\n\t\t\t\t} else if (rawComponent.__asyncLoader && !rawComponent.__warnedDefineAsync) {\n\t\t\t\t\trawComponent.__warnedDefineAsync = true;\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guardType !== \"beforeRouteEnter\" && !record.instances[name]) continue;\n\t\t\tif (isRouteComponent(rawComponent)) {\n\t\t\t\tconst guard = (rawComponent.__vccOpts || rawComponent)[guardType];\n\t\t\t\tguard && guards.push(guardToPromiseFn(guard, to, from, record, name, runWithContext));\n\t\t\t} else {\n\t\t\t\tlet componentPromise = rawComponent();\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n\t\t\t\t\twarn$1(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n\t\t\t\t\tcomponentPromise = Promise.resolve(componentPromise);\n\t\t\t\t}\n\t\t\t\tguards.push(() => componentPromise.then((resolved) => {\n\t\t\t\t\tif (!resolved) throw new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`);\n\t\t\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\t\t\trecord.mods[name] = resolved;\n\t\t\t\t\trecord.components[name] = resolvedComponent;\n\t\t\t\t\tconst guard = (resolvedComponent.__vccOpts || resolvedComponent)[guardType];\n\t\t\t\t\treturn guard && guardToPromiseFn(guard, to, from, record, name, runWithContext)();\n\t\t\t\t}));\n\t\t\t}\n\t\t}\n\t}\n\treturn guards;\n}\n/**\n* Ensures a route is loaded, so it can be passed as o prop to `<RouterView>`.\n*\n* @param route - resolved route to load\n*/\nfunction loadRouteLocation(route) {\n\treturn route.matched.every((record) => record.redirect) ? Promise.reject(/* @__PURE__ */ new Error(\"Cannot load a route that redirects.\")) : Promise.all(route.matched.map((record) => record.components && Promise.all(Object.keys(record.components).reduce((promises, name) => {\n\t\tconst rawComponent = record.components[name];\n\t\tif (typeof rawComponent === \"function\" && !(\"displayName\" in rawComponent)) promises.push(rawComponent().then((resolved) => {\n\t\t\tif (!resolved) return Promise.reject(/* @__PURE__ */ new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\". Ensure you passed a function that returns a promise.`));\n\t\t\tconst resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n\t\t\trecord.mods[name] = resolved;\n\t\t\trecord.components[name] = resolvedComponent;\n\t\t}));\n\t\treturn promises;\n\t}, [])))).then(() => route);\n}\n/**\n* Split the leaving, updating, and entering records.\n* @internal\n*\n* @param  to - Location we are navigating to\n* @param from - Location we are navigating from\n*/\nfunction extractChangingRecords(to, from) {\n\tconst leavingRecords = [];\n\tconst updatingRecords = [];\n\tconst enteringRecords = [];\n\tconst len = Math.max(from.matched.length, to.matched.length);\n\tfor (let i = 0; i < len; i++) {\n\t\tconst recordFrom = from.matched[i];\n\t\tif (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);\n\t\telse leavingRecords.push(recordFrom);\n\t\tconst recordTo = to.matched[i];\n\t\tif (recordTo) {\n\t\t\tif (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);\n\t\t}\n\t}\n\treturn [\n\t\tleavingRecords,\n\t\tupdatingRecords,\n\t\tenteringRecords\n\t];\n}\n\n//#endregion\n//#region src/devtools.ts\n/**\n* Copies a route location and removes any problematic properties that cannot be shown in devtools (e.g. Vue instances).\n*\n* @param routeLocation - routeLocation to format\n* @param tooltip - optional tooltip\n* @returns a copy of the routeLocation\n*/\nfunction formatRouteLocation(routeLocation, tooltip) {\n\tconst copy = assign({}, routeLocation, { matched: routeLocation.matched.map((matched) => omit(matched, [\n\t\t\"instances\",\n\t\t\"children\",\n\t\t\"aliasOf\"\n\t])) });\n\treturn { _custom: {\n\t\ttype: null,\n\t\treadOnly: true,\n\t\tdisplay: routeLocation.fullPath,\n\t\ttooltip,\n\t\tvalue: copy\n\t} };\n}\nfunction formatDisplay(display) {\n\treturn { _custom: { display } };\n}\nlet routerId = 0;\nfunction addDevtools(app, router, matcher) {\n\tif (router.__hasDevtools) return;\n\trouter.__hasDevtools = true;\n\tconst id = routerId++;\n\tsetupDevtoolsPlugin({\n\t\tid: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n\t\tlabel: \"Vue Router\",\n\t\tpackageName: \"vue-router\",\n\t\thomepage: \"https://router.vuejs.org\",\n\t\tlogo: \"https://router.vuejs.org/logo.png\",\n\t\tcomponentStateTypes: [\"Routing\"],\n\t\tapp\n\t}, (api) => {\n\t\tapi.on.inspectComponent((payload) => {\n\t\t\tif (payload.instanceData) payload.instanceData.state.push({\n\t\t\t\ttype: \"Routing\",\n\t\t\t\tkey: \"$route\",\n\t\t\t\teditable: false,\n\t\t\t\tvalue: formatRouteLocation(router.currentRoute.value, \"Current Route\")\n\t\t\t});\n\t\t});\n\t\tapi.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n\t\t\tif (componentInstance.__vrv_devtools) {\n\t\t\t\tconst info = componentInstance.__vrv_devtools;\n\t\t\t\tnode.tags.push({\n\t\t\t\t\tlabel: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n\t\t\t\t\ttextColor: 0,\n\t\t\t\t\ttooltip: \"This component is rendered by &lt;router-view&gt;\",\n\t\t\t\t\tbackgroundColor: PINK_500\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (isArray(componentInstance.__vrl_devtools)) {\n\t\t\t\tcomponentInstance.__devtoolsApi = api;\n\t\t\t\tcomponentInstance.__vrl_devtools.forEach((devtoolsData) => {\n\t\t\t\t\tlet label = devtoolsData.route.path;\n\t\t\t\t\tlet backgroundColor = ORANGE_400;\n\t\t\t\t\tlet tooltip = \"\";\n\t\t\t\t\tlet textColor = 0;\n\t\t\t\t\tif (devtoolsData.error) {\n\t\t\t\t\t\tlabel = devtoolsData.error;\n\t\t\t\t\t\tbackgroundColor = RED_100;\n\t\t\t\t\t\ttextColor = RED_700;\n\t\t\t\t\t} else if (devtoolsData.isExactActive) {\n\t\t\t\t\t\tbackgroundColor = LIME_500;\n\t\t\t\t\t\ttooltip = \"This is exactly active\";\n\t\t\t\t\t} else if (devtoolsData.isActive) {\n\t\t\t\t\t\tbackgroundColor = BLUE_600;\n\t\t\t\t\t\ttooltip = \"This link is active\";\n\t\t\t\t\t}\n\t\t\t\t\tnode.tags.push({\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\ttooltip,\n\t\t\t\t\t\tbackgroundColor\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\twatch(router.currentRoute, () => {\n\t\t\trefreshRoutesView();\n\t\t\tapi.notifyComponentUpdate();\n\t\t\tapi.sendInspectorTree(routerInspectorId);\n\t\t\tapi.sendInspectorState(routerInspectorId);\n\t\t});\n\t\tconst navigationsLayerId = \"router:navigations:\" + id;\n\t\tapi.addTimelineLayer({\n\t\t\tid: navigationsLayerId,\n\t\t\tlabel: `Router${id ? \" \" + id : \"\"} Navigations`,\n\t\t\tcolor: 4237508\n\t\t});\n\t\trouter.onError((error, to) => {\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"Error during Navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tlogType: \"error\",\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata: { error },\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\tlet navigationId = 0;\n\t\trouter.beforeEach((to, from) => {\n\t\t\tconst data = {\n\t\t\t\tguard: formatDisplay(\"beforeEach\"),\n\t\t\t\tfrom: formatRouteLocation(from, \"Current Location during this navigation\"),\n\t\t\t\tto: formatRouteLocation(to, \"Target location\")\n\t\t\t};\n\t\t\tObject.defineProperty(to.meta, \"__navigationId\", { value: navigationId++ });\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\ttitle: \"Start of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\tdata,\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\trouter.afterEach((to, from, failure) => {\n\t\t\tconst data = { guard: formatDisplay(\"afterEach\") };\n\t\t\tif (failure) {\n\t\t\t\tdata.failure = { _custom: {\n\t\t\t\t\ttype: Error,\n\t\t\t\t\treadOnly: true,\n\t\t\t\t\tdisplay: failure ? failure.message : \"\",\n\t\t\t\t\ttooltip: \"Navigation Failure\",\n\t\t\t\t\tvalue: failure\n\t\t\t\t} };\n\t\t\t\tdata.status = formatDisplay(\"❌\");\n\t\t\t} else data.status = formatDisplay(\"✅\");\n\t\t\tdata.from = formatRouteLocation(from, \"Current Location during this navigation\");\n\t\t\tdata.to = formatRouteLocation(to, \"Target location\");\n\t\t\tapi.addTimelineEvent({\n\t\t\t\tlayerId: navigationsLayerId,\n\t\t\t\tevent: {\n\t\t\t\t\ttitle: \"End of navigation\",\n\t\t\t\t\tsubtitle: to.fullPath,\n\t\t\t\t\ttime: api.now(),\n\t\t\t\t\tdata,\n\t\t\t\t\tlogType: failure ? \"warning\" : \"default\",\n\t\t\t\t\tgroupId: to.meta.__navigationId\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\t/**\n\t\t* Inspector of Existing routes\n\t\t*/\n\t\tconst routerInspectorId = \"router-inspector:\" + id;\n\t\tapi.addInspector({\n\t\t\tid: routerInspectorId,\n\t\t\tlabel: \"Routes\" + (id ? \" \" + id : \"\"),\n\t\t\ticon: \"book\",\n\t\t\ttreeFilterPlaceholder: \"Search routes\"\n\t\t});\n\t\tfunction refreshRoutesView() {\n\t\t\tif (!activeRoutesPayload) return;\n\t\t\tconst payload = activeRoutesPayload;\n\t\t\tlet routes = matcher.getRoutes().filter((route) => !route.parent || !route.parent.record.components);\n\t\t\troutes.forEach(resetMatchStateOnRouteRecord);\n\t\t\tif (payload.filter) routes = routes.filter((route) => isRouteMatching(route, payload.filter.toLowerCase()));\n\t\t\troutes.forEach((route) => markRouteRecordActive(route, router.currentRoute.value));\n\t\t\tpayload.rootNodes = routes.map(formatRouteRecordForInspector);\n\t\t}\n\t\tlet activeRoutesPayload;\n\t\tapi.on.getInspectorTree((payload) => {\n\t\t\tactiveRoutesPayload = payload;\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) refreshRoutesView();\n\t\t});\n\t\t/**\n\t\t* Display information about the currently selected route record\n\t\t*/\n\t\tapi.on.getInspectorState((payload) => {\n\t\t\tif (payload.app === app && payload.inspectorId === routerInspectorId) {\n\t\t\t\tconst route = matcher.getRoutes().find((route) => route.record.__vd_id === payload.nodeId);\n\t\t\t\tif (route) payload.state = { options: formatRouteRecordMatcherForStateInspector(route) };\n\t\t\t}\n\t\t});\n\t\tapi.sendInspectorTree(routerInspectorId);\n\t\tapi.sendInspectorState(routerInspectorId);\n\t});\n}\nfunction modifierForKey(key) {\n\tif (key.optional) return key.repeatable ? \"*\" : \"?\";\n\telse return key.repeatable ? \"+\" : \"\";\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n\tconst { record } = route;\n\tconst fields = [{\n\t\teditable: false,\n\t\tkey: \"path\",\n\t\tvalue: record.path\n\t}];\n\tif (record.name != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"name\",\n\t\tvalue: record.name\n\t});\n\tfields.push({\n\t\teditable: false,\n\t\tkey: \"regexp\",\n\t\tvalue: route.re\n\t});\n\tif (route.keys.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"keys\",\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n\t\t\ttooltip: \"Param keys\",\n\t\t\tvalue: route.keys\n\t\t} }\n\t});\n\tif (record.redirect != null) fields.push({\n\t\teditable: false,\n\t\tkey: \"redirect\",\n\t\tvalue: record.redirect\n\t});\n\tif (route.alias.length) fields.push({\n\t\teditable: false,\n\t\tkey: \"aliases\",\n\t\tvalue: route.alias.map((alias) => alias.record.path)\n\t});\n\tif (Object.keys(route.record.meta).length) fields.push({\n\t\teditable: false,\n\t\tkey: \"meta\",\n\t\tvalue: route.record.meta\n\t});\n\tfields.push({\n\t\tkey: \"score\",\n\t\teditable: false,\n\t\tvalue: { _custom: {\n\t\t\ttype: null,\n\t\t\treadOnly: true,\n\t\t\tdisplay: route.score.map((score) => score.join(\", \")).join(\" | \"),\n\t\t\ttooltip: \"Score used to sort routes\",\n\t\t\tvalue: route.score\n\t\t} }\n\t});\n\treturn fields;\n}\n/**\n* Extracted from tailwind palette\n*/\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nconst RED_100 = 16704226;\nconst RED_700 = 12131356;\nfunction formatRouteRecordForInspector(route) {\n\tconst tags = [];\n\tconst { record } = route;\n\tif (record.name != null) tags.push({\n\t\tlabel: String(record.name),\n\t\ttextColor: 0,\n\t\tbackgroundColor: CYAN_400\n\t});\n\tif (record.aliasOf) tags.push({\n\t\tlabel: \"alias\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: ORANGE_400\n\t});\n\tif (route.__vd_match) tags.push({\n\t\tlabel: \"matches\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: PINK_500\n\t});\n\tif (route.__vd_exactActive) tags.push({\n\t\tlabel: \"exact\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: LIME_500\n\t});\n\tif (route.__vd_active) tags.push({\n\t\tlabel: \"active\",\n\t\ttextColor: 0,\n\t\tbackgroundColor: BLUE_600\n\t});\n\tif (record.redirect) tags.push({\n\t\tlabel: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n\t\ttextColor: 16777215,\n\t\tbackgroundColor: DARK\n\t});\n\tlet id = record.__vd_id;\n\tif (id == null) {\n\t\tid = String(routeRecordId++);\n\t\trecord.__vd_id = id;\n\t}\n\treturn {\n\t\tid,\n\t\tlabel: record.path,\n\t\ttags,\n\t\tchildren: route.children.map(formatRouteRecordForInspector)\n\t};\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n\tconst isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n\troute.__vd_exactActive = route.__vd_active = isExactActive;\n\tif (!isExactActive) route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n\troute.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n\troute.__vd_match = false;\n\troute.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n\tconst found = String(route.re).match(EXTRACT_REGEXP_RE);\n\troute.__vd_match = false;\n\tif (!found || found.length < 3) return false;\n\tif (new RegExp(found[1].replace(/\\$$/, \"\"), found[2]).test(filter)) {\n\t\troute.children.forEach((child) => isRouteMatching(child, filter));\n\t\tif (route.record.path !== \"/\" || filter === \"/\") {\n\t\t\troute.__vd_match = route.re.test(filter);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\tconst path = route.record.path.toLowerCase();\n\tconst decodedPath = decode(path);\n\tif (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter))) return true;\n\tif (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;\n\tif (route.record.name && String(route.record.name).includes(filter)) return true;\n\treturn route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n\tconst ret = {};\n\tfor (const key in obj) if (!keys.includes(key)) ret[key] = obj[key];\n\treturn ret;\n}\n\n//#endregion\nexport { resolveRelativePath as A, normalizeBase as C, isSameRouteLocationParams as D, isSameRouteLocation as E, encodeParam as F, encodePath as I, warn$1 as L, stripBase as M, decode as N, isSameRouteRecord as O, encodeHash as P, createHref as S, START_LOCATION_NORMALIZED as T, saveScrollPosition as _, loadRouteLocation as a, NavigationType as b, useCallbacks as c, stringifyQuery as d, isRouteLocation as f, getScrollKey as g, getSavedScrollPosition as h, guardToPromiseFn as i, stringifyURL as j, parseURL as k, normalizeQuery as l, computeScrollPosition as m, extractChangingRecords as n, onBeforeRouteLeave as o, isRouteName as p, extractComponentsGuards as r, onBeforeRouteUpdate as s, addDevtools as t, parseQuery as u, scrollToPosition as v, NEW_stringifyURL as w, START as x, NavigationDirection as y };","/*!\n * vue-router v5.0.3\n * (c) 2026 Eduardo San Martin Morote\n * @license MIT\n */\nimport { a as routerKey, b as isBrowser, c as ErrorTypes, d as isNavigationFailure, f as applyToParams, h as isArray, i as routeLocationKey, l as NavigationFailureType, n as useRouter, o as routerViewLocationKey, p as assign, r as matchedRouteKey, s as viewDepthKey, t as useRoute, u as createRouterError, v as mergeOptions, y as noop } from \"./useApi-j1E6pMaV.js\";\nimport { C as normalizeBase, D as isSameRouteLocationParams, E as isSameRouteLocation, F as encodeParam, L as warn$1, M as stripBase, N as decode, O as isSameRouteRecord, P as encodeHash, S as createHref, T as START_LOCATION_NORMALIZED, _ as saveScrollPosition, a as loadRouteLocation, b as NavigationType, c as useCallbacks, d as stringifyQuery, f as isRouteLocation, g as getScrollKey, h as getSavedScrollPosition, i as guardToPromiseFn, j as stringifyURL, k as parseURL, l as normalizeQuery, m as computeScrollPosition, n as extractChangingRecords, o as onBeforeRouteLeave, p as isRouteName, r as extractComponentsGuards, s as onBeforeRouteUpdate, t as addDevtools, u as parseQuery, v as scrollToPosition, x as START, y as NavigationDirection } from \"./devtools-CVsCuYdF.js\";\nimport { computed, defineComponent, getCurrentInstance, h, inject, nextTick, provide, reactive, ref, shallowReactive, shallowRef, unref, watch, watchEffect } from \"vue\";\n\n//#region src/history/html5.ts\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\n/**\n* Creates a normalized history location from a window.location object\n* @param base - The base path\n* @param location - The window.location object\n*/\nfunction createCurrentLocation(base, location) {\n\tconst { pathname, search, hash } = location;\n\tconst hashPos = base.indexOf(\"#\");\n\tif (hashPos > -1) {\n\t\tlet slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n\t\tlet pathFromHash = hash.slice(slicePos);\n\t\tif (pathFromHash[0] !== \"/\") pathFromHash = \"/\" + pathFromHash;\n\t\treturn stripBase(pathFromHash, \"\");\n\t}\n\treturn stripBase(pathname, base) + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n\tlet listeners = [];\n\tlet teardowns = [];\n\tlet pauseState = null;\n\tconst popStateHandler = ({ state }) => {\n\t\tconst to = createCurrentLocation(base, location);\n\t\tconst from = currentLocation.value;\n\t\tconst fromState = historyState.value;\n\t\tlet delta = 0;\n\t\tif (state) {\n\t\t\tcurrentLocation.value = to;\n\t\t\thistoryState.value = state;\n\t\t\tif (pauseState && pauseState === from) {\n\t\t\t\tpauseState = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdelta = fromState ? state.position - fromState.position : 0;\n\t\t} else replace(to);\n\t\tlisteners.forEach((listener) => {\n\t\t\tlistener(currentLocation.value, from, {\n\t\t\t\tdelta,\n\t\t\t\ttype: NavigationType.pop,\n\t\t\t\tdirection: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n\t\t\t});\n\t\t});\n\t};\n\tfunction pauseListeners() {\n\t\tpauseState = currentLocation.value;\n\t}\n\tfunction listen(callback) {\n\t\tlisteners.push(callback);\n\t\tconst teardown = () => {\n\t\t\tconst index = listeners.indexOf(callback);\n\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t};\n\t\tteardowns.push(teardown);\n\t\treturn teardown;\n\t}\n\tfunction beforeUnloadListener() {\n\t\tif (document.visibilityState === \"hidden\") {\n\t\t\tconst { history } = window;\n\t\t\tif (!history.state) return;\n\t\t\thistory.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), \"\");\n\t\t}\n\t}\n\tfunction destroy() {\n\t\tfor (const teardown of teardowns) teardown();\n\t\tteardowns = [];\n\t\twindow.removeEventListener(\"popstate\", popStateHandler);\n\t\twindow.removeEventListener(\"pagehide\", beforeUnloadListener);\n\t\tdocument.removeEventListener(\"visibilitychange\", beforeUnloadListener);\n\t}\n\twindow.addEventListener(\"popstate\", popStateHandler);\n\twindow.addEventListener(\"pagehide\", beforeUnloadListener);\n\tdocument.addEventListener(\"visibilitychange\", beforeUnloadListener);\n\treturn {\n\t\tpauseListeners,\n\t\tlisten,\n\t\tdestroy\n\t};\n}\n/**\n* Creates a state object\n*/\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n\treturn {\n\t\tback,\n\t\tcurrent,\n\t\tforward,\n\t\treplaced,\n\t\tposition: window.history.length,\n\t\tscroll: computeScroll ? computeScrollPosition() : null\n\t};\n}\nfunction useHistoryStateNavigation(base) {\n\tconst { history, location } = window;\n\tconst currentLocation = { value: createCurrentLocation(base, location) };\n\tconst historyState = { value: history.state };\n\tif (!historyState.value) changeLocation(currentLocation.value, {\n\t\tback: null,\n\t\tcurrent: currentLocation.value,\n\t\tforward: null,\n\t\tposition: history.length - 1,\n\t\treplaced: true,\n\t\tscroll: null\n\t}, true);\n\tfunction changeLocation(to, state, replace) {\n\t\t/**\n\t\t* if a base tag is provided, and we are on a normal domain, we have to\n\t\t* respect the provided `base` attribute because pushState() will use it and\n\t\t* potentially erase anything before the `#` like at\n\t\t* https://github.com/vuejs/router/issues/685 where a base of\n\t\t* `/folder/#` but a base of `/` would erase the `/folder/` section. If\n\t\t* there is no host, the `<base>` tag makes no sense and if there isn't a\n\t\t* base tag we can just use everything after the `#`.\n\t\t*/\n\t\tconst hashIndex = base.indexOf(\"#\");\n\t\tconst url = hashIndex > -1 ? (location.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n\t\ttry {\n\t\t\thistory[replace ? \"replaceState\" : \"pushState\"](state, \"\", url);\n\t\t\thistoryState.value = state;\n\t\t} catch (err) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Error with push/replace State\", err);\n\t\t\telse console.error(err);\n\t\t\tlocation[replace ? \"replace\" : \"assign\"](url);\n\t\t}\n\t}\n\tfunction replace(to, data) {\n\t\tchangeLocation(to, assign({}, history.state, buildState(historyState.value.back, to, historyState.value.forward, true), data, { position: historyState.value.position }), true);\n\t\tcurrentLocation.value = to;\n\t}\n\tfunction push(to, data) {\n\t\tconst currentState = assign({}, historyState.value, history.state, {\n\t\t\tforward: to,\n\t\t\tscroll: computeScrollPosition()\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\" && !history.state) warn$1(\"history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\\n\\nhistory.replaceState(history.state, '', url)\\n\\nYou can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state\");\n\t\tchangeLocation(currentState.current, currentState, true);\n\t\tchangeLocation(to, assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data), false);\n\t\tcurrentLocation.value = to;\n\t}\n\treturn {\n\t\tlocation: currentLocation,\n\t\tstate: historyState,\n\t\tpush,\n\t\treplace\n\t};\n}\n/**\n* Creates an HTML5 history. Most common history for single page applications.\n*\n* @param base -\n*/\nfunction createWebHistory(base) {\n\tbase = normalizeBase(base);\n\tconst historyNavigation = useHistoryStateNavigation(base);\n\tconst historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n\tfunction go(delta, triggerListeners = true) {\n\t\tif (!triggerListeners) historyListeners.pauseListeners();\n\t\thistory.go(delta);\n\t}\n\tconst routerHistory = assign({\n\t\tlocation: \"\",\n\t\tbase,\n\t\tgo,\n\t\tcreateHref: createHref.bind(null, base)\n\t}, historyNavigation, historyListeners);\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.location.value\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => historyNavigation.state.value\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/memory.ts\n/**\n* Creates an in-memory based history. The main purpose of this history is to handle SSR. It starts in a special location that is nowhere.\n* It's up to the user to replace that location with the starter location by either calling `router.push` or `router.replace`.\n*\n* @param base - Base applied to all urls, defaults to '/'\n* @returns a history object that can be passed to the router constructor\n*/\nfunction createMemoryHistory(base = \"\") {\n\tlet listeners = [];\n\tlet queue = [[START, {}]];\n\tlet position = 0;\n\tbase = normalizeBase(base);\n\tfunction setLocation(location, state = {}) {\n\t\tposition++;\n\t\tif (position !== queue.length) queue.splice(position);\n\t\tqueue.push([location, state]);\n\t}\n\tfunction triggerListeners(to, from, { direction, delta }) {\n\t\tconst info = {\n\t\t\tdirection,\n\t\t\tdelta,\n\t\t\ttype: NavigationType.pop\n\t\t};\n\t\tfor (const callback of listeners) callback(to, from, info);\n\t}\n\tconst routerHistory = {\n\t\tlocation: START,\n\t\tstate: {},\n\t\tbase,\n\t\tcreateHref: createHref.bind(null, base),\n\t\treplace(to, state) {\n\t\t\tqueue.splice(position--, 1);\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tpush(to, state) {\n\t\t\tsetLocation(to, state);\n\t\t},\n\t\tlisten(callback) {\n\t\t\tlisteners.push(callback);\n\t\t\treturn () => {\n\t\t\t\tconst index = listeners.indexOf(callback);\n\t\t\t\tif (index > -1) listeners.splice(index, 1);\n\t\t\t};\n\t\t},\n\t\tdestroy() {\n\t\t\tlisteners = [];\n\t\t\tqueue = [[START, {}]];\n\t\t\tposition = 0;\n\t\t},\n\t\tgo(delta, shouldTrigger = true) {\n\t\t\tconst from = this.location;\n\t\t\tconst direction = delta < 0 ? NavigationDirection.back : NavigationDirection.forward;\n\t\t\tposition = Math.max(0, Math.min(position + delta, queue.length - 1));\n\t\t\tif (shouldTrigger) triggerListeners(this.location, from, {\n\t\t\t\tdirection,\n\t\t\t\tdelta\n\t\t\t});\n\t\t}\n\t};\n\tObject.defineProperty(routerHistory, \"location\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][0]\n\t});\n\tObject.defineProperty(routerHistory, \"state\", {\n\t\tenumerable: true,\n\t\tget: () => queue[position][1]\n\t});\n\treturn routerHistory;\n}\n\n//#endregion\n//#region src/history/hash.ts\n/**\n* Creates a hash history. Useful for web applications with no host (e.g. `file://`) or when configuring a server to\n* handle any URL is not possible.\n*\n* @param base - optional base to provide. Defaults to `location.pathname + location.search` If there is a `<base>` tag\n* in the `head`, its value will be ignored in favor of this parameter **but note it affects all the history.pushState()\n* calls**, meaning that if you use a `<base>` tag, it's `href` value **has to match this parameter** (ignoring anything\n* after the `#`).\n*\n* @example\n* ```js\n* // at https://example.com/folder\n* createWebHashHistory() // gives a url of `https://example.com/folder#`\n* createWebHashHistory('/folder/') // gives a url of `https://example.com/folder/#`\n* // if the `#` is provided in the base, it won't be added by `createWebHashHistory`\n* createWebHashHistory('/folder/#/app/') // gives a url of `https://example.com/folder/#/app/`\n* // you should avoid doing this because it changes the original url and breaks copying urls\n* createWebHashHistory('/other-folder/') // gives a url of `https://example.com/other-folder/#`\n*\n* // at file:///usr/etc/folder/index.html\n* // for locations with no `host`, the base is ignored\n* createWebHashHistory('/iAmIgnored') // gives a url of `file:///usr/etc/folder/index.html#`\n* ```\n*/\nfunction createWebHashHistory(base) {\n\tbase = location.host ? base || location.pathname + location.search : \"\";\n\tif (!base.includes(\"#\")) base += \"#\";\n\tif (process.env.NODE_ENV !== \"production\" && !base.endsWith(\"#/\") && !base.endsWith(\"#\")) warn$1(`A hash base must end with a \"#\":\\n\"${base}\" should be \"${base.replace(/#.*$/, \"#\")}\".`);\n\treturn createWebHistory(base);\n}\n\n//#endregion\n//#region src/matcher/pathTokenizer.ts\nlet TokenType = /* @__PURE__ */ function(TokenType) {\n\tTokenType[TokenType[\"Static\"] = 0] = \"Static\";\n\tTokenType[TokenType[\"Param\"] = 1] = \"Param\";\n\tTokenType[TokenType[\"Group\"] = 2] = \"Group\";\n\treturn TokenType;\n}({});\nvar TokenizerState = /* @__PURE__ */ function(TokenizerState) {\n\tTokenizerState[TokenizerState[\"Static\"] = 0] = \"Static\";\n\tTokenizerState[TokenizerState[\"Param\"] = 1] = \"Param\";\n\tTokenizerState[TokenizerState[\"ParamRegExp\"] = 2] = \"ParamRegExp\";\n\tTokenizerState[TokenizerState[\"ParamRegExpEnd\"] = 3] = \"ParamRegExpEnd\";\n\tTokenizerState[TokenizerState[\"EscapeNext\"] = 4] = \"EscapeNext\";\n\treturn TokenizerState;\n}(TokenizerState || {});\nconst ROOT_TOKEN = {\n\ttype: TokenType.Static,\n\tvalue: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n\tif (!path) return [[]];\n\tif (path === \"/\") return [[ROOT_TOKEN]];\n\tif (!path.startsWith(\"/\")) throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n\tfunction crash(message) {\n\t\tthrow new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n\t}\n\tlet state = TokenizerState.Static;\n\tlet previousState = state;\n\tconst tokens = [];\n\tlet segment;\n\tfunction finalizeSegment() {\n\t\tif (segment) tokens.push(segment);\n\t\tsegment = [];\n\t}\n\tlet i = 0;\n\tlet char;\n\tlet buffer = \"\";\n\tlet customRe = \"\";\n\tfunction consumeBuffer() {\n\t\tif (!buffer) return;\n\t\tif (state === TokenizerState.Static) segment.push({\n\t\t\ttype: TokenType.Static,\n\t\t\tvalue: buffer\n\t\t});\n\t\telse if (state === TokenizerState.Param || state === TokenizerState.ParamRegExp || state === TokenizerState.ParamRegExpEnd) {\n\t\t\tif (segment.length > 1 && (char === \"*\" || char === \"+\")) crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n\t\t\tsegment.push({\n\t\t\t\ttype: TokenType.Param,\n\t\t\t\tvalue: buffer,\n\t\t\t\tregexp: customRe,\n\t\t\t\trepeatable: char === \"*\" || char === \"+\",\n\t\t\t\toptional: char === \"*\" || char === \"?\"\n\t\t\t});\n\t\t} else crash(\"Invalid state to consume buffer\");\n\t\tbuffer = \"\";\n\t}\n\tfunction addCharToBuffer() {\n\t\tbuffer += char;\n\t}\n\twhile (i < path.length) {\n\t\tchar = path[i++];\n\t\tif (char === \"\\\\\" && state !== TokenizerState.ParamRegExp) {\n\t\t\tpreviousState = state;\n\t\t\tstate = TokenizerState.EscapeNext;\n\t\t\tcontinue;\n\t\t}\n\t\tswitch (state) {\n\t\t\tcase TokenizerState.Static:\n\t\t\t\tif (char === \"/\") {\n\t\t\t\t\tif (buffer) consumeBuffer();\n\t\t\t\t\tfinalizeSegment();\n\t\t\t\t} else if (char === \":\") {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Param;\n\t\t\t\t} else addCharToBuffer();\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.EscapeNext:\n\t\t\t\taddCharToBuffer();\n\t\t\t\tstate = previousState;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.Param:\n\t\t\t\tif (char === \"(\") state = TokenizerState.ParamRegExp;\n\t\t\t\telse if (VALID_PARAM_RE.test(char)) addCharToBuffer();\n\t\t\t\telse {\n\t\t\t\t\tconsumeBuffer();\n\t\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExp:\n\t\t\t\tif (char === \")\") if (customRe[customRe.length - 1] == \"\\\\\") customRe = customRe.slice(0, -1) + char;\n\t\t\t\telse state = TokenizerState.ParamRegExpEnd;\n\t\t\t\telse customRe += char;\n\t\t\t\tbreak;\n\t\t\tcase TokenizerState.ParamRegExpEnd:\n\t\t\t\tconsumeBuffer();\n\t\t\t\tstate = TokenizerState.Static;\n\t\t\t\tif (char !== \"*\" && char !== \"?\" && char !== \"+\") i--;\n\t\t\t\tcustomRe = \"\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcrash(\"Unknown state\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tif (state === TokenizerState.ParamRegExp) crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n\tconsumeBuffer();\n\tfinalizeSegment();\n\treturn tokens;\n}\n\n//#endregion\n//#region src/matcher/pathParserRanker.ts\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n\tsensitive: false,\n\tstrict: false,\n\tstart: true,\n\tend: true\n};\nvar PathScore = /* @__PURE__ */ function(PathScore) {\n\tPathScore[PathScore[\"_multiplier\"] = 10] = \"_multiplier\";\n\tPathScore[PathScore[\"Root\"] = 90] = \"Root\";\n\tPathScore[PathScore[\"Segment\"] = 40] = \"Segment\";\n\tPathScore[PathScore[\"SubSegment\"] = 30] = \"SubSegment\";\n\tPathScore[PathScore[\"Static\"] = 40] = \"Static\";\n\tPathScore[PathScore[\"Dynamic\"] = 20] = \"Dynamic\";\n\tPathScore[PathScore[\"BonusCustomRegExp\"] = 10] = \"BonusCustomRegExp\";\n\tPathScore[PathScore[\"BonusWildcard\"] = -50] = \"BonusWildcard\";\n\tPathScore[PathScore[\"BonusRepeatable\"] = -20] = \"BonusRepeatable\";\n\tPathScore[PathScore[\"BonusOptional\"] = -8] = \"BonusOptional\";\n\tPathScore[PathScore[\"BonusStrict\"] = .7000000000000001] = \"BonusStrict\";\n\tPathScore[PathScore[\"BonusCaseSensitive\"] = .25] = \"BonusCaseSensitive\";\n\treturn PathScore;\n}(PathScore || {});\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\n/**\n* Creates a path parser from an array of Segments (a segment is an array of Tokens)\n*\n* @param segments - array of segments returned by tokenizePath\n* @param extraOptions - optional options for the regexp\n* @returns a PathParser\n*/\nfunction tokensToParser(segments, extraOptions) {\n\tconst options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n\tconst score = [];\n\tlet pattern = options.start ? \"^\" : \"\";\n\tconst keys = [];\n\tfor (const segment of segments) {\n\t\tconst segmentScores = segment.length ? [] : [PathScore.Root];\n\t\tif (options.strict && !segment.length) pattern += \"/\";\n\t\tfor (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n\t\t\tconst token = segment[tokenIndex];\n\t\t\tlet subSegmentScore = PathScore.Segment + (options.sensitive ? PathScore.BonusCaseSensitive : 0);\n\t\t\tif (token.type === TokenType.Static) {\n\t\t\t\tif (!tokenIndex) pattern += \"/\";\n\t\t\t\tpattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n\t\t\t\tsubSegmentScore += PathScore.Static;\n\t\t\t} else if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional, regexp } = token;\n\t\t\t\tkeys.push({\n\t\t\t\t\tname: value,\n\t\t\t\t\trepeatable,\n\t\t\t\t\toptional\n\t\t\t\t});\n\t\t\t\tconst re = regexp ? regexp : BASE_PARAM_PATTERN;\n\t\t\t\tif (re !== BASE_PARAM_PATTERN) {\n\t\t\t\t\tsubSegmentScore += PathScore.BonusCustomRegExp;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew RegExp(`(${re})`);\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\tthrow new Error(`Invalid custom RegExp for param \"${value}\" (${re}): ` + err.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet subPattern = repeatable ? `((?:${re})(?:/(?:${re}))*)` : `(${re})`;\n\t\t\t\tif (!tokenIndex) subPattern = optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n\t\t\t\tif (optional) subPattern += \"?\";\n\t\t\t\tpattern += subPattern;\n\t\t\t\tsubSegmentScore += PathScore.Dynamic;\n\t\t\t\tif (optional) subSegmentScore += PathScore.BonusOptional;\n\t\t\t\tif (repeatable) subSegmentScore += PathScore.BonusRepeatable;\n\t\t\t\tif (re === \".*\") subSegmentScore += PathScore.BonusWildcard;\n\t\t\t}\n\t\t\tsegmentScores.push(subSegmentScore);\n\t\t}\n\t\tscore.push(segmentScores);\n\t}\n\tif (options.strict && options.end) {\n\t\tconst i = score.length - 1;\n\t\tscore[i][score[i].length - 1] += PathScore.BonusStrict;\n\t}\n\tif (!options.strict) pattern += \"/?\";\n\tif (options.end) pattern += \"$\";\n\telse if (options.strict && !pattern.endsWith(\"/\")) pattern += \"(?:/|$)\";\n\tconst re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n\tfunction parse(path) {\n\t\tconst match = path.match(re);\n\t\tconst params = {};\n\t\tif (!match) return null;\n\t\tfor (let i = 1; i < match.length; i++) {\n\t\t\tconst value = match[i] || \"\";\n\t\t\tconst key = keys[i - 1];\n\t\t\tparams[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n\t\t}\n\t\treturn params;\n\t}\n\tfunction stringify(params) {\n\t\tlet path = \"\";\n\t\tlet avoidDuplicatedSlash = false;\n\t\tfor (const segment of segments) {\n\t\t\tif (!avoidDuplicatedSlash || !path.endsWith(\"/\")) path += \"/\";\n\t\t\tavoidDuplicatedSlash = false;\n\t\t\tfor (const token of segment) if (token.type === TokenType.Static) path += token.value;\n\t\t\telse if (token.type === TokenType.Param) {\n\t\t\t\tconst { value, repeatable, optional } = token;\n\t\t\t\tconst param = value in params ? params[value] : \"\";\n\t\t\t\tif (isArray(param) && !repeatable) throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n\t\t\t\tconst text = isArray(param) ? param.join(\"/\") : param;\n\t\t\t\tif (!text) if (optional) {\n\t\t\t\t\tif (segment.length < 2) if (path.endsWith(\"/\")) path = path.slice(0, -1);\n\t\t\t\t\telse avoidDuplicatedSlash = true;\n\t\t\t\t} else throw new Error(`Missing required param \"${value}\"`);\n\t\t\t\tpath += text;\n\t\t\t}\n\t\t}\n\t\treturn path || \"/\";\n\t}\n\treturn {\n\t\tre,\n\t\tscore,\n\t\tkeys,\n\t\tparse,\n\t\tstringify\n\t};\n}\n/**\n* Compares an array of numbers as used in PathParser.score and returns a\n* number. This function can be used to `sort` an array\n*\n* @param a - first array of numbers\n* @param b - second array of numbers\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n* should be sorted first\n*/\nfunction compareScoreArray(a, b) {\n\tlet i = 0;\n\twhile (i < a.length && i < b.length) {\n\t\tconst diff = b[i] - a[i];\n\t\tif (diff) return diff;\n\t\ti++;\n\t}\n\tif (a.length < b.length) return a.length === 1 && a[0] === PathScore.Static + PathScore.Segment ? -1 : 1;\n\telse if (a.length > b.length) return b.length === 1 && b[0] === PathScore.Static + PathScore.Segment ? 1 : -1;\n\treturn 0;\n}\n/**\n* Compare function that can be used with `sort` to sort an array of PathParser\n*\n* @param a - first PathParser\n* @param b - second PathParser\n* @returns 0 if both are equal, < 0 if a should be sorted first, > 0 if b\n*/\nfunction comparePathParserScore(a, b) {\n\tlet i = 0;\n\tconst aScore = a.score;\n\tconst bScore = b.score;\n\twhile (i < aScore.length && i < bScore.length) {\n\t\tconst comp = compareScoreArray(aScore[i], bScore[i]);\n\t\tif (comp) return comp;\n\t\ti++;\n\t}\n\tif (Math.abs(bScore.length - aScore.length) === 1) {\n\t\tif (isLastScoreNegative(aScore)) return 1;\n\t\tif (isLastScoreNegative(bScore)) return -1;\n\t}\n\treturn bScore.length - aScore.length;\n}\n/**\n* This allows detecting splats at the end of a path: /home/:id(.*)*\n*\n* @param score - score to check\n* @returns true if the last entry is negative\n*/\nfunction isLastScoreNegative(score) {\n\tconst last = score[score.length - 1];\n\treturn score.length > 0 && last[last.length - 1] < 0;\n}\nconst PATH_PARSER_OPTIONS_DEFAULTS = {\n\tstrict: false,\n\tend: true,\n\tsensitive: false\n};\n\n//#endregion\n//#region src/matcher/pathMatcher.ts\nfunction createRouteRecordMatcher(record, parent, options) {\n\tconst parser = tokensToParser(tokenizePath(record.path), options);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst existingKeys = /* @__PURE__ */ new Set();\n\t\tfor (const key of parser.keys) {\n\t\t\tif (existingKeys.has(key.name)) warn$1(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n\t\t\texistingKeys.add(key.name);\n\t\t}\n\t}\n\tconst matcher = assign(parser, {\n\t\trecord,\n\t\tparent,\n\t\tchildren: [],\n\t\talias: []\n\t});\n\tif (parent) {\n\t\tif (!matcher.record.aliasOf === !parent.record.aliasOf) parent.children.push(matcher);\n\t}\n\treturn matcher;\n}\n\n//#endregion\n//#region src/matcher/index.ts\n/**\n* Creates a Router Matcher.\n*\n* @internal\n* @param routes - array of initial routes\n* @param globalOptions - global route options\n*/\nfunction createRouterMatcher(routes, globalOptions) {\n\tconst matchers = [];\n\tconst matcherMap = /* @__PURE__ */ new Map();\n\tglobalOptions = mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS, globalOptions);\n\tfunction getRecordMatcher(name) {\n\t\treturn matcherMap.get(name);\n\t}\n\tfunction addRoute(record, parent, originalRecord) {\n\t\tconst isRootAdd = !originalRecord;\n\t\tconst mainNormalizedRecord = normalizeRouteRecord(record);\n\t\tif (process.env.NODE_ENV !== \"production\") checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n\t\tmainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n\t\tconst options = mergeOptions(globalOptions, record);\n\t\tconst normalizedRecords = [mainNormalizedRecord];\n\t\tif (\"alias\" in record) {\n\t\t\tconst aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n\t\t\tfor (const alias of aliases) normalizedRecords.push(normalizeRouteRecord(assign({}, mainNormalizedRecord, {\n\t\t\t\tcomponents: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n\t\t\t\tpath: alias,\n\t\t\t\taliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n\t\t\t})));\n\t\t}\n\t\tlet matcher;\n\t\tlet originalMatcher;\n\t\tfor (const normalizedRecord of normalizedRecords) {\n\t\t\tconst { path } = normalizedRecord;\n\t\t\tif (parent && path[0] !== \"/\") {\n\t\t\t\tconst parentPath = parent.record.path;\n\t\t\t\tconst connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n\t\t\t\tnormalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") throw new Error(\"Catch all routes (\\\"*\\\") must now be defined using a param with a custom regexp.\\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.\");\n\t\t\tmatcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\") checkMissingParamsInAbsolutePath(matcher, parent);\n\t\t\tif (originalRecord) {\n\t\t\t\toriginalRecord.alias.push(matcher);\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameParams(originalRecord, matcher);\n\t\t\t} else {\n\t\t\t\toriginalMatcher = originalMatcher || matcher;\n\t\t\t\tif (originalMatcher !== matcher) originalMatcher.alias.push(matcher);\n\t\t\t\tif (isRootAdd && record.name && !isAliasRecord(matcher)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") checkSameNameAsAncestor(record, parent);\n\t\t\t\t\tremoveRoute(record.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isMatchable(matcher)) insertMatcher(matcher);\n\t\t\tif (mainNormalizedRecord.children) {\n\t\t\t\tconst children = mainNormalizedRecord.children;\n\t\t\t\tfor (let i = 0; i < children.length; i++) addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n\t\t\t}\n\t\t\toriginalRecord = originalRecord || matcher;\n\t\t}\n\t\treturn originalMatcher ? () => {\n\t\t\tremoveRoute(originalMatcher);\n\t\t} : noop;\n\t}\n\tfunction removeRoute(matcherRef) {\n\t\tif (isRouteName(matcherRef)) {\n\t\t\tconst matcher = matcherMap.get(matcherRef);\n\t\t\tif (matcher) {\n\t\t\t\tmatcherMap.delete(matcherRef);\n\t\t\t\tmatchers.splice(matchers.indexOf(matcher), 1);\n\t\t\t\tmatcher.children.forEach(removeRoute);\n\t\t\t\tmatcher.alias.forEach(removeRoute);\n\t\t\t}\n\t\t} else {\n\t\t\tconst index = matchers.indexOf(matcherRef);\n\t\t\tif (index > -1) {\n\t\t\t\tmatchers.splice(index, 1);\n\t\t\t\tif (matcherRef.record.name) matcherMap.delete(matcherRef.record.name);\n\t\t\t\tmatcherRef.children.forEach(removeRoute);\n\t\t\t\tmatcherRef.alias.forEach(removeRoute);\n\t\t\t}\n\t\t}\n\t}\n\tfunction getRoutes() {\n\t\treturn matchers;\n\t}\n\tfunction insertMatcher(matcher) {\n\t\tconst index = findInsertionIndex(matcher, matchers);\n\t\tmatchers.splice(index, 0, matcher);\n\t\tif (matcher.record.name && !isAliasRecord(matcher)) matcherMap.set(matcher.record.name, matcher);\n\t}\n\tfunction resolve(location, currentLocation) {\n\t\tlet matcher;\n\t\tlet params = {};\n\t\tlet path;\n\t\tlet name;\n\t\tif (\"name\" in location && location.name) {\n\t\t\tmatcher = matcherMap.get(location.name);\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, { location });\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tconst invalidParams = Object.keys(location.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n\t\t\t\tif (invalidParams.length) warn$1(`Discarded invalid param(s) \"${invalidParams.join(\"\\\", \\\"\")}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n\t\t\t}\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign(pickParams(currentLocation.params, matcher.keys.filter((k) => !k.optional).concat(matcher.parent ? matcher.parent.keys.filter((k) => k.optional) : []).map((k) => k.name)), location.params && pickParams(location.params, matcher.keys.map((k) => k.name)));\n\t\t\tpath = matcher.stringify(params);\n\t\t} else if (location.path != null) {\n\t\t\tpath = location.path;\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) warn$1(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`);\n\t\t\tmatcher = matchers.find((m) => m.re.test(path));\n\t\t\tif (matcher) {\n\t\t\t\tparams = matcher.parse(path);\n\t\t\t\tname = matcher.record.name;\n\t\t\t}\n\t\t} else {\n\t\t\tmatcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m) => m.re.test(currentLocation.path));\n\t\t\tif (!matcher) throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND, {\n\t\t\t\tlocation,\n\t\t\t\tcurrentLocation\n\t\t\t});\n\t\t\tname = matcher.record.name;\n\t\t\tparams = assign({}, currentLocation.params, location.params);\n\t\t\tpath = matcher.stringify(params);\n\t\t}\n\t\tconst matched = [];\n\t\tlet parentMatcher = matcher;\n\t\twhile (parentMatcher) {\n\t\t\tmatched.unshift(parentMatcher.record);\n\t\t\tparentMatcher = parentMatcher.parent;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpath,\n\t\t\tparams,\n\t\t\tmatched,\n\t\t\tmeta: mergeMetaFields(matched)\n\t\t};\n\t}\n\troutes.forEach((route) => addRoute(route));\n\tfunction clearRoutes() {\n\t\tmatchers.length = 0;\n\t\tmatcherMap.clear();\n\t}\n\treturn {\n\t\taddRoute,\n\t\tresolve,\n\t\tremoveRoute,\n\t\tclearRoutes,\n\t\tgetRoutes,\n\t\tgetRecordMatcher\n\t};\n}\n/**\n* Picks an object param to contain only specified keys.\n*\n* @param params - params object to pick from\n* @param keys - keys to pick\n*/\nfunction pickParams(params, keys) {\n\tconst newParams = {};\n\tfor (const key of keys) if (key in params) newParams[key] = params[key];\n\treturn newParams;\n}\n/**\n* Normalizes a RouteRecordRaw. Creates a copy\n*\n* @param record\n* @returns the normalized version\n*/\nfunction normalizeRouteRecord(record) {\n\tconst normalized = {\n\t\tpath: record.path,\n\t\tredirect: record.redirect,\n\t\tname: record.name,\n\t\tmeta: record.meta || {},\n\t\taliasOf: record.aliasOf,\n\t\tbeforeEnter: record.beforeEnter,\n\t\tprops: normalizeRecordProps(record),\n\t\tchildren: record.children || [],\n\t\tinstances: {},\n\t\tleaveGuards: /* @__PURE__ */ new Set(),\n\t\tupdateGuards: /* @__PURE__ */ new Set(),\n\t\tenterCallbacks: {},\n\t\tcomponents: \"components\" in record ? record.components || null : record.component && { default: record.component }\n\t};\n\tObject.defineProperty(normalized, \"mods\", { value: {} });\n\treturn normalized;\n}\n/**\n* Normalize the optional `props` in a record to always be an object similar to\n* components. Also accept a boolean for components.\n* @param record\n*/\nfunction normalizeRecordProps(record) {\n\tconst propsObject = {};\n\tconst props = record.props || false;\n\tif (\"component\" in record) propsObject.default = props;\n\telse for (const name in record.components) propsObject[name] = typeof props === \"object\" ? props[name] : props;\n\treturn propsObject;\n}\n/**\n* Checks if a record or any of its parent is an alias\n* @param record\n*/\nfunction isAliasRecord(record) {\n\twhile (record) {\n\t\tif (record.record.aliasOf) return true;\n\t\trecord = record.parent;\n\t}\n\treturn false;\n}\n/**\n* Merge meta fields of an array of records\n*\n* @param matched - array of matched records\n*/\nfunction mergeMetaFields(matched) {\n\treturn matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction isSameParam(a, b) {\n\treturn a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\n/**\n* Check if a path and its alias have the same required params\n*\n* @param a - original record\n* @param b - alias record\n*/\nfunction checkSameParams(a, b) {\n\tfor (const key of a.keys) if (!key.optional && !b.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n\tfor (const key of b.keys) if (!key.optional && !a.keys.find(isSameParam.bind(null, key))) return warn$1(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n}\n/**\n* A route with a name and a child with an empty path without a name should warn when adding the route\n*\n* @param mainNormalizedRecord - RouteRecordNormalized\n* @param parent - RouteRecordMatcher\n*/\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n\tif (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path && mainNormalizedRecord.children.length === 0) warn$1(`The route named \"${String(parent.record.name)}\" has a child without a name, an empty path, and no children. This is probably a mistake: using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to silence the warning.`);\n}\nfunction checkSameNameAsAncestor(record, parent) {\n\tfor (let ancestor = parent; ancestor; ancestor = ancestor.parent) if (ancestor.record.name === record.name) throw new Error(`A route named \"${String(record.name)}\" has been added as a ${parent === ancestor ? \"child\" : \"descendant\"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n\tfor (const key of parent.keys) if (!record.keys.find(isSameParam.bind(null, key))) return warn$1(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n}\n/**\n* Performs a binary search to find the correct insertion index for a new matcher.\n*\n* Matchers are primarily sorted by their score. If scores are tied then we also consider parent/child relationships,\n* with descendants coming before ancestors. If there's still a tie, new routes are inserted after existing routes.\n*\n* @param matcher - new matcher to be inserted\n* @param matchers - existing matchers\n*/\nfunction findInsertionIndex(matcher, matchers) {\n\tlet lower = 0;\n\tlet upper = matchers.length;\n\twhile (lower !== upper) {\n\t\tconst mid = lower + upper >> 1;\n\t\tif (comparePathParserScore(matcher, matchers[mid]) < 0) upper = mid;\n\t\telse lower = mid + 1;\n\t}\n\tconst insertionAncestor = getInsertionAncestor(matcher);\n\tif (insertionAncestor) {\n\t\tupper = matchers.lastIndexOf(insertionAncestor, upper - 1);\n\t\tif (process.env.NODE_ENV !== \"production\" && upper < 0) warn$1(`Finding ancestor route \"${insertionAncestor.record.path}\" failed for \"${matcher.record.path}\"`);\n\t}\n\treturn upper;\n}\nfunction getInsertionAncestor(matcher) {\n\tlet ancestor = matcher;\n\twhile (ancestor = ancestor.parent) if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) return ancestor;\n}\n/**\n* Checks if a matcher can be reachable. This means if it's possible to reach it as a route. For example, routes without\n* a component, or name, or redirect, are just used to group other routes.\n* @param matcher\n* @param matcher.record record of the matcher\n* @returns\n*/\nfunction isMatchable({ record }) {\n\treturn !!(record.name || record.components && Object.keys(record.components).length || record.redirect);\n}\n\n//#endregion\n//#region src/RouterLink.ts\n/**\n* Returns the internal behavior of a {@link RouterLink} without the rendering part.\n*\n* @param props - a `to` location and an optional `replace` flag\n*/\nfunction useLink(props) {\n\tconst router = inject(routerKey);\n\tconst currentRoute = inject(routeLocationKey);\n\tlet hasPrevious = false;\n\tlet previousTo = null;\n\tconst route = computed(() => {\n\t\tconst to = unref(props.to);\n\t\tif (process.env.NODE_ENV !== \"production\" && (!hasPrevious || to !== previousTo)) {\n\t\t\tif (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- previous to:`, previousTo, `\\n- props:`, props);\n\t\t\telse warn$1(`Invalid value for prop \"to\" in useLink()\\n- to:`, to, `\\n- props:`, props);\n\t\t\tpreviousTo = to;\n\t\t\thasPrevious = true;\n\t\t}\n\t\treturn router.resolve(to);\n\t});\n\tconst activeRecordIndex = computed(() => {\n\t\tconst { matched } = route.value;\n\t\tconst { length } = matched;\n\t\tconst routeMatched = matched[length - 1];\n\t\tconst currentMatched = currentRoute.matched;\n\t\tif (!routeMatched || !currentMatched.length) return -1;\n\t\tconst index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n\t\tif (index > -1) return index;\n\t\tconst parentRecordPath = getOriginalPath(matched[length - 2]);\n\t\treturn length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;\n\t});\n\tconst isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n\tconst isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n\tfunction navigate(e = {}) {\n\t\tif (guardEvent(e)) {\n\t\t\tconst p = router[unref(props.replace) ? \"replace\" : \"push\"](unref(props.to)).catch(noop);\n\t\t\tif (props.viewTransition && typeof document !== \"undefined\" && \"startViewTransition\" in document) document.startViewTransition(() => p);\n\t\t\treturn p;\n\t\t}\n\t\treturn Promise.resolve();\n\t}\n\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser) {\n\t\tconst instance = getCurrentInstance();\n\t\tif (instance) {\n\t\t\tconst linkContextDevtools = {\n\t\t\t\troute: route.value,\n\t\t\t\tisActive: isActive.value,\n\t\t\t\tisExactActive: isExactActive.value,\n\t\t\t\terror: null\n\t\t\t};\n\t\t\tinstance.__vrl_devtools = instance.__vrl_devtools || [];\n\t\t\tinstance.__vrl_devtools.push(linkContextDevtools);\n\t\t\twatchEffect(() => {\n\t\t\t\tlinkContextDevtools.route = route.value;\n\t\t\t\tlinkContextDevtools.isActive = isActive.value;\n\t\t\t\tlinkContextDevtools.isExactActive = isExactActive.value;\n\t\t\t\tlinkContextDevtools.error = isRouteLocation(unref(props.to)) ? null : \"Invalid \\\"to\\\" value\";\n\t\t\t}, { flush: \"post\" });\n\t\t}\n\t}\n\t/**\n\t* NOTE: update {@link _RouterLinkI}'s `$slots` type when updating this\n\t*/\n\treturn {\n\t\troute,\n\t\thref: computed(() => route.value.href),\n\t\tisActive,\n\t\tisExactActive,\n\t\tnavigate\n\t};\n}\nfunction preferSingleVNode(vnodes) {\n\treturn vnodes.length === 1 ? vnodes[0] : vnodes;\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterLink\",\n\tcompatConfig: { MODE: 3 },\n\tprops: {\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\trequired: true\n\t\t},\n\t\treplace: Boolean,\n\t\tactiveClass: String,\n\t\texactActiveClass: String,\n\t\tcustom: Boolean,\n\t\tariaCurrentValue: {\n\t\t\ttype: String,\n\t\t\tdefault: \"page\"\n\t\t},\n\t\tviewTransition: Boolean\n\t},\n\tuseLink,\n\tsetup(props, { slots }) {\n\t\tconst link = reactive(useLink(props));\n\t\tconst { options } = inject(routerKey);\n\t\tconst elClass = computed(() => ({\n\t\t\t[getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n\t\t\t[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n\t\t}));\n\t\treturn () => {\n\t\t\tconst children = slots.default && preferSingleVNode(slots.default(link));\n\t\t\treturn props.custom ? children : h(\"a\", {\n\t\t\t\t\"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n\t\t\t\thref: link.href,\n\t\t\t\tonClick: link.navigate,\n\t\t\t\tclass: elClass.value\n\t\t\t}, children);\n\t\t};\n\t}\n});\n/**\n* Component to render a link that triggers a navigation on click.\n*/\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n\tif (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;\n\tif (e.defaultPrevented) return;\n\tif (e.button !== void 0 && e.button !== 0) return;\n\tif (e.currentTarget && e.currentTarget.getAttribute) {\n\t\tconst target = e.currentTarget.getAttribute(\"target\");\n\t\tif (/\\b_blank\\b/i.test(target)) return;\n\t}\n\tif (e.preventDefault) e.preventDefault();\n\treturn true;\n}\nfunction includesParams(outer, inner) {\n\tfor (const key in inner) {\n\t\tconst innerValue = inner[key];\n\t\tconst outerValue = outer[key];\n\t\tif (typeof innerValue === \"string\") {\n\t\t\tif (innerValue !== outerValue) return false;\n\t\t} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;\n\t}\n\treturn true;\n}\n/**\n* Get the original path value of a record by following its aliasOf\n* @param record\n*/\nfunction getOriginalPath(record) {\n\treturn record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\n/**\n* Utility class to get the active class based on defaults.\n* @param propClass\n* @param globalClass\n* @param defaultClass\n*/\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\n\n//#endregion\n//#region src/RouterView.ts\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n\tname: \"RouterView\",\n\tinheritAttrs: false,\n\tprops: {\n\t\tname: {\n\t\t\ttype: String,\n\t\t\tdefault: \"default\"\n\t\t},\n\t\troute: Object\n\t},\n\tcompatConfig: { MODE: 3 },\n\tsetup(props, { attrs, slots }) {\n\t\tprocess.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n\t\tconst injectedRoute = inject(routerViewLocationKey);\n\t\tconst routeToDisplay = computed(() => props.route || injectedRoute.value);\n\t\tconst injectedDepth = inject(viewDepthKey, 0);\n\t\tconst depth = computed(() => {\n\t\t\tlet initialDepth = unref(injectedDepth);\n\t\t\tconst { matched } = routeToDisplay.value;\n\t\t\tlet matchedRoute;\n\t\t\twhile ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) initialDepth++;\n\t\t\treturn initialDepth;\n\t\t});\n\t\tconst matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n\t\tprovide(viewDepthKey, computed(() => depth.value + 1));\n\t\tprovide(matchedRouteKey, matchedRouteRef);\n\t\tprovide(routerViewLocationKey, routeToDisplay);\n\t\tconst viewRef = ref();\n\t\twatch(() => [\n\t\t\tviewRef.value,\n\t\t\tmatchedRouteRef.value,\n\t\t\tprops.name\n\t\t], ([instance, to, name], [oldInstance, from, oldName]) => {\n\t\t\tif (to) {\n\t\t\t\tto.instances[name] = instance;\n\t\t\t\tif (from && from !== to && instance && instance === oldInstance) {\n\t\t\t\t\tif (!to.leaveGuards.size) to.leaveGuards = from.leaveGuards;\n\t\t\t\t\tif (!to.updateGuards.size) to.updateGuards = from.updateGuards;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (instance && to && (!from || !isSameRouteRecord(to, from) || !oldInstance)) (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n\t\t}, { flush: \"post\" });\n\t\treturn () => {\n\t\t\tconst route = routeToDisplay.value;\n\t\t\tconst currentName = props.name;\n\t\t\tconst matchedRoute = matchedRouteRef.value;\n\t\t\tconst ViewComponent = matchedRoute && matchedRoute.components[currentName];\n\t\t\tif (!ViewComponent) return normalizeSlot(slots.default, {\n\t\t\t\tComponent: ViewComponent,\n\t\t\t\troute\n\t\t\t});\n\t\t\tconst routePropsOption = matchedRoute.props[currentName];\n\t\t\tconst routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n\t\t\tconst onVnodeUnmounted = (vnode) => {\n\t\t\t\tif (vnode.component.isUnmounted) matchedRoute.instances[currentName] = null;\n\t\t\t};\n\t\t\tconst component = h(ViewComponent, assign({}, routeProps, attrs, {\n\t\t\t\tonVnodeUnmounted,\n\t\t\t\tref: viewRef\n\t\t\t}));\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && component.ref) {\n\t\t\t\tconst info = {\n\t\t\t\t\tdepth: depth.value,\n\t\t\t\t\tname: matchedRoute.name,\n\t\t\t\t\tpath: matchedRoute.path,\n\t\t\t\t\tmeta: matchedRoute.meta\n\t\t\t\t};\n\t\t\t\t(isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {\n\t\t\t\t\tinstance.__vrv_devtools = info;\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn normalizeSlot(slots.default, {\n\t\t\t\tComponent: component,\n\t\t\t\troute\n\t\t\t}) || component;\n\t\t};\n\t}\n});\nfunction normalizeSlot(slot, data) {\n\tif (!slot) return null;\n\tconst slotContent = slot(data);\n\treturn slotContent.length === 1 ? slotContent[0] : slotContent;\n}\n/**\n* Component to display the current route the user is at.\n*/\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n\tconst instance = getCurrentInstance();\n\tconst parentName = instance.parent && instance.parent.type.name;\n\tconst parentSubTreeType = instance.parent && instance.parent.subTree && instance.parent.subTree.type;\n\tif (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\")) && typeof parentSubTreeType === \"object\" && parentSubTreeType.name === \"RouterView\") {\n\t\tconst comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n\t\twarn$1(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.\nUse slot props instead:\n\n<router-view v-slot=\"{ Component }\">\n  <${comp}>\\n    <component :is=\"Component\" />\\n  </${comp}>\\n</router-view>`);\n\t}\n}\n\n//#endregion\n//#region src/router.ts\n/**\n* Creates a Router instance that can be used by a Vue app.\n*\n* @param options - {@link RouterOptions}\n*/\nfunction createRouter(options) {\n\tconst matcher = createRouterMatcher(options.routes, options);\n\tconst parseQuery$1 = options.parseQuery || parseQuery;\n\tconst stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n\tconst routerHistory = options.history;\n\tif (process.env.NODE_ENV !== \"production\" && !routerHistory) throw new Error(\"Provide the \\\"history\\\" option when calling \\\"createRouter()\\\": https://router.vuejs.org/api/interfaces/RouterOptions.html#history\");\n\tconst beforeGuards = useCallbacks();\n\tconst beforeResolveGuards = useCallbacks();\n\tconst afterGuards = useCallbacks();\n\tconst currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n\tlet pendingLocation = START_LOCATION_NORMALIZED;\n\tif (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) history.scrollRestoration = \"manual\";\n\tconst normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n\tconst encodeParams = applyToParams.bind(null, encodeParam);\n\tconst decodeParams = applyToParams.bind(null, decode);\n\tfunction addRoute(parentOrRoute, route) {\n\t\tlet parent;\n\t\tlet record;\n\t\tif (isRouteName(parentOrRoute)) {\n\t\t\tparent = matcher.getRecordMatcher(parentOrRoute);\n\t\t\tif (process.env.NODE_ENV !== \"production\" && !parent) warn$1(`Parent route \"${String(parentOrRoute)}\" not found when adding child route`, route);\n\t\t\trecord = route;\n\t\t} else record = parentOrRoute;\n\t\treturn matcher.addRoute(record, parent);\n\t}\n\tfunction removeRoute(name) {\n\t\tconst recordMatcher = matcher.getRecordMatcher(name);\n\t\tif (recordMatcher) matcher.removeRoute(recordMatcher);\n\t\telse if (process.env.NODE_ENV !== \"production\") warn$1(`Cannot remove non-existent route \"${String(name)}\"`);\n\t}\n\tfunction getRoutes() {\n\t\treturn matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n\t}\n\tfunction hasRoute(name) {\n\t\treturn !!matcher.getRecordMatcher(name);\n\t}\n\tfunction resolve(rawLocation, currentLocation) {\n\t\tcurrentLocation = assign({}, currentLocation || currentRoute.value);\n\t\tif (typeof rawLocation === \"string\") {\n\t\t\tconst locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n\t\t\tconst matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n\t\t\tconst href = routerHistory.createHref(locationNormalized.fullPath);\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation}\"`);\n\t\t\t}\n\t\t\treturn assign(locationNormalized, matchedRoute, {\n\t\t\t\tparams: decodeParams(matchedRoute.params),\n\t\t\t\thash: decode(locationNormalized.hash),\n\t\t\t\tredirectedFrom: void 0,\n\t\t\t\thref\n\t\t\t});\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && !isRouteLocation(rawLocation)) {\n\t\t\twarn$1(`router.resolve() was passed an invalid location. This will fail in production.\\n- Location:`, rawLocation);\n\t\t\treturn resolve({});\n\t\t}\n\t\tlet matcherLocation;\n\t\tif (rawLocation.path != null) {\n\t\t\tif (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && Object.keys(rawLocation.params).length) warn$1(`Path \"${rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n\t\t\tmatcherLocation = assign({}, rawLocation, { path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path });\n\t\t} else {\n\t\t\tconst targetParams = assign({}, rawLocation.params);\n\t\t\tfor (const key in targetParams) if (targetParams[key] == null) delete targetParams[key];\n\t\t\tmatcherLocation = assign({}, rawLocation, { params: encodeParams(targetParams) });\n\t\t\tcurrentLocation.params = encodeParams(currentLocation.params);\n\t\t}\n\t\tconst matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n\t\tconst hash = rawLocation.hash || \"\";\n\t\tif (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) warn$1(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n\t\tmatchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n\t\tconst fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n\t\t\thash: encodeHash(hash),\n\t\t\tpath: matchedRoute.path\n\t\t}));\n\t\tconst href = routerHistory.createHref(fullPath);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (href.startsWith(\"//\")) warn$1(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n\t\t\telse if (!matchedRoute.matched.length) warn$1(`No match found for location with path \"${rawLocation.path != null ? rawLocation.path : rawLocation}\"`);\n\t\t}\n\t\treturn assign({\n\t\t\tfullPath,\n\t\t\thash,\n\t\t\tquery: stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n\t\t}, matchedRoute, {\n\t\t\tredirectedFrom: void 0,\n\t\t\thref\n\t\t});\n\t}\n\tfunction locationAsObject(to) {\n\t\treturn typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n\t}\n\tfunction checkCanceledNavigation(to, from) {\n\t\tif (pendingLocation !== to) return createRouterError(ErrorTypes.NAVIGATION_CANCELLED, {\n\t\t\tfrom,\n\t\t\tto\n\t\t});\n\t}\n\tfunction push(to) {\n\t\treturn pushWithRedirect(to);\n\t}\n\tfunction replace(to) {\n\t\treturn push(assign(locationAsObject(to), { replace: true }));\n\t}\n\tfunction handleRedirectRecord(to, from) {\n\t\tconst lastMatched = to.matched[to.matched.length - 1];\n\t\tif (lastMatched && lastMatched.redirect) {\n\t\t\tconst { redirect } = lastMatched;\n\t\t\tlet newTargetLocation = typeof redirect === \"function\" ? redirect(to, from) : redirect;\n\t\t\tif (typeof newTargetLocation === \"string\") {\n\t\t\t\tnewTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : { path: newTargetLocation };\n\t\t\t\tnewTargetLocation.params = {};\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\" && newTargetLocation.path == null && !(\"name\" in newTargetLocation)) {\n\t\t\t\twarn$1(`Invalid redirect found:\\n${JSON.stringify(newTargetLocation, null, 2)}\\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n\t\t\t\tthrow new Error(\"Invalid redirect\");\n\t\t\t}\n\t\t\treturn assign({\n\t\t\t\tquery: to.query,\n\t\t\t\thash: to.hash,\n\t\t\t\tparams: newTargetLocation.path != null ? {} : to.params\n\t\t\t}, newTargetLocation);\n\t\t}\n\t}\n\tfunction pushWithRedirect(to, redirectedFrom) {\n\t\tconst targetLocation = pendingLocation = resolve(to);\n\t\tconst from = currentRoute.value;\n\t\tconst data = to.state;\n\t\tconst force = to.force;\n\t\tconst replace = to.replace === true;\n\t\tconst shouldRedirect = handleRedirectRecord(targetLocation, from);\n\t\tif (shouldRedirect) return pushWithRedirect(assign(locationAsObject(shouldRedirect), {\n\t\t\tstate: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n\t\t\tforce,\n\t\t\treplace\n\t\t}), redirectedFrom || targetLocation);\n\t\tconst toLocation = targetLocation;\n\t\ttoLocation.redirectedFrom = redirectedFrom;\n\t\tlet failure;\n\t\tif (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n\t\t\tfailure = createRouterError(ErrorTypes.NAVIGATION_DUPLICATED, {\n\t\t\t\tto: toLocation,\n\t\t\t\tfrom\n\t\t\t});\n\t\t\thandleScroll(from, from, true, false);\n\t\t}\n\t\treturn (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT) ? error : markAsReady(error) : triggerError(error, toLocation, from)).then((failure) => {\n\t\t\tif (failure) {\n\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\" && isSameRouteLocation(stringifyQuery$1, resolve(failure.to), toLocation) && redirectedFrom && (redirectedFrom._count = redirectedFrom._count ? redirectedFrom._count + 1 : 1) > 30) {\n\t\t\t\t\t\twarn$1(`Detected a possibly infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow.\\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`);\n\t\t\t\t\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Infinite redirect in navigation guard\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn pushWithRedirect(assign({ replace }, locationAsObject(failure.to), {\n\t\t\t\t\t\tstate: typeof failure.to === \"object\" ? assign({}, data, failure.to.state) : data,\n\t\t\t\t\t\tforce\n\t\t\t\t\t}), redirectedFrom || toLocation);\n\t\t\t\t}\n\t\t\t} else failure = finalizeNavigation(toLocation, from, true, replace, data);\n\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\treturn failure;\n\t\t});\n\t}\n\t/**\n\t* Helper to reject and skip all navigation guards if a new navigation happened\n\t* @param to\n\t* @param from\n\t*/\n\tfunction checkCanceledNavigationAndReject(to, from) {\n\t\tconst error = checkCanceledNavigation(to, from);\n\t\treturn error ? Promise.reject(error) : Promise.resolve();\n\t}\n\tfunction runWithContext(fn) {\n\t\tconst app = installedApps.values().next().value;\n\t\treturn app && typeof app.runWithContext === \"function\" ? app.runWithContext(fn) : fn();\n\t}\n\tfunction navigate(to, from) {\n\t\tlet guards;\n\t\tconst [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n\t\tguards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n\t\tfor (const record of leavingRecords) record.leaveGuards.forEach((guard) => {\n\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t});\n\t\tconst canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n\t\tguards.push(canceledNavigationCheck);\n\t\treturn runGuardQueue(guards).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n\t\t\tfor (const record of updatingRecords) record.updateGuards.forEach((guard) => {\n\t\t\t\tguards.push(guardToPromiseFn(guard, to, from));\n\t\t\t});\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));\n\t\t\telse guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tto.matched.forEach((record) => record.enterCallbacks = {});\n\t\t\tguards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from, runWithContext);\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).then(() => {\n\t\t\tguards = [];\n\t\t\tfor (const guard of beforeResolveGuards.list()) guards.push(guardToPromiseFn(guard, to, from));\n\t\t\tguards.push(canceledNavigationCheck);\n\t\t\treturn runGuardQueue(guards);\n\t\t}).catch((err) => isNavigationFailure(err, ErrorTypes.NAVIGATION_CANCELLED) ? err : Promise.reject(err));\n\t}\n\tfunction triggerAfterEach(to, from, failure) {\n\t\tafterGuards.list().forEach((guard) => runWithContext(() => guard(to, from, failure)));\n\t}\n\t/**\n\t* - Cleans up any navigation guards\n\t* - Changes the url if necessary\n\t* - Calls the scrollBehavior\n\t*/\n\tfunction finalizeNavigation(toLocation, from, isPush, replace, data) {\n\t\tconst error = checkCanceledNavigation(toLocation, from);\n\t\tif (error) return error;\n\t\tconst isFirstNavigation = from === START_LOCATION_NORMALIZED;\n\t\tconst state = !isBrowser ? {} : history.state;\n\t\tif (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));\n\t\telse routerHistory.push(toLocation.fullPath, data);\n\t\tcurrentRoute.value = toLocation;\n\t\thandleScroll(toLocation, from, isPush, isFirstNavigation);\n\t\tmarkAsReady();\n\t}\n\tlet removeHistoryListener;\n\tfunction setupListeners() {\n\t\tif (removeHistoryListener) return;\n\t\tremoveHistoryListener = routerHistory.listen((to, _from, info) => {\n\t\t\tif (!router.listening) return;\n\t\t\tconst toLocation = resolve(to);\n\t\t\tconst shouldRedirect = handleRedirectRecord(toLocation, router.currentRoute.value);\n\t\t\tif (shouldRedirect) {\n\t\t\t\tpushWithRedirect(assign(shouldRedirect, {\n\t\t\t\t\treplace: true,\n\t\t\t\t\tforce: true\n\t\t\t\t}), toLocation).catch(noop);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpendingLocation = toLocation;\n\t\t\tconst from = currentRoute.value;\n\t\t\tif (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n\t\t\tnavigate(toLocation, from).catch((error) => {\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_CANCELLED)) return error;\n\t\t\t\tif (isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)) {\n\t\t\t\t\tpushWithRedirect(assign(locationAsObject(error.to), { force: true }), toLocation).then((failure) => {\n\t\t\t\t\t\tif (isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED) && !info.delta && info.type === NavigationType.pop) routerHistory.go(-1, false);\n\t\t\t\t\t}).catch(noop);\n\t\t\t\t\treturn Promise.reject();\n\t\t\t\t}\n\t\t\t\tif (info.delta) routerHistory.go(-info.delta, false);\n\t\t\t\treturn triggerError(error, toLocation, from);\n\t\t\t}).then((failure) => {\n\t\t\t\tfailure = failure || finalizeNavigation(toLocation, from, false);\n\t\t\t\tif (failure) {\n\t\t\t\t\tif (info.delta && !isNavigationFailure(failure, ErrorTypes.NAVIGATION_CANCELLED)) routerHistory.go(-info.delta, false);\n\t\t\t\t\telse if (info.type === NavigationType.pop && isNavigationFailure(failure, ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED)) routerHistory.go(-1, false);\n\t\t\t\t}\n\t\t\t\ttriggerAfterEach(toLocation, from, failure);\n\t\t\t}).catch(noop);\n\t\t});\n\t}\n\tlet readyHandlers = useCallbacks();\n\tlet errorListeners = useCallbacks();\n\tlet ready;\n\t/**\n\t* Trigger errorListeners added via onError and throws the error as well\n\t*\n\t* @param error - error to throw\n\t* @param to - location we were navigating to when the error happened\n\t* @param from - location we were navigating from when the error happened\n\t* @returns the error as a rejected promise\n\t*/\n\tfunction triggerError(error, to, from) {\n\t\tmarkAsReady(error);\n\t\tconst list = errorListeners.list();\n\t\tif (list.length) list.forEach((handler) => handler(error, to, from));\n\t\telse {\n\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"uncaught error during route navigation:\");\n\t\t\tconsole.error(error);\n\t\t}\n\t\treturn Promise.reject(error);\n\t}\n\tfunction isReady() {\n\t\tif (ready && currentRoute.value !== START_LOCATION_NORMALIZED) return Promise.resolve();\n\t\treturn new Promise((resolve, reject) => {\n\t\t\treadyHandlers.add([resolve, reject]);\n\t\t});\n\t}\n\tfunction markAsReady(err) {\n\t\tif (!ready) {\n\t\t\tready = !err;\n\t\t\tsetupListeners();\n\t\t\treadyHandlers.list().forEach(([resolve, reject]) => err ? reject(err) : resolve());\n\t\t\treadyHandlers.reset();\n\t\t}\n\t\treturn err;\n\t}\n\tfunction handleScroll(to, from, isPush, isFirstNavigation) {\n\t\tconst { scrollBehavior } = options;\n\t\tif (!isBrowser || !scrollBehavior) return Promise.resolve();\n\t\tconst scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n\t\treturn nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n\t}\n\tconst go = (delta) => routerHistory.go(delta);\n\tlet started;\n\tconst installedApps = /* @__PURE__ */ new Set();\n\tconst router = {\n\t\tcurrentRoute,\n\t\tlistening: true,\n\t\taddRoute,\n\t\tremoveRoute,\n\t\tclearRoutes: matcher.clearRoutes,\n\t\thasRoute,\n\t\tgetRoutes,\n\t\tresolve,\n\t\toptions,\n\t\tpush,\n\t\treplace,\n\t\tgo,\n\t\tback: () => go(-1),\n\t\tforward: () => go(1),\n\t\tbeforeEach: beforeGuards.add,\n\t\tbeforeResolve: beforeResolveGuards.add,\n\t\tafterEach: afterGuards.add,\n\t\tonError: errorListeners.add,\n\t\tisReady,\n\t\tinstall(app) {\n\t\t\tapp.component(\"RouterLink\", RouterLink);\n\t\t\tapp.component(\"RouterView\", RouterView);\n\t\t\tapp.config.globalProperties.$router = router;\n\t\t\tObject.defineProperty(app.config.globalProperties, \"$route\", {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: () => unref(currentRoute)\n\t\t\t});\n\t\t\tif (isBrowser && !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n\t\t\t\tstarted = true;\n\t\t\t\tpush(routerHistory.location).catch((err) => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") warn$1(\"Unexpected error when starting the router:\", err);\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst reactiveRoute = {};\n\t\t\tfor (const key in START_LOCATION_NORMALIZED) Object.defineProperty(reactiveRoute, key, {\n\t\t\t\tget: () => currentRoute.value[key],\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t\tapp.provide(routerKey, router);\n\t\t\tapp.provide(routeLocationKey, shallowReactive(reactiveRoute));\n\t\t\tapp.provide(routerViewLocationKey, currentRoute);\n\t\t\tconst unmountApp = app.unmount;\n\t\t\tinstalledApps.add(app);\n\t\t\tapp.unmount = function() {\n\t\t\t\tinstalledApps.delete(app);\n\t\t\t\tif (installedApps.size < 1) {\n\t\t\t\t\tpendingLocation = START_LOCATION_NORMALIZED;\n\t\t\t\t\tremoveHistoryListener && removeHistoryListener();\n\t\t\t\t\tremoveHistoryListener = null;\n\t\t\t\t\tcurrentRoute.value = START_LOCATION_NORMALIZED;\n\t\t\t\t\tstarted = false;\n\t\t\t\t\tready = false;\n\t\t\t\t}\n\t\t\t\tunmountApp();\n\t\t\t};\n\t\t\tif ((process.env.NODE_ENV !== \"production\" || __VUE_PROD_DEVTOOLS__) && isBrowser && true) addDevtools(app, router, matcher);\n\t\t}\n\t};\n\tfunction runGuardQueue(guards) {\n\t\treturn guards.reduce((promise, guard) => promise.then(() => runWithContext(guard)), Promise.resolve());\n\t}\n\treturn router;\n}\n\n//#endregion\nexport { NavigationFailureType, RouterLink, RouterView, START_LOCATION_NORMALIZED as START_LOCATION, createMemoryHistory, createRouter, createRouterMatcher, createWebHashHistory, createWebHistory, isNavigationFailure, loadRouteLocation, matchedRouteKey, onBeforeRouteLeave, onBeforeRouteUpdate, parseQuery, routeLocationKey, routerKey, routerViewLocationKey, stringifyQuery, useLink, useRoute, useRouter, viewDepthKey };","import { inject } from \"vue\";\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst INSIDE_RADIO_GROUP_KEY = /* @__PURE__ */ Symbol.for(\"insideRadioGroup\");\nfunction useInsideRadioGroup() {\n  return inject(INSIDE_RADIO_GROUP_KEY, void 0);\n}\nexport {\n  INSIDE_RADIO_GROUP_KEY as I,\n  useInsideRadioGroup as u\n};\n//# sourceMappingURL=useNcRadioGroup-D6llQmAl.mjs.map\n","import '../assets/NcCheckboxRadioSwitch-BBLFj8M-.css';\nimport { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, resolveComponent, normalizeClass, renderSlot, createBlock, resolveDynamicComponent, toHandlers, withCtx, createVNode, createSlots, createTextVNode, onMounted, computed, useCssVars } from \"vue\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcIconToggleSwitch } from \"./NcIconToggleSwitch-CSrdR61T.mjs\";\nimport { N as NcLoadingIcon } from \"./NcLoadingIcon-b_ajZ_nQ.mjs\";\nimport { r as register, K as n, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { u as useInsideRadioGroup } from \"./useNcRadioGroup-D6llQmAl.mjs\";\nconst _sfc_main$6 = {\n  name: \"CheckboxBlankOutlineIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$6 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$5 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$5 = { d: \"M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z\" };\nconst _hoisted_4$4 = { key: 0 };\nfunction _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon checkbox-blank-outline-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$5, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$5))\n  ], 16, _hoisted_1$6);\n}\nconst CheckboxBlankOutline = /* @__PURE__ */ _export_sfc(_sfc_main$6, [[\"render\", _sfc_render$6]]);\nconst _sfc_main$5 = {\n  name: \"CheckboxMarkedIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$5 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$4 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$4 = { d: \"M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z\" };\nconst _hoisted_4$3 = { key: 0 };\nfunction _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon checkbox-marked-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$4, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$3, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$4))\n  ], 16, _hoisted_1$5);\n}\nconst CheckboxMarked = /* @__PURE__ */ _export_sfc(_sfc_main$5, [[\"render\", _sfc_render$5]]);\nconst _sfc_main$4 = {\n  name: \"MinusBoxIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$4 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$3 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$3 = { d: \"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z\" };\nconst _hoisted_4$2 = { key: 0 };\nfunction _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon minus-box-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$3, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$2, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$3))\n  ], 16, _hoisted_1$4);\n}\nconst MinusBox = /* @__PURE__ */ _export_sfc(_sfc_main$4, [[\"render\", _sfc_render$4]]);\nconst _sfc_main$3 = {\n  name: \"RadioboxBlankIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$3 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$2 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$2 = { d: \"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\" };\nconst _hoisted_4$1 = { key: 0 };\nfunction _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon radiobox-blank-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$2, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$1, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$2))\n  ], 16, _hoisted_1$3);\n}\nconst RadioboxBlank = /* @__PURE__ */ _export_sfc(_sfc_main$3, [[\"render\", _sfc_render$3]]);\nconst _sfc_main$2 = {\n  name: \"RadioboxMarkedIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$2 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$1 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$1 = { d: \"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z\" };\nconst _hoisted_4 = { key: 0 };\nfunction _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon radiobox-marked-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$1, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$1))\n  ], 16, _hoisted_1$2);\n}\nconst RadioboxMarked = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render$2]]);\nconst TYPE_CHECKBOX = \"checkbox\";\nconst TYPE_RADIO = \"radio\";\nconst TYPE_SWITCH = \"switch\";\nconst TYPE_BUTTON = \"button\";\nconst _sfc_main$1 = {\n  name: \"NcCheckboxContent\",\n  components: {\n    NcLoadingIcon,\n    NcIconToggleSwitch\n  },\n  props: {\n    /**\n     * Class for the icon element\n     */\n    iconClass: {\n      type: [String, Object],\n      default: null\n    },\n    /**\n     * Class for the text element\n     */\n    textClass: {\n      type: [String, Object],\n      default: null\n    },\n    /**\n     * Type of the input. checkbox, radio, switch, or button.\n     *\n     * Only use button when used in a `tablist` container and the\n     * `tab` role is set.\n     *\n     * @type {'checkbox'|'radio'|'switch'|'button'}\n     */\n    type: {\n      type: String,\n      default: \"checkbox\",\n      validator: (type) => [\n        TYPE_CHECKBOX,\n        TYPE_RADIO,\n        TYPE_SWITCH,\n        TYPE_BUTTON\n      ].includes(type)\n    },\n    /**\n     * Toggle the alternative button style\n     */\n    buttonVariant: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * True if the entry is checked\n     */\n    isChecked: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Indeterminate state\n     */\n    indeterminate: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Loading state\n     */\n    loading: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Icon size\n     */\n    iconSize: {\n      type: Number,\n      default: 24\n    },\n    /**\n     * Label id attribute\n     */\n    labelId: {\n      type: String,\n      required: true\n    },\n    /**\n     * Description id attribute\n     */\n    descriptionId: {\n      type: String,\n      required: true\n    }\n  },\n  computed: {\n    isButtonType() {\n      return this.type === TYPE_BUTTON;\n    },\n    isSwitchType() {\n      return this.type === TYPE_SWITCH;\n    },\n    /**\n     * Returns the proper Material icon depending on the select case\n     *\n     * @return {object}\n     */\n    checkboxRadioIconElement() {\n      if (this.type === TYPE_RADIO) {\n        if (this.isChecked) {\n          return RadioboxMarked;\n        }\n        return RadioboxBlank;\n      }\n      if (this.indeterminate) {\n        return MinusBox;\n      }\n      if (this.isChecked) {\n        return CheckboxMarked;\n      }\n      return CheckboxBlankOutline;\n    }\n  }\n};\nconst _hoisted_1$1 = {\n  key: 0,\n  class: \"checkbox-content__wrapper\"\n};\nconst _hoisted_2 = [\"id\"];\nconst _hoisted_3 = [\"id\"];\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcLoadingIcon = resolveComponent(\"NcLoadingIcon\");\n  const _component_NcIconToggleSwitch = resolveComponent(\"NcIconToggleSwitch\");\n  return openBlock(), createElementBlock(\"span\", {\n    class: normalizeClass([\"checkbox-content\", {\n      [\"checkbox-content-\" + $props.type]: true,\n      \"checkbox-content--button-variant\": $props.buttonVariant,\n      \"checkbox-content--has-text\": !!_ctx.$slots.default\n    }])\n  }, [\n    createElementVNode(\"span\", {\n      class: normalizeClass([\"checkbox-content__icon\", {\n        \"checkbox-content__icon--checked\": $props.isChecked,\n        \"checkbox-content__icon--has-description\": !$options.isButtonType && _ctx.$slots.description,\n        [$props.iconClass]: true\n      }]),\n      \"aria-hidden\": true,\n      inert: \"\"\n    }, [\n      renderSlot(_ctx.$slots, \"icon\", {\n        checked: $props.isChecked,\n        loading: $props.loading\n      }, () => [\n        $props.loading ? (openBlock(), createBlock(_component_NcLoadingIcon, { key: 0 })) : $options.isSwitchType ? (openBlock(), createBlock(_component_NcIconToggleSwitch, {\n          key: 1,\n          checked: $props.isChecked,\n          size: $props.iconSize,\n          inline: \"\"\n        }, null, 8, [\"checked\", \"size\"])) : !$props.buttonVariant ? (openBlock(), createBlock(resolveDynamicComponent($options.checkboxRadioIconElement), {\n          key: 2,\n          size: $props.iconSize\n        }, null, 8, [\"size\"])) : createCommentVNode(\"\", true)\n      ], true)\n    ], 2),\n    _ctx.$slots.default || _ctx.$slots.description ? (openBlock(), createElementBlock(\"span\", _hoisted_1$1, [\n      _ctx.$slots.default ? (openBlock(), createElementBlock(\"span\", {\n        key: 0,\n        id: $props.labelId,\n        class: normalizeClass([\"checkbox-content__text\", $props.textClass])\n      }, [\n        renderSlot(_ctx.$slots, \"default\", {}, void 0, true)\n      ], 10, _hoisted_2)) : createCommentVNode(\"\", true),\n      !$options.isButtonType && _ctx.$slots.description ? (openBlock(), createElementBlock(\"span\", {\n        key: 1,\n        id: $props.descriptionId,\n        class: \"checkbox-content__description\"\n      }, [\n        renderSlot(_ctx.$slots, \"description\", {}, void 0, true)\n      ], 8, _hoisted_3)) : createCommentVNode(\"\", true)\n    ])) : createCommentVNode(\"\", true)\n  ], 2);\n}\nconst NcCheckboxContent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render$1], [\"__scopeId\", \"data-v-a060196e\"]]);\nregister();\nconst _sfc_main = {\n  name: \"NcCheckboxRadioSwitch\",\n  components: {\n    NcCheckboxContent\n  },\n  // We need to pass attributes to the input element\n  inheritAttrs: false,\n  props: {\n    /**\n     * Unique id attribute of the input\n     */\n    id: {\n      type: String,\n      default: () => \"checkbox-radio-switch-\" + createElementId(),\n      validator: (id) => id.trim() !== \"\"\n    },\n    /**\n     * Unique id attribute of the wrapper element\n     */\n    wrapperId: {\n      type: String,\n      default: null\n    },\n    /**\n     * Input name. Required for radio, optional for checkbox, and ignored\n     * for button.\n     */\n    name: {\n      type: String,\n      default: null\n    },\n    /**\n     * Required if no text is set.\n     * The aria-label is forwarded to the input or button.\n     */\n    ariaLabel: {\n      type: String,\n      default: \"\"\n    },\n    /**\n     * Type of the input. checkbox, radio, switch, or button.\n     *\n     * Only use button when used in a `tablist` container and the\n     * `tab` role is set.\n     *\n     * @type {'checkbox'|'radio'|'switch'|'button'}\n     */\n    type: {\n      type: String,\n      default: \"checkbox\",\n      validator: (type) => [\n        TYPE_CHECKBOX,\n        TYPE_RADIO,\n        TYPE_SWITCH,\n        TYPE_BUTTON\n      ].includes(type)\n    },\n    /**\n     * Toggle the alternative button style\n     *\n     * @deprecated - Use `NcRadioGroup` instead\n     */\n    buttonVariant: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Are the elements are all direct siblings?\n     * If so they will be grouped horizontally or vertically\n     *\n     * @type {'no'|'horizontal'|'vertical'}\n     * @deprecated - Use `NcRadioGroup` instead\n     */\n    buttonVariantGrouped: {\n      type: String,\n      default: \"no\",\n      validator: (v) => [\"no\", \"vertical\", \"horizontal\"].includes(v)\n    },\n    /**\n     * Checked state. To be used with `v-model:value`\n     */\n    modelValue: {\n      type: [Boolean, Array, String],\n      default: false\n    },\n    /**\n     * Value to be synced on check\n     */\n    value: {\n      type: String,\n      default: null\n    },\n    /**\n     * Disabled state\n     */\n    disabled: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Indeterminate state\n     */\n    indeterminate: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Required state\n     */\n    required: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Loading state\n     */\n    loading: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Wrapping element tag\n     *\n     * When `type` is set to `button` this will be ignored\n     *\n     * Defaults to `span`\n     */\n    wrapperElement: {\n      type: String,\n      default: null\n    },\n    /**\n     * The class(es) to pass to the wrapper / root element of the component\n     */\n    class: {\n      type: [String, Array, Object],\n      default: \"\"\n    },\n    /**\n     * The style to pass to the wrapper / root element of the component\n     */\n    style: {\n      type: [String, Array, Object],\n      default: \"\"\n    },\n    /**\n     * Description\n     *\n     * This is unsupported when using button has type.\n     */\n    description: {\n      type: String,\n      default: null\n    }\n  },\n  emits: [\"update:modelValue\"],\n  setup(props, { emit }) {\n    const radioGroup = useInsideRadioGroup();\n    onMounted(() => radioGroup?.value.register(false));\n    const internalType = computed(() => radioGroup?.value ? TYPE_RADIO : props.type);\n    const internalModelValue = computed({\n      get() {\n        if (radioGroup?.value) {\n          return radioGroup.value.modelValue;\n        }\n        return props.modelValue;\n      },\n      set(value) {\n        if (radioGroup?.value) {\n          radioGroup.value.onUpdate(value);\n        } else {\n          emit(\"update:modelValue\", value);\n        }\n      }\n    });\n    return {\n      internalType,\n      internalModelValue,\n      labelId: createElementId(),\n      descriptionId: createElementId()\n    };\n  },\n  computed: {\n    isButtonType() {\n      return this.internalType === TYPE_BUTTON;\n    },\n    computedWrapperElement() {\n      if (this.isButtonType) {\n        return \"button\";\n      }\n      if (this.wrapperElement !== null) {\n        return this.wrapperElement;\n      }\n      return \"span\";\n    },\n    listeners() {\n      if (this.isButtonType) {\n        return {\n          click: this.onToggle\n        };\n      }\n      return {\n        change: this.onToggle\n      };\n    },\n    iconSize() {\n      return this.internalType === TYPE_SWITCH ? 36 : 20;\n    },\n    cssIconSize() {\n      return this.iconSize + \"px\";\n    },\n    cssIconHeight() {\n      return this.internalType === TYPE_SWITCH ? \"16px\" : this.cssIconSize;\n    },\n    /**\n     * Return the input type.\n     * Switch is not an official type\n     *\n     * @return {string}\n     */\n    inputType() {\n      const nativeTypes = [\n        TYPE_CHECKBOX,\n        TYPE_RADIO,\n        TYPE_BUTTON\n      ];\n      if (nativeTypes.includes(this.internalType)) {\n        return this.internalType;\n      }\n      return TYPE_CHECKBOX;\n    },\n    /**\n     * Check if that entry is checked\n     * If value is defined, we use that as the checked value\n     * If not, we expect true/false in this.checked\n     *\n     * @return {boolean}\n     */\n    isChecked() {\n      if (this.value !== null) {\n        if (Array.isArray(this.internalModelValue)) {\n          return [...this.internalModelValue].indexOf(this.value) > -1;\n        }\n        return this.internalModelValue === this.value;\n      }\n      return this.internalModelValue === true;\n    },\n    hasIndeterminate() {\n      return [\n        TYPE_CHECKBOX,\n        TYPE_RADIO\n      ].includes(this.inputType);\n    }\n  },\n  mounted() {\n    if (this.name && this.internalType === TYPE_CHECKBOX) {\n      if (!Array.isArray(this.internalModelValue)) {\n        throw new Error(\"When using groups of checkboxes, the updated value will be an array.\");\n      }\n    }\n    if (this.name && this.internalType === TYPE_SWITCH) {\n      throw new Error(\"Switches are not made to be used for data sets. Please use checkboxes instead.\");\n    }\n    if (typeof this.internalModelValue !== \"boolean\" && this.internalType === TYPE_SWITCH) {\n      throw new Error(\"Switches can only be used with boolean as modelValue prop.\");\n    }\n  },\n  methods: {\n    t,\n    n,\n    onToggle(event) {\n      if (this.disabled || event.target.tagName.toLowerCase() === \"a\") {\n        return;\n      }\n      if (this.internalType === TYPE_RADIO) {\n        this.internalModelValue = this.value;\n        return;\n      }\n      if (this.internalType === TYPE_SWITCH) {\n        this.internalModelValue = !this.isChecked;\n        return;\n      }\n      if (typeof this.internalModelValue === \"boolean\") {\n        this.internalModelValue = !this.internalModelValue;\n        return;\n      }\n      const values = this.getInputsSet().filter((input) => input.checked).map((input) => input.value);\n      if (values.includes(this.value)) {\n        this.internalModelValue = values.filter((v) => v !== this.value);\n      } else {\n        this.internalModelValue = [...values, this.value];\n      }\n    },\n    /**\n     * Get the input set based on this name\n     *\n     * @return {Node[]}\n     */\n    getInputsSet() {\n      return [...document.getElementsByName(this.name)];\n    }\n  }\n};\nconst __injectCSSVars__ = () => {\n  useCssVars((_ctx) => ({\n    \"1d6eb36d\": _ctx.cssIconSize,\n    \"698a3993\": _ctx.cssIconHeight\n  }));\n};\nconst __setup__ = _sfc_main.setup;\n_sfc_main.setup = __setup__ ? (props, ctx) => {\n  __injectCSSVars__();\n  return __setup__(props, ctx);\n} : __injectCSSVars__;\nconst _hoisted_1 = [\"id\", \"aria-labelledby\", \"aria-describedby\", \"aria-label\", \"disabled\", \"type\", \"value\", \"checked\", \".indeterminate\", \"required\", \"name\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcCheckboxContent = resolveComponent(\"NcCheckboxContent\");\n  return openBlock(), createBlock(resolveDynamicComponent($options.computedWrapperElement), mergeProps({\n    id: $props.wrapperId ?? ($options.isButtonType ? $props.id : null),\n    \"aria-label\": $options.isButtonType && $props.ariaLabel ? $props.ariaLabel : void 0,\n    class: [\"checkbox-radio-switch\", [\n      _ctx.$props.class,\n      {\n        [\"checkbox-radio-switch-\" + $setup.internalType]: $setup.internalType,\n        \"checkbox-radio-switch--checked\": $options.isChecked,\n        \"checkbox-radio-switch--disabled\": $props.disabled,\n        \"checkbox-radio-switch--indeterminate\": $options.hasIndeterminate ? $props.indeterminate : false,\n        \"checkbox-radio-switch--button-variant\": $props.buttonVariant,\n        \"checkbox-radio-switch--button-variant-v-grouped\": $props.buttonVariant && $props.buttonVariantGrouped === \"vertical\",\n        \"checkbox-radio-switch--button-variant-h-grouped\": $props.buttonVariant && $props.buttonVariantGrouped === \"horizontal\",\n        \"button-vue\": $options.isButtonType\n      }\n    ]],\n    style: $props.style,\n    type: $options.isButtonType ? \"button\" : null\n  }, $options.isButtonType ? _ctx.$attrs : {}, toHandlers($options.isButtonType ? $options.listeners : {})), {\n    default: withCtx(() => [\n      !$options.isButtonType ? (openBlock(), createElementBlock(\"input\", mergeProps({\n        key: 0,\n        id: $props.id,\n        \"aria-labelledby\": !$options.isButtonType && !$props.ariaLabel ? $setup.labelId : null,\n        \"aria-describedby\": !$options.isButtonType && ($props.description || _ctx.$slots.description) ? $setup.descriptionId : null,\n        \"aria-label\": $props.ariaLabel || void 0,\n        class: \"checkbox-radio-switch__input\",\n        disabled: $props.disabled,\n        type: $options.inputType,\n        value: $props.value,\n        checked: $options.isChecked,\n        \".indeterminate\": $options.hasIndeterminate ? $props.indeterminate : null,\n        required: $props.required,\n        name: $props.name\n      }, _ctx.$attrs, toHandlers($options.listeners, true)), null, 48, _hoisted_1)) : createCommentVNode(\"\", true),\n      createVNode(_component_NcCheckboxContent, {\n        id: !$options.isButtonType ? `${$props.id}-label` : void 0,\n        class: \"checkbox-radio-switch__content\",\n        iconClass: \"checkbox-radio-switch__icon\",\n        textClass: \"checkbox-radio-switch__text\",\n        type: $setup.internalType,\n        indeterminate: $options.hasIndeterminate ? $props.indeterminate : false,\n        buttonVariant: $props.buttonVariant,\n        isChecked: $options.isChecked,\n        loading: $props.loading,\n        labelId: $setup.labelId,\n        descriptionId: $setup.descriptionId,\n        iconSize: $options.iconSize,\n        onClick: $options.onToggle\n      }, createSlots({\n        icon: withCtx(() => [\n          renderSlot(_ctx.$slots, \"icon\", {}, void 0, true)\n        ]),\n        _: 2\n      }, [\n        _ctx.$slots.description || $props.description ? {\n          name: \"description\",\n          fn: withCtx(() => [\n            renderSlot(_ctx.$slots, \"description\", {}, () => [\n              createTextVNode(toDisplayString($props.description), 1)\n            ], true)\n          ]),\n          key: \"0\"\n        } : void 0,\n        !!_ctx.$slots.default ? {\n          name: \"default\",\n          fn: withCtx(() => [\n            renderSlot(_ctx.$slots, \"default\", {}, void 0, true)\n          ]),\n          key: \"1\"\n        } : void 0\n      ]), 1032, [\"id\", \"type\", \"indeterminate\", \"buttonVariant\", \"isChecked\", \"loading\", \"labelId\", \"descriptionId\", \"iconSize\", \"onClick\"])\n    ]),\n    _: 3\n  }, 16, [\"id\", \"aria-label\", \"class\", \"style\", \"type\"]);\n}\nconst NcCheckboxRadioSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-6808cde4\"]]);\nexport {\n  NcCheckboxRadioSwitch as N\n};\n//# sourceMappingURL=NcCheckboxRadioSwitch-BMsPx74L.mjs.map\n","import { l as logger } from \"./logger-D3RVzcfQ.mjs\";\nwindow._vue_richtext_widgets ??= {};\nwindow._registerWidget ??= (id, callback, onDestroy, props) => {\n  registerWidget(id, callback, onDestroy, props);\n};\nfunction registerWidget(id, callback, onDestroy = () => {\n}, props) {\n  const propsWithDefaults = {\n    hasInteractiveView: true,\n    fullWidth: false,\n    ...props\n  };\n  if (window._vue_richtext_widgets[id]) {\n    logger.error(`[ReferencePicker]: Widget for id ${id} already registered`);\n    return;\n  }\n  window._vue_richtext_widgets[id] = {\n    id,\n    callback,\n    onDestroy,\n    ...propsWithDefaults\n  };\n}\nfunction renderWidget(el, options) {\n  const { richObjectType, richObject, accessible, interactive } = options;\n  if (richObjectType === \"open-graph\") {\n    return;\n  }\n  if (!window._vue_richtext_widgets[richObjectType]) {\n    logger.error(\"Widget for rich object type \" + richObjectType + \" not registered\");\n    return;\n  }\n  window._vue_richtext_widgets[richObjectType].callback(el, { richObjectType, richObject, accessible, interactive });\n}\nfunction destroyWidget(richObjectType, el) {\n  if (richObjectType === \"open-graph\") {\n    return;\n  }\n  if (!window._vue_richtext_widgets[richObjectType]) {\n    return;\n  }\n  window._vue_richtext_widgets[richObjectType].onDestroy(el);\n}\nfunction isWidgetRegistered(id) {\n  return !!window._vue_richtext_widgets[id];\n}\nfunction hasInteractiveView(id) {\n  return !!window._vue_richtext_widgets[id]?.hasInteractiveView;\n}\nfunction hasFullWidth(id) {\n  return !!window._vue_richtext_widgets[id]?.fullWidth;\n}\nwindow._vue_richtext_custom_picker_elements ??= {};\nwindow._registerCustomPickerElement ??= registerCustomPickerElement;\nclass NcCustomPickerRenderResult {\n  element;\n  object;\n  /**\n   * @param element - The HTML element\n   * @param object - The object\n   */\n  constructor(element, object) {\n    this.element = element;\n    this.object = object;\n  }\n}\nfunction isCustomPickerElementRegistered(id) {\n  return !!window._vue_richtext_custom_picker_elements[id];\n}\nfunction getCustomPickerElementSize(id) {\n  const size = window._vue_richtext_custom_picker_elements[id]?.size;\n  if (size && [\"small\", \"normal\", \"large\", \"full\"].includes(size)) {\n    return size;\n  }\n  return null;\n}\nfunction registerCustomPickerElement(id, callback, onDestroy = () => {\n}, size = \"large\") {\n  if (window._vue_richtext_custom_picker_elements[id]) {\n    logger.error(`Custom reference picker element for id ${id} already registered`);\n    return;\n  }\n  window._vue_richtext_custom_picker_elements[id] = {\n    id,\n    callback,\n    onDestroy,\n    size\n  };\n}\nfunction renderCustomPickerElement(el, options) {\n  const { providerId, accessible } = options;\n  if (!window._vue_richtext_custom_picker_elements[providerId]) {\n    logger.error(`Custom reference picker element for reference provider ID ${providerId} not registered`);\n    return;\n  }\n  return window._vue_richtext_custom_picker_elements[providerId].callback(el, { providerId, accessible });\n}\nfunction destroyCustomPickerElement(providerId, el, renderResult) {\n  if (!window._vue_richtext_custom_picker_elements[providerId]) {\n    return;\n  }\n  window._vue_richtext_custom_picker_elements[providerId].onDestroy(el, renderResult);\n}\nexport {\n  NcCustomPickerRenderResult as N,\n  renderWidget as a,\n  destroyCustomPickerElement as b,\n  isCustomPickerElementRegistered as c,\n  destroyWidget as d,\n  registerCustomPickerElement as e,\n  renderCustomPickerElement as f,\n  getCustomPickerElementSize as g,\n  hasInteractiveView as h,\n  isWidgetRegistered as i,\n  hasFullWidth as j,\n  registerWidget as r\n};\n//# sourceMappingURL=customPickerElements-4pQTZUnk.mjs.map\n","import '../assets/NcEmptyContent-CLjlZ-UT.css';\nimport { defineComponent, createElementBlock, openBlock, unref, createCommentVNode, renderSlot, createTextVNode, toDisplayString } from \"vue\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _hoisted_1 = [\"aria-labelledby\"];\nconst _hoisted_2 = {\n  key: 0,\n  class: \"empty-content__icon\",\n  \"aria-hidden\": \"true\"\n};\nconst _hoisted_3 = [\"id\"];\nconst _hoisted_4 = {\n  key: 2,\n  class: \"empty-content__description\"\n};\nconst _hoisted_5 = {\n  key: 3,\n  class: \"empty-content__action\"\n};\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n  __name: \"NcEmptyContent\",\n  props: {\n    description: { default: \"\" },\n    name: { default: \"\" }\n  },\n  setup(__props) {\n    const nameId = createElementId();\n    return (_ctx, _cache) => {\n      return openBlock(), createElementBlock(\"div\", {\n        \"aria-labelledby\": unref(nameId),\n        class: \"empty-content\",\n        role: \"note\"\n      }, [\n        _ctx.$slots.icon ? (openBlock(), createElementBlock(\"div\", _hoisted_2, [\n          renderSlot(_ctx.$slots, \"icon\", {}, void 0, true)\n        ])) : createCommentVNode(\"\", true),\n        _ctx.name !== \"\" || _ctx.$slots.name ? (openBlock(), createElementBlock(\"div\", {\n          key: 1,\n          id: unref(nameId),\n          class: \"empty-content__name\"\n        }, [\n          renderSlot(_ctx.$slots, \"name\", {}, () => [\n            createTextVNode(toDisplayString(_ctx.name), 1)\n          ], true)\n        ], 8, _hoisted_3)) : createCommentVNode(\"\", true),\n        _ctx.description !== \"\" || _ctx.$slots.description ? (openBlock(), createElementBlock(\"p\", _hoisted_4, [\n          renderSlot(_ctx.$slots, \"description\", {}, () => [\n            createTextVNode(toDisplayString(_ctx.description), 1)\n          ], true)\n        ])) : createCommentVNode(\"\", true),\n        _ctx.$slots.action ? (openBlock(), createElementBlock(\"div\", _hoisted_5, [\n          renderSlot(_ctx.$slots, \"action\", {}, void 0, true)\n        ])) : createCommentVNode(\"\", true)\n      ], 8, _hoisted_1);\n    };\n  }\n});\nconst NcEmptyContent = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-b101d636\"]]);\nexport {\n  NcEmptyContent as N\n};\n//# sourceMappingURL=NcEmptyContent-B8-90BSI.mjs.map\n","import { getBaseUrl, getRootUrl } from \"@nextcloud/router\";\nimport { u } from \"unist-builder\";\nimport { visit, SKIP } from \"unist-util-visit\";\nimport { defineComponent, h } from \"vue\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\n/*!\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst URL_PATTERN = /(\\s|^)(https?:\\/\\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\\s|$)/ig;\nconst URL_PATTERN_AUTOLINK = /(\\s|\\(|^)((https?:\\/\\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\\s|\\)|$)/ig;\nconst NcLink = defineComponent({\n  name: \"NcLink\",\n  props: {\n    href: {\n      type: String,\n      required: true\n    }\n  },\n  render() {\n    return h(\"a\", {\n      href: this.href,\n      rel: \"noopener noreferrer\",\n      target: \"_blank\",\n      class: \"rich-text--external-link\"\n    }, [this.href.trim()]);\n  }\n});\nfunction remarkAutolink({ autolink, useMarkdown, useExtendedMarkdown }) {\n  return function(tree) {\n    if (useExtendedMarkdown || !useMarkdown || !autolink) {\n      return;\n    }\n    visit(tree, (node) => node.type === \"text\", (node, index, parent) => {\n      let parsed = parseUrl(node.value);\n      if (typeof parsed === \"string\") {\n        parsed = [u(\"text\", parsed)];\n      } else {\n        parsed = parsed.map((n) => {\n          if (typeof n === \"string\") {\n            return u(\"text\", n);\n          }\n          return u(\"link\", {\n            url: n.props.href\n          }, [u(\"text\", n.props.href)]);\n        }).filter((x) => x).flat();\n      }\n      parent.children.splice(index, 1, ...parsed);\n      return [SKIP, (index ?? 0) + parsed.length];\n    });\n  };\n}\nfunction parseUrl(text) {\n  let match = URL_PATTERN_AUTOLINK.exec(text);\n  const list = [];\n  let start = 0;\n  while (match !== null) {\n    let href = match[2];\n    let textAfter;\n    let textBefore = text.substring(start, match.index + match[1].length);\n    if (href[0] === \" \") {\n      textBefore += href[0];\n      href = href.substring(1).trim();\n    }\n    const lastChar = href[href.length - 1];\n    if (lastChar === \".\" || lastChar === \",\" || lastChar === \";\" || match[0][0] === \"(\" && lastChar === \")\") {\n      href = href.substring(0, href.length - 1);\n      textAfter = lastChar;\n    }\n    list.push(textBefore);\n    list.push({ component: NcLink, props: { href } });\n    if (textAfter) {\n      list.push(textAfter);\n    }\n    start = match.index + match[0].length;\n    match = URL_PATTERN_AUTOLINK.exec(text);\n  }\n  list.push(text.substring(start));\n  const joinedText = list.map((item) => typeof item === \"string\" ? item : item.props.href).join(\"\");\n  if (text === joinedText) {\n    return list;\n  }\n  logger.error(\"[NcRichText] Failed to reassemble the chunked text: \" + text);\n  return text;\n}\nfunction getRoute(router, url) {\n  const removePrefix = (str, prefix) => str.startsWith(prefix) ? str.slice(prefix.length) : str;\n  const removePrefixes = (str, ...prefixes) => prefixes.reduce((acc, prefix) => removePrefix(acc, prefix), str);\n  if (!router) {\n    return null;\n  }\n  const isAbsoluteURL = /^https?:\\/\\//.test(url);\n  const isNonHttpLink = /^[a-z][a-z0-9+.-]*:.+/.test(url);\n  if (!isAbsoluteURL && isNonHttpLink) {\n    return null;\n  }\n  if (isAbsoluteURL && !url.startsWith(getBaseUrl())) {\n    return null;\n  }\n  if (!isAbsoluteURL && !url.startsWith(\"/\")) {\n    return null;\n  }\n  const relativeUrl = isAbsoluteURL ? removePrefixes(url, getBaseUrl(), \"/index.php\") : url;\n  const relativeRouterBase = removePrefixes(router.options.history.base, getRootUrl(), \"/index.php\");\n  const potentialRouterPath = removePrefixes(relativeUrl, relativeRouterBase) || \"/\";\n  const route = router.resolve(potentialRouterPath);\n  if (!route.matched.length) {\n    return null;\n  }\n  return route.fullPath;\n}\nexport {\n  URL_PATTERN as U,\n  getRoute as g,\n  parseUrl as p,\n  remarkAutolink as r\n};\n//# sourceMappingURL=autolink-U5pBzLgI.mjs.map\n","import '../assets/NcInputField-B0lNBgr9.css';\nimport { defineComponent, mergeModels, useModel, useAttrs, useTemplateRef, computed, warn, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, withDirectives, createBlock, mergeProps, toDisplayString, renderSlot, vShow, withCtx, createTextVNode } from \"vue\";\nimport { d as mdiCheck, j as mdiAlertCircleOutline } from \"./mdi-CpchYUUV.mjs\";\nimport { N as NcButton } from \"./NcButton-C9D47Igd.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { i as isLegacy } from \"./legacy-DcjXBL_t.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nconst _hoisted_1 = { class: \"input-field__main-wrapper\" };\nconst _hoisted_2 = [\"id\", \"aria-describedby\", \"disabled\", \"placeholder\", \"type\", \"value\"];\nconst _hoisted_3 = [\"for\"];\nconst _hoisted_4 = { class: \"input-field__icon input-field__icon--leading\" };\nconst _hoisted_5 = {\n  key: 2,\n  class: \"input-field__icon input-field__icon--trailing\"\n};\nconst _hoisted_6 = [\"id\"];\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n  ...{\n    inheritAttrs: false\n  },\n  __name: \"NcInputField\",\n  props: /* @__PURE__ */ mergeModels({\n    class: { default: \"\" },\n    inputClass: { default: \"\" },\n    id: { default: () => createElementId() },\n    label: { default: void 0 },\n    labelOutside: { type: Boolean },\n    type: { default: \"text\" },\n    placeholder: { default: void 0 },\n    showTrailingButton: { type: Boolean },\n    trailingButtonLabel: { default: void 0 },\n    success: { type: Boolean },\n    error: { type: Boolean },\n    helperText: { default: \"\" },\n    disabled: { type: Boolean },\n    pill: { type: Boolean }\n  }, {\n    \"modelValue\": { required: true },\n    \"modelModifiers\": {}\n  }),\n  emits: /* @__PURE__ */ mergeModels([\"trailingButtonClick\"], [\"update:modelValue\"]),\n  setup(__props, { expose: __expose, emit: __emit }) {\n    const modelValue = useModel(__props, \"modelValue\");\n    const props = __props;\n    const emit = __emit;\n    __expose({\n      focus,\n      select\n    });\n    const attrs = useAttrs();\n    const inputElement = useTemplateRef(\"input\");\n    const hasTrailingIcon = computed(() => props.showTrailingButton || props.success);\n    const internalPlaceholder = computed(() => {\n      if (props.placeholder) {\n        return props.placeholder;\n      }\n      if (props.label) {\n        return isLegacy ? props.label : \"\";\n      }\n      return void 0;\n    });\n    const isValidLabel = computed(() => {\n      const isValidLabel2 = props.label || props.labelOutside;\n      if (!isValidLabel2) {\n        warn(\"You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.\");\n      }\n      return isValidLabel2;\n    });\n    const ariaDescribedby = computed(() => {\n      const ariaDescribedby2 = [];\n      if (props.helperText) {\n        ariaDescribedby2.push(`${props.id}-helper-text`);\n      }\n      if (attrs[\"aria-describedby\"]) {\n        ariaDescribedby2.push(String(attrs[\"aria-describedby\"]));\n      }\n      return ariaDescribedby2.join(\" \") || void 0;\n    });\n    function focus(options) {\n      inputElement.value.focus(options);\n    }\n    function select() {\n      inputElement.value.select();\n    }\n    function handleInput(event) {\n      const target = event.target;\n      modelValue.value = props.type === \"number\" && typeof modelValue.value === \"number\" ? parseFloat(target.value) : target.value;\n    }\n    return (_ctx, _cache) => {\n      return openBlock(), createElementBlock(\"div\", {\n        class: normalizeClass([\"input-field\", [{\n          \"input-field--disabled\": _ctx.disabled,\n          \"input-field--error\": _ctx.error,\n          \"input-field--label-outside\": _ctx.labelOutside || !isValidLabel.value,\n          \"input-field--leading-icon\": !!_ctx.$slots.icon,\n          \"input-field--trailing-icon\": hasTrailingIcon.value,\n          \"input-field--pill\": _ctx.pill,\n          \"input-field--success\": _ctx.success,\n          \"input-field--legacy\": unref(isLegacy)\n        }, _ctx.$props.class]])\n      }, [\n        createElementVNode(\"div\", _hoisted_1, [\n          createElementVNode(\"input\", mergeProps(_ctx.$attrs, {\n            id: _ctx.id,\n            ref: \"input\",\n            \"aria-describedby\": ariaDescribedby.value,\n            \"aria-live\": \"polite\",\n            class: [\"input-field__input\", _ctx.inputClass],\n            disabled: _ctx.disabled,\n            placeholder: internalPlaceholder.value,\n            type: _ctx.type,\n            value: modelValue.value.toString(),\n            onInput: handleInput\n          }), null, 16, _hoisted_2),\n          !_ctx.labelOutside && isValidLabel.value ? (openBlock(), createElementBlock(\"label\", {\n            key: 0,\n            class: \"input-field__label\",\n            for: _ctx.id\n          }, toDisplayString(_ctx.label), 9, _hoisted_3)) : createCommentVNode(\"\", true),\n          withDirectives(createElementVNode(\"div\", _hoisted_4, [\n            renderSlot(_ctx.$slots, \"icon\", {}, void 0, true)\n          ], 512), [\n            [vShow, !!_ctx.$slots.icon]\n          ]),\n          _ctx.showTrailingButton ? (openBlock(), createBlock(NcButton, {\n            key: 1,\n            class: \"input-field__trailing-button\",\n            \"aria-label\": _ctx.trailingButtonLabel,\n            disabled: _ctx.disabled,\n            variant: \"tertiary-no-background\",\n            onClick: _cache[0] || (_cache[0] = ($event) => emit(\"trailingButtonClick\", $event))\n          }, {\n            icon: withCtx(() => [\n              renderSlot(_ctx.$slots, \"trailing-button-icon\", {}, void 0, true)\n            ]),\n            _: 3\n          }, 8, [\"aria-label\", \"disabled\"])) : _ctx.success || _ctx.error ? (openBlock(), createElementBlock(\"div\", _hoisted_5, [\n            _ctx.success ? (openBlock(), createBlock(NcIconSvgWrapper, {\n              key: 0,\n              path: unref(mdiCheck)\n            }, null, 8, [\"path\"])) : (openBlock(), createBlock(NcIconSvgWrapper, {\n              key: 1,\n              path: unref(mdiAlertCircleOutline)\n            }, null, 8, [\"path\"]))\n          ])) : createCommentVNode(\"\", true)\n        ]),\n        _ctx.helperText ? (openBlock(), createElementBlock(\"p\", {\n          key: 0,\n          id: `${_ctx.id}-helper-text`,\n          class: \"input-field__helper-text-message\"\n        }, [\n          _ctx.success ? (openBlock(), createBlock(NcIconSvgWrapper, {\n            key: 0,\n            class: \"input-field__helper-text-message__icon\",\n            path: unref(mdiCheck),\n            inline: \"\"\n          }, null, 8, [\"path\"])) : _ctx.error ? (openBlock(), createBlock(NcIconSvgWrapper, {\n            key: 1,\n            class: \"input-field__helper-text-message__icon\",\n            path: unref(mdiAlertCircleOutline),\n            inline: \"\"\n          }, null, 8, [\"path\"])) : createCommentVNode(\"\", true),\n          createTextVNode(\" \" + toDisplayString(_ctx.helperText), 1)\n        ], 8, _hoisted_6)) : createCommentVNode(\"\", true)\n      ], 2);\n    };\n  }\n});\nconst NcInputField = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-bfba6aa6\"]]);\nexport {\n  NcInputField as N\n};\n//# sourceMappingURL=NcInputField-o5OFv3z6.mjs.map\n","import { defineComponent, mergeModels, useModel, useTemplateRef, computed, createBlock, openBlock, unref, mergeProps, createSlots, withCtx, renderSlot } from \"vue\";\nimport { m as mdiArrowRight, a as mdiUndo, b as mdiClose } from \"./mdi-CpchYUUV.mjs\";\nimport { r as register, b as t50, c as t18, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { N as NcInputField } from \"./NcInputField-o5OFv3z6.mjs\";\nregister(t18, t50);\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n  __name: \"NcTextField\",\n  props: /* @__PURE__ */ mergeModels({\n    class: {},\n    inputClass: {},\n    id: {},\n    label: {},\n    labelOutside: { type: Boolean },\n    type: {},\n    placeholder: {},\n    showTrailingButton: { type: Boolean },\n    trailingButtonLabel: { default: void 0 },\n    success: { type: Boolean },\n    error: { type: Boolean },\n    helperText: {},\n    disabled: { type: Boolean },\n    pill: { type: Boolean },\n    trailingButtonIcon: { default: \"close\" }\n  }, {\n    \"modelValue\": { default: \"\" },\n    \"modelModifiers\": {}\n  }),\n  emits: [\"update:modelValue\"],\n  setup(__props, { expose: __expose }) {\n    const modelValue = useModel(__props, \"modelValue\");\n    const props = __props;\n    __expose({\n      focus,\n      select\n    });\n    const inputFieldInstance = useTemplateRef(\"inputField\");\n    const defaultTrailingButtonLabels = {\n      arrowEnd: t(\"Save changes\"),\n      close: t(\"Clear text\"),\n      undo: t(\"Undo changes\")\n    };\n    const NcInputFieldPropNames = new Set(Object.keys(NcInputField.props));\n    const propsToForward = computed(() => {\n      const sharedProps = Object.fromEntries(Object.entries(props).filter(([key]) => NcInputFieldPropNames.has(key)));\n      sharedProps.trailingButtonLabel ??= defaultTrailingButtonLabels[props.trailingButtonIcon];\n      return sharedProps;\n    });\n    function focus(options) {\n      inputFieldInstance.value.focus(options);\n    }\n    function select() {\n      inputFieldInstance.value.select();\n    }\n    return (_ctx, _cache) => {\n      return openBlock(), createBlock(unref(NcInputField), mergeProps(propsToForward.value, {\n        ref: \"inputField\",\n        modelValue: modelValue.value,\n        \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event)\n      }), createSlots({ _: 2 }, [\n        !!_ctx.$slots.icon ? {\n          name: \"icon\",\n          fn: withCtx(() => [\n            renderSlot(_ctx.$slots, \"icon\")\n          ]),\n          key: \"0\"\n        } : void 0,\n        _ctx.type !== \"search\" ? {\n          name: \"trailing-button-icon\",\n          fn: withCtx(() => [\n            _ctx.trailingButtonIcon === \"arrowEnd\" ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n              key: 0,\n              directional: \"\",\n              path: unref(mdiArrowRight)\n            }, null, 8, [\"path\"])) : (openBlock(), createBlock(unref(NcIconSvgWrapper), {\n              key: 1,\n              path: _ctx.trailingButtonIcon === \"undo\" ? unref(mdiUndo) : unref(mdiClose)\n            }, null, 8, [\"path\"]))\n          ]),\n          key: \"1\"\n        } : void 0\n      ]), 1040, [\"modelValue\"]);\n    };\n  }\n});\nexport {\n  _sfc_main as _\n};\n//# sourceMappingURL=NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs.map\n","import '../assets/referencePickerModal-CpzDUJ5f.css';\nimport { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, resolveComponent, createVNode, withCtx, defineComponent, inject, ref, useTemplateRef, nextTick, computed, watch, onBeforeUnmount, normalizeClass, createBlock, resolveDynamicComponent, normalizeStyle, createTextVNode, unref, withKeys, withModifiers, createApp } from \"vue\";\nimport { emit } from \"@nextcloud/event-bus\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { I as IconClose } from \"./Close-D6ngJ4t9.mjs\";\nimport { f as renderCustomPickerElement, b as destroyCustomPickerElement, c as isCustomPickerElementRegistered, j as hasFullWidth, i as isWidgetRegistered, h as hasInteractiveView, a as renderWidget, d as destroyWidget, g as getCustomPickerElementSize } from \"./customPickerElements-4pQTZUnk.mjs\";\nimport axios from \"@nextcloud/axios\";\nimport { loadState } from \"@nextcloud/initial-state\";\nimport { imagePath, generateOcsUrl } from \"@nextcloud/router\";\nimport { r as register, W as t8, a as t, X as t45, Y as t40, Z as t24, _ as t25, q as t42, $ as t32, A as t19, a0 as t12 } from \"./_l10n-Dq_eYxz_.mjs\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\nimport { N as NcEmptyContent } from \"./NcEmptyContent-B8-90BSI.mjs\";\nimport { _ as _sfc_main$a } from \"./NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs\";\nimport { N as NcSelect } from \"./NcSelect-DLheQ2yp.mjs\";\nimport debounce from \"debounce\";\nimport { useElementSize, useIntersectionObserver } from \"@vueuse/core\";\nimport { routerKey, RouterLink } from \"vue-router\";\nimport { N as NcButton } from \"./NcButton-C9D47Igd.mjs\";\nimport { g as getRoute } from \"./autolink-U5pBzLgI.mjs\";\nimport { N as NcLoadingIcon } from \"./NcLoadingIcon-b_ajZ_nQ.mjs\";\nimport { _ as _sfc_main$b } from \"./NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs\";\nimport { I as IconDotsHorizontal } from \"./NcActions-BWDsG06k.mjs\";\nimport { N as NcModal } from \"./NcModal-DHryP_87.mjs\";\nconst _sfc_main$9 = {\n  name: \"ArrowLeftIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$9 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$7 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$6 = { d: \"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z\" };\nconst _hoisted_4$5 = { key: 0 };\nfunction _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon arrow-left-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$6, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$5, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$7))\n  ], 16, _hoisted_1$9);\n}\nconst ArrowLeftIcon = /* @__PURE__ */ _export_sfc(_sfc_main$9, [[\"render\", _sfc_render$8]]);\nconst _sfc_main$8 = {\n  name: \"NcCustomPickerElement\",\n  props: {\n    /**\n     * The reference provider\n     */\n    provider: {\n      type: Object,\n      required: true\n    }\n  },\n  emits: [\n    \"cancel\",\n    \"submit\"\n  ],\n  data() {\n    return {\n      isRegistered: isCustomPickerElementRegistered(this.provider.id),\n      renderResult: null\n    };\n  },\n  mounted() {\n    if (this.isRegistered) {\n      this.renderElement();\n    }\n  },\n  beforeUnmount() {\n    if (this.isRegistered) {\n      destroyCustomPickerElement(this.provider.id, this.$el, this.renderResult);\n    }\n  },\n  methods: {\n    renderElement() {\n      if (this.$refs.domElement) {\n        this.$refs.domElement.innerHTML = \"\";\n      }\n      const renderFunctionResult = renderCustomPickerElement(this.$refs.domElement, { providerId: this.provider.id, accessible: false });\n      Promise.resolve(renderFunctionResult).then((result) => {\n        this.renderResult = result;\n        if (this.renderResult.object?._isVue && this.renderResult.object?.$on) {\n          this.renderResult.object.$on(\"submit\", this.onSubmit);\n          this.renderResult.object.$on(\"cancel\", this.onCancel);\n        }\n        this.renderResult.element.addEventListener(\"submit\", (e) => {\n          this.onSubmit(e.detail);\n        });\n        this.renderResult.element.addEventListener(\"cancel\", this.onCancel);\n      });\n    },\n    onSubmit(value) {\n      this.$emit(\"submit\", value);\n    },\n    onCancel() {\n      this.$emit(\"cancel\");\n    }\n  }\n};\nconst _hoisted_1$8 = { ref: \"domElement\" };\nfunction _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"div\", _hoisted_1$8, null, 512);\n}\nconst NcCustomPickerElement = /* @__PURE__ */ _export_sfc(_sfc_main$8, [[\"render\", _sfc_render$7], [\"__scopeId\", \"data-v-e408867a\"]]);\nconst _sfc_main$7 = {\n  name: \"LinkVariantIcon\",\n  emits: [\"click\"],\n  props: {\n    title: {\n      type: String\n    },\n    fillColor: {\n      type: String,\n      default: \"currentColor\"\n    },\n    size: {\n      type: Number,\n      default: 24\n    }\n  }\n};\nconst _hoisted_1$7 = [\"aria-hidden\", \"aria-label\"];\nconst _hoisted_2$6 = [\"fill\", \"width\", \"height\"];\nconst _hoisted_3$5 = { d: \"M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z\" };\nconst _hoisted_4$4 = { key: 0 };\nfunction _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {\n  return openBlock(), createElementBlock(\"span\", mergeProps(_ctx.$attrs, {\n    \"aria-hidden\": $props.title ? null : \"true\",\n    \"aria-label\": $props.title,\n    class: \"material-design-icon link-variant-icon\",\n    role: \"img\",\n    onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit(\"click\", $event))\n  }), [\n    (openBlock(), createElementBlock(\"svg\", {\n      fill: $props.fillColor,\n      class: \"material-design-icon__svg\",\n      width: $props.size,\n      height: $props.size,\n      viewBox: \"0 0 24 24\"\n    }, [\n      createElementVNode(\"path\", _hoisted_3$5, [\n        $props.title ? (openBlock(), createElementBlock(\"title\", _hoisted_4$4, toDisplayString($props.title), 1)) : createCommentVNode(\"\", true)\n      ])\n    ], 8, _hoisted_2$6))\n  ], 16, _hoisted_1$7);\n}\nconst LinkVariantIcon = /* @__PURE__ */ _export_sfc(_sfc_main$7, [[\"render\", _sfc_render$6]]);\nregister(t8);\nconst anyLinkProviderId = \"any-link\";\nconst anyLinkProvider = {\n  id: anyLinkProviderId,\n  title: t(\"Any link\"),\n  order: 0,\n  icon_url: imagePath(\"core\", \"filetypes/link.svg\")\n};\nwindow._vue_richtext_reference_providers ??= loadState(\"core\", \"reference-provider-list\", []);\nwindow._vue_richtext_reference_provider_timestamps ??= loadState(\"core\", \"reference-provider-timestamps\", {});\nfunction getProvider(providerId) {\n  if (providerId === anyLinkProviderId) {\n    return anyLinkProvider;\n  }\n  return getProviders().find((p) => p.id === providerId);\n}\nfunction getProviders() {\n  return window._vue_richtext_reference_providers.filter((p) => {\n    const keep = !!p.search_providers_ids && p.search_providers_ids.length > 0 || isCustomPickerElementRegistered(p.id);\n    if (!keep) {\n      logger.debug(`[smart picker] ${p.id} reference provider is discoverable but does not have any related search provider or custom picker component registered`);\n    }\n    return keep;\n  });\n}\nfunction sortProviders(providerList) {\n  const timestamps = window._vue_richtext_reference_provider_timestamps;\n  return providerList.sort((a, b) => {\n    return a.order === b.order ? 0 : a.order > b.order ? 1 : -1;\n  }).sort((a, b) => {\n    const ta = timestamps[a.id];\n    const tb = timestamps[b.id];\n    return ta === tb ? 0 : tb === void 0 ? -1 : ta === void 0 ? 1 : ta > tb ? -1 : 1;\n  });\n}\nfunction searchProvider(query, limit) {\n  const providers = getProviders();\n  const escapedQuery = query.replace(/[/\\-\\\\^$*+?.()|[\\]{}]/g, \"\\\\$&\");\n  const regexp = new RegExp(escapedQuery, \"i\");\n  const sortedProviders = sortProviders(providers);\n  const filteredSortedProviders = sortedProviders.filter((p) => {\n    return p.title.match(regexp);\n  });\n  const searchResult = limit ? filteredSortedProviders.slice(0, limit) : filteredSortedProviders;\n  if (query === \"\" || searchResult.length === 0) {\n    searchResult.push(anyLinkProvider);\n  }\n  return searchResult;\n}\nasync function touchProvider(providerId) {\n  const timestamp = Math.floor(Date.now() / 1e3);\n  const url = generateOcsUrl(\"references/provider/{providerId}\", { providerId });\n  await axios.put(url, { timestamp });\n  window._vue_richtext_reference_provider_timestamps[providerId] = timestamp;\n}\nregister(t40, t45);\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction isUrl(str) {\n  try {\n    return Boolean(new URL(str));\n  } catch {\n    return false;\n  }\n}\nconst _sfc_main$6 = {\n  name: \"NcProviderList\",\n  components: {\n    NcSelect,\n    NcHighlight: _sfc_main$a,\n    NcEmptyContent,\n    LinkVariantIcon\n  },\n  emits: [\n    \"selectProvider\",\n    \"submit\"\n  ],\n  data() {\n    return {\n      selectedProvider: null,\n      query: \"\",\n      multiselectPlaceholder: t(\"Select provider\"),\n      providerIconAlt: t(\"Provider icon\")\n    };\n  },\n  computed: {\n    options() {\n      const result = [];\n      if (this.query !== \"\" && isUrl(this.query)) {\n        result.push({\n          id: this.query,\n          title: this.query,\n          isLink: true\n        });\n      }\n      result.push(...searchProvider(this.query));\n      return result;\n    }\n  },\n  methods: {\n    focus() {\n      setTimeout(() => {\n        this.$refs[\"provider-select\"]?.$el?.querySelector(\"#provider-select-input\")?.focus();\n      }, 300);\n    },\n    onProviderSelected(p) {\n      if (p !== null) {\n        if (p.isLink) {\n          this.$emit(\"submit\", p.title);\n        } else {\n          this.$emit(\"selectProvider\", p);\n        }\n        this.selectedProvider = null;\n      }\n    },\n    onSearch(query) {\n      this.query = query;\n    }\n  }\n};\nconst _hoisted_1$6 = { class: \"provider-list\" };\nconst _hoisted_2$5 = {\n  key: 0,\n  class: \"provider\"\n};\nconst _hoisted_3$4 = {\n  key: 1,\n  class: \"provider\"\n};\nconst _hoisted_4$3 = [\"src\", \"alt\"];\nfunction _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_LinkVariantIcon = resolveComponent(\"LinkVariantIcon\");\n  const _component_NcHighlight = resolveComponent(\"NcHighlight\");\n  const _component_NcSelect = resolveComponent(\"NcSelect\");\n  const _component_NcEmptyContent = resolveComponent(\"NcEmptyContent\");\n  return openBlock(), createElementBlock(\"div\", _hoisted_1$6, [\n    createVNode(_component_NcSelect, {\n      ref: \"provider-select\",\n      modelValue: $data.selectedProvider,\n      \"onUpdate:modelValue\": [\n        _cache[0] || (_cache[0] = ($event) => $data.selectedProvider = $event),\n        $options.onProviderSelected\n      ],\n      class: \"provider-list--select\",\n      inputId: \"provider-select-input\",\n      label: \"title\",\n      placeholder: $data.multiselectPlaceholder,\n      options: $options.options,\n      appendToBody: false,\n      clearSearchOnSelect: true,\n      clearSearchOnBlur: () => false,\n      filterable: false,\n      onSearch: $options.onSearch\n    }, {\n      option: withCtx((option) => [\n        option.isLink ? (openBlock(), createElementBlock(\"div\", _hoisted_2$5, [\n          createVNode(_component_LinkVariantIcon, {\n            class: \"link-icon\",\n            size: 20\n          }),\n          createElementVNode(\"span\", null, toDisplayString(option.title), 1)\n        ])) : (openBlock(), createElementBlock(\"div\", _hoisted_3$4, [\n          createElementVNode(\"img\", {\n            class: \"provider-icon\",\n            src: option.icon_url,\n            alt: $data.providerIconAlt\n          }, null, 8, _hoisted_4$3),\n          createVNode(_component_NcHighlight, {\n            class: \"option-text\",\n            search: $data.query,\n            text: option.title\n          }, null, 8, [\"search\", \"text\"])\n        ]))\n      ]),\n      _: 1\n    }, 8, [\"modelValue\", \"placeholder\", \"options\", \"onSearch\", \"onUpdate:modelValue\"]),\n    createVNode(_component_NcEmptyContent, { class: \"provider-list--empty-content\" }, {\n      icon: withCtx(() => [\n        createVNode(_component_LinkVariantIcon)\n      ]),\n      _: 1\n    })\n  ]);\n}\nconst NcProviderList = /* @__PURE__ */ _export_sfc(_sfc_main$6, [[\"render\", _sfc_render$5], [\"__scopeId\", \"data-v-ea81d3af\"]]);\nregister(t24);\nconst _hoisted_1$5 = [\"src\"];\nconst _hoisted_2$4 = { class: \"widget-default--details\" };\nconst _hoisted_3$3 = { class: \"widget-default--name\" };\nconst _hoisted_4$2 = { class: \"widget-default--link\" };\nconst IDLE_TIMEOUT = 3 * 60 * 1e3;\nconst _sfc_main$5 = /* @__PURE__ */ defineComponent({\n  __name: \"NcReferenceWidget\",\n  props: {\n    reference: {},\n    interactive: { type: Boolean, default: true },\n    interactiveOptIn: { type: Boolean, default: false }\n  },\n  setup(__props) {\n    const props = __props;\n    const router = inject(routerKey, null);\n    const isVisible = ref(false);\n    const customWidget = useTemplateRef(\"customWidget\");\n    const widgetRoot = useTemplateRef(\"widgetRoot\");\n    const { width } = useElementSize(widgetRoot);\n    useIntersectionObserver(widgetRoot, ([entry]) => {\n      nextTick(() => {\n        isVisible.value = entry.isIntersecting;\n      });\n    });\n    const showInteractive = ref(false);\n    const rendered = ref(false);\n    let idleTimeout = null;\n    const isInteractive = computed(() => {\n      return !props.interactiveOptIn && props.interactive || showInteractive.value;\n    });\n    const referenceHasFullWidth = computed(() => {\n      return hasFullWidth(props.reference.richObjectType);\n    });\n    const hasCustomWidget = computed(() => {\n      return isWidgetRegistered(props.reference.richObjectType);\n    });\n    const referenceHasInteractiveView = computed(() => {\n      return hasCustomWidget.value && hasInteractiveView(props.reference.richObjectType);\n    });\n    const noAccess = computed(() => {\n      return !props.reference.accessible;\n    });\n    const numberOfLines = computed(() => {\n      const lineCountOffsets = [450, 550, 650, Infinity];\n      return lineCountOffsets.findIndex((max) => width.value < max);\n    });\n    const descriptionStyle = computed(() => {\n      if (numberOfLines.value === 0) {\n        return {\n          display: \"none\"\n        };\n      }\n      const lineClamp = numberOfLines.value;\n      return {\n        lineClamp,\n        webkitLineClamp: lineClamp\n      };\n    });\n    const compactLink = computed(() => {\n      const link = props.reference.openGraphObject.link;\n      if (!link) {\n        return \"\";\n      }\n      if (link.startsWith(\"https://\")) {\n        return link.substring(8);\n      }\n      if (link.startsWith(\"http://\")) {\n        return link.substring(7);\n      }\n      return link;\n    });\n    const route = computed(() => {\n      return getRoute(router, props.reference.openGraphObject.link);\n    });\n    const referenceWidgetLinkComponent = computed(() => {\n      return route.value ? RouterLink : \"a\";\n    });\n    const referenceWidgetLinkProps = computed(() => {\n      return route.value ? { to: route.value } : { href: props.reference.openGraphObject.link, target: \"_blank\" };\n    });\n    watch(isVisible, (val) => {\n      if (!val) {\n        idleTimeout = setTimeout(() => {\n          if (!isVisible.value) {\n            destroyReferenceWidget();\n          }\n        }, IDLE_TIMEOUT);\n        return;\n      }\n      if (idleTimeout) {\n        clearTimeout(idleTimeout);\n        idleTimeout = null;\n      }\n      if (!rendered.value) {\n        renderReferenceWidget();\n      }\n    }, { immediate: true });\n    onBeforeUnmount(() => {\n      destroyReferenceWidget();\n    });\n    function enableInteractive() {\n      showInteractive.value = true;\n      renderReferenceWidget();\n    }\n    function renderReferenceWidget() {\n      if (!customWidget.value) {\n        return;\n      }\n      if (props.reference.richObjectType === \"open-graph\") {\n        return;\n      }\n      customWidget.value.innerHTML = \"\";\n      const widget = document.createElement(\"div\");\n      widget.style.width = \"100%\";\n      customWidget.value.appendChild(widget);\n      nextTick(() => {\n        renderWidget(widget, {\n          ...props.reference,\n          interactive: isInteractive.value\n        });\n        rendered.value = true;\n      });\n    }\n    function destroyReferenceWidget() {\n      if (rendered.value && widgetRoot.value) {\n        destroyWidget(props.reference.richObjectType, widgetRoot.value);\n        rendered.value = false;\n      }\n    }\n    return (_ctx, _cache) => {\n      return openBlock(), createElementBlock(\"div\", {\n        ref_key: \"widgetRoot\",\n        ref: widgetRoot,\n        class: normalizeClass({ \"toggle-interactive\": referenceHasInteractiveView.value && !isInteractive.value })\n      }, [\n        _ctx.reference && hasCustomWidget.value ? (openBlock(), createElementBlock(\"div\", {\n          key: 0,\n          ref_key: \"customWidget\",\n          ref: customWidget,\n          class: normalizeClass([\"widget-custom\", { \"full-width\": referenceHasFullWidth.value }])\n        }, null, 2)) : !noAccess.value && _ctx.reference && _ctx.reference.openGraphObject && !hasCustomWidget.value ? (openBlock(), createBlock(resolveDynamicComponent(referenceWidgetLinkComponent.value), mergeProps({ key: 1 }, referenceWidgetLinkProps.value, {\n          rel: \"noopener noreferrer\",\n          class: \"widget-default\"\n        }), {\n          default: withCtx(() => [\n            _ctx.reference.openGraphObject.thumb ? (openBlock(), createElementBlock(\"img\", {\n              key: 0,\n              class: \"widget-default--image\",\n              src: _ctx.reference.openGraphObject.thumb\n            }, null, 8, _hoisted_1$5)) : createCommentVNode(\"\", true),\n            createElementVNode(\"div\", _hoisted_2$4, [\n              createElementVNode(\"p\", _hoisted_3$3, toDisplayString(_ctx.reference.openGraphObject.name), 1),\n              createElementVNode(\"p\", {\n                class: \"widget-default--description\",\n                style: normalizeStyle(descriptionStyle.value)\n              }, toDisplayString(_ctx.reference.openGraphObject.description), 5),\n              createElementVNode(\"p\", _hoisted_4$2, toDisplayString(compactLink.value), 1)\n            ])\n          ]),\n          _: 1\n        }, 16)) : createCommentVNode(\"\", true),\n        _ctx.interactiveOptIn && referenceHasInteractiveView.value && !isInteractive.value ? (openBlock(), createBlock(NcButton, {\n          key: 2,\n          class: \"toggle-interactive--button\",\n          onClick: enableInteractive\n        }, {\n          default: withCtx(() => [\n            createTextVNode(toDisplayString(unref(t)(\"Enable interactive view\")), 1)\n          ]),\n          _: 1\n        })) : createCommentVNode(\"\", true)\n      ], 2);\n    };\n  }\n});\nconst NcReferenceWidget = /* @__PURE__ */ _export_sfc(_sfc_main$5, [[\"__scopeId\", \"data-v-8ce33442\"]]);\nregister(t25);\nconst _sfc_main$4 = {\n  name: \"NcRawLinkInput\",\n  components: {\n    LinkVariantIcon,\n    NcEmptyContent,\n    NcLoadingIcon,\n    NcReferenceWidget,\n    NcTextField: _sfc_main$b\n  },\n  props: {\n    /**\n     * The reference provider\n     */\n    provider: {\n      type: Object,\n      required: true\n    }\n  },\n  emits: [\n    \"submit\"\n  ],\n  data() {\n    return {\n      inputValue: \"\",\n      loading: false,\n      reference: null,\n      abortController: null,\n      inputPlaceholder: t(\"Enter link\")\n    };\n  },\n  computed: {\n    isLinkValid() {\n      return isUrl(this.inputValue);\n    },\n    debouncedUpdateReference() {\n      return debounce(this.updateReference, 500);\n    }\n  },\n  methods: {\n    focus() {\n      this.$refs[\"url-input\"].$el.getElementsByTagName(\"input\")[0]?.focus();\n    },\n    onSubmit(e) {\n      const value = e.target.value;\n      if (this.isLinkValid) {\n        this.$emit(\"submit\", value);\n      }\n    },\n    onClear() {\n      this.inputValue = \"\";\n      this.reference = null;\n    },\n    onInput() {\n      this.reference = null;\n      if (this.abortController) {\n        this.abortController.abort();\n      }\n      if (this.isLinkValid) {\n        this.debouncedUpdateReference();\n      }\n    },\n    updateReference() {\n      this.loading = true;\n      this.abortController = new AbortController();\n      axios.get(generateOcsUrl(\"references/resolve\", 2) + \"?reference=\" + encodeURIComponent(this.inputValue), {\n        signal: this.abortController.signal\n      }).then((response) => {\n        this.reference = response.data.ocs.data.references[this.inputValue];\n      }).catch((error) => {\n        logger.error(\"[NcRawLinkInput] Failed to update reference\", { error });\n      }).then(() => {\n        this.loading = false;\n      });\n    }\n  }\n};\nconst _hoisted_1$4 = { class: \"raw-link\" };\nconst _hoisted_2$3 = { class: \"input-wrapper\" };\nconst _hoisted_3$2 = [\"src\"];\nfunction _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcLoadingIcon = resolveComponent(\"NcLoadingIcon\");\n  const _component_LinkVariantIcon = resolveComponent(\"LinkVariantIcon\");\n  const _component_NcTextField = resolveComponent(\"NcTextField\");\n  const _component_NcReferenceWidget = resolveComponent(\"NcReferenceWidget\");\n  const _component_NcEmptyContent = resolveComponent(\"NcEmptyContent\");\n  return openBlock(), createElementBlock(\"div\", _hoisted_1$4, [\n    createElementVNode(\"div\", _hoisted_2$3, [\n      createVNode(_component_NcTextField, {\n        ref: \"url-input\",\n        modelValue: $data.inputValue,\n        \"onUpdate:modelValue\": [\n          _cache[0] || (_cache[0] = ($event) => $data.inputValue = $event),\n          $options.onInput\n        ],\n        showTrailingButton: $data.inputValue !== \"\",\n        label: $data.inputPlaceholder,\n        onTrailingButtonClick: $options.onClear,\n        onKeyup: withKeys($options.onSubmit, [\"enter\"])\n      }, {\n        default: withCtx(() => [\n          $data.loading ? (openBlock(), createBlock(_component_NcLoadingIcon, {\n            key: 0,\n            size: 16\n          })) : (openBlock(), createBlock(_component_LinkVariantIcon, {\n            key: 1,\n            size: 16\n          }))\n        ]),\n        _: 1\n      }, 8, [\"modelValue\", \"showTrailingButton\", \"label\", \"onTrailingButtonClick\", \"onUpdate:modelValue\", \"onKeyup\"])\n    ]),\n    $data.reference !== null ? (openBlock(), createBlock(_component_NcReferenceWidget, {\n      key: 0,\n      class: \"reference-widget\",\n      reference: $data.reference\n    }, null, 8, [\"reference\"])) : (openBlock(), createBlock(_component_NcEmptyContent, {\n      key: 1,\n      class: \"raw-link--empty-content\"\n    }, {\n      icon: withCtx(() => [\n        $props.provider.icon_url ? (openBlock(), createElementBlock(\"img\", {\n          key: 0,\n          class: \"provider-icon\",\n          src: $props.provider.icon_url\n        }, null, 8, _hoisted_3$2)) : (openBlock(), createBlock(_component_LinkVariantIcon, { key: 1 }))\n      ]),\n      _: 1\n    }))\n  ]);\n}\nconst NcRawLinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$4, [[\"render\", _sfc_render$4], [\"__scopeId\", \"data-v-918730b9\"]]);\nconst _sfc_main$3 = {\n  name: \"NcSearchResult\",\n  components: {\n    NcHighlight: _sfc_main$a\n  },\n  props: {\n    /**\n     * Unified search result entry\n     */\n    entry: {\n      type: Object,\n      required: true\n    },\n    /**\n     * The query that led to getting this result\n     * Used to highlight the entry text\n     */\n    query: {\n      type: String,\n      required: true\n    }\n  }\n};\nconst _hoisted_1$3 = { class: \"result\" };\nconst _hoisted_2$2 = [\"src\"];\nconst _hoisted_3$1 = { class: \"result--content\" };\nconst _hoisted_4$1 = { class: \"result--content--name\" };\nconst _hoisted_5$1 = { class: \"result--content--subline\" };\nfunction _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcHighlight = resolveComponent(\"NcHighlight\");\n  return openBlock(), createElementBlock(\"div\", _hoisted_1$3, [\n    $props.entry.icon ? (openBlock(), createElementBlock(\"div\", {\n      key: 0,\n      class: normalizeClass([{ [$props.entry.icon]: true, rounded: $props.entry.rounded }, \"result--icon-class\"])\n    }, null, 2)) : (openBlock(), createElementBlock(\"img\", {\n      key: 1,\n      class: normalizeClass([\"result--image\", { rounded: $props.entry.rounded }]),\n      src: $props.entry.thumbnailUrl\n    }, null, 10, _hoisted_2$2)),\n    createElementVNode(\"div\", _hoisted_3$1, [\n      createElementVNode(\"span\", _hoisted_4$1, [\n        createVNode(_component_NcHighlight, {\n          search: $props.query,\n          text: $props.entry.title\n        }, null, 8, [\"search\", \"text\"])\n      ]),\n      createElementVNode(\"span\", _hoisted_5$1, [\n        createVNode(_component_NcHighlight, {\n          search: $props.query,\n          text: $props.entry.subline\n        }, null, 8, [\"search\", \"text\"])\n      ])\n    ])\n  ]);\n}\nconst NcSearchResult = /* @__PURE__ */ _export_sfc(_sfc_main$3, [[\"render\", _sfc_render$3], [\"__scopeId\", \"data-v-059edcfb\"]]);\nregister(t32, t40, t42);\nconst LIMIT = 5;\nconst _sfc_main$2 = {\n  name: \"NcSearch\",\n  components: {\n    LinkVariantIcon,\n    DotsHorizontalIcon: IconDotsHorizontal,\n    NcEmptyContent,\n    NcSelect,\n    NcSearchResult\n  },\n  /* eslint vue/require-prop-comment: warn -- TODO: Add a proper doc block about what this props do */\n  props: {\n    /**\n     * The selected reference provider\n     */\n    provider: {\n      type: Object,\n      required: true\n    },\n    showEmptyContent: {\n      type: Boolean,\n      default: true\n    },\n    /**\n     * Placeholder of the search\n     */\n    searchPlaceholder: {\n      type: String,\n      default: null\n    }\n  },\n  emits: [\n    \"submit\"\n  ],\n  data() {\n    return {\n      searchQuery: \"\",\n      selectedResult: null,\n      resultsBySearchProvider: {},\n      searching: false,\n      searchingMoreOf: null,\n      abortController: null,\n      noOptionsText: t(\"Start typing to search\"),\n      providerIconAlt: t(\"Provider icon\")\n    };\n  },\n  computed: {\n    mySearchPlaceholder() {\n      return this.searchPlaceholder || t(\"Search\");\n    },\n    searchProviderIds() {\n      return this.provider.search_providers_ids;\n    },\n    options() {\n      if (this.searchQuery === \"\") {\n        return [];\n      }\n      const options = [];\n      if (isUrl(this.searchQuery)) {\n        options.push(this.rawLinkEntry);\n      }\n      options.push(...this.formattedSearchResults);\n      return options;\n    },\n    rawLinkEntry() {\n      return {\n        id: \"rawLinkEntry\",\n        resourceUrl: this.searchQuery,\n        isRawLink: true\n      };\n    },\n    formattedSearchResults() {\n      const results = [];\n      this.searchProviderIds.forEach((pid) => {\n        if (this.resultsBySearchProvider[pid].entries.length > 0) {\n          if (this.searchProviderIds.length > 1 || this.resultsBySearchProvider[pid].entries.length > 1) {\n            results.push({\n              id: \"groupTitle-\" + pid,\n              name: this.resultsBySearchProvider[pid].name,\n              isCustomGroupTitle: true,\n              providerId: pid\n            });\n          }\n          const providerEntriesWithId = this.resultsBySearchProvider[pid].entries.map((entry, index) => {\n            return {\n              id: \"provider-\" + pid + \"-entry-\" + index,\n              ...entry\n            };\n          });\n          results.push(...providerEntriesWithId);\n          if (this.resultsBySearchProvider[pid].isPaginated) {\n            results.push({\n              id: \"moreOf-\" + pid,\n              name: this.resultsBySearchProvider[pid].name,\n              isMore: true,\n              providerId: pid,\n              isLoading: this.searchingMoreOf === pid\n            });\n          }\n        }\n      });\n      return results;\n    },\n    debouncedUpdateSearch() {\n      return debounce(this.updateSearch, 500);\n    }\n  },\n  mounted() {\n    this.resetResults();\n  },\n  beforeUnmount() {\n    this.cancelSearchRequests();\n  },\n  methods: {\n    t,\n    resetResults() {\n      const resultsBySearchProvider = {};\n      this.searchProviderIds.forEach((pid) => {\n        resultsBySearchProvider[pid] = {\n          entries: []\n        };\n      });\n      this.resultsBySearchProvider = resultsBySearchProvider;\n    },\n    focus() {\n      setTimeout(() => {\n        this.$refs[\"search-select\"]?.$el?.querySelector(\"#search-select-input\")?.focus();\n      }, 300);\n    },\n    cancelSearchRequests() {\n      if (this.abortController) {\n        this.abortController.abort();\n      }\n    },\n    onSearchInput(query) {\n      this.searchQuery = query;\n      this.debouncedUpdateSearch();\n    },\n    onSelectResultSelected(item) {\n      if (item !== null) {\n        if (item.resourceUrl) {\n          this.cancelSearchRequests();\n          this.$emit(\"submit\", item.resourceUrl);\n        } else if (item.isMore) {\n          this.searchMoreOf(item.providerId).then(() => {\n            this.selectedResult = null;\n          });\n        }\n      }\n    },\n    searchMoreOf(searchProviderId) {\n      this.searchingMoreOf = searchProviderId;\n      this.cancelSearchRequests();\n      return this.searchProviders(searchProviderId);\n    },\n    updateSearch() {\n      this.cancelSearchRequests();\n      this.resetResults();\n      if (this.searchQuery === \"\") {\n        this.searching = false;\n        return;\n      }\n      return this.searchProviders();\n    },\n    searchProviders(searchProviderId = null) {\n      this.abortController = new AbortController();\n      this.searching = true;\n      const searchPromises = searchProviderId === null ? [...this.searchProviderIds].map((pid) => {\n        return this.searchOneProvider(pid);\n      }) : [this.searchOneProvider(searchProviderId, this.resultsBySearchProvider[searchProviderId]?.cursor ?? null)];\n      return Promise.allSettled(searchPromises).then((promises) => {\n        const isOneCanceled = !!promises.find((p) => {\n          return p.status === \"rejected\" && (p.reason.name === \"CanceledError\" || p.reason.code === \"ERR_CANCELED\");\n        });\n        if (!isOneCanceled) {\n          this.searching = false;\n          this.searchingMoreOf = null;\n        }\n      });\n    },\n    searchOneProvider(providerId, cursor = null) {\n      const url = cursor === null ? generateOcsUrl(\"search/providers/{providerId}/search?term={term}&limit={limit}\", { providerId, term: this.searchQuery, limit: LIMIT }) : generateOcsUrl(\"search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}\", { providerId, term: this.searchQuery, limit: LIMIT, cursor });\n      return axios.get(url, {\n        signal: this.abortController.signal\n      }).then((response) => {\n        const data = response.data.ocs.data;\n        this.resultsBySearchProvider[providerId].name = data.name;\n        this.resultsBySearchProvider[providerId].cursor = data.cursor;\n        this.resultsBySearchProvider[providerId].isPaginated = data.isPaginated;\n        this.resultsBySearchProvider[providerId].entries.push(...data.entries);\n      });\n    }\n  }\n};\nconst _hoisted_1$2 = {\n  key: 0,\n  class: \"custom-option\"\n};\nconst _hoisted_2$1 = { class: \"option-text\" };\nconst _hoisted_3 = {\n  key: 2,\n  class: \"custom-option group-name\"\n};\nconst _hoisted_4 = [\"src\"];\nconst _hoisted_5 = { class: \"option-text\" };\nconst _hoisted_6 = {\n  key: 3,\n  class: \"custom-option\"\n};\nconst _hoisted_7 = {\n  key: 0,\n  class: \"option-simple-icon icon-loading-small\"\n};\nconst _hoisted_8 = { class: \"option-text\" };\nconst _hoisted_9 = [\"alt\", \"src\"];\nfunction _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_LinkVariantIcon = resolveComponent(\"LinkVariantIcon\");\n  const _component_NcSearchResult = resolveComponent(\"NcSearchResult\");\n  const _component_DotsHorizontalIcon = resolveComponent(\"DotsHorizontalIcon\");\n  const _component_NcSelect = resolveComponent(\"NcSelect\");\n  const _component_NcEmptyContent = resolveComponent(\"NcEmptyContent\");\n  return openBlock(), createElementBlock(\"div\", {\n    class: normalizeClass([\"smart-picker-search\", { \"with-empty-content\": $props.showEmptyContent }])\n  }, [\n    createVNode(_component_NcSelect, {\n      ref: \"search-select\",\n      modelValue: $data.selectedResult,\n      \"onUpdate:modelValue\": [\n        _cache[0] || (_cache[0] = ($event) => $data.selectedResult = $event),\n        $options.onSelectResultSelected\n      ],\n      class: \"smart-picker-search--select\",\n      inputId: \"search-select-input\",\n      label: \"name\",\n      placeholder: $options.mySearchPlaceholder,\n      options: $options.options,\n      appendToBody: false,\n      closeOnSelect: false,\n      clearSearchOnSelect: false,\n      clearSearchOnBlur: () => false,\n      resetFocusOnOptionsChange: false,\n      filterable: false,\n      autoscroll: true,\n      resetOnOptionsChange: false,\n      loading: $data.searching,\n      onSearch: $options.onSearchInput\n    }, {\n      option: withCtx((option) => [\n        option.isRawLink ? (openBlock(), createElementBlock(\"div\", _hoisted_1$2, [\n          createVNode(_component_LinkVariantIcon, {\n            class: \"option-simple-icon\",\n            size: 20\n          }),\n          createElementVNode(\"span\", _hoisted_2$1, toDisplayString($options.t(\"Raw link {options}\", { options: option.resourceUrl })), 1)\n        ])) : option.resourceUrl ? (openBlock(), createBlock(_component_NcSearchResult, {\n          key: 1,\n          class: \"search-result\",\n          entry: option,\n          query: $data.searchQuery\n        }, null, 8, [\"entry\", \"query\"])) : option.isCustomGroupTitle ? (openBlock(), createElementBlock(\"span\", _hoisted_3, [\n          $props.provider.icon_url ? (openBlock(), createElementBlock(\"img\", {\n            key: 0,\n            class: \"provider-icon group-name-icon\",\n            src: $props.provider.icon_url\n          }, null, 8, _hoisted_4)) : createCommentVNode(\"\", true),\n          createElementVNode(\"span\", _hoisted_5, [\n            createElementVNode(\"strong\", null, toDisplayString(option.name), 1)\n          ])\n        ])) : option.isMore ? (openBlock(), createElementBlock(\"span\", _hoisted_6, [\n          option.isLoading ? (openBlock(), createElementBlock(\"span\", _hoisted_7)) : (openBlock(), createBlock(_component_DotsHorizontalIcon, {\n            key: 1,\n            class: \"option-simple-icon\",\n            size: 20\n          })),\n          createElementVNode(\"span\", _hoisted_8, toDisplayString($options.t('Load more \"{options}\"', { options: option.name })), 1)\n        ])) : createCommentVNode(\"\", true)\n      ]),\n      \"no-options\": withCtx(() => [\n        createTextVNode(toDisplayString($data.noOptionsText), 1)\n      ]),\n      _: 1\n    }, 8, [\"modelValue\", \"placeholder\", \"options\", \"loading\", \"onSearch\", \"onUpdate:modelValue\"]),\n    $props.showEmptyContent ? (openBlock(), createBlock(_component_NcEmptyContent, {\n      key: 0,\n      class: \"smart-picker-search--empty-content\"\n    }, {\n      icon: withCtx(() => [\n        $props.provider.icon_url ? (openBlock(), createElementBlock(\"img\", {\n          key: 0,\n          class: \"provider-icon\",\n          alt: $data.providerIconAlt,\n          src: $props.provider.icon_url\n        }, null, 8, _hoisted_9)) : (openBlock(), createBlock(_component_LinkVariantIcon, { key: 1 }))\n      ]),\n      _: 1\n    })) : createCommentVNode(\"\", true)\n  ], 2);\n}\nconst NcSearch = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render$2], [\"__scopeId\", \"data-v-af9d145f\"]]);\nconst MODES = {\n  providerList: 1,\n  standardLinkInput: 2,\n  searchInput: 3,\n  customElement: 4\n};\nconst _sfc_main$1 = {\n  name: \"NcReferencePicker\",\n  components: {\n    NcCustomPickerElement,\n    NcProviderList,\n    NcRawLinkInput,\n    NcSearch\n  },\n  props: {\n    /**\n     * Provider to select on creation\n     * Default: null. Show the provider list\n     */\n    initialProvider: {\n      type: Object,\n      default: () => null\n    },\n    /**\n     * Optional width in pixels\n     * Default: 100%\n     */\n    width: {\n      type: Number,\n      default: null\n    },\n    /**\n     * Focus on the provider list select input on creation\n     * Default: true\n     */\n    focusOnCreate: {\n      type: Boolean,\n      default: true\n    }\n  },\n  emits: [\n    \"cancel\",\n    \"cancelRawLink\",\n    \"cancelSearch\",\n    \"providerSelected\",\n    \"submit\"\n  ],\n  data() {\n    return {\n      MODES,\n      selectedProvider: this.initialProvider\n    };\n  },\n  computed: {\n    mode() {\n      return this.selectedProvider === null ? MODES.providerList : isCustomPickerElementRegistered(this.selectedProvider.id) ? MODES.customElement : this.selectedProvider.search_providers_ids ? MODES.searchInput : MODES.standardLinkInput;\n    },\n    pickerWrapperStyle() {\n      return {\n        width: this.width ? this.width + \"px\" : void 0\n      };\n    }\n  },\n  mounted() {\n    if (this.focusOnCreate) {\n      if (this.initialProvider) {\n        setTimeout(() => {\n          this.$refs[\"url-input\"]?.focus();\n        }, 300);\n      } else {\n        this.$nextTick(() => {\n          this.$refs[\"provider-list\"]?.focus();\n        });\n      }\n    }\n  },\n  methods: {\n    onEscapePressed() {\n      if (this.selectedProvider !== null) {\n        this.deselectProvider();\n      } else {\n        this.cancelProviderSelection();\n      }\n    },\n    onProviderSelected(provider) {\n      this.selectedProvider = provider;\n      this.$emit(\"providerSelected\", provider);\n      this.$nextTick(() => {\n        this.$refs[\"url-input\"]?.focus();\n      });\n    },\n    cancelCustomElement() {\n      this.deselectProvider();\n    },\n    cancelSearch() {\n      this.$emit(\"cancelSearch\", this.selectedProvider?.title);\n      this.deselectProvider();\n    },\n    cancelRawLinkInput() {\n      this.$emit(\"cancelRawLink\", this.selectedProvider?.title);\n      this.deselectProvider();\n    },\n    cancelProviderSelection() {\n      this.$emit(\"cancel\");\n    },\n    submitLink(link) {\n      if (this.selectedProvider !== null) {\n        touchProvider(this.selectedProvider.id);\n      }\n      this.$emit(\"submit\", link);\n      this.deselectProvider();\n    },\n    deselectProvider() {\n      this.selectedProvider = null;\n      this.$emit(\"providerSelected\", null);\n      setTimeout(() => {\n        this.$refs[\"provider-list\"]?.focus();\n      }, 300);\n    }\n  }\n};\nconst _hoisted_1$1 = {\n  key: 3,\n  class: \"custom-element-wrapper\"\n};\nfunction _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcProviderList = resolveComponent(\"NcProviderList\");\n  const _component_NcRawLinkInput = resolveComponent(\"NcRawLinkInput\");\n  const _component_NcSearch = resolveComponent(\"NcSearch\");\n  const _component_NcCustomPickerElement = resolveComponent(\"NcCustomPickerElement\");\n  return openBlock(), createElementBlock(\"div\", {\n    class: \"reference-picker\",\n    style: normalizeStyle($options.pickerWrapperStyle),\n    tabindex: \"-1\",\n    onKeydown: _cache[0] || (_cache[0] = withKeys(withModifiers((...args) => $options.onEscapePressed && $options.onEscapePressed(...args), [\"stop\", \"prevent\"]), [\"esc\"]))\n  }, [\n    $options.mode === $data.MODES.providerList ? (openBlock(), createBlock(_component_NcProviderList, {\n      key: 0,\n      ref: \"provider-list\",\n      onSelectProvider: $options.onProviderSelected,\n      onSubmit: $options.submitLink,\n      onCancel: $options.cancelProviderSelection\n    }, null, 8, [\"onSelectProvider\", \"onSubmit\", \"onCancel\"])) : $options.mode === $data.MODES.standardLinkInput ? (openBlock(), createBlock(_component_NcRawLinkInput, {\n      key: 1,\n      ref: \"url-input\",\n      provider: $data.selectedProvider,\n      onSubmit: $options.submitLink,\n      onCancel: $options.cancelRawLinkInput\n    }, null, 8, [\"provider\", \"onSubmit\", \"onCancel\"])) : $options.mode === $data.MODES.searchInput ? (openBlock(), createBlock(_component_NcSearch, {\n      key: 2,\n      ref: \"url-input\",\n      provider: $data.selectedProvider,\n      onCancel: $options.cancelSearch,\n      onSubmit: $options.submitLink\n    }, null, 8, [\"provider\", \"onCancel\", \"onSubmit\"])) : $options.mode === $data.MODES.customElement ? (openBlock(), createElementBlock(\"div\", _hoisted_1$1, [\n      createVNode(_component_NcCustomPickerElement, {\n        provider: $data.selectedProvider,\n        class: \"custom-element\",\n        onSubmit: $options.submitLink,\n        onCancel: $options.cancelCustomElement\n      }, null, 8, [\"provider\", \"onSubmit\", \"onCancel\"])\n    ])) : createCommentVNode(\"\", true)\n  ], 36);\n}\nconst NcReferencePicker = /* @__PURE__ */ _export_sfc(_sfc_main$1, [[\"render\", _sfc_render$1], [\"__scopeId\", \"data-v-5e2e9195\"]]);\nregister(t12, t19);\nconst _sfc_main = {\n  name: \"NcReferencePickerModal\",\n  components: {\n    NcReferencePicker,\n    NcModal,\n    NcButton,\n    ArrowLeftIcon,\n    CloseIcon: IconClose\n  },\n  props: {\n    /**\n     * Provider to select on creation\n     * Show the provider list if no initial one is provided\n     */\n    initialProvider: {\n      type: Object,\n      default: () => null\n    },\n    /**\n     * Focus on the input item on create\n     */\n    focusOnCreate: {\n      type: Boolean,\n      default: true\n    },\n    /**\n     * If true, add the modal content to the Viewer trap elements via the event-bus\n     */\n    isInsideViewer: {\n      type: Boolean,\n      default: false\n    }\n  },\n  emits: [\n    \"cancel\",\n    \"submit\"\n  ],\n  data() {\n    return {\n      show: true,\n      selectedProvider: this.initialProvider,\n      backButtonTitle: t(\"Back to provider selection\"),\n      closeButtonTitle: t(\"Close\"),\n      closeButtonLabel: t(\"Close Smart Picker\")\n    };\n  },\n  computed: {\n    isProviderSelected() {\n      return this.selectedProvider !== null;\n    },\n    showBackButton() {\n      return this.initialProvider === null && this.isProviderSelected;\n    },\n    modalSize() {\n      return this.isProviderSelected && isCustomPickerElementRegistered(this.selectedProvider.id) ? getCustomPickerElementSize(this.selectedProvider.id) ?? \"large\" : \"normal\";\n    },\n    showModalName() {\n      return !this.isProviderSelected || !isCustomPickerElementRegistered(this.selectedProvider.id);\n    },\n    modalName() {\n      return this.isProviderSelected ? this.selectedProvider.title : t(\"Smart Picker\");\n    }\n  },\n  mounted() {\n    if (this.isInsideViewer) {\n      const elem = this.$refs.modal_content;\n      emit(\"viewer:trapElements:changed\", elem);\n    }\n  },\n  methods: {\n    onCancel() {\n      this.show = false;\n      this.$emit(\"cancel\");\n    },\n    onSubmit(value) {\n      this.show = false;\n      this.$emit(\"submit\", value);\n    },\n    onProviderSelect(provider) {\n      this.selectedProvider = provider;\n      if (provider === null && this.initialProvider !== null) {\n        this.onCancel();\n      }\n    },\n    onBackClicked() {\n      this.$refs.referencePicker.deselectProvider();\n    }\n  }\n};\nconst _hoisted_1 = {\n  ref: \"modal_content\",\n  class: \"reference-picker-modal--content\"\n};\nconst _hoisted_2 = { key: 1 };\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_ArrowLeftIcon = resolveComponent(\"ArrowLeftIcon\");\n  const _component_NcButton = resolveComponent(\"NcButton\");\n  const _component_CloseIcon = resolveComponent(\"CloseIcon\");\n  const _component_NcReferencePicker = resolveComponent(\"NcReferencePicker\");\n  const _component_NcModal = resolveComponent(\"NcModal\");\n  return $data.show ? (openBlock(), createBlock(_component_NcModal, {\n    key: 0,\n    size: $options.modalSize,\n    class: \"reference-picker-modal\",\n    onClose: $options.onCancel\n  }, {\n    default: withCtx(() => [\n      createElementVNode(\"div\", _hoisted_1, [\n        $options.showBackButton ? (openBlock(), createBlock(_component_NcButton, {\n          key: 0,\n          \"aria-label\": $data.backButtonTitle,\n          title: $data.backButtonTitle,\n          class: \"back-button\",\n          onClick: $options.onBackClicked\n        }, {\n          icon: withCtx(() => [\n            createVNode(_component_ArrowLeftIcon)\n          ]),\n          _: 1\n        }, 8, [\"aria-label\", \"title\", \"onClick\"])) : createCommentVNode(\"\", true),\n        createVNode(_component_NcButton, {\n          class: \"close-button\",\n          \"aria-label\": $data.closeButtonLabel,\n          title: $data.closeButtonTitle,\n          variant: \"tertiary\",\n          onClick: $options.onCancel\n        }, {\n          icon: withCtx(() => [\n            createVNode(_component_CloseIcon)\n          ]),\n          _: 1\n        }, 8, [\"aria-label\", \"title\", \"onClick\"]),\n        $options.showModalName ? (openBlock(), createElementBlock(\"h2\", _hoisted_2, toDisplayString($options.modalName), 1)) : createCommentVNode(\"\", true),\n        createVNode(_component_NcReferencePicker, {\n          ref: \"referencePicker\",\n          initialProvider: $props.initialProvider,\n          focusOnCreate: $props.focusOnCreate,\n          onProviderSelected: $options.onProviderSelect,\n          onSubmit: $options.onSubmit,\n          onCancel: $options.onCancel\n        }, null, 8, [\"initialProvider\", \"focusOnCreate\", \"onProviderSelected\", \"onSubmit\", \"onCancel\"])\n      ], 512)\n    ]),\n    _: 1\n  }, 8, [\"size\", \"onClose\"])) : createCommentVNode(\"\", true);\n}\nconst NcReferencePickerModal = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-bf0a25ee\"]]);\nasync function getLinkWithPicker(providerId, isInsideViewer) {\n  const modalId = \"referencePickerModal\";\n  const modalElement = document.createElement(\"div\");\n  modalElement.id = modalId;\n  document.body.append(modalElement);\n  const { promise, reject, resolve } = Promise.withResolvers();\n  const initialProvider = providerId && getProvider(providerId) || null;\n  const view = createApp(NcReferencePickerModal, {\n    initialProvider,\n    isInsideViewer,\n    onCancel() {\n      view.unmount();\n      reject(new Error(\"User cancellation\"));\n    },\n    onSubmit(link) {\n      view.unmount();\n      resolve(link);\n    }\n  });\n  view.mount(modalElement);\n  return promise;\n}\nexport {\n  NcReferencePicker as N,\n  anyLinkProviderId as a,\n  getProvider as b,\n  getProviders as c,\n  sortProviders as d,\n  NcReferencePickerModal as e,\n  NcReferenceWidget as f,\n  getLinkWithPicker as g,\n  NcSearch as h,\n  searchProvider as s\n};\n//# sourceMappingURL=referencePickerModal-D9HwChP3.mjs.map\n","import { d as mdiCheck, e as mdiContentCopy } from \"./mdi-CpchYUUV.mjs\";\nimport { ref, computed, toValue } from \"vue\";\nimport { r as register, e as t22, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nregister(t22);\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nconst DELAY = 2e3;\nfunction useCopy(content) {\n  const isCopied = ref(false);\n  const icon = computed(() => isCopied.value ? mdiCheck : mdiContentCopy);\n  const altText = computed(() => isCopied.value ? t(\"Copied\") : t(\"Copy to clipboard\"));\n  async function copy() {\n    if (isCopied.value) {\n      return;\n    }\n    const value = toValue(content);\n    try {\n      await navigator.clipboard.writeText(value);\n    } catch {\n      prompt(\"\", value);\n    }\n    isCopied.value = true;\n    setTimeout(() => {\n      isCopied.value = false;\n    }, DELAY);\n  }\n  return {\n    isCopied,\n    copy,\n    icon,\n    altText\n  };\n}\nexport {\n  useCopy as u\n};\n//# sourceMappingURL=useCopy-CfYsbB0V.mjs.map\n","import '../assets/NcRichText-3BHy89Ls.css';\nimport rehypeExternalLinks from \"rehype-external-links\";\nimport rehype2react from \"rehype-react\";\nimport breaks from \"remark-breaks\";\nimport remarkParse from \"remark-parse\";\nimport remark2rehype from \"remark-rehype\";\nimport remarkUnlinkProtocols from \"remark-unlink-protocols\";\nimport { unified } from \"unified\";\nimport { resolveComponent, createElementBlock, createCommentVNode, openBlock, normalizeClass, Fragment, renderList, createBlock, defineComponent, unref, withCtx, createVNode, ref, h } from \"vue\";\nimport { RouterLink } from \"vue-router\";\nimport { N as NcCheckboxRadioSwitch } from \"./NcCheckboxRadioSwitch-BMsPx74L.mjs\";\nimport { getCurrentUser } from \"@nextcloud/auth\";\nimport axios from \"@nextcloud/axios\";\nimport { generateOcsUrl } from \"@nextcloud/router\";\nimport { getSharingToken } from \"@nextcloud/sharing/public\";\nimport { f as NcReferenceWidget } from \"./referencePickerModal-D9HwChP3.mjs\";\nimport { l as logger } from \"./logger-D3RVzcfQ.mjs\";\nimport { U as URL_PATTERN, g as getRoute, p as parseUrl, r as remarkAutolink } from \"./autolink-U5pBzLgI.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nimport { N as NcButton } from \"./NcButton-C9D47Igd.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { u as useCopy } from \"./useCopy-CfYsbB0V.mjs\";\nimport { c as createElementId } from \"./createElementId-DhjFt1I9.mjs\";\nimport { u } from \"unist-builder\";\nimport { visit, EXIT as EXIT$1, SKIP as SKIP$1 } from \"unist-util-visit\";\nconst _sfc_main$2 = {\n  name: \"NcReferenceList\",\n  components: {\n    NcReferenceWidget\n  },\n  /* eslint vue/require-prop-comment: warn -- TODO: Add a proper doc block about what this props do */\n  props: {\n    text: {\n      type: String,\n      default: \"\"\n    },\n    referenceData: {\n      type: Array,\n      default: null\n    },\n    limit: {\n      type: Number,\n      default: 1\n    },\n    displayFallback: {\n      type: Boolean,\n      default: false\n    },\n    interactive: {\n      type: Boolean,\n      default: true\n    },\n    interactiveOptIn: {\n      type: Boolean,\n      default: false\n    }\n  },\n  emits: [\"loaded\"],\n  data() {\n    return {\n      references: null,\n      loading: true\n    };\n  },\n  computed: {\n    isVisible() {\n      return this.loading || this.displayedReferences.length !== 0;\n    },\n    values() {\n      if (this.referenceData) {\n        return this.referenceData;\n      }\n      if (this.displayFallback && !this.loading && !this.references) {\n        return [this.fallbackReference];\n      }\n      return this.references ? Object.values(this.references) : [];\n    },\n    firstReference() {\n      return this.values[0] ?? null;\n    },\n    displayedReferences() {\n      return this.values.filter(Boolean).slice(0, this.limit);\n    },\n    fallbackReference() {\n      return {\n        accessible: true,\n        openGraphObject: {\n          id: this.text,\n          link: this.text,\n          name: this.text\n        },\n        richObjectType: \"open-graph\"\n      };\n    }\n  },\n  watch: {\n    text: \"fetch\"\n  },\n  mounted() {\n    this.fetch();\n  },\n  methods: {\n    fetch() {\n      this.loading = true;\n      if (this.referenceData) {\n        this.references = null;\n        this.loading = false;\n        return;\n      }\n      if (!new RegExp(URL_PATTERN).exec(this.text)) {\n        this.references = null;\n        this.loading = false;\n        return;\n      }\n      this.resolve().then((response) => {\n        this.references = response.data.ocs.data.references;\n        this.loading = false;\n        this.$emit(\"loaded\");\n      }).catch((error) => {\n        logger.error(\"[NcReferenceList] Failed to extract references\", { error });\n        this.loading = false;\n        this.$emit(\"loaded\");\n      });\n    },\n    resolve() {\n      const match = new RegExp(URL_PATTERN).exec(this.text.trim());\n      const isPublic = getCurrentUser() === null;\n      if (this.limit === 1 && match) {\n        return isPublic ? axios.get(generateOcsUrl(\"references/resolvePublic\") + `?reference=${encodeURIComponent(match[0])}&sharingToken=${getSharingToken()}`) : axios.get(generateOcsUrl(\"references/resolve\") + `?reference=${encodeURIComponent(match[0])}`);\n      }\n      return isPublic ? axios.post(generateOcsUrl(\"references/extractPublic\"), {\n        text: this.text,\n        resolve: true,\n        limit: this.limit,\n        sharingToken: getSharingToken()\n      }) : axios.post(generateOcsUrl(\"references/extract\"), {\n        text: this.text,\n        resolve: true,\n        limit: this.limit\n      });\n    }\n  }\n};\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n  const _component_NcReferenceWidget = resolveComponent(\"NcReferenceWidget\");\n  return $options.isVisible ? (openBlock(), createElementBlock(\"div\", {\n    key: 0,\n    class: normalizeClass([\"widgets--list\", { \"icon-loading\": $data.loading }])\n  }, [\n    (openBlock(true), createElementBlock(Fragment, null, renderList($options.displayedReferences, (reference) => {\n      return openBlock(), createBlock(_component_NcReferenceWidget, {\n        key: reference.openGraphObject?.id,\n        reference,\n        interactive: $props.interactive,\n        interactiveOptIn: $props.interactiveOptIn\n      }, null, 8, [\"reference\", \"interactive\", \"interactiveOptIn\"]);\n    }), 128))\n  ], 2)) : createCommentVNode(\"\", true);\n}\nconst NcReferenceList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [[\"render\", _sfc_render], [\"__scopeId\", \"data-v-9cde5a6a\"]]);\nfunction ccount(value, character) {\n  const source = String(value);\n  if (typeof character !== \"string\") {\n    throw new TypeError(\"Expected character\");\n  }\n  let count = 0;\n  let index = source.indexOf(character);\n  while (index !== -1) {\n    count++;\n    index = source.indexOf(character, index + character.length);\n  }\n  return count;\n}\nfunction ok$1() {\n}\nconst asciiAlpha = regexCheck(/[A-Za-z]/);\nconst asciiAlphanumeric = regexCheck(/[\\dA-Za-z]/);\nfunction asciiControl(code2) {\n  return (\n    // Special whitespace codes (which have negative values), C0 and Control\n    // character DEL\n    code2 !== null && (code2 < 32 || code2 === 127)\n  );\n}\nfunction markdownLineEnding(code2) {\n  return code2 !== null && code2 < -2;\n}\nfunction markdownLineEndingOrSpace(code2) {\n  return code2 !== null && (code2 < 0 || code2 === 32);\n}\nfunction markdownSpace(code2) {\n  return code2 === -2 || code2 === -1 || code2 === 32;\n}\nconst unicodePunctuation = regexCheck(new RegExp(\"\\\\p{P}|\\\\p{S}\", \"u\"));\nconst unicodeWhitespace = regexCheck(/\\s/);\nfunction regexCheck(regex) {\n  return check;\n  function check(code2) {\n    return code2 !== null && code2 > -1 && regex.test(String.fromCharCode(code2));\n  }\n}\nfunction escapeStringRegexp(string) {\n  if (typeof string !== \"string\") {\n    throw new TypeError(\"Expected a string\");\n  }\n  return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\").replace(/-/g, \"\\\\x2d\");\n}\nconst convert = (\n  // Note: overloads in JSDoc can’t yet use different `@template`s.\n  /**\n   * @type {(\n   *   (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &\n   *   (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &\n   *   (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &\n   *   ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &\n   *   ((test?: Test) => Check)\n   * )}\n   */\n  /**\n   * @param {Test} [test]\n   * @returns {Check}\n   */\n  (function(test) {\n    if (test === null || test === void 0) {\n      return ok;\n    }\n    if (typeof test === \"function\") {\n      return castFactory(test);\n    }\n    if (typeof test === \"object\") {\n      return Array.isArray(test) ? anyFactory(test) : propsFactory(test);\n    }\n    if (typeof test === \"string\") {\n      return typeFactory(test);\n    }\n    throw new Error(\"Expected function, string, or object as test\");\n  })\n);\nfunction anyFactory(tests) {\n  const checks = [];\n  let index = -1;\n  while (++index < tests.length) {\n    checks[index] = convert(tests[index]);\n  }\n  return castFactory(any);\n  function any(...parameters) {\n    let index2 = -1;\n    while (++index2 < checks.length) {\n      if (checks[index2].apply(this, parameters)) return true;\n    }\n    return false;\n  }\n}\nfunction propsFactory(check) {\n  const checkAsRecord = (\n    /** @type {Record<string, unknown>} */\n    check\n  );\n  return castFactory(all2);\n  function all2(node2) {\n    const nodeAsRecord = (\n      /** @type {Record<string, unknown>} */\n      /** @type {unknown} */\n      node2\n    );\n    let key;\n    for (key in check) {\n      if (nodeAsRecord[key] !== checkAsRecord[key]) return false;\n    }\n    return true;\n  }\n}\nfunction typeFactory(check) {\n  return castFactory(type);\n  function type(node2) {\n    return node2 && node2.type === check;\n  }\n}\nfunction castFactory(testFunction) {\n  return check;\n  function check(value, index, parent) {\n    return Boolean(\n      looksLikeANode(value) && testFunction.call(\n        this,\n        value,\n        typeof index === \"number\" ? index : void 0,\n        parent || void 0\n      )\n    );\n  }\n}\nfunction ok() {\n  return true;\n}\nfunction looksLikeANode(value) {\n  return value !== null && typeof value === \"object\" && \"type\" in value;\n}\nfunction color(d) {\n  return d;\n}\nconst empty = [];\nconst CONTINUE = true;\nconst EXIT = false;\nconst SKIP = \"skip\";\nfunction visitParents(tree, test, visitor, reverse) {\n  let check;\n  {\n    check = test;\n  }\n  const is = convert(check);\n  const step = 1;\n  factory(tree, void 0, [])();\n  function factory(node2, index, parents) {\n    const value = (\n      /** @type {Record<string, unknown>} */\n      node2 && typeof node2 === \"object\" ? node2 : {}\n    );\n    if (typeof value.type === \"string\") {\n      const name = (\n        // `hast`\n        typeof value.tagName === \"string\" ? value.tagName : (\n          // `xast`\n          typeof value.name === \"string\" ? value.name : void 0\n        )\n      );\n      Object.defineProperty(visit2, \"name\", {\n        value: \"node (\" + color(node2.type + (name ? \"<\" + name + \">\" : \"\")) + \")\"\n      });\n    }\n    return visit2;\n    function visit2() {\n      let result = empty;\n      let subresult;\n      let offset;\n      let grandparents;\n      if (is(node2, index, parents[parents.length - 1] || void 0)) {\n        result = toResult(visitor(node2, parents));\n        if (result[0] === EXIT) {\n          return result;\n        }\n      }\n      if (\"children\" in node2 && node2.children) {\n        const nodeAsParent = (\n          /** @type {UnistParent} */\n          node2\n        );\n        if (nodeAsParent.children && result[0] !== SKIP) {\n          offset = -1 + step;\n          grandparents = parents.concat(nodeAsParent);\n          while (offset > -1 && offset < nodeAsParent.children.length) {\n            const child = nodeAsParent.children[offset];\n            subresult = factory(child, offset, grandparents)();\n            if (subresult[0] === EXIT) {\n              return subresult;\n            }\n            offset = typeof subresult[1] === \"number\" ? subresult[1] : offset + step;\n          }\n        }\n      }\n      return result;\n    }\n  }\n}\nfunction toResult(value) {\n  if (Array.isArray(value)) {\n    return value;\n  }\n  if (typeof value === \"number\") {\n    return [CONTINUE, value];\n  }\n  return value === null || value === void 0 ? empty : [value];\n}\nfunction findAndReplace(tree, list2, options) {\n  const settings = options || {};\n  const ignored = convert(settings.ignore || []);\n  const pairs = toPairs(list2);\n  let pairIndex = -1;\n  while (++pairIndex < pairs.length) {\n    visitParents(tree, \"text\", visitor);\n  }\n  function visitor(node2, parents) {\n    let index = -1;\n    let grandparent;\n    while (++index < parents.length) {\n      const parent = parents[index];\n      const siblings = grandparent ? grandparent.children : void 0;\n      if (ignored(\n        parent,\n        siblings ? siblings.indexOf(parent) : void 0,\n        grandparent\n      )) {\n        return;\n      }\n      grandparent = parent;\n    }\n    if (grandparent) {\n      return handler(node2, parents);\n    }\n  }\n  function handler(node2, parents) {\n    const parent = parents[parents.length - 1];\n    const find = pairs[pairIndex][0];\n    const replace2 = pairs[pairIndex][1];\n    let start = 0;\n    const siblings = parent.children;\n    const index = siblings.indexOf(node2);\n    let change = false;\n    let nodes = [];\n    find.lastIndex = 0;\n    let match = find.exec(node2.value);\n    while (match) {\n      const position = match.index;\n      const matchObject = {\n        index: match.index,\n        input: match.input,\n        stack: [...parents, node2]\n      };\n      let value = replace2(...match, matchObject);\n      if (typeof value === \"string\") {\n        value = value.length > 0 ? { type: \"text\", value } : void 0;\n      }\n      if (value === false) {\n        find.lastIndex = position + 1;\n      } else {\n        if (start !== position) {\n          nodes.push({\n            type: \"text\",\n            value: node2.value.slice(start, position)\n          });\n        }\n        if (Array.isArray(value)) {\n          nodes.push(...value);\n        } else if (value) {\n          nodes.push(value);\n        }\n        start = position + match[0].length;\n        change = true;\n      }\n      if (!find.global) {\n        break;\n      }\n      match = find.exec(node2.value);\n    }\n    if (change) {\n      if (start < node2.value.length) {\n        nodes.push({ type: \"text\", value: node2.value.slice(start) });\n      }\n      parent.children.splice(index, 1, ...nodes);\n    } else {\n      nodes = [node2];\n    }\n    return index + nodes.length;\n  }\n}\nfunction toPairs(tupleOrList) {\n  const result = [];\n  if (!Array.isArray(tupleOrList)) {\n    throw new TypeError(\"Expected find and replace tuple or list of tuples\");\n  }\n  const list2 = !tupleOrList[0] || Array.isArray(tupleOrList[0]) ? tupleOrList : [tupleOrList];\n  let index = -1;\n  while (++index < list2.length) {\n    const tuple = list2[index];\n    result.push([toExpression(tuple[0]), toFunction(tuple[1])]);\n  }\n  return result;\n}\nfunction toExpression(find) {\n  return typeof find === \"string\" ? new RegExp(escapeStringRegexp(find), \"g\") : find;\n}\nfunction toFunction(replace2) {\n  return typeof replace2 === \"function\" ? replace2 : function() {\n    return replace2;\n  };\n}\nconst inConstruct = \"phrasing\";\nconst notInConstruct = [\"autolink\", \"link\", \"image\", \"label\"];\nfunction gfmAutolinkLiteralFromMarkdown() {\n  return {\n    transforms: [transformGfmAutolinkLiterals],\n    enter: {\n      literalAutolink: enterLiteralAutolink,\n      literalAutolinkEmail: enterLiteralAutolinkValue,\n      literalAutolinkHttp: enterLiteralAutolinkValue,\n      literalAutolinkWww: enterLiteralAutolinkValue\n    },\n    exit: {\n      literalAutolink: exitLiteralAutolink,\n      literalAutolinkEmail: exitLiteralAutolinkEmail,\n      literalAutolinkHttp: exitLiteralAutolinkHttp,\n      literalAutolinkWww: exitLiteralAutolinkWww\n    }\n  };\n}\nfunction gfmAutolinkLiteralToMarkdown() {\n  return {\n    unsafe: [\n      {\n        character: \"@\",\n        before: \"[+\\\\-.\\\\w]\",\n        after: \"[\\\\-.\\\\w]\",\n        inConstruct,\n        notInConstruct\n      },\n      {\n        character: \".\",\n        before: \"[Ww]\",\n        after: \"[\\\\-.\\\\w]\",\n        inConstruct,\n        notInConstruct\n      },\n      {\n        character: \":\",\n        before: \"[ps]\",\n        after: \"\\\\/\",\n        inConstruct,\n        notInConstruct\n      }\n    ]\n  };\n}\nfunction enterLiteralAutolink(token) {\n  this.enter({ type: \"link\", title: null, url: \"\", children: [] }, token);\n}\nfunction enterLiteralAutolinkValue(token) {\n  this.config.enter.autolinkProtocol.call(this, token);\n}\nfunction exitLiteralAutolinkHttp(token) {\n  this.config.exit.autolinkProtocol.call(this, token);\n}\nfunction exitLiteralAutolinkWww(token) {\n  this.config.exit.data.call(this, token);\n  const node2 = this.stack[this.stack.length - 1];\n  ok$1(node2.type === \"link\");\n  node2.url = \"http://\" + this.sliceSerialize(token);\n}\nfunction exitLiteralAutolinkEmail(token) {\n  this.config.exit.autolinkEmail.call(this, token);\n}\nfunction exitLiteralAutolink(token) {\n  this.exit(token);\n}\nfunction transformGfmAutolinkLiterals(tree) {\n  findAndReplace(\n    tree,\n    [\n      [/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi, findUrl],\n      [/([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)/g, findEmail]\n    ],\n    { ignore: [\"link\", \"linkReference\"] }\n  );\n}\nfunction findUrl(_, protocol, domain2, path2, match) {\n  let prefix = \"\";\n  if (!previous(match)) {\n    return false;\n  }\n  if (/^w/i.test(protocol)) {\n    domain2 = protocol + domain2;\n    protocol = \"\";\n    prefix = \"http://\";\n  }\n  if (!isCorrectDomain(domain2)) {\n    return false;\n  }\n  const parts = splitUrl(domain2 + path2);\n  if (!parts[0]) return false;\n  const result = {\n    type: \"link\",\n    title: null,\n    url: prefix + protocol + parts[0],\n    children: [{ type: \"text\", value: protocol + parts[0] }]\n  };\n  if (parts[1]) {\n    return [result, { type: \"text\", value: parts[1] }];\n  }\n  return result;\n}\nfunction findEmail(_, atext, label, match) {\n  if (\n    // Not an expected previous character.\n    !previous(match, true) || // Label ends in not allowed character.\n    /[-\\d_]$/.test(label)\n  ) {\n    return false;\n  }\n  return {\n    type: \"link\",\n    title: null,\n    url: \"mailto:\" + atext + \"@\" + label,\n    children: [{ type: \"text\", value: atext + \"@\" + label }]\n  };\n}\nfunction isCorrectDomain(domain2) {\n  const parts = domain2.split(\".\");\n  if (parts.length < 2 || parts[parts.length - 1] && (/_/.test(parts[parts.length - 1]) || !/[a-zA-Z\\d]/.test(parts[parts.length - 1])) || parts[parts.length - 2] && (/_/.test(parts[parts.length - 2]) || !/[a-zA-Z\\d]/.test(parts[parts.length - 2]))) {\n    return false;\n  }\n  return true;\n}\nfunction splitUrl(url) {\n  const trailExec = /[!\"&'),.:;<>?\\]}]+$/.exec(url);\n  if (!trailExec) {\n    return [url, void 0];\n  }\n  url = url.slice(0, trailExec.index);\n  let trail2 = trailExec[0];\n  let closingParenIndex = trail2.indexOf(\")\");\n  const openingParens = ccount(url, \"(\");\n  let closingParens = ccount(url, \")\");\n  while (closingParenIndex !== -1 && openingParens > closingParens) {\n    url += trail2.slice(0, closingParenIndex + 1);\n    trail2 = trail2.slice(closingParenIndex + 1);\n    closingParenIndex = trail2.indexOf(\")\");\n    closingParens++;\n  }\n  return [url, trail2];\n}\nfunction previous(match, email) {\n  const code2 = match.input.charCodeAt(match.index - 1);\n  return (match.index === 0 || unicodeWhitespace(code2) || unicodePunctuation(code2)) && (!email || code2 !== 47);\n}\nfunction normalizeIdentifier(value) {\n  return value.replace(/[\\t\\n\\r ]+/g, \" \").replace(/^ | $/g, \"\").toLowerCase().toUpperCase();\n}\nfootnoteReference.peek = footnoteReferencePeek;\nfunction enterFootnoteCallString() {\n  this.buffer();\n}\nfunction enterFootnoteCall(token) {\n  this.enter({ type: \"footnoteReference\", identifier: \"\", label: \"\" }, token);\n}\nfunction enterFootnoteDefinitionLabelString() {\n  this.buffer();\n}\nfunction enterFootnoteDefinition(token) {\n  this.enter(\n    { type: \"footnoteDefinition\", identifier: \"\", label: \"\", children: [] },\n    token\n  );\n}\nfunction exitFootnoteCallString(token) {\n  const label = this.resume();\n  const node2 = this.stack[this.stack.length - 1];\n  ok$1(node2.type === \"footnoteReference\");\n  node2.identifier = normalizeIdentifier(\n    this.sliceSerialize(token)\n  ).toLowerCase();\n  node2.label = label;\n}\nfunction exitFootnoteCall(token) {\n  this.exit(token);\n}\nfunction exitFootnoteDefinitionLabelString(token) {\n  const label = this.resume();\n  const node2 = this.stack[this.stack.length - 1];\n  ok$1(node2.type === \"footnoteDefinition\");\n  node2.identifier = normalizeIdentifier(\n    this.sliceSerialize(token)\n  ).toLowerCase();\n  node2.label = label;\n}\nfunction exitFootnoteDefinition(token) {\n  this.exit(token);\n}\nfunction footnoteReferencePeek() {\n  return \"[\";\n}\nfunction footnoteReference(node2, _, state, info) {\n  const tracker = state.createTracker(info);\n  let value = tracker.move(\"[^\");\n  const exit2 = state.enter(\"footnoteReference\");\n  const subexit = state.enter(\"reference\");\n  value += tracker.move(\n    state.safe(state.associationId(node2), { after: \"]\", before: value })\n  );\n  subexit();\n  exit2();\n  value += tracker.move(\"]\");\n  return value;\n}\nfunction gfmFootnoteFromMarkdown() {\n  return {\n    enter: {\n      gfmFootnoteCallString: enterFootnoteCallString,\n      gfmFootnoteCall: enterFootnoteCall,\n      gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,\n      gfmFootnoteDefinition: enterFootnoteDefinition\n    },\n    exit: {\n      gfmFootnoteCallString: exitFootnoteCallString,\n      gfmFootnoteCall: exitFootnoteCall,\n      gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,\n      gfmFootnoteDefinition: exitFootnoteDefinition\n    }\n  };\n}\nfunction gfmFootnoteToMarkdown(options) {\n  let firstLineBlank = false;\n  if (options && options.firstLineBlank) {\n    firstLineBlank = true;\n  }\n  return {\n    handlers: { footnoteDefinition, footnoteReference },\n    // This is on by default already.\n    unsafe: [{ character: \"[\", inConstruct: [\"label\", \"phrasing\", \"reference\"] }]\n  };\n  function footnoteDefinition(node2, _, state, info) {\n    const tracker = state.createTracker(info);\n    let value = tracker.move(\"[^\");\n    const exit2 = state.enter(\"footnoteDefinition\");\n    const subexit = state.enter(\"label\");\n    value += tracker.move(\n      state.safe(state.associationId(node2), { before: value, after: \"]\" })\n    );\n    subexit();\n    value += tracker.move(\"]:\");\n    if (node2.children && node2.children.length > 0) {\n      tracker.shift(4);\n      value += tracker.move(\n        (firstLineBlank ? \"\\n\" : \" \") + state.indentLines(\n          state.containerFlow(node2, tracker.current()),\n          firstLineBlank ? mapAll : mapExceptFirst\n        )\n      );\n    }\n    exit2();\n    return value;\n  }\n}\nfunction mapExceptFirst(line, index, blank) {\n  return index === 0 ? line : mapAll(line, index, blank);\n}\nfunction mapAll(line, index, blank) {\n  return (blank ? \"\" : \"    \") + line;\n}\nconst constructsWithoutStrikethrough = [\n  \"autolink\",\n  \"destinationLiteral\",\n  \"destinationRaw\",\n  \"reference\",\n  \"titleQuote\",\n  \"titleApostrophe\"\n];\nhandleDelete.peek = peekDelete;\nfunction gfmStrikethroughFromMarkdown() {\n  return {\n    canContainEols: [\"delete\"],\n    enter: { strikethrough: enterStrikethrough },\n    exit: { strikethrough: exitStrikethrough }\n  };\n}\nfunction gfmStrikethroughToMarkdown() {\n  return {\n    unsafe: [\n      {\n        character: \"~\",\n        inConstruct: \"phrasing\",\n        notInConstruct: constructsWithoutStrikethrough\n      }\n    ],\n    handlers: { delete: handleDelete }\n  };\n}\nfunction enterStrikethrough(token) {\n  this.enter({ type: \"delete\", children: [] }, token);\n}\nfunction exitStrikethrough(token) {\n  this.exit(token);\n}\nfunction handleDelete(node2, _, state, info) {\n  const tracker = state.createTracker(info);\n  const exit2 = state.enter(\"strikethrough\");\n  let value = tracker.move(\"~~\");\n  value += state.containerPhrasing(node2, {\n    ...tracker.current(),\n    before: value,\n    after: \"~\"\n  });\n  value += tracker.move(\"~~\");\n  exit2();\n  return value;\n}\nfunction peekDelete() {\n  return \"~\";\n}\nfunction defaultStringLength(value) {\n  return value.length;\n}\nfunction markdownTable(table, options) {\n  const settings = options || {};\n  const align = (settings.align || []).concat();\n  const stringLength = settings.stringLength || defaultStringLength;\n  const alignments = [];\n  const cellMatrix = [];\n  const sizeMatrix = [];\n  const longestCellByColumn = [];\n  let mostCellsPerRow = 0;\n  let rowIndex = -1;\n  while (++rowIndex < table.length) {\n    const row2 = [];\n    const sizes2 = [];\n    let columnIndex2 = -1;\n    if (table[rowIndex].length > mostCellsPerRow) {\n      mostCellsPerRow = table[rowIndex].length;\n    }\n    while (++columnIndex2 < table[rowIndex].length) {\n      const cell = serialize(table[rowIndex][columnIndex2]);\n      if (settings.alignDelimiters !== false) {\n        const size = stringLength(cell);\n        sizes2[columnIndex2] = size;\n        if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {\n          longestCellByColumn[columnIndex2] = size;\n        }\n      }\n      row2.push(cell);\n    }\n    cellMatrix[rowIndex] = row2;\n    sizeMatrix[rowIndex] = sizes2;\n  }\n  let columnIndex = -1;\n  if (typeof align === \"object\" && \"length\" in align) {\n    while (++columnIndex < mostCellsPerRow) {\n      alignments[columnIndex] = toAlignment(align[columnIndex]);\n    }\n  } else {\n    const code2 = toAlignment(align);\n    while (++columnIndex < mostCellsPerRow) {\n      alignments[columnIndex] = code2;\n    }\n  }\n  columnIndex = -1;\n  const row = [];\n  const sizes = [];\n  while (++columnIndex < mostCellsPerRow) {\n    const code2 = alignments[columnIndex];\n    let before = \"\";\n    let after = \"\";\n    if (code2 === 99) {\n      before = \":\";\n      after = \":\";\n    } else if (code2 === 108) {\n      before = \":\";\n    } else if (code2 === 114) {\n      after = \":\";\n    }\n    let size = settings.alignDelimiters === false ? 1 : Math.max(\n      1,\n      longestCellByColumn[columnIndex] - before.length - after.length\n    );\n    const cell = before + \"-\".repeat(size) + after;\n    if (settings.alignDelimiters !== false) {\n      size = before.length + size + after.length;\n      if (size > longestCellByColumn[columnIndex]) {\n        longestCellByColumn[columnIndex] = size;\n      }\n      sizes[columnIndex] = size;\n    }\n    row[columnIndex] = cell;\n  }\n  cellMatrix.splice(1, 0, row);\n  sizeMatrix.splice(1, 0, sizes);\n  rowIndex = -1;\n  const lines = [];\n  while (++rowIndex < cellMatrix.length) {\n    const row2 = cellMatrix[rowIndex];\n    const sizes2 = sizeMatrix[rowIndex];\n    columnIndex = -1;\n    const line = [];\n    while (++columnIndex < mostCellsPerRow) {\n      const cell = row2[columnIndex] || \"\";\n      let before = \"\";\n      let after = \"\";\n      if (settings.alignDelimiters !== false) {\n        const size = longestCellByColumn[columnIndex] - (sizes2[columnIndex] || 0);\n        const code2 = alignments[columnIndex];\n        if (code2 === 114) {\n          before = \" \".repeat(size);\n        } else if (code2 === 99) {\n          if (size % 2) {\n            before = \" \".repeat(size / 2 + 0.5);\n            after = \" \".repeat(size / 2 - 0.5);\n          } else {\n            before = \" \".repeat(size / 2);\n            after = before;\n          }\n        } else {\n          after = \" \".repeat(size);\n        }\n      }\n      if (settings.delimiterStart !== false && !columnIndex) {\n        line.push(\"|\");\n      }\n      if (settings.padding !== false && // Don’t add the opening space if we’re not aligning and the cell is\n      // empty: there will be a closing space.\n      !(settings.alignDelimiters === false && cell === \"\") && (settings.delimiterStart !== false || columnIndex)) {\n        line.push(\" \");\n      }\n      if (settings.alignDelimiters !== false) {\n        line.push(before);\n      }\n      line.push(cell);\n      if (settings.alignDelimiters !== false) {\n        line.push(after);\n      }\n      if (settings.padding !== false) {\n        line.push(\" \");\n      }\n      if (settings.delimiterEnd !== false || columnIndex !== mostCellsPerRow - 1) {\n        line.push(\"|\");\n      }\n    }\n    lines.push(\n      settings.delimiterEnd === false ? line.join(\"\").replace(/ +$/, \"\") : line.join(\"\")\n    );\n  }\n  return lines.join(\"\\n\");\n}\nfunction serialize(value) {\n  return value === null || value === void 0 ? \"\" : String(value);\n}\nfunction toAlignment(value) {\n  const code2 = typeof value === \"string\" ? value.codePointAt(0) : 0;\n  return code2 === 67 || code2 === 99 ? 99 : code2 === 76 || code2 === 108 ? 108 : code2 === 82 || code2 === 114 ? 114 : 0;\n}\nfunction blockquote(node2, _, state, info) {\n  const exit2 = state.enter(\"blockquote\");\n  const tracker = state.createTracker(info);\n  tracker.move(\"> \");\n  tracker.shift(2);\n  const value = state.indentLines(\n    state.containerFlow(node2, tracker.current()),\n    map$1\n  );\n  exit2();\n  return value;\n}\nfunction map$1(line, _, blank) {\n  return \">\" + (blank ? \"\" : \" \") + line;\n}\nfunction patternInScope(stack, pattern) {\n  return listInScope(stack, pattern.inConstruct, true) && !listInScope(stack, pattern.notInConstruct, false);\n}\nfunction listInScope(stack, list2, none) {\n  if (typeof list2 === \"string\") {\n    list2 = [list2];\n  }\n  if (!list2 || list2.length === 0) {\n    return none;\n  }\n  let index = -1;\n  while (++index < list2.length) {\n    if (stack.includes(list2[index])) {\n      return true;\n    }\n  }\n  return false;\n}\nfunction hardBreak(_, _1, state, info) {\n  let index = -1;\n  while (++index < state.unsafe.length) {\n    if (state.unsafe[index].character === \"\\n\" && patternInScope(state.stack, state.unsafe[index])) {\n      return /[ \\t]/.test(info.before) ? \"\" : \" \";\n    }\n  }\n  return \"\\\\\\n\";\n}\nfunction longestStreak(value, substring) {\n  const source = String(value);\n  let index = source.indexOf(substring);\n  let expected = index;\n  let count = 0;\n  let max = 0;\n  if (typeof substring !== \"string\") {\n    throw new TypeError(\"Expected substring\");\n  }\n  while (index !== -1) {\n    if (index === expected) {\n      if (++count > max) {\n        max = count;\n      }\n    } else {\n      count = 1;\n    }\n    expected = index + substring.length;\n    index = source.indexOf(substring, expected);\n  }\n  return max;\n}\nfunction formatCodeAsIndented(node2, state) {\n  return Boolean(\n    state.options.fences === false && node2.value && // If there’s no info…\n    !node2.lang && // And there’s a non-whitespace character…\n    /[^ \\r\\n]/.test(node2.value) && // And the value doesn’t start or end in a blank…\n    !/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(node2.value)\n  );\n}\nfunction checkFence(state) {\n  const marker = state.options.fence || \"`\";\n  if (marker !== \"`\" && marker !== \"~\") {\n    throw new Error(\n      \"Cannot serialize code with `\" + marker + \"` for `options.fence`, expected `` ` `` or `~`\"\n    );\n  }\n  return marker;\n}\nfunction code$1(node2, _, state, info) {\n  const marker = checkFence(state);\n  const raw = node2.value || \"\";\n  const suffix = marker === \"`\" ? \"GraveAccent\" : \"Tilde\";\n  if (formatCodeAsIndented(node2, state)) {\n    const exit3 = state.enter(\"codeIndented\");\n    const value2 = state.indentLines(raw, map);\n    exit3();\n    return value2;\n  }\n  const tracker = state.createTracker(info);\n  const sequence = marker.repeat(Math.max(longestStreak(raw, marker) + 1, 3));\n  const exit2 = state.enter(\"codeFenced\");\n  let value = tracker.move(sequence);\n  if (node2.lang) {\n    const subexit = state.enter(`codeFencedLang${suffix}`);\n    value += tracker.move(\n      state.safe(node2.lang, {\n        before: value,\n        after: \" \",\n        encode: [\"`\"],\n        ...tracker.current()\n      })\n    );\n    subexit();\n  }\n  if (node2.lang && node2.meta) {\n    const subexit = state.enter(`codeFencedMeta${suffix}`);\n    value += tracker.move(\" \");\n    value += tracker.move(\n      state.safe(node2.meta, {\n        before: value,\n        after: \"\\n\",\n        encode: [\"`\"],\n        ...tracker.current()\n      })\n    );\n    subexit();\n  }\n  value += tracker.move(\"\\n\");\n  if (raw) {\n    value += tracker.move(raw + \"\\n\");\n  }\n  value += tracker.move(sequence);\n  exit2();\n  return value;\n}\nfunction map(line, _, blank) {\n  return (blank ? \"\" : \"    \") + line;\n}\nfunction checkQuote(state) {\n  const marker = state.options.quote || '\"';\n  if (marker !== '\"' && marker !== \"'\") {\n    throw new Error(\n      \"Cannot serialize title with `\" + marker + \"` for `options.quote`, expected `\\\"`, or `'`\"\n    );\n  }\n  return marker;\n}\nfunction definition(node2, _, state, info) {\n  const quote = checkQuote(state);\n  const suffix = quote === '\"' ? \"Quote\" : \"Apostrophe\";\n  const exit2 = state.enter(\"definition\");\n  let subexit = state.enter(\"label\");\n  const tracker = state.createTracker(info);\n  let value = tracker.move(\"[\");\n  value += tracker.move(\n    state.safe(state.associationId(node2), {\n      before: value,\n      after: \"]\",\n      ...tracker.current()\n    })\n  );\n  value += tracker.move(\"]: \");\n  subexit();\n  if (\n    // If there’s no url, or…\n    !node2.url || // If there are control characters or whitespace.\n    /[\\0- \\u007F]/.test(node2.url)\n  ) {\n    subexit = state.enter(\"destinationLiteral\");\n    value += tracker.move(\"<\");\n    value += tracker.move(\n      state.safe(node2.url, { before: value, after: \">\", ...tracker.current() })\n    );\n    value += tracker.move(\">\");\n  } else {\n    subexit = state.enter(\"destinationRaw\");\n    value += tracker.move(\n      state.safe(node2.url, {\n        before: value,\n        after: node2.title ? \" \" : \"\\n\",\n        ...tracker.current()\n      })\n    );\n  }\n  subexit();\n  if (node2.title) {\n    subexit = state.enter(`title${suffix}`);\n    value += tracker.move(\" \" + quote);\n    value += tracker.move(\n      state.safe(node2.title, {\n        before: value,\n        after: quote,\n        ...tracker.current()\n      })\n    );\n    value += tracker.move(quote);\n    subexit();\n  }\n  exit2();\n  return value;\n}\nfunction checkEmphasis(state) {\n  const marker = state.options.emphasis || \"*\";\n  if (marker !== \"*\" && marker !== \"_\") {\n    throw new Error(\n      \"Cannot serialize emphasis with `\" + marker + \"` for `options.emphasis`, expected `*`, or `_`\"\n    );\n  }\n  return marker;\n}\nfunction encodeCharacterReference(code2) {\n  return \"&#x\" + code2.toString(16).toUpperCase() + \";\";\n}\nfunction classifyCharacter(code2) {\n  if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {\n    return 1;\n  }\n  if (unicodePunctuation(code2)) {\n    return 2;\n  }\n}\nfunction encodeInfo(outside, inside, marker) {\n  const outsideKind = classifyCharacter(outside);\n  const insideKind = classifyCharacter(inside);\n  if (outsideKind === void 0) {\n    return insideKind === void 0 ? (\n      // Letter inside:\n      // we have to encode *both* letters for `_` as it is looser.\n      // it already forms for `*` (and GFMs `~`).\n      marker === \"_\" ? { inside: true, outside: true } : { inside: false, outside: false }\n    ) : insideKind === 1 ? (\n      // Whitespace inside: encode both (letter, whitespace).\n      { inside: true, outside: true }\n    ) : (\n      // Punctuation inside: encode outer (letter)\n      { inside: false, outside: true }\n    );\n  }\n  if (outsideKind === 1) {\n    return insideKind === void 0 ? (\n      // Letter inside: already forms.\n      { inside: false, outside: false }\n    ) : insideKind === 1 ? (\n      // Whitespace inside: encode both (whitespace).\n      { inside: true, outside: true }\n    ) : (\n      // Punctuation inside: already forms.\n      { inside: false, outside: false }\n    );\n  }\n  return insideKind === void 0 ? (\n    // Letter inside: already forms.\n    { inside: false, outside: false }\n  ) : insideKind === 1 ? (\n    // Whitespace inside: encode inner (whitespace).\n    { inside: true, outside: false }\n  ) : (\n    // Punctuation inside: already forms.\n    { inside: false, outside: false }\n  );\n}\nemphasis.peek = emphasisPeek;\nfunction emphasis(node2, _, state, info) {\n  const marker = checkEmphasis(state);\n  const exit2 = state.enter(\"emphasis\");\n  const tracker = state.createTracker(info);\n  const before = tracker.move(marker);\n  let between = tracker.move(\n    state.containerPhrasing(node2, {\n      after: marker,\n      before,\n      ...tracker.current()\n    })\n  );\n  const betweenHead = between.charCodeAt(0);\n  const open = encodeInfo(\n    info.before.charCodeAt(info.before.length - 1),\n    betweenHead,\n    marker\n  );\n  if (open.inside) {\n    between = encodeCharacterReference(betweenHead) + between.slice(1);\n  }\n  const betweenTail = between.charCodeAt(between.length - 1);\n  const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);\n  if (close.inside) {\n    between = between.slice(0, -1) + encodeCharacterReference(betweenTail);\n  }\n  const after = tracker.move(marker);\n  exit2();\n  state.attentionEncodeSurroundingInfo = {\n    after: close.outside,\n    before: open.outside\n  };\n  return before + between + after;\n}\nfunction emphasisPeek(_, _1, state) {\n  return state.options.emphasis || \"*\";\n}\nconst emptyOptions$1 = {};\nfunction toString(value, options) {\n  const settings = emptyOptions$1;\n  const includeImageAlt = typeof settings.includeImageAlt === \"boolean\" ? settings.includeImageAlt : true;\n  const includeHtml = typeof settings.includeHtml === \"boolean\" ? settings.includeHtml : true;\n  return one(value, includeImageAlt, includeHtml);\n}\nfunction one(value, includeImageAlt, includeHtml) {\n  if (node(value)) {\n    if (\"value\" in value) {\n      return value.type === \"html\" && !includeHtml ? \"\" : value.value;\n    }\n    if (includeImageAlt && \"alt\" in value && value.alt) {\n      return value.alt;\n    }\n    if (\"children\" in value) {\n      return all(value.children, includeImageAlt, includeHtml);\n    }\n  }\n  if (Array.isArray(value)) {\n    return all(value, includeImageAlt, includeHtml);\n  }\n  return \"\";\n}\nfunction all(values, includeImageAlt, includeHtml) {\n  const result = [];\n  let index = -1;\n  while (++index < values.length) {\n    result[index] = one(values[index], includeImageAlt, includeHtml);\n  }\n  return result.join(\"\");\n}\nfunction node(value) {\n  return Boolean(value && typeof value === \"object\");\n}\nfunction formatHeadingAsSetext(node2, state) {\n  let literalWithBreak = false;\n  visit(node2, function(node3) {\n    if (\"value\" in node3 && /\\r?\\n|\\r/.test(node3.value) || node3.type === \"break\") {\n      literalWithBreak = true;\n      return EXIT$1;\n    }\n  });\n  return Boolean(\n    (!node2.depth || node2.depth < 3) && toString(node2) && (state.options.setext || literalWithBreak)\n  );\n}\nfunction heading(node2, _, state, info) {\n  const rank = Math.max(Math.min(6, node2.depth || 1), 1);\n  const tracker = state.createTracker(info);\n  if (formatHeadingAsSetext(node2, state)) {\n    const exit3 = state.enter(\"headingSetext\");\n    const subexit2 = state.enter(\"phrasing\");\n    const value2 = state.containerPhrasing(node2, {\n      ...tracker.current(),\n      before: \"\\n\",\n      after: \"\\n\"\n    });\n    subexit2();\n    exit3();\n    return value2 + \"\\n\" + (rank === 1 ? \"=\" : \"-\").repeat(\n      // The whole size…\n      value2.length - // Minus the position of the character after the last EOL (or\n      // 0 if there is none)…\n      (Math.max(value2.lastIndexOf(\"\\r\"), value2.lastIndexOf(\"\\n\")) + 1)\n    );\n  }\n  const sequence = \"#\".repeat(rank);\n  const exit2 = state.enter(\"headingAtx\");\n  const subexit = state.enter(\"phrasing\");\n  tracker.move(sequence + \" \");\n  let value = state.containerPhrasing(node2, {\n    before: \"# \",\n    after: \"\\n\",\n    ...tracker.current()\n  });\n  if (/^[\\t ]/.test(value)) {\n    value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1);\n  }\n  value = value ? sequence + \" \" + value : sequence;\n  if (state.options.closeAtx) {\n    value += \" \" + sequence;\n  }\n  subexit();\n  exit2();\n  return value;\n}\nhtml.peek = htmlPeek;\nfunction html(node2) {\n  return node2.value || \"\";\n}\nfunction htmlPeek() {\n  return \"<\";\n}\nimage.peek = imagePeek;\nfunction image(node2, _, state, info) {\n  const quote = checkQuote(state);\n  const suffix = quote === '\"' ? \"Quote\" : \"Apostrophe\";\n  const exit2 = state.enter(\"image\");\n  let subexit = state.enter(\"label\");\n  const tracker = state.createTracker(info);\n  let value = tracker.move(\"![\");\n  value += tracker.move(\n    state.safe(node2.alt, { before: value, after: \"]\", ...tracker.current() })\n  );\n  value += tracker.move(\"](\");\n  subexit();\n  if (\n    // If there’s no url but there is a title…\n    !node2.url && node2.title || // If there are control characters or whitespace.\n    /[\\0- \\u007F]/.test(node2.url)\n  ) {\n    subexit = state.enter(\"destinationLiteral\");\n    value += tracker.move(\"<\");\n    value += tracker.move(\n      state.safe(node2.url, { before: value, after: \">\", ...tracker.current() })\n    );\n    value += tracker.move(\">\");\n  } else {\n    subexit = state.enter(\"destinationRaw\");\n    value += tracker.move(\n      state.safe(node2.url, {\n        before: value,\n        after: node2.title ? \" \" : \")\",\n        ...tracker.current()\n      })\n    );\n  }\n  subexit();\n  if (node2.title) {\n    subexit = state.enter(`title${suffix}`);\n    value += tracker.move(\" \" + quote);\n    value += tracker.move(\n      state.safe(node2.title, {\n        before: value,\n        after: quote,\n        ...tracker.current()\n      })\n    );\n    value += tracker.move(quote);\n    subexit();\n  }\n  value += tracker.move(\")\");\n  exit2();\n  return value;\n}\nfunction imagePeek() {\n  return \"!\";\n}\nimageReference.peek = imageReferencePeek;\nfunction imageReference(node2, _, state, info) {\n  const type = node2.referenceType;\n  const exit2 = state.enter(\"imageReference\");\n  let subexit = state.enter(\"label\");\n  const tracker = state.createTracker(info);\n  let value = tracker.move(\"![\");\n  const alt = state.safe(node2.alt, {\n    before: value,\n    after: \"]\",\n    ...tracker.current()\n  });\n  value += tracker.move(alt + \"][\");\n  subexit();\n  const stack = state.stack;\n  state.stack = [];\n  subexit = state.enter(\"reference\");\n  const reference = state.safe(state.associationId(node2), {\n    before: value,\n    after: \"]\",\n    ...tracker.current()\n  });\n  subexit();\n  state.stack = stack;\n  exit2();\n  if (type === \"full\" || !alt || alt !== reference) {\n    value += tracker.move(reference + \"]\");\n  } else if (type === \"shortcut\") {\n    value = value.slice(0, -1);\n  } else {\n    value += tracker.move(\"]\");\n  }\n  return value;\n}\nfunction imageReferencePeek() {\n  return \"!\";\n}\ninlineCode.peek = inlineCodePeek;\nfunction inlineCode(node2, _, state) {\n  let value = node2.value || \"\";\n  let sequence = \"`\";\n  let index = -1;\n  while (new RegExp(\"(^|[^`])\" + sequence + \"([^`]|$)\").test(value)) {\n    sequence += \"`\";\n  }\n  if (/[^ \\r\\n]/.test(value) && (/^[ \\r\\n]/.test(value) && /[ \\r\\n]$/.test(value) || /^`|`$/.test(value))) {\n    value = \" \" + value + \" \";\n  }\n  while (++index < state.unsafe.length) {\n    const pattern = state.unsafe[index];\n    const expression = state.compilePattern(pattern);\n    let match;\n    if (!pattern.atBreak) continue;\n    while (match = expression.exec(value)) {\n      let position = match.index;\n      if (value.charCodeAt(position) === 10 && value.charCodeAt(position - 1) === 13) {\n        position--;\n      }\n      value = value.slice(0, position) + \" \" + value.slice(match.index + 1);\n    }\n  }\n  return sequence + value + sequence;\n}\nfunction inlineCodePeek() {\n  return \"`\";\n}\nfunction formatLinkAsAutolink(node2, state) {\n  const raw = toString(node2);\n  return Boolean(\n    !state.options.resourceLink && // If there’s a url…\n    node2.url && // And there’s a no title…\n    !node2.title && // And the content of `node` is a single text node…\n    node2.children && node2.children.length === 1 && node2.children[0].type === \"text\" && // And if the url is the same as the content…\n    (raw === node2.url || \"mailto:\" + raw === node2.url) && // And that starts w/ a protocol…\n    /^[a-z][a-z+.-]+:/i.test(node2.url) && // And that doesn’t contain ASCII control codes (character escapes and\n    // references don’t work), space, or angle brackets…\n    !/[\\0- <>\\u007F]/.test(node2.url)\n  );\n}\nlink.peek = linkPeek;\nfunction link(node2, _, state, info) {\n  const quote = checkQuote(state);\n  const suffix = quote === '\"' ? \"Quote\" : \"Apostrophe\";\n  const tracker = state.createTracker(info);\n  let exit2;\n  let subexit;\n  if (formatLinkAsAutolink(node2, state)) {\n    const stack = state.stack;\n    state.stack = [];\n    exit2 = state.enter(\"autolink\");\n    let value2 = tracker.move(\"<\");\n    value2 += tracker.move(\n      state.containerPhrasing(node2, {\n        before: value2,\n        after: \">\",\n        ...tracker.current()\n      })\n    );\n    value2 += tracker.move(\">\");\n    exit2();\n    state.stack = stack;\n    return value2;\n  }\n  exit2 = state.enter(\"link\");\n  subexit = state.enter(\"label\");\n  let value = tracker.move(\"[\");\n  value += tracker.move(\n    state.containerPhrasing(node2, {\n      before: value,\n      after: \"](\",\n      ...tracker.current()\n    })\n  );\n  value += tracker.move(\"](\");\n  subexit();\n  if (\n    // If there’s no url but there is a title…\n    !node2.url && node2.title || // If there are control characters or whitespace.\n    /[\\0- \\u007F]/.test(node2.url)\n  ) {\n    subexit = state.enter(\"destinationLiteral\");\n    value += tracker.move(\"<\");\n    value += tracker.move(\n      state.safe(node2.url, { before: value, after: \">\", ...tracker.current() })\n    );\n    value += tracker.move(\">\");\n  } else {\n    subexit = state.enter(\"destinationRaw\");\n    value += tracker.move(\n      state.safe(node2.url, {\n        before: value,\n        after: node2.title ? \" \" : \")\",\n        ...tracker.current()\n      })\n    );\n  }\n  subexit();\n  if (node2.title) {\n    subexit = state.enter(`title${suffix}`);\n    value += tracker.move(\" \" + quote);\n    value += tracker.move(\n      state.safe(node2.title, {\n        before: value,\n        after: quote,\n        ...tracker.current()\n      })\n    );\n    value += tracker.move(quote);\n    subexit();\n  }\n  value += tracker.move(\")\");\n  exit2();\n  return value;\n}\nfunction linkPeek(node2, _, state) {\n  return formatLinkAsAutolink(node2, state) ? \"<\" : \"[\";\n}\nlinkReference.peek = linkReferencePeek;\nfunction linkReference(node2, _, state, info) {\n  const type = node2.referenceType;\n  const exit2 = state.enter(\"linkReference\");\n  let subexit = state.enter(\"label\");\n  const tracker = state.createTracker(info);\n  let value = tracker.move(\"[\");\n  const text2 = state.containerPhrasing(node2, {\n    before: value,\n    after: \"]\",\n    ...tracker.current()\n  });\n  value += tracker.move(text2 + \"][\");\n  subexit();\n  const stack = state.stack;\n  state.stack = [];\n  subexit = state.enter(\"reference\");\n  const reference = state.safe(state.associationId(node2), {\n    before: value,\n    after: \"]\",\n    ...tracker.current()\n  });\n  subexit();\n  state.stack = stack;\n  exit2();\n  if (type === \"full\" || !text2 || text2 !== reference) {\n    value += tracker.move(reference + \"]\");\n  } else if (type === \"shortcut\") {\n    value = value.slice(0, -1);\n  } else {\n    value += tracker.move(\"]\");\n  }\n  return value;\n}\nfunction linkReferencePeek() {\n  return \"[\";\n}\nfunction checkBullet(state) {\n  const marker = state.options.bullet || \"*\";\n  if (marker !== \"*\" && marker !== \"+\" && marker !== \"-\") {\n    throw new Error(\n      \"Cannot serialize items with `\" + marker + \"` for `options.bullet`, expected `*`, `+`, or `-`\"\n    );\n  }\n  return marker;\n}\nfunction checkBulletOther(state) {\n  const bullet = checkBullet(state);\n  const bulletOther = state.options.bulletOther;\n  if (!bulletOther) {\n    return bullet === \"*\" ? \"-\" : \"*\";\n  }\n  if (bulletOther !== \"*\" && bulletOther !== \"+\" && bulletOther !== \"-\") {\n    throw new Error(\n      \"Cannot serialize items with `\" + bulletOther + \"` for `options.bulletOther`, expected `*`, `+`, or `-`\"\n    );\n  }\n  if (bulletOther === bullet) {\n    throw new Error(\n      \"Expected `bullet` (`\" + bullet + \"`) and `bulletOther` (`\" + bulletOther + \"`) to be different\"\n    );\n  }\n  return bulletOther;\n}\nfunction checkBulletOrdered(state) {\n  const marker = state.options.bulletOrdered || \".\";\n  if (marker !== \".\" && marker !== \")\") {\n    throw new Error(\n      \"Cannot serialize items with `\" + marker + \"` for `options.bulletOrdered`, expected `.` or `)`\"\n    );\n  }\n  return marker;\n}\nfunction checkRule(state) {\n  const marker = state.options.rule || \"*\";\n  if (marker !== \"*\" && marker !== \"-\" && marker !== \"_\") {\n    throw new Error(\n      \"Cannot serialize rules with `\" + marker + \"` for `options.rule`, expected `*`, `-`, or `_`\"\n    );\n  }\n  return marker;\n}\nfunction list(node2, parent, state, info) {\n  const exit2 = state.enter(\"list\");\n  const bulletCurrent = state.bulletCurrent;\n  let bullet = node2.ordered ? checkBulletOrdered(state) : checkBullet(state);\n  const bulletOther = node2.ordered ? bullet === \".\" ? \")\" : \".\" : checkBulletOther(state);\n  let useDifferentMarker = parent && state.bulletLastUsed ? bullet === state.bulletLastUsed : false;\n  if (!node2.ordered) {\n    const firstListItem = node2.children ? node2.children[0] : void 0;\n    if (\n      // Bullet could be used as a thematic break marker:\n      (bullet === \"*\" || bullet === \"-\") && // Empty first list item:\n      firstListItem && (!firstListItem.children || !firstListItem.children[0]) && // Directly in two other list items:\n      state.stack[state.stack.length - 1] === \"list\" && state.stack[state.stack.length - 2] === \"listItem\" && state.stack[state.stack.length - 3] === \"list\" && state.stack[state.stack.length - 4] === \"listItem\" && // That are each the first child.\n      state.indexStack[state.indexStack.length - 1] === 0 && state.indexStack[state.indexStack.length - 2] === 0 && state.indexStack[state.indexStack.length - 3] === 0\n    ) {\n      useDifferentMarker = true;\n    }\n    if (checkRule(state) === bullet && firstListItem) {\n      let index = -1;\n      while (++index < node2.children.length) {\n        const item = node2.children[index];\n        if (item && item.type === \"listItem\" && item.children && item.children[0] && item.children[0].type === \"thematicBreak\") {\n          useDifferentMarker = true;\n          break;\n        }\n      }\n    }\n  }\n  if (useDifferentMarker) {\n    bullet = bulletOther;\n  }\n  state.bulletCurrent = bullet;\n  const value = state.containerFlow(node2, info);\n  state.bulletLastUsed = bullet;\n  state.bulletCurrent = bulletCurrent;\n  exit2();\n  return value;\n}\nfunction checkListItemIndent(state) {\n  const style = state.options.listItemIndent || \"one\";\n  if (style !== \"tab\" && style !== \"one\" && style !== \"mixed\") {\n    throw new Error(\n      \"Cannot serialize items with `\" + style + \"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`\"\n    );\n  }\n  return style;\n}\nfunction listItem(node2, parent, state, info) {\n  const listItemIndent = checkListItemIndent(state);\n  let bullet = state.bulletCurrent || checkBullet(state);\n  if (parent && parent.type === \"list\" && parent.ordered) {\n    bullet = (typeof parent.start === \"number\" && parent.start > -1 ? parent.start : 1) + (state.options.incrementListMarker === false ? 0 : parent.children.indexOf(node2)) + bullet;\n  }\n  let size = bullet.length + 1;\n  if (listItemIndent === \"tab\" || listItemIndent === \"mixed\" && (parent && parent.type === \"list\" && parent.spread || node2.spread)) {\n    size = Math.ceil(size / 4) * 4;\n  }\n  const tracker = state.createTracker(info);\n  tracker.move(bullet + \" \".repeat(size - bullet.length));\n  tracker.shift(size);\n  const exit2 = state.enter(\"listItem\");\n  const value = state.indentLines(\n    state.containerFlow(node2, tracker.current()),\n    map2\n  );\n  exit2();\n  return value;\n  function map2(line, index, blank) {\n    if (index) {\n      return (blank ? \"\" : \" \".repeat(size)) + line;\n    }\n    return (blank ? bullet : bullet + \" \".repeat(size - bullet.length)) + line;\n  }\n}\nfunction paragraph(node2, _, state, info) {\n  const exit2 = state.enter(\"paragraph\");\n  const subexit = state.enter(\"phrasing\");\n  const value = state.containerPhrasing(node2, info);\n  subexit();\n  exit2();\n  return value;\n}\nconst phrasing = (\n  /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */\n  convert([\n    \"break\",\n    \"delete\",\n    \"emphasis\",\n    // To do: next major: removed since footnotes were added to GFM.\n    \"footnote\",\n    \"footnoteReference\",\n    \"image\",\n    \"imageReference\",\n    \"inlineCode\",\n    // Enabled by `mdast-util-math`:\n    \"inlineMath\",\n    \"link\",\n    \"linkReference\",\n    // Enabled by `mdast-util-mdx`:\n    \"mdxJsxTextElement\",\n    // Enabled by `mdast-util-mdx`:\n    \"mdxTextExpression\",\n    \"strong\",\n    \"text\",\n    // Enabled by `mdast-util-directive`:\n    \"textDirective\"\n  ])\n);\nfunction root(node2, _, state, info) {\n  const hasPhrasing = node2.children.some(function(d) {\n    return phrasing(d);\n  });\n  const container = hasPhrasing ? state.containerPhrasing : state.containerFlow;\n  return container.call(state, node2, info);\n}\nfunction checkStrong(state) {\n  const marker = state.options.strong || \"*\";\n  if (marker !== \"*\" && marker !== \"_\") {\n    throw new Error(\n      \"Cannot serialize strong with `\" + marker + \"` for `options.strong`, expected `*`, or `_`\"\n    );\n  }\n  return marker;\n}\nstrong.peek = strongPeek;\nfunction strong(node2, _, state, info) {\n  const marker = checkStrong(state);\n  const exit2 = state.enter(\"strong\");\n  const tracker = state.createTracker(info);\n  const before = tracker.move(marker + marker);\n  let between = tracker.move(\n    state.containerPhrasing(node2, {\n      after: marker,\n      before,\n      ...tracker.current()\n    })\n  );\n  const betweenHead = between.charCodeAt(0);\n  const open = encodeInfo(\n    info.before.charCodeAt(info.before.length - 1),\n    betweenHead,\n    marker\n  );\n  if (open.inside) {\n    between = encodeCharacterReference(betweenHead) + between.slice(1);\n  }\n  const betweenTail = between.charCodeAt(between.length - 1);\n  const close = encodeInfo(info.after.charCodeAt(0), betweenTail, marker);\n  if (close.inside) {\n    between = between.slice(0, -1) + encodeCharacterReference(betweenTail);\n  }\n  const after = tracker.move(marker + marker);\n  exit2();\n  state.attentionEncodeSurroundingInfo = {\n    after: close.outside,\n    before: open.outside\n  };\n  return before + between + after;\n}\nfunction strongPeek(_, _1, state) {\n  return state.options.strong || \"*\";\n}\nfunction text$1(node2, _, state, info) {\n  return state.safe(node2.value, info);\n}\nfunction checkRuleRepetition(state) {\n  const repetition = state.options.ruleRepetition || 3;\n  if (repetition < 3) {\n    throw new Error(\n      \"Cannot serialize rules with repetition `\" + repetition + \"` for `options.ruleRepetition`, expected `3` or more\"\n    );\n  }\n  return repetition;\n}\nfunction thematicBreak(_, _1, state) {\n  const value = (checkRule(state) + (state.options.ruleSpaces ? \" \" : \"\")).repeat(checkRuleRepetition(state));\n  return state.options.ruleSpaces ? value.slice(0, -1) : value;\n}\nconst handle = {\n  blockquote,\n  break: hardBreak,\n  code: code$1,\n  definition,\n  emphasis,\n  hardBreak,\n  heading,\n  html,\n  image,\n  imageReference,\n  inlineCode,\n  link,\n  linkReference,\n  list,\n  listItem,\n  paragraph,\n  root,\n  strong,\n  text: text$1,\n  thematicBreak\n};\nfunction gfmTableFromMarkdown() {\n  return {\n    enter: {\n      table: enterTable,\n      tableData: enterCell,\n      tableHeader: enterCell,\n      tableRow: enterRow\n    },\n    exit: {\n      codeText: exitCodeText,\n      table: exitTable,\n      tableData: exit,\n      tableHeader: exit,\n      tableRow: exit\n    }\n  };\n}\nfunction enterTable(token) {\n  const align = token._align;\n  this.enter(\n    {\n      type: \"table\",\n      align: align.map(function(d) {\n        return d === \"none\" ? null : d;\n      }),\n      children: []\n    },\n    token\n  );\n  this.data.inTable = true;\n}\nfunction exitTable(token) {\n  this.exit(token);\n  this.data.inTable = void 0;\n}\nfunction enterRow(token) {\n  this.enter({ type: \"tableRow\", children: [] }, token);\n}\nfunction exit(token) {\n  this.exit(token);\n}\nfunction enterCell(token) {\n  this.enter({ type: \"tableCell\", children: [] }, token);\n}\nfunction exitCodeText(token) {\n  let value = this.resume();\n  if (this.data.inTable) {\n    value = value.replace(/\\\\([\\\\|])/g, replace);\n  }\n  const node2 = this.stack[this.stack.length - 1];\n  ok$1(node2.type === \"inlineCode\");\n  node2.value = value;\n  this.exit(token);\n}\nfunction replace($0, $1) {\n  return $1 === \"|\" ? $1 : $0;\n}\nfunction gfmTableToMarkdown(options) {\n  const settings = options || {};\n  const padding = settings.tableCellPadding;\n  const alignDelimiters = settings.tablePipeAlign;\n  const stringLength = settings.stringLength;\n  const around = padding ? \" \" : \"|\";\n  return {\n    unsafe: [\n      { character: \"\\r\", inConstruct: \"tableCell\" },\n      { character: \"\\n\", inConstruct: \"tableCell\" },\n      // A pipe, when followed by a tab or space (padding), or a dash or colon\n      // (unpadded delimiter row), could result in a table.\n      { atBreak: true, character: \"|\", after: \"[\t :-]\" },\n      // A pipe in a cell must be encoded.\n      { character: \"|\", inConstruct: \"tableCell\" },\n      // A colon must be followed by a dash, in which case it could start a\n      // delimiter row.\n      { atBreak: true, character: \":\", after: \"-\" },\n      // A delimiter row can also start with a dash, when followed by more\n      // dashes, a colon, or a pipe.\n      // This is a stricter version than the built in check for lists, thematic\n      // breaks, and setex heading underlines though:\n      // <https://github.com/syntax-tree/mdast-util-to-markdown/blob/51a2038/lib/unsafe.js#L57>\n      { atBreak: true, character: \"-\", after: \"[:|-]\" }\n    ],\n    handlers: {\n      inlineCode: inlineCodeWithTable,\n      table: handleTable,\n      tableCell: handleTableCell,\n      tableRow: handleTableRow\n    }\n  };\n  function handleTable(node2, _, state, info) {\n    return serializeData(handleTableAsData(node2, state, info), node2.align);\n  }\n  function handleTableRow(node2, _, state, info) {\n    const row = handleTableRowAsData(node2, state, info);\n    const value = serializeData([row]);\n    return value.slice(0, value.indexOf(\"\\n\"));\n  }\n  function handleTableCell(node2, _, state, info) {\n    const exit2 = state.enter(\"tableCell\");\n    const subexit = state.enter(\"phrasing\");\n    const value = state.containerPhrasing(node2, {\n      ...info,\n      before: around,\n      after: around\n    });\n    subexit();\n    exit2();\n    return value;\n  }\n  function serializeData(matrix, align) {\n    return markdownTable(matrix, {\n      align,\n      // @ts-expect-error: `markdown-table` types should support `null`.\n      alignDelimiters,\n      // @ts-expect-error: `markdown-table` types should support `null`.\n      padding,\n      // @ts-expect-error: `markdown-table` types should support `null`.\n      stringLength\n    });\n  }\n  function handleTableAsData(node2, state, info) {\n    const children = node2.children;\n    let index = -1;\n    const result = [];\n    const subexit = state.enter(\"table\");\n    while (++index < children.length) {\n      result[index] = handleTableRowAsData(children[index], state, info);\n    }\n    subexit();\n    return result;\n  }\n  function handleTableRowAsData(node2, state, info) {\n    const children = node2.children;\n    let index = -1;\n    const result = [];\n    const subexit = state.enter(\"tableRow\");\n    while (++index < children.length) {\n      result[index] = handleTableCell(children[index], node2, state, info);\n    }\n    subexit();\n    return result;\n  }\n  function inlineCodeWithTable(node2, parent, state) {\n    let value = handle.inlineCode(node2, parent, state);\n    if (state.stack.includes(\"tableCell\")) {\n      value = value.replace(/\\|/g, \"\\\\$&\");\n    }\n    return value;\n  }\n}\nfunction gfmTaskListItemFromMarkdown() {\n  return {\n    exit: {\n      taskListCheckValueChecked: exitCheck,\n      taskListCheckValueUnchecked: exitCheck,\n      paragraph: exitParagraphWithTaskListItem\n    }\n  };\n}\nfunction gfmTaskListItemToMarkdown() {\n  return {\n    unsafe: [{ atBreak: true, character: \"-\", after: \"[:|-]\" }],\n    handlers: { listItem: listItemWithTaskListItem }\n  };\n}\nfunction exitCheck(token) {\n  const node2 = this.stack[this.stack.length - 2];\n  ok$1(node2.type === \"listItem\");\n  node2.checked = token.type === \"taskListCheckValueChecked\";\n}\nfunction exitParagraphWithTaskListItem(token) {\n  const parent = this.stack[this.stack.length - 2];\n  if (parent && parent.type === \"listItem\" && typeof parent.checked === \"boolean\") {\n    const node2 = this.stack[this.stack.length - 1];\n    ok$1(node2.type === \"paragraph\");\n    const head = node2.children[0];\n    if (head && head.type === \"text\") {\n      const siblings = parent.children;\n      let index = -1;\n      let firstParaghraph;\n      while (++index < siblings.length) {\n        const sibling = siblings[index];\n        if (sibling.type === \"paragraph\") {\n          firstParaghraph = sibling;\n          break;\n        }\n      }\n      if (firstParaghraph === node2) {\n        head.value = head.value.slice(1);\n        if (head.value.length === 0) {\n          node2.children.shift();\n        } else if (node2.position && head.position && typeof head.position.start.offset === \"number\") {\n          head.position.start.column++;\n          head.position.start.offset++;\n          node2.position.start = Object.assign({}, head.position.start);\n        }\n      }\n    }\n  }\n  this.exit(token);\n}\nfunction listItemWithTaskListItem(node2, parent, state, info) {\n  const head = node2.children[0];\n  const checkable = typeof node2.checked === \"boolean\" && head && head.type === \"paragraph\";\n  const checkbox = \"[\" + (node2.checked ? \"x\" : \" \") + \"] \";\n  const tracker = state.createTracker(info);\n  if (checkable) {\n    tracker.move(checkbox);\n  }\n  let value = handle.listItem(node2, parent, state, {\n    ...info,\n    ...tracker.current()\n  });\n  if (checkable) {\n    value = value.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/, check);\n  }\n  return value;\n  function check($0) {\n    return $0 + checkbox;\n  }\n}\nfunction gfmFromMarkdown() {\n  return [\n    gfmAutolinkLiteralFromMarkdown(),\n    gfmFootnoteFromMarkdown(),\n    gfmStrikethroughFromMarkdown(),\n    gfmTableFromMarkdown(),\n    gfmTaskListItemFromMarkdown()\n  ];\n}\nfunction gfmToMarkdown(options) {\n  return {\n    extensions: [\n      gfmAutolinkLiteralToMarkdown(),\n      gfmFootnoteToMarkdown(options),\n      gfmStrikethroughToMarkdown(),\n      gfmTableToMarkdown(options),\n      gfmTaskListItemToMarkdown()\n    ]\n  };\n}\nfunction splice(list2, start, remove, items) {\n  const end = list2.length;\n  let chunkStart = 0;\n  let parameters;\n  if (start < 0) {\n    start = -start > end ? 0 : end + start;\n  } else {\n    start = start > end ? end : start;\n  }\n  remove = remove > 0 ? remove : 0;\n  if (items.length < 1e4) {\n    parameters = Array.from(items);\n    parameters.unshift(start, remove);\n    list2.splice(...parameters);\n  } else {\n    if (remove) list2.splice(start, remove);\n    while (chunkStart < items.length) {\n      parameters = items.slice(chunkStart, chunkStart + 1e4);\n      parameters.unshift(start, 0);\n      list2.splice(...parameters);\n      chunkStart += 1e4;\n      start += 1e4;\n    }\n  }\n}\nconst hasOwnProperty = {}.hasOwnProperty;\nfunction combineExtensions(extensions) {\n  const all2 = {};\n  let index = -1;\n  while (++index < extensions.length) {\n    syntaxExtension(all2, extensions[index]);\n  }\n  return all2;\n}\nfunction syntaxExtension(all2, extension) {\n  let hook;\n  for (hook in extension) {\n    const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0;\n    const left = maybe || (all2[hook] = {});\n    const right = extension[hook];\n    let code2;\n    if (right) {\n      for (code2 in right) {\n        if (!hasOwnProperty.call(left, code2)) left[code2] = [];\n        const value = right[code2];\n        constructs(\n          // @ts-expect-error Looks like a list.\n          left[code2],\n          Array.isArray(value) ? value : value ? [value] : []\n        );\n      }\n    }\n  }\n}\nfunction constructs(existing, list2) {\n  let index = -1;\n  const before = [];\n  while (++index < list2.length) {\n    (list2[index].add === \"after\" ? existing : before).push(list2[index]);\n  }\n  splice(existing, 0, 0, before);\n}\nconst wwwPrefix = {\n  tokenize: tokenizeWwwPrefix,\n  partial: true\n};\nconst domain = {\n  tokenize: tokenizeDomain,\n  partial: true\n};\nconst path = {\n  tokenize: tokenizePath,\n  partial: true\n};\nconst trail = {\n  tokenize: tokenizeTrail,\n  partial: true\n};\nconst emailDomainDotTrail = {\n  tokenize: tokenizeEmailDomainDotTrail,\n  partial: true\n};\nconst wwwAutolink = {\n  name: \"wwwAutolink\",\n  tokenize: tokenizeWwwAutolink,\n  previous: previousWww\n};\nconst protocolAutolink = {\n  name: \"protocolAutolink\",\n  tokenize: tokenizeProtocolAutolink,\n  previous: previousProtocol\n};\nconst emailAutolink = {\n  name: \"emailAutolink\",\n  tokenize: tokenizeEmailAutolink,\n  previous: previousEmail\n};\nconst text = {};\nfunction gfmAutolinkLiteral() {\n  return {\n    text\n  };\n}\nlet code = 48;\nwhile (code < 123) {\n  text[code] = emailAutolink;\n  code++;\n  if (code === 58) code = 65;\n  else if (code === 91) code = 97;\n}\ntext[43] = emailAutolink;\ntext[45] = emailAutolink;\ntext[46] = emailAutolink;\ntext[95] = emailAutolink;\ntext[72] = [emailAutolink, protocolAutolink];\ntext[104] = [emailAutolink, protocolAutolink];\ntext[87] = [emailAutolink, wwwAutolink];\ntext[119] = [emailAutolink, wwwAutolink];\nfunction tokenizeEmailAutolink(effects, ok2, nok) {\n  const self = this;\n  let dot;\n  let data;\n  return start;\n  function start(code2) {\n    if (!gfmAtext(code2) || !previousEmail.call(self, self.previous) || previousUnbalanced(self.events)) {\n      return nok(code2);\n    }\n    effects.enter(\"literalAutolink\");\n    effects.enter(\"literalAutolinkEmail\");\n    return atext(code2);\n  }\n  function atext(code2) {\n    if (gfmAtext(code2)) {\n      effects.consume(code2);\n      return atext;\n    }\n    if (code2 === 64) {\n      effects.consume(code2);\n      return emailDomain;\n    }\n    return nok(code2);\n  }\n  function emailDomain(code2) {\n    if (code2 === 46) {\n      return effects.check(emailDomainDotTrail, emailDomainAfter, emailDomainDot)(code2);\n    }\n    if (code2 === 45 || code2 === 95 || asciiAlphanumeric(code2)) {\n      data = true;\n      effects.consume(code2);\n      return emailDomain;\n    }\n    return emailDomainAfter(code2);\n  }\n  function emailDomainDot(code2) {\n    effects.consume(code2);\n    dot = true;\n    return emailDomain;\n  }\n  function emailDomainAfter(code2) {\n    if (data && dot && asciiAlpha(self.previous)) {\n      effects.exit(\"literalAutolinkEmail\");\n      effects.exit(\"literalAutolink\");\n      return ok2(code2);\n    }\n    return nok(code2);\n  }\n}\nfunction tokenizeWwwAutolink(effects, ok2, nok) {\n  const self = this;\n  return wwwStart;\n  function wwwStart(code2) {\n    if (code2 !== 87 && code2 !== 119 || !previousWww.call(self, self.previous) || previousUnbalanced(self.events)) {\n      return nok(code2);\n    }\n    effects.enter(\"literalAutolink\");\n    effects.enter(\"literalAutolinkWww\");\n    return effects.check(wwwPrefix, effects.attempt(domain, effects.attempt(path, wwwAfter), nok), nok)(code2);\n  }\n  function wwwAfter(code2) {\n    effects.exit(\"literalAutolinkWww\");\n    effects.exit(\"literalAutolink\");\n    return ok2(code2);\n  }\n}\nfunction tokenizeProtocolAutolink(effects, ok2, nok) {\n  const self = this;\n  let buffer = \"\";\n  let seen = false;\n  return protocolStart;\n  function protocolStart(code2) {\n    if ((code2 === 72 || code2 === 104) && previousProtocol.call(self, self.previous) && !previousUnbalanced(self.events)) {\n      effects.enter(\"literalAutolink\");\n      effects.enter(\"literalAutolinkHttp\");\n      buffer += String.fromCodePoint(code2);\n      effects.consume(code2);\n      return protocolPrefixInside;\n    }\n    return nok(code2);\n  }\n  function protocolPrefixInside(code2) {\n    if (asciiAlpha(code2) && buffer.length < 5) {\n      buffer += String.fromCodePoint(code2);\n      effects.consume(code2);\n      return protocolPrefixInside;\n    }\n    if (code2 === 58) {\n      const protocol = buffer.toLowerCase();\n      if (protocol === \"http\" || protocol === \"https\") {\n        effects.consume(code2);\n        return protocolSlashesInside;\n      }\n    }\n    return nok(code2);\n  }\n  function protocolSlashesInside(code2) {\n    if (code2 === 47) {\n      effects.consume(code2);\n      if (seen) {\n        return afterProtocol;\n      }\n      seen = true;\n      return protocolSlashesInside;\n    }\n    return nok(code2);\n  }\n  function afterProtocol(code2) {\n    return code2 === null || asciiControl(code2) || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || unicodePunctuation(code2) ? nok(code2) : effects.attempt(domain, effects.attempt(path, protocolAfter), nok)(code2);\n  }\n  function protocolAfter(code2) {\n    effects.exit(\"literalAutolinkHttp\");\n    effects.exit(\"literalAutolink\");\n    return ok2(code2);\n  }\n}\nfunction tokenizeWwwPrefix(effects, ok2, nok) {\n  let size = 0;\n  return wwwPrefixInside;\n  function wwwPrefixInside(code2) {\n    if ((code2 === 87 || code2 === 119) && size < 3) {\n      size++;\n      effects.consume(code2);\n      return wwwPrefixInside;\n    }\n    if (code2 === 46 && size === 3) {\n      effects.consume(code2);\n      return wwwPrefixAfter;\n    }\n    return nok(code2);\n  }\n  function wwwPrefixAfter(code2) {\n    return code2 === null ? nok(code2) : ok2(code2);\n  }\n}\nfunction tokenizeDomain(effects, ok2, nok) {\n  let underscoreInLastSegment;\n  let underscoreInLastLastSegment;\n  let seen;\n  return domainInside;\n  function domainInside(code2) {\n    if (code2 === 46 || code2 === 95) {\n      return effects.check(trail, domainAfter, domainAtPunctuation)(code2);\n    }\n    if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== 45 && unicodePunctuation(code2)) {\n      return domainAfter(code2);\n    }\n    seen = true;\n    effects.consume(code2);\n    return domainInside;\n  }\n  function domainAtPunctuation(code2) {\n    if (code2 === 95) {\n      underscoreInLastSegment = true;\n    } else {\n      underscoreInLastLastSegment = underscoreInLastSegment;\n      underscoreInLastSegment = void 0;\n    }\n    effects.consume(code2);\n    return domainInside;\n  }\n  function domainAfter(code2) {\n    if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {\n      return nok(code2);\n    }\n    return ok2(code2);\n  }\n}\nfunction tokenizePath(effects, ok2) {\n  let sizeOpen = 0;\n  let sizeClose = 0;\n  return pathInside;\n  function pathInside(code2) {\n    if (code2 === 40) {\n      sizeOpen++;\n      effects.consume(code2);\n      return pathInside;\n    }\n    if (code2 === 41 && sizeClose < sizeOpen) {\n      return pathAtPunctuation(code2);\n    }\n    if (code2 === 33 || code2 === 34 || code2 === 38 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 60 || code2 === 63 || code2 === 93 || code2 === 95 || code2 === 126) {\n      return effects.check(trail, ok2, pathAtPunctuation)(code2);\n    }\n    if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {\n      return ok2(code2);\n    }\n    effects.consume(code2);\n    return pathInside;\n  }\n  function pathAtPunctuation(code2) {\n    if (code2 === 41) {\n      sizeClose++;\n    }\n    effects.consume(code2);\n    return pathInside;\n  }\n}\nfunction tokenizeTrail(effects, ok2, nok) {\n  return trail2;\n  function trail2(code2) {\n    if (code2 === 33 || code2 === 34 || code2 === 39 || code2 === 41 || code2 === 42 || code2 === 44 || code2 === 46 || code2 === 58 || code2 === 59 || code2 === 63 || code2 === 95 || code2 === 126) {\n      effects.consume(code2);\n      return trail2;\n    }\n    if (code2 === 38) {\n      effects.consume(code2);\n      return trailCharacterReferenceStart;\n    }\n    if (code2 === 93) {\n      effects.consume(code2);\n      return trailBracketAfter;\n    }\n    if (\n      // `<` is an end.\n      code2 === 60 || // So is whitespace.\n      code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)\n    ) {\n      return ok2(code2);\n    }\n    return nok(code2);\n  }\n  function trailBracketAfter(code2) {\n    if (code2 === null || code2 === 40 || code2 === 91 || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2)) {\n      return ok2(code2);\n    }\n    return trail2(code2);\n  }\n  function trailCharacterReferenceStart(code2) {\n    return asciiAlpha(code2) ? trailCharacterReferenceInside(code2) : nok(code2);\n  }\n  function trailCharacterReferenceInside(code2) {\n    if (code2 === 59) {\n      effects.consume(code2);\n      return trail2;\n    }\n    if (asciiAlpha(code2)) {\n      effects.consume(code2);\n      return trailCharacterReferenceInside;\n    }\n    return nok(code2);\n  }\n}\nfunction tokenizeEmailDomainDotTrail(effects, ok2, nok) {\n  return start;\n  function start(code2) {\n    effects.consume(code2);\n    return after;\n  }\n  function after(code2) {\n    return asciiAlphanumeric(code2) ? nok(code2) : ok2(code2);\n  }\n}\nfunction previousWww(code2) {\n  return code2 === null || code2 === 40 || code2 === 42 || code2 === 95 || code2 === 91 || code2 === 93 || code2 === 126 || markdownLineEndingOrSpace(code2);\n}\nfunction previousProtocol(code2) {\n  return !asciiAlpha(code2);\n}\nfunction previousEmail(code2) {\n  return !(code2 === 47 || gfmAtext(code2));\n}\nfunction gfmAtext(code2) {\n  return code2 === 43 || code2 === 45 || code2 === 46 || code2 === 95 || asciiAlphanumeric(code2);\n}\nfunction previousUnbalanced(events) {\n  let index = events.length;\n  let result = false;\n  while (index--) {\n    const token = events[index][1];\n    if ((token.type === \"labelLink\" || token.type === \"labelImage\") && !token._balanced) {\n      result = true;\n      break;\n    }\n    if (token._gfmAutolinkLiteralWalkedInto) {\n      result = false;\n      break;\n    }\n  }\n  if (events.length > 0 && !result) {\n    events[events.length - 1][1]._gfmAutolinkLiteralWalkedInto = true;\n  }\n  return result;\n}\nfunction resolveAll(constructs2, events, context) {\n  const called = [];\n  let index = -1;\n  while (++index < constructs2.length) {\n    const resolve = constructs2[index].resolveAll;\n    if (resolve && !called.includes(resolve)) {\n      events = resolve(events, context);\n      called.push(resolve);\n    }\n  }\n  return events;\n}\nfunction factorySpace(effects, ok2, type, max) {\n  const limit = max ? max - 1 : Number.POSITIVE_INFINITY;\n  let size = 0;\n  return start;\n  function start(code2) {\n    if (markdownSpace(code2)) {\n      effects.enter(type);\n      return prefix(code2);\n    }\n    return ok2(code2);\n  }\n  function prefix(code2) {\n    if (markdownSpace(code2) && size++ < limit) {\n      effects.consume(code2);\n      return prefix;\n    }\n    effects.exit(type);\n    return ok2(code2);\n  }\n}\nconst blankLine = {\n  partial: true,\n  tokenize: tokenizeBlankLine\n};\nfunction tokenizeBlankLine(effects, ok2, nok) {\n  return start;\n  function start(code2) {\n    return markdownSpace(code2) ? factorySpace(effects, after, \"linePrefix\")(code2) : after(code2);\n  }\n  function after(code2) {\n    return code2 === null || markdownLineEnding(code2) ? ok2(code2) : nok(code2);\n  }\n}\nconst indent = {\n  tokenize: tokenizeIndent,\n  partial: true\n};\nfunction gfmFootnote() {\n  return {\n    document: {\n      [91]: {\n        name: \"gfmFootnoteDefinition\",\n        tokenize: tokenizeDefinitionStart,\n        continuation: {\n          tokenize: tokenizeDefinitionContinuation\n        },\n        exit: gfmFootnoteDefinitionEnd\n      }\n    },\n    text: {\n      [91]: {\n        name: \"gfmFootnoteCall\",\n        tokenize: tokenizeGfmFootnoteCall\n      },\n      [93]: {\n        name: \"gfmPotentialFootnoteCall\",\n        add: \"after\",\n        tokenize: tokenizePotentialGfmFootnoteCall,\n        resolveTo: resolveToPotentialGfmFootnoteCall\n      }\n    }\n  };\n}\nfunction tokenizePotentialGfmFootnoteCall(effects, ok2, nok) {\n  const self = this;\n  let index = self.events.length;\n  const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n  let labelStart;\n  while (index--) {\n    const token = self.events[index][1];\n    if (token.type === \"labelImage\") {\n      labelStart = token;\n      break;\n    }\n    if (token.type === \"gfmFootnoteCall\" || token.type === \"labelLink\" || token.type === \"label\" || token.type === \"image\" || token.type === \"link\") {\n      break;\n    }\n  }\n  return start;\n  function start(code2) {\n    if (!labelStart || !labelStart._balanced) {\n      return nok(code2);\n    }\n    const id = normalizeIdentifier(self.sliceSerialize({\n      start: labelStart.end,\n      end: self.now()\n    }));\n    if (id.codePointAt(0) !== 94 || !defined.includes(id.slice(1))) {\n      return nok(code2);\n    }\n    effects.enter(\"gfmFootnoteCallLabelMarker\");\n    effects.consume(code2);\n    effects.exit(\"gfmFootnoteCallLabelMarker\");\n    return ok2(code2);\n  }\n}\nfunction resolveToPotentialGfmFootnoteCall(events, context) {\n  let index = events.length;\n  while (index--) {\n    if (events[index][1].type === \"labelImage\" && events[index][0] === \"enter\") {\n      events[index][1];\n      break;\n    }\n  }\n  events[index + 1][1].type = \"data\";\n  events[index + 3][1].type = \"gfmFootnoteCallLabelMarker\";\n  const call = {\n    type: \"gfmFootnoteCall\",\n    start: Object.assign({}, events[index + 3][1].start),\n    end: Object.assign({}, events[events.length - 1][1].end)\n  };\n  const marker = {\n    type: \"gfmFootnoteCallMarker\",\n    start: Object.assign({}, events[index + 3][1].end),\n    end: Object.assign({}, events[index + 3][1].end)\n  };\n  marker.end.column++;\n  marker.end.offset++;\n  marker.end._bufferIndex++;\n  const string = {\n    type: \"gfmFootnoteCallString\",\n    start: Object.assign({}, marker.end),\n    end: Object.assign({}, events[events.length - 1][1].start)\n  };\n  const chunk = {\n    type: \"chunkString\",\n    contentType: \"string\",\n    start: Object.assign({}, string.start),\n    end: Object.assign({}, string.end)\n  };\n  const replacement = [\n    // Take the `labelImageMarker` (now `data`, the `!`)\n    events[index + 1],\n    events[index + 2],\n    [\"enter\", call, context],\n    // The `[`\n    events[index + 3],\n    events[index + 4],\n    // The `^`.\n    [\"enter\", marker, context],\n    [\"exit\", marker, context],\n    // Everything in between.\n    [\"enter\", string, context],\n    [\"enter\", chunk, context],\n    [\"exit\", chunk, context],\n    [\"exit\", string, context],\n    // The ending (`]`, properly parsed and labelled).\n    events[events.length - 2],\n    events[events.length - 1],\n    [\"exit\", call, context]\n  ];\n  events.splice(index, events.length - index + 1, ...replacement);\n  return events;\n}\nfunction tokenizeGfmFootnoteCall(effects, ok2, nok) {\n  const self = this;\n  const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n  let size = 0;\n  let data;\n  return start;\n  function start(code2) {\n    effects.enter(\"gfmFootnoteCall\");\n    effects.enter(\"gfmFootnoteCallLabelMarker\");\n    effects.consume(code2);\n    effects.exit(\"gfmFootnoteCallLabelMarker\");\n    return callStart;\n  }\n  function callStart(code2) {\n    if (code2 !== 94) return nok(code2);\n    effects.enter(\"gfmFootnoteCallMarker\");\n    effects.consume(code2);\n    effects.exit(\"gfmFootnoteCallMarker\");\n    effects.enter(\"gfmFootnoteCallString\");\n    effects.enter(\"chunkString\").contentType = \"string\";\n    return callData;\n  }\n  function callData(code2) {\n    if (\n      // Too long.\n      size > 999 || // Closing brace with nothing.\n      code2 === 93 && !data || // Space or tab is not supported by GFM for some reason.\n      // `\\n` and `[` not being supported makes sense.\n      code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)\n    ) {\n      return nok(code2);\n    }\n    if (code2 === 93) {\n      effects.exit(\"chunkString\");\n      const token = effects.exit(\"gfmFootnoteCallString\");\n      if (!defined.includes(normalizeIdentifier(self.sliceSerialize(token)))) {\n        return nok(code2);\n      }\n      effects.enter(\"gfmFootnoteCallLabelMarker\");\n      effects.consume(code2);\n      effects.exit(\"gfmFootnoteCallLabelMarker\");\n      effects.exit(\"gfmFootnoteCall\");\n      return ok2;\n    }\n    if (!markdownLineEndingOrSpace(code2)) {\n      data = true;\n    }\n    size++;\n    effects.consume(code2);\n    return code2 === 92 ? callEscape : callData;\n  }\n  function callEscape(code2) {\n    if (code2 === 91 || code2 === 92 || code2 === 93) {\n      effects.consume(code2);\n      size++;\n      return callData;\n    }\n    return callData(code2);\n  }\n}\nfunction tokenizeDefinitionStart(effects, ok2, nok) {\n  const self = this;\n  const defined = self.parser.gfmFootnotes || (self.parser.gfmFootnotes = []);\n  let identifier;\n  let size = 0;\n  let data;\n  return start;\n  function start(code2) {\n    effects.enter(\"gfmFootnoteDefinition\")._container = true;\n    effects.enter(\"gfmFootnoteDefinitionLabel\");\n    effects.enter(\"gfmFootnoteDefinitionLabelMarker\");\n    effects.consume(code2);\n    effects.exit(\"gfmFootnoteDefinitionLabelMarker\");\n    return labelAtMarker;\n  }\n  function labelAtMarker(code2) {\n    if (code2 === 94) {\n      effects.enter(\"gfmFootnoteDefinitionMarker\");\n      effects.consume(code2);\n      effects.exit(\"gfmFootnoteDefinitionMarker\");\n      effects.enter(\"gfmFootnoteDefinitionLabelString\");\n      effects.enter(\"chunkString\").contentType = \"string\";\n      return labelInside;\n    }\n    return nok(code2);\n  }\n  function labelInside(code2) {\n    if (\n      // Too long.\n      size > 999 || // Closing brace with nothing.\n      code2 === 93 && !data || // Space or tab is not supported by GFM for some reason.\n      // `\\n` and `[` not being supported makes sense.\n      code2 === null || code2 === 91 || markdownLineEndingOrSpace(code2)\n    ) {\n      return nok(code2);\n    }\n    if (code2 === 93) {\n      effects.exit(\"chunkString\");\n      const token = effects.exit(\"gfmFootnoteDefinitionLabelString\");\n      identifier = normalizeIdentifier(self.sliceSerialize(token));\n      effects.enter(\"gfmFootnoteDefinitionLabelMarker\");\n      effects.consume(code2);\n      effects.exit(\"gfmFootnoteDefinitionLabelMarker\");\n      effects.exit(\"gfmFootnoteDefinitionLabel\");\n      return labelAfter;\n    }\n    if (!markdownLineEndingOrSpace(code2)) {\n      data = true;\n    }\n    size++;\n    effects.consume(code2);\n    return code2 === 92 ? labelEscape : labelInside;\n  }\n  function labelEscape(code2) {\n    if (code2 === 91 || code2 === 92 || code2 === 93) {\n      effects.consume(code2);\n      size++;\n      return labelInside;\n    }\n    return labelInside(code2);\n  }\n  function labelAfter(code2) {\n    if (code2 === 58) {\n      effects.enter(\"definitionMarker\");\n      effects.consume(code2);\n      effects.exit(\"definitionMarker\");\n      if (!defined.includes(identifier)) {\n        defined.push(identifier);\n      }\n      return factorySpace(effects, whitespaceAfter, \"gfmFootnoteDefinitionWhitespace\");\n    }\n    return nok(code2);\n  }\n  function whitespaceAfter(code2) {\n    return ok2(code2);\n  }\n}\nfunction tokenizeDefinitionContinuation(effects, ok2, nok) {\n  return effects.check(blankLine, ok2, effects.attempt(indent, ok2, nok));\n}\nfunction gfmFootnoteDefinitionEnd(effects) {\n  effects.exit(\"gfmFootnoteDefinition\");\n}\nfunction tokenizeIndent(effects, ok2, nok) {\n  const self = this;\n  return factorySpace(effects, afterPrefix, \"gfmFootnoteDefinitionIndent\", 4 + 1);\n  function afterPrefix(code2) {\n    const tail = self.events[self.events.length - 1];\n    return tail && tail[1].type === \"gfmFootnoteDefinitionIndent\" && tail[2].sliceSerialize(tail[1], true).length === 4 ? ok2(code2) : nok(code2);\n  }\n}\nfunction gfmStrikethrough(options) {\n  const options_ = options || {};\n  let single = options_.singleTilde;\n  const tokenizer = {\n    name: \"strikethrough\",\n    tokenize: tokenizeStrikethrough,\n    resolveAll: resolveAllStrikethrough\n  };\n  if (single === null || single === void 0) {\n    single = true;\n  }\n  return {\n    text: {\n      [126]: tokenizer\n    },\n    insideSpan: {\n      null: [tokenizer]\n    },\n    attentionMarkers: {\n      null: [126]\n    }\n  };\n  function resolveAllStrikethrough(events, context) {\n    let index = -1;\n    while (++index < events.length) {\n      if (events[index][0] === \"enter\" && events[index][1].type === \"strikethroughSequenceTemporary\" && events[index][1]._close) {\n        let open = index;\n        while (open--) {\n          if (events[open][0] === \"exit\" && events[open][1].type === \"strikethroughSequenceTemporary\" && events[open][1]._open && // If the sizes are the same:\n          events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {\n            events[index][1].type = \"strikethroughSequence\";\n            events[open][1].type = \"strikethroughSequence\";\n            const strikethrough = {\n              type: \"strikethrough\",\n              start: Object.assign({}, events[open][1].start),\n              end: Object.assign({}, events[index][1].end)\n            };\n            const text2 = {\n              type: \"strikethroughText\",\n              start: Object.assign({}, events[open][1].end),\n              end: Object.assign({}, events[index][1].start)\n            };\n            const nextEvents = [[\"enter\", strikethrough, context], [\"enter\", events[open][1], context], [\"exit\", events[open][1], context], [\"enter\", text2, context]];\n            const insideSpan = context.parser.constructs.insideSpan.null;\n            if (insideSpan) {\n              splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));\n            }\n            splice(nextEvents, nextEvents.length, 0, [[\"exit\", text2, context], [\"enter\", events[index][1], context], [\"exit\", events[index][1], context], [\"exit\", strikethrough, context]]);\n            splice(events, open - 1, index - open + 3, nextEvents);\n            index = open + nextEvents.length - 2;\n            break;\n          }\n        }\n      }\n    }\n    index = -1;\n    while (++index < events.length) {\n      if (events[index][1].type === \"strikethroughSequenceTemporary\") {\n        events[index][1].type = \"data\";\n      }\n    }\n    return events;\n  }\n  function tokenizeStrikethrough(effects, ok2, nok) {\n    const previous2 = this.previous;\n    const events = this.events;\n    let size = 0;\n    return start;\n    function start(code2) {\n      if (previous2 === 126 && events[events.length - 1][1].type !== \"characterEscape\") {\n        return nok(code2);\n      }\n      effects.enter(\"strikethroughSequenceTemporary\");\n      return more(code2);\n    }\n    function more(code2) {\n      const before = classifyCharacter(previous2);\n      if (code2 === 126) {\n        if (size > 1) return nok(code2);\n        effects.consume(code2);\n        size++;\n        return more;\n      }\n      if (size < 2 && !single) return nok(code2);\n      const token = effects.exit(\"strikethroughSequenceTemporary\");\n      const after = classifyCharacter(code2);\n      token._open = !after || after === 2 && Boolean(before);\n      token._close = !before || before === 2 && Boolean(after);\n      return ok2(code2);\n    }\n  }\n}\nclass EditMap {\n  /**\n   * Create a new edit map.\n   */\n  constructor() {\n    this.map = [];\n  }\n  /**\n   * Create an edit: a remove and/or add at a certain place.\n   *\n   * @param {number} index\n   * @param {number} remove\n   * @param {Array<Event>} add\n   * @returns {undefined}\n   */\n  add(index, remove, add) {\n    addImplementation(this, index, remove, add);\n  }\n  // To do: add this when moving to `micromark`.\n  // /**\n  //  * Create an edit: but insert `add` before existing additions.\n  //  *\n  //  * @param {number} index\n  //  * @param {number} remove\n  //  * @param {Array<Event>} add\n  //  * @returns {undefined}\n  //  */\n  // addBefore(index, remove, add) {\n  //   addImplementation(this, index, remove, add, true)\n  // }\n  /**\n   * Done, change the events.\n   *\n   * @param {Array<Event>} events\n   * @returns {undefined}\n   */\n  consume(events) {\n    this.map.sort(function(a, b) {\n      return a[0] - b[0];\n    });\n    if (this.map.length === 0) {\n      return;\n    }\n    let index = this.map.length;\n    const vecs = [];\n    while (index > 0) {\n      index -= 1;\n      vecs.push(events.slice(this.map[index][0] + this.map[index][1]), this.map[index][2]);\n      events.length = this.map[index][0];\n    }\n    vecs.push(events.slice());\n    events.length = 0;\n    let slice = vecs.pop();\n    while (slice) {\n      for (const element of slice) {\n        events.push(element);\n      }\n      slice = vecs.pop();\n    }\n    this.map.length = 0;\n  }\n}\nfunction addImplementation(editMap, at, remove, add) {\n  let index = 0;\n  if (remove === 0 && add.length === 0) {\n    return;\n  }\n  while (index < editMap.map.length) {\n    if (editMap.map[index][0] === at) {\n      editMap.map[index][1] += remove;\n      editMap.map[index][2].push(...add);\n      return;\n    }\n    index += 1;\n  }\n  editMap.map.push([at, remove, add]);\n}\nfunction gfmTableAlign(events, index) {\n  let inDelimiterRow = false;\n  const align = [];\n  while (index < events.length) {\n    const event = events[index];\n    if (inDelimiterRow) {\n      if (event[0] === \"enter\") {\n        if (event[1].type === \"tableContent\") {\n          align.push(events[index + 1][1].type === \"tableDelimiterMarker\" ? \"left\" : \"none\");\n        }\n      } else if (event[1].type === \"tableContent\") {\n        if (events[index - 1][1].type === \"tableDelimiterMarker\") {\n          const alignIndex = align.length - 1;\n          align[alignIndex] = align[alignIndex] === \"left\" ? \"center\" : \"right\";\n        }\n      } else if (event[1].type === \"tableDelimiterRow\") {\n        break;\n      }\n    } else if (event[0] === \"enter\" && event[1].type === \"tableDelimiterRow\") {\n      inDelimiterRow = true;\n    }\n    index += 1;\n  }\n  return align;\n}\nfunction gfmTable() {\n  return {\n    flow: {\n      null: {\n        name: \"table\",\n        tokenize: tokenizeTable,\n        resolveAll: resolveTable\n      }\n    }\n  };\n}\nfunction tokenizeTable(effects, ok2, nok) {\n  const self = this;\n  let size = 0;\n  let sizeB = 0;\n  let seen;\n  return start;\n  function start(code2) {\n    let index = self.events.length - 1;\n    while (index > -1) {\n      const type = self.events[index][1].type;\n      if (type === \"lineEnding\" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`\n      type === \"linePrefix\") index--;\n      else break;\n    }\n    const tail = index > -1 ? self.events[index][1].type : null;\n    const next = tail === \"tableHead\" || tail === \"tableRow\" ? bodyRowStart : headRowBefore;\n    if (next === bodyRowStart && self.parser.lazy[self.now().line]) {\n      return nok(code2);\n    }\n    return next(code2);\n  }\n  function headRowBefore(code2) {\n    effects.enter(\"tableHead\");\n    effects.enter(\"tableRow\");\n    return headRowStart(code2);\n  }\n  function headRowStart(code2) {\n    if (code2 === 124) {\n      return headRowBreak(code2);\n    }\n    seen = true;\n    sizeB += 1;\n    return headRowBreak(code2);\n  }\n  function headRowBreak(code2) {\n    if (code2 === null) {\n      return nok(code2);\n    }\n    if (markdownLineEnding(code2)) {\n      if (sizeB > 1) {\n        sizeB = 0;\n        self.interrupt = true;\n        effects.exit(\"tableRow\");\n        effects.enter(\"lineEnding\");\n        effects.consume(code2);\n        effects.exit(\"lineEnding\");\n        return headDelimiterStart;\n      }\n      return nok(code2);\n    }\n    if (markdownSpace(code2)) {\n      return factorySpace(effects, headRowBreak, \"whitespace\")(code2);\n    }\n    sizeB += 1;\n    if (seen) {\n      seen = false;\n      size += 1;\n    }\n    if (code2 === 124) {\n      effects.enter(\"tableCellDivider\");\n      effects.consume(code2);\n      effects.exit(\"tableCellDivider\");\n      seen = true;\n      return headRowBreak;\n    }\n    effects.enter(\"data\");\n    return headRowData(code2);\n  }\n  function headRowData(code2) {\n    if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) {\n      effects.exit(\"data\");\n      return headRowBreak(code2);\n    }\n    effects.consume(code2);\n    return code2 === 92 ? headRowEscape : headRowData;\n  }\n  function headRowEscape(code2) {\n    if (code2 === 92 || code2 === 124) {\n      effects.consume(code2);\n      return headRowData;\n    }\n    return headRowData(code2);\n  }\n  function headDelimiterStart(code2) {\n    self.interrupt = false;\n    if (self.parser.lazy[self.now().line]) {\n      return nok(code2);\n    }\n    effects.enter(\"tableDelimiterRow\");\n    seen = false;\n    if (markdownSpace(code2)) {\n      return factorySpace(effects, headDelimiterBefore, \"linePrefix\", self.parser.constructs.disable.null.includes(\"codeIndented\") ? void 0 : 4)(code2);\n    }\n    return headDelimiterBefore(code2);\n  }\n  function headDelimiterBefore(code2) {\n    if (code2 === 45 || code2 === 58) {\n      return headDelimiterValueBefore(code2);\n    }\n    if (code2 === 124) {\n      seen = true;\n      effects.enter(\"tableCellDivider\");\n      effects.consume(code2);\n      effects.exit(\"tableCellDivider\");\n      return headDelimiterCellBefore;\n    }\n    return headDelimiterNok(code2);\n  }\n  function headDelimiterCellBefore(code2) {\n    if (markdownSpace(code2)) {\n      return factorySpace(effects, headDelimiterValueBefore, \"whitespace\")(code2);\n    }\n    return headDelimiterValueBefore(code2);\n  }\n  function headDelimiterValueBefore(code2) {\n    if (code2 === 58) {\n      sizeB += 1;\n      seen = true;\n      effects.enter(\"tableDelimiterMarker\");\n      effects.consume(code2);\n      effects.exit(\"tableDelimiterMarker\");\n      return headDelimiterLeftAlignmentAfter;\n    }\n    if (code2 === 45) {\n      sizeB += 1;\n      return headDelimiterLeftAlignmentAfter(code2);\n    }\n    if (code2 === null || markdownLineEnding(code2)) {\n      return headDelimiterCellAfter(code2);\n    }\n    return headDelimiterNok(code2);\n  }\n  function headDelimiterLeftAlignmentAfter(code2) {\n    if (code2 === 45) {\n      effects.enter(\"tableDelimiterFiller\");\n      return headDelimiterFiller(code2);\n    }\n    return headDelimiterNok(code2);\n  }\n  function headDelimiterFiller(code2) {\n    if (code2 === 45) {\n      effects.consume(code2);\n      return headDelimiterFiller;\n    }\n    if (code2 === 58) {\n      seen = true;\n      effects.exit(\"tableDelimiterFiller\");\n      effects.enter(\"tableDelimiterMarker\");\n      effects.consume(code2);\n      effects.exit(\"tableDelimiterMarker\");\n      return headDelimiterRightAlignmentAfter;\n    }\n    effects.exit(\"tableDelimiterFiller\");\n    return headDelimiterRightAlignmentAfter(code2);\n  }\n  function headDelimiterRightAlignmentAfter(code2) {\n    if (markdownSpace(code2)) {\n      return factorySpace(effects, headDelimiterCellAfter, \"whitespace\")(code2);\n    }\n    return headDelimiterCellAfter(code2);\n  }\n  function headDelimiterCellAfter(code2) {\n    if (code2 === 124) {\n      return headDelimiterBefore(code2);\n    }\n    if (code2 === null || markdownLineEnding(code2)) {\n      if (!seen || size !== sizeB) {\n        return headDelimiterNok(code2);\n      }\n      effects.exit(\"tableDelimiterRow\");\n      effects.exit(\"tableHead\");\n      return ok2(code2);\n    }\n    return headDelimiterNok(code2);\n  }\n  function headDelimiterNok(code2) {\n    return nok(code2);\n  }\n  function bodyRowStart(code2) {\n    effects.enter(\"tableRow\");\n    return bodyRowBreak(code2);\n  }\n  function bodyRowBreak(code2) {\n    if (code2 === 124) {\n      effects.enter(\"tableCellDivider\");\n      effects.consume(code2);\n      effects.exit(\"tableCellDivider\");\n      return bodyRowBreak;\n    }\n    if (code2 === null || markdownLineEnding(code2)) {\n      effects.exit(\"tableRow\");\n      return ok2(code2);\n    }\n    if (markdownSpace(code2)) {\n      return factorySpace(effects, bodyRowBreak, \"whitespace\")(code2);\n    }\n    effects.enter(\"data\");\n    return bodyRowData(code2);\n  }\n  function bodyRowData(code2) {\n    if (code2 === null || code2 === 124 || markdownLineEndingOrSpace(code2)) {\n      effects.exit(\"data\");\n      return bodyRowBreak(code2);\n    }\n    effects.consume(code2);\n    return code2 === 92 ? bodyRowEscape : bodyRowData;\n  }\n  function bodyRowEscape(code2) {\n    if (code2 === 92 || code2 === 124) {\n      effects.consume(code2);\n      return bodyRowData;\n    }\n    return bodyRowData(code2);\n  }\n}\nfunction resolveTable(events, context) {\n  let index = -1;\n  let inFirstCellAwaitingPipe = true;\n  let rowKind = 0;\n  let lastCell = [0, 0, 0, 0];\n  let cell = [0, 0, 0, 0];\n  let afterHeadAwaitingFirstBodyRow = false;\n  let lastTableEnd = 0;\n  let currentTable;\n  let currentBody;\n  let currentCell;\n  const map2 = new EditMap();\n  while (++index < events.length) {\n    const event = events[index];\n    const token = event[1];\n    if (event[0] === \"enter\") {\n      if (token.type === \"tableHead\") {\n        afterHeadAwaitingFirstBodyRow = false;\n        if (lastTableEnd !== 0) {\n          flushTableEnd(map2, context, lastTableEnd, currentTable, currentBody);\n          currentBody = void 0;\n          lastTableEnd = 0;\n        }\n        currentTable = {\n          type: \"table\",\n          start: Object.assign({}, token.start),\n          // Note: correct end is set later.\n          end: Object.assign({}, token.end)\n        };\n        map2.add(index, 0, [[\"enter\", currentTable, context]]);\n      } else if (token.type === \"tableRow\" || token.type === \"tableDelimiterRow\") {\n        inFirstCellAwaitingPipe = true;\n        currentCell = void 0;\n        lastCell = [0, 0, 0, 0];\n        cell = [0, index + 1, 0, 0];\n        if (afterHeadAwaitingFirstBodyRow) {\n          afterHeadAwaitingFirstBodyRow = false;\n          currentBody = {\n            type: \"tableBody\",\n            start: Object.assign({}, token.start),\n            // Note: correct end is set later.\n            end: Object.assign({}, token.end)\n          };\n          map2.add(index, 0, [[\"enter\", currentBody, context]]);\n        }\n        rowKind = token.type === \"tableDelimiterRow\" ? 2 : currentBody ? 3 : 1;\n      } else if (rowKind && (token.type === \"data\" || token.type === \"tableDelimiterMarker\" || token.type === \"tableDelimiterFiller\")) {\n        inFirstCellAwaitingPipe = false;\n        if (cell[2] === 0) {\n          if (lastCell[1] !== 0) {\n            cell[0] = cell[1];\n            currentCell = flushCell(map2, context, lastCell, rowKind, void 0, currentCell);\n            lastCell = [0, 0, 0, 0];\n          }\n          cell[2] = index;\n        }\n      } else if (token.type === \"tableCellDivider\") {\n        if (inFirstCellAwaitingPipe) {\n          inFirstCellAwaitingPipe = false;\n        } else {\n          if (lastCell[1] !== 0) {\n            cell[0] = cell[1];\n            currentCell = flushCell(map2, context, lastCell, rowKind, void 0, currentCell);\n          }\n          lastCell = cell;\n          cell = [lastCell[1], index, 0, 0];\n        }\n      }\n    } else if (token.type === \"tableHead\") {\n      afterHeadAwaitingFirstBodyRow = true;\n      lastTableEnd = index;\n    } else if (token.type === \"tableRow\" || token.type === \"tableDelimiterRow\") {\n      lastTableEnd = index;\n      if (lastCell[1] !== 0) {\n        cell[0] = cell[1];\n        currentCell = flushCell(map2, context, lastCell, rowKind, index, currentCell);\n      } else if (cell[1] !== 0) {\n        currentCell = flushCell(map2, context, cell, rowKind, index, currentCell);\n      }\n      rowKind = 0;\n    } else if (rowKind && (token.type === \"data\" || token.type === \"tableDelimiterMarker\" || token.type === \"tableDelimiterFiller\")) {\n      cell[3] = index;\n    }\n  }\n  if (lastTableEnd !== 0) {\n    flushTableEnd(map2, context, lastTableEnd, currentTable, currentBody);\n  }\n  map2.consume(context.events);\n  index = -1;\n  while (++index < context.events.length) {\n    const event = context.events[index];\n    if (event[0] === \"enter\" && event[1].type === \"table\") {\n      event[1]._align = gfmTableAlign(context.events, index);\n    }\n  }\n  return events;\n}\nfunction flushCell(map2, context, range, rowKind, rowEnd, previousCell) {\n  const groupName = rowKind === 1 ? \"tableHeader\" : rowKind === 2 ? \"tableDelimiter\" : \"tableData\";\n  const valueName = \"tableContent\";\n  if (range[0] !== 0) {\n    previousCell.end = Object.assign({}, getPoint(context.events, range[0]));\n    map2.add(range[0], 0, [[\"exit\", previousCell, context]]);\n  }\n  const now = getPoint(context.events, range[1]);\n  previousCell = {\n    type: groupName,\n    start: Object.assign({}, now),\n    // Note: correct end is set later.\n    end: Object.assign({}, now)\n  };\n  map2.add(range[1], 0, [[\"enter\", previousCell, context]]);\n  if (range[2] !== 0) {\n    const relatedStart = getPoint(context.events, range[2]);\n    const relatedEnd = getPoint(context.events, range[3]);\n    const valueToken = {\n      type: valueName,\n      start: Object.assign({}, relatedStart),\n      end: Object.assign({}, relatedEnd)\n    };\n    map2.add(range[2], 0, [[\"enter\", valueToken, context]]);\n    if (rowKind !== 2) {\n      const start = context.events[range[2]];\n      const end = context.events[range[3]];\n      start[1].end = Object.assign({}, end[1].end);\n      start[1].type = \"chunkText\";\n      start[1].contentType = \"text\";\n      if (range[3] > range[2] + 1) {\n        const a = range[2] + 1;\n        const b = range[3] - range[2] - 1;\n        map2.add(a, b, []);\n      }\n    }\n    map2.add(range[3] + 1, 0, [[\"exit\", valueToken, context]]);\n  }\n  if (rowEnd !== void 0) {\n    previousCell.end = Object.assign({}, getPoint(context.events, rowEnd));\n    map2.add(rowEnd, 0, [[\"exit\", previousCell, context]]);\n    previousCell = void 0;\n  }\n  return previousCell;\n}\nfunction flushTableEnd(map2, context, index, table, tableBody) {\n  const exits = [];\n  const related = getPoint(context.events, index);\n  if (tableBody) {\n    tableBody.end = Object.assign({}, related);\n    exits.push([\"exit\", tableBody, context]);\n  }\n  table.end = Object.assign({}, related);\n  exits.push([\"exit\", table, context]);\n  map2.add(index + 1, 0, exits);\n}\nfunction getPoint(events, index) {\n  const event = events[index];\n  const side = event[0] === \"enter\" ? \"start\" : \"end\";\n  return event[1][side];\n}\nconst tasklistCheck = {\n  name: \"tasklistCheck\",\n  tokenize: tokenizeTasklistCheck\n};\nfunction gfmTaskListItem() {\n  return {\n    text: {\n      [91]: tasklistCheck\n    }\n  };\n}\nfunction tokenizeTasklistCheck(effects, ok2, nok) {\n  const self = this;\n  return open;\n  function open(code2) {\n    if (\n      // Exit if there’s stuff before.\n      self.previous !== null || // Exit if not in the first content that is the first child of a list\n      // item.\n      !self._gfmTasklistFirstContentOfListItem\n    ) {\n      return nok(code2);\n    }\n    effects.enter(\"taskListCheck\");\n    effects.enter(\"taskListCheckMarker\");\n    effects.consume(code2);\n    effects.exit(\"taskListCheckMarker\");\n    return inside;\n  }\n  function inside(code2) {\n    if (markdownLineEndingOrSpace(code2)) {\n      effects.enter(\"taskListCheckValueUnchecked\");\n      effects.consume(code2);\n      effects.exit(\"taskListCheckValueUnchecked\");\n      return close;\n    }\n    if (code2 === 88 || code2 === 120) {\n      effects.enter(\"taskListCheckValueChecked\");\n      effects.consume(code2);\n      effects.exit(\"taskListCheckValueChecked\");\n      return close;\n    }\n    return nok(code2);\n  }\n  function close(code2) {\n    if (code2 === 93) {\n      effects.enter(\"taskListCheckMarker\");\n      effects.consume(code2);\n      effects.exit(\"taskListCheckMarker\");\n      effects.exit(\"taskListCheck\");\n      return after;\n    }\n    return nok(code2);\n  }\n  function after(code2) {\n    if (markdownLineEnding(code2)) {\n      return ok2(code2);\n    }\n    if (markdownSpace(code2)) {\n      return effects.check({\n        tokenize: spaceThenNonSpace\n      }, ok2, nok)(code2);\n    }\n    return nok(code2);\n  }\n}\nfunction spaceThenNonSpace(effects, ok2, nok) {\n  return factorySpace(effects, after, \"whitespace\");\n  function after(code2) {\n    return code2 === null ? nok(code2) : ok2(code2);\n  }\n}\nfunction gfm(options) {\n  return combineExtensions([\n    gfmAutolinkLiteral(),\n    gfmFootnote(),\n    gfmStrikethrough(options),\n    gfmTable(),\n    gfmTaskListItem()\n  ]);\n}\nconst emptyOptions = {};\nfunction remarkGfm(options) {\n  const self = (\n    /** @type {Processor<Root>} */\n    this\n  );\n  const settings = options || emptyOptions;\n  const data = self.data();\n  const micromarkExtensions = data.micromarkExtensions || (data.micromarkExtensions = []);\n  const fromMarkdownExtensions = data.fromMarkdownExtensions || (data.fromMarkdownExtensions = []);\n  const toMarkdownExtensions = data.toMarkdownExtensions || (data.toMarkdownExtensions = []);\n  micromarkExtensions.push(gfm(settings));\n  fromMarkdownExtensions.push(gfmFromMarkdown());\n  toMarkdownExtensions.push(gfmToMarkdown(settings));\n}\nconst _sfc_main$1 = /* @__PURE__ */ defineComponent({\n  __name: \"NcRichTextCopyButton\",\n  props: {\n    contentId: {}\n  },\n  setup(__props) {\n    const { copy, icon, altText } = useCopy(() => document.getElementById(__props.contentId).textContent);\n    return (_ctx, _cache) => {\n      return openBlock(), createBlock(NcButton, {\n        variant: \"tertiary\",\n        size: \"small\",\n        \"aria-label\": unref(altText),\n        title: unref(altText),\n        onClick: unref(copy)\n      }, {\n        icon: withCtx(() => [\n          createVNode(NcIconSvgWrapper, {\n            path: unref(icon),\n            inline: \"\"\n          }, null, 8, [\"path\"])\n        ]),\n        _: 1\n      }, 8, [\"aria-label\", \"title\", \"onClick\"]);\n    };\n  }\n});\n/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction isTextNode$1(node2) {\n  return node2.type === \"text\";\n}\nconst transformPlaceholders = function(ast) {\n  visit(ast, isTextNode$1, visitor);\n  function visitor(node2, index, parent) {\n    const placeholders = node2.value.split(/(\\{[a-z\\-_.0-9]+\\})/ig).map((entry) => {\n      const matches = entry.match(/^\\{([a-z\\-_.0-9]+)\\}$/i);\n      if (!matches) {\n        return u(\"text\", entry);\n      }\n      const [, component] = matches;\n      return u(\"element\", {\n        tagName: `#${component}`,\n        children: []\n      });\n    });\n    parent.children.splice(index, 1, ...placeholders);\n  }\n};\nconst remarkPlaceholder = () => transformPlaceholders;\n/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nfunction isTextNode(node2) {\n  return [\"text\", \"code\", \"inlineCode\"].includes(node2.type);\n}\nconst remarkUnescape = function() {\n  return function(tree) {\n    visit(tree, isTextNode, (node2, index, parent) => {\n      parent.children.splice(index, 1, {\n        ...node2,\n        value: node2.value.replace(/&lt;/gmi, \"<\").replace(/&gt;/gmi, \">\")\n      });\n      return [SKIP$1, index + 1];\n    });\n  };\n};\nconst LINK_PROTOCOLS = [\"http\", \"https\", \"mailto\", \"tel\"];\nconst rehypeHighlight = ref(null);\nasync function importRehypeHighlightLibrary() {\n  const module = await import(\"rehype-highlight\");\n  rehypeHighlight.value = module.default;\n}\nconst _sfc_main = {\n  name: \"NcRichText\",\n  components: {\n    NcReferenceList\n  },\n  /* eslint vue/require-prop-comment: warn -- TODO: Add a proper doc block about what this props do */\n  props: {\n    /**\n     * The main text\n     */\n    text: {\n      type: String,\n      default: \"\"\n    },\n    arguments: {\n      type: Object,\n      default: () => {\n        return {};\n      }\n    },\n    referenceLimit: {\n      type: Number,\n      default: 0\n    },\n    referenceInteractive: {\n      type: Boolean,\n      default: true\n    },\n    referenceInteractiveOptIn: {\n      type: Boolean,\n      default: false\n    },\n    /** Provide data upfront to avoid extra http request */\n    references: {\n      type: Array,\n      default: null\n    },\n    /** Provide basic Markdown syntax */\n    useMarkdown: {\n      type: Boolean,\n      default: false\n    },\n    /** Provide GitHub Flavored Markdown syntax */\n    useExtendedMarkdown: {\n      type: Boolean,\n      default: false\n    },\n    /** Provide event from rendered markdown inputs */\n    interactive: {\n      type: Boolean,\n      default: false\n    },\n    /**\n     * Automatically convert link-like text to markdown links\n     */\n    autolink: {\n      type: Boolean,\n      default: true\n    }\n  },\n  emits: [\n    \"interactTodo\"\n  ],\n  data() {\n    return {\n      parentId: createElementId()\n    };\n  },\n  methods: {\n    renderPlaintext() {\n      const placeholders = this.text.split(/(\\{[a-z\\-_.0-9]+\\})/ig).map((entry) => {\n        const matches = entry.match(/^\\{([a-z\\-_.0-9]+)\\}$/i);\n        if (!matches) {\n          return this.prepareTextNode(entry);\n        }\n        const argumentId = matches[1];\n        const argument = this.arguments[argumentId];\n        if (typeof argument === \"object\") {\n          const { component, props } = argument;\n          return h(typeof component === \"string\" ? resolveComponent(component) : component, {\n            ...props,\n            class: \"rich-text--component\"\n          });\n        }\n        if (argument) {\n          return h(\"span\", { class: \"rich-text--fallback\" }, argument);\n        }\n        return entry;\n      });\n      return h(\"div\", { class: \"rich-text--wrapper\" }, [\n        h(\"div\", {}, placeholders.flat()),\n        this.referenceLimit > 0 ? h(\"div\", { class: \"rich-text--reference-widget\" }, [\n          h(NcReferenceList, {\n            text: this.text,\n            referenceData: this.references,\n            interactive: this.referenceInteractive,\n            interactiveOptIn: this.referenceInteractiveOptIn\n          })\n        ]) : null\n      ]);\n    },\n    renderMarkdown() {\n      const renderedMarkdown = unified().use(remarkParse).use(remarkAutolink, {\n        autolink: this.autolink,\n        useMarkdown: this.useMarkdown,\n        useExtendedMarkdown: this.useExtendedMarkdown\n      }).use(remarkUnescape).use(this.useExtendedMarkdown ? remarkGfm : void 0).use(breaks).use(remarkUnlinkProtocols, { except: LINK_PROTOCOLS }).use(remark2rehype, {\n        handlers: {\n          component(toHast, node2) {\n            return toHast(node2, node2.component, { value: node2.value });\n          }\n        }\n      }).use(this.useExtendedMarkdown ? rehypeHighlight.value : void 0).use(remarkPlaceholder).use(rehypeExternalLinks, {\n        target: \"_blank\",\n        rel: [\"noopener noreferrer\"]\n      }).use(rehype2react, {\n        Fragment,\n        jsx: this.createElement,\n        jsxs: this.createElement,\n        elementAttributeNameCase: \"html\",\n        prefix: false\n      }).processSync(this.text.replace(/<[^>]+>/g, (match) => match.replace(/</g, \"&lt;\")).replace(/&gt;/gmi, \">\")).result;\n      return h(\"div\", { class: \"rich-text--wrapper rich-text--wrapper-markdown\" }, [\n        renderedMarkdown,\n        this.referenceLimit > 0 ? h(\"div\", { class: \"rich-text--reference-widget\" }, [\n          h(NcReferenceList, {\n            text: this.text,\n            referenceData: this.references,\n            interactive: this.referenceInteractive,\n            interactiveOptIn: this.referenceInteractiveOptIn\n          })\n        ]) : null\n      ]);\n    },\n    /**\n     * Render plain text nodes\n     *\n     * @param {string} text - Content of the node\n     */\n    prepareTextNode(text2) {\n      if (this.autolink) {\n        text2 = parseUrl(text2);\n      }\n      if (Array.isArray(text2)) {\n        return text2.map((entry) => {\n          if (typeof entry === \"string\") {\n            return entry;\n          }\n          const { component, props } = entry;\n          const componentClass = component.name === \"NcLink\" ? void 0 : \"rich-text--component\";\n          return h(component, {\n            ...props,\n            class: componentClass\n          });\n        });\n      }\n      return text2;\n    },\n    createElement(type, props, key) {\n      if (key) {\n        props.key = key;\n      }\n      const children = props.children ?? [];\n      delete props.children;\n      if (!String(type).startsWith(\"#\")) {\n        if ([\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"].includes(String(type))) {\n          type = `h${Math.min(+String(type)[1] + 3, 6)}`;\n        }\n        let nestedNode = null;\n        if (this.useExtendedMarkdown) {\n          if (String(type) === \"code\" && !rehypeHighlight.value && props?.class?.includes(\"language\")) {\n            importRehypeHighlightLibrary();\n          }\n          if (String(type) === \"pre\" && children && String(children.type) === \"code\") {\n            const id = this.parentId + \"-code-block-\" + createElementId();\n            return h(\"p\", { class: \"rich-text__code-block\" }, [\n              h(type, { ...props, id }, children),\n              h(_sfc_main$1, { class: \"rich-text__code-block-button\", contentId: id })\n            ]);\n          }\n          if (String(type) === \"li\" && Array.isArray(children) && children.length !== 0 && children[0].type === \"input\" && children[0].props.type === \"checkbox\") {\n            const [inputNode, , ...labelParts] = children;\n            const nestedNodeIndex = labelParts.findIndex((child) => [\"ul\", \"ol\", \"li\", \"blockquote\", \"pre\"].includes(child.type));\n            if (nestedNodeIndex !== -1) {\n              nestedNode = labelParts[nestedNodeIndex];\n              labelParts.splice(nestedNodeIndex);\n            }\n            const id = this.parentId + \"-markdown-input-\" + createElementId();\n            const propsToForward = { ...inputNode.props };\n            delete propsToForward.checked;\n            const inputComponent = h(NcCheckboxRadioSwitch, {\n              ...propsToForward,\n              modelValue: inputNode.props.checked,\n              id,\n              disabled: !this.interactive,\n              \"onUpdate:modelValue\": () => {\n                this.$emit(\"interactTodo\", id);\n              }\n            }, { default: () => labelParts });\n            return h(type, props, [inputComponent, nestedNode]);\n          }\n        }\n        if (String(type) === \"a\") {\n          const route = getRoute(this.$router, props.href);\n          if (route) {\n            delete props.href;\n            delete props.target;\n            return h(RouterLink, {\n              ...props,\n              to: route\n            }, { default: () => children });\n          }\n        }\n        return h(type, props, children);\n      }\n      const placeholder = this.arguments[type.slice(1)];\n      if (!placeholder) {\n        return h(\"span\", { ...props, class: \"rich-text--fallback\" }, [`{${type.slice(1)}}`]);\n      }\n      if (!placeholder.component) {\n        return h(\"span\", { ...props }, [placeholder]);\n      }\n      return h(\n        typeof placeholder.component === \"string\" ? resolveComponent(placeholder.component) : placeholder.component,\n        {\n          ...props,\n          ...placeholder.props,\n          class: \"rich-text--component\"\n        },\n        { default: () => children }\n      );\n    }\n  },\n  render() {\n    return this.useMarkdown || this.useExtendedMarkdown ? this.renderMarkdown() : this.renderPlaintext();\n  }\n};\nconst NcRichText = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-a47e4ba7\"]]);\nexport {\n  NcRichText as N,\n  NcReferenceList as a\n};\n//# sourceMappingURL=NcRichText-DJlaHs_Q.mjs.map\n","/**\n *\n * (c) Copyright Ascensio System SIA 2026\n *\n * This program is a free software product.\n * You can redistribute it and/or modify it under the terms of the GNU Affero General Public License\n * (AGPL) version 3 as published by the Free Software Foundation.\n * In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect\n * that Ascensio System SIA expressly excludes the warranty of non-infringement of any third-party rights.\n *\n * This program is distributed WITHOUT ANY WARRANTY;\n * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n * For details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html\n *\n * The interactive user interfaces in modified source and object code versions of the Program\n * must display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.\n *\n * All the Product's GUI elements, including illustrations and icon sets, as well as technical\n * writing content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International.\n * See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode\n *\n */\n\n/* global OC, OCP, t */\n\nimport { getLinkWithPicker } from '@nextcloud/vue/components/NcRichText'\n\n/**\n * @param {object} OCA Nextcloud OCA object\n */\n(function(OCA) {\n\n\tconst getFavIconHref = () => {\n\t\tconst link = document.querySelector('link[rel=\"icon\"]')\n\t\treturn link ? link.getAttribute('href') : null\n\t}\n\n\tOCA.Eurooffice = Object.assign({\n\t\tAppName: 'eurooffice',\n\t\tframeSelector: null,\n\t\ttitleBase: window.document.title,\n\t\tfavIconBase: getFavIconHref(),\n\t}, OCA.Eurooffice)\n\n\tOCA.Eurooffice.onRequestClose = function() {\n\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame) {\n\t\t\tframe.remove()\n\t\t}\n\n\t\tOCA.Eurooffice._isDocumentReady = false\n\t\tOCA.Eurooffice._pendingInsertLinks = []\n\n\t\tif (OCA.Viewer && OCA.Viewer.close) {\n\t\t\tOCA.Viewer.close()\n\t\t}\n\n\t\tif (OCA.Eurooffice.CloseEditor) {\n\t\t\tOCA.Eurooffice.CloseEditor()\n\t\t}\n\t}\n\n\tOCA.Eurooffice.onRequestSaveAs = function(saveData) {\n\n\t\tOC.dialogs.filepicker(t(OCA.Eurooffice.AppName, 'Save as'),\n\t\t\tfunction(fileDir) {\n\t\t\t\tsaveData.dir = fileDir\n\t\t\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\t\t\tif (frame && frame.contentWindow) {\n\t\t\t\t\tframe.contentWindow.OCA.Eurooffice.editorSaveAs(saveData)\n\t\t\t\t}\n\t\t\t},\n\t\t\tfalse,\n\t\t\t'httpd/unix-directory',\n\t\t\ttrue,\n\t\t\tOC.dialogs.FILEPICKER_TYPE_CHOOSE,\n\t\t\tsaveData.dir)\n\t}\n\n\tOCA.Eurooffice.onRequestInsertImage = function(imageMimes) {\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame && frame.contentWindow) {\n\t\t\tOC.dialogs.filepicker(t(OCA.Eurooffice.AppName, 'Insert image'),\n\t\t\t\tframe.contentWindow.OCA.Eurooffice.editorInsertImage,\n\t\t\t\tfalse,\n\t\t\t\timageMimes,\n\t\t\t\ttrue)\n\t\t}\n\t}\n\n\t// Open the NC Assistant text-processing form seeded with the editor\n\t// selection. We deliberately do NOT add an \"Insert into editor\" action\n\t// button: writing the AI result back into the document strips formatting\n\t// and produces low-quality replacements (markup is lost on plain-text\n\t// paste). Until that round-trip preserves at least basic styling, the\n\t// feature is intentionally read-only — the user copies the result from\n\t// the modal manually. The modal's built-in close button dismisses it.\n\tOCA.Eurooffice.onSmartPickerRequest = async function(selectedText, source) {\n\t\tif (this.showSmartPicker) {\n\t\t\treturn\n\t\t}\n\t\tthis.showSmartPicker = true\n\n\t\tif (source === 'contextmenu') {\n\t\t\tconst openAssistantForm = window.OCA?.Assistant?.openAssistantForm\n\t\t\tif (typeof openAssistantForm !== 'function') {\n\t\t\t\tconsole.debug('NC Assistant app is not loaded; smart picker is unavailable')\n\t\t\t\tthis.showSmartPicker = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst seedInputs = selectedText\n\t\t\t\t\t? { prompt: selectedText, input: selectedText, text: selectedText }\n\t\t\t\t\t: {}\n\t\t\t\tawait openAssistantForm({\n\t\t\t\t\tappId: OCA.Eurooffice.AppName,\n\t\t\t\t\ttaskType: 'core:text2text',\n\t\t\t\t\tinputs: seedInputs,\n\t\t\t\t\tcloseOnResult: false,\n\t\t\t\t})\n\t\t\t} catch (e) {\n\t\t\t\t// Smart Picker cancelled or failed\n\t\t\t}\n\t\t} else {\n\t\t\t// Toolbar button: open the Smart Picker provider selection modal\n\t\t\tif (typeof getLinkWithPicker !== 'function') {\n\t\t\t\tconsole.error('getLinkWithPicker is not available. Make sure @nextcloud/vue supports the Smart Picker.')\n\t\t\t\tthis.showSmartPicker = false\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst linkUrl = await getLinkWithPicker('eurooffice', false)\n\t\t\t\tif (linkUrl) {\n\t\t\t\t\tOCA.Eurooffice.onInsertLink(linkUrl)\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tconsole.debug('Smart Picker cancelled or failed:', err)\n\t\t\t}\n\t\t}\n\t\tthis.showSmartPicker = false\n\t}\n\n\tOCA.Eurooffice.onRequestMailMergeRecipients = function(recipientMimes) {\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame && frame.contentWindow) {\n\t\t\tOC.dialogs.filepicker(t(OCA.Eurooffice.AppName, 'Select recipients'),\n\t\t\t\tframe.contentWindow.OCA.Eurooffice.editorSetRecipient,\n\t\t\t\tfalse,\n\t\t\t\trecipientMimes,\n\t\t\t\ttrue)\n\t\t}\n\t}\n\n\tOCA.Eurooffice.onRequestSelectDocument = function(revisedMimes, documentSelectionType) {\n\t\tlet title\n\t\tswitch (documentSelectionType) {\n\t\tcase 'combine':\n\t\t\ttitle = t(OCA.Eurooffice.AppName, 'Select file to combine')\n\t\t\tbreak\n\t\tcase 'compare':\n\t\t\ttitle = t(OCA.Eurooffice.AppName, 'Select file to compare')\n\t\t\tbreak\n\t\tcase 'insert-text':\n\t\t\ttitle = t(OCA.Eurooffice.AppName, 'Select file to insert text')\n\t\t\tbreak\n\t\tdefault:\n\t\t\ttitle = t(OCA.Eurooffice.AppName, 'Select file')\n\t\t}\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame && frame.contentWindow) {\n\t\t\tOC.dialogs.filepicker(title,\n\t\t\t\tframe.contentWindow.OCA.Eurooffice.editorSetRequested.bind({ documentSelectionType }),\n\t\t\t\tfalse,\n\t\t\t\trevisedMimes,\n\t\t\t\ttrue)\n\t\t}\n\t}\n\n\tOCA.Eurooffice.onRequestReferenceSource = function(referenceSourceMimes) {\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame && frame.contentWindow) {\n\t\t\tOC.dialogs.filepicker(t(OCA.Eurooffice.AppName, 'Select data source'),\n\t\t\t\tframe.contentWindow.OCA.Eurooffice.editorReferenceSource,\n\t\t\t\tfalse,\n\t\t\t\treferenceSourceMimes,\n\t\t\t\ttrue)\n\t\t}\n\t}\n\n\tOCA.Eurooffice.onDocumentReady = function() {\n\t\tOCA.Eurooffice.setViewport()\n\t\tOCA.Eurooffice._isDocumentReady = true\n\t\tif (OCA.Eurooffice._pendingInsertLinks && OCA.Eurooffice._pendingInsertLinks.length > 0) {\n\t\t\tconst links = OCA.Eurooffice._pendingInsertLinks\n\t\t\tOCA.Eurooffice._pendingInsertLinks = []\n\t\t\tlinks.forEach((link) => {\n\t\t\t\tOCA.Eurooffice._doInsertLink(link)\n\t\t\t})\n\t\t}\n\t}\n\n\tOCA.Eurooffice._pendingInsertLinks = []\n\tOCA.Eurooffice._isDocumentReady = false\n\n\tOCA.Eurooffice._doInsertLink = function(link) {\n\t\tif (!link) return\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame && frame.contentWindow && frame.contentWindow.OCA?.Eurooffice?.docEditor) {\n\t\t\tframe.contentWindow.OCA.Eurooffice.docEditor.insertLink(link)\n\t\t}\n\t}\n\n\tOCA.Eurooffice.onInsertLink = function(link) {\n\t\tif (OCA.Eurooffice._isDocumentReady) {\n\t\t\tOCA.Eurooffice._doInsertLink(link)\n\t\t} else {\n\t\t\tOCA.Eurooffice._pendingInsertLinks.push(link)\n\t\t}\n\t}\n\n\tOCA.Eurooffice.changeFavicon = function(favicon) {\n\t\tconst link = document.querySelector('link[rel=\"icon\"]')\n\t\tif (link) {\n\t\t\tlink.setAttribute('href', favicon)\n\t\t}\n\t}\n\n\tOCA.Eurooffice.setViewport = function() {\n\t\tdocument.querySelector('meta[name=\"viewport\"]').setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0')\n\t}\n\n\tOCA.Eurooffice.onShowMessage = function(messageObj) {\n\t\tswitch (messageObj.type) {\n\t\tcase 'success':\n\t\t\tOCP.Toast.success(messageObj.message, messageObj.props)\n\t\t\tbreak\n\t\tcase 'error':\n\t\t\tOCP.Toast.error(messageObj.message, messageObj.props)\n\t\t\tbreak\n\t\t}\n\t}\n\n\twindow.addEventListener('message', function(event) {\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (!frame\n\t\t\t|| frame.contentWindow !== event.source\n\t\t\t|| !event.data.method) {\n\t\t\treturn\n\t\t}\n\t\tswitch (event.data.method) {\n\t\tcase 'editorRequestClose':\n\t\t\tOCA.Eurooffice.onRequestClose()\n\t\t\tbreak\n\t\tcase 'editorRequestSharingSettings':\n\t\t\tif (OCA.Eurooffice.OpenShareDialog) {\n\t\t\t\tOCA.Eurooffice.OpenShareDialog()\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'onRefreshVersionsDialog':\n\t\t\tif (OCA.Eurooffice.RefreshVersionsDialog) {\n\t\t\t\tOCA.Eurooffice.RefreshVersionsDialog()\n\t\t\t}\n\t\t\tbreak\n\t\tcase 'editorRequestSaveAs':\n\t\t\tOCA.Eurooffice.onRequestSaveAs(event.data.param)\n\t\t\tbreak\n\t\tcase 'editorRequestInsertImage':\n\t\t\tOCA.Eurooffice.onRequestInsertImage(event.data.param)\n\t\t\tbreak\n\t\tcase 'editorRequestSmartPicker':\n\t\t\tOCA.Eurooffice.onSmartPickerRequest(event.data.param?.selectedText, event.data.param?.source)\n\t\t\tbreak\n\t\tcase 'editorRequestMailMergeRecipients':\n\t\t\tOCA.Eurooffice.onRequestMailMergeRecipients(event.data.param)\n\t\t\tbreak\n\t\tcase 'editorRequestSelectDocument':\n\t\t\tOCA.Eurooffice.onRequestSelectDocument(event.data.param, event.data.documentSelectionType)\n\t\t\tbreak\n\t\tcase 'editorRequestReferenceSource':\n\t\t\tOCA.Eurooffice.onRequestReferenceSource(event.data.param)\n\t\t\tbreak\n\t\tcase 'onDocumentReady':\n\t\t\tOCA.Eurooffice.onDocumentReady(event.data.param)\n\t\t\tbreak\n\t\tcase 'changeFavicon':\n\t\t\tOCA.Eurooffice.changeFavicon(event.data.param)\n\t\t\tbreak\n\t\tcase 'onShowMessage':\n\t\t\tOCA.Eurooffice.onShowMessage(event.data.param)\n\t\t\tbreak\n\t\t}\n\t}, false)\n\n\twindow.addEventListener('popstate', function(event) {\n\t\tconst frame = document.querySelector(OCA.Eurooffice.frameSelector)\n\t\tif (frame) {\n\t\t\tOCA.Eurooffice.onRequestClose()\n\t\t}\n\t})\n\n\tconst mutationObserver = new MutationObserver(mutationRecords => {\n\t\tif (mutationRecords[0] && mutationRecords[0].removedNodes) {\n\t\t\tmutationRecords[0].removedNodes.forEach((node) => {\n\t\t\t\tif (node.id && '#' + node.id === OCA.Eurooffice.frameSelector) {\n\t\t\t\t\tOCA.Eurooffice.changeFavicon(OCA.Eurooffice.favIconBase)\n\t\t\t\t\twindow.document.title = OCA.Eurooffice.titleBase\n\t\t\t\t\tOCA.Eurooffice.frameSelector = null\n\t\t\t\t}\n\t\t\t  })\n\t\t}\n\t  })\n\n\tmutationObserver.observe(document.querySelector('body'), {\n\t\tchildList: true,\n\t\tsubtree: true,\n\t\tcharacterDataOldValue: true,\n\t  })\n\n})(OCA)\n"],"names":["isSameRouteRecord","a","b","isSameRouteLocationParams","key","isSameRouteLocationParamsValue","isArray","isEquivalentArray","value","useLink","props","router","inject","routerKey","currentRoute","routeLocationKey","route","computed","to","unref","activeRecordIndex","matched","length","routeMatched","currentMatched","index","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","p","noop","preferSingleVNode","vnodes","RouterLinkImpl","defineComponent","slots","link","reactive","options","elClass","getLinkClass","children","h","RouterLink","target","outer","inner","innerValue","outerValue","i","record","propClass","globalClass","defaultClass","INSIDE_RADIO_GROUP_KEY","useInsideRadioGroup","TYPE_RADIO","register","_sfc_main","emit","radioGroup","onMounted","internalType","internalModelValue","createElementId","__injectCSSVars__","useCssVars","_ctx","__setup__","ctx","id","callback","onDestroy","registerWidget","propsWithDefaults","logger","renderWidget","el","richObjectType","richObject","accessible","interactive","destroyWidget","isWidgetRegistered","hasInteractiveView","hasFullWidth","registerCustomPickerElement","isCustomPickerElementRegistered","getCustomPickerElementSize","size","renderCustomPickerElement","providerId","destroyCustomPickerElement","renderResult","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","__props","nameId","_cache","openBlock","createElementBlock","renderSlot","createCommentVNode","createTextVNode","toDisplayString","NcEmptyContent","_export_sfc","getRoute","url","removePrefix","str","prefix","removePrefixes","prefixes","acc","isAbsoluteURL","isNonHttpLink","getBaseUrl","relativeUrl","relativeRouterBase","getRootUrl","potentialRouterPath","_hoisted_6","mergeModels","__expose","__emit","modelValue","useModel","focus","select","attrs","useAttrs","inputElement","useTemplateRef","hasTrailingIcon","internalPlaceholder","isLegacy","isValidLabel","ariaDescribedby","ariaDescribedby2","handleInput","event","normalizeClass","createElementVNode","mergeProps","withDirectives","vShow","createBlock","NcButton","$event","withCtx","NcIconSvgWrapper","mdiCheck","mdiAlertCircleOutline","NcInputField","t18","t50","inputFieldInstance","defaultTrailingButtonLabels","t","NcInputFieldPropNames","propsToForward","sharedProps","createSlots","mdiArrowRight","mdiUndo","mdiClose","_sfc_main$9","_hoisted_1$9","_hoisted_2$7","_hoisted_3$6","_hoisted_4$5","_sfc_render$8","$props","$setup","$data","$options","ArrowLeftIcon","_sfc_main$8","renderFunctionResult","result","_hoisted_1$8","_sfc_render$7","NcCustomPickerElement","_sfc_main$7","_hoisted_1$7","_hoisted_2$6","_hoisted_3$5","_hoisted_4$4","_sfc_render$6","LinkVariantIcon","t8","anyLinkProviderId","anyLinkProvider","imagePath","loadState","getProvider","getProviders","keep","sortProviders","providerList","timestamps","ta","tb","searchProvider","query","limit","providers","escapedQuery","regexp","filteredSortedProviders","searchResult","touchProvider","timestamp","generateOcsUrl","axios","t40","t45","isUrl","_sfc_main$6","NcSelect","_sfc_main$a","_hoisted_1$6","_hoisted_2$5","_hoisted_3$4","_hoisted_4$3","_sfc_render$5","_component_LinkVariantIcon","resolveComponent","_component_NcHighlight","_component_NcSelect","_component_NcEmptyContent","createVNode","option","NcProviderList","t24","_hoisted_1$5","_hoisted_2$4","_hoisted_3$3","_hoisted_4$2","IDLE_TIMEOUT","_sfc_main$5","isVisible","ref","customWidget","widgetRoot","width","useElementSize","useIntersectionObserver","entry","nextTick","showInteractive","rendered","idleTimeout","isInteractive","referenceHasFullWidth","hasCustomWidget","referenceHasInteractiveView","noAccess","numberOfLines","max","descriptionStyle","lineClamp","compactLink","referenceWidgetLinkComponent","referenceWidgetLinkProps","watch","val","destroyReferenceWidget","renderReferenceWidget","onBeforeUnmount","enableInteractive","widget","resolveDynamicComponent","normalizeStyle","NcReferenceWidget","t25","_sfc_main$4","NcLoadingIcon","_sfc_main$b","debounce","response","error","_hoisted_1$4","_hoisted_2$3","_hoisted_3$2","_sfc_render$4","_component_NcLoadingIcon","_component_NcTextField","_component_NcReferenceWidget","withKeys","NcRawLinkInput","_sfc_main$3","_hoisted_1$3","_hoisted_2$2","_hoisted_3$1","_hoisted_4$1","_hoisted_5$1","_sfc_render$3","NcSearchResult","t32","t42","LIMIT","_sfc_main$2","IconDotsHorizontal","results","pid","providerEntriesWithId","resultsBySearchProvider","item","searchProviderId","searchPromises","promises","cursor","data","_hoisted_1$2","_hoisted_2$1","_hoisted_7","_hoisted_8","_hoisted_9","_sfc_render$2","_component_NcSearchResult","_component_DotsHorizontalIcon","NcSearch","MODES","_sfc_main$1","provider","_hoisted_1$1","_sfc_render$1","_component_NcProviderList","_component_NcRawLinkInput","_component_NcSearch","_component_NcCustomPickerElement","withModifiers","args","NcReferencePicker","t12","t19","NcModal","IconClose","elem","_sfc_render","_component_ArrowLeftIcon","_component_NcButton","_component_CloseIcon","_component_NcReferencePicker","_component_NcModal","NcReferencePickerModal","getLinkWithPicker","isInsideViewer","modalId","modalElement","promise","reject","resolve","initialProvider","view","createApp","t22","asciiAlpha","regexCheck","asciiAlphanumeric","asciiControl","code2","markdownLineEndingOrSpace","unicodePunctuation","unicodeWhitespace","regex","check","convert","test","ok","castFactory","anyFactory","propsFactory","typeFactory","tests","checks","any","parameters","index2","checkAsRecord","all2","node2","nodeAsRecord","type","testFunction","parent","looksLikeANode","wwwPrefix","tokenizeWwwPrefix","domain","tokenizeDomain","path","tokenizePath","trail","tokenizeTrail","emailDomainDotTrail","tokenizeEmailDomainDotTrail","wwwAutolink","tokenizeWwwAutolink","previousWww","protocolAutolink","tokenizeProtocolAutolink","previousProtocol","emailAutolink","tokenizeEmailAutolink","previousEmail","text","code","effects","ok2","nok","self","dot","start","gfmAtext","previousUnbalanced","atext","emailDomain","emailDomainAfter","emailDomainDot","wwwStart","wwwAfter","buffer","seen","protocolStart","protocolPrefixInside","protocol","protocolSlashesInside","afterProtocol","protocolAfter","wwwPrefixInside","wwwPrefixAfter","underscoreInLastSegment","underscoreInLastLastSegment","domainInside","domainAfter","domainAtPunctuation","sizeOpen","sizeClose","pathInside","pathAtPunctuation","trail2","trailCharacterReferenceStart","trailBracketAfter","trailCharacterReferenceInside","after","events","token","OCA","getFavIconHref","frame","saveData","fileDir","imageMimes","selectedText","source","openAssistantForm","seedInputs","linkUrl","err","recipientMimes","revisedMimes","documentSelectionType","title","referenceSourceMimes","links","favicon","messageObj","mutationRecords","node"],"mappings":"ipCAmNA,SAASA,GAAkBC,EAAGC,EAAG,CAChC,OAAQD,EAAE,SAAWA,MAAQC,EAAE,SAAWA,EAC3C,CACA,SAASC,GAA0BF,EAAGC,EAAG,CACxC,GAAI,OAAO,KAAKD,CAAC,EAAE,SAAW,OAAO,KAAKC,CAAC,EAAE,OAAQ,MAAO,GAC5D,QAASE,KAAOH,EAAG,GAAI,CAACI,GAA+BJ,EAAEG,CAAG,EAAGF,EAAEE,CAAG,CAAC,EAAG,MAAO,GAC/E,MAAO,EACR,CACA,SAASC,GAA+BJ,EAAGC,EAAG,CAC7C,OAAOI,EAAQL,CAAC,EAAIM,GAAkBN,EAAGC,CAAC,EAAII,EAAQJ,CAAC,EAAIK,GAAkBL,EAAGD,CAAC,GAAKA,GAAKA,EAAE,cAAgBC,GAAKA,EAAE,UACrH,CAQA,SAASK,GAAkBN,EAAGC,EAAG,CAChC,OAAOI,EAAQJ,CAAC,EAAID,EAAE,SAAWC,EAAE,QAAUD,EAAE,MAAM,CAACO,EAAO,IAAMA,IAAUN,EAAE,CAAC,CAAC,EAAID,EAAE,SAAW,GAAKA,EAAE,CAAC,IAAMC,CACjH,CC+pBA,SAASO,GAAQC,EAAO,CACvB,MAAMC,EAASC,EAAOC,EAAS,EACzBC,EAAeF,EAAOG,EAAgB,EAGtCC,EAAQC,EAAS,IAAM,CAC5B,MAAMC,EAAKC,E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