{"version":3,"file":"respec-1edtech.js","sources":["../src/core/expose-modules.js","../src/core/pubsubhub.js","../src/core/include-config.js","../src/core/l10n.js","../node_modules/idb/build/index.js","../node_modules/sniffy-mimetype/index.js","../node_modules/marked/lib/marked.esm.js","../js/deps/builds/pluralize.js","../node_modules/hyperhtml/esm.js","../src/core/import-maps.js","../src/core/utils.js","../src/core/exporter.js","../src/core/respec-global.js","../src/core/post-process.js","../src/core/pre-process.js","../src/core/base-runner.js","../src/core/override-configuration.js","../src/styles/ui.css.js","../src/core/markdown.js","../src/core/ui.js","../src/respec.js","../profiles/1edtech.js","../src/core/location-hash.js","../src/core/defaults.js","../src/1edtech/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/1edtech/styles/1edtech-base.css.js","../src/1edtech/style.js","../src/1edtech/config.js","../src/1edtech/compute.js","../src/core/github.js","../src/1edtech/utils.js","../src/1edtech/transclude.js","../src/core/sections.js","../src/core/data-include.js","../src/1edtech/ajv-formats.js","../src/1edtech/templates/classDiagramTemplate.js","../src/1edtech/templates/templateUtils.js","../src/1edtech/translations/templateUtils.js","../src/1edtech/templates/classTemplate.js","../src/1edtech/translations/classTemplate.js","../src/1edtech/templates/dataModelTemplate.js","../src/1edtech/translations/dataModelTemplate.js","../src/1edtech/templates/enumerationTemplate.js","../src/1edtech/translations/enumerationTemplate.js","../src/1edtech/templates/interfaceTemplate.js","../src/1edtech/templates/jsonSchemaTemplate.js","../src/1edtech/templates/jsonSchemasTemplate.js","../src/1edtech/translations/jsonSchemasTemplate.js","../src/1edtech/templates/openApiSchemaTemplate.js","../src/1edtech/templates/operationTemplate.js","../src/1edtech/translations/operationTemplate.js","../src/1edtech/templates/serviceModelTemplate.js","../src/1edtech/translations/serviceModelTemplate.js","../src/1edtech/templates/stereoTypeTemplate.js","../src/1edtech/translations/stereoTypeTemplate.js","../src/1edtech/templates/embeddedSelectionTemplate.js","../src/1edtech/translations/embeddedSelectionTemplate.js","../src/styles/mps.css.js","../src/1edtech/mps.js","../src/1edtech/translations/mps.js","../src/1edtech/privacy.js","../src/1edtech/translations/privacy.js","../src/1edtech/templates/privacyImplicationsTemplate.js","../src/1edtech/templates/confidentialityLevelTemplate.js","../src/1edtech/post-markdown.js","../src/core/reindent.js","../src/1edtech/templates/headers.js","../src/1edtech/translations/headers.js","../src/1edtech/headers.js","../src/1edtech/id-headers.js","../src/1edtech/abstract.js","../src/1edtech/translations/abstract.js","../src/core/data-transform.js","../src/core/data-abbr.js","../src/1edtech/inlines.js","../src/core/inline-idl-parser.js","../src/core/biblio-db.js","../src/core/biblio.js","../src/core/render-biblio.js","../src/core/inlines.js","../src/1edtech/conformance.js","../src/1edtech/translations/conformance.js","../src/core/dfn-validators.js","../src/core/dfn-map.js","../src/core/dfn.js","../src/core/pluralize.js","../src/styles/examples.css.js","../src/core/examples.js","../src/styles/issues-notes.css.js","../src/core/issues-notes.js","../src/1edtech/issues-notes.js","../src/core/best-practices.js","../src/core/figures.js","../src/1edtech/biblio.js","../src/core/data-cite.js","../src/core/link-to-dfn.js","../src/core/xref-db.js","../src/core/xref.js","../src/styles/dfn-index.css.js","../src/core/dfn-index.js","../src/1edtech/contrib.js","../src/1edtech/translations/contrib.js","../src/core/fix-headers.js","../src/core/structure.js","../src/core/informative.js","../src/core/id-headers.js","../src/styles/caniuse.css.js","../src/core/caniuse.js","../src/styles/mdn-annotation.css.js","../src/core/mdn-annotation.js","../src/1edtech/exporter.js","../src/ui/save-html.js","../src/ui/search-specref.js","../src/ui/search-xref.js","../src/ui/about-respec.js","../src/core/seo.js","../src/1edtech/seo.js","../src/styles/highlight.css.js","../src/core/text-loader.js","../src/core/worker.js","../src/core/highlight.js","../src/core/data-tests.js","../src/core/list-sorter.js","../src/styles/var.css.js","../src/core/highlight-vars.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/styles/datatype.css.js","../src/core/data-type.js","../src/styles/algorithms.css.js","../src/core/algorithms.js","../src/1edtech/anchor-expander.js","../src/core/custom-elements/rs-changelog.js","../src/core/custom-elements/index.js","../src/1edtech/cleanBody.js","../src/1edtech/title-attrs.js","../src/1edtech/scripts.js","../src/1edtech/comments.js","../src/1edtech/focus-code.js","../src/1edtech/templates/footers.js","../src/1edtech/translations/footers.js","../src/1edtech/footers.js","../src/core/linter-rules/check-charset.js","../src/core/linter-rules/check-punctuation.js","../src/core/linter-rules/check-internal-slots.js","../src/core/linter-rules/local-refs-exist.js","../src/core/linter-rules/no-headingless-sections.js","../src/core/linter-rules/no-unused-vars.js","../src/core/linter-rules/privsec-section.js","../src/core/linter-rules/wpt-tests-exist.js","../src/core/linter-rules/no-http-props.js","../src/core/linter-rules/a11y.js"],"sourcesContent":["// @ts-check\nconst inAmd = !!window.require;\nif (!inAmd) {\n  /**\n   * @type {any}\n   * @param {string[]} deps\n   * @param {(...modules: any[]) => void} callback\n   */\n  const require = function (deps, callback) {\n    const modules = deps.map(dep => {\n      if (!(dep in window.require.modules)) {\n        throw new Error(`Unsupported dependency name: ${dep}`);\n      }\n      return window.require.modules[dep];\n    });\n    Promise.all(modules).then(results => callback(...results));\n  };\n  require.modules = {};\n  window.require = require;\n}\n\n/**\n * @param {string} name\n * @param {object | Promise<object>} object\n */\nexport function expose(name, object) {\n  if (!inAmd) {\n    window.require.modules[name] = object;\n  }\n}\n","// @ts-check\n/**\n * Module core/pubsubhub\n *\n * Returns a singleton that can be used for message broadcasting\n * and message receiving. Replaces legacy \"msg\" code in ReSpec.\n */\nexport const name = \"core/pubsubhub\";\n\nimport { expose } from \"./expose-modules.js\";\n\nconst subscriptions = new EventTarget();\n\n/**\n *\n * @param {EventTopic} topic\n * @param  {any} detail\n */\nexport function pub(topic, detail) {\n  subscriptions.dispatchEvent(new CustomEvent(topic, { detail }));\n  if (window.parent === window.self) {\n    return;\n  }\n  // If this is an iframe, postMessage parent (used in testing).\n  const args = String(JSON.stringify(detail?.stack || detail));\n  window.parent.postMessage({ topic, args }, window.parent.location.origin);\n}\n\n/**\n * Subscribes to a message type.\n * @param  {EventTopic} topic The topic to subscribe to\n * @param  {Function} cb         Callback function\n * @param  {Object} [options]\n * @param  {Boolean} [options.once] Add prop \"once\" for single notification.\n * @return {Object}              An object that should be considered opaque,\n *                               used for unsubscribing from messages.\n */\nexport function sub(topic, cb, options = { once: false }) {\n  const listener = e => cb(e.detail);\n  subscriptions.addEventListener(topic, listener, options);\n}\n\nexpose(name, { sub });\n","// @ts-check\n// Module core/include-config\n// Inject's the document's configuration into the head as JSON.\nimport { sub } from \"./pubsubhub.js\";\nexport const name = \"core/include-config\";\n\nconst removeList = [\"githubToken\", \"githubUser\"];\n\nexport function run(config) {\n  const userConfig = {};\n  const amendConfig = newValues => Object.assign(userConfig, newValues);\n\n  amendConfig(config);\n  sub(\"amend-user-config\", amendConfig);\n\n  sub(\"end-all\", () => {\n    const script = document.createElement(\"script\");\n    script.id = \"initialUserConfig\";\n    script.type = \"application/json\";\n    for (const prop of removeList) {\n      if (prop in userConfig) delete userConfig[prop];\n    }\n    script.innerHTML = JSON.stringify(userConfig, null, 2);\n    document.head.appendChild(script);\n  });\n}\n","// @ts-check\n/**\n * Module core/l10n\n *\n * Looks at the lang attribute on the root element and uses it\n * to manage the config.l10n object so that other parts of the system can\n * localize their text.\n */\n\nexport const name = \"core/l10n\";\n\nconst html = document.documentElement;\n// Explicitly default lang and dir on <html> if not set.\n// We assume English and ltr as default for international standards.\nif (!html?.hasAttribute(\"lang\")) {\n  html.lang = \"en\";\n  if (!html.hasAttribute(\"dir\")) {\n    html.dir = \"ltr\";\n  }\n}\n\nexport const l10n = {};\n\nexport const lang = html?.lang ?? \"en\";\n\nexport function run(config) {\n  config.l10n = l10n[lang] || l10n.en;\n}\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n    return (idbProxyableTypes ||\n        (idbProxyableTypes = [\n            IDBDatabase,\n            IDBObjectStore,\n            IDBIndex,\n            IDBCursor,\n            IDBTransaction,\n        ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n    return (cursorAdvanceMethods ||\n        (cursorAdvanceMethods = [\n            IDBCursor.prototype.advance,\n            IDBCursor.prototype.continue,\n            IDBCursor.prototype.continuePrimaryKey,\n        ]));\n}\nconst transactionDoneMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n    const promise = new Promise((resolve, reject) => {\n        const unlisten = () => {\n            request.removeEventListener('success', success);\n            request.removeEventListener('error', error);\n        };\n        const success = () => {\n            resolve(wrap(request.result));\n            unlisten();\n        };\n        const error = () => {\n            reject(request.error);\n            unlisten();\n        };\n        request.addEventListener('success', success);\n        request.addEventListener('error', error);\n    });\n    // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n    // is because we create many promises from a single IDBRequest.\n    reverseTransformCache.set(promise, request);\n    return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n    // Early bail if we've already created a done promise for this transaction.\n    if (transactionDoneMap.has(tx))\n        return;\n    const done = new Promise((resolve, reject) => {\n        const unlisten = () => {\n            tx.removeEventListener('complete', complete);\n            tx.removeEventListener('error', error);\n            tx.removeEventListener('abort', error);\n        };\n        const complete = () => {\n            resolve();\n            unlisten();\n        };\n        const error = () => {\n            reject(tx.error || new DOMException('AbortError', 'AbortError'));\n            unlisten();\n        };\n        tx.addEventListener('complete', complete);\n        tx.addEventListener('error', error);\n        tx.addEventListener('abort', error);\n    });\n    // Cache it for later retrieval.\n    transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n    get(target, prop, receiver) {\n        if (target instanceof IDBTransaction) {\n            // Special handling for transaction.done.\n            if (prop === 'done')\n                return transactionDoneMap.get(target);\n            // Make tx.store return the only store in the transaction, or undefined if there are many.\n            if (prop === 'store') {\n                return receiver.objectStoreNames[1]\n                    ? undefined\n                    : receiver.objectStore(receiver.objectStoreNames[0]);\n            }\n        }\n        // Else transform whatever we get back.\n        return wrap(target[prop]);\n    },\n    set(target, prop, value) {\n        target[prop] = value;\n        return true;\n    },\n    has(target, prop) {\n        if (target instanceof IDBTransaction &&\n            (prop === 'done' || prop === 'store')) {\n            return true;\n        }\n        return prop in target;\n    },\n};\nfunction replaceTraps(callback) {\n    idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n    // Due to expected object equality (which is enforced by the caching in `wrap`), we\n    // only create one new func per func.\n    // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n    // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n    // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n    // with real promises, so each advance methods returns a new promise for the cursor object, or\n    // undefined if the end of the cursor has been reached.\n    if (getCursorAdvanceMethods().includes(func)) {\n        return function (...args) {\n            // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n            // the original object.\n            func.apply(unwrap(this), args);\n            return wrap(this.request);\n        };\n    }\n    return function (...args) {\n        // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n        // the original object.\n        return wrap(func.apply(unwrap(this), args));\n    };\n}\nfunction transformCachableValue(value) {\n    if (typeof value === 'function')\n        return wrapFunction(value);\n    // This doesn't return, it just creates a 'done' promise for the transaction,\n    // which is later returned for transaction.done (see idbObjectHandler).\n    if (value instanceof IDBTransaction)\n        cacheDonePromiseForTransaction(value);\n    if (instanceOfAny(value, getIdbProxyableTypes()))\n        return new Proxy(value, idbProxyTraps);\n    // Return the same value back if we're not going to transform it.\n    return value;\n}\nfunction wrap(value) {\n    // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n    // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n    if (value instanceof IDBRequest)\n        return promisifyRequest(value);\n    // If we've already transformed this value before, reuse the transformed value.\n    // This is faster, but it also provides object equality.\n    if (transformCache.has(value))\n        return transformCache.get(value);\n    const newValue = transformCachableValue(value);\n    // Not all types are transformed.\n    // These may be primitive types, so they can't be WeakMap keys.\n    if (newValue !== value) {\n        transformCache.set(value, newValue);\n        reverseTransformCache.set(newValue, value);\n    }\n    return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n    const request = indexedDB.open(name, version);\n    const openPromise = wrap(request);\n    if (upgrade) {\n        request.addEventListener('upgradeneeded', (event) => {\n            upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n        });\n    }\n    if (blocked) {\n        request.addEventListener('blocked', (event) => blocked(\n        // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n        event.oldVersion, event.newVersion, event));\n    }\n    openPromise\n        .then((db) => {\n        if (terminated)\n            db.addEventListener('close', () => terminated());\n        if (blocking) {\n            db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n        }\n    })\n        .catch(() => { });\n    return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n    const request = indexedDB.deleteDatabase(name);\n    if (blocked) {\n        request.addEventListener('blocked', (event) => blocked(\n        // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n        event.oldVersion, event));\n    }\n    return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n    if (!(target instanceof IDBDatabase &&\n        !(prop in target) &&\n        typeof prop === 'string')) {\n        return;\n    }\n    if (cachedMethods.get(prop))\n        return cachedMethods.get(prop);\n    const targetFuncName = prop.replace(/FromIndex$/, '');\n    const useIndex = prop !== targetFuncName;\n    const isWrite = writeMethods.includes(targetFuncName);\n    if (\n    // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n    !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n        !(isWrite || readMethods.includes(targetFuncName))) {\n        return;\n    }\n    const method = async function (storeName, ...args) {\n        // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n        const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n        let target = tx.store;\n        if (useIndex)\n            target = target.index(args.shift());\n        // Must reject if op rejects.\n        // If it's a write operation, must reject if tx.done rejects.\n        // Must reject with op rejection first.\n        // Must resolve with op value.\n        // Must handle both promises (no unhandled rejections)\n        return (await Promise.all([\n            target[targetFuncName](...args),\n            isWrite && tx.done,\n        ]))[0];\n    };\n    cachedMethods.set(prop, method);\n    return method;\n}\nreplaceTraps((oldTraps) => ({\n    ...oldTraps,\n    get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n    has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nconst advanceMethodProps = ['continue', 'continuePrimaryKey', 'advance'];\nconst methodMap = {};\nconst advanceResults = new WeakMap();\nconst ittrProxiedCursorToOriginalProxy = new WeakMap();\nconst cursorIteratorTraps = {\n    get(target, prop) {\n        if (!advanceMethodProps.includes(prop))\n            return target[prop];\n        let cachedFunc = methodMap[prop];\n        if (!cachedFunc) {\n            cachedFunc = methodMap[prop] = function (...args) {\n                advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));\n            };\n        }\n        return cachedFunc;\n    },\n};\nasync function* iterate(...args) {\n    // tslint:disable-next-line:no-this-assignment\n    let cursor = this;\n    if (!(cursor instanceof IDBCursor)) {\n        cursor = await cursor.openCursor(...args);\n    }\n    if (!cursor)\n        return;\n    cursor = cursor;\n    const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);\n    ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);\n    // Map this double-proxy back to the original, so other cursor methods work.\n    reverseTransformCache.set(proxiedCursor, unwrap(cursor));\n    while (cursor) {\n        yield proxiedCursor;\n        // If one of the advancing methods was not called, call continue().\n        cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());\n        advanceResults.delete(proxiedCursor);\n    }\n}\nfunction isIteratorProp(target, prop) {\n    return ((prop === Symbol.asyncIterator &&\n        instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor])) ||\n        (prop === 'iterate' && instanceOfAny(target, [IDBIndex, IDBObjectStore])));\n}\nreplaceTraps((oldTraps) => ({\n    ...oldTraps,\n    get(target, prop, receiver) {\n        if (isIteratorProp(target, prop))\n            return iterate;\n        return oldTraps.get(target, prop, receiver);\n    },\n    has(target, prop) {\n        return isIteratorProp(target, prop) || oldTraps.has(target, prop);\n    },\n}));\n\nexport { deleteDB, openDB, unwrap, wrap };\n","/**\n * Implementation of MIMEType and MIME Type parser from\n * https://mimesniff.spec.whatwg.org/\n */\n\nconst HTTPTokenCodePoints = /^[!#$%&'*+-.^`|~\\w]+$/;\n\n// \"HTTP whitespace is U+000A LF, U+000D CR, U+0009 TAB or U+0020 SPACE.\"\n// eslint-disable-next-line no-control-regex\nconst HTTPWhiteSpace = /[\\u000A\\u000D\\u0009\\u0020]/u;\n\n// An HTTP quoted-string token code point is\n// U+0009 TAB,\n// a code point in the range U+0020 SPACE to U+007E (~), inclusive,\n// or a code point in the range U+0080 through U+00FF (ÿ), inclusive.\n// eslint-disable-next-line no-control-regex\nconst HTTPQuotedString = /^[\\u0009\\u{0020}-\\{u0073}\\u{0080}-\\u{00FF}]+$/u;\n\nexport class MIMEType {\n  constructor(input) {\n    const { type, subtype, params } = parseMimeType(input);\n    this.type = type.trim().toLowerCase();\n    this.subtype = subtype.trimEnd().toLowerCase();\n    this.parameters = new Map(Object.entries(params));\n  }\n\n  /**\n   * @see https://mimesniff.spec.whatwg.org/#mime-type-essence\n   */\n  get essence() {\n    return `${this.type}/${this.subtype}`;\n  }\n\n  toString() {\n    return serialize(this);\n  }\n};\n\nexport function isValidMimeType(text){\n  try {\n    parse(text);\n  } catch (e) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * https://mimesniff.spec.whatwg.org/#serialize-a-mime-type\n */\nfunction serialize(mimeType) {\n  const { parameters, essence } = mimeType;\n  if (!parameters.size) {\n    return essence;\n  }\n  let paramStr = \";\";\n  for (const [key, value] of parameters.entries()) {\n    paramStr += key;\n    if (value !== null) {\n      if (HTTPTokenCodePoints.test(value)) {\n        paramStr += `=${value}`;\n      } else {\n        paramStr += `=\"${value}\"`;\n      }\n    } else {\n      // null or empty string\n      paramStr += '=\"\"';\n    }\n    paramStr += \";\";\n  }\n  // remove final \";\"\n  return mimeType.essence + paramStr.slice(0, -1);\n}\n\n/**\n * Implementation of https://mimesniff.spec.whatwg.org/#parse-a-mime-type\n * parser state machines if as follows, params and param values are optional and can be null:\n *\n * \"type\"\n *    -> \"subtype\"\n *      -> \"param-start\" (ignores white space)\n *         -> \"param-name\"\n *            -> \"param-value\"\n *              -> \"collect-quoted-string\"\n *                -> \"ignore-input-until-next-param\"\n *\n *\n *\n * @param {String} input\n */\nexport function parseMimeType(input) {\n  input = input.trim();\n  if (!input) {\n    throw new TypeError(\"Invalid input.\");\n  }\n\n  let type = \"\";\n  let subtype = \"\";\n  let paramName = \"\";\n  let paramValue = null;\n  let params = new Map();\n  let parserMode = \"type\";\n  let inputArray = Array.from(input); // retain unicode chars\n  for (let position = 0; position < inputArray.length; position++) {\n    const char = inputArray[position];\n    switch (parserMode) {\n      case \"type\":\n        if (char === \"/\") {\n          parserMode = \"subtype\";\n          continue;\n        }\n        type += char;\n        break;\n      case \"subtype\":\n        if (char === \";\") {\n          parserMode = \"param-start\";\n          continue;\n        }\n        subtype += char;\n        break;\n      case \"param-start\":\n        // Skip HTTP white space\n        if (HTTPWhiteSpace.test(char) || char === \";\") {\n          continue;\n        }\n        paramName += char;\n        parserMode = \"param-name\";\n        break;\n      case \"param-name\":\n        if (char === \"=\" || char === \";\") {\n          if (char === \"=\") {\n            parserMode = \"param-value\";\n            paramValue = null;\n            continue;\n          }\n          params.set(paramName.toLowerCase(), null);\n          paramName = \"\";\n          continue;\n        }\n        paramName += char;\n        break;\n      case \"param-value\":\n        if (char == '\"') {\n          parserMode = \"collect-quoted-string\";\n          continue;\n        }\n        if (char === \";\") {\n          paramValue = paramValue.trimEnd();\n          parserMode = \"param-start\";\n          storeParam(params, paramName, paramValue);\n          paramName = \"\";\n          continue;\n        }\n        paramValue = typeof paramValue === \"string\" ? paramValue + char : char;\n        break;\n      case \"collect-quoted-string\":\n        if (char === '\"') {\n          storeParam(params, paramName, paramValue);\n          parserMode = \"ignore-input-until-next-param\";\n          paramName = \"\";\n          paramValue = null;\n          continue;\n        }\n        if (char === \"\\\\\") {\n          continue;\n        }\n        paramValue = typeof paramValue === \"string\" ? paramValue + char : char;\n        break;\n      case \"ignore-input-until-next-param\":\n        if (char !== \";\") {\n          continue;\n        }\n        parserMode = \"param-start\";\n        break;\n      default:\n        throw new Error(\n          `State machine error - unknown parser mode: ${parserMode} `\n        );\n    }\n  }\n  if (paramName) {\n    storeParam(params, paramName, paramValue);\n  }\n  if (type.trim() === \"\" || !HTTPTokenCodePoints.test(type)) {\n    throw new TypeError(\"Invalid type\");\n  }\n  if (subtype.trim() === \"\" || !HTTPTokenCodePoints.test(subtype)) {\n    throw new TypeError(\"Invalid subtype\");\n  }\n  return {\n    type,\n    subtype,\n    params: Object.fromEntries(params.entries()),\n  };\n}\n\nfunction storeParam(params, paramName, paramValue) {\n  if (\n    (paramName &&\n      paramName !== \"\" &&\n      !params.has(paramName) &&\n      HTTPQuotedString.test(paramValue)) ||\n    paramValue === null\n  ) {\n    params.set(paramName.toLowerCase(), paramValue);\n  }\n}\n","/**\n * marked v12.0.2 - a markdown parser\n * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\n/**\n * Gets the original marked default options.\n */\nfunction _getDefaults() {\n    return {\n        async: false,\n        breaks: false,\n        extensions: null,\n        gfm: true,\n        hooks: null,\n        pedantic: false,\n        renderer: null,\n        silent: false,\n        tokenizer: null,\n        walkTokens: null\n    };\n}\nlet _defaults = _getDefaults();\nfunction changeDefaults(newDefaults) {\n    _defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n};\nconst getEscapeReplacement = (ch) => escapeReplacements[ch];\nfunction escape$1(html, encode) {\n    if (encode) {\n        if (escapeTest.test(html)) {\n            return html.replace(escapeReplace, getEscapeReplacement);\n        }\n    }\n    else {\n        if (escapeTestNoEncode.test(html)) {\n            return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n        }\n    }\n    return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\nfunction unescape(html) {\n    // explicitly match decimal, hex, and named HTML entities\n    return html.replace(unescapeTest, (_, n) => {\n        n = n.toLowerCase();\n        if (n === 'colon')\n            return ':';\n        if (n.charAt(0) === '#') {\n            return n.charAt(1) === 'x'\n                ? String.fromCharCode(parseInt(n.substring(2), 16))\n                : String.fromCharCode(+n.substring(1));\n        }\n        return '';\n    });\n}\nconst caret = /(^|[^\\[])\\^/g;\nfunction edit(regex, opt) {\n    let source = typeof regex === 'string' ? regex : regex.source;\n    opt = opt || '';\n    const obj = {\n        replace: (name, val) => {\n            let valSource = typeof val === 'string' ? val : val.source;\n            valSource = valSource.replace(caret, '$1');\n            source = source.replace(name, valSource);\n            return obj;\n        },\n        getRegex: () => {\n            return new RegExp(source, opt);\n        }\n    };\n    return obj;\n}\nfunction cleanUrl(href) {\n    try {\n        href = encodeURI(href).replace(/%25/g, '%');\n    }\n    catch (e) {\n        return null;\n    }\n    return href;\n}\nconst noopTest = { exec: () => null };\nfunction splitCells(tableRow, count) {\n    // ensure that every cell-delimiting pipe has a space\n    // before it to distinguish it from an escaped pipe\n    const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n        let escaped = false;\n        let curr = offset;\n        while (--curr >= 0 && str[curr] === '\\\\')\n            escaped = !escaped;\n        if (escaped) {\n            // odd number of slashes means | is escaped\n            // so we leave it alone\n            return '|';\n        }\n        else {\n            // add space before unescaped |\n            return ' |';\n        }\n    }), cells = row.split(/ \\|/);\n    let i = 0;\n    // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n    if (!cells[0].trim()) {\n        cells.shift();\n    }\n    if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n        cells.pop();\n    }\n    if (count) {\n        if (cells.length > count) {\n            cells.splice(count);\n        }\n        else {\n            while (cells.length < count)\n                cells.push('');\n        }\n    }\n    for (; i < cells.length; i++) {\n        // leading or trailing whitespace is ignored per the gfm spec\n        cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n    }\n    return cells;\n}\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param str\n * @param c\n * @param invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n    const l = str.length;\n    if (l === 0) {\n        return '';\n    }\n    // Length of suffix matching the invert condition.\n    let suffLen = 0;\n    // Step left until we fail to match the invert condition.\n    while (suffLen < l) {\n        const currChar = str.charAt(l - suffLen - 1);\n        if (currChar === c && !invert) {\n            suffLen++;\n        }\n        else if (currChar !== c && invert) {\n            suffLen++;\n        }\n        else {\n            break;\n        }\n    }\n    return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n    if (str.indexOf(b[1]) === -1) {\n        return -1;\n    }\n    let level = 0;\n    for (let i = 0; i < str.length; i++) {\n        if (str[i] === '\\\\') {\n            i++;\n        }\n        else if (str[i] === b[0]) {\n            level++;\n        }\n        else if (str[i] === b[1]) {\n            level--;\n            if (level < 0) {\n                return i;\n            }\n        }\n    }\n    return -1;\n}\n\nfunction outputLink(cap, link, raw, lexer) {\n    const href = link.href;\n    const title = link.title ? escape$1(link.title) : null;\n    const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n    if (cap[0].charAt(0) !== '!') {\n        lexer.state.inLink = true;\n        const token = {\n            type: 'link',\n            raw,\n            href,\n            title,\n            text,\n            tokens: lexer.inlineTokens(text)\n        };\n        lexer.state.inLink = false;\n        return token;\n    }\n    return {\n        type: 'image',\n        raw,\n        href,\n        title,\n        text: escape$1(text)\n    };\n}\nfunction indentCodeCompensation(raw, text) {\n    const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n    if (matchIndentToCode === null) {\n        return text;\n    }\n    const indentToCode = matchIndentToCode[1];\n    return text\n        .split('\\n')\n        .map(node => {\n        const matchIndentInNode = node.match(/^\\s+/);\n        if (matchIndentInNode === null) {\n            return node;\n        }\n        const [indentInNode] = matchIndentInNode;\n        if (indentInNode.length >= indentToCode.length) {\n            return node.slice(indentToCode.length);\n        }\n        return node;\n    })\n        .join('\\n');\n}\n/**\n * Tokenizer\n */\nclass _Tokenizer {\n    options;\n    rules; // set by the lexer\n    lexer; // set by the lexer\n    constructor(options) {\n        this.options = options || _defaults;\n    }\n    space(src) {\n        const cap = this.rules.block.newline.exec(src);\n        if (cap && cap[0].length > 0) {\n            return {\n                type: 'space',\n                raw: cap[0]\n            };\n        }\n    }\n    code(src) {\n        const cap = this.rules.block.code.exec(src);\n        if (cap) {\n            const text = cap[0].replace(/^ {1,4}/gm, '');\n            return {\n                type: 'code',\n                raw: cap[0],\n                codeBlockStyle: 'indented',\n                text: !this.options.pedantic\n                    ? rtrim(text, '\\n')\n                    : text\n            };\n        }\n    }\n    fences(src) {\n        const cap = this.rules.block.fences.exec(src);\n        if (cap) {\n            const raw = cap[0];\n            const text = indentCodeCompensation(raw, cap[3] || '');\n            return {\n                type: 'code',\n                raw,\n                lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, '$1') : cap[2],\n                text\n            };\n        }\n    }\n    heading(src) {\n        const cap = this.rules.block.heading.exec(src);\n        if (cap) {\n            let text = cap[2].trim();\n            // remove trailing #s\n            if (/#$/.test(text)) {\n                const trimmed = rtrim(text, '#');\n                if (this.options.pedantic) {\n                    text = trimmed.trim();\n                }\n                else if (!trimmed || / $/.test(trimmed)) {\n                    // CommonMark requires space before trailing #s\n                    text = trimmed.trim();\n                }\n            }\n            return {\n                type: 'heading',\n                raw: cap[0],\n                depth: cap[1].length,\n                text,\n                tokens: this.lexer.inline(text)\n            };\n        }\n    }\n    hr(src) {\n        const cap = this.rules.block.hr.exec(src);\n        if (cap) {\n            return {\n                type: 'hr',\n                raw: cap[0]\n            };\n        }\n    }\n    blockquote(src) {\n        const cap = this.rules.block.blockquote.exec(src);\n        if (cap) {\n            // precede setext continuation with 4 spaces so it isn't a setext\n            let text = cap[0].replace(/\\n {0,3}((?:=+|-+) *)(?=\\n|$)/g, '\\n    $1');\n            text = rtrim(text.replace(/^ *>[ \\t]?/gm, ''), '\\n');\n            const top = this.lexer.state.top;\n            this.lexer.state.top = true;\n            const tokens = this.lexer.blockTokens(text);\n            this.lexer.state.top = top;\n            return {\n                type: 'blockquote',\n                raw: cap[0],\n                tokens,\n                text\n            };\n        }\n    }\n    list(src) {\n        let cap = this.rules.block.list.exec(src);\n        if (cap) {\n            let bull = cap[1].trim();\n            const isordered = bull.length > 1;\n            const list = {\n                type: 'list',\n                raw: '',\n                ordered: isordered,\n                start: isordered ? +bull.slice(0, -1) : '',\n                loose: false,\n                items: []\n            };\n            bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n            if (this.options.pedantic) {\n                bull = isordered ? bull : '[*+-]';\n            }\n            // Get next list item\n            const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n            let raw = '';\n            let itemContents = '';\n            let endsWithBlankLine = false;\n            // Check if current bullet point can start a new List Item\n            while (src) {\n                let endEarly = false;\n                if (!(cap = itemRegex.exec(src))) {\n                    break;\n                }\n                if (this.rules.block.hr.test(src)) { // End list if bullet was actually HR (possibly move into itemRegex?)\n                    break;\n                }\n                raw = cap[0];\n                src = src.substring(raw.length);\n                let line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, (t) => ' '.repeat(3 * t.length));\n                let nextLine = src.split('\\n', 1)[0];\n                let indent = 0;\n                if (this.options.pedantic) {\n                    indent = 2;\n                    itemContents = line.trimStart();\n                }\n                else {\n                    indent = cap[2].search(/[^ ]/); // Find first non-space char\n                    indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n                    itemContents = line.slice(indent);\n                    indent += cap[1].length;\n                }\n                let blankLine = false;\n                if (!line && /^ *$/.test(nextLine)) { // Items begin with at most one blank line\n                    raw += nextLine + '\\n';\n                    src = src.substring(nextLine.length + 1);\n                    endEarly = true;\n                }\n                if (!endEarly) {\n                    const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n                    const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n                    const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n                    const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n                    // Check if following lines should be included in List Item\n                    while (src) {\n                        const rawLine = src.split('\\n', 1)[0];\n                        nextLine = rawLine;\n                        // Re-align to follow commonmark nesting rules\n                        if (this.options.pedantic) {\n                            nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, '  ');\n                        }\n                        // End list item if found code fences\n                        if (fencesBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of new heading\n                        if (headingBeginRegex.test(nextLine)) {\n                            break;\n                        }\n                        // End list item if found start of new bullet\n                        if (nextBulletRegex.test(nextLine)) {\n                            break;\n                        }\n                        // Horizontal rule found\n                        if (hrRegex.test(src)) {\n                            break;\n                        }\n                        if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) { // Dedent if possible\n                            itemContents += '\\n' + nextLine.slice(indent);\n                        }\n                        else {\n                            // not enough indentation\n                            if (blankLine) {\n                                break;\n                            }\n                            // paragraph continuation unless last line was a different block level element\n                            if (line.search(/[^ ]/) >= 4) { // indented code block\n                                break;\n                            }\n                            if (fencesBeginRegex.test(line)) {\n                                break;\n                            }\n                            if (headingBeginRegex.test(line)) {\n                                break;\n                            }\n                            if (hrRegex.test(line)) {\n                                break;\n                            }\n                            itemContents += '\\n' + nextLine;\n                        }\n                        if (!blankLine && !nextLine.trim()) { // Check if current line is blank\n                            blankLine = true;\n                        }\n                        raw += rawLine + '\\n';\n                        src = src.substring(rawLine.length + 1);\n                        line = nextLine.slice(indent);\n                    }\n                }\n                if (!list.loose) {\n                    // If the previous item ended with a blank line, the list is loose\n                    if (endsWithBlankLine) {\n                        list.loose = true;\n                    }\n                    else if (/\\n *\\n *$/.test(raw)) {\n                        endsWithBlankLine = true;\n                    }\n                }\n                let istask = null;\n                let ischecked;\n                // Check for task list items\n                if (this.options.gfm) {\n                    istask = /^\\[[ xX]\\] /.exec(itemContents);\n                    if (istask) {\n                        ischecked = istask[0] !== '[ ] ';\n                        itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n                    }\n                }\n                list.items.push({\n                    type: 'list_item',\n                    raw,\n                    task: !!istask,\n                    checked: ischecked,\n                    loose: false,\n                    text: itemContents,\n                    tokens: []\n                });\n                list.raw += raw;\n            }\n            // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n            list.items[list.items.length - 1].raw = raw.trimEnd();\n            (list.items[list.items.length - 1]).text = itemContents.trimEnd();\n            list.raw = list.raw.trimEnd();\n            // Item child tokens handled here at end because we needed to have the final item to trim it first\n            for (let i = 0; i < list.items.length; i++) {\n                this.lexer.state.top = false;\n                list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n                if (!list.loose) {\n                    // Check if list should be loose\n                    const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n                    const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n                    list.loose = hasMultipleLineBreaks;\n                }\n            }\n            // Set all items to loose if list is loose\n            if (list.loose) {\n                for (let i = 0; i < list.items.length; i++) {\n                    list.items[i].loose = true;\n                }\n            }\n            return list;\n        }\n    }\n    html(src) {\n        const cap = this.rules.block.html.exec(src);\n        if (cap) {\n            const token = {\n                type: 'html',\n                block: true,\n                raw: cap[0],\n                pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\n                text: cap[0]\n            };\n            return token;\n        }\n    }\n    def(src) {\n        const cap = this.rules.block.def.exec(src);\n        if (cap) {\n            const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n            const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline.anyPunctuation, '$1') : '';\n            const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, '$1') : cap[3];\n            return {\n                type: 'def',\n                tag,\n                raw: cap[0],\n                href,\n                title\n            };\n        }\n    }\n    table(src) {\n        const cap = this.rules.block.table.exec(src);\n        if (!cap) {\n            return;\n        }\n        if (!/[:|]/.test(cap[2])) {\n            // delimiter row must have a pipe (|) or colon (:) otherwise it is a setext heading\n            return;\n        }\n        const headers = splitCells(cap[1]);\n        const aligns = cap[2].replace(/^\\||\\| *$/g, '').split('|');\n        const rows = cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : [];\n        const item = {\n            type: 'table',\n            raw: cap[0],\n            header: [],\n            align: [],\n            rows: []\n        };\n        if (headers.length !== aligns.length) {\n            // header and align columns must be equal, rows can be different.\n            return;\n        }\n        for (const align of aligns) {\n            if (/^ *-+: *$/.test(align)) {\n                item.align.push('right');\n            }\n            else if (/^ *:-+: *$/.test(align)) {\n                item.align.push('center');\n            }\n            else if (/^ *:-+ *$/.test(align)) {\n                item.align.push('left');\n            }\n            else {\n                item.align.push(null);\n            }\n        }\n        for (const header of headers) {\n            item.header.push({\n                text: header,\n                tokens: this.lexer.inline(header)\n            });\n        }\n        for (const row of rows) {\n            item.rows.push(splitCells(row, item.header.length).map(cell => {\n                return {\n                    text: cell,\n                    tokens: this.lexer.inline(cell)\n                };\n            }));\n        }\n        return item;\n    }\n    lheading(src) {\n        const cap = this.rules.block.lheading.exec(src);\n        if (cap) {\n            return {\n                type: 'heading',\n                raw: cap[0],\n                depth: cap[2].charAt(0) === '=' ? 1 : 2,\n                text: cap[1],\n                tokens: this.lexer.inline(cap[1])\n            };\n        }\n    }\n    paragraph(src) {\n        const cap = this.rules.block.paragraph.exec(src);\n        if (cap) {\n            const text = cap[1].charAt(cap[1].length - 1) === '\\n'\n                ? cap[1].slice(0, -1)\n                : cap[1];\n            return {\n                type: 'paragraph',\n                raw: cap[0],\n                text,\n                tokens: this.lexer.inline(text)\n            };\n        }\n    }\n    text(src) {\n        const cap = this.rules.block.text.exec(src);\n        if (cap) {\n            return {\n                type: 'text',\n                raw: cap[0],\n                text: cap[0],\n                tokens: this.lexer.inline(cap[0])\n            };\n        }\n    }\n    escape(src) {\n        const cap = this.rules.inline.escape.exec(src);\n        if (cap) {\n            return {\n                type: 'escape',\n                raw: cap[0],\n                text: escape$1(cap[1])\n            };\n        }\n    }\n    tag(src) {\n        const cap = this.rules.inline.tag.exec(src);\n        if (cap) {\n            if (!this.lexer.state.inLink && /^<a /i.test(cap[0])) {\n                this.lexer.state.inLink = true;\n            }\n            else if (this.lexer.state.inLink && /^<\\/a>/i.test(cap[0])) {\n                this.lexer.state.inLink = false;\n            }\n            if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n                this.lexer.state.inRawBlock = true;\n            }\n            else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n                this.lexer.state.inRawBlock = false;\n            }\n            return {\n                type: 'html',\n                raw: cap[0],\n                inLink: this.lexer.state.inLink,\n                inRawBlock: this.lexer.state.inRawBlock,\n                block: false,\n                text: cap[0]\n            };\n        }\n    }\n    link(src) {\n        const cap = this.rules.inline.link.exec(src);\n        if (cap) {\n            const trimmedUrl = cap[2].trim();\n            if (!this.options.pedantic && /^</.test(trimmedUrl)) {\n                // commonmark requires matching angle brackets\n                if (!(/>$/.test(trimmedUrl))) {\n                    return;\n                }\n                // ending angle bracket cannot be escaped\n                const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n                if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n                    return;\n                }\n            }\n            else {\n                // find closing parenthesis\n                const lastParenIndex = findClosingBracket(cap[2], '()');\n                if (lastParenIndex > -1) {\n                    const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n                    const linkLen = start + cap[1].length + lastParenIndex;\n                    cap[2] = cap[2].substring(0, lastParenIndex);\n                    cap[0] = cap[0].substring(0, linkLen).trim();\n                    cap[3] = '';\n                }\n            }\n            let href = cap[2];\n            let title = '';\n            if (this.options.pedantic) {\n                // split pedantic href and title\n                const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n                if (link) {\n                    href = link[1];\n                    title = link[3];\n                }\n            }\n            else {\n                title = cap[3] ? cap[3].slice(1, -1) : '';\n            }\n            href = href.trim();\n            if (/^</.test(href)) {\n                if (this.options.pedantic && !(/>$/.test(trimmedUrl))) {\n                    // pedantic allows starting angle bracket without ending angle bracket\n                    href = href.slice(1);\n                }\n                else {\n                    href = href.slice(1, -1);\n                }\n            }\n            return outputLink(cap, {\n                href: href ? href.replace(this.rules.inline.anyPunctuation, '$1') : href,\n                title: title ? title.replace(this.rules.inline.anyPunctuation, '$1') : title\n            }, cap[0], this.lexer);\n        }\n    }\n    reflink(src, links) {\n        let cap;\n        if ((cap = this.rules.inline.reflink.exec(src))\n            || (cap = this.rules.inline.nolink.exec(src))) {\n            const linkString = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n            const link = links[linkString.toLowerCase()];\n            if (!link) {\n                const text = cap[0].charAt(0);\n                return {\n                    type: 'text',\n                    raw: text,\n                    text\n                };\n            }\n            return outputLink(cap, link, cap[0], this.lexer);\n        }\n    }\n    emStrong(src, maskedSrc, prevChar = '') {\n        let match = this.rules.inline.emStrongLDelim.exec(src);\n        if (!match)\n            return;\n        // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n        if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u))\n            return;\n        const nextChar = match[1] || match[2] || '';\n        if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {\n            // unicode Regex counts emoji as 1 char; spread into array for proper count (used multiple times below)\n            const lLength = [...match[0]].length - 1;\n            let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;\n            const endReg = match[0][0] === '*' ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;\n            endReg.lastIndex = 0;\n            // Clip maskedSrc to same section of string as src (move to lexer?)\n            maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n            while ((match = endReg.exec(maskedSrc)) != null) {\n                rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n                if (!rDelim)\n                    continue; // skip single * in __abc*abc__\n                rLength = [...rDelim].length;\n                if (match[3] || match[4]) { // found another Left Delim\n                    delimTotal += rLength;\n                    continue;\n                }\n                else if (match[5] || match[6]) { // either Left or Right Delim\n                    if (lLength % 3 && !((lLength + rLength) % 3)) {\n                        midDelimTotal += rLength;\n                        continue; // CommonMark Emphasis Rules 9-10\n                    }\n                }\n                delimTotal -= rLength;\n                if (delimTotal > 0)\n                    continue; // Haven't found enough closing delimiters\n                // Remove extra characters. *a*** -> *a*\n                rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n                // char length can be >1 for unicode characters;\n                const lastCharLength = [...match[0]][0].length;\n                const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);\n                // Create `em` if smallest delimiter has odd char count. *a***\n                if (Math.min(lLength, rLength) % 2) {\n                    const text = raw.slice(1, -1);\n                    return {\n                        type: 'em',\n                        raw,\n                        text,\n                        tokens: this.lexer.inlineTokens(text)\n                    };\n                }\n                // Create 'strong' if smallest delimiter has even char count. **a***\n                const text = raw.slice(2, -2);\n                return {\n                    type: 'strong',\n                    raw,\n                    text,\n                    tokens: this.lexer.inlineTokens(text)\n                };\n            }\n        }\n    }\n    codespan(src) {\n        const cap = this.rules.inline.code.exec(src);\n        if (cap) {\n            let text = cap[2].replace(/\\n/g, ' ');\n            const hasNonSpaceChars = /[^ ]/.test(text);\n            const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n            if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n                text = text.substring(1, text.length - 1);\n            }\n            text = escape$1(text, true);\n            return {\n                type: 'codespan',\n                raw: cap[0],\n                text\n            };\n        }\n    }\n    br(src) {\n        const cap = this.rules.inline.br.exec(src);\n        if (cap) {\n            return {\n                type: 'br',\n                raw: cap[0]\n            };\n        }\n    }\n    del(src) {\n        const cap = this.rules.inline.del.exec(src);\n        if (cap) {\n            return {\n                type: 'del',\n                raw: cap[0],\n                text: cap[2],\n                tokens: this.lexer.inlineTokens(cap[2])\n            };\n        }\n    }\n    autolink(src) {\n        const cap = this.rules.inline.autolink.exec(src);\n        if (cap) {\n            let text, href;\n            if (cap[2] === '@') {\n                text = escape$1(cap[1]);\n                href = 'mailto:' + text;\n            }\n            else {\n                text = escape$1(cap[1]);\n                href = text;\n            }\n            return {\n                type: 'link',\n                raw: cap[0],\n                text,\n                href,\n                tokens: [\n                    {\n                        type: 'text',\n                        raw: text,\n                        text\n                    }\n                ]\n            };\n        }\n    }\n    url(src) {\n        let cap;\n        if (cap = this.rules.inline.url.exec(src)) {\n            let text, href;\n            if (cap[2] === '@') {\n                text = escape$1(cap[0]);\n                href = 'mailto:' + text;\n            }\n            else {\n                // do extended autolink path validation\n                let prevCapZero;\n                do {\n                    prevCapZero = cap[0];\n                    cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? '';\n                } while (prevCapZero !== cap[0]);\n                text = escape$1(cap[0]);\n                if (cap[1] === 'www.') {\n                    href = 'http://' + cap[0];\n                }\n                else {\n                    href = cap[0];\n                }\n            }\n            return {\n                type: 'link',\n                raw: cap[0],\n                text,\n                href,\n                tokens: [\n                    {\n                        type: 'text',\n                        raw: text,\n                        text\n                    }\n                ]\n            };\n        }\n    }\n    inlineText(src) {\n        const cap = this.rules.inline.text.exec(src);\n        if (cap) {\n            let text;\n            if (this.lexer.state.inRawBlock) {\n                text = cap[0];\n            }\n            else {\n                text = escape$1(cap[0]);\n            }\n            return {\n                type: 'text',\n                raw: cap[0],\n                text\n            };\n        }\n    }\n}\n\n/**\n * Block-Level Grammar\n */\nconst newline = /^(?: *(?:\\n|$))+/;\nconst blockCode = /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/;\nconst fences = /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/;\nconst hr = /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/;\nconst heading = /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/;\nconst bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nconst lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\\n(?!\\s*?\\n|bull |blockCode|fences|blockquote|heading|html))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/)\n    .replace(/bull/g, bullet) // lists can interrupt\n    .replace(/blockCode/g, / {4}/) // indented code blocks can interrupt\n    .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt\n    .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt\n    .replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt\n    .replace(/html/g, / {0,3}<[^\\n>]+>\\n/) // block html can interrupt\n    .getRegex();\nconst _paragraph = /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/;\nconst blockText = /^[^\\n]+/;\nconst _blockLabel = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nconst def = edit(/^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/)\n    .replace('label', _blockLabel)\n    .replace('title', /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/)\n    .getRegex();\nconst list = edit(/^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/)\n    .replace(/bull/g, bullet)\n    .getRegex();\nconst _tag = 'address|article|aside|base|basefont|blockquote|body|caption'\n    + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption'\n    + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe'\n    + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option'\n    + '|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title'\n    + '|tr|track|ul';\nconst _comment = /<!--(?:-?>|[\\s\\S]*?(?:-->|$))/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n    + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:</\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n    + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n    + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n    + '|<![A-Z][\\\\s\\\\S]*?(?:>\\\\n*|$)' // (4)\n    + '|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?(?:\\\\]\\\\]>\\\\n*|$)' // (5)\n    + '|</?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n    + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n    + '|</(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n    + ')', 'i')\n    .replace('comment', _comment)\n    .replace('tag', _tag)\n    .replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/)\n    .getRegex();\nconst paragraph = edit(_paragraph)\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n    .replace('|table', '')\n    .replace('blockquote', ' {0,3}>')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n    .getRegex();\nconst blockquote = edit(/^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/)\n    .replace('paragraph', paragraph)\n    .getRegex();\n/**\n * Normal Block Grammar\n */\nconst blockNormal = {\n    blockquote,\n    code: blockCode,\n    def,\n    fences,\n    heading,\n    hr,\n    html,\n    lheading,\n    list,\n    newline,\n    paragraph,\n    table: noopTest,\n    text: blockText\n};\n/**\n * GFM Block Grammar\n */\nconst gfmTable = edit('^ *([^\\\\n ].*)\\\\n' // Header\n    + ' {0,3}((?:\\\\| *)?:?-+:? *(?:\\\\| *:?-+:? *)*(?:\\\\| *)?)' // Align\n    + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)') // Cells\n    .replace('hr', hr)\n    .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n    .replace('blockquote', ' {0,3}>')\n    .replace('code', ' {4}[^\\\\n]')\n    .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n    .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n    .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n    .replace('tag', _tag) // tables can be interrupted by type (6) html blocks\n    .getRegex();\nconst blockGfm = {\n    ...blockNormal,\n    table: gfmTable,\n    paragraph: edit(_paragraph)\n        .replace('hr', hr)\n        .replace('heading', ' {0,3}#{1,6}(?:\\\\s|$)')\n        .replace('|lheading', '') // setext headings don't interrupt commonmark paragraphs\n        .replace('table', gfmTable) // interrupt paragraphs with table\n        .replace('blockquote', ' {0,3}>')\n        .replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n')\n        .replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n        .replace('html', '</?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)')\n        .replace('tag', _tag) // pars can be interrupted by type (6) html blocks\n        .getRegex()\n};\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\nconst blockPedantic = {\n    ...blockNormal,\n    html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)'\n        + '|<(tag)[\\\\s\\\\S]+?</\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n        + '|<tag(?:\"[^\"]*\"|\\'[^\\']*\\'|\\\\s[^\\'\"/>\\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))')\n        .replace('comment', _comment)\n        .replace(/tag/g, '(?!(?:'\n        + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub'\n        + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)'\n        + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b')\n        .getRegex(),\n    def: /^ *\\[([^\\]]+)\\]: *<?([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n    heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n    fences: noopTest, // fences not supported\n    lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n    paragraph: edit(_paragraph)\n        .replace('hr', hr)\n        .replace('heading', ' *#{1,6} *[^\\n]')\n        .replace('lheading', lheading)\n        .replace('|table', '')\n        .replace('blockquote', ' {0,3}>')\n        .replace('|fences', '')\n        .replace('|list', '')\n        .replace('|html', '')\n        .replace('|tag', '')\n        .getRegex()\n};\n/**\n * Inline-Level Grammar\n */\nconst escape = /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/;\nconst inlineCode = /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/;\nconst br = /^( {2,}|\\\\)\\n(?!\\s*$)/;\nconst inlineText = /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*_]|\\b_|$)|[^ ](?= {2,}\\n)))/;\n// list of unicode punctuation marks, plus any missing characters from CommonMark spec\nconst _punctuation = '\\\\p{P}\\\\p{S}';\nconst punctuation = edit(/^((?![*_])[\\spunctuation])/, 'u')\n    .replace(/punctuation/g, _punctuation).getRegex();\n// sequences em should skip over [title](link), `code`, <html>\nconst blockSkip = /\\[[^[\\]]*?\\]\\([^\\(\\)]*?\\)|`[^`]*?`|<[^<>]*?>/g;\nconst emStrongLDelim = edit(/^(?:\\*+(?:((?!\\*)[punct])|[^\\s*]))|^_+(?:((?!_)[punct])|([^\\s_]))/, 'u')\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst emStrongRDelimAst = edit('^[^_*]*?__[^_*]*?\\\\*[^_*]*?(?=__)' // Skip orphan inside strong\n    + '|[^*]+(?=[^*])' // Consume to delim\n    + '|(?!\\\\*)[punct](\\\\*+)(?=[\\\\s]|$)' // (1) #*** can only be a Right Delimiter\n    + '|[^punct\\\\s](\\\\*+)(?!\\\\*)(?=[punct\\\\s]|$)' // (2) a***#, a*** can only be a Right Delimiter\n    + '|(?!\\\\*)[punct\\\\s](\\\\*+)(?=[^punct\\\\s])' // (3) #***a, ***a can only be Left Delimiter\n    + '|[\\\\s](\\\\*+)(?!\\\\*)(?=[punct])' // (4) ***# can only be Left Delimiter\n    + '|(?!\\\\*)[punct](\\\\*+)(?!\\\\*)(?=[punct])' // (5) #***# can be either Left or Right Delimiter\n    + '|[^punct\\\\s](\\\\*+)(?=[^punct\\\\s])', 'gu') // (6) a***a can be either Left or Right Delimiter\n    .replace(/punct/g, _punctuation)\n    .getRegex();\n// (6) Not allowed for _\nconst emStrongRDelimUnd = edit('^[^_*]*?\\\\*\\\\*[^_*]*?_[^_*]*?(?=\\\\*\\\\*)' // Skip orphan inside strong\n    + '|[^_]+(?=[^_])' // Consume to delim\n    + '|(?!_)[punct](_+)(?=[\\\\s]|$)' // (1) #___ can only be a Right Delimiter\n    + '|[^punct\\\\s](_+)(?!_)(?=[punct\\\\s]|$)' // (2) a___#, a___ can only be a Right Delimiter\n    + '|(?!_)[punct\\\\s](_+)(?=[^punct\\\\s])' // (3) #___a, ___a can only be Left Delimiter\n    + '|[\\\\s](_+)(?!_)(?=[punct])' // (4) ___# can only be Left Delimiter\n    + '|(?!_)[punct](_+)(?!_)(?=[punct])', 'gu') // (5) #___# can be either Left or Right Delimiter\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst anyPunctuation = edit(/\\\\([punct])/, 'gu')\n    .replace(/punct/g, _punctuation)\n    .getRegex();\nconst autolink = edit(/^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/)\n    .replace('scheme', /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/)\n    .replace('email', /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/)\n    .getRegex();\nconst _inlineComment = edit(_comment).replace('(?:-->|$)', '-->').getRegex();\nconst tag = edit('^comment'\n    + '|^</[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n    + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n    + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. <?php ?>\n    + '|^<![a-zA-Z]+\\\\s[\\\\s\\\\S]*?>' // declaration, e.g. <!DOCTYPE html>\n    + '|^<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>') // CDATA section\n    .replace('comment', _inlineComment)\n    .replace('attribute', /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/)\n    .getRegex();\nconst _inlineLabel = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\nconst link = edit(/^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/)\n    .replace('label', _inlineLabel)\n    .replace('href', /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/)\n    .replace('title', /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/)\n    .getRegex();\nconst reflink = edit(/^!?\\[(label)\\]\\[(ref)\\]/)\n    .replace('label', _inlineLabel)\n    .replace('ref', _blockLabel)\n    .getRegex();\nconst nolink = edit(/^!?\\[(ref)\\](?:\\[\\])?/)\n    .replace('ref', _blockLabel)\n    .getRegex();\nconst reflinkSearch = edit('reflink|nolink(?!\\\\()', 'g')\n    .replace('reflink', reflink)\n    .replace('nolink', nolink)\n    .getRegex();\n/**\n * Normal Inline Grammar\n */\nconst inlineNormal = {\n    _backpedal: noopTest, // only used for GFM url\n    anyPunctuation,\n    autolink,\n    blockSkip,\n    br,\n    code: inlineCode,\n    del: noopTest,\n    emStrongLDelim,\n    emStrongRDelimAst,\n    emStrongRDelimUnd,\n    escape,\n    link,\n    nolink,\n    punctuation,\n    reflink,\n    reflinkSearch,\n    tag,\n    text: inlineText,\n    url: noopTest\n};\n/**\n * Pedantic Inline Grammar\n */\nconst inlinePedantic = {\n    ...inlineNormal,\n    link: edit(/^!?\\[(label)\\]\\((.*?)\\)/)\n        .replace('label', _inlineLabel)\n        .getRegex(),\n    reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/)\n        .replace('label', _inlineLabel)\n        .getRegex()\n};\n/**\n * GFM Inline Grammar\n */\nconst inlineGfm = {\n    ...inlineNormal,\n    escape: edit(escape).replace('])', '~|])').getRegex(),\n    url: edit(/^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/, 'i')\n        .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)\n        .getRegex(),\n    _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n    del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n    text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\<!\\[`*~_]|\\b_|https?:\\/\\/|ftp:\\/\\/|www\\.|$)|[^ ](?= {2,}\\n)|[^a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-](?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)))/\n};\n/**\n * GFM + Line Breaks Inline Grammar\n */\nconst inlineBreaks = {\n    ...inlineGfm,\n    br: edit(br).replace('{2,}', '*').getRegex(),\n    text: edit(inlineGfm.text)\n        .replace('\\\\b_', '\\\\b_| {2,}\\\\n')\n        .replace(/\\{2,\\}/g, '*')\n        .getRegex()\n};\n/**\n * exports\n */\nconst block = {\n    normal: blockNormal,\n    gfm: blockGfm,\n    pedantic: blockPedantic\n};\nconst inline = {\n    normal: inlineNormal,\n    gfm: inlineGfm,\n    breaks: inlineBreaks,\n    pedantic: inlinePedantic\n};\n\n/**\n * Block Lexer\n */\nclass _Lexer {\n    tokens;\n    options;\n    state;\n    tokenizer;\n    inlineQueue;\n    constructor(options) {\n        // TokenList cannot be created in one go\n        this.tokens = [];\n        this.tokens.links = Object.create(null);\n        this.options = options || _defaults;\n        this.options.tokenizer = this.options.tokenizer || new _Tokenizer();\n        this.tokenizer = this.options.tokenizer;\n        this.tokenizer.options = this.options;\n        this.tokenizer.lexer = this;\n        this.inlineQueue = [];\n        this.state = {\n            inLink: false,\n            inRawBlock: false,\n            top: true\n        };\n        const rules = {\n            block: block.normal,\n            inline: inline.normal\n        };\n        if (this.options.pedantic) {\n            rules.block = block.pedantic;\n            rules.inline = inline.pedantic;\n        }\n        else if (this.options.gfm) {\n            rules.block = block.gfm;\n            if (this.options.breaks) {\n                rules.inline = inline.breaks;\n            }\n            else {\n                rules.inline = inline.gfm;\n            }\n        }\n        this.tokenizer.rules = rules;\n    }\n    /**\n     * Expose Rules\n     */\n    static get rules() {\n        return {\n            block,\n            inline\n        };\n    }\n    /**\n     * Static Lex Method\n     */\n    static lex(src, options) {\n        const lexer = new _Lexer(options);\n        return lexer.lex(src);\n    }\n    /**\n     * Static Lex Inline Method\n     */\n    static lexInline(src, options) {\n        const lexer = new _Lexer(options);\n        return lexer.inlineTokens(src);\n    }\n    /**\n     * Preprocessing\n     */\n    lex(src) {\n        src = src\n            .replace(/\\r\\n|\\r/g, '\\n');\n        this.blockTokens(src, this.tokens);\n        for (let i = 0; i < this.inlineQueue.length; i++) {\n            const next = this.inlineQueue[i];\n            this.inlineTokens(next.src, next.tokens);\n        }\n        this.inlineQueue = [];\n        return this.tokens;\n    }\n    blockTokens(src, tokens = []) {\n        if (this.options.pedantic) {\n            src = src.replace(/\\t/g, '    ').replace(/^ +$/gm, '');\n        }\n        else {\n            src = src.replace(/^( *)(\\t+)/gm, (_, leading, tabs) => {\n                return leading + '    '.repeat(tabs.length);\n            });\n        }\n        let token;\n        let lastToken;\n        let cutSrc;\n        let lastParagraphClipped;\n        while (src) {\n            if (this.options.extensions\n                && this.options.extensions.block\n                && this.options.extensions.block.some((extTokenizer) => {\n                    if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n                        src = src.substring(token.raw.length);\n                        tokens.push(token);\n                        return true;\n                    }\n                    return false;\n                })) {\n                continue;\n            }\n            // newline\n            if (token = this.tokenizer.space(src)) {\n                src = src.substring(token.raw.length);\n                if (token.raw.length === 1 && tokens.length > 0) {\n                    // if there's a single \\n as a spacer, it's terminating the last line,\n                    // so move it there so that we don't get unnecessary paragraph tags\n                    tokens[tokens.length - 1].raw += '\\n';\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // code\n            if (token = this.tokenizer.code(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                // An indented code block cannot interrupt a paragraph.\n                if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // fences\n            if (token = this.tokenizer.fences(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // heading\n            if (token = this.tokenizer.heading(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // hr\n            if (token = this.tokenizer.hr(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // blockquote\n            if (token = this.tokenizer.blockquote(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // list\n            if (token = this.tokenizer.list(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // html\n            if (token = this.tokenizer.html(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // def\n            if (token = this.tokenizer.def(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.raw;\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else if (!this.tokens.links[token.tag]) {\n                    this.tokens.links[token.tag] = {\n                        href: token.href,\n                        title: token.title\n                    };\n                }\n                continue;\n            }\n            // table (gfm)\n            if (token = this.tokenizer.table(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // lheading\n            if (token = this.tokenizer.lheading(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // top-level paragraph\n            // prevent paragraph consuming extensions by clipping 'src' to extension start\n            cutSrc = src;\n            if (this.options.extensions && this.options.extensions.startBlock) {\n                let startIndex = Infinity;\n                const tempSrc = src.slice(1);\n                let tempStart;\n                this.options.extensions.startBlock.forEach((getStartIndex) => {\n                    tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n                    if (typeof tempStart === 'number' && tempStart >= 0) {\n                        startIndex = Math.min(startIndex, tempStart);\n                    }\n                });\n                if (startIndex < Infinity && startIndex >= 0) {\n                    cutSrc = src.substring(0, startIndex + 1);\n                }\n            }\n            if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n                lastToken = tokens[tokens.length - 1];\n                if (lastParagraphClipped && lastToken.type === 'paragraph') {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue.pop();\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                lastParagraphClipped = (cutSrc.length !== src.length);\n                src = src.substring(token.raw.length);\n                continue;\n            }\n            // text\n            if (token = this.tokenizer.text(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && lastToken.type === 'text') {\n                    lastToken.raw += '\\n' + token.raw;\n                    lastToken.text += '\\n' + token.text;\n                    this.inlineQueue.pop();\n                    this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            if (src) {\n                const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n                if (this.options.silent) {\n                    console.error(errMsg);\n                    break;\n                }\n                else {\n                    throw new Error(errMsg);\n                }\n            }\n        }\n        this.state.top = true;\n        return tokens;\n    }\n    inline(src, tokens = []) {\n        this.inlineQueue.push({ src, tokens });\n        return tokens;\n    }\n    /**\n     * Lexing/Compiling\n     */\n    inlineTokens(src, tokens = []) {\n        let token, lastToken, cutSrc;\n        // String with links masked to avoid interference with em and strong\n        let maskedSrc = src;\n        let match;\n        let keepPrevChar, prevChar;\n        // Mask out reflinks\n        if (this.tokens.links) {\n            const links = Object.keys(this.tokens.links);\n            if (links.length > 0) {\n                while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n                    if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n                        maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n                    }\n                }\n            }\n        }\n        // Mask out other blocks\n        while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n        }\n        // Mask out escaped characters\n        while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {\n            maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);\n        }\n        while (src) {\n            if (!keepPrevChar) {\n                prevChar = '';\n            }\n            keepPrevChar = false;\n            // extensions\n            if (this.options.extensions\n                && this.options.extensions.inline\n                && this.options.extensions.inline.some((extTokenizer) => {\n                    if (token = extTokenizer.call({ lexer: this }, src, tokens)) {\n                        src = src.substring(token.raw.length);\n                        tokens.push(token);\n                        return true;\n                    }\n                    return false;\n                })) {\n                continue;\n            }\n            // escape\n            if (token = this.tokenizer.escape(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // tag\n            if (token = this.tokenizer.tag(src)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // link\n            if (token = this.tokenizer.link(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // reflink, nolink\n            if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n                src = src.substring(token.raw.length);\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            // em & strong\n            if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // code\n            if (token = this.tokenizer.codespan(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // br\n            if (token = this.tokenizer.br(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // del (gfm)\n            if (token = this.tokenizer.del(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // autolink\n            if (token = this.tokenizer.autolink(src)) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // url (gfm)\n            if (!this.state.inLink && (token = this.tokenizer.url(src))) {\n                src = src.substring(token.raw.length);\n                tokens.push(token);\n                continue;\n            }\n            // text\n            // prevent inlineText consuming extensions by clipping 'src' to extension start\n            cutSrc = src;\n            if (this.options.extensions && this.options.extensions.startInline) {\n                let startIndex = Infinity;\n                const tempSrc = src.slice(1);\n                let tempStart;\n                this.options.extensions.startInline.forEach((getStartIndex) => {\n                    tempStart = getStartIndex.call({ lexer: this }, tempSrc);\n                    if (typeof tempStart === 'number' && tempStart >= 0) {\n                        startIndex = Math.min(startIndex, tempStart);\n                    }\n                });\n                if (startIndex < Infinity && startIndex >= 0) {\n                    cutSrc = src.substring(0, startIndex + 1);\n                }\n            }\n            if (token = this.tokenizer.inlineText(cutSrc)) {\n                src = src.substring(token.raw.length);\n                if (token.raw.slice(-1) !== '_') { // Track prevChar before string of ____ started\n                    prevChar = token.raw.slice(-1);\n                }\n                keepPrevChar = true;\n                lastToken = tokens[tokens.length - 1];\n                if (lastToken && lastToken.type === 'text') {\n                    lastToken.raw += token.raw;\n                    lastToken.text += token.text;\n                }\n                else {\n                    tokens.push(token);\n                }\n                continue;\n            }\n            if (src) {\n                const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n                if (this.options.silent) {\n                    console.error(errMsg);\n                    break;\n                }\n                else {\n                    throw new Error(errMsg);\n                }\n            }\n        }\n        return tokens;\n    }\n}\n\n/**\n * Renderer\n */\nclass _Renderer {\n    options;\n    constructor(options) {\n        this.options = options || _defaults;\n    }\n    code(code, infostring, escaped) {\n        const lang = (infostring || '').match(/^\\S*/)?.[0];\n        code = code.replace(/\\n$/, '') + '\\n';\n        if (!lang) {\n            return '<pre><code>'\n                + (escaped ? code : escape$1(code, true))\n                + '</code></pre>\\n';\n        }\n        return '<pre><code class=\"language-'\n            + escape$1(lang)\n            + '\">'\n            + (escaped ? code : escape$1(code, true))\n            + '</code></pre>\\n';\n    }\n    blockquote(quote) {\n        return `<blockquote>\\n${quote}</blockquote>\\n`;\n    }\n    html(html, block) {\n        return html;\n    }\n    heading(text, level, raw) {\n        // ignore IDs\n        return `<h${level}>${text}</h${level}>\\n`;\n    }\n    hr() {\n        return '<hr>\\n';\n    }\n    list(body, ordered, start) {\n        const type = ordered ? 'ol' : 'ul';\n        const startatt = (ordered && start !== 1) ? (' start=\"' + start + '\"') : '';\n        return '<' + type + startatt + '>\\n' + body + '</' + type + '>\\n';\n    }\n    listitem(text, task, checked) {\n        return `<li>${text}</li>\\n`;\n    }\n    checkbox(checked) {\n        return '<input '\n            + (checked ? 'checked=\"\" ' : '')\n            + 'disabled=\"\" type=\"checkbox\">';\n    }\n    paragraph(text) {\n        return `<p>${text}</p>\\n`;\n    }\n    table(header, body) {\n        if (body)\n            body = `<tbody>${body}</tbody>`;\n        return '<table>\\n'\n            + '<thead>\\n'\n            + header\n            + '</thead>\\n'\n            + body\n            + '</table>\\n';\n    }\n    tablerow(content) {\n        return `<tr>\\n${content}</tr>\\n`;\n    }\n    tablecell(content, flags) {\n        const type = flags.header ? 'th' : 'td';\n        const tag = flags.align\n            ? `<${type} align=\"${flags.align}\">`\n            : `<${type}>`;\n        return tag + content + `</${type}>\\n`;\n    }\n    /**\n     * span level renderer\n     */\n    strong(text) {\n        return `<strong>${text}</strong>`;\n    }\n    em(text) {\n        return `<em>${text}</em>`;\n    }\n    codespan(text) {\n        return `<code>${text}</code>`;\n    }\n    br() {\n        return '<br>';\n    }\n    del(text) {\n        return `<del>${text}</del>`;\n    }\n    link(href, title, text) {\n        const cleanHref = cleanUrl(href);\n        if (cleanHref === null) {\n            return text;\n        }\n        href = cleanHref;\n        let out = '<a href=\"' + href + '\"';\n        if (title) {\n            out += ' title=\"' + title + '\"';\n        }\n        out += '>' + text + '</a>';\n        return out;\n    }\n    image(href, title, text) {\n        const cleanHref = cleanUrl(href);\n        if (cleanHref === null) {\n            return text;\n        }\n        href = cleanHref;\n        let out = `<img src=\"${href}\" alt=\"${text}\"`;\n        if (title) {\n            out += ` title=\"${title}\"`;\n        }\n        out += '>';\n        return out;\n    }\n    text(text) {\n        return text;\n    }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass _TextRenderer {\n    // no need for block level renderers\n    strong(text) {\n        return text;\n    }\n    em(text) {\n        return text;\n    }\n    codespan(text) {\n        return text;\n    }\n    del(text) {\n        return text;\n    }\n    html(text) {\n        return text;\n    }\n    text(text) {\n        return text;\n    }\n    link(href, title, text) {\n        return '' + text;\n    }\n    image(href, title, text) {\n        return '' + text;\n    }\n    br() {\n        return '';\n    }\n}\n\n/**\n * Parsing & Compiling\n */\nclass _Parser {\n    options;\n    renderer;\n    textRenderer;\n    constructor(options) {\n        this.options = options || _defaults;\n        this.options.renderer = this.options.renderer || new _Renderer();\n        this.renderer = this.options.renderer;\n        this.renderer.options = this.options;\n        this.textRenderer = new _TextRenderer();\n    }\n    /**\n     * Static Parse Method\n     */\n    static parse(tokens, options) {\n        const parser = new _Parser(options);\n        return parser.parse(tokens);\n    }\n    /**\n     * Static Parse Inline Method\n     */\n    static parseInline(tokens, options) {\n        const parser = new _Parser(options);\n        return parser.parseInline(tokens);\n    }\n    /**\n     * Parse Loop\n     */\n    parse(tokens, top = true) {\n        let out = '';\n        for (let i = 0; i < tokens.length; i++) {\n            const token = tokens[i];\n            // Run any renderer extensions\n            if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n                const genericToken = token;\n                const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);\n                if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(genericToken.type)) {\n                    out += ret || '';\n                    continue;\n                }\n            }\n            switch (token.type) {\n                case 'space': {\n                    continue;\n                }\n                case 'hr': {\n                    out += this.renderer.hr();\n                    continue;\n                }\n                case 'heading': {\n                    const headingToken = token;\n                    out += this.renderer.heading(this.parseInline(headingToken.tokens), headingToken.depth, unescape(this.parseInline(headingToken.tokens, this.textRenderer)));\n                    continue;\n                }\n                case 'code': {\n                    const codeToken = token;\n                    out += this.renderer.code(codeToken.text, codeToken.lang, !!codeToken.escaped);\n                    continue;\n                }\n                case 'table': {\n                    const tableToken = token;\n                    let header = '';\n                    // header\n                    let cell = '';\n                    for (let j = 0; j < tableToken.header.length; j++) {\n                        cell += this.renderer.tablecell(this.parseInline(tableToken.header[j].tokens), { header: true, align: tableToken.align[j] });\n                    }\n                    header += this.renderer.tablerow(cell);\n                    let body = '';\n                    for (let j = 0; j < tableToken.rows.length; j++) {\n                        const row = tableToken.rows[j];\n                        cell = '';\n                        for (let k = 0; k < row.length; k++) {\n                            cell += this.renderer.tablecell(this.parseInline(row[k].tokens), { header: false, align: tableToken.align[k] });\n                        }\n                        body += this.renderer.tablerow(cell);\n                    }\n                    out += this.renderer.table(header, body);\n                    continue;\n                }\n                case 'blockquote': {\n                    const blockquoteToken = token;\n                    const body = this.parse(blockquoteToken.tokens);\n                    out += this.renderer.blockquote(body);\n                    continue;\n                }\n                case 'list': {\n                    const listToken = token;\n                    const ordered = listToken.ordered;\n                    const start = listToken.start;\n                    const loose = listToken.loose;\n                    let body = '';\n                    for (let j = 0; j < listToken.items.length; j++) {\n                        const item = listToken.items[j];\n                        const checked = item.checked;\n                        const task = item.task;\n                        let itemBody = '';\n                        if (item.task) {\n                            const checkbox = this.renderer.checkbox(!!checked);\n                            if (loose) {\n                                if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n                                    item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n                                    if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n                                        item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n                                    }\n                                }\n                                else {\n                                    item.tokens.unshift({\n                                        type: 'text',\n                                        text: checkbox + ' '\n                                    });\n                                }\n                            }\n                            else {\n                                itemBody += checkbox + ' ';\n                            }\n                        }\n                        itemBody += this.parse(item.tokens, loose);\n                        body += this.renderer.listitem(itemBody, task, !!checked);\n                    }\n                    out += this.renderer.list(body, ordered, start);\n                    continue;\n                }\n                case 'html': {\n                    const htmlToken = token;\n                    out += this.renderer.html(htmlToken.text, htmlToken.block);\n                    continue;\n                }\n                case 'paragraph': {\n                    const paragraphToken = token;\n                    out += this.renderer.paragraph(this.parseInline(paragraphToken.tokens));\n                    continue;\n                }\n                case 'text': {\n                    let textToken = token;\n                    let body = textToken.tokens ? this.parseInline(textToken.tokens) : textToken.text;\n                    while (i + 1 < tokens.length && tokens[i + 1].type === 'text') {\n                        textToken = tokens[++i];\n                        body += '\\n' + (textToken.tokens ? this.parseInline(textToken.tokens) : textToken.text);\n                    }\n                    out += top ? this.renderer.paragraph(body) : body;\n                    continue;\n                }\n                default: {\n                    const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n                    if (this.options.silent) {\n                        console.error(errMsg);\n                        return '';\n                    }\n                    else {\n                        throw new Error(errMsg);\n                    }\n                }\n            }\n        }\n        return out;\n    }\n    /**\n     * Parse Inline Tokens\n     */\n    parseInline(tokens, renderer) {\n        renderer = renderer || this.renderer;\n        let out = '';\n        for (let i = 0; i < tokens.length; i++) {\n            const token = tokens[i];\n            // Run any renderer extensions\n            if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n                const ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);\n                if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n                    out += ret || '';\n                    continue;\n                }\n            }\n            switch (token.type) {\n                case 'escape': {\n                    const escapeToken = token;\n                    out += renderer.text(escapeToken.text);\n                    break;\n                }\n                case 'html': {\n                    const tagToken = token;\n                    out += renderer.html(tagToken.text);\n                    break;\n                }\n                case 'link': {\n                    const linkToken = token;\n                    out += renderer.link(linkToken.href, linkToken.title, this.parseInline(linkToken.tokens, renderer));\n                    break;\n                }\n                case 'image': {\n                    const imageToken = token;\n                    out += renderer.image(imageToken.href, imageToken.title, imageToken.text);\n                    break;\n                }\n                case 'strong': {\n                    const strongToken = token;\n                    out += renderer.strong(this.parseInline(strongToken.tokens, renderer));\n                    break;\n                }\n                case 'em': {\n                    const emToken = token;\n                    out += renderer.em(this.parseInline(emToken.tokens, renderer));\n                    break;\n                }\n                case 'codespan': {\n                    const codespanToken = token;\n                    out += renderer.codespan(codespanToken.text);\n                    break;\n                }\n                case 'br': {\n                    out += renderer.br();\n                    break;\n                }\n                case 'del': {\n                    const delToken = token;\n                    out += renderer.del(this.parseInline(delToken.tokens, renderer));\n                    break;\n                }\n                case 'text': {\n                    const textToken = token;\n                    out += renderer.text(textToken.text);\n                    break;\n                }\n                default: {\n                    const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n                    if (this.options.silent) {\n                        console.error(errMsg);\n                        return '';\n                    }\n                    else {\n                        throw new Error(errMsg);\n                    }\n                }\n            }\n        }\n        return out;\n    }\n}\n\nclass _Hooks {\n    options;\n    constructor(options) {\n        this.options = options || _defaults;\n    }\n    static passThroughHooks = new Set([\n        'preprocess',\n        'postprocess',\n        'processAllTokens'\n    ]);\n    /**\n     * Process markdown before marked\n     */\n    preprocess(markdown) {\n        return markdown;\n    }\n    /**\n     * Process HTML after marked is finished\n     */\n    postprocess(html) {\n        return html;\n    }\n    /**\n     * Process all tokens before walk tokens\n     */\n    processAllTokens(tokens) {\n        return tokens;\n    }\n}\n\nclass Marked {\n    defaults = _getDefaults();\n    options = this.setOptions;\n    parse = this.#parseMarkdown(_Lexer.lex, _Parser.parse);\n    parseInline = this.#parseMarkdown(_Lexer.lexInline, _Parser.parseInline);\n    Parser = _Parser;\n    Renderer = _Renderer;\n    TextRenderer = _TextRenderer;\n    Lexer = _Lexer;\n    Tokenizer = _Tokenizer;\n    Hooks = _Hooks;\n    constructor(...args) {\n        this.use(...args);\n    }\n    /**\n     * Run callback for every token\n     */\n    walkTokens(tokens, callback) {\n        let values = [];\n        for (const token of tokens) {\n            values = values.concat(callback.call(this, token));\n            switch (token.type) {\n                case 'table': {\n                    const tableToken = token;\n                    for (const cell of tableToken.header) {\n                        values = values.concat(this.walkTokens(cell.tokens, callback));\n                    }\n                    for (const row of tableToken.rows) {\n                        for (const cell of row) {\n                            values = values.concat(this.walkTokens(cell.tokens, callback));\n                        }\n                    }\n                    break;\n                }\n                case 'list': {\n                    const listToken = token;\n                    values = values.concat(this.walkTokens(listToken.items, callback));\n                    break;\n                }\n                default: {\n                    const genericToken = token;\n                    if (this.defaults.extensions?.childTokens?.[genericToken.type]) {\n                        this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {\n                            const tokens = genericToken[childTokens].flat(Infinity);\n                            values = values.concat(this.walkTokens(tokens, callback));\n                        });\n                    }\n                    else if (genericToken.tokens) {\n                        values = values.concat(this.walkTokens(genericToken.tokens, callback));\n                    }\n                }\n            }\n        }\n        return values;\n    }\n    use(...args) {\n        const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };\n        args.forEach((pack) => {\n            // copy options to new object\n            const opts = { ...pack };\n            // set async to true if it was set to true before\n            opts.async = this.defaults.async || opts.async || false;\n            // ==-- Parse \"addon\" extensions --== //\n            if (pack.extensions) {\n                pack.extensions.forEach((ext) => {\n                    if (!ext.name) {\n                        throw new Error('extension name required');\n                    }\n                    if ('renderer' in ext) { // Renderer extensions\n                        const prevRenderer = extensions.renderers[ext.name];\n                        if (prevRenderer) {\n                            // Replace extension with func to run new extension but fall back if false\n                            extensions.renderers[ext.name] = function (...args) {\n                                let ret = ext.renderer.apply(this, args);\n                                if (ret === false) {\n                                    ret = prevRenderer.apply(this, args);\n                                }\n                                return ret;\n                            };\n                        }\n                        else {\n                            extensions.renderers[ext.name] = ext.renderer;\n                        }\n                    }\n                    if ('tokenizer' in ext) { // Tokenizer Extensions\n                        if (!ext.level || (ext.level !== 'block' && ext.level !== 'inline')) {\n                            throw new Error(\"extension level must be 'block' or 'inline'\");\n                        }\n                        const extLevel = extensions[ext.level];\n                        if (extLevel) {\n                            extLevel.unshift(ext.tokenizer);\n                        }\n                        else {\n                            extensions[ext.level] = [ext.tokenizer];\n                        }\n                        if (ext.start) { // Function to check for start of token\n                            if (ext.level === 'block') {\n                                if (extensions.startBlock) {\n                                    extensions.startBlock.push(ext.start);\n                                }\n                                else {\n                                    extensions.startBlock = [ext.start];\n                                }\n                            }\n                            else if (ext.level === 'inline') {\n                                if (extensions.startInline) {\n                                    extensions.startInline.push(ext.start);\n                                }\n                                else {\n                                    extensions.startInline = [ext.start];\n                                }\n                            }\n                        }\n                    }\n                    if ('childTokens' in ext && ext.childTokens) { // Child tokens to be visited by walkTokens\n                        extensions.childTokens[ext.name] = ext.childTokens;\n                    }\n                });\n                opts.extensions = extensions;\n            }\n            // ==-- Parse \"overwrite\" extensions --== //\n            if (pack.renderer) {\n                const renderer = this.defaults.renderer || new _Renderer(this.defaults);\n                for (const prop in pack.renderer) {\n                    if (!(prop in renderer)) {\n                        throw new Error(`renderer '${prop}' does not exist`);\n                    }\n                    if (prop === 'options') {\n                        // ignore options property\n                        continue;\n                    }\n                    const rendererProp = prop;\n                    const rendererFunc = pack.renderer[rendererProp];\n                    const prevRenderer = renderer[rendererProp];\n                    // Replace renderer with func to run extension, but fall back if false\n                    renderer[rendererProp] = (...args) => {\n                        let ret = rendererFunc.apply(renderer, args);\n                        if (ret === false) {\n                            ret = prevRenderer.apply(renderer, args);\n                        }\n                        return ret || '';\n                    };\n                }\n                opts.renderer = renderer;\n            }\n            if (pack.tokenizer) {\n                const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);\n                for (const prop in pack.tokenizer) {\n                    if (!(prop in tokenizer)) {\n                        throw new Error(`tokenizer '${prop}' does not exist`);\n                    }\n                    if (['options', 'rules', 'lexer'].includes(prop)) {\n                        // ignore options, rules, and lexer properties\n                        continue;\n                    }\n                    const tokenizerProp = prop;\n                    const tokenizerFunc = pack.tokenizer[tokenizerProp];\n                    const prevTokenizer = tokenizer[tokenizerProp];\n                    // Replace tokenizer with func to run extension, but fall back if false\n                    // @ts-expect-error cannot type tokenizer function dynamically\n                    tokenizer[tokenizerProp] = (...args) => {\n                        let ret = tokenizerFunc.apply(tokenizer, args);\n                        if (ret === false) {\n                            ret = prevTokenizer.apply(tokenizer, args);\n                        }\n                        return ret;\n                    };\n                }\n                opts.tokenizer = tokenizer;\n            }\n            // ==-- Parse Hooks extensions --== //\n            if (pack.hooks) {\n                const hooks = this.defaults.hooks || new _Hooks();\n                for (const prop in pack.hooks) {\n                    if (!(prop in hooks)) {\n                        throw new Error(`hook '${prop}' does not exist`);\n                    }\n                    if (prop === 'options') {\n                        // ignore options property\n                        continue;\n                    }\n                    const hooksProp = prop;\n                    const hooksFunc = pack.hooks[hooksProp];\n                    const prevHook = hooks[hooksProp];\n                    if (_Hooks.passThroughHooks.has(prop)) {\n                        // @ts-expect-error cannot type hook function dynamically\n                        hooks[hooksProp] = (arg) => {\n                            if (this.defaults.async) {\n                                return Promise.resolve(hooksFunc.call(hooks, arg)).then(ret => {\n                                    return prevHook.call(hooks, ret);\n                                });\n                            }\n                            const ret = hooksFunc.call(hooks, arg);\n                            return prevHook.call(hooks, ret);\n                        };\n                    }\n                    else {\n                        // @ts-expect-error cannot type hook function dynamically\n                        hooks[hooksProp] = (...args) => {\n                            let ret = hooksFunc.apply(hooks, args);\n                            if (ret === false) {\n                                ret = prevHook.apply(hooks, args);\n                            }\n                            return ret;\n                        };\n                    }\n                }\n                opts.hooks = hooks;\n            }\n            // ==-- Parse WalkTokens extensions --== //\n            if (pack.walkTokens) {\n                const walkTokens = this.defaults.walkTokens;\n                const packWalktokens = pack.walkTokens;\n                opts.walkTokens = function (token) {\n                    let values = [];\n                    values.push(packWalktokens.call(this, token));\n                    if (walkTokens) {\n                        values = values.concat(walkTokens.call(this, token));\n                    }\n                    return values;\n                };\n            }\n            this.defaults = { ...this.defaults, ...opts };\n        });\n        return this;\n    }\n    setOptions(opt) {\n        this.defaults = { ...this.defaults, ...opt };\n        return this;\n    }\n    lexer(src, options) {\n        return _Lexer.lex(src, options ?? this.defaults);\n    }\n    parser(tokens, options) {\n        return _Parser.parse(tokens, options ?? this.defaults);\n    }\n    #parseMarkdown(lexer, parser) {\n        return (src, options) => {\n            const origOpt = { ...options };\n            const opt = { ...this.defaults, ...origOpt };\n            // Show warning if an extension set async to true but the parse was called with async: false\n            if (this.defaults.async === true && origOpt.async === false) {\n                if (!opt.silent) {\n                    console.warn('marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored.');\n                }\n                opt.async = true;\n            }\n            const throwError = this.#onError(!!opt.silent, !!opt.async);\n            // throw error in case of non string input\n            if (typeof src === 'undefined' || src === null) {\n                return throwError(new Error('marked(): input parameter is undefined or null'));\n            }\n            if (typeof src !== 'string') {\n                return throwError(new Error('marked(): input parameter is of type '\n                    + Object.prototype.toString.call(src) + ', string expected'));\n            }\n            if (opt.hooks) {\n                opt.hooks.options = opt;\n            }\n            if (opt.async) {\n                return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src)\n                    .then(src => lexer(src, opt))\n                    .then(tokens => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens)\n                    .then(tokens => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens)\n                    .then(tokens => parser(tokens, opt))\n                    .then(html => opt.hooks ? opt.hooks.postprocess(html) : html)\n                    .catch(throwError);\n            }\n            try {\n                if (opt.hooks) {\n                    src = opt.hooks.preprocess(src);\n                }\n                let tokens = lexer(src, opt);\n                if (opt.hooks) {\n                    tokens = opt.hooks.processAllTokens(tokens);\n                }\n                if (opt.walkTokens) {\n                    this.walkTokens(tokens, opt.walkTokens);\n                }\n                let html = parser(tokens, opt);\n                if (opt.hooks) {\n                    html = opt.hooks.postprocess(html);\n                }\n                return html;\n            }\n            catch (e) {\n                return throwError(e);\n            }\n        };\n    }\n    #onError(silent, async) {\n        return (e) => {\n            e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n            if (silent) {\n                const msg = '<p>An error occurred:</p><pre>'\n                    + escape$1(e.message + '', true)\n                    + '</pre>';\n                if (async) {\n                    return Promise.resolve(msg);\n                }\n                return msg;\n            }\n            if (async) {\n                return Promise.reject(e);\n            }\n            throw e;\n        };\n    }\n}\n\nconst markedInstance = new Marked();\nfunction marked(src, opt) {\n    return markedInstance.parse(src, opt);\n}\n/**\n * Sets the default options.\n *\n * @param options Hash of options\n */\nmarked.options =\n    marked.setOptions = function (options) {\n        markedInstance.setOptions(options);\n        marked.defaults = markedInstance.defaults;\n        changeDefaults(marked.defaults);\n        return marked;\n    };\n/**\n * Gets the original marked default options.\n */\nmarked.getDefaults = _getDefaults;\nmarked.defaults = _defaults;\n/**\n * Use Extension\n */\nmarked.use = function (...args) {\n    markedInstance.use(...args);\n    marked.defaults = markedInstance.defaults;\n    changeDefaults(marked.defaults);\n    return marked;\n};\n/**\n * Run callback for every token\n */\nmarked.walkTokens = function (tokens, callback) {\n    return markedInstance.walkTokens(tokens, callback);\n};\n/**\n * Compiles markdown to HTML without enclosing `p` tag.\n *\n * @param src String of markdown source to be compiled\n * @param options Hash of options\n * @return String of compiled HTML\n */\nmarked.parseInline = markedInstance.parseInline;\n/**\n * Expose\n */\nmarked.Parser = _Parser;\nmarked.parser = _Parser.parse;\nmarked.Renderer = _Renderer;\nmarked.TextRenderer = _TextRenderer;\nmarked.Lexer = _Lexer;\nmarked.lexer = _Lexer.lex;\nmarked.Tokenizer = _Tokenizer;\nmarked.Hooks = _Hooks;\nmarked.parse = marked;\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = _Parser.parse;\nconst lexer = _Lexer.lex;\n\nexport { _Hooks as Hooks, _Lexer as Lexer, Marked, _Parser as Parser, _Renderer as Renderer, _TextRenderer as TextRenderer, _Tokenizer as Tokenizer, _defaults as defaults, _getDefaults as getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };\n//# sourceMappingURL=marked.esm.js.map\n","var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction commonjsRequire(path) {\n\tthrow new Error('Could not dynamically require \"' + path + '\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');\n}\n\nvar pluralize$1 = {exports: {}};\n\n/* global define */\n\n(function (module, exports) {\n\t(function (root, pluralize) {\n\t  /* istanbul ignore else */\n\t  if (typeof commonjsRequire === 'function' && 'object' === 'object' && 'object' === 'object') {\n\t    // Node.\n\t    module.exports = pluralize();\n\t  } else {\n\t    // Browser global.\n\t    root.pluralize = pluralize();\n\t  }\n\t})(commonjsGlobal, function () {\n\t  // Rule storage - pluralize and singularize need to be run sequentially,\n\t  // while other rules can be optimized using an object for instant lookups.\n\t  var pluralRules = [];\n\t  var singularRules = [];\n\t  var uncountables = {};\n\t  var irregularPlurals = {};\n\t  var irregularSingles = {};\n\n\t  /**\n\t   * Sanitize a pluralization rule to a usable regular expression.\n\t   *\n\t   * @param  {(RegExp|string)} rule\n\t   * @return {RegExp}\n\t   */\n\t  function sanitizeRule (rule) {\n\t    if (typeof rule === 'string') {\n\t      return new RegExp('^' + rule + '$', 'i');\n\t    }\n\n\t    return rule;\n\t  }\n\n\t  /**\n\t   * Pass in a word token to produce a function that can replicate the case on\n\t   * another word.\n\t   *\n\t   * @param  {string}   word\n\t   * @param  {string}   token\n\t   * @return {Function}\n\t   */\n\t  function restoreCase (word, token) {\n\t    // Tokens are an exact match.\n\t    if (word === token) return token;\n\n\t    // Lower cased words. E.g. \"hello\".\n\t    if (word === word.toLowerCase()) return token.toLowerCase();\n\n\t    // Upper cased words. E.g. \"WHISKY\".\n\t    if (word === word.toUpperCase()) return token.toUpperCase();\n\n\t    // Title cased words. E.g. \"Title\".\n\t    if (word[0] === word[0].toUpperCase()) {\n\t      return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();\n\t    }\n\n\t    // Lower cased words. E.g. \"test\".\n\t    return token.toLowerCase();\n\t  }\n\n\t  /**\n\t   * Interpolate a regexp string.\n\t   *\n\t   * @param  {string} str\n\t   * @param  {Array}  args\n\t   * @return {string}\n\t   */\n\t  function interpolate (str, args) {\n\t    return str.replace(/\\$(\\d{1,2})/g, function (match, index) {\n\t      return args[index] || '';\n\t    });\n\t  }\n\n\t  /**\n\t   * Replace a word using a rule.\n\t   *\n\t   * @param  {string} word\n\t   * @param  {Array}  rule\n\t   * @return {string}\n\t   */\n\t  function replace (word, rule) {\n\t    return word.replace(rule[0], function (match, index) {\n\t      var result = interpolate(rule[1], arguments);\n\n\t      if (match === '') {\n\t        return restoreCase(word[index - 1], result);\n\t      }\n\n\t      return restoreCase(match, result);\n\t    });\n\t  }\n\n\t  /**\n\t   * Sanitize a word by passing in the word and sanitization rules.\n\t   *\n\t   * @param  {string}   token\n\t   * @param  {string}   word\n\t   * @param  {Array}    rules\n\t   * @return {string}\n\t   */\n\t  function sanitizeWord (token, word, rules) {\n\t    // Empty string or doesn't need fixing.\n\t    if (!token.length || uncountables.hasOwnProperty(token)) {\n\t      return word;\n\t    }\n\n\t    var len = rules.length;\n\n\t    // Iterate over the sanitization rules and use the first one to match.\n\t    while (len--) {\n\t      var rule = rules[len];\n\n\t      if (rule[0].test(word)) return replace(word, rule);\n\t    }\n\n\t    return word;\n\t  }\n\n\t  /**\n\t   * Replace a word with the updated word.\n\t   *\n\t   * @param  {Object}   replaceMap\n\t   * @param  {Object}   keepMap\n\t   * @param  {Array}    rules\n\t   * @return {Function}\n\t   */\n\t  function replaceWord (replaceMap, keepMap, rules) {\n\t    return function (word) {\n\t      // Get the correct token and case restoration functions.\n\t      var token = word.toLowerCase();\n\n\t      // Check against the keep object map.\n\t      if (keepMap.hasOwnProperty(token)) {\n\t        return restoreCase(word, token);\n\t      }\n\n\t      // Check against the replacement map for a direct word replacement.\n\t      if (replaceMap.hasOwnProperty(token)) {\n\t        return restoreCase(word, replaceMap[token]);\n\t      }\n\n\t      // Run all the rules against the word.\n\t      return sanitizeWord(token, word, rules);\n\t    };\n\t  }\n\n\t  /**\n\t   * Check if a word is part of the map.\n\t   */\n\t  function checkWord (replaceMap, keepMap, rules, bool) {\n\t    return function (word) {\n\t      var token = word.toLowerCase();\n\n\t      if (keepMap.hasOwnProperty(token)) return true;\n\t      if (replaceMap.hasOwnProperty(token)) return false;\n\n\t      return sanitizeWord(token, token, rules) === token;\n\t    };\n\t  }\n\n\t  /**\n\t   * Pluralize or singularize a word based on the passed in count.\n\t   *\n\t   * @param  {string}  word      The word to pluralize\n\t   * @param  {number}  count     How many of the word exist\n\t   * @param  {boolean} inclusive Whether to prefix with the number (e.g. 3 ducks)\n\t   * @return {string}\n\t   */\n\t  function pluralize (word, count, inclusive) {\n\t    var pluralized = count === 1\n\t      ? pluralize.singular(word) : pluralize.plural(word);\n\n\t    return (inclusive ? count + ' ' : '') + pluralized;\n\t  }\n\n\t  /**\n\t   * Pluralize a word.\n\t   *\n\t   * @type {Function}\n\t   */\n\t  pluralize.plural = replaceWord(\n\t    irregularSingles, irregularPlurals, pluralRules\n\t  );\n\n\t  /**\n\t   * Check if a word is plural.\n\t   *\n\t   * @type {Function}\n\t   */\n\t  pluralize.isPlural = checkWord(\n\t    irregularSingles, irregularPlurals, pluralRules\n\t  );\n\n\t  /**\n\t   * Singularize a word.\n\t   *\n\t   * @type {Function}\n\t   */\n\t  pluralize.singular = replaceWord(\n\t    irregularPlurals, irregularSingles, singularRules\n\t  );\n\n\t  /**\n\t   * Check if a word is singular.\n\t   *\n\t   * @type {Function}\n\t   */\n\t  pluralize.isSingular = checkWord(\n\t    irregularPlurals, irregularSingles, singularRules\n\t  );\n\n\t  /**\n\t   * Add a pluralization rule to the collection.\n\t   *\n\t   * @param {(string|RegExp)} rule\n\t   * @param {string}          replacement\n\t   */\n\t  pluralize.addPluralRule = function (rule, replacement) {\n\t    pluralRules.push([sanitizeRule(rule), replacement]);\n\t  };\n\n\t  /**\n\t   * Add a singularization rule to the collection.\n\t   *\n\t   * @param {(string|RegExp)} rule\n\t   * @param {string}          replacement\n\t   */\n\t  pluralize.addSingularRule = function (rule, replacement) {\n\t    singularRules.push([sanitizeRule(rule), replacement]);\n\t  };\n\n\t  /**\n\t   * Add an uncountable word rule.\n\t   *\n\t   * @param {(string|RegExp)} word\n\t   */\n\t  pluralize.addUncountableRule = function (word) {\n\t    if (typeof word === 'string') {\n\t      uncountables[word.toLowerCase()] = true;\n\t      return;\n\t    }\n\n\t    // Set singular and plural references for the word.\n\t    pluralize.addPluralRule(word, '$0');\n\t    pluralize.addSingularRule(word, '$0');\n\t  };\n\n\t  /**\n\t   * Add an irregular word definition.\n\t   *\n\t   * @param {string} single\n\t   * @param {string} plural\n\t   */\n\t  pluralize.addIrregularRule = function (single, plural) {\n\t    plural = plural.toLowerCase();\n\t    single = single.toLowerCase();\n\n\t    irregularSingles[single] = plural;\n\t    irregularPlurals[plural] = single;\n\t  };\n\n\t  /**\n\t   * Irregular rules.\n\t   */\n\t  [\n\t    // Pronouns.\n\t    ['I', 'we'],\n\t    ['me', 'us'],\n\t    ['he', 'they'],\n\t    ['she', 'they'],\n\t    ['them', 'them'],\n\t    ['myself', 'ourselves'],\n\t    ['yourself', 'yourselves'],\n\t    ['itself', 'themselves'],\n\t    ['herself', 'themselves'],\n\t    ['himself', 'themselves'],\n\t    ['themself', 'themselves'],\n\t    ['is', 'are'],\n\t    ['was', 'were'],\n\t    ['has', 'have'],\n\t    ['this', 'these'],\n\t    ['that', 'those'],\n\t    // Words ending in with a consonant and `o`.\n\t    ['echo', 'echoes'],\n\t    ['dingo', 'dingoes'],\n\t    ['volcano', 'volcanoes'],\n\t    ['tornado', 'tornadoes'],\n\t    ['torpedo', 'torpedoes'],\n\t    // Ends with `us`.\n\t    ['genus', 'genera'],\n\t    ['viscus', 'viscera'],\n\t    // Ends with `ma`.\n\t    ['stigma', 'stigmata'],\n\t    ['stoma', 'stomata'],\n\t    ['dogma', 'dogmata'],\n\t    ['lemma', 'lemmata'],\n\t    ['schema', 'schemata'],\n\t    ['anathema', 'anathemata'],\n\t    // Other irregular rules.\n\t    ['ox', 'oxen'],\n\t    ['axe', 'axes'],\n\t    ['die', 'dice'],\n\t    ['yes', 'yeses'],\n\t    ['foot', 'feet'],\n\t    ['eave', 'eaves'],\n\t    ['goose', 'geese'],\n\t    ['tooth', 'teeth'],\n\t    ['quiz', 'quizzes'],\n\t    ['human', 'humans'],\n\t    ['proof', 'proofs'],\n\t    ['carve', 'carves'],\n\t    ['valve', 'valves'],\n\t    ['looey', 'looies'],\n\t    ['thief', 'thieves'],\n\t    ['groove', 'grooves'],\n\t    ['pickaxe', 'pickaxes'],\n\t    ['passerby', 'passersby']\n\t  ].forEach(function (rule) {\n\t    return pluralize.addIrregularRule(rule[0], rule[1]);\n\t  });\n\n\t  /**\n\t   * Pluralization rules.\n\t   */\n\t  [\n\t    [/s?$/i, 's'],\n\t    [/[^\\u0000-\\u007F]$/i, '$0'],\n\t    [/([^aeiou]ese)$/i, '$1'],\n\t    [/(ax|test)is$/i, '$1es'],\n\t    [/(alias|[^aou]us|t[lm]as|gas|ris)$/i, '$1es'],\n\t    [/(e[mn]u)s?$/i, '$1s'],\n\t    [/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i, '$1'],\n\t    [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'],\n\t    [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'],\n\t    [/(seraph|cherub)(?:im)?$/i, '$1im'],\n\t    [/(her|at|gr)o$/i, '$1oes'],\n\t    [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'],\n\t    [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'],\n\t    [/sis$/i, 'ses'],\n\t    [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'],\n\t    [/([^aeiouy]|qu)y$/i, '$1ies'],\n\t    [/([^ch][ieo][ln])ey$/i, '$1ies'],\n\t    [/(x|ch|ss|sh|zz)$/i, '$1es'],\n\t    [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],\n\t    [/\\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],\n\t    [/(pe)(?:rson|ople)$/i, '$1ople'],\n\t    [/(child)(?:ren)?$/i, '$1ren'],\n\t    [/eaux$/i, '$0'],\n\t    [/m[ae]n$/i, 'men'],\n\t    ['thou', 'you']\n\t  ].forEach(function (rule) {\n\t    return pluralize.addPluralRule(rule[0], rule[1]);\n\t  });\n\n\t  /**\n\t   * Singularization rules.\n\t   */\n\t  [\n\t    [/s$/i, ''],\n\t    [/(ss)$/i, '$1'],\n\t    [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\\w]|^)li)ves$/i, '$1fe'],\n\t    [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'],\n\t    [/ies$/i, 'y'],\n\t    [/\\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'],\n\t    [/\\b(mon|smil)ies$/i, '$1ey'],\n\t    [/\\b((?:tit)?m|l)ice$/i, '$1ouse'],\n\t    [/(seraph|cherub)im$/i, '$1'],\n\t    [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i, '$1'],\n\t    [/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i, '$1sis'],\n\t    [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'],\n\t    [/(test)(?:is|es)$/i, '$1is'],\n\t    [/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'],\n\t    [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'],\n\t    [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'],\n\t    [/(alumn|alg|vertebr)ae$/i, '$1a'],\n\t    [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'],\n\t    [/(matr|append)ices$/i, '$1ix'],\n\t    [/(pe)(rson|ople)$/i, '$1rson'],\n\t    [/(child)ren$/i, '$1'],\n\t    [/(eau)x?$/i, '$1'],\n\t    [/men$/i, 'man']\n\t  ].forEach(function (rule) {\n\t    return pluralize.addSingularRule(rule[0], rule[1]);\n\t  });\n\n\t  /**\n\t   * Uncountable rules.\n\t   */\n\t  [\n\t    // Singular words with no plurals.\n\t    'adulthood',\n\t    'advice',\n\t    'agenda',\n\t    'aid',\n\t    'aircraft',\n\t    'alcohol',\n\t    'ammo',\n\t    'analytics',\n\t    'anime',\n\t    'athletics',\n\t    'audio',\n\t    'bison',\n\t    'blood',\n\t    'bream',\n\t    'buffalo',\n\t    'butter',\n\t    'carp',\n\t    'cash',\n\t    'chassis',\n\t    'chess',\n\t    'clothing',\n\t    'cod',\n\t    'commerce',\n\t    'cooperation',\n\t    'corps',\n\t    'debris',\n\t    'diabetes',\n\t    'digestion',\n\t    'elk',\n\t    'energy',\n\t    'equipment',\n\t    'excretion',\n\t    'expertise',\n\t    'firmware',\n\t    'flounder',\n\t    'fun',\n\t    'gallows',\n\t    'garbage',\n\t    'graffiti',\n\t    'hardware',\n\t    'headquarters',\n\t    'health',\n\t    'herpes',\n\t    'highjinks',\n\t    'homework',\n\t    'housework',\n\t    'information',\n\t    'jeans',\n\t    'justice',\n\t    'kudos',\n\t    'labour',\n\t    'literature',\n\t    'machinery',\n\t    'mackerel',\n\t    'mail',\n\t    'media',\n\t    'mews',\n\t    'moose',\n\t    'music',\n\t    'mud',\n\t    'manga',\n\t    'news',\n\t    'only',\n\t    'personnel',\n\t    'pike',\n\t    'plankton',\n\t    'pliers',\n\t    'police',\n\t    'pollution',\n\t    'premises',\n\t    'rain',\n\t    'research',\n\t    'rice',\n\t    'salmon',\n\t    'scissors',\n\t    'series',\n\t    'sewage',\n\t    'shambles',\n\t    'shrimp',\n\t    'software',\n\t    'species',\n\t    'staff',\n\t    'swine',\n\t    'tennis',\n\t    'traffic',\n\t    'transportation',\n\t    'trout',\n\t    'tuna',\n\t    'wealth',\n\t    'welfare',\n\t    'whiting',\n\t    'wildebeest',\n\t    'wildlife',\n\t    'you',\n\t    /pok[eé]mon$/i,\n\t    // Regexes.\n\t    /[^aeiou]ese$/i, // \"chinese\", \"japanese\"\n\t    /deer$/i, // \"deer\", \"reindeer\"\n\t    /fish$/i, // \"fish\", \"blowfish\", \"angelfish\"\n\t    /measles$/i,\n\t    /o[iu]s$/i, // \"carnivorous\"\n\t    /pox$/i, // \"chickpox\", \"smallpox\"\n\t    /sheep$/i\n\t  ].forEach(pluralize.addUncountableRule);\n\n\t  return pluralize;\n\t}); \n} (pluralize$1));\n\nvar pluralizeExports = pluralize$1.exports;\nvar pluralize = /*@__PURE__*/getDefaultExportFromCjs(pluralizeExports);\n\nexport { pluralize as default };\n","/*! (c) Andrea Giammarchi (ISC) */var hyperHTML=function(N){\"use strict\";var t={};try{t.WeakMap=WeakMap}catch(e){t.WeakMap=function(t,e){var n=e.defineProperty,r=e.hasOwnProperty,i=a.prototype;return i.delete=function(e){return this.has(e)&&delete e[this._]},i.get=function(e){return this.has(e)?e[this._]:void 0},i.has=function(e){return r.call(e,this._)},i.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},a;function a(e){n(this,\"_\",{value:\"_@ungap/weakmap\"+t++}),e&&e.forEach(o,this)}function o(e){this.set(e[0],e[1])}}(Math.random(),Object)}var s=t.WeakMap,i={};try{i.WeakSet=WeakSet}catch(e){!function(e,t){var n=r.prototype;function r(){t(this,\"_\",{value:\"_@ungap/weakmap\"+e++})}n.add=function(e){return this.has(e)||t(e,this._,{value:!0,configurable:!0}),this},n.has=function(e){return this.hasOwnProperty.call(e,this._)},n.delete=function(e){return this.has(e)&&delete e[this._]},i.WeakSet=r}(Math.random(),Object.defineProperty)}function m(e,t,n,r,i,a){for(var o=(\"selectedIndex\"in t),u=o;r<i;){var c,l=e(n[r],1);t.insertBefore(l,a),o&&u&&l.selected&&(u=!u,c=t.selectedIndex,t.selectedIndex=c<0?r:f.call(t.querySelectorAll(\"option\"),l)),r++}}function y(e,t){return e==t}function b(e){return e}function w(e,t,n,r,i,a,o){var u=a-i;if(u<1)return-1;for(;u<=n-t;){for(var c=t,l=i;c<n&&l<a&&o(e[c],r[l]);)c++,l++;if(l===a)return t;t=c+1}return-1}function x(e,t,n,r,i){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:i}function E(e,t,n,r){for(;n<r;)a(e(t[n++],-1))}function C(e,t,n,r,i,a,o,u,c,l,s,f,h){!function(e,t,n,r,i,a,o,u,c){for(var l=[],s=e.length,f=o,h=0;h<s;)switch(e[h++]){case 0:i++,f++;break;case 1:l.push(r[i]),m(t,n,r,i++,i,f<u?t(a[f],0):c);break;case-1:f++}for(h=0;h<s;)switch(e[h++]){case 0:o++;break;case-1:-1<l.indexOf(a[o])?o++:E(t,a,o++,o)}}(function(e,t,n,r,i,a,o){var u,c,l,s,f,h,d=n+a,v=[];e:for(m=0;m<=d;m++){if(50<m)return null;for(h=m-1,s=m?v[m-1]:[0,0],f=v[m]=[],u=-m;u<=m;u+=2){for(c=(l=u===-m||u!==m&&s[h+u-1]<s[h+u+1]?s[h+u+1]:s[h+u-1]+1)-u;l<a&&c<n&&o(r[i+l],e[t+c]);)l++,c++;if(l===a&&c===n)break e;f[m+u]=l}}for(var p=Array(m/2+d/2),g=p.length-1,m=v.length-1;0<=m;m--){for(;0<l&&0<c&&o(r[i+l-1],e[t+c-1]);)p[g--]=0,l--,c--;if(!m)break;h=m-1,s=m?v[m-1]:[0,0],(u=l-c)===-m||u!==m&&s[h+u-1]<s[h+u+1]?(c--,p[g--]=1):(l--,p[g--]=-1)}return p}(n,r,a,o,u,l,f)||function(e,t,n,r,i,a,o,u){var c=0,l=r<u?r:u,s=Array(l++),f=Array(l);f[0]=-1;for(var h=1;h<l;h++)f[h]=o;for(var d=i.slice(a,o),v=t;v<n;v++){var p,g=d.indexOf(e[v]);-1<g&&(-1<(c=k(f,l,p=g+a))&&(f[c]=p,s[c]={newi:v,oldi:p,prev:s[c-1]}))}for(c=--l,--o;f[c]>o;)--c;l=u+r-c;var m=Array(l),y=s[c];for(--n;y;){for(var b=y.newi,w=y.oldi;b<n;)m[--l]=1,--n;for(;w<o;)m[--l]=-1,--o;m[--l]=0,--n,--o,y=y.prev}for(;t<=n;)m[--l]=1,--n;for(;a<=o;)m[--l]=-1,--o;return m}(n,r,i,a,o,u,c,l),e,t,n,r,o,u,s,h)}var e=i.WeakSet,f=[].indexOf,k=function(e,t,n){for(var r=1,i=t;r<i;){var a=(r+i)/2>>>0;n<e[a]?i=a:r=1+a}return r},a=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function l(e,t,n,r){for(var i=(r=r||{}).compare||y,a=r.node||b,o=null==r.before?null:a(r.before,0),u=t.length,c=u,l=0,s=n.length,f=0;l<c&&f<s&&i(t[l],n[f]);)l++,f++;for(;l<c&&f<s&&i(t[c-1],n[s-1]);)c--,s--;var h=l===c,d=f===s;if(h&&d)return n;if(h&&f<s)return m(a,e,n,f,s,x(a,t,l,u,o)),n;if(d&&l<c)return E(a,t,l,c),n;var v=c-l,p=s-f,g=-1;if(v<p){if(-1<(g=w(n,f,s,t,l,c,i)))return m(a,e,n,f,g,a(t[l],0)),m(a,e,n,g+v,s,x(a,t,c,u,o)),n}else if(p<v&&-1<(g=w(t,l,c,n,f,s,i)))return E(a,t,l,g),E(a,t,g+p,c),n;return v<2||p<2?(m(a,e,n,f,s,a(t[l],0)),E(a,t,l,c)):v==p&&function(e,t,n,r,i,a){for(;r<i&&a(n[r],e[t-1]);)r++,t--;return 0===t}(n,s,t,l,c,i)?m(a,e,n,f,s,x(a,t,c,u,o)):C(a,e,n,f,s,p,t,l,c,v,u,i,o),n}var n,r={};function o(e,t){t=t||{};var n=N.createEvent(\"CustomEvent\");return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),n}r.CustomEvent=\"function\"==typeof CustomEvent?CustomEvent:(o[n=\"prototype\"]=new o(\"\").constructor[n],o);var u=r.CustomEvent,c={};try{c.Map=Map}catch(e){c.Map=function(){var n=0,i=[],a=[];return{delete:function(e){var t=r(e);return t&&(i.splice(n,1),a.splice(n,1)),t},forEach:function(n,r){i.forEach(function(e,t){n.call(r,a[t],e,this)},this)},get:function(e){return r(e)?a[n]:void 0},has:r,set:function(e,t){return a[r(e)?n:i.push(e)-1]=t,this}};function r(e){return-1<(n=i.indexOf(e))}}}var h=c.Map;function d(){return this}function v(e,t){var n=\"_\"+e+\"$\";return{get:function(){return this[n]||p(this,n,t.call(this,e))},set:function(e){p(this,n,e)}}}var p=function(e,t,n){return Object.defineProperty(e,t,{configurable:!0,value:\"function\"==typeof n?function(){return e._wire$=n.apply(this,arguments)}:n})[t]};Object.defineProperties(d.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var g,A,S,O,T,M,_={},j={},L=[],P=j.hasOwnProperty,D=0,W={attributes:_,define:function(e,t){e.indexOf(\"-\")<0?(e in j||(D=L.push(e)),j[e]=t):_[e]=t},invoke:function(e,t){for(var n=0;n<D;n++){var r=L[n];if(P.call(e,r))return j[r](e[r],t)}}},$=Array.isArray||(A=(g={}.toString).call([]),function(e){return g.call(e)===A}),R=(S=N,O=\"fragment\",M=\"content\"in H(T=\"template\")?function(e){var t=H(T);return t.innerHTML=e,t.content}:function(e){var t,n=H(O),r=H(T);return F(n,/^[^\\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(e)?(t=RegExp.$1,r.innerHTML=\"<table>\"+e+\"</table>\",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return(\"svg\"===t?function(e){var t=H(O),n=H(\"div\");return n.innerHTML='<svg xmlns=\"http://www.w3.org/2000/svg\">'+e+\"</svg>\",F(t,n.firstChild.childNodes),t}:M)(e)});function F(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function H(e){return e===O?S.createDocumentFragment():S.createElementNS(\"http://www.w3.org/1999/xhtml\",e)}var I,z,V,Z,G,q,B,J,K,Q,U=(z=\"appendChild\",V=\"cloneNode\",Z=\"createTextNode\",q=(G=\"importNode\")in(I=N),(B=I.createDocumentFragment())[z](I[Z](\"g\")),B[z](I[Z](\"\")),(q?I[G](B,!0):B[V](!0)).childNodes.length<2?function e(t,n){for(var r=t[V](),i=t.childNodes||[],a=i.length,o=0;n&&o<a;o++)r[z](e(i[o],n));return r}:q?I[G]:function(e,t){return e[V](!!t)}),X=\"\".trim||function(){return String(this).replace(/^\\s+|\\s+/g,\"\")},Y=\"-\"+Math.random().toFixed(6)+\"%\",ee=!1;try{J=N.createElement(\"template\"),Q=\"tabindex\",(K=\"content\")in J&&(J.innerHTML=\"<p \"+Q+'=\"'+Y+'\"></p>',J[K].childNodes[0].getAttribute(Q)==Y)||(Y=\"_dt: \"+Y.slice(1,-1)+\";\",ee=!0)}catch(e){}var te=\"\\x3c!--\"+Y+\"--\\x3e\",ne=8,re=1,ie=3,ae=/^(?:style|textarea)$/i,oe=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;var ue=\" \\\\f\\\\n\\\\r\\\\t\",ce=\"[^\"+ue+\"\\\\/>\\\"'=]+\",le=\"[\"+ue+\"]+\"+ce,se=\"<([A-Za-z]+[A-Za-z0-9:._-]*)((?:\",fe=\"(?:\\\\s*=\\\\s*(?:'[^']*?'|\\\"[^\\\"]*?\\\"|<[^>]*?>|\"+ce.replace(\"\\\\/\",\"\")+\"))?)\",he=new RegExp(se+le+fe+\"+)([\"+ue+\"]*/?>)\",\"g\"),de=new RegExp(se+le+fe+\"*)([\"+ue+\"]*/>)\",\"g\"),ve=new RegExp(\"(\"+le+\"\\\\s*=\\\\s*)(['\\\"]?)\"+te+\"\\\\2\",\"gi\");function pe(e,t,n,r){return\"<\"+t+n.replace(ve,ge)+r}function ge(e,t,n){return t+(n||'\"')+Y+(n||'\"')}function me(e,t,n){return oe.test(t)?e:\"<\"+t+n+\"></\"+t+\">\"}var ye=ee?function(e,t){var n=t.join(\" \");return t.slice.call(e,0).sort(function(e,t){return n.indexOf(e.name)<=n.indexOf(t.name)?-1:1})}:function(e,t){return t.slice.call(e,0)};function be(e,t,n,r){for(var i=e.childNodes,a=i.length,o=0;o<a;){var u=i[o];switch(u.nodeType){case re:var c=r.concat(o);!function(e,t,n,r){var i,a=e.attributes,o=[],u=[],c=ye(a,n),l=c.length,s=0;for(;s<l;){var f=c[s++],h=f.value===Y;if(h||1<(i=f.value.split(te)).length){var d=f.name;if(o.indexOf(d)<0){o.push(d);var v=n.shift().replace(h?/^(?:|[\\S\\s]*?\\s)(\\S+?)\\s*=\\s*('|\")?$/:new RegExp(\"^(?:|[\\\\S\\\\s]*?\\\\s)(\"+d+\")\\\\s*=\\\\s*('|\\\")[\\\\S\\\\s]*\",\"i\"),\"$1\"),p=a[v]||a[v.toLowerCase()];if(h)t.push(we(p,r,v,null));else{for(var g=i.length-2;g--;)n.shift();t.push(we(p,r,v,i))}}u.push(f)}}l=u.length;var m=(s=0)<l&&ee&&!(\"ownerSVGElement\"in e);for(;s<l;){var y=u[s++];m&&(y.value=\"\"),e.removeAttribute(y.name)}var b=e.nodeName;if(/^script$/i.test(b)){var w=N.createElement(b);for(l=a.length,s=0;s<l;)w.setAttributeNode(a[s++].cloneNode(!0));w.textContent=e.textContent,e.parentNode.replaceChild(w,e)}}(u,t,n,c),be(u,t,n,c);break;case ne:var l=u.textContent;if(l===Y)n.shift(),t.push(ae.test(e.nodeName)?Ne(e,r):{type:\"any\",node:u,path:r.concat(o)});else switch(l.slice(0,2)){case\"/*\":if(\"*/\"!==l.slice(-2))break;case\"👻\":e.removeChild(u),o--,a--}break;case ie:ae.test(e.nodeName)&&X.call(u.textContent)===te&&(n.shift(),t.push(Ne(e,r)))}o++}}function we(e,t,n,r){return{type:\"attr\",node:e,path:t,name:n,sparse:r}}function Ne(e,t){return{type:\"text\",node:e,path:t}}var xe,Ee=(xe=new s,{get:function(e){return xe.get(e)},set:function(e,t){return xe.set(e,t),t}});function Ce(o,f){var e=(o.convert||function(e){return e.join(te).replace(de,me).replace(he,pe)})(f),t=o.transform;t&&(e=t(e));var n=R(e,o.type);Se(n);var u=[];return be(n,u,f.slice(0),[]),{content:n,updates:function(c){for(var l=[],s=u.length,e=0,t=0;e<s;){var n=u[e++],r=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(c,n.path);switch(n.type){case\"any\":l.push({fn:o.any(r,[]),sparse:!1});break;case\"attr\":var i=n.sparse,a=o.attribute(r,n.name,n.node);null===i?l.push({fn:a,sparse:!1}):(t+=i.length-2,l.push({fn:a,sparse:!0,values:i}));break;case\"text\":l.push({fn:o.text(r),sparse:!1}),r.textContent=\"\"}}return s+=t,function(){var e=arguments.length;if(s!==e-1)throw new Error(e-1+\" values instead of \"+s+\"\\n\"+f.join(\"${value}\"));for(var t=1,n=1;t<e;){var r=l[t-n];if(r.sparse){var i=r.values,a=i[0],o=1,u=i.length;for(n+=u-2;o<u;)a+=arguments[t++]+i[o++];r.fn(a)}else r.fn(arguments[t++])}return c}}}}var ke=[];function Ae(i){var a=ke,o=Se;return function(e){var t,n,r;return a!==e&&(t=i,n=a=e,r=Ee.get(n)||Ee.set(n,Ce(t,n)),o=r.updates(U.call(N,r.content,!0))),o.apply(null,arguments)}}function Se(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===X.call(r.textContent).length&&e.removeChild(r)}}var Oe,Te,Me=(Oe=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Te=/([^A-Z])([A-Z]+)/g,function(e,t){return\"ownerSVGElement\"in e?function(e,t){var n;return(n=t?t.cloneNode(!0):(e.setAttribute(\"style\",\"--hyper:style;\"),e.getAttributeNode(\"style\"))).value=\"\",e.setAttributeNode(n),je(n,!0)}(e,t):je(e.style,!1)});function _e(e,t,n){return t+\"-\"+n.toLowerCase()}function je(a,o){var u,c;return function(e){var t,n,r,i;switch(typeof e){case\"object\":if(e){if(\"object\"===u){if(!o&&c!==e)for(n in c)n in e||(a[n]=\"\")}else o?a.value=\"\":a.cssText=\"\";for(n in t=o?{}:a,e)r=\"number\"!=typeof(i=e[n])||Oe.test(n)?i:i+\"px\",!o&&/^--/.test(n)?t.setProperty(n,r):t[n]=r;u=\"object\",o?a.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Te,_e),\":\",e[t],\";\");return n.join(\"\")}(c=t):c=e;break}default:c!=e&&(u=\"string\",c=e,o?a.value=e||\"\":a.cssText=e||\"\")}}}var Le,Pe,De=(Le=[].slice,(Pe=We.prototype).ELEMENT_NODE=1,Pe.nodeType=111,Pe.remove=function(e){var t,n=this.childNodes,r=this.firstChild,i=this.lastChild;return this._=null,e&&2===n.length?i.parentNode.removeChild(i):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(i),t.deleteContents()),r},Pe.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,i=0,a=r.length;i<a;i++)t.appendChild(r[i]);return t},We);function We(e){var t=this.childNodes=Le.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function $e(e){return{html:e}}function Re(e,t){switch(e.nodeType){case Ke:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Je:return Re(e.render(),t);default:return e}}function Fe(e,t){t(e.placeholder),\"text\"in e?Promise.resolve(e.text).then(String).then(t):\"any\"in e?Promise.resolve(e.any).then(t):\"html\"in e?Promise.resolve(e.html).then($e).then(t):Promise.resolve(W.invoke(e,t)).then(t)}function He(e){return null!=e&&\"then\"in e}var Ie,ze,Ve,Ze,Ge,qe=\"ownerSVGElement\",Be=\"connected\",Je=d.prototype.nodeType,Ke=De.prototype.nodeType,Qe=(ze=(Ie={Event:u,WeakSet:e}).Event,Ve=Ie.WeakSet,Ze=!0,Ge=null,function(e){return Ze&&(Ze=!Ze,Ge=new Ve,function(t){var i=new Ve,a=new Ve;try{new MutationObserver(u).observe(t,{subtree:!0,childList:!0})}catch(e){var n=0,r=[],o=function(e){r.push(e),clearTimeout(n),n=setTimeout(function(){u(r.splice(n=0,r.length))},0)};t.addEventListener(\"DOMNodeRemoved\",function(e){o({addedNodes:[],removedNodes:[e.target]})},!0),t.addEventListener(\"DOMNodeInserted\",function(e){o({addedNodes:[e.target],removedNodes:[]})},!0)}function u(e){for(var t,n=e.length,r=0;r<n;r++)c((t=e[r]).removedNodes,\"disconnected\",a,i),c(t.addedNodes,\"connected\",i,a)}function c(e,t,n,r){for(var i,a=new ze(t),o=e.length,u=0;u<o;1===(i=e[u++]).nodeType&&function e(t,n,r,i,a){Ge.has(t)&&!i.has(t)&&(a.delete(t),i.add(t),t.dispatchEvent(n));for(var o=t.children||[],u=o.length,c=0;c<u;e(o[c++],n,r,i,a));}(i,a,t,n,r));}}(e.ownerDocument)),Ge.add(e),e}),Ue=/^(?:form|list)$/i,Xe=[].slice;function Ye(e){return this.type=e,Ae(this)}var et=!(Ye.prototype={attribute:function(n,r,e){var i,t=qe in n;if(\"style\"===r)return Me(n,e,t);if(\".\"===r.slice(0,1))return l=n,s=r.slice(1),t?function(t){try{l[s]=t}catch(e){l.setAttribute(s,t)}}:function(e){l[s]=e};if(\"?\"===r.slice(0,1))return o=n,u=r.slice(1),function(e){c!==!!e&&((c=!!e)?o.setAttribute(u,\"\"):o.removeAttribute(u))};if(/^on/.test(r)){var a=r.slice(2);return a===Be||\"disconnected\"===a?Qe(n):r.toLowerCase()in n&&(a=a.toLowerCase()),function(e){i!==e&&(i&&n.removeEventListener(a,i,!1),(i=e)&&n.addEventListener(a,e,!1))}}if(\"data\"===r||!t&&r in n&&!Ue.test(r))return function(e){i!==e&&(i=e,n[r]!==e&&null==e?(n[r]=\"\",n.removeAttribute(r)):n[r]=e)};if(r in W.attributes)return function(e){var t=W.attributes[r](n,e);i!==t&&(null==(i=t)?n.removeAttribute(r):n.setAttribute(r,t))};var o,u,c,l,s,f=!1,h=e.cloneNode(!0);return function(e){i!==e&&(i=e,h.value!==e&&(null==e?(f&&(f=!1,n.removeAttributeNode(h)),h.value=e):(h.value=e,f||(f=!0,n.setAttributeNode(h)))))}},any:function(r,i){var a,o={node:Re,before:r},u=qe in r?\"svg\":\"html\",c=!1;return function e(t){switch(typeof t){case\"string\":case\"number\":case\"boolean\":c?a!==t&&(a=t,i[0].textContent=t):(c=!0,a=t,i=l(r.parentNode,i,[(n=t,r.ownerDocument.createTextNode(n))],o));break;case\"function\":e(t(r));break;case\"object\":case\"undefined\":if(null==t){c=!1,i=l(r.parentNode,i,[],o);break}default:if(c=!1,$(a=t))if(0===t.length)i.length&&(i=l(r.parentNode,i,[],o));else switch(typeof t[0]){case\"string\":case\"number\":case\"boolean\":e({html:t});break;case\"object\":if($(t[0])&&(t=t.concat.apply([],t)),He(t[0])){Promise.all(t).then(e);break}default:i=l(r.parentNode,i,t,o)}else\"ELEMENT_NODE\"in t?i=l(r.parentNode,i,11===t.nodeType?Xe.call(t.childNodes):[t],o):He(t)?t.then(e):\"placeholder\"in t?Fe(t,e):\"text\"in t?e(String(t.text)):\"any\"in t?e(t.any):\"html\"in t?i=l(r.parentNode,i,Xe.call(R([].concat(t.html).join(\"\"),u).childNodes),o):\"length\"in t?e(Xe.call(t)):e(W.invoke(t,e))}var n}},text:function(r){var i;return function e(t){var n;i!==t&&(\"object\"==(n=typeof(i=t))&&t?He(t)?t.then(e):\"placeholder\"in t?Fe(t,e):\"text\"in t?e(String(t.text)):\"any\"in t?e(t.any):\"html\"in t?e([].concat(t.html).join(\"\")):\"length\"in t?e(Xe.call(t).join(\"\")):e(W.invoke(t,e)):\"function\"==n?e(t(r)):r.textContent=null==t?\"\":t)}}}),tt=function(e){var t,r,i,a,n=(t=(N.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\\/(\\d+)/.test(t)&&!/(Chrom[eium]+|Android)\\/(\\d+)/.test(t)),o=!(\"raw\"in e)||e.propertyIsEnumerable(\"raw\")||!Object.isFrozen(e.raw);return n||o?(r={},i=function(e){for(var t=\".\",n=0;n<e.length;n++)t+=e[n].length+\".\"+e[n];return r[t]||(r[t]=e)},tt=o?i:(a=new s,function(e){return a.get(e)||(n=i(t=e),a.set(t,n),n);var t,n})):et=!0,nt(e)};function nt(e){return et?e:tt(e)}function rt(e){for(var t=arguments.length,n=[nt(e)],r=1;r<t;)n.push(arguments[r++]);return n}var it=new s,at=function(t){var n,r,i;return function(){var e=rt.apply(null,arguments);return i!==e[0]?(i=e[0],r=new Ye(t),n=ut(r.apply(r,e))):r.apply(r,e),n}},ot=function(e,t){var n=t.indexOf(\":\"),r=it.get(e),i=t;return-1<n&&(i=t.slice(n+1),t=t.slice(0,n)||\"html\"),r||it.set(e,r={}),r[i]||(r[i]=at(t))},ut=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new De(t):e},ct=new s;function lt(){var e=ct.get(this),t=rt.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ye(qe in this?\"svg\":\"html\");ct.set(this,{tagger:t,template:e}),this.textContent=\"\",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var st,ft,ht,dt,vt=W.define,pt=Ye.prototype;function gt(e){return arguments.length<2?null==e?at(\"html\"):\"string\"==typeof e?gt.wire(null,e):\"raw\"in e?at(\"html\")(e):\"nodeType\"in e?gt.bind(e):ot(e,\"html\"):(\"raw\"in e?at(\"html\"):gt.wire).apply(null,arguments)}return gt.Component=d,gt.bind=function(e){return lt.bind(e)},gt.define=vt,gt.diff=l,(gt.hyper=gt).observe=Qe,gt.tagger=pt,gt.wire=function(e,t){return null==e?at(t||\"html\"):ot(e,t||\"html\")},gt._={WeakMap:s,WeakSet:e},st=at,ft=new s,ht=Object.create,dt=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(d,{for:{configurable:!0,value:function(e,t){return function(e,t,n,r){var i,a,o,u=t.get(e)||dt(e,t);switch(typeof r){case\"object\":case\"function\":var c=u.w||(u.w=new s);return c.get(r)||(i=c,a=r,o=new e(n),i.set(a,o),o);default:var l=u.p||(u.p=ht(null));return l[r]||(l[r]=new e(n))}}(this,ft.get(e)||(n=e,r=new h,ft.set(n,r),r),e,null==t?\"default\":t);var n,r}}}),Object.defineProperties(d.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this[\"getAttribute\"in t&&t.getAttribute(\"data-call\")||\"on\"+e.type](e)}},html:v(\"html\",st),svg:v(\"svg\",st),state:v(\"state\",function(){return this.defaultState}),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new u(e,{bubbles:!0,cancelable:!0,detail:t});return r.component=this,(n.dispatchEvent?n:n.firstChild).dispatchEvent(r)}return!1}},setState:{value:function(e,t){var n=this.state,r=\"function\"==typeof e?e.call(this,n):e;for(var i in r)n[i]=r[i];return!1!==t&&this.render(),this}}}),gt}(document);\nexport default hyperHTML;\nexport const {Component, bind, define, diff, hyper, wire} = hyperHTML;\n","// @ts-check\n// Temporary workaround until browsers get real import-maps\n\nimport * as _idb from \"../../node_modules/idb/build/index.js\";\nimport * as _webidl2 from \"../../node_modules/webidl2/index.js\";\nimport { MIMEType as _MIMEType } from \"../../node_modules/sniffy-mimetype/index.js\";\nimport { marked as _marked } from \"../../node_modules/marked/lib/marked.esm.js\";\nimport _pluralize from \"../../js/deps/builds/pluralize.js\";\nimport hyperHTML from \"../../node_modules/hyperhtml/esm.js\";\n\nexport const html = hyperHTML;\nexport const idb = _idb;\nexport const marked = _marked;\nexport const MIMEType = _MIMEType;\nexport const pluralize = _pluralize;\nexport const webidl2 = _webidl2;\n\n// dinamycally import mermaid to avoid increase of size of the library\n// @ts-ignore\nexport const mermaidModule =\n  \"https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs\";\n","// @ts-check\n// Module core/utils\n// As the name implies, this contains a ragtag gang of methods that just don't fit\n// anywhere else.\nimport { lang as docLang } from \"./l10n.js\";\nimport { html } from \"./import-maps.js\";\nimport { pub } from \"./pubsubhub.js\";\nexport const name = \"core/utils\";\n\nconst dashes = /-/g;\n\n/**\n * Hashes a string from char code. Can return a negative number.\n * Based on https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0\n * @param {String} text\n */\nfunction hashString(text) {\n  let hash = 0;\n  for (const char of text) {\n    hash = (Math.imul(31, hash) + char.charCodeAt(0)) | 0;\n  }\n  return String(hash);\n}\n\n// https://stackoverflow.com/a/58633686\nexport const ISODate = new Intl.DateTimeFormat([\"sv-SE\"], {\n  timeZone: \"UTC\",\n  year: \"numeric\",\n  month: \"2-digit\",\n  day: \"2-digit\",\n});\n\n// We use an \"Australian Date\" because it omits the \",\"\n// after the day of the month, which is required by the W3C.\nconst dateLang =\n  docLang === \"en\" || docLang.startsWith(\"en-\") ? \"en-AU\" : docLang;\nexport const W3CDate = new Intl.DateTimeFormat(dateLang, {\n  timeZone: \"UTC\",\n  year: \"numeric\",\n  month: \"long\",\n  day: dateLang === \"en-AU\" ? \"2-digit\" : \"numeric\",\n});\n\n/** CSS selector for matching elements that are non-normative */\nexport const nonNormativeSelector =\n  \".informative, .note, .issue, .example, .ednote, .practice, .introductory\";\n\n/**\n * Creates a link element that represents a resource hint.\n *\n * @param {ResourceHintOption} opts Configure the resource hint.\n * @return {HTMLLinkElement} A link element ready to use.\n */\nexport function createResourceHint(opts) {\n  const url = new URL(opts.href, document.baseURI);\n  const linkElem = document.createElement(\"link\");\n  let { href } = url;\n  linkElem.rel = opts.hint;\n  switch (linkElem.rel) {\n    case \"dns-prefetch\":\n    case \"preconnect\":\n      href = url.origin;\n      if (opts.corsMode || url.origin !== document.location.origin) {\n        linkElem.crossOrigin = opts.corsMode || \"anonymous\";\n      }\n      break;\n    case \"preload\":\n      if (\"as\" in opts) {\n        linkElem.setAttribute(\"as\", opts.as);\n      }\n      if (opts.corsMode) {\n        linkElem.crossOrigin = opts.corsMode;\n      }\n      break;\n  }\n  linkElem.href = href;\n  if (!opts.dontRemove) {\n    linkElem.classList.add(\"removeOnSave\");\n  }\n  return linkElem;\n}\n\n// RESPEC STUFF\n/**\n * @param {Document} doc\n */\nexport function removeReSpec(doc) {\n  doc.querySelectorAll(\".remove, script[data-requiremodule]\").forEach(elem => {\n    elem.remove();\n  });\n}\n\n/**\n * Adds error class to each element while emitting a warning\n * @param {HTMLElement} elem\n * @param {String} msg message to show in warning\n * @param {String=} title error message to add on each element\n */\nfunction markAsOffending(elem, msg, title) {\n  elem.classList.add(\"respec-offending-element\");\n  if (!elem.hasAttribute(\"title\")) {\n    elem.setAttribute(\"title\", title || msg);\n  }\n  if (!elem.id) {\n    addId(elem, \"respec-offender\");\n  }\n}\n\n// STRING HELPERS\n/**\n * @param {\"conjunction\"|\"disjunction\"} type\n * @param {\"long\"|\"narrow\"} style\n */\nfunction joinFactory(type, style = \"long\") {\n  const formatter = new Intl.ListFormat(docLang, { style, type });\n  /**\n   * @template T\n   * @param {string[]} items\n   * @param {(value: string, index: number, array: string[]) => any} [mapper]\n   */\n  return (items, mapper) => {\n    let elemCount = 0;\n    return formatter.formatToParts(items).map(({ type, value }) => {\n      if (type === \"element\" && mapper) {\n        return mapper(value, elemCount++, items);\n      }\n      return value;\n    });\n  };\n}\n\n/**\n * Takes an array and returns a string that separates each of its items with the\n * proper commas and \"and\". The second argument is a mapping function that can\n * convert the items before they are joined.\n */\nconst conjunction = joinFactory(\"conjunction\");\nconst disjunction = joinFactory(\"disjunction\");\n\n/**\n *\n * @param {string[]} items\n * @param {(value: undefined, index: number, array: undefined[]) => string} [mapper]\n */\nexport function joinAnd(items, mapper) {\n  return conjunction(items, mapper).join(\"\");\n}\n\n/**\n *\n * @param {string[]} items\n * @param {(value: undefined, index: number, array: undefined[]) => string} [mapper]\n */\nexport function joinOr(items, mapper) {\n  return disjunction(items, mapper).join(\"\");\n}\n\n/**\n * Takes a string, applies some XML escapes, and returns the escaped string.\n * @param {string} str\n */\nexport function xmlEscape(str) {\n  return str\n    .replace(/&/g, \"&amp;\")\n    .replace(/>/g, \"&gt;\")\n    .replace(/\"/g, \"&quot;\")\n    .replace(/</g, \"&lt;\");\n}\n\n/**\n * Trims string at both ends and replaces all other white space with a single\n * space.\n * @param {string} str\n */\nexport function norm(str) {\n  return str.trim().replace(/\\s+/g, \" \");\n}\n\n/**\n * @template {Record<string, Record<string, string|Function>>} T\n * @param {T} localizationStrings\n * @returns {T[keyof T]}\n */\nexport function getIntlData(localizationStrings, lang = docLang) {\n  lang = lang.toLowerCase();\n  // Proxy return type is a known bug:\n  // https://github.com/Microsoft/TypeScript/issues/20846\n  // @ts-expect-error\n  return new Proxy(localizationStrings, {\n    /** @param {string} key */\n    get(data, key) {\n      const result = getIntlDataForKey(data, key, lang) || data.en[key];\n      if (!result) {\n        throw new Error(`No l10n data for key: \"${key}\"`);\n      }\n      return result;\n    },\n  });\n}\n\n/**\n * @template {Record<string, Record<string, string|Function>>} T\n * @param {T} localizationStrings\n * @param {string} key\n */\nexport function getIntlDataForKey(localizationStrings, key, lang = docLang) {\n  lang = lang.toLowerCase();\n  return (\n    localizationStrings[lang]?.[key] ||\n    localizationStrings[lang.match(/^(\\w{2,3})-.+$/)?.[1]]?.[key]\n  );\n}\n\n// --- DATE HELPERS -------------------------------------------------------------------------------\n/**\n * Takes a Date object and an optional separator and returns the year,month,day\n * representation with the custom separator (defaulting to none) and proper\n * 0-padding.\n * @param {Date} date\n */\nexport function concatDate(date, sep = \"\") {\n  return ISODate.format(date).replace(dashes, sep);\n}\n\n/**\n * Checks if a date is in expected format used by ReSpec (yyyy-mm-dd)\n * @param {string} rawDate\n */\nexport function isValidConfDate(rawDate) {\n  const date = /\\d{4}-\\d{2}-\\d{2}/.test(rawDate)\n    ? new Date(rawDate)\n    : \"Invalid Date\";\n  return date.toString() !== \"Invalid Date\";\n}\n\n/**\n * Given an object, it converts it to a key value pair separated by (\"=\", configurable) and a delimiter (\" ,\" configurable).\n * @example {\"foo\": \"bar\", \"baz\": 1} becomes \"foo=bar, baz=1\"\n * @param {Record<string, any>} obj\n */\nexport function toKeyValuePairs(obj, delimiter = \", \", separator = \"=\") {\n  return Array.from(Object.entries(obj))\n    .map(([key, value]) => `${key}${separator}${JSON.stringify(value)}`)\n    .join(delimiter);\n}\n\n// STYLE HELPERS\n/**\n * Take a document and either a link or an array of links to CSS and appends a\n * `<link rel=\"stylesheet\">` element to the head pointing to each.\n * @param {Document} doc\n * @param {string | string[]} urls\n */\nexport function linkCSS(doc, urls) {\n  const stylesArray = [].concat(urls);\n  const frag = stylesArray\n    .map(url => {\n      const link = doc.createElement(\"link\");\n      link.rel = \"stylesheet\";\n      link.href = url;\n      return link;\n    })\n    .reduce((elem, nextLink) => {\n      elem.appendChild(nextLink);\n      return elem;\n    }, doc.createDocumentFragment());\n  doc.head.appendChild(frag);\n}\n\n// TRANSFORMATIONS\n\n/**\n * Run list of transforms over content and return result.\n *\n * Please note that this is a legacy method that is only kept in order to\n * maintain compatibility with RSv1. It is therefore not tested and not actively\n * supported.\n * @this {any}\n * @param {string} content\n * @param {string} [flist] List of global function names.\n * @param {unknown[]} [funcArgs] Arguments to pass to each function.\n */\nexport function runTransforms(content, flist, ...funcArgs) {\n  const args = [this, content, ...funcArgs];\n  if (flist) {\n    const methods = flist.split(/\\s+/);\n    for (const meth of methods) {\n      /** @type {any} */\n      const method = window[meth];\n      if (method) {\n        // the initial call passed |this| directly, so we keep it that way\n        try {\n          content = method.apply(this, args);\n        } catch (e) {\n          const msg = `call to \\`${meth}()\\` failed with: ${e}.`;\n          const hint = \"See developer console for stack trace.\";\n          showWarning(msg, \"utils/runTransforms\", { hint });\n          console.error(e);\n        }\n      }\n    }\n  }\n  return content;\n}\n\n/**\n * Cached request handler\n * @param {RequestInfo} input\n * @param {number} maxAge cache expiration duration in ms. defaults to 24 hours\n * @return {Promise<Response>}\n *  if a cached response is available and it's not stale, return it\n *  else: request from network, cache and return fresh response.\n *    If network fails, return a stale cached version if exists (else throw)\n */\nexport async function fetchAndCache(input, maxAge = 24 * 60 * 60 * 1000) {\n  const request = new Request(input);\n  const url = new URL(request.url);\n\n  // use data from cache data if valid and render\n  let cache;\n  let cachedResponse;\n  if (\"caches\" in window) {\n    try {\n      cache = await caches.open(url.origin);\n      cachedResponse = await cache.match(request);\n      if (\n        cachedResponse &&\n        new Date(cachedResponse.headers.get(\"Expires\")) > new Date()\n      ) {\n        return cachedResponse;\n      }\n    } catch (err) {\n      console.error(\"Failed to use Cache API.\", err);\n    }\n  }\n\n  // otherwise fetch new data and cache\n  const response = await fetch(request);\n  if (!response.ok) {\n    if (cachedResponse) {\n      // return stale version\n      console.warn(`Returning a stale cached response for ${url}`);\n      return cachedResponse;\n    }\n  }\n\n  // cache response\n  if (cache && response.ok) {\n    const clonedResponse = response.clone();\n    const customHeaders = new Headers(response.headers);\n    const expiryDate = new Date(Date.now() + maxAge);\n    customHeaders.set(\"Expires\", expiryDate.toISOString());\n    const cacheResponse = new Response(await clonedResponse.blob(), {\n      headers: customHeaders,\n    });\n    // put in cache, and forget it (there is no recovery if it throws, but that's ok).\n    await cache.put(request, cacheResponse).catch(console.error);\n  }\n  return response;\n}\n\n// --- DOM HELPERS -------------------------------\n\n/**\n * Separates each item with proper commas.\n * @template T\n * @param {T[]} array\n * @param {(item: T) => any} [mapper]\n */\nexport function htmlJoinComma(array, mapper = item => item) {\n  const items = array.map(mapper);\n  const joined = items.slice(0, -1).map(item => html`${item}, `);\n  return html`${joined}${items[items.length - 1]}`;\n}\n/**\n *\n * @param {string[]} array\n * @param {(item: any) => any[]} [mapper]\n */\nexport function htmlJoinAnd(array, mapper) {\n  const result = [].concat(conjunction(array, mapper));\n  return result.map(item => (typeof item === \"string\" ? html`${item}` : item));\n}\n\n/**\n * Creates and sets an ID to an element (elem) by hashing the text content.\n *\n * @param {HTMLElement} elem element to hash from\n * @param {String} prefix prefix to prepend to the generated id\n */\nexport function addHashId(elem, prefix = \"\") {\n  const text = norm(elem.textContent);\n  const hash = hashString(text);\n  return addId(elem, prefix, hash);\n}\n\n/**\n * Creates and sets an ID to an element (elem) using a specific prefix if\n * provided, and a specific text if given.\n * @param {HTMLElement} elem element\n * @param {String} pfx prefix\n * @param {String} txt text\n * @param {Boolean} noLC do not convert to lowercase\n * @returns {String} generated (or existing) id for element\n */\nexport function addId(elem, pfx = \"\", txt = \"\", noLC = false) {\n  if (elem.id) {\n    return elem.id;\n  }\n  if (!txt) {\n    txt = (elem.title ? elem.title : elem.textContent).trim();\n  }\n  let id = noLC ? txt : txt.toLowerCase();\n  id = id\n    .trim()\n    .normalize(\"NFD\")\n    .replace(/[\\u0300-\\u036f]/g, \"\")\n    .replace(/\\W+/gim, \"-\")\n    .replace(/^-+/, \"\")\n    .replace(/-+$/, \"\");\n\n  if (!id) {\n    id = \"generatedID\";\n  } else if (/\\.$/.test(id) || !/^[a-z]/i.test(pfx || id)) {\n    id = `x${id}`; // trailing . doesn't play well with jQuery\n  }\n  if (pfx) {\n    id = `${pfx}-${id}`;\n  }\n  if (elem.ownerDocument.getElementById(id)) {\n    let i = 0;\n    let nextId = `${id}-${i}`;\n    while (elem.ownerDocument.getElementById(nextId)) {\n      i += 1;\n      nextId = `${id}-${i}`;\n    }\n    id = nextId;\n  }\n  elem.id = id;\n  return id;\n}\n\n/**\n * Returns all the descendant text nodes of an element.\n * @param {Node} el\n * @param {string[]} exclusions node localName to exclude\n * @param {object} options\n * @param {boolean} options.wsNodes return only whitespace-only nodes.\n * @returns {Text[]}\n */\nexport function getTextNodes(el, exclusions = [], options = { wsNodes: true }) {\n  const exclusionQuery = exclusions.join(\", \");\n  const acceptNode = (/** @type {Text} */ node) => {\n    if (!options.wsNodes && !node.data.trim()) {\n      return NodeFilter.FILTER_REJECT;\n    }\n    if (exclusionQuery && node.parentElement.closest(exclusionQuery)) {\n      return NodeFilter.FILTER_REJECT;\n    }\n    return NodeFilter.FILTER_ACCEPT;\n  };\n  const nodeIterator = document.createNodeIterator(\n    el,\n    NodeFilter.SHOW_TEXT,\n    acceptNode\n  );\n  /** @type {Text[]} */\n  const textNodes = [];\n  let node;\n  while ((node = nodeIterator.nextNode())) {\n    textNodes.push(/** @type {Text} */ (node));\n  }\n  return textNodes;\n}\n\n/**\n * For any element, returns an array of title strings that applies the algorithm\n * used for determining the actual title of a `<dfn>` element (but can apply to\n * other as well).\n *\n * This method now *prefers* the `data-lt` attribute for the list of titles.\n * That attribute is added by this method to `<dfn>` elements, so subsequent\n * calls to this method will return the `data-lt` based list.\n * @param {HTMLElement} elem\n * @returns {String[]} array of title strings\n */\nexport function getDfnTitles(elem) {\n  const titleSet = new Set();\n  // data-lt-noDefault avoid using the text content of a definition\n  // in the definition list.\n  // ltNodefault is === \"data-lt-noDefault\"... someone screwed up 😖\n  const normText = \"ltNodefault\" in elem.dataset ? \"\" : norm(elem.textContent);\n  const child = /** @type {HTMLElement | undefined} */ (elem.children[0]);\n  if (elem.dataset.lt) {\n    // prefer @data-lt for the list of title aliases\n    elem.dataset.lt\n      .split(\"|\")\n      .map(item => norm(item))\n      .forEach(item => titleSet.add(item));\n  } else if (\n    elem.childNodes.length === 1 &&\n    elem.getElementsByTagName(\"abbr\").length === 1 &&\n    child.title\n  ) {\n    titleSet.add(child.title);\n  } else if (elem.textContent === '\"\"') {\n    titleSet.add(\"the-empty-string\");\n  }\n\n  titleSet.add(normText);\n  titleSet.delete(\"\");\n\n  // We could have done this with @data-lt (as the logic is same), but if\n  // @data-lt was not present, we would end up using @data-local-lt as element's\n  // id (in other words, we prefer textContent over @data-local-lt for dfn id)\n  if (elem.dataset.localLt) {\n    const localLt = elem.dataset.localLt.split(\"|\");\n    localLt.forEach(item => titleSet.add(norm(item)));\n  }\n\n  const titles = [...titleSet];\n  return titles;\n}\n\n/**\n * For an element (usually <a>), returns an array of targets that element might\n * refer to, in the object structure:\n * @typedef {object} LinkTarget\n * @property {string} for\n * @property {string} title\n *\n * For an element like:\n *  <p data-link-for=\"Int1\"><a data-link-for=\"Int2\">Int3.member</a></p>\n * we'll return:\n *  * {for: \"int2\", title: \"int3.member\"}\n *  * {for: \"int3\", title: \"member\"}\n *  * {for: \"\", title: \"int3.member\"}\n * @param {HTMLElement} elem\n * @returns {LinkTarget[]}\n */\nexport function getLinkTargets(elem) {\n  /** @type {HTMLElement} */\n  const linkForElem = elem.closest(\"[data-link-for]\");\n  const linkFor = linkForElem ? linkForElem.dataset.linkFor : \"\";\n  const titles = getDfnTitles(elem);\n  const results = titles.reduce((result, title) => {\n    // supports legacy <dfn>Foo.Bar()</dfn> definitions\n    const split = title.split(\".\");\n    if (split.length === 2) {\n      // If there are multiple '.'s, this won't match an\n      // Interface/member pair anyway.\n      result.push({ for: split[0], title: split[1] });\n    }\n    result.push({ for: linkFor, title });\n    if (!linkForElem) result.push({ for: title, title });\n\n    // Finally, we can try to match without link for\n    if (linkFor !== \"\") result.push({ for: \"\", title });\n    return result;\n  }, []);\n  return results;\n}\n\n/**\n * Changes name of a DOM Element\n * @param {Element} elem element to rename\n * @param {String} newName new element name\n * @param {Object} options\n * @param {boolean} options.copyAttributes\n *\n * @returns {Element} new renamed element\n */\nexport function renameElement(\n  elem,\n  newName,\n  options = { copyAttributes: true }\n) {\n  if (elem.localName === newName) return elem;\n  const newElement = elem.ownerDocument.createElement(newName);\n  // copy attributes\n  if (options.copyAttributes) {\n    for (const { name, value } of elem.attributes) {\n      newElement.setAttribute(name, value);\n    }\n  }\n  // copy child nodes\n  newElement.append(...elem.childNodes);\n  elem.replaceWith(newElement);\n  return newElement;\n}\n\n/**\n * @param {string} ref\n * @param {HTMLElement} element\n */\nexport function refTypeFromContext(ref, element) {\n  const closestInformative = element.closest(nonNormativeSelector);\n  let isInformative = false;\n  if (closestInformative) {\n    // check if parent is not normative\n    isInformative =\n      !element.closest(\".normative\") ||\n      !closestInformative.querySelector(\".normative\");\n  }\n  // prefixes `!` and `?` override section behavior\n  if (ref.startsWith(\"!\")) {\n    if (isInformative) {\n      // A (forced) normative reference in informative section is illegal\n      return { type: \"informative\", illegal: true };\n    }\n    isInformative = false;\n  } else if (ref.startsWith(\"?\")) {\n    isInformative = true;\n  }\n  const type = isInformative ? \"informative\" : \"normative\";\n  return { type, illegal: false };\n}\n\n/**\n * Wraps inner contents with the wrapper node\n * @param {Node} outer outer node to be modified\n * @param {Element} wrapper wrapper node to be appended\n */\nexport function wrapInner(outer, wrapper) {\n  wrapper.append(...outer.childNodes);\n  outer.appendChild(wrapper);\n  return outer;\n}\n\n/**\n * @param {Element} element\n */\nexport function getPreviousSections(element) {\n  /** @type {Element[]} */\n  const sections = [];\n  for (const previous of iteratePreviousElements(element)) {\n    if (previous.localName === \"section\") {\n      sections.push(previous);\n    }\n  }\n  return sections;\n}\n\n/**\n * @param {Element} element\n */\nfunction* iteratePreviousElements(element) {\n  let previous = element;\n  while (previous.previousElementSibling) {\n    previous = previous.previousElementSibling;\n    yield previous;\n  }\n}\n/**\n * Applies the selector for all its ancestors.\n * @param {Element} element\n * @param {string} selector\n */\nexport function parents(element, selector) {\n  /** @type {Element[]} */\n  const list = [];\n  let parent = element.parentElement;\n  while (parent) {\n    const closest = parent.closest(selector);\n    if (!closest) {\n      break;\n    }\n    list.push(closest);\n    parent = closest.parentElement;\n  }\n  return list;\n}\n\n/**\n * Calculates indentation when the element starts after a newline. The value\n * will be empty if no newline or any non-whitespace exists after one.\n * @param {Element} element\n *\n * @example `    <div></div>` returns \"    \" (4 spaces).\n */\nexport function getElementIndentation(element) {\n  const { previousSibling } = element;\n  if (!previousSibling || previousSibling.nodeType !== Node.TEXT_NODE) {\n    return \"\";\n  }\n  const index = previousSibling.textContent.lastIndexOf(\"\\n\");\n  if (index === -1) {\n    return \"\";\n  }\n  const slice = previousSibling.textContent.slice(index + 1);\n  if (/\\S/.test(slice)) {\n    return \"\";\n  }\n  return slice;\n}\n\n/**\n * Generates simple ids. The id's increment after it yields.\n *\n * @param {String} namespace A string like \"highlight\".\n * @param {number} counter A number, which can start at a given value.\n */\nexport function msgIdGenerator(namespace, counter = 0) {\n  /** @returns {Generator<string, never, never>}  */\n  function* idGenerator(namespace, counter) {\n    while (true) {\n      yield `${namespace}:${counter}`;\n      counter++;\n    }\n  }\n  const gen = idGenerator(namespace, counter);\n  return () => {\n    return gen.next().value;\n  };\n}\n\n/** @extends {Set<string>} */\nexport class InsensitiveStringSet extends Set {\n  /**\n   * @param {Array<String>} [keys] Optional, initial keys\n   */\n  constructor(keys = []) {\n    super();\n    for (const key of keys) {\n      this.add(key);\n    }\n  }\n  /**\n   * @param {string} key\n   */\n  add(key) {\n    if (!this.has(key) && !this.getCanonicalKey(key)) {\n      return super.add(key);\n    }\n    return this;\n  }\n  /**\n   * @param {string} key\n   */\n  has(key) {\n    return (\n      super.has(key) ||\n      [...this.keys()].some(\n        existingKey => existingKey.toLowerCase() === key.toLowerCase()\n      )\n    );\n  }\n  /**\n   * @param {string} key\n   */\n  delete(key) {\n    return super.has(key)\n      ? super.delete(key)\n      : super.delete(this.getCanonicalKey(key));\n  }\n  /**\n   * @param {string} key\n   */\n  getCanonicalKey(key) {\n    return super.has(key)\n      ? key\n      : [...this.keys()].find(\n          existingKey => existingKey.toLowerCase() === key.toLowerCase()\n        );\n  }\n}\n\n/**\n * @param {HTMLElement} node\n */\nexport function makeSafeCopy(node) {\n  const clone = node.cloneNode(true);\n  clone.querySelectorAll(\"[id]\").forEach(elem => elem.removeAttribute(\"id\"));\n  clone.querySelectorAll(\"dfn\").forEach(dfn => {\n    renameElement(dfn, \"span\", { copyAttributes: false });\n  });\n  if (clone.hasAttribute(\"id\")) clone.removeAttribute(\"id\");\n  removeCommentNodes(clone);\n  return clone;\n}\n\n/**\n * @param {Node} node\n */\nexport function removeCommentNodes(node) {\n  const walker = document.createTreeWalker(node, NodeFilter.SHOW_COMMENT);\n  for (const comment of [...walkTree(walker)]) {\n    comment.remove();\n  }\n}\n\n/**\n * @template {Node} T\n * @param {TreeWalker<T>} walker\n * @return {IterableIterator<T>}\n */\nfunction* walkTree(walker) {\n  while (walker.nextNode()) {\n    yield /** @type {T} */ (walker.currentNode);\n  }\n}\n\n/**\n * @template ValueType\n * @extends {Map<string, ValueType>}\n */\nexport class CaseInsensitiveMap extends Map {\n  /**\n   * @param {Array<[string, ValueType]>} [entries]\n   */\n  constructor(entries = []) {\n    super();\n    entries.forEach(([key, elem]) => {\n      this.set(key, elem);\n    });\n    return this;\n  }\n  /**\n   * @param {String} key\n   * @param {ValueType} value\n   */\n  set(key, value) {\n    super.set(key.toLowerCase(), value);\n    return this;\n  }\n  /**\n   * @param {String} key\n   */\n  get(key) {\n    return super.get(key.toLowerCase());\n  }\n  /**\n   * @param {String} key\n   */\n  has(key) {\n    return super.has(key.toLowerCase());\n  }\n  /**\n   * @param {String} key\n   */\n  delete(key) {\n    return super.delete(key.toLowerCase());\n  }\n}\n\nexport class RespecError extends Error {\n  /**\n   * @param {Parameters<typeof showError>[0]} message\n   * @param {Parameters<typeof showError>[1]} plugin\n   * @param {Parameters<typeof showError>[2] & { isWarning: boolean }} options\n   */\n  constructor(message, plugin, options) {\n    super(message);\n    const name = options.isWarning ? \"ReSpecWarning\" : \"ReSpecError\";\n    Object.assign(this, { message, plugin, name, ...options });\n    if (options.elements) {\n      options.elements.forEach(elem =>\n        markAsOffending(elem, message, options.title)\n      );\n    }\n  }\n\n  toJSON() {\n    const { message, name, stack } = this;\n    // @ts-expect-error https://github.com/microsoft/TypeScript/issues/26792\n    const { plugin, hint, elements, title, details } = this;\n    return { message, name, plugin, hint, elements, title, details, stack };\n  }\n}\n\n/**\n * @param {string} message\n * @param {string} pluginName Name of plugin that caused the error.\n * @param {object} [options]\n * @param {string} [options.hint] How to solve the error?\n * @param {HTMLElement[]} [options.elements] Offending elements.\n * @param {string} [options.title] Title attribute for offending elements. Can be a shorter form of the message.\n * @param {string} [options.details] Any further details/context.\n */\nexport function showError(message, pluginName, options = {}) {\n  const opts = { ...options, isWarning: false };\n  pub(\"error\", new RespecError(message, pluginName, opts));\n}\n\n/**\n * @param {string} message\n * @param {string} pluginName Name of plugin that caused the error.\n * @param {object} [options]\n * @param {string} [options.hint] How to solve the error?\n * @param {HTMLElement[]} [options.elements] Offending elements.\n * @param {string} [options.title] Title attribute for offending elements. Can be a shorter form of the message.\n * @param {string} [options.details] Any further details/context.\n */\nexport function showWarning(message, pluginName, options = {}) {\n  const opts = { ...options, isWarning: true };\n  pub(\"warn\", new RespecError(message, pluginName, opts));\n}\n\n/**\n * Creates showError, showWarning utilities for use in custom pre-process and\n * post-process plugins.\n * @param {string} pluginName\n */\nexport function makePluginUtils(pluginName) {\n  /** @typedef {Parameters<typeof showError>[2]} Options */\n  return {\n    /** @type {(message: string, options?: Options) => void} */\n    showError: (msg, options) => showError(msg, pluginName, options),\n    /** @type {(message: string, options?: Options) => void} */\n    showWarning: (msg, options) => showWarning(msg, pluginName, options),\n  };\n}\n\n/**\n * Makes a string `coded`.\n *\n * @param {string} item\n * @returns {string}\n */\nexport function toMDCode(item) {\n  return item ? `\\`${item}\\`` : \"\";\n}\n\n/**\n * Joins an array of strings, wrapping each string in back-ticks (`) for inline markdown code.\n *\n * @param {string[]} array\n * @param {object} options\n * @param {boolean} options.quotes Surround each item in quotes\n */\nexport function codedJoinOr(array, { quotes } = { quotes: false }) {\n  return joinOr(array, quotes ? s => toMDCode(addQuotes(s)) : toMDCode);\n}\n\n/**\n * Wraps in back-ticks ` for code.\n *\n * @param {string[]} array\n * @param {object} options\n * @param {boolean} options.quotes Surround each item in quotes\n */\nexport function codedJoinAnd(array, { quotes } = { quotes: false }) {\n  return joinAnd(array, quotes ? s => toMDCode(addQuotes(s)) : toMDCode);\n}\n\nfunction addQuotes(item) {\n  return String(item) ? `\"${item}\"` : \"\";\n}\n\n/**\n * Tagged template string, helps with linking to documentation.\n * Things inside [squareBrackets] are considered direct links to the documentation.\n * To alias something, one can use a \"|\", like [respecConfig|#respec-configuration].\n * @param {TemplateStringsArray} strings\n * @param {string[]} keys\n */\nexport function docLink(strings, ...keys) {\n  const linkifiedStr = strings\n    .map((s, i) => {\n      const key = keys[i];\n      if (!key) {\n        return s;\n      }\n      // Linkables are wrapped in square brackets\n      if (!key.startsWith(\"[\") && !key.endsWith(\"]\")) {\n        return s + key;\n      }\n\n      const [linkingText, href] = key.slice(1, -1).split(\"|\");\n      if (href) {\n        const url = new URL(href, \"https://respec.org/docs/\");\n        return `${s}[${linkingText}](${url})`;\n      }\n      return `${s}[\\`${linkingText}\\`](https://respec.org/docs/#${linkingText})`;\n    })\n    .join(\"\");\n  return reindent(linkifiedStr);\n}\n\n/**\n * Takes a text string, trims it, splits it into lines,\n * finds the common indentation level, and then de-indents every line\n * by that common indentation level.\n *\n * @param {string} text - The text to be re-indented.\n * @returns {string} The re-indented text.\n */\nexport function reindent(text) {\n  if (!text) {\n    return text;\n  }\n  const lines = text.trimEnd().split(\"\\n\");\n  while (lines.length && !lines[0].trim()) {\n    lines.shift();\n  }\n  const indents = lines.filter(s => s.trim()).map(s => s.search(/[^\\s]/));\n  const leastIndent = Math.min(...indents);\n  return lines.map(s => s.slice(leastIndent)).join(\"\\n\");\n}\n","// @ts-check\n/**\n * module: core/exporter\n * Exports a ReSpec document, based on mime type, so it can be saved, etc.\n * Also performs cleanup, removing things that shouldn't be in published documents.\n * That is, elements that have a \"removeOnSave\" css class.\n */\n\nimport { removeCommentNodes, removeReSpec } from \"./utils.js\";\nimport { expose } from \"./expose-modules.js\";\nimport { html } from \"./import-maps.js\";\nimport { pub } from \"./pubsubhub.js\";\n\nconst mimeTypes = new Map([\n  [\"text/html\", \"html\"],\n  [\"application/xml\", \"xml\"],\n]);\n\n/**\n * Creates a dataURI from a ReSpec document. It also cleans up the document\n * removing various things.\n *\n * @param {String} mimeType mimetype. one of `mimeTypes` above\n * @param {Document} doc document to export. useful for testing purposes\n * @returns a stringified data-uri of document that can be saved.\n */\nexport function rsDocToDataURL(mimeType, doc = document) {\n  const format = mimeTypes.get(mimeType);\n  if (!format) {\n    const validTypes = [...mimeTypes.values()].join(\", \");\n    const msg = `Invalid format: ${mimeType}. Expected one of: ${validTypes}.`;\n    throw new TypeError(msg);\n  }\n  const data = serialize(format, doc);\n  const encodedString = encodeURIComponent(data);\n  return `data:${mimeType};charset=utf-8,${encodedString}`;\n}\n\nexport function serialize(format, doc) {\n  const cloneDoc = doc.cloneNode(true);\n  cleanup(cloneDoc);\n  let result = \"\";\n  switch (format) {\n    case \"xml\":\n      result = new XMLSerializer().serializeToString(cloneDoc);\n      break;\n    default: {\n      prettify(cloneDoc);\n      if (cloneDoc.doctype) {\n        result += new XMLSerializer().serializeToString(cloneDoc.doctype);\n      }\n      result += cloneDoc.documentElement.outerHTML;\n    }\n  }\n  return result;\n}\n\nfunction cleanup(cloneDoc) {\n  const { head, body, documentElement } = cloneDoc;\n  removeCommentNodes(cloneDoc);\n\n  cloneDoc\n    .querySelectorAll(\".removeOnSave, #toc-nav\")\n    .forEach(elem => elem.remove());\n  body.classList.remove(\"toc-sidebar\");\n  removeReSpec(documentElement);\n\n  const insertions = cloneDoc.createDocumentFragment();\n\n  // Move meta viewport, as it controls the rendering on mobile.\n  const metaViewport = cloneDoc.querySelector(\"meta[name='viewport']\");\n  if (metaViewport && head.firstChild !== metaViewport) {\n    insertions.appendChild(metaViewport);\n  }\n\n  // Move charset to near top, as it needs to be in the first 512 bytes.\n  let metaCharset = cloneDoc.querySelector(\n    \"meta[charset], meta[content*='charset=']\"\n  );\n  if (!metaCharset) {\n    metaCharset = html`<meta charset=\"utf-8\" />`;\n  }\n  insertions.appendChild(metaCharset);\n\n  // Add meta generator\n  const respecVersion = `ReSpec ${window.respecVersion || \"Developer Channel\"}`;\n  const metaGenerator = html`\n    <meta name=\"generator\" content=\"${respecVersion}\" />\n  `;\n\n  insertions.appendChild(metaGenerator);\n  head.prepend(insertions);\n  pub(\"beforesave\", documentElement);\n}\n\n/** @param {Document} cloneDoc */\nfunction prettify(cloneDoc) {\n  cloneDoc.querySelectorAll(\"style\").forEach(el => {\n    el.innerHTML = `\\n${el.innerHTML}\\n`;\n  });\n  cloneDoc.querySelectorAll(\"head > *\").forEach(el => {\n    el.outerHTML = `\\n${el.outerHTML}`;\n  });\n}\n\nexpose(\"core/exporter\", { rsDocToDataURL });\n","// @ts-check\n/**\n * This module adds a `respec` object to the `document` with the following\n * readonly properties:\n *  - version: returns version of ReSpec Script.\n *  - ready: returns a promise that settles when ReSpec finishes processing.\n *\n */\nimport { serialize } from \"../core/exporter.js\";\nimport { sub } from \"./pubsubhub.js\";\n\nexport const name = \"core/respec-global\";\n\nclass ReSpec {\n  constructor() {\n    /** @type {Promise<void>} */\n    this._respecDonePromise = new Promise(resolve => {\n      sub(\"end-all\", () => resolve(), { once: true });\n    });\n\n    this.errors = [];\n    this.warnings = [];\n\n    sub(\"error\", rsError => {\n      console.error(rsError, rsError.toJSON());\n      this.errors.push(rsError);\n    });\n    sub(\"warn\", rsError => {\n      console.warn(rsError, rsError.toJSON());\n      this.warnings.push(rsError);\n    });\n  }\n\n  get version() {\n    return window.respecVersion;\n  }\n\n  get ready() {\n    return this._respecDonePromise;\n  }\n\n  async toHTML() {\n    return serialize(\"html\", document);\n  }\n}\n\nexport function init() {\n  const respec = new ReSpec();\n  Object.defineProperty(document, \"respec\", { value: respec });\n}\n","// @ts-check\n/**\n * Module core/post-process\n *\n * Corresponds to respecConfig.postProcess and config.afterEnd.\n *  - postProcess: an array of functions that get called\n *      after processing finishes. This is not recommended and the feature is not\n *      tested. Use with care, if you know what you're doing. Chances are you really\n *      want to be using a new module with your own profile.\n *  - afterEnd: final thing that is called.\n */\nimport { makePluginUtils, showError } from \"./utils.js\";\n\nexport const name = \"core/post-process\";\n\nexport async function run(config) {\n  if (Array.isArray(config.postProcess)) {\n    const promises = config.postProcess\n      .filter(f => {\n        const isFunction = typeof f === \"function\";\n        if (!isFunction) {\n          const msg = \"Every item in `postProcess` must be a JS function.\";\n          showError(msg, name);\n        }\n        return isFunction;\n      })\n      .map(async (f, i) => {\n        const fnName = `${name}/${f.name || `[${i}]`}`;\n        const utils = makePluginUtils(fnName);\n        try {\n          return await f(config, document, utils);\n        } catch (err) {\n          const msg = `Function ${f.name} threw an error during \\`postProcess\\`.`;\n          const hint = \"See developer console.\";\n          showError(msg, name, { hint });\n          console.error(err);\n        }\n      });\n    await Promise.all(promises);\n  }\n  if (typeof config.afterEnd === \"function\") {\n    await config.afterEnd(config, document);\n  }\n}\n","// @ts-check\n/**\n * Module core/pre-process\n *\n * Corresponds to respecConfig.preProcess.\n *  - preProcess: an array of functions that get called\n *      before anything else happens. This is not recommended and the feature is not\n *      tested. Use with care, if you know what you're doing. Chances are you really\n *      want to be using a new module with your own profile\n */\nimport { makePluginUtils, showError } from \"./utils.js\";\n\nexport const name = \"core/pre-process\";\n\nexport async function run(config) {\n  if (Array.isArray(config.preProcess)) {\n    const promises = config.preProcess\n      .filter(f => {\n        const isFunction = typeof f === \"function\";\n        if (!isFunction) {\n          const msg = \"Every item in `preProcess` must be a JS function.\";\n          showError(msg, name);\n        }\n        return isFunction;\n      })\n      .map(async (f, i) => {\n        const fnName = `${name}/${f.name || `[${i}]`}`;\n        const utils = makePluginUtils(fnName);\n        try {\n          return await f(config, document, utils);\n        } catch (err) {\n          const msg = `Function ${f.name} threw an error during \\`preProcess\\`.`;\n          const hint = \"See developer console.\";\n          showError(msg, name, { hint });\n          console.error(err);\n        }\n      });\n    await Promise.all(promises);\n  }\n}\n","// @ts-check\n// Module core/base-runner\n// The module in charge of running the whole processing pipeline.\nimport { run as includeConfig } from \"./include-config.js\";\nimport { init as initReSpecGlobal } from \"./respec-global.js\";\nimport { run as overrideConfig } from \"./override-configuration.js\";\nimport { run as postProcess } from \"./post-process.js\";\nimport { run as preProcess } from \"./pre-process.js\";\nimport { pub } from \"./pubsubhub.js\";\nimport { removeReSpec } from \"./utils.js\";\n\nexport const name = \"core/base-runner\";\n\nexport async function runAll(plugs) {\n  initReSpecGlobal();\n\n  pub(\"start-all\", respecConfig);\n  includeConfig(respecConfig);\n  overrideConfig(respecConfig);\n  performance.mark(`${name}-start`);\n  await preProcess(respecConfig);\n\n  const runnables = plugs.filter(p => isRunnableModule(p));\n  runnables.forEach(\n    plug => !plug.name && console.warn(\"Plugin lacks name:\", plug)\n  );\n  await executePreparePass(runnables, respecConfig);\n  await executeRunPass(runnables, respecConfig);\n  pub(\"plugins-done\", respecConfig);\n\n  await postProcess(respecConfig);\n  pub(\"end-all\");\n  removeReSpec(document);\n  performance.mark(`${name}-end`);\n  performance.measure(name, `${name}-start`, `${name}-end`);\n}\n\nfunction isRunnableModule(plug) {\n  return plug && (plug.run || plug.Plugin);\n}\n\nasync function executePreparePass(runnables, config) {\n  for (const plug of runnables.filter(p => p.prepare)) {\n    try {\n      await plug.prepare(config);\n    } catch (err) {\n      console.error(err);\n    }\n  }\n}\n\nasync function executeRunPass(runnables, config) {\n  for (const plug of runnables) {\n    const name = plug.name || \"\";\n\n    try {\n      // eslint-disable-next-line no-async-promise-executor\n      await new Promise(async (resolve, reject) => {\n        const timerId = setTimeout(() => {\n          const msg = `Plugin ${name} took too long.`;\n          console.error(msg, plug);\n          reject(new Error(msg));\n        }, 15000);\n\n        performance.mark(`${name}-start`);\n        try {\n          if (plug.Plugin) {\n            await new plug.Plugin(config).run();\n            resolve();\n          } else if (plug.run) {\n            await plug.run(config);\n            resolve();\n          }\n        } catch (err) {\n          reject(err);\n        } finally {\n          clearTimeout(timerId);\n          performance.mark(`${name}-end`);\n          performance.measure(name, `${name}-start`, `${name}-end`);\n        }\n      });\n    } catch (error) {\n      console.error(error);\n    }\n  }\n}\n","// @ts-check\n// Module core/override-configuration\n// A helper module that makes it possible to override settings specified in respecConfig\n// by passing them as a query string. This is useful when you just want to make a few\n// tweaks to a document before generating the snapshot, without mucking with the source.\n// For example, you can change the status and date by appending:\n//      ?specStatus=LC&publishDate=2012-03-15\nimport { pub } from \"./pubsubhub.js\";\n\nexport const name = \"core/override-configuration\";\n\nexport function run(config) {\n  const params = new URLSearchParams(document.location.search);\n  const overrideEntries = Array.from(params)\n    .filter(([key, value]) => !!key && !!value)\n    .map(([codedKey, codedValue]) => {\n      const key = decodeURIComponent(codedKey);\n      const decodedValue = decodeURIComponent(codedValue.replace(/%3D/g, \"=\"));\n      let value;\n      try {\n        value = JSON.parse(decodedValue);\n      } catch {\n        value = decodedValue;\n      }\n      return [key, value];\n    });\n  const overrideProps = Object.fromEntries(overrideEntries);\n  Object.assign(config, overrideProps);\n  pub(\"amend-user-config\", overrideProps);\n}\n","const css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n.respec-modal .close-button {\n  position: absolute;\n  z-index: inherit;\n  padding: 0.2em;\n  font-weight: bold;\n  cursor: pointer;\n  margin-left: 5px;\n  border: none;\n  background: transparent;\n}\n\n#respec-ui {\n  position: fixed;\n  display: flex;\n  flex-direction: row-reverse;\n  top: 20px;\n  right: 20px;\n  width: 202px;\n  text-align: right;\n  z-index: 9000;\n}\n\n\n#respec-pill,\n.respec-info-button {\n  height: 2.4em;\n  background: #fff;\n  background: var(--bg, #fff);\n  color: rgb(120, 120, 120);\n  color: var(--tocnav-normal-text, rgb(120, 120, 120));\n  border: 1px solid #ccc;\n  box-shadow: 1px 1px 8px 0 rgba(100, 100, 100, 0.5);\n  box-shadow: 1px 1px 8px 0 var(--tocsidebar-shadow, rgba(100, 100, 100, 0.5));\n  padding: 0.2em 0em;\n}\n\n.respec-info-button {\n  border: none;\n  opacity: 0.75;\n  border-radius: 2em;\n  margin-right: 1em;\n  min-width: 3.5em;\n  will-change: opacity;\n}\n\n.respec-info-button:focus,\n.respec-info-button:hover {\n  opacity: 1;\n  transition: opacity 0.2s;\n}\n\n#respec-pill {\n  width: 4.8em;\n}\n\n#respec-pill:not(:disabled) {\n  animation: respec-fadein 0.6s ease-in-out;\n}\n\n@keyframes respec-fadein {\n  from {\n    margin-top: -1.2em;\n    border-radius: 50%;\n    border: 0.2em solid rgba(100, 100, 100, 0.5);\n    box-shadow: none;\n    height: 4.8em;\n  }\n  to {\n    margin-top: 0;\n    border: 1px solid #ccc;\n    border-radius: 0;\n    box-shadow: 1px 1px 8px 0 rgba(100, 100, 100, 0.5);\n    height: 2.4em;\n  }\n}\n\n#respec-pill:disabled {\n  margin-top: -1.2em;\n  position: relative;\n  border: none;\n  box-shadow: none;\n  border-radius: 50%;\n  width: 4.8em;\n  height: 4.8em;\n  padding: 0;\n}\n\n#respec-pill:disabled::after {\n  position: absolute;\n  content: '';\n  inset: -0.2em;\n  border-radius: 50%;\n  border: 0.2em solid rgba(100, 100, 100, 0.5);\n  border-left: 0.2em solid transparent;\n  animation: respec-spin 0.5s infinite linear;\n}\n\n@media (prefers-reduced-motion) {\n  #respec-pill:not(:disabled) {\n    animation: none;\n  }\n\n  #respec-pill:disabled::after {\n    animation: none;\n    border-left: 0.2em solid rgba(100, 100, 100, 0.5);\n  }\n}\n\n@keyframes respec-spin {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n\n.respec-hidden {\n  visibility: hidden;\n  opacity: 0;\n  transition: visibility 0s 0.2s, opacity 0.2s linear;\n}\n\n.respec-visible {\n  visibility: visible;\n  opacity: 1;\n  transition: opacity 0.2s linear;\n}\n\n#respec-pill:hover,\n#respec-pill:focus {\n  color: rgb(0, 0, 0);\n  background-color: rgb(245, 245, 245);\n  transition: color 0.2s;\n}\n\n#respec-menu {\n  position: absolute;\n  margin: 0;\n  padding: 0;\n  font-family: sans-serif;\n  background: var(--bg, #fff);\n  color: var(--text, black);\n  box-shadow: 1px 1px 8px 0 rgba(100, 100, 100, 0.5);\n  width: 200px;\n  display: none;\n  text-align: left;\n  margin-top: 32px;\n  font-size: 0.8em;\n}\n\n#respec-menu:not([hidden]) {\n  display: block;\n}\n\n#respec-menu li {\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n\n.respec-save-buttons {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(47%, 2fr));\n  grid-gap: 0.5cm;\n  padding: 0.5cm;\n}\n\n.respec-save-button:link {\n  padding-top: 16px;\n  color: var(--def-text, white);\n  background: var(--def-bg, rgb(42, 90, 168));\n  justify-self: stretch;\n  height: 1cm;\n  text-decoration: none;\n  text-align: center;\n  font-size: inherit;\n  border: none;\n  border-radius: 0.2cm;\n}\n\n.respec-save-button:link:hover {\n  color: var(--def-text, white);\n  background: var(--defrow-border, rgb(42, 90, 168));\n  padding: 0;\n  margin: 0;\n  border: 0;\n  padding-top: 16px;\n}\n\n.respec-save-button:link:focus {\n  background: var(--tocnav-active-bg, #193766);\n  color: var(--tocnav-active-text, black);\n}\n\n#respec-ui button:focus,\n#respec-pill:focus,\n.respec-option:focus {\n  outline: 0;\n  outline-style: none;\n}\n\n#respec-pill-error {\n  background-color: red;\n  color: white;\n}\n\n#respec-pill-warning {\n  background-color: orange;\n  color: white;\n}\n\n.respec-warning-list,\n.respec-error-list {\n  margin: 0;\n  padding: 0;\n  font-family: sans-serif;\n  font-size: 0.85em;\n}\n\n.respec-warning-list {\n  background-color: rgb(255, 251, 230);\n}\n\n:is(.respec-warning-list,.respec-error-list) > li {\n  list-style-type: none;\n  margin: 0;\n  padding: .5em 0;\n  padding-left: 2em;\n  padding-right: .5em;\n}\n\n:is(.respec-warning-list,.respec-error-list) > li + li {\n  margin-top: 0.5rem;\n}\n\n:is(.respec-warning-list,.respec-error-list) > li:before {\n  position: absolute;\n  left: .4em;\n}\n\n:is(.respec-warning-list,.respec-error-list) p {\n  padding: 0;\n  margin: 0;\n}\n\n.respec-warning-list > li {\n  color: rgb(92, 59, 0);\n  border-bottom: thin solid rgb(255, 245, 194);\n}\n\n.respec-error-list,\n.respec-error-list li {\n  background-color: rgb(255, 240, 240);\n}\n\n.respec-warning-list > li::before {\n  content: \"⚠️\";\n}\n\n.respec-error-list > li::before {\n  content: \"💥\";\n}\n\n.respec-error-list > li {\n  color: rgb(92, 59, 0);\n  border-bottom: thin solid rgb(255, 215, 215);\n}\n\n:is(.respec-warning-list,.respec-error-list) > li li {\n  list-style: disc;\n}\n\n#respec-overlay {\n  display: block;\n  position: fixed;\n  z-index: 10000;\n  top: 0px;\n  left: 0px;\n  height: 100%;\n  width: 100%;\n  background: #000;\n}\n\n.respec-show-overlay {\n  transition: opacity 0.2s linear;\n  opacity: 0.5;\n}\n\n.respec-hide-overlay {\n  transition: opacity 0.2s linear;\n  opacity: 0;\n}\n\n.respec-modal {\n  display: block;\n  position: fixed;\n  z-index: 11000;\n  top: 10%;\n  background: var(--bg, #fff);\n  color: var(--text, black);\n  border: 5px solid #666;\n  border-color: var(--tocsidebar-shadow, #666);\n  min-width: 20%;\n  padding: 0;\n  max-height: 80%;\n  overflow-y: auto;\n  margin: 0 -0.5cm;\n  left: 20%;\n  max-width: 75%;\n  min-width: 60%;\n}\n\n\n.respec-modal h3 {\n  margin: 0;\n  padding: 0.2em;\n  left: 0 !important;\n  text-align: center;\n  background: var(--tocsidebar-shadow, #ddd);\n  color: var(--text, black);\n  font-size: 1em;\n}\n\n#respec-menu button.respec-option {\n  background: var(--bg, white);\n  color: var(--text, black);\n  border: none;\n  width: 100%;\n  text-align: left;\n  font-size: inherit;\n  padding: 1.2em 1.2em;\n}\n\n#respec-menu button.respec-option:hover {\n  background-color: var(--tocnav-hover-bg, #eee);\n  color: var(--tocnav-hover-text, black);\n}\n\n.respec-cmd-icon {\n  padding-right: 0.5em;\n}\n\n#respec-ui button.respec-option:first-child {\n  margin-top: 0;\n}\n#respec-ui button.respec-option:last-child {\n  border: none;\n  border-radius: inherit;\n  margin-bottom: 0;\n}\n\n.respec-button-copy-paste {\n  position: absolute;\n  height: 28px;\n  width: 40px;\n  cursor: pointer;\n  background-image: linear-gradient(#fcfcfc, #eee);\n  border: 1px solid rgb(144, 184, 222);\n  border-left: 0;\n  border-radius: 0px 0px 3px 0;\n  -webkit-user-select: none;\n  user-select: none;\n  -webkit-appearance: none;\n  top: 0;\n  left: 127px;\n}\n\n@media print {\n  #respec-ui {\n    display: none;\n  }\n}\n\n.respec-iframe {\n  width: 100%;\n  min-height: 550px;\n  height: 100%;\n  overflow: hidden;\n  padding: 0;\n  margin: 0;\n  border: 0;\n}\n\n.respec-iframe:not(.ready) {\n  background: url(\"https://respec.org/xref/loader.gif\") no-repeat center;\n}\n\n.respec-iframe + a[href] {\n  font-size: 0.9rem;\n  float: right;\n  margin: 0 0.5em 0.5em;\n  border-bottom-width: 1px;\n}\n\np:is(.respec-hint,.respec-occurrences) {\n  display: block;\n  margin-top: 0.5em;\n}\n\n.respec-plugin {\n  text-align: right;\n  color: rgb(120, 120, 120, .5);\n  font-size: 0.6em;\n}\n`;\n","// @ts-check\n/**\n * Module core/markdown\n * Handles the optional markdown processing.\n *\n * Markdown support is optional. It is enabled by setting the `format`\n * property of the configuration object to \"markdown.\"\n *\n * We use marked for parsing Markdown:\n * https://github.com/markedjs/marked\n *\n */\n\nimport { getElementIndentation, reindent } from \"./utils.js\";\nimport { marked } from \"./import-maps.js\";\n\nexport const name = \"core/markdown\";\n\nconst gtEntity = /&gt;/gm;\nconst ampEntity = /&amp;/gm;\n\nclass Renderer extends marked.Renderer {\n  code(code, infoString, isEscaped) {\n    const { language, ...metaData } = Renderer.parseInfoString(infoString);\n\n    // regex to check whether the language is webidl\n    if (/(^webidl$)/i.test(language)) {\n      return `<pre class=\"idl\">${code}</pre>`;\n    }\n\n    const html = super\n      .code(code, language, isEscaped)\n      .replace(`class=\"language-`, `class=\"`);\n\n    const { example, illegalExample } = metaData;\n    if (!example && !illegalExample) return html;\n\n    const title = example || illegalExample;\n    const className = `${language} ${example ? \"example\" : \"illegal-example\"}`;\n    return html.replace(\"<pre>\", `<pre title=\"${title}\" class=\"${className}\">`);\n  }\n\n  image(href, title, text) {\n    if (!title) {\n      return super.image(href, title, text);\n    }\n    const html = String.raw;\n    return html`\n      <figure>\n        <img src=\"${href}\" alt=\"${text}\" />\n        <figcaption>${title}</figcaption>\n      </figure>\n    `;\n  }\n\n  /**\n   * @param {string} infoString\n   */\n  static parseInfoString(infoString) {\n    const firstSpace = infoString.search(/\\s/);\n    if (firstSpace === -1) {\n      return { language: infoString };\n    }\n\n    const language = infoString.slice(0, firstSpace);\n    const metaDataStr = infoString.slice(firstSpace + 1);\n    let metaData;\n    if (metaDataStr) {\n      try {\n        metaData = JSON.parse(`{ ${metaDataStr} }`);\n      } catch (error) {\n        console.error(error);\n      }\n    }\n\n    return { language, ...metaData };\n  }\n\n  heading(text, level, raw) {\n    const headingWithIdRegex = /(.+)\\s+{#([\\w-]+)}$/;\n    if (headingWithIdRegex.test(text)) {\n      const [, textContent, id] = text.match(headingWithIdRegex);\n      return `<h${level} id=\"${id}\">${textContent}</h${level}>`;\n    }\n    return super.heading(text, level, raw);\n  }\n}\n\n/** @type {import('marked').MarkedOptions} */\nconst config = {\n  gfm: true,\n  renderer: new Renderer(),\n};\n\n/**\n * @param {string} text\n * @param {object} options\n * @param {boolean} options.inline\n */\nexport function markdownToHtml(text, options = { inline: false }) {\n  const normalizedLeftPad = reindent(text);\n  // As markdown is pulled from HTML, > and & are already escaped and\n  // so blockquotes aren't picked up by the parser. This fixes it.\n  const potentialMarkdown = normalizedLeftPad\n    .replace(gtEntity, \">\")\n    .replace(ampEntity, \"&\");\n\n  const result = options.inline\n    ? marked.parseInline(potentialMarkdown, config)\n    : marked.parse(potentialMarkdown, config);\n  return result;\n}\n\n/**\n * @param {string} selector\n * @return {(el: Element) => Element[]}\n */\nfunction convertElements(selector) {\n  return element => {\n    const elements = element.querySelectorAll(selector);\n    elements.forEach(convertElement);\n    return Array.from(elements);\n  };\n}\n\n/**\n * @param {Element} element\n */\nfunction convertElement(element) {\n  for (const pre of element.getElementsByTagName(\"pre\")) {\n    // HTML parser implicitly removes a newline after <pre>\n    // which breaks reindentation algorithm\n    pre.prepend(\"\\n\");\n  }\n  element.innerHTML = markdownToHtml(element.innerHTML);\n}\n\n/**\n * CommonMark requires additional empty newlines between markdown and HTML lines.\n * This function adds them as a backward compatibility workaround.\n * @param {HTMLElement} element\n * @param {string} selector\n */\nfunction workaroundBlockLevelMarkdown(element, selector) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const elements = element.querySelectorAll(selector);\n  for (const element of elements) {\n    const { innerHTML } = element;\n    if (/^<\\w/.test(innerHTML.trimStart())) {\n      // if the block content starts with HTML-like format\n      // then assume it doesn't need a workaround\n      continue;\n    }\n    // Double newlines are needed to be parsed as Markdown\n    const lines = innerHTML.split(\"\\n\");\n    const firstTwo = lines.slice(0, 2).join(\"\\n\");\n    const lastTwo = lines.slice(-2).join(\"\\n\");\n    if (firstTwo.trim()) {\n      element.prepend(\"\\n\\n\");\n    }\n    if (lastTwo.trim()) {\n      // keep the indentation of the end tag\n      const indentation = getElementIndentation(element);\n      element.append(`\\n\\n${indentation}`);\n    }\n  }\n}\n\n/**\n * @param {Iterable<Element>} elements\n */\nfunction substituteWithTextNodes(elements) {\n  Array.from(elements).forEach(element => {\n    element.replaceWith(element.textContent);\n  });\n}\n\nconst processMDSections = convertElements(\"[data-format='markdown']:not(body)\");\nconst blockLevelElements =\n  \"[data-format=markdown], section, div, address, article, aside, figure, header, main\";\n\nexport function run(conf) {\n  const hasMDSections = !!document.querySelector(\n    \"[data-format=markdown]:not(body)\"\n  );\n  const isMDFormat = conf.format === \"markdown\";\n  if (!isMDFormat && !hasMDSections) {\n    return; // Nothing to be done\n  }\n  // Only has markdown-format sections\n  if (!isMDFormat) {\n    processMDSections(document.body);\n    return;\n  }\n  // We transplant the UI to do the markdown processing\n  const rsUI = document.getElementById(\"respec-ui\");\n  rsUI.remove();\n  // The new body will replace the old body\n  const newBody = document.body.cloneNode(true);\n  // Marked expects markdown be flush against the left margin\n  // so we need to normalize the inner text of some block\n  // elements.\n  workaroundBlockLevelMarkdown(newBody, blockLevelElements);\n  convertElement(newBody);\n  // Remove links where class .nolinks\n  substituteWithTextNodes(newBody.querySelectorAll(\".nolinks a[href]\"));\n  // Frankenstein the whole thing back together\n  newBody.append(rsUI);\n  document.body.replaceWith(newBody);\n}\n","// @ts-check\n// Module core/ui\n// Handles the ReSpec UI\n// XXX TODO\n//  - look at other UI things to add\n//      - list issues\n//      - lint: validator, link checker, check WebIDL, ID references\n//      - save to GitHub\n//  - make a release candidate that people can test\n//  - once we have something decent, merge, ship as 3.2.0\nimport { html, pluralize } from \"./import-maps.js\";\nimport { reindent, xmlEscape } from \"./utils.js\";\nimport css from \"../styles/ui.css.js\";\nimport { markdownToHtml } from \"./markdown.js\";\nimport { sub } from \"./pubsubhub.js\";\nexport const name = \"core/ui\";\n\n// Opportunistically inserts the style, with the chance to reduce some FOUC\ninsertStyle();\n\nfunction insertStyle() {\n  const styleElement = document.createElement(\"style\");\n  styleElement.id = \"respec-ui-styles\";\n  styleElement.textContent = css;\n  styleElement.classList.add(\"removeOnSave\");\n  document.head.appendChild(styleElement);\n  return styleElement;\n}\n\nfunction ariaDecorate(elem, ariaMap) {\n  if (!elem) {\n    return;\n  }\n  Array.from(ariaMap).forEach(([name, value]) => {\n    elem.setAttribute(`aria-${name}`, value);\n  });\n}\n\nconst respecUI = html`<div id=\"respec-ui\" class=\"removeOnSave\" hidden></div>`;\nconst menu = html`<ul\n  id=\"respec-menu\"\n  role=\"menu\"\n  aria-labelledby=\"respec-pill\"\n  hidden\n></ul>`;\nconst closeButton = html`<button\n  class=\"close-button\"\n  onclick=${() => ui.closeModal()}\n  title=\"Close\"\n>\n  ❌\n</button>`;\nwindow.addEventListener(\"load\", () => trapFocus(menu));\nlet modal;\nlet overlay;\nconst errors = [];\nconst warnings = [];\nconst buttons = {};\n\nsub(\"start-all\", () => document.body.prepend(respecUI), { once: true });\nsub(\"end-all\", () => document.body.prepend(respecUI), { once: true });\n\nconst respecPill = html`<button id=\"respec-pill\" disabled>ReSpec</button>`;\nrespecUI.appendChild(respecPill);\nrespecPill.addEventListener(\"click\", e => {\n  e.stopPropagation();\n  respecPill.setAttribute(\"aria-expanded\", String(menu.hidden));\n  toggleMenu();\n  menu.querySelector(\"li:first-child button\").focus();\n});\n\ndocument.documentElement.addEventListener(\"click\", () => {\n  if (!menu.hidden) {\n    toggleMenu();\n  }\n});\nrespecUI.appendChild(menu);\n\nmenu.addEventListener(\"keydown\", e => {\n  if (e.key === \"Escape\" && !menu.hidden) {\n    respecPill.setAttribute(\"aria-expanded\", String(menu.hidden));\n    toggleMenu();\n    respecPill.focus();\n  }\n});\n\nfunction toggleMenu() {\n  menu.classList.toggle(\"respec-hidden\");\n  menu.classList.toggle(\"respec-visible\");\n  menu.hidden = !menu.hidden;\n}\n\n// Code adapted from https://hiddedevries.nl/en/blog/2017-01-29-using-javascript-to-trap-focus-in-an-element\nfunction trapFocus(element) {\n  const focusableEls = element.querySelectorAll(\n    \"a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])\"\n  );\n  const firstFocusableEl = focusableEls[0];\n  const lastFocusableEl = focusableEls[focusableEls.length - 1];\n  if (firstFocusableEl) {\n    firstFocusableEl.focus();\n  }\n  element.addEventListener(\"keydown\", e => {\n    if (e.key !== \"Tab\") {\n      return;\n    }\n    // shift + tab\n    if (e.shiftKey) {\n      if (document.activeElement === firstFocusableEl) {\n        lastFocusableEl.focus();\n        e.preventDefault();\n      }\n    }\n    // tab\n    else if (document.activeElement === lastFocusableEl) {\n      firstFocusableEl.focus();\n      e.preventDefault();\n    }\n  });\n}\n\nconst ariaMap = new Map([\n  [\"controls\", \"respec-menu\"],\n  [\"expanded\", \"false\"],\n  [\"haspopup\", \"true\"],\n  [\"label\", \"ReSpec Menu\"],\n]);\nariaDecorate(respecPill, ariaMap);\n\nfunction errWarn(err, arr, butName, title) {\n  arr.push(err);\n  if (!buttons.hasOwnProperty(butName)) {\n    buttons[butName] = createWarnButton(butName, arr, title);\n    respecUI.appendChild(buttons[butName]);\n  }\n  const button = buttons[butName];\n  button.textContent = arr.length;\n  const label = arr.length === 1 ? pluralize.singular(title) : title;\n  const ariaMap = new Map([[\"label\", `${arr.length} ${label}`]]);\n  ariaDecorate(button, ariaMap);\n}\n\nfunction createWarnButton(butName, arr, title) {\n  const buttonId = `respec-pill-${butName}`;\n  const button = html`<button\n    id=\"${buttonId}\"\n    class=\"respec-info-button\"\n  ></button>`;\n  button.addEventListener(\"click\", () => {\n    button.setAttribute(\"aria-expanded\", \"true\");\n    const ol = html`<ol class=\"${`respec-${butName}-list`}\"></ol>`;\n    for (const err of arr) {\n      const fragment = document\n        .createRange()\n        .createContextualFragment(rsErrorToHTML(err));\n      const li = document.createElement(\"li\");\n      // if it's only a single element, just copy the contents into li\n      if (fragment.firstElementChild === fragment.lastElementChild) {\n        li.append(...fragment.firstElementChild.childNodes);\n        // Otherwise, take everything.\n      } else {\n        li.appendChild(fragment);\n      }\n      ol.appendChild(li);\n    }\n    ui.freshModal(title, ol, button);\n  });\n  const ariaMap = new Map([\n    [\"expanded\", \"false\"],\n    [\"haspopup\", \"true\"],\n    [\"controls\", `respec-pill-${butName}-modal`],\n  ]);\n  ariaDecorate(button, ariaMap);\n  return button;\n}\n\nexport const ui = {\n  show() {\n    try {\n      respecUI.hidden = false;\n    } catch (err) {\n      console.error(err);\n    }\n  },\n  hide() {\n    respecUI.hidden = true;\n  },\n  enable() {\n    respecPill.removeAttribute(\"disabled\");\n  },\n  /**\n   * @param {string} _keyShort shortcut key. unused - kept for backward compatibility.\n   */\n  addCommand(label, handler, _keyShort, icon) {\n    icon = icon || \"\";\n    const id = `respec-button-${label.toLowerCase().replace(/\\s+/, \"-\")}`;\n    const button = html`<button id=\"${id}\" class=\"respec-option\">\n      <span class=\"respec-cmd-icon\" aria-hidden=\"true\">${icon}</span> ${label}…\n    </button>`;\n    const menuItem = html`<li role=\"menuitem\">${button}</li>`;\n    menuItem.addEventListener(\"click\", handler);\n    menu.appendChild(menuItem);\n    return button;\n  },\n  error(rsError) {\n    errWarn(rsError, errors, \"error\", \"ReSpec Errors\");\n  },\n  warning(rsError) {\n    errWarn(rsError, warnings, \"warning\", \"ReSpec Warnings\");\n  },\n  closeModal(owner) {\n    if (overlay) {\n      overlay.classList.remove(\"respec-show-overlay\");\n      overlay.classList.add(\"respec-hide-overlay\");\n      overlay.addEventListener(\"transitionend\", () => {\n        overlay.remove();\n        overlay = null;\n      });\n    }\n    if (owner) {\n      owner.setAttribute(\"aria-expanded\", \"false\");\n    }\n    if (!modal) return;\n    modal.remove();\n    modal = null;\n    respecPill.focus();\n  },\n  freshModal(title, content, currentOwner) {\n    if (modal) modal.remove();\n    if (overlay) overlay.remove();\n    overlay = html`<div id=\"respec-overlay\" class=\"removeOnSave\"></div>`;\n    const id = `${currentOwner.id}-modal`;\n    const headingId = `${id}-heading`;\n    modal = html`<div\n      id=\"${id}\"\n      class=\"respec-modal removeOnSave\"\n      role=\"dialog\"\n      aria-labelledby=\"${headingId}\"\n    >\n      ${closeButton}\n      <h3 id=\"${headingId}\">${title}</h3>\n      <div class=\"inside\">${content}</div>\n    </div>`;\n    const ariaMap = new Map([[\"labelledby\", headingId]]);\n    ariaDecorate(modal, ariaMap);\n    document.body.append(overlay, modal);\n    overlay.addEventListener(\"click\", () => this.closeModal(currentOwner));\n    overlay.classList.toggle(\"respec-show-overlay\");\n    modal.hidden = false;\n    trapFocus(modal);\n  },\n};\ndocument.addEventListener(\"keydown\", ev => {\n  if (ev.key === \"Escape\") {\n    ui.closeModal();\n  }\n});\nwindow.respecUI = ui;\nsub(\"error\", details => ui.error(details));\nsub(\"warn\", details => ui.warning(details));\n\nfunction rsErrorToHTML(err) {\n  if (typeof err === \"string\") {\n    return err;\n  }\n\n  const plugin = err.plugin\n    ? `<p class=\"respec-plugin\">(plugin: \"${err.plugin}\")</p>`\n    : \"\";\n\n  const hint = err.hint\n    ? `\\n${markdownToHtml(\n        `<p class=\"respec-hint\"><strong>How to fix:</strong> ${reindent(\n          err.hint\n        )}`,\n        {\n          inline: !err.hint.includes(\"\\n\"),\n        }\n      )}\\n`\n    : \"\";\n  const elements = Array.isArray(err.elements)\n    ? `<p class=\"respec-occurrences\">Occurred <strong>${\n        err.elements.length\n      }</strong> times at:</p>\n    ${markdownToHtml(err.elements.map(generateMarkdownLink).join(\"\\n\"))}`\n    : \"\";\n  const details = err.details\n    ? `\\n\\n<details>\\n${err.details}\\n</details>\\n`\n    : \"\";\n  const msg = markdownToHtml(`**${xmlEscape(err.message)}**`, { inline: true });\n  const result = `${msg}${hint}${elements}${details}${plugin}`;\n  return result;\n}\n\n/**\n * @param {Element} element\n */\nfunction generateMarkdownLink(element) {\n  return `* [\\`<${element.localName}>\\`](#${element.id}) element`;\n}\n","import { runAll } from \"./core/base-runner.js\";\nimport { ui } from \"./core/ui.js\";\n\n// In case everything else fails, we want the error\nwindow.addEventListener(\"error\", ev => {\n  console.error(ev.error, ev.message, ev);\n});\n\nexport async function run(plugins) {\n  try {\n    ui.show();\n    await domReady();\n    await runAll(plugins);\n  } finally {\n    ui.enable();\n  }\n}\n\nasync function domReady() {\n  if (document.readyState === \"loading\") {\n    await new Promise(resolve =>\n      document.addEventListener(\"DOMContentLoaded\", resolve)\n    );\n  }\n}\n","import * as ReSpec from \"../src/respec.js\";\n\nconst modules = [\n  // order is significant\n  import(\"../src/core/location-hash.js\"),\n  import(\"../src/core/l10n.js\"),\n  import(\"../src/1edtech/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/1edtech/style.js\"),\n  // Check configuration\n  import(\"../src/1edtech/config.js\"),\n  // Compute common values\n  import(\"../src/1edtech/compute.js\"),\n  import(\"../src/core/github.js\"),\n  // Process transcludes\n  import(\"../src/1edtech/transclude.js\"),\n  import(\"../src/core/data-include.js\"),\n  // Model Processing Service plugin\n  import(\"../src/1edtech/mps.js\"),\n  // Add the 1EdTech privacy appendix\n  import(\"../src/1edtech/privacy.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/1edtech/post-markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  // import(\"../src/core/title.js\"),\n  import(\"../src/1edtech/headers.js\"),\n  import(\"../src/1edtech/id-headers.js\"),\n  import(\"../src/1edtech/abstract.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/data-abbr.js\"),\n  // Make sure markdown conformance section has an id\n  import(\"../src/1edtech/inlines.js\"),\n  import(\"../src/core/inlines.js\"),\n  import(\"../src/1edtech/conformance.js\"),\n  import(\"../src/core/dfn.js\"),\n  import(\"../src/core/pluralize.js\"),\n  import(\"../src/core/examples.js\"),\n  import(\"../src/core/issues-notes.js\"),\n  // Left in for legacy specs\n  import(\"../src/1edtech/issues-notes.js\"),\n  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  // Import 1EdTech biblio\n  import(\"../src/1edtech/biblio.js\"),\n  import(\"../src/core/biblio.js\"),\n  import(\"../src/core/link-to-dfn.js\"),\n  import(\"../src/core/xref.js\"),\n  import(\"../src/core/data-cite.js\"),\n  import(\"../src/core/render-biblio.js\"),\n  import(\"../src/core/dfn-index.js\"),\n  import(\"../src/1edtech/contrib.js\"),\n  import(\"../src/core/sections.js\"),\n  import(\"../src/core/fix-headers.js\"),\n  import(\"../src/core/structure.js\"),\n  import(\"../src/core/informative.js\"),\n  import(\"../src/core/id-headers.js\"),\n  import(\"../src/core/caniuse.js\"),\n  import(\"../src/core/mdn-annotation.js\"),\n  import(\"../src/ui/save-html.js\"),\n  import(\"../src/ui/search-specref.js\"),\n  import(\"../src/ui/search-xref.js\"),\n  import(\"../src/ui/about-respec.js\"),\n  import(\"../src/core/seo.js\"),\n  import(\"../src/1edtech/seo.js\"),\n  import(\"../src/core/highlight.js\"),\n  import(\"../src/core/data-tests.js\"),\n  import(\"../src/core/list-sorter.js\"),\n  import(\"../src/core/highlight-vars.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/data-type.js\"),\n  import(\"../src/core/algorithms.js\"),\n  import(\"../src/1edtech/anchor-expander.js\"),\n  import(\"../src/core/custom-elements/index.js\"),\n  // Clean up the document\n  import(\"../src/1edtech/cleanBody.js\"),\n  // Add title attributes to internal definition references\n  import(\"../src/1edtech/title-attrs.js\"),\n  // Insert 1EdTech stylesheet\n  import(\"../src/1edtech/scripts.js\"),\n  // Remove all comment nodes\n  import(\"../src/1edtech/comments.js\"),\n  // Make code keyboard accessible\n  import(\"../src/1edtech/focus-code.js\"),\n  // Add the 1EdTech footer\n  import(\"../src/1edtech/footers.js\"),\n  /* Linters must be the last thing to run */\n  import(\"../src/core/linter-rules/check-charset.js\"),\n  import(\"../src/core/linter-rules/check-punctuation.js\"),\n  import(\"../src/core/linter-rules/check-internal-slots.js\"),\n  import(\"../src/core/linter-rules/local-refs-exist.js\"),\n  import(\"../src/core/linter-rules/no-headingless-sections.js\"),\n  import(\"../src/core/linter-rules/no-unused-vars.js\"),\n  import(\"../src/core/linter-rules/privsec-section.js\"),\n  import(\"../src/core/linter-rules/wpt-tests-exist.js\"),\n  import(\"../src/core/linter-rules/no-http-props.js\"),\n  import(\"../src/core/linter-rules/a11y.js\"),\n];\n\nPromise.all(modules)\n  .then(plugins => ReSpec.run(plugins))\n  .catch(err => console.error(err));\n","// @ts-check\n// Module core/location-hash\n// As ReSpec injects a bunch of stuff async, the scroll position is not always\n// at the right place when we are done processing. The purpose of this module\n// is to reset window's location hash, which will cause the browser to scroll\n// the window to the correct point in the document when processing is done.\n\nexport const name = \"core/location-hash\";\n\nexport function run() {\n  if (!window.location.hash) {\n    return;\n  }\n\n  // We have to use .then() here because otherwise we would get stuck\n  // awaiting this plugin to finish.\n  document.respec.ready.then(() => {\n    const hash = decodeURIComponent(window.location.hash).slice(1);\n\n    let newHash = hash;\n    /** @type {HTMLElement|null} */\n    const element = document.getElementById(newHash);\n\n    // Check if hash contains any non-word character.\n    const isLegacyFrag = /\\W/.test(newHash);\n\n    // Allow some degree of recovery for legacy fragments format.\n    // See https://github.com/speced/respec/issues/1353\n    if (!element && isLegacyFrag) {\n      const id = newHash\n        // Replace all non-word characters with a dash.\n        .replace(/[\\W]+/gim, \"-\")\n        // Remove any leading dashes.\n        .replace(/^-+/, \"\")\n        // Remove any trailing dashes.\n        .replace(/-+$/, \"\");\n\n      /** @type {HTMLElement|null} */\n      const updatedElement = document.getElementById(id);\n      if (updatedElement) {\n        newHash = id;\n      }\n    }\n    window.location.hash = `#${newHash}`;\n  });\n}\n","// @ts-check\n/**\n * Sets the core defaults\n */\nexport const name = \"core/defaults\";\n\nexport const coreDefaults = {\n  lint: {\n    \"no-headingless-sections\": true,\n    \"no-http-props\": true,\n    \"no-unused-vars\": false,\n    \"check-punctuation\": false,\n    \"local-refs-exist\": true,\n    \"check-internal-slots\": false,\n    \"check-charset\": false,\n    \"privsec-section\": false,\n  },\n  pluralize: true,\n  specStatus: \"base\",\n  highlightVars: true,\n  addSectionLinks: true,\n};\n","// @ts-check\n/**\n * Sets the defaults for 1EdTech specs\n */\nexport const name = \"1edtech/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst imsDefaults = {};\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...imsDefaults.lint,\n          ...conf.lint,\n        };\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...imsDefaults,\n    ...conf,\n    lint,\n  });\n}\n","/* ReSpec specific CSS */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n@keyframes pop {\n  0% {\n    transform: scale(1, 1);\n  }\n  25% {\n    transform: scale(1.25, 1.25);\n    opacity: 0.75;\n  }\n  100% {\n    transform: scale(1, 1);\n  }\n}\n\n/* --- INLINES --- */\na.internalDFN {\n  color: inherit;\n  border-bottom: 1px solid #99c;\n  text-decoration: none;\n}\n\na.externalDFN {\n  color: inherit;\n  border-bottom: 1px dotted #ccc;\n  text-decoration: none;\n}\n\na.bibref {\n  text-decoration: none;\n}\n\n.respec-offending-element:target {\n  animation: pop 0.25s ease-in-out 0s 1;\n}\n\n.respec-offending-element,\na[href].respec-offending-element {\n  text-decoration: red wavy underline;\n}\n@supports not (text-decoration: red wavy underline) {\n  .respec-offending-element:not(pre) {\n    display: inline-block;\n  }\n  .respec-offending-element {\n    /* Red squiggly line */\n    background: url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=)\n      bottom repeat-x;\n  }\n}\n\n#references :target {\n  background: #eaf3ff;\n  animation: pop 0.4s ease-in-out 0s 1;\n}\n\ncite .bibref {\n  font-style: normal;\n}\n\na[href].orcid {\n  padding-left: 4px;\n  padding-right: 4px;\n}\n\na[href].orcid > svg {\n  margin-bottom: -2px;\n}\n\n/* --- TOF --- */\nul.tof,\nol.tof {\n  list-style: none outside none;\n}\n\n.caption {\n  margin-top: 0.5em;\n  font-style: italic;\n}\n#issue-summary > ul {\n  column-count: 2;\n}\n\n#issue-summary li {\n  list-style: none;\n  display: inline-block;\n}\n\ndetails.respec-tests-details {\n  margin-left: 1em;\n  display: inline-block;\n  vertical-align: top;\n}\n\ndetails.respec-tests-details > * {\n  padding-right: 2em;\n}\n\ndetails.respec-tests-details[open] {\n  z-index: 999999;\n  position: absolute;\n  border: thin solid #cad3e2;\n  border-radius: 0.3em;\n  background-color: white;\n  padding-bottom: 0.5em;\n}\n\ndetails.respec-tests-details[open] > summary {\n  border-bottom: thin solid #cad3e2;\n  padding-left: 1em;\n  margin-bottom: 1em;\n  line-height: 2em;\n}\n\ndetails.respec-tests-details > ul {\n  width: 100%;\n  margin-top: -0.3em;\n}\n\ndetails.respec-tests-details > li {\n  padding-left: 1em;\n}\n\n.self-link:hover {\n  opacity: 1;\n  text-decoration: none;\n  background-color: transparent;\n}\n\naside.example .marker > a.self-link {\n  color: inherit;\n}\n\n.header-wrapper {\n  display: flex;\n  align-items: baseline;\n}\n\n:is(h2, h3, h4, h5, h6):not(#toc > h2, #abstract > h2, #sotd > h2, .head > h2) {\n  position: relative;\n  left: -.5em;\n}\n\n:is(h2, h3, h4, h5, h6):not(#toc h2) + a.self-link {\n  color: inherit;\n  order: -1;\n  position: relative;\n  left: -1.1em;\n  font-size: 1rem;\n  opacity: 0.5;\n}\n\n:is(h2, h3, h4, h5, h6) + a.self-link::before {\n  content: \"§\";\n  text-decoration: none;\n  color: var(--heading-text);\n}\n\n:is(h2, h3) + a.self-link {\n  top: -0.2em;\n}\n\n:is(h4, h5, h6) + a.self-link::before {\n  color: black;\n}\n\n@media (max-width: 767px) {\n  dd {\n    margin-left: 0;\n  }\n}\n\n@media print {\n  .removeOnSave {\n    display: none;\n  }\n}\n`;\n","// @ts-check\n// Module core/style\n// The purpose of this module is to insert the default ReSpec CSS into the document.\n// If you don't want to use the default ReSpec CSS, set the `noReSpecCSS` configuration\n// option to `true`. If you want to use your own styles, create a ReSpec profile that\n// includes your own styles and sets the `noReSpecCSS` configuration option to `true`.\n\n/**\n * Module Name.\n * @type {string}\n */\nexport const name = \"core/style\";\n\nimport css from \"../styles/respec.css.js\";\n\n// Opportunistically inserts the style to reduce some FOUC.\n/** @type {HTMLStyleElement} */\nconst styleElement = insertStyle();\n\n/**\n * Inserts the ReSpec CSS as a `style` element into the document's `head`.\n * @return {HTMLStyleElement} The `style` element that was inserted.\n */\nfunction insertStyle() {\n  const styleElement = document.createElement(\"style\");\n  styleElement.id = \"respec-mainstyle\";\n  styleElement.textContent = css;\n  document.head.appendChild(styleElement);\n  return styleElement;\n}\n\n/**\n * Removes the ReSpec CSS if the `noReSpecCSS` configuration option is `true`.\n * @param {Conf} conf The document configuration object.\n */\nexport function run(conf) {\n  if (conf.noReSpecCSS) {\n    styleElement.remove();\n  }\n}\n","/* 1EdTech styles and overrides */\nconst css = String.raw;\n\n// prettier-ignore\nexport default css`@charset \"UTF-8\";\n/* Base CSS for 1EdTech specifications. This builds on and in some cases\n * overrides the ReSpec and W3C/TR stylesheets:\n * - https://github.com/w3c/respec/assets/respec2.css\n * - https://www.w3.org/StyleSheets/TR/2016/base.css\n */\n@import url(https://fonts.googleapis.com/css?family=Roboto|Roboto+Condensed|Source+Code+Pro);\n/** variables ******************************************************************/\n:root {\n  --fgclr1: rgba(0, 0, 0, 1);\n  --fgclr2: rgba(0, 90, 156, 1);\n  --fgclr3: rgba(70, 130, 180, 1);\n  --fgclr4: rgba(40, 100, 150, 1);\n  --gray: rgba(200, 200, 200, 0.9);\n  --lightgray: rgba(240, 240, 240, 1);\n  --lightestgray: rgba(250, 250, 250, 0.8);\n  --darkgray: rgba(180, 180, 180, 1);\n}\n\n/** fonts **********************************************************************/\nbody {\n  font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\npre, code, samp {\n  font-family: 'Source Code Pro', monospace;\n}\n\n/** Header *********************************************************************/\nheader {\n  border-bottom: 2px solid var(--gray);\n  padding-bottom: 2em;\n}\n\n.header-top {\n  display: -webkit-box;\n  display: -ms-flexbox;\n  display: flex;\n  -webkit-box-orient: horizontal;\n  -webkit-box-direction: normal;\n      -ms-flex-flow: row nowrap;\n          flex-flow: row nowrap;\n  -webkit-box-pack: justify;\n      -ms-flex-pack: justify;\n          justify-content: space-between;\n}\n\na#logo, a#ims-logo {\n  text-decoration: none;\n  border: 0;\n}\n\nh1.title {\n  font-size: 200%;\n}\n\ndiv.subtitle {\n  font-size: 150%;\n  color: var(--fgclr2);\n}\n\n/* the copyright notice */\n#cpr {\n  margin-bottom: 1.5em;\n  margin-top: 2.5em;\n}\n\n#cpr p {\n  margin-top: 0em;\n  margin-bottom: 0em;\n}\n\n/* the vertical status bar top left */\n.statusPD {\n  position: fixed;\n  display: block;\n  top: 0px;\n  left: 0px;\n  width: 300px;\n  height: 30px;\n  text-align: right;\n  padding-top: 2px;\n  padding-right: 2em;\n  background-color: red;\n  color: white;\n  font-size: 20px;\n  transform-origin: left top;\n  transform: rotate(-90deg) translate(-100%, 0%);\n  -ms-transform-origin: left top;\n  -ms-transform: rotate(90deg);\n  -webkit-transform-origin: left top;\n  -webkit-transform: rotate(-90deg) translate(-100%, 0%);\n  -moz-transform-origin: left top;\n  -moz-transform: rotate(-90deg) translate(-100%, 0%);\n  -o-transform-origin: left top;\n  -o-transform: rotate(-90deg) translate(-100%, 0%);\n  z-index: 12000;\n}\n\n.statusPD.final {\n  background-color: blue;\n}\n\n/** Headings ******************************************************************/\nh1, h2, h3, h4, h5, h6, dt {\n  page-break-after: avoid;\n  page-break-inside: avoid;\n  font: 100% sans-serif;\n  font-family: inherit;\n  line-height: 1.2;\n  -webkit-hyphens: manual;\n      -ms-hyphens: manual;\n          hyphens: manual;\n}\n\nh2, h3, h4, h5, h6 {\n  margin-top: 3rem;\n}\n\nh1, h2, h3, h4 {\n  color: var(--fgclr4);\n  background: transparent;\n}\n\nh1 {\n  font-size: 170%;\n}\n\nh2 {\n  font-size: 140%;\n}\n\nh3 {\n  font-size: 120%;\n}\n\nh4 {\n  font-weight: bold;\n}\n\nh5 {\n  font-style: italic;\n}\n\nh6 {\n  font-variant: small-caps;\n}\n\ndt {\n  font-weight: bold;\n}\n\n/** Linkage ******************************************************************/\na[href].internalDFN {\n  color: var(--fgclr1);\n  text-decoration: none;\n  border-bottom: 1px var(--fgclr2) dotted;\n}\n\na[href]:focus,\na[href]:hover {\n  background: var(--lightgray);\n}\n\na[href]:active {\n  color: #C00;\n  border-color: #C00;\n}\n\n/** Examples *******************************************************************/\n.example {\n  border: 1px solid var(--darkgray);\n  counter-increment: example;\n}\n\n.example figcaption {\n  background-color: var(--fgclr3);\n  color: white;\n}\n\n/** Footer ******************************************************************/\nsection#revisionhistory table {\n  margin-bottom: 3em;\n}\n\ndiv#endWarranty p {\n  margin-top: 0.3em;\n  margin-bottom: 0.3em;\n}\n\ndiv#endWarranty {\n  margin-top: 6em;\n  padding-top: 3em;\n  border-top: 2px solid var(--gray);\n  text-align: center;\n}\n\n/** tables *****************************************************************/\n/* The default table style has gray border, with th bgclr being light gray */\ntable {\n  border-collapse: collapse;\n  word-wrap: normal;\n  overflow-wrap: normal;\n  -webkit-hyphens: manual;\n      -ms-hyphens: manual;\n          hyphens: manual;\n  width: 100%;\n  margin-top: 1.5em;\n  margin-bottom: 1.5em;\n  max-width: 50em;\n  border: 1px solid var(--gray);\n  /*margin-left: 0em;*/\n}\n\ntd, th {\n  padding-left: 1em;\n  padding-right: 1em;\n  padding-left: 1em;\n  padding-right: 1em;\n  text-align: left;\n  text-align: start;\n  vertical-align: top;\n  border: 1px solid var(--gray);\n}\n\nth {\n  font-weight: bold;\n  background-color: var(--fgclr3);\n  color: var(--lightgray);\n  padding: 0.6em;\n}\n\ntd {\n  padding: 0.8em;\n}\n\nth > * {\n  padding: 0;\n  margin: 0;\n}\n\n/* specific table styles */\ntable#version-table, table#no-cell-borders {\n  border: 1px solid var(--gray);\n}\n\ntable#version-table td, table#no-cell-borders td {\n  border: none;\n}\n\ntable#version-table td {\n  padding: 0.2em;\n}\n\n/* For when values are extra-complex and need formatting for readability */\ntd.pre, td code {\n  white-space: pre;\n  overflow: scroll;\n}\n\n/** Index Tables *****************************************************/\n/* See also the data table styling section, which this effectively subclasses */\ntable.index {\n  font-size: small;\n  border-collapse: collapse;\n  border-spacing: 0;\n  text-align: left;\n  margin: 1em 0;\n}\n\ntable.index td,\ntable.index th {\n  padding: 0.4em;\n}\n\ntable.index tr:hover td:not([rowspan]),\ntable.index tr:hover th:not([rowspan]) {\n  background: #f7f8f9;\n}\n\n/* The link in the first column in the property table (formerly a TD) */\ntable.index th:first-child a {\n  font-weight: bold;\n}\n\n/** boxes *************************************************************/\n.alert {\n  border: 2px solid red;\n  padding: 0.3em;\n}\n\n/** inlines *************************************************************/\ndt > dfn {\n  font-weight: bold;\n}\n\n/** \"Link here\" for section headings  *****************************************/\na[href].hidden-reveal::before {\n  content: \"›\";\n  text-decoration: none;\n}\n\n/* w3c/respec change in how section headers are formed */\n:is(h2, h3, h4, h5, h6) + a.self-link::before {\n  content: \"›\";\n}\n\na.self-link {\n  text-decoration: none;\n}\n\na[href].hidden-reveal, a[href].hidden-reveal:visited,\na[href].self-link:visited, a[href].self-link:hover {\n  opacity: 1;\n  text-decoration: none;\n}\n\n/** Admonitions for section headings  *****************************************/\n.admonition {\n  margin-top: 1em;\n  margin-bottom: 1em;\n  margin: 1em 0;\n  border-left-width: .5em;\n  border-left-style: solid;\n  padding: 0.5em 1.2em 0.5em;\n  position: relative;\n  clear: both;\n}\n\n.admonition .admon-top {\n  padding-right: 1em;\n  min-width: 7.5em;\n  color: #e05252;\n  text-transform: uppercase;\n}\n\n.admonition .note-title, .admonition .ednote-title {\n  color: #2b2;\n}\n\n.admonition .warning-title, .admonition .ednote-title {\n  color: #f22;\n}\n\n.admonition.issue {\n  border-color: #e05252;\n  background: #fbe9e9;\n  counter-increment: issue;\n  overflow: auto;\n}\n\n.admonition.note, .admonition.ednote {\n  border-color: #52e052;\n  background: #e9fbe9;\n}\n\n.admonition > p:first-child {\n  margin-top: 0;\n}\n\n.admonition.warning {\n  border-color: #f11;\n  border-width: .2em;\n  border-style: solid;\n  background: #fbe9e9;\n  padding-top: 1em;\n}\n\n.admonition .warning-title:before {\n  content: \"⚠\";\n  /*U+26A0 WARNING SIGN*/\n  font-size: 3em;\n  float: left;\n  height: 100%;\n  padding-right: .3em;\n  vertical-align: top;\n  margin-top: -0.5em;\n}\n\n/******************************************************************************\n * Overrides to W3C/TR/2016/base.css                                          *\n ******************************************************************************\n\n/******************************************************************************/\n/*                                   Body                                     */\n/******************************************************************************/\nbody {\n  -webkit-hyphens: auto;\n      -ms-hyphens: auto;\n          hyphens: auto;\n  /* Colors */\n  color: var(--fgclr1);\n}\n\n/******************************************************************************/\n/*                                    Images                                  */\n/******************************************************************************/\nfigure, .figure, .sidefigure {\n  text-align: left;\n}\n\n.figure img, .sidefigure img, figure img,\n.figure pre, .sidefigure pre, figure pre {\n  display: unset;\n}\n\n.caption, figcaption, caption {\n  display: block;\n  padding: 0.5em 0 0.5em 0.5em;\n}\n`;\n","// @ts-check\n/**\n * Module 1edtech/style\n *\n * Inserts 1EdTech stylesheet and replaces w3c/style.\n *\n * The CSS documents are pulled from known locations so the spec documents\n * can be located anywhere. Overrides are available via respecConfig.\n *\n * CONFIGURATION\n *\n * - overrideCSSLocation: by default 1edtech-base.css will be loaded from\n *   ./styles/1edtech-base.css.js.\n */\n\nimport { linkCSS, toKeyValuePairs } from \"../core/utils.js\";\nimport css from \"./styles/1edtech-base.css.js\";\n\nexport const name = \"1edtech/style\";\n\n/**\n * From w3c/style\n *\n * Make a best effort to attach meta viewport at the top of the head.\n * Other plugins might subsequently push it down, but at least we start\n * at the right place. When ReSpec exports the HTML, it again moves the\n * meta viewport to the top of the head - so to make sure it's the first\n * thing the browser sees. See js/ui/save-html.js.\n */\nfunction attachMetaViewport() {\n  const meta = document.createElement(\"meta\");\n  meta.name = \"viewport\";\n  const contentProps = {\n    width: \"device-width\",\n    \"initial-scale\": \"1\",\n    \"shrink-to-fit\": \"no\",\n  };\n  meta.content = toKeyValuePairs(contentProps).replace(/\"/g, \"\");\n  document.head.insertBefore(meta, document.head.firstChild);\n}\n\n/**\n * From w3c/style\n *\n * Ignores specStatus and always loads base.css.\n */\nfunction linkW3cCSS() {\n  linkCSS(document, \"https://www.w3.org/StyleSheets/TR/2016/base.css\");\n}\n\n/**\n * @param {*} conf respecConfig\n */\nexport async function run(conf) {\n  // From w3c/style\n  attachMetaViewport();\n  linkW3cCSS();\n\n  // Link to 1EdTech stylesheet\n  if (conf.overrideCSSLocation) {\n    const cssURL = conf.overrideCSSLocation;\n    linkCSS(document, cssURL);\n  } else {\n    const style = document.createElement(\"style\");\n    style.textContent = css;\n    document.head.appendChild(style);\n  }\n}\n","// @ts-check\n\n/**\n * check config and inform user if required ones are missing\n */\n\nimport { ISODate, showError } from \"../core/utils.js\";\n\nexport const name = \"1edtech/config\";\n\n/**\n * Returns true if value is not null or empty.\n *\n * @param { string } value\n */\nfunction check(value) {\n  return value != undefined && value.trim().length > 0;\n}\n\n/**\n * @param {*} conf\n */\nexport async function run(conf) {\n  if (!check(conf.specTitle)) {\n    showError(\n      \"head config must have the <code>specTitle</code> property set: \" +\n        \"title of the document, excluding version\",\n      name\n    );\n    conf.specTitle = \"@@@FIXME (conf.specTitle)\";\n  }\n\n  if (!check(conf.docVersion)) {\n    showError(\n      \"head config must have the <code>docVersion</code> property set, e.g. 'June 28, 2019'\",\n      name\n    );\n    conf.docVersion = \"@@@FIXME (conf.docVersion)\";\n  }\n\n  if (!check(conf.specDate)) {\n    if (conf.specStatus === \"Base Document\") {\n      conf.specDate = ISODate.format(new Date());\n    } else {\n      showError(\n        \"head config must have the <code>specDate</code> property set, e.g. 'June 28, 2019'\",\n        name\n      );\n      conf.specDate = \"@@@FIXME(conf.specDate)\";\n    }\n  }\n\n  if (!check(conf.specNature)) {\n    showError(\n      \"head config must have the <code>specNature</code> property set: one of 'normative' or 'informative'\",\n      name\n    );\n    conf.specNature = \"informative\";\n  }\n\n  if (!check(conf.specType)) {\n    showError(\n      \"head config must have the <code>specType</code> property set: One of 'spec', 'cert', 'impl', 'errata', 'doc' \",\n      name\n    );\n    conf.specType = \"spec\";\n  }\n\n  if (conf.specType === \"doc\" || conf.specType === \"proposal\") {\n    return;\n  }\n\n  if (!check(conf.shortName)) {\n    showError(\n      \"head config must have the <code>shortName</code> property set: \" +\n        \"list at urls-names.md#shortnames\",\n      name\n    );\n    conf.shortName = \"FIXME\";\n  }\n\n  if (!check(conf.specStatus)) {\n    showError(\n      \"head config must have the <code>specStatus</code> property set to \" +\n        \"one of 'Base Document', 'Candidate Final', Candidate Final Public', \" +\n        \"or 'Final Release'\",\n      name\n    );\n    conf.specStatus = \"@@@FIXME(conf.specStatus)\";\n  }\n\n  const statusValues = [\n    \"Base Document\",\n    \"Candidate Final\",\n    \"Candidate Final Public\",\n    \"Final Release\",\n    \"Proposal\",\n  ];\n  if (statusValues.indexOf(conf.specStatus) == -1) {\n    showError(\n      \"head config must have the <code>specStatus</code> property set to \" +\n        \"one of 'Base Document', 'Candidate Final', 'Candidate Final Public', \" +\n        \"'Final Release', or 'Proposal'\",\n      name\n    );\n  }\n\n  if (!check(conf.specVersion)) {\n    showError(\n      \"head config must have the <code>specVersion</code> property set, e.g. '1.1'\",\n      name\n    );\n    conf.specVersion = \"@@@FIXME(conf.specVersion)\";\n  }\n}\n","// @ts-check\n\nexport const name = \"1edtech/compute\";\n\n/**\n * Compute misc variables used by multiple other modules and store them back in conf.\n *\n * @param {*} conf\n */\nexport async function run(conf) {\n  const base = `https://www.imsglobal.org/spec/${conf.shortName}/`;\n\n  // v1p2-style reformat for use in path segments\n  conf.versionURL = `v${conf.specVersion}`.replace(\".\", \"p\");\n\n  conf.thisURL = `${base}${conf.versionURL}/`;\n\n  conf.errataURL = `${conf.thisURL}errata/`;\n\n  if (conf.specType !== \"spec\") {\n    conf.thisURL = `${conf.thisURL}${conf.specType}/`;\n  }\n\n  conf.latestURI = `${base}latest/`;\n  if (conf.specType !== \"spec\") {\n    conf.latestURI = `${conf.latestURI}${conf.specType}/`;\n  }\n\n  // needed for aux docs that need to point back to main spec\n  conf.mainSpecURL = `${base}${conf.versionURL}/`;\n}\n","// @ts-check\n/**\n * core/github\n *\n * @see https://github.com/speced/respec/wiki/github\n */\n\nimport { docLink, getIntlData, showError, showWarning } from \"../core/utils.js\";\nexport const name = \"core/github\";\n\nlet resolveGithubPromise;\nlet rejectGithubPromise;\n/** @type {Promise<{ apiBase: string, fullName: string, branch: string, repoURL: string } | null>} */\nexport const github = new Promise((resolve, reject) => {\n  resolveGithubPromise = resolve;\n  rejectGithubPromise = message => {\n    showError(message, name);\n    reject(new Error(message));\n  };\n});\n\nconst localizationStrings = {\n  en: {\n    file_a_bug: \"File an issue\",\n    participate: \"Participate:\",\n    commit_history: \"Commit history\",\n  },\n  ko: {\n    participate: \"참여\",\n  },\n  zh: {\n    file_a_bug: \"反馈错误\",\n    participate: \"参与：\",\n  },\n  ja: {\n    commit_history: \"変更履歴\",\n    file_a_bug: \"問題報告\",\n    participate: \"参加方法：\",\n  },\n  nl: {\n    commit_history: \"Revisiehistorie\",\n    file_a_bug: \"Dien een melding in\",\n    participate: \"Doe mee:\",\n  },\n  es: {\n    commit_history: \"Historia de cambios\",\n    file_a_bug: \"Nota un bug\",\n    participate: \"Participe:\",\n  },\n  de: {\n    commit_history: \"Revisionen\",\n    file_a_bug: \"Fehler melden\",\n    participate: \"Mitmachen:\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run(conf) {\n  if (!conf.hasOwnProperty(\"github\") || !conf.github) {\n    // nothing to do, bail out.\n    resolveGithubPromise(null);\n    return;\n  }\n  if (\n    typeof conf.github === \"object\" &&\n    !conf.github.hasOwnProperty(\"repoURL\")\n  ) {\n    const msg = docLink`Config option ${\"[github]\"} is missing property \\`repoURL\\`.`;\n    rejectGithubPromise(msg);\n    return;\n  }\n  let tempURL = conf.github.repoURL || conf.github;\n  if (!tempURL.endsWith(\"/\")) tempURL += \"/\";\n  /** @type URL */\n  let ghURL;\n  try {\n    ghURL = new URL(tempURL, \"https://github.com\");\n  } catch {\n    const msg = docLink`${\"[github]\"} configuration option is not a valid URL? (${tempURL}).`;\n    rejectGithubPromise(msg);\n    return;\n  }\n  if (ghURL.origin !== \"https://github.com\") {\n    const msg = docLink`${\"[github]\"} configuration option must be HTTPS and pointing to GitHub. (${ghURL.href}).`;\n    rejectGithubPromise(msg);\n    return;\n  }\n  const [org, repo] = ghURL.pathname.split(\"/\").filter(item => item);\n  if (!org || !repo) {\n    const msg = docLink`${\"[github]\"} URL needs a path. For example, \"w3c/my-spec\".`;\n    rejectGithubPromise(msg);\n    return;\n  }\n  const branch = conf.github.branch || \"gh-pages\";\n  const issueBase = new URL(\"./issues/\", ghURL).href;\n  const commitHistoryURL = new URL(\n    `./commits/${conf.github.branch ?? \"\"}`,\n    ghURL.href\n  );\n  const newProps = {\n    edDraftURI: `https://${org.toLowerCase()}.github.io/${repo}/`,\n    githubToken: undefined,\n    githubUser: undefined,\n    issueBase,\n    atRiskBase: issueBase,\n    otherLinks: [],\n    pullBase: new URL(\"./pulls/\", ghURL).href,\n    shortName: repo,\n  };\n  // Assign new properties, but retain existing ones\n  let githubAPI = \"https://respec.org/github\";\n  if (conf.githubAPI) {\n    if (new URL(conf.githubAPI).hostname === window.parent.location.hostname) {\n      // for testing\n      githubAPI = conf.githubAPI;\n    } else {\n      const msg =\n        \"The `githubAPI` configuration option is private and should not be added manually.\";\n      showWarning(msg, name);\n    }\n  }\n  if (!conf.excludeGithubLinks) {\n    const otherLink = {\n      key: l10n.participate,\n      data: [\n        {\n          value: `GitHub ${org}/${repo}`,\n          href: ghURL,\n        },\n        {\n          value: l10n.file_a_bug,\n          href: newProps.issueBase,\n        },\n        {\n          value: l10n.commit_history,\n          href: commitHistoryURL.href,\n        },\n        {\n          value: \"Pull requests\",\n          href: newProps.pullBase,\n        },\n      ],\n    };\n    if (!conf.otherLinks) {\n      conf.otherLinks = [];\n    }\n    conf.otherLinks.unshift(otherLink);\n  }\n  const normalizedGHObj = {\n    branch,\n    repoURL: ghURL.href,\n    apiBase: githubAPI,\n    fullName: `${org}/${repo}`,\n    issuesURL: issueBase,\n    pullsURL: newProps.pullBase,\n    newIssuesURL: new URL(\"./new/choose\", issueBase).href,\n    commitHistoryURL: commitHistoryURL.href,\n  };\n  resolveGithubPromise(normalizedGHObj);\n\n  const normalizedConfig = {\n    ...newProps,\n    ...conf,\n    github: normalizedGHObj,\n    githubAPI,\n  };\n  Object.assign(conf, normalizedConfig);\n}\n","// @ts-check\nexport const name = \"1edtech/utils\";\n\n/**\n * Returns the first Element in the string.\n *\n * @param { string } string the HTML string to convert\n * @returns { Element } the first element in the string\n */\nexport function toHTMLElement(string) {\n  const node = toHTMLNode(string);\n  return node.parentElement.firstElementChild;\n}\n\nexport function toHTMLNodes(string) {\n  const element = document.createElement(\"div\");\n  element.innerHTML = string;\n  return element.childNodes;\n}\n\nexport function toHTMLNode(string) {\n  const element = document.createElement(\"div\");\n  element.innerHTML = string;\n  return element.childNodes[0];\n}\n","// @ts-check\n\nimport { pub } from \"../core/pubsubhub.js\";\nimport { toHTMLNodes } from \"./utils.js\";\n\nexport const name = \"1edtech/transclude\";\n\nexport async function run() {\n  /*\n  Filesystem transclusion is done using script elements with a class \n  of 'transclude'. If the script element has a data-id attribute equal to the \n  name of a string variable in global scope, then the script element is \n  replaced with HTML nodes corresponding to the given variable. \n  \n  Each script element can declare zero, one or several string variables. In\n  other words, it is possible to have one script which \n  declares all transclude variables, and then src-less script elements which\n  then only declares where the content should be inserted. It is equally ok\n  to have each occurence of the script element in the body to bring in its own \n  content via its own src. \n  \n  Note the use of template literals to allow easy authoring and maintenance\n  of multi-line strings in the js files referenced. \n  */\n\n  let transclude = document.querySelector(\"script.transclude\");\n\n  while (transclude !== null) {\n    if (!transclude.hasAttribute(\"data-id\")) {\n      pub(\"error\", \"transclude script element without data-id attribute\");\n      break;\n    }\n\n    const str = window[transclude.getAttribute(\"data-id\")];\n\n    if (str === undefined || typeof str !== \"string\") {\n      pub(\n        \"error\",\n        `no transclude variable named '${str}' found in global scope`\n      );\n      break;\n    }\n\n    const newNodes = toHTMLNodes(str);\n\n    for (let k = 0; k < newNodes.length; k++) {\n      const clone = newNodes[k].cloneNode(true);\n      transclude.parentNode.insertBefore(clone, transclude);\n    }\n\n    transclude.parentNode.removeChild(transclude);\n\n    // Get the next transclude\n\n    transclude = document.querySelector(\"script.transclude\");\n  }\n}\n","/**\n * Module core/sections\n *\n * Adds <section>s to the document, based on the heading structure.\n */\nexport const name = \"core/sections\";\n\nclass DOMBuilder {\n  constructor(doc) {\n    this.doc = doc;\n    this.root = doc.createDocumentFragment();\n    this.stack = [this.root];\n    this.current = this.root;\n  }\n  findPosition(header) {\n    return parseInt(header.tagName.charAt(1), 10);\n  }\n  findParent(position) {\n    let parent;\n    while (position > 0) {\n      position--;\n      parent = this.stack[position];\n      if (parent) return parent;\n    }\n  }\n  findHeader({ firstChild: node }) {\n    while (node) {\n      if (/H[1-6]/.test(node.tagName)) {\n        return node;\n      }\n      node = node.nextSibling;\n    }\n    return null;\n  }\n\n  addHeader(header) {\n    const section = this.doc.createElement(\"section\");\n    const position = this.findPosition(header);\n\n    section.appendChild(header);\n    this.findParent(position).appendChild(section);\n    this.stack[position] = section;\n    this.stack.length = position + 1;\n    this.current = section;\n  }\n\n  addSection(node) {\n    const header = this.findHeader(node);\n    const position = header ? this.findPosition(header) : 1;\n    const parent = this.findParent(position);\n\n    if (header) {\n      node.removeChild(header);\n    }\n\n    node.appendChild(structure(node));\n\n    if (header) {\n      node.prepend(header);\n    }\n\n    parent.appendChild(node);\n    this.current = parent;\n  }\n\n  addElement(node) {\n    this.current.appendChild(node);\n  }\n}\n/**\n *\n * @param {Node} fragment\n * @returns\n */\nfunction structure(fragment) {\n  const builder = new DOMBuilder(fragment.ownerDocument);\n  while (fragment.firstChild) {\n    const node = fragment.firstChild;\n    switch (node.localName) {\n      case \"h1\":\n      case \"h2\":\n      case \"h3\":\n      case \"h4\":\n      case \"h5\":\n      case \"h6\":\n        builder.addHeader(node);\n        break;\n      case \"section\":\n        builder.addSection(node);\n        break;\n      default:\n        builder.addElement(node);\n    }\n  }\n  return builder.root;\n}\n\n/**\n * Restructure a container element adding sections if needed.\n * @param {Element} elem\n */\nexport function restructure(elem) {\n  const structuredInternals = structure(elem);\n  if (\n    structuredInternals.firstElementChild.localName === \"section\" &&\n    elem.localName === \"section\"\n  ) {\n    const section = structuredInternals.firstElementChild;\n    section.remove();\n    elem.append(...section.childNodes);\n  } else {\n    elem.textContent = \"\";\n  }\n  elem.appendChild(structuredInternals);\n}\n\nexport function run() {\n  restructure(document.body);\n}\n","// @ts-check\n// Module core/data-include\n// Support for the data-include attribute. Causes external content to be included inside an\n// element that has data-include='some URI'. There is also a data-oninclude attribute that\n// features a white space separated list of global methods that will be called with the\n// module object, the content, and the included URI.\n//\n// IMPORTANT:\n//  This module only really works when you are in an HTTP context, and will most likely\n//  fail if you are editing your documents on your local drive. That is due to security\n//  restrictions in the browser.\nimport { runTransforms, showError } from \"./utils.js\";\nimport { markdownToHtml } from \"./markdown.js\";\nimport { restructure } from \"./sections.js\";\n\nexport const name = \"core/data-include\";\n\n/**\n * @param {HTMLElement} el\n * @param {string} data\n * @param {object} options\n * @param {boolean} options.replace\n */\nfunction fillWithText(el, data, { replace }) {\n  const { includeFormat } = el.dataset;\n  let fill = data;\n  if (includeFormat === \"markdown\") {\n    fill = markdownToHtml(fill);\n  }\n\n  if (includeFormat === \"text\") {\n    el.textContent = fill;\n  } else {\n    el.innerHTML = fill;\n  }\n\n  if (includeFormat === \"markdown\") {\n    restructure(el);\n  }\n\n  if (replace) {\n    el.replaceWith(...el.childNodes);\n  }\n}\n\n/**\n * @param {string} rawData\n * @param {string} id\n * @param {string} url\n */\nfunction processResponse(rawData, id, url) {\n  /** @type {HTMLElement} */\n  const el = document.querySelector(`[data-include-id=${id}]`);\n  const data = runTransforms(rawData, el.dataset.oninclude, url);\n  const replace = typeof el.dataset.includeReplace === \"string\";\n  fillWithText(el, data, { replace });\n  // If still in the dom tree, clean up\n  if (!replace) {\n    removeIncludeAttributes(el);\n  }\n}\n/**\n * Removes attributes after they are used for inclusion, if present.\n *\n * @param {Element} el The element to clean up.\n */\nfunction removeIncludeAttributes(el) {\n  [\n    \"data-include\",\n    \"data-include-format\",\n    \"data-include-replace\",\n    \"data-include-id\",\n    \"oninclude\",\n  ].forEach(attr => el.removeAttribute(attr));\n}\n\nexport async function run() {\n  await runIncludes(document, 1);\n}\n\n/**\n * @param {HTMLElement | Document} root\n * @param {number} currentDepth\n */\nasync function runIncludes(root, currentDepth) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const includables = root.querySelectorAll(\"[data-include]\");\n  const promisesToInclude = Array.from(includables).map(async el => {\n    const url = el.dataset.include;\n    if (!url) {\n      return; // just skip it\n    }\n    const id = `include-${String(Math.random()).slice(2)}`;\n    el.dataset.includeId = id;\n    try {\n      const response = await fetch(url);\n      const text = await response.text();\n      processResponse(text, id, url);\n      if (currentDepth < 3) {\n        // For performance reasons, only allow limited nesting.\n        await runIncludes(el, currentDepth + 1);\n      }\n    } catch (err) {\n      const msg = `\\`data-include\\` failed: \\`${url}\\` (${err.message}).`;\n      console.error(msg, el, err);\n      showError(msg, name, { elements: [el] });\n    }\n  });\n  await Promise.all(promisesToInclude);\n}\n","/**\n * Add formats to ajv validator. These are the formats used by 1EdTech modeling tools.\n *\n * @param {Object} ajv Instance of ajv\n */\nexport function addFormats(ajv) {\n  // number formats\n  ajv.addFormat(\"byte\", validateInt32);\n  ajv.addFormat(\"double\", validateNumber);\n  ajv.addFormat(\"float\", validateNumber);\n  ajv.addFormat(\"int32\", validateInt32);\n  ajv.addFormat(\"int64\", validateInt64);\n  // string formats\n  ajv.addFormat(\"date\", /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/);\n  ajv.addFormat(\n    \"date-time\",\n    /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i\n  );\n  ajv.addFormat(\n    \"uri\",\n    /^(?:[a-z][a-z0-9+\\-.]*:)?(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i\n  );\n  ajv.addFormat(\n    \"uuid\",\n    /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i\n  );\n}\n\nconst MIN_INT32 = -(2 ** 31);\nconst MAX_INT32 = 2 ** 31 - 1;\n\nfunction validateInt32(value) {\n  return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;\n}\n\nfunction validateInt64(value) {\n  return Number.isInteger(value);\n}\n\nfunction validateNumber() {\n  return true;\n}\n","// @ts-check\nimport { html, mermaidModule } from \"../../core/import-maps.js\";\n\n/**\n * Render the Class diagram of an MPS Model / Package object.\n * @param {*} diagram The Class diagram in markdown format.\n * @param {string?} title The preferred title for this section.\n * @returns {Promise<HTMLElement[]>} An array of HTML elements.\n */\nexport default async (index, diagram, title) => {\n  // dinamycally import mermaid to avoid increase of size of the library\n  const { default: mermaid } = await import(mermaidModule);\n  mermaid.initialize({ startOnLoad: false });\n  const { svg } = await mermaid.render(`class-diagram-${index}`, diagram);\n  const cleanedSvg = svg.trim().replace(/height=\"[0-9]*\"/, \"\");\n  return html`<h3>${title}</h3>\n    ${cleanedSvg}`;\n};\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/templateUtils.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render a MPS issue as a Respec issue.\n * @param {String} issue A MPS issue (\"q:\" in a .lines file).\n * @returns The issue wrapped in a div with class=\"issue\".\n */\nexport function renderIssue(issue) {\n  return html`<div class=\"issue\" title=\"${issue}\"></div>`;\n}\n\n/**\n * Render a MPS note as a Respec note.\n * @param {String} note A MPS note (\"n:\" in a .lines file).\n * @returns The note wrapped in a div with class=\"note\".\n */\nexport function renderNote(note) {\n  return html`<div class=\"note\">${note}</div>`;\n}\n\n/**\n * Render a MPS privacy doc as a Respec note.\n * @param {*} config The ReSpec config object.\n * @param {String} doc A MPS privacy doc (\"pd:\" in a .lines file).\n * @returns The doc wrapped in a div with class=\"note\".\n */\nexport function renderPrivacyImplicationDoc(config, doc) {\n  if (config.showPrivacyAnnotations && doc) {\n    return html`<div class=\"advisement\">${l10n.privacy_implication}: ${doc}</div>`;\n  }\n}\n/**\n * Render a term as HTML.\n * @param {*} term A MPS model for a property representing an enumeration\n * or vocabulary term.\n * @returns A table row with information about the term.\n */\nexport function renderTerm(term) {\n  const id = `${term.parentClass.name}.${term.name}`.toLowerCase();\n  return html`<tr>\n    <td id=\"${id}\">${term.name}</td>\n    <td>\n      ${term.documentation.description}\n      ${term.documentation.issues.map(renderIssue)}\n      ${term.documentation.notes.map(renderNote)}\n    </td>\n  </tr>`;\n}\n\n/**\n * Return a clickable link to the type definition.\n * @param {*} type The MPS ModelClass object.\n * @returns {HTMLAnchorElement} Returns an anchor element that links to the property type definition.\n */\nexport function renderType(type) {\n  let name = type.name;\n  if (\n    type.stereoType === \"Enumeration\" ||\n    type.stereoType === \"EnumExt\"\n  ) {\n    name = l10n.enumeration_name.replace(\"{0}\", name);\n  }\n  name = html`<a href=\"#${type.id}\"><samp>${name}</samp></a>`;\n  return name;\n}\n","export default {\n  en: {\n    privacy_implication: \"Privacy Implication\",\n    enumeration_name: \"{0} Enumeration\",\n  },\n  es : {\n    privacy_implication: \"Implicación de Privacidad\",\n    enumeration_name: \"Enumeración {0}\",\n  },\n  ca : {\n    privacy_implication: \"Implicació de Privacitat\",\n    enumeration_name: \"Enumeració {0}\",\n  }\n};\n","// @ts-check\nimport {\n  renderIssue,\n  renderNote,\n  renderPrivacyImplicationDoc,\n  renderType\n} from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/classTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render the header, description, notes, and issues, and properties of an MPS Class object.\n * @param {*} config The ReSpec config object.\n * @param {*} classData The Class object.\n * @param {string?} title The preferred title for this section.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (config, classData, title) => {\n  if (classData && classData.properties) {\n    title = title ?? `${classData.name}`;\n    return html`<h3>${title}</h3>\n      <p>${classData.documentation.description}</p>\n      ${classData.documentation.issues.map(renderIssue)}\n      ${classData.documentation.notes.map(renderNote)}\n      <table class=\"simple\">\n        <thead>\n          <tr>\n            <th>${l10n.Property}</th>\n            <th>${l10n.Type}</th>\n            <th>${l10n.Description}</th>\n            <th>${l10n.Multiplicity}</th>\n            ${config.showPrivacyAnnotations ? html`<th>${l10n.Privacy}</th>` : null}\n          </tr>\n        </thead>\n        <tbody>\n          ${classData.properties.map(prop => renderProperty(config, prop))}\n          ${renderExtensibility(config, classData)}\n        </tbody>\n      </table>`;\n  }\n};\n\n/**\n * Render text that indicates the class is extensible.\n * @param {*} config The ReSpec config object.\n * @param {*} classData The MPS Class object.\n * @returns {HTMLTableRowElement?} A table row that can be appended to the properties table.\n */\nfunction renderExtensibility(config, classData) {\n  if (classData.isExtensible) {\n    return html` <tr>\n      <td colspan=\"${config.showPrivacyAnnotations ? 5 : 4}\">\n        ${l10n.ClassExtensibility}\n      </td>\n    </tr>`;\n  } else {\n    return html``;\n  }\n}\n\n/**\n * Render property information.\n * @param {*} config The ReSpec config object.\n * @param {*} property The MPS Property object.\n * @returns {HTMLTableRowElement?} A table row with property information.\n */\nfunction renderProperty(config, property) {\n  return html` <tr>\n    <td style=\"min-width: 150px; word-break: break-all;\">${property.name}</td>\n    <td>${renderType(property.type)}</td>\n    <td>\n      ${property.documentation.description}\n      ${property.documentation.issues.map(renderIssue)}\n      ${property.documentation.notes.map(renderNote)}\n      ${renderPrivacyImplicationDoc(config, property.documentation.privacyDoc)}\n    </td>\n    <td>${renderCardinality(property)}</td>\n    ${config.showPrivacyAnnotations\n      ? renderPrivacyImplicationCell(property)\n      : null}\n  </tr>`;\n}\n\n/**\n * Return a string describing whether a property is required or not.\n * @param {*} property The MPS Property object.\n * @returns {string} A string describing whether a property is required or not.\n */\nfunction renderCardinality(property) {\n  switch (property.cardinality.value) {\n    case \"ONE\":\n      return \"[1]\";\n    case \"ZERO_OR_ONE\":\n      return \"[0..1]\";\n    case \"ZERO_OR_MANY\":\n      return \"[0..*]\";\n    case \"ONE_OR_MANY\":\n      return \"[1..*]\";\n    case \"TWO\":\n      return \"[2]\";\n    case \"TWO_OR_MANY\":\n      return \"[2..*]\";\n    case \"THREE_OR_MANY\":\n      return \"[3..*]\";\n    default:\n      break;\n  }\n}\n\n/**\n * Return a table cell with a string describing the privacy implications of a property.\n * @param {*} property The MPS Property object.\n * @returns {HTMLTableCellElement} A table cell with a string describing the privacy implications of a property.\n */\nfunction renderPrivacyImplicationCell(property) {\n  return html`<td>\n    <a href=\"#privacy-${property.privacyImplications.value.toLowerCase()}\">\n      ${renderPrivacyImplication(property)}\n    </a>\n  </td>`;\n}\n\n/**\n * Return a string describing the privacy implications of a property.\n * @param {*} property The MPS Property object.\n * @returns {string} A string describing the privacy implications of a property.\n */\nfunction renderPrivacyImplication(property) {\n  return html`${property.privacyImplications.label}`;\n}\n","export default {\n  en: {\n    Property: \"Property\",\n    Type: \"Type\",\n    Description: \"Description\",\n    Multiplicity: \"Multiplicity\",\n    Privacy: \"Privacy\",\n    ClassExtensibility: \"This class can be extended with additional properties.\"\n  },\n  es: {\n    Property: \"Propiedad\",\n    Type: \"Tipo\",\n    Description: \"Descripción\",\n    Multiplicity: \"Cardinalidad\",\n    Privacy: \"Privacidad\",\n    ClassExtensibility: \"Esta clase se puede extender con propiedades adicionales.\"\n  },\n  ca: {\n    Property: \"Propietat\",\n    Type: \"Tipus\",\n    Description: \"Descripció\",\n    Multiplicity: \"Cardinalitat\",\n    Privacy: \"Privacitat\",\n    ClassExtensibility: \"Aquesta classe es pot ampliar amb propietats adicionals.\"\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/dataModelTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render the header, notes, and issues for a MPS Model. This template\n * is used when the Model includes MPS DataModels.\n * @param {*} dataModel The MPS Model.\n * @param {string?} title The preferred title for this section.\n * @param {string?} id The unique header id to use so a model can appear in multiple sections.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (dataModel, title, id) => {\n  if (dataModel) {\n    title = title ?? `${l10n.data_model_name.replace(\"{0}\", dataModel.name)}`;\n    id = (id ?? dataModel.id).replace(/\\./g, \"-\");\n    return html`<h2 id=\"${id}\">${title}</h2>\n      ${dataModel.documentation.issues.map(renderIssue)}\n      ${dataModel.documentation.notes.map(renderNote)}`;\n  }\n};\n","export default {\n  en: {\n    data_model_name: \"{0} Data Model\"\n  },\n  es: {\n    data_model_name: \"Modelo de Datos {0}\"\n  },\n  ca: {\n    data_model_name: \"Model de Dades {0}\"\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote, renderTerm } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/enumerationTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render an Enumeration, ExtEnum, or Vocabulary class.\n * @param {*} classData The MPS Class object.\n * @param {string?} title The preferred title.\n * @returns {HTMLElement[]} The entire section contents.\n */\nexport default (classData, title) => {\n  if (classData && classData.properties) {\n    const suffix =\n      classData.stereoType === \"Vocabulary\" ? l10n.Vocabulary : l10n.Enumeration;\n    title = title ?? `${classData.name} ${suffix}`;\n    return html`<h3>${title}</h3>\n      <p>${classData.documentation.description}</p>\n      ${classData.documentation.issues.map(renderIssue)}\n      ${classData.documentation.notes.map(renderNote)}\n      <table class=\"simple\">\n        <thead>\n          <tr>\n            <th>${l10n.Term}</th>\n            <th>${l10n.Description}</th>\n          </tr>\n        </thead>\n        <tbody>\n          ${classData.properties.map(renderTerm)}\n          ${classData.stereoType === \"EnumExt\"\n            ? html`<tr>\n                <td colspan=\"2\">${l10n.EnumerationExtensibility}</td>\n              </tr>`\n            : html``}\n        </tbody>\n      </table>`;\n  }\n};\n","export default {\n  en: {\n    Vocabulary: \"Vocabulary\",\n    Enumeration: \"Enumeration\",\n    Term: \"Term\",\n    Description: \"Description\",\n    EnumerationExtensibility: \"This enumeration can be extended with new, proprietary terms.\\nThe new terms must start with the substring 'ext:'.\"\n  },\n  es: {\n    Vocabulary: \"Vocabulario\",\n    Enumeration: \"Enumeración\",\n    Term: \"Término\",\n    Description: \"Descripción\",\n    EnumerationExtensibility: \"Esta enumeración se puede extender con términos nuevos i/o propietarios.\\nLos términos nuevos deben empezar con la subcadena 'ext:'.\"\n  },\n  ca: {\n    Vocabulary: \"Vocabulari\",\n    Enumeration: \"Enumeració\",\n    Term: \"Terme\",\n    Description: \"Descripció\",\n    EnumerationExtensibility: \"Aquesta enumeració es pot ampliar amb termes nous i/o propietari.\\nEls nous termes han de començar per la subcadena 'ext:'.\"\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\n/**\n * Render the header, description, notes, and issues for a MPS RestInterface object.\n * @param {*} serviceInterface The RestInterface object.\n * @param {string?} title Optional title for the section. By default it will be the operation name.\n * @param {string?} headerId The preferred header id.\n * @returns {HTMLElement[]} The rendered content.\n */\nexport default (serviceInterface, title, headerId) => {\n  if (serviceInterface && serviceInterface.operations) {\n    title = title ?? `${serviceInterface.name}`;\n    headerId = (headerId ?? serviceInterface.id).replace(/\\./g, \"-\");\n    return html`<h3 id=\"${headerId}\">${title}</h3>\n      <p>${serviceInterface.documentation?.description}</p>\n      ${serviceInterface.documentation?.issues.map(renderIssue)}\n      ${serviceInterface.documentation?.notes.map(renderNote)}`;\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\n/**\n * Render the JSON Schema of an MPS Class object.\n * @param {*} classData The Class object.\n * @param {*} schema The Class' JSON Schema.\n * @param {string?} title The preferred title for this section.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (classData, schema, title) => {\n  if (classData) {\n    title = title ?? `${classData.name}`;\n    return html`<h3>${title}</h3>\n      <p>${classData.documentation.description}</p>\n      ${classData.documentation.issues.map(renderIssue)}\n      ${classData.documentation.notes.map(renderNote)}\n      <pre class=\"nohighlight user-select\">\n${JSON.stringify(schema, null, 2)}</pre\n      >`;\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/jsonSchemasTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render the header, notes, and issues for a MPS Model. This template\n * is used when the section contains JSON Schemas.\n * @param {*} dataModel The MPS Model.\n * @param {string?} title The preferred title for this section.\n * @param {string?} id The unique header id to use so a model can appear in multiple sections.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (dataModel, title, id) => {\n  if (dataModel) {\n    title = title ?? `${l10n.json_schema_name.replace(\"{0}\", dataModel.name)}`;\n    id = (id ?? dataModel.id).replace(/\\./g, \"-\");\n    return html`<h2 id=\"${id}\">${title}</h2>\n      ${dataModel.documentation.issues.map(renderIssue)}\n      ${dataModel.documentation.notes.map(renderNote)}`;\n  }\n};\n","export default {\n  en: {\n    json_schema_name: \"{0} JSON Schema\",\n  },\n  es : {\n    json_schema_name: \"JSON Schema {0}\",\n  },\n  ca : {\n    json_schema_name: \"JSON Schema {0}\",\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\n/**\n * Render the OpenAPI Schema of an MPS Model object.\n * @param {*} modelData The Model object.\n * @param {*} schema The Model's OpenAPI Schema (YAML or JSON).\n * @param {string?} title The preferred title for this section.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (modelData, schema, title) => {\n  if (modelData) {\n    title = title ?? `${modelData.name}`;\n    return html`<h3>${title}</h3>\n      <p>${modelData.documentation.description}</p>\n      ${modelData.documentation.issues.map(renderIssue)}\n      ${modelData.documentation.notes.map(renderNote)}\n      <pre class=\"nohighlight user-select\">${schema}</pre>`;\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote as renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/operationTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render the header, description, notes, and issues for a MPS RestOperation object.\n * @param {*} config The ReSpec config object.\n * @param {string} rootPath The root path for the service definition. For example, \"ims/clr/v2p0\".\n * @param {*} operation The RestOperation object from MPS.\n * @param {string?} title Optional title for the section. By default it will be the operation name.\n * @returns {HTMLElement[]} Information about the operation.\n */\nexport default (config, rootPath, operation, title) => {\n  if (operation) {\n    title = title ?? `${operation.name}`;\n    return html`<h3>${title}</h3>\n      <p>${operation.documentation.description}</p>\n      ${operation.documentation.issues.map(renderIssue)}\n      ${operation.documentation.notes.map(renderNote)}\n      ${renderRequest(config, rootPath, operation)}\n      ${renderResponses(config, operation)}`;\n  }\n};\n\n/**\n * Render the operation request.\n * @param {*} config The ReSpec config object.\n * @param {string} rootPath The root path for the service definition. For example, \"ims/clr/v2p0\".\n * @param {*} operation The operation object from CDM/MPS.\n * @returns {HTMLElement[]} The rendered request as HTML elements.\n */\nfunction renderRequest(config, rootPath, operation) {\n  return html`<h5>${l10n.Request}</h5>\n    ${renderUrl(rootPath, operation)}\n    ${renderRequestParameters(config, operation)}\n    ${renderRequestBodies(config, operation)}`;\n}\n\n/**\n * Render the request URL.\n * @param {string} rootPath The root path for the service definition. For example, \"ims/clr/v2p0\".\n * @param {*} operation The operation object from CDM/MPS.\n * @returns {HTMLParagraphElement} The rendered URL.\n */\nfunction renderUrl(rootPath, operation) {\n  let url = `${operation.method} ${rootPath}${operation.request.path}`;\n  const queryParameters = operation.request.parameters.filter(\n    parameter => parameter.type === \"QUERY\"\n  );\n  if (queryParameters) {\n    for (let index = 0; index < queryParameters.length; index++) {\n      const parameter = queryParameters[index];\n      url += index == 0 ? \"?\" : \"&\";\n      url += `${parameter.name}={${parameter.name}}`;\n    }\n  }\n  return html`<p><code>${url}</code></p>`;\n}\n\n/**\n * Render the operation request parameters.\n * @param {*} config The ReSpec config object.\n * @param {*} operation The operation object from CDM/MPS.\n * @returns {HTMLTableElement} A table of information about the request parameters.\n */\nfunction renderRequestParameters(config, operation) {\n  if (Array.from(operation.request.parameters).length > 0) {\n    return html`\n      <table class=\"simple\" style=\"caption-side:top\">\n        <caption style=\"display:table-caption;text-align:left\">\n          ${l10n.request_parameter_header}\n        </caption>\n        <thead>\n          <tr>\n            <th>${l10n.Parameter}</th>\n            <th>${l10n.Parameter_Type}</th>\n            <th>${l10n.Description}</th>\n            <th>${l10n.Required}</th>\n            ${config.showPrivacyAnnotations\n              ? html`<th>${l10n.confidentiality_level}</th>`\n              : null}\n          </tr>\n        </thead>\n        <tbody>\n          ${operation.request.parameters.map(param =>\n            renderParameter(config, param)\n          )}\n        </tbody>\n      </table>\n    `;\n  }\n}\n\n/**\n * Render the operation request bodies (if any).\n * @param {*} config The ReSpec config object.\n * @param {*} operation The operation object from CDM/MPS.\n * @returns {HTMLTableElement} A table of information about the request bodies.\n */\nfunction renderRequestBodies(config, operation) {\n  if (Array.from(operation.request.bodies).length > 0) {\n    return html`\n      <table class=\"simple\" style=\"caption-side:top\">\n        <caption style=\"display:table-caption;text-align:left\">\n          ${l10n.request_body_header}\n        </caption>\n        <thead>\n          <tr>\n            <th>${l10n.Content_Type_Header}</th>\n            <th>${l10n.Content_Type}</th>\n            <th>${l10n.Content_Description}</th>\n            <th>${l10n.Content_Required}</th>\n            ${config.showPrivacyAnnotations\n              ? html`<th>${l10n.confidentiality_level}</th>`\n              : null}\n          </tr>\n        </thead>\n        <tbody>\n          ${operation.request.bodies.map(body =>\n            renderRequestBody(config, body)\n          )}\n        </tbody>\n      </table>\n    `;\n  }\n}\n\n/**\n * Render a single request body.\n * @param {*} config The ReSpec config object.\n * @param {*} body The body object from CDM/MPS.\n * @returns {HTMLTableRowElement} A table row with information about the request body.\n */\nfunction renderRequestBody(config, body) {\n  return html`<tr>\n    <td>${body.contentType}</td>\n    <td>${renderBodyType(body)}</td>\n    <td>\n      ${body.documentation?.description}\n      ${body.documentation?.issues.map(renderIssue)}\n      ${body.documentation?.notes.map(renderNote)}\n    </td>\n    <td>${renderRequired(body)}</td>\n    ${config.showPrivacyAnnotations ? renderConfidentialityCell(body) : null}\n  </tr>`;\n}\n\nfunction renderParameter(config, parameter) {\n  return html` <tr>\n    <td>\n      <code>${parameter.name}</code>\n      <div>(${parameter.type.toLowerCase()})</div>\n    </td>\n    <td>${renderParmeterType(parameter)}</td>\n    <td>\n      ${parameter.documentation.description}\n      ${parameter.documentation.issues.map(renderIssue)}\n      ${parameter.documentation.notes.map(renderNote)}\n    </td>\n    <td>${renderRequired(parameter)}</td>\n    ${config.showPrivacyAnnotations\n      ? renderConfidentialityCell(parameter)\n      : null}\n  </tr>`;\n}\n\nfunction renderResponses(config, operation) {\n  const responses = operation.responses.flatMap(mergeResponseBodies);\n  return html`<h5>${l10n.Responses}</h5>\n    <table class=\"simple\" style=\"caption-side:top\">\n      <caption style=\"display:table-caption;text-align:left\">\n        ${l10n.request_header}\n      </caption>\n      <thead>\n        <tr>\n          <th>Status Code</th>\n          <th>${l10n.Content_Type_Header}</th>\n          <th>${l10n.Content_Type}</th>\n          <th>${l10n.Content_Description}</th>\n          <th>${l10n.Content_Required}</th>\n          ${config.showPrivacyAnnotations\n            ? html`<th>${l10n.confidentiality_level}</th>`\n            : null}\n        </tr>\n      </thead>\n      <tbody>\n        ${responses.map(resp => renderResponse(config, resp))}\n      </tbody>\n    </table>`;\n}\n\nfunction renderResponse(config, response) {\n  return html`<tr>\n    <td>${response.statusCode}</td>\n    <td>${response.body?.contentType}</td>\n    <td>${renderBodyType(response.body)}</td>\n    <td>\n      ${response.documentation?.description}\n      ${response.body?.documentation?.description}\n      ${response.body?.documentation?.issues.map(renderIssue)}\n      ${response.body?.documentation?.notes.map(renderNote)}\n    </td>\n    <td>${renderRequired(response.body)}</td>\n    ${config.showPrivacyAnnotations\n      ? renderConfidentialityCell(response.body)\n      : null}\n  </tr>`;\n}\n\nfunction mergeResponseBodies(response) {\n  const bodies = Array.from(response.bodies);\n  if (bodies.length == 0) {\n    return response;\n  } else {\n    const mergedResponses = new Array();\n    for (let index = 0; index < bodies.length; index++) {\n      const body = bodies[index];\n      mergedResponses.push({\n        ...response,\n        body,\n      });\n    }\n    return mergedResponses;\n  }\n}\n\nfunction renderRequired(value) {\n  if (value?.cardinality)\n    return value.cardinality.value.includes(\"ZERO\") ? l10n.Optional : l10n.Required;\n}\n\n/**\n * Return a table cell with a string describing the privacy implications of a property.\n * @param {*} value The value object from CDM/MPS.\n * @returns {HTMLTableCellElement} A table cell with a string describing the privacy implications of a property.\n */\nfunction renderConfidentialityCell(value) {\n  if (value?.confidentiality) {\n    return html`<td>\n      <a href=\"#privacy-${value.confidentiality.value.toLowerCase()}\">\n        ${renderConfidentiality(value)}\n      </a>\n    </td>`;\n  }\n}\nfunction renderConfidentiality(value) {\n  if (value?.confidentiality) {\n    return value.confidentiality.label;\n  }\n}\n\nfunction renderParmeterType(parameter) {\n  let name = parameter.value.name;\n  if (parameter.cardinality.value.includes(\"MANY\")) {\n    name += \"[]\";\n  }\n  if (\n    parameter.value.stereoType === \"Enumeration\" ||\n    parameter.value.stereoType === \"EnumExt\"\n  ) {\n    name = l10n.enumeration_name.replace(\"{0}\", name);\n  }\n  name = html`<a href=\"#${parameter.value.id}\"><samp>${name}</samp></a>`;\n  return name;\n}\n\nfunction renderBodyType(body) {\n  if (body?.type) {\n    let name = body.type.name;\n    if (body.cardinality.value.includes(\"MANY\")) {\n      name += \"[]\";\n    }\n    if (\n      body.type.stereoType === \"Enumeration\" ||\n      body.type.stereoType === \"EnumExt\"\n    ) {\n      name = l10n.enumeration_name.replace(\"{0}\", name);\n    }\n    name = html`<a href=\"#${body.type.id}\"><samp>${name}</samp></a>`;\n    return name;\n  }\n}\n","export default {\n  en: {\n    enumeration_name: \"{0} Enumeration\",\n    Request: \"Request\",\n    Parameter: \"Parameter\",\n    Description: \"Description\",\n    Parameter_Type: \"Parameter Type\",\n    Required: \"Required\",\n    request_parameter_header: \"Request header, path, and query parameters\",\n    Optional: \"Optional\",\n    request_body_header: \"Allowed request content types\",\n    Content_Type_Header: \"Content-Type Header\",\n    Content_Type: \"Content Type\",\n    Content_Description: \"Content Description\",\n    Content_Required: \"Content Required\",\n    Responses: \"Responses\",\n    request_header: \"Allowed response codes and content types\",\n  },\n  es : {\n    enumeration_name: \"Enumeración {0}\",\n    Request: \"Petición\",\n    Parameter: \"Parámetro\",\n    Description: \"Descripción\",\n    Parameter_Type: \"Tipo de Parámetro\",\n    Required: \"Obligatorio\",\n    request_parameter_header: \"Parámetros en la cabecera, path y query de la petición\",\n    Optional: \"Opcional\",\n    request_body_header: \"Content types permitidos en la petición\",\n    Content_Type_Header: \"Cabecera Content-Type\",\n    Content_Type: \"Tipo de Contenido\",\n    Content_Description: \"Descripción del Contenido\",\n    Content_Required: \"Contenido Obligatorio\",\n    Responses: \"Respuestas\",\n    request_header: \"Códigos y Content types permitidos en la respuesta\",\n  },\n  ca : {\n    enumeration_name: \"Enumeració {0}\",\n    Request: \"Petició\",\n    Parameter: \"Paràmetre\",\n    Description: \"Descripció\",\n    Parameter_Type: \"Tipus de Paràmetre\",\n    Required: \"Obligatori\",\n    request_parameter_header: \"Paràmetres dins la capcelera, path i query de la petició\",\n    Optional: \"Opcional\",\n    request_body_header: \"Content types permesos a la petició\",\n    Content_Type_Header: \"Capcelera Content-Type\",\n    Content_Type: \"Tipus de Contingut\",\n    Content_Description: \"Descripció del Contingut\",\n    Content_Required: \"Contingut Obligatori\",\n    Responses: \"Respostes\",\n    request_header: \"Codis i Content types permesos a la resposta\",\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/serviceModelTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render the header, description, notes, and issues for a MPS RestService object.\n * @param {*} serviceModel The ServiceModel object.\n * @param {string?} title The preferred title for this section.\n * @param {string?} headerId The unique header id to use so a data model can appear in multiple sections.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (serviceModel, title, headerId) => {\n  if (serviceModel) {\n    title = title ?? `${l10n.service_model_name.replace(\"{0}\", serviceModel.name)}`;\n    headerId = (headerId ?? serviceModel.id).replace(/\\./g, \"-\");\n    return html`<h2 id=\"${headerId}\">${title}</h2>\n      ${serviceModel.documentation.issues.map(renderIssue)}\n      ${serviceModel.documentation.notes.map(renderNote)}`;\n  }\n};\n","export default {\n  en: {\n    service_model_name: \"{0} Service Model\",\n  },\n  es : {\n    service_model_name: \"Modelo de Servicio {0}\",\n  },\n  ca : {\n    service_model_name: \"Model de Servei {0}\",\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/stereoTypeTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render a table of types with the same stereotype.\n * @param {*} dataModel An array of Derived or Primitive types.\n * @param {*} stereoType The MPS StereoType to list. For example, DerivedType or PrimitiveType.\n * @returns {HTMLElement[]} An array of HTML elements.\n */\nexport default (dataModel, stereoType) => {\n  const types = dataModel.classes\n    .filter(classData => classData.stereoType === stereoType)\n    .sort((a, b) => {\n      const nameA = a.name.toUpperCase();\n      const nameB = b.name.toUpperCase();\n      if (nameA < nameB) {\n        return -1;\n      }\n      if (nameA > nameB) {\n        return 1;\n      }\n      return 0;\n    });\n  if (types.length > 0) {\n    return html` <table class=\"simple\">\n      <thead>\n        <tr>\n          <th>${l10n.Type}</th>\n          <th>${l10n.Description}</th>\n        </tr>\n      </thead>\n      <tbody>\n        ${types.map(renderType)}\n      </tbody>\n    </table>`;\n  }\n};\n\n/**\n * Render type information.\n * @param {*} type The MPS Class object for a DerivedType or PrimitiveType.\n * @returns {HTMLTableRowElement?} A table row with property information.\n */\nfunction renderType(type) {\n  return html` <tr id=\"${type.id}\">\n    <td id=\"${type.name.toLowerCase()}\">${type.name}</td>\n    <td>\n      ${type.documentation.description}\n      ${type.documentation.issues.map(renderIssue)}\n      ${type.documentation.notes.map(renderNote)}\n    </td>\n  </tr>`;\n}\n","export default {\n  en: {\n    Type: \"Type\",\n    Description: \"Description\",\n  },\n  es : {\n    Type: \"Tipo\",\n    Description: \"Descripción\",\n  },\n  ca : {\n    Type: \"Tipus\",\n    Description: \"Descripció\",\n  }\n};\n","// @ts-check\nimport { renderIssue, renderNote, renderType } from \"./templateUtils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/embeddedSelectionTemplate.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Render an EmbeddedSelection class.\n * @param {*} classData The MPS Class object.\n * @param {string?} title The preferred title.\n * @returns {HTMLElement[]} The entire section contents.\n */\nexport default (classData, title) => {\n  if (classData && classData.generalizations) {\n    title = title ?? `${classData.name}`;\n    return html`<h3>${title}</h3>\n      <p>${classData.documentation.description}</p>\n      ${classData.documentation.issues.map(renderIssue)}\n      ${classData.documentation.notes.map(renderNote)}\n      <p>${l10n.intro}</p>\n      <table class=\"simple\">\n        <thead>\n          <tr>\n            <th>${l10n.Type}</th>\n            <th>${l10n.Description}</th>\n          </tr>\n        </thead>\n        <tbody>\n          ${classData.generalizations.map(renderSuperClass)}\n        </tbody>\n      </table>`;\n  }\n};\n\n/**\n * Render superclass information.\n * @param {*} cls The MPS ModelClass object.\n * @returns {HTMLTableRowElement?} A table row with property information.\n */\nfunction renderSuperClass(cls) {\n  return html` <tr>\n    <td style=\"min-width: 150px; word-break: break-all;\">${renderType(cls)}</td>\n    <td>\n      ${cls.documentation.description}\n      ${cls.documentation.issues.map(renderIssue)}\n      ${cls.documentation.notes.map(renderNote)}\n    </td>\n  </tr>`;\n}\n","export default {\n  en: {\n    intro: \"The ultimate representation of this class is a choice of exactly one of the classes in the following set:\",\n    Type: \"Type\",\n    Description: \"Description\"\n  },\n  es: {\n    intro: \"La representación definitiva de esta clase es exactamente una de las siguientes clases:\",\n    Type: \"Tipo\",\n    Description: \"Descripción\"\n  },\n  ca: {\n    intro: \"La representació definitiva d'aquesta classe és exactament una de les següents classes:\",\n    Type: \"Tipus\",\n    Description: \"Descripció\"\n  }\n};\n","const css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n.user-select, .example pre, .example code {\n  user-select: all;\n  -webkit-user-select: all;\n  -moz-user-select: all;\n  -ms-user-select: all;\n  cursor: text;\n}\n`;\n","// @ts-nocheck\n\n/**\n * Module 1edtech/mps\n * Handles the optional Model Processing Service.\n */\nimport { addFormats } from \"./ajv-formats.js\";\nimport classDiagramTemplate from \"./templates/classDiagramTemplate.js\";\nimport classTemplate from \"./templates/classTemplate.js\";\nimport dataModelTemplate from \"./templates/dataModelTemplate.js\";\nimport enumerationTemplate from \"./templates/enumerationTemplate.js\";\nimport { html } from \"../core/import-maps.js\";\nimport interfaceTemplate from \"./templates/interfaceTemplate.js\";\nimport jsonSchemaTemplate from \"./templates/jsonSchemaTemplate.js\";\nimport jsonSchemasTemplate from \"./templates/jsonSchemasTemplate.js\";\nimport openApiSchemaTemplate from \"./templates/openApiSchemaTemplate.js\";\nimport operationTemplate from \"./templates/operationTemplate.js\";\nimport serviceModelTemplate from \"./templates/serviceModelTemplate.js\";\nimport { getIntlData, showError } from \"../core/utils.js\";\nimport stereoTypeTemplate from \"./templates/stereoTypeTemplate.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nimport embeddedSelectionTemplate from \"./templates/embeddedSelectionTemplate.js\";\nimport localizationStrings from \"./translations/mps.js\";\nimport css from \"../styles/mps.css.js\";\n\nexport const name = \"1edtech/mps\";\n\nconst l10n = getIntlData(localizationStrings);\nconst locale = document.documentElement.lang;\n/**\n * Get the MPS API KEY from the configuration.\n *\n * @param {object} config The respecConfig\n * @returns {string} The MPS API KEY.\n */\nfunction getApiKey(config) {\n  if (config.mps.apiKey) {\n    return config.mps.apiKey;\n  }\n  throw \"No MPS API KEY found\";\n}\n\n/**\n * Get the MPS server URL from the configuration.\n *\n * @param {object} config The respecConfig\n * @returns {string} The MPS server URL.\n */\nfunction getBaseUrl(config) {\n  if (config.mps.serverUrl) {\n    return config.mps.serverUrl;\n  }\n  throw \"No MPS server URL found\";\n}\n\n/**\n * Async function that returns a sample JSON object for a single MPS Class.\n *\n * @param {object} config The respecConfig.\n * @param {string} id MPS Class id.\n * @param {boolean} includeOptionalFields True if the sample should include all optional fields (the default is false).\n * @returns {object} The sample JSON object.\n */\nasync function getDataSample(config, id, includeOptionalFields = false) {\n  try {\n    const res = await fetch(\n      `${getBaseUrl(\n        config\n      )}/sample/${id}?includeOptionalFields=${includeOptionalFields}`,\n      {\n        method: \"GET\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          \"X-Api-Key\": getApiKey(config),\n        },\n      }\n    );\n    if (!res.ok) {\n      showError(`Could not get sampledata for ${id}: ${res.status}`, name);\n      return null;\n    }\n    const data = await res.json();\n    return data;\n  } catch (error) {\n    showError(`Could not get sample data for ${id}: ${error}`, name);\n    return null;\n  }\n}\n\n/**\n * Async function that returns the JSON Schema for an MPS Class.\n *\n * @param {object} config The respecConfig.\n * @param {string} id MPS Class id.\n * @param {boolean} jsonLdEnabled If true, the generated schema will include a JSON-LD context.\n * @param {boolean} allowAdditionalProperties If true or omitted, the generated schema will reflect the MPS model. If false, the generated schema will never allow additional properties. Use false to check examples for typos.\n * @returns {object} The JSON Schema object.\n */\nasync function getJsonSchema(\n  config,\n  id,\n  jsonLdEnabled,\n  allowAdditionalProperties = true\n) {\n  try {\n    const res = await fetch(\n      `${getBaseUrl(\n        config\n      )}/jsonschema/${id}?jsonLd=${jsonLdEnabled}&allowAdditionalProperties=${allowAdditionalProperties}`,\n      {\n        method: \"GET\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          \"X-Api-Key\": getApiKey(config),\n        },\n      }\n    );\n    if (!res.ok) {\n      showError(`Could not get the schema for ${id}: ${res.status}`, name);\n      return null;\n    }\n    const data = await res.json();\n    return data;\n  } catch (error) {\n    showError(`Could not get the schema for ${id}: ${error}`, name);\n    return null;\n  }\n}\n\n// execute the API to retrieve the MPS class diagram (/classdiagram/{id})\nasync function getClassDiagram(\n  config,\n  id,\n  omitProperties = false,\n  hideTitle = false,\n  title = null,\n  packages = null,\n  classes = null\n) {\n  try {\n    // create a query string from all the parameters\n    let query = `?omitProperties=${omitProperties}&hideTitle=${hideTitle}`;\n    if (title) query += `&title=${title}`;\n    if (packages) query += `&packageNames=${packages}`;\n    if (classes) query += `&classNames=${classes}`;\n\n    // execute the API call\n    const res = await fetch(\n      `${getBaseUrl(config)}/classdiagram/${id}${query}`,\n      {\n        method: \"GET\",\n        headers: {\n          \"Content-Type\": \"text/markdown\",\n          \"X-Api-Key\": getApiKey(config),\n        },\n      }\n    );\n    if (!res.ok) {\n      showError(\n        `Could not get the class diagram for ${id}: ${res.status}`,\n        name\n      );\n      return null;\n    }\n    const data = await res.text();\n    return data;\n  } catch (error) {\n    showError(`Could not get the class diagram for ${id}: ${error}`, name);\n    return null;\n  }\n}\n\n/**\n * Execute the API call to retrieve MPS Model Classes and Services.\n *\n * @param {object} config The respecConfig.\n * @param {string} source The source (CORE or SANDBOX) of the Model.\n * @param {string} id The id of the MPS Model to retrieve.\n * @returns {object} The model as an object.\n */\nasync function getModel(config, source, id) {\n  const key = `${source}-${id}`;\n  const json = sessionStorage.getItem(key);\n  if (json) return JSON.parse(json);\n  const query = JSON.stringify({\n    query: `\n    {\n      modelByID(id: \"${id}\", source: ${source ?? \"CORE\"}, locale: \"${locale}\") {\n        id\n        id\n        name\n        documentation {\n          description\n          notes\n          issues\n        }\n        classes {\n          id\n          name\n          stereoType\n          documentation {\n            description\n            notes\n            issues\n            packageName\n          }\n          properties {\n            name\n            type {\n              id\n              name\n              stereoType\n            }\n            cardinality {\n              value\n            }\n            documentation {\n              description\n              notes\n              issues\n              privacyDoc\n            }\n            privacyImplications {\n              label\n              value\n            }\n            parentClass {\n              id\n              name\n            }\n\n          }\n          isExtensible\n          generalizations {\n            id\n            name\n            documentation {\n              description\n              notes\n              issues\n            }\n          }\n        }\n        services {\n          ... on RestService {\n            id\n            type\n            documentation {\n              description\n              notes\n              issues\n            }\n            rootPath\n            interfaces {\n              id\n              name\n              documentation {\n                description\n                notes\n                issues\n              }\n              operations {\n                id\n                name\n                documentation {\n                  description\n                  notes\n                  issues\n                }\n                method\n                request {\n                  id\n                  documentation {\n                    description\n                    notes\n                    issues\n                  }\n                  path\n                  bodies {\n                    documentation {\n                      description\n                      notes\n                      issues\n                    }\n                    type {\n                      id\n                      name\n                    }\n                    cardinality {\n                      value\n                    }\n                    confidentiality {\n                      label\n                      value\n                    }\n                    contentType\n                  }\n                  parameters {\n                    id\n                    name\n                    documentation {\n                      description\n                      notes\n                      issues\n                    }\n                    type\n                    cardinality {\n                      value\n                    }\n                    confidentiality {\n                      label\n                      value\n                    }\n                    value {\n                      id\n                      name\n                      stereoType\n                    }\n                  }\n                }\n                responses {\n                  id\n                  documentation {\n                    description\n                    notes\n                    issues\n                  }\n                  statusCode\n                  bodies {\n                    documentation {\n                      description\n                      notes\n                      issues\n                    }\n                    type {\n                      id\n                      name\n                      stereoType\n                    }\n                    confidentiality {\n                      label\n                      value\n                    }\n                    cardinality {\n                      value\n                    }\n                    contentType\n                  }\n                  parameters {\n                    id\n                    name\n                    documentation {\n                      description\n                      notes\n                      issues\n                    }\n                    type\n                    cardinality {\n                      value\n                    }\n                    value {\n                      id\n                      name\n                      stereoType\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n    `,\n  });\n\n  try {\n    const res = await fetch(`${getBaseUrl(config)}/graphql`, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n        \"X-Api-Key\": getApiKey(config),\n      },\n      body: query,\n    });\n    if (!res.ok) {\n      showError(\n        `Could not get MPS model for ${id}. Please see the developer console for details.`,\n        name\n      );\n      return null;\n    }\n    const data = await res.json();\n    const model = data.data.modelByID;\n    if (!model) {\n      showError(\n        `Unknown model ${id} at ${getBaseUrl(config)}, source: ${\n          config.mps.source ?? \"CORE\"\n        }`,\n        name\n      );\n      return null;\n    }\n    sessionStorage.setItem(key, JSON.stringify(model));\n    return model;\n  } catch (error) {\n    showError(`Could not get MPS model for ${id}: ${error}`, name);\n    return null;\n  }\n}\n\n/**\n * Async function that returns the OpenAPI Schema for an MPS Model.\n *\n * @param {object} config The respecConfig.\n * @param {string} id MPS Model id.\n * @param {string} binding The OpenAPI Schema file format (YAML or JSON).\n * @returns {object} The OpenAPI Schema text.\n */\nasync function getOpenApiSchema(config, id, binding) {\n  binding = binding ?? \"yaml\";\n  try {\n    const res = await fetch(\n      `${getBaseUrl(\n        config\n      )}/openapischema/${id}?binding=${binding.toLowerCase()}`,\n      {\n        method: \"GET\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          \"X-Api-Key\": getApiKey(config),\n        },\n      }\n    );\n    if (!res.ok) {\n      showError(\n        `Could not get the OpenAPI schema for ${id}: ${res.status}`,\n        name\n      );\n      return null;\n    }\n    const data = await res.text();\n    return data;\n  } catch (error) {\n    showError(`Could not get the OpenAPI schema for ${id}: ${error}`, name);\n    return null;\n  }\n}\n/**\n * Process a single MPS Class model.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The class section element.\n * @param {object} classModel The MPS Class object.\n */\nasync function processClass(config, section, classModel) {\n  section.setAttribute(\"id\", classModel.id);\n  const title = section.getAttribute(\"title\");\n  let wrapper;\n  switch (classModel.stereoType) {\n    case \"Enum\":\n    case \"EnumeratedList\":\n    case \"Enumeration\":\n    case \"EnumExt\":\n    case \"Vocabulary\":\n      wrapper = enumerationTemplate(classModel, title);\n      break;\n    case \"EmbeddedSelection\":\n      wrapper = embeddedSelectionTemplate(classModel, title);\n      break;\n    default:\n      wrapper = classTemplate(config, classModel, title);\n      break;\n  }\n\n  if (wrapper) {\n    let target = null;\n    Array.from(wrapper.childNodes).forEach(element => {\n      if (element.nodeName !== \"#comment\") {\n        let thisElement = element;\n        if (element.nodeName === \"#text\") {\n          thisElement = document.createElement(\"text\");\n          thisElement.innerHTML = element.nodeValue;\n        }\n        if (target) {\n          target.insertAdjacentElement(\"afterend\", thisElement);\n        } else {\n          section.insertAdjacentElement(\"afterbegin\", thisElement);\n        }\n        target = thisElement;\n      }\n    });\n  }\n}\n\n/**\n * Process a single data model section. A model can be split across multiple sections (e.g. one section\n * in the main content and one in the appendices). The data-package attribute, if present, acts as a\n * filter for the section. Only classes in the named package will be expected or generated.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The model section element.\n * @param {string} modelId The MPS Model id.\n */\nasync function processDataModel(config, section, modelId) {\n  // The MPS/MPS source (CORE|SANDBOX)\n  const source = section.getAttribute(\"data-source\") ?? config.mps.source;\n  if (source !== \"CORE\" && source !== \"SANDBOX\") {\n    showError(`Invalid source ${source} for model ${modelId}`);\n    return;\n  }\n\n  // The preferred section title\n  const title = section.getAttribute(\"title\");\n\n  // The section's unique id (used to calculate a unique header id)\n  const id = section.getAttribute(\"id\");\n\n  // The package name filter, if any\n  const packageName = section.getAttribute(\"data-package\") ?? \"\";\n\n  const dataModel = await getModel(config, source, modelId);\n  if (dataModel) {\n    const wrapper = dataModelTemplate(dataModel, title, id);\n    if (wrapper) {\n      let target = null;\n      Array.from(wrapper.childNodes).forEach(element => {\n        if (element.nodeName !== \"#comment\") {\n          let thisElement = element;\n          if (element.nodeName === \"#text\") {\n            thisElement = document.createElement(\"text\");\n            thisElement.innerHTML = element.nodeValue;\n          }\n          if (target) {\n            target.insertAdjacentElement(\"afterend\", thisElement);\n          } else {\n            section.insertAdjacentElement(\"afterbegin\", thisElement);\n          }\n          target = thisElement;\n        }\n      });\n    }\n\n    let classes = Array.from(dataModel.classes).filter(\n      classModel =>\n        classModel.stereoType !== \"PrimitiveType\" &&\n        classModel.stereoType !== \"DerivedType\"\n    );\n\n    if (packageName !== \"\") {\n      classes = classes.filter(\n        classModel => classModel.documentation.packageName === packageName\n      );\n    }\n\n    classes.forEach(async classModel => {\n      let classSection = section.querySelector(\n        `section[data-class=\"${classModel.id}\"]`\n      );\n      if (classSection) {\n        processClass(config, classSection, classModel);\n      } else {\n        // Auto-generate the class definition\n        classSection = html`<section data-class=\"${classModel.id}\"></section>`;\n        processClass(config, classSection, classModel);\n        section.insertAdjacentElement(\"beforeend\", classSection);\n      }\n    });\n  } else {\n    // If there is no data model, add a header to satisfy Respec\n    section.insertAdjacentElement(\"afterbegin\", html`<h3>${modelId}</h3>`);\n  }\n}\n\n/**\n * Process a single service interface model.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The service interface section element.\n * @param {object} serviceInterface The MPS Interface object.\n */\nasync function processInterface(config, section, serviceInterface) {\n  const preferredId = section.getAttribute(\"id\");\n  section.setAttribute(\"id\", serviceInterface.id);\n  const title = section.getAttribute(\"title\");\n  const wrapper = interfaceTemplate(serviceInterface, title, preferredId);\n  if (wrapper) {\n    let target = null;\n    Array.from(wrapper.childNodes).forEach(element => {\n      if (element.nodeName !== \"#comment\") {\n        let thisElement = element;\n        if (element.nodeName === \"#text\") {\n          thisElement = document.createElement(\"text\");\n          thisElement.innerHTML = element.nodeValue;\n        }\n        if (target) {\n          target.insertAdjacentElement(\"afterend\", thisElement);\n        } else {\n          section.insertAdjacentElement(\"afterbegin\", thisElement);\n        }\n        target = thisElement;\n      }\n    });\n\n    const operations = Array.from(serviceInterface.operations);\n    operations.forEach(async operation => {\n      let operationSection = section.querySelector(\n        `section[data-operation=\"${operation.id}\"]`\n      );\n      if (operationSection) {\n        processOperation(\n          config,\n          operationSection,\n          serviceInterface.rootPath,\n          operation\n        );\n      } else {\n        // Auto-generate the operation section\n        operationSection = html`<section\n          data-operation=\"${operation.id}\"\n        ></section>`;\n        processOperation(\n          config,\n          operationSection,\n          serviceInterface.rootPath,\n          operation\n        );\n        section.insertAdjacentElement(\"beforeend\", operationSection);\n      }\n    });\n  }\n}\n\n/**\n * Process the JSON Schema for single MPS Class model.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The class section element.\n * @param {object} classModel The MPS Class object.\n * @param {boolean} jsonLdEnabled True if JSON-LD context should be generated.\n */\nasync function processJsonSchema(config, section, classModel, jsonLdEnabled) {\n  section.setAttribute(\"id\", `${classModel.id}-schema`);\n  const title = section.getAttribute(\"title\");\n  const schema = await getJsonSchema(config, classModel.id, jsonLdEnabled);\n  const wrapper = jsonSchemaTemplate(classModel, schema, title);\n  if (schema && wrapper) {\n    let target = null;\n    Array.from(wrapper.childNodes).forEach(element => {\n      if (element.nodeName !== \"#comment\") {\n        let thisElement = element;\n        if (element.nodeName === \"#text\") {\n          thisElement = document.createElement(\"text\");\n          thisElement.innerHTML = element.nodeValue;\n        }\n        if (target) {\n          target.insertAdjacentElement(\"afterend\", thisElement);\n        } else {\n          section.insertAdjacentElement(\"afterbegin\", thisElement);\n        }\n        target = thisElement;\n      }\n    });\n  }\n}\n\n/**\n * Process a JSON Schemas schemas section. Schemas can be split across multiple sections (e.g. one section\n * in the main content and one in the appendices). The data-package attribute, if present, acts as a\n * filter for the section. Only classes in the named package will be expected or generated.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The schema section element.\n * @param {string} modelId The MPS Model id.\n * @param {boolean} jsonLdEnabled True if JSON-LD context should be generated.\n */\nasync function processJsonSchemas(config, section, modelId, jsonLdEnabled) {\n  // The MPS/MPS source (CORE|SANDBOX)\n  const source = section.getAttribute(\"data-source\") ?? config.mps.source;\n  if (source !== \"CORE\" && source !== \"SANDBOX\") {\n    showError(`Invalid source ${source} for model ${modelId}`);\n    return;\n  }\n\n  // The preferred section title\n  const title = section.getAttribute(\"title\");\n\n  // The section's unique id (used to calculate a unique header id)\n  const id = section.getAttribute(\"id\");\n\n  // The package name filter, if any\n  const packageName = section.getAttribute(\"data-package\") ?? \"\";\n\n  const dataModel = await getModel(config, source, modelId);\n  if (dataModel) {\n    const wrapper = jsonSchemasTemplate(dataModel, title, id);\n    if (wrapper) {\n      let target = null;\n      Array.from(wrapper.childNodes).forEach(element => {\n        if (element.nodeName !== \"#comment\") {\n          let thisElement = element;\n          if (element.nodeName === \"#text\") {\n            thisElement = document.createElement(\"text\");\n            thisElement.innerHTML = element.nodeValue;\n          }\n          if (target) {\n            target.insertAdjacentElement(\"afterend\", thisElement);\n          } else {\n            section.insertAdjacentElement(\"afterbegin\", thisElement);\n          }\n          target = thisElement;\n        }\n      });\n    }\n\n    let classes = Array.from(dataModel.classes).filter(\n      classModel =>\n        classModel.stereoType !== \"PrimitiveType\" &&\n        classModel.stereoType !== \"DerivedType\"\n    );\n\n    if (packageName !== \"\") {\n      classes = classes.filter(\n        classModel => classModel.documentation.packageName === packageName\n      );\n    }\n\n    classes.forEach(async classModel => {\n      let classSection = section.querySelector(\n        `section[data-class=\"${classModel.id}\"]`\n      );\n      if (classSection) {\n        processJsonSchema(config, classSection, classModel, jsonLdEnabled);\n      } else {\n        // Auto-generate the class definition\n        classSection = html`<section data-class=\"${classModel.id}\"></section>`;\n        processJsonSchema(config, classSection, classModel, jsonLdEnabled);\n        section.insertAdjacentElement(\"beforeend\", classSection);\n      }\n    });\n  } else {\n    // If there is no data model, add a header to satisfy Respec\n    section.insertAdjacentElement(\"afterbegin\", html`<h3>${modelId}</h3>`);\n  }\n}\n\n/**\n * Process an OpenAPI Schema section.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The schema section element.\n * @param {string} modelId The MPS Model id.\n */\nasync function processOpenApiSchema(config, section, modelId) {\n  // The MPS/MPS source (CORE|SANDBOX)\n  const source = section.getAttribute(\"data-source\") ?? config.mps.source;\n  if (source !== \"CORE\" && source !== \"SANDBOX\") {\n    showError(`Invalid source ${source} for model ${modelId}`);\n    return;\n  }\n\n  // The preferred section title\n  const title = section.getAttribute(\"title\");\n\n  // The section's unique id (used to calculate a unique header id)\n  const id = section.getAttribute(\"id\");\n\n  // The preferred schema binding\n  const binding = section.getAttribute(\"data-binding\");\n\n  const dataModel = await getModel(config, source, modelId);\n\n  const schema = await getOpenApiSchema(config, modelId, binding);\n\n  if (dataModel && schema) {\n    const wrapper = openApiSchemaTemplate(dataModel, schema, title, id);\n    if (wrapper) {\n      let target = null;\n      Array.from(wrapper.childNodes).forEach(element => {\n        if (element.nodeName !== \"#comment\") {\n          let thisElement = element;\n          if (element.nodeName === \"#text\") {\n            thisElement = document.createElement(\"text\");\n            thisElement.innerHTML = element.nodeValue;\n          }\n          if (target) {\n            target.insertAdjacentElement(\"afterend\", thisElement);\n          } else {\n            section.insertAdjacentElement(\"afterbegin\", thisElement);\n          }\n          target = thisElement;\n        }\n      });\n    }\n  } else {\n    // If there is no schema, add a header to satisfy Respec\n    section.insertAdjacentElement(\"afterbegin\", html`<h3>${modelId}</h3>`);\n  }\n}\n\n/**\n * Process a single MPS Operation model.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The operation section element.\n * @param {string} rootPath The services root path.\n * @param {object} operation The MPS Operation object.\n */\nasync function processOperation(config, section, rootPath, operation) {\n  section.setAttribute(\"id\", operation.id);\n  const title = section.getAttribute(\"title\");\n  const wrapper = operationTemplate(config, rootPath, operation, title);\n  if (wrapper) {\n    let target = null;\n    Array.from(wrapper.childNodes).forEach(element => {\n      if (element.nodeName !== \"#comment\") {\n        let thisElement = element;\n        if (element.nodeName === \"#text\") {\n          thisElement = document.createElement(\"text\");\n          thisElement.innerHTML = element.nodeValue;\n        }\n        if (target) {\n          target.insertAdjacentElement(\"afterend\", thisElement);\n        } else {\n          section.insertAdjacentElement(\"afterbegin\", thisElement);\n        }\n        target = thisElement;\n      }\n    });\n  }\n}\n\n/**\n * Generate a sample. The schema is identified by the data-sample attribute.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} parentElem The element that will contain the generated sample.\n */\nasync function processSample(config, parentElem) {\n  const classId = parentElem.getAttribute(\"data-sample\");\n  if (classId === \"\") {\n    showError(\"Example is missing a schema id\", name);\n    return;\n  }\n  const id = parentElem.getAttribute(\"id\") ?? `example-${classId}`;\n  parentElem.setAttribute(\"id\", id);\n  parentElem.removeAttribute(\"data-sample\");\n  const includeOptionalFields =\n    parentElem.getAttribute(\"data-include-optional-fields\") ?? \"false\";\n  const sampleData = await getDataSample(\n    config,\n    classId,\n    includeOptionalFields\n  );\n  if (sampleData) {\n    // eslint-disable-next-line prettier/prettier\n    const sample = html` <pre class=\"nohighlight\">\n${JSON.stringify(sampleData, null, 2)}\n</pre>`;\n    parentElem.append(sample);\n  } else {\n    parentElem.append(html`<p>${l10n.error_sample_data}</p>`);\n  }\n}\n\n/**\n * Process a single ServiceModel section. A ServiceModel can be split\n * across multiple sections (e.g. one section in the main content\n * and one in the appendices). The data-interface-filter attribute, if\n * present, acts as a filter for the section. Only operations in\n * the identified interface will be generated.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The model section element.\n * @param {string?} preferredId The preferred id for this section. This be moved to the header.\n */\nasync function processServiceModel(config, section, preferredId) {\n  const modelId = section.getAttribute(\"data-model\");\n  const serviceModelId = section.getAttribute(\"data-service-model\");\n  const source = section.getAttribute(\"data-source\") ?? config.mps.source;\n  if (source !== \"CORE\" && source !== \"SANDBOX\") {\n    showError(`Invalid source ${source} for model ${modelId}`);\n    return;\n  }\n\n  // The preferred section title\n  const title = section.getAttribute(\"title\");\n\n  const serviceModels = await getModel(config, source, modelId);\n  const serviceModel = serviceModels.services.find(\n    service => service.id === serviceModelId\n  );\n  if (serviceModel) {\n    const wrapper = serviceModelTemplate(serviceModel, title, preferredId);\n    if (wrapper) {\n      let target = null;\n      Array.from(wrapper.childNodes).forEach(element => {\n        if (element.nodeName !== \"#comment\") {\n          let thisElement = element;\n          if (element.nodeName === \"#text\") {\n            thisElement = document.createElement(\"text\");\n            thisElement.innerHTML = element.nodeValue;\n          }\n          if (target) {\n            target.insertAdjacentElement(\"afterend\", thisElement);\n          } else {\n            section.insertAdjacentElement(\"afterbegin\", thisElement);\n          }\n          target = thisElement;\n        }\n      });\n    }\n\n    // Merge service rootPath property into each interface for convenience\n    let serviceInterfaces = [];\n    serviceModel.interfaces.forEach(serviceInterface => {\n      serviceInterface.rootPath = serviceModel.rootPath;\n      serviceInterfaces.push(serviceInterface);\n    });\n\n    // The interface filter, if any\n    const interfaceId = section.getAttribute(\"data-interface-filter\") ?? \"\";\n    if (interfaceId !== \"\") {\n      serviceInterfaces = serviceInterfaces.filter(\n        serviceInterface => serviceInterface.id === interfaceId\n      );\n    }\n\n    // Process each interface\n    serviceInterfaces.forEach(async serviceInterface => {\n      let interfaceSection = section.querySelector(\n        `section[data-interface=\"${serviceInterface.id}\"]`\n      );\n      if (interfaceSection) {\n        processInterface(config, interfaceSection, serviceInterface);\n      } else {\n        // Auto-generate the service definition\n        interfaceSection = html`\n          <section data-interface=\"${serviceInterface.id}\"></section>\n        `;\n        processInterface(config, interfaceSection, serviceInterface);\n        section.insertAdjacentElement(\"beforeend\", interfaceSection);\n      }\n    });\n  } else {\n    // If there is no data model, add a header to satisfy Respec\n    section.insertAdjacentElement(\"afterbegin\", html`<h3>${modelId}</h3>`);\n  }\n}\n\n/**\n * Process classes with a particular stereotype. Only the name and documentation of each class will be listed in a table.\n * Typically used to render the DerivedTypes and PrimitiveTypes.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The model section element.\n * @param {string} The MPS Model id.\n * @param {string} The MPS StereoType.\n */\nasync function processStereoType(config, section, modelId, stereoType) {\n  // The MPS/MPS source (CORE|SANDBOX)\n  const source = section.getAttribute(\"data-source\") ?? config.mps.source;\n  if (source !== \"CORE\" && source !== \"SANDBOX\") {\n    showError(`Invalid source ${source} for model ${modelId}`);\n    return;\n  }\n\n  // The preferred section title\n  const title = section.getAttribute(\"title\");\n\n  // The section's unique id (used to calculate a unique header id)\n  const id = section.getAttribute(\"id\");\n\n  const dataModel = await getModel(config, source, modelId);\n  if (dataModel) {\n    const wrapper = dataModelTemplate(dataModel, title, id);\n    if (wrapper) {\n      let target = null;\n      Array.from(wrapper.childNodes).forEach(element => {\n        if (element.nodeName !== \"#comment\") {\n          let thisElement = element;\n          if (element.nodeName === \"#text\") {\n            thisElement = document.createElement(\"text\");\n            thisElement.innerHTML = element.nodeValue;\n          }\n          if (target) {\n            target.insertAdjacentElement(\"afterend\", thisElement);\n          } else {\n            section.insertAdjacentElement(\"afterbegin\", thisElement);\n          }\n          target = thisElement;\n        }\n      });\n    }\n    const typeList = stereoTypeTemplate(dataModel, stereoType);\n    if (typeList) {\n      section.insertAdjacentElement(\"beforeend\", typeList);\n    }\n  } else {\n    // If there is no data model, add a header to satisfy Respec\n    section.insertAdjacentElement(\"afterbegin\", html`<h3>${modelId}</h3>`);\n  }\n}\n\n/**\n * Validate the JSON in a <pre> element. The schema is identified\n * by a data-schema attribute.\n *\n * @param {object} config The respecConfig.\n * @param {Object} ajv An instance of ajv2019.\n * @param {HTMLPreElement} pre The <pre> element that contains the JSON to be validated.\n */\nasync function validateExample(config, ajv, pre) {\n  const schemaId = pre.getAttribute(\"data-schema\");\n  const allowAdditionalProperties =\n    pre.getAttribute(\"data-allowAdditionalProperties\") ?? true;\n  if (schemaId === \"\") {\n    showError(\"Example is missing a schema id\", name);\n    return;\n  }\n  const schemaDef = await getJsonSchema(\n    config,\n    schemaId,\n    false,\n    allowAdditionalProperties\n  );\n  if (schemaDef === null) return;\n  try {\n    // Remove comments from example\n    let preText = pre.innerText;\n    preText = preText.replace(/\\/\\/ .*$/gm, \"\");\n    const data = JSON.parse(preText);\n    if (ajv.refs[schemaDef.$id] === undefined) {\n      ajv.compile(schemaDef);\n    }\n    const validate = ajv.refs[schemaDef.$id].validate;\n    const valid = validate(data);\n    if (!valid) {\n      pre.insertAdjacentElement(\n        \"beforebegin\",\n        html`<div class=\"issue\" title=\"Invalid JSON\">\n          <p>${l10n.error_invalid_json.replace(\"{0}\", schemaId)}.</p>\n          <ul>\n            ${validate.errors.map(error => {\n              if (error.instancePath === \"\") error.instancePath = \"class\";\n              let message = `${error.instancePath}: ${error.message}`;\n              switch (error.keyword) {\n                case \"additionalProperties\":\n                  message += `${l10n.error_json_additional_property.replace(\"{0}\", error.params.additionalProperty)}`;\n                  break;\n              }\n              return `<li>${message}</li>`;\n            })}\n          </ul>\n        </div>`\n      );\n      showError(`Invalid example JSON for ${schemaId}.`, name);\n    }\n  } catch (error) {\n    showError(`Cannot parse example JSON for ${schemaId}: ${error}`, name);\n    return;\n  }\n}\n\n/**\n * Process a Class diagram section. Diagrams can be split across multiple sections (e.g. one section\n * in the main content and one in the appendices). The data-package, data-classes attributes, if present, act as a\n * filter for the section. Only classes in the named package will be expected or generated.\n *\n * The data-class-diagram-omit-properties attribute, if present, will cause the diagram to omit properties and display only class names.\n * The data-class-diagram-hide-title attribute, if present, will cause the diagram to omit the title.\n *\n * @param {object} config The respecConfig.\n * @param {HTMLElement} section The schema section element.\n * @param {string} modelId The MPS Model id.\n * @param {number} index The index of the diagram.\n */\nasync function processClassDiagram(config, section, modelId, index) {\n  section.setAttribute(\"id\", `${modelId}-class-diagram`);\n  const title = section.getAttribute(\"title\");\n  const packageNames = section.getAttribute(\"data-package\");\n  const classNames = section.getAttribute(\"data-classes\");\n  const omitProperties = section.hasAttribute(\n    \"data-class-diagram-omit-properties\"\n  );\n  const hideTitle = section.hasAttribute(\"data-class-diagram-hide-title\");\n  const diagram = await getClassDiagram(\n    config,\n    modelId,\n    omitProperties,\n    hideTitle,\n    title,\n    packageNames,\n    classNames\n  );\n\n  const wrapper = await classDiagramTemplate(index, diagram, title);\n  if (diagram && wrapper) {\n    let target = null;\n    Array.from(wrapper.childNodes).forEach(element => {\n      if (element.nodeName !== \"#comment\") {\n        let thisElement = element;\n        if (element.nodeName === \"#text\") {\n          thisElement = document.createElement(\"text\");\n          thisElement.innerHTML = element.nodeValue;\n        }\n        if (target) {\n          target.insertAdjacentElement(\"afterend\", thisElement);\n        } else {\n          section.insertAdjacentElement(\"afterbegin\", thisElement);\n        }\n        target = thisElement;\n      }\n    });\n  }\n}\n\n/**\n * Render Model Processing Service objects.\n *\n * @param {object} config respecConfig.\n */\nexport async function run(config) {\n  let promises = new Array();\n  let index = 0;\n\n  // Find all unique Model sections.\n  const modelSections = Array.from(\n    document.querySelectorAll(\"section[data-model]\")\n  );\n  if (modelSections.length === 0) return;\n\n  // Preload the models so later async threads don't need to\n  const models = modelSections\n    .map(section => {\n      const modelId = section.getAttribute(\"data-model\");\n      const source = section.getAttribute(\"data-source\") ?? config.mps.source;\n      return {\n        source: source,\n        modelId: modelId,\n      };\n    })\n    // Remove duplicates\n    .filter(\n      (model, index, self) =>\n        index ===\n        self.findIndex(\n          t => t.source === model.source && t.modelId === model.modelId\n        )\n    );\n\n  promises.push(\n    ...Array.from(\n      models.map(model => {\n        return getModel(config, model.source, model.modelId);\n      })\n    )\n  );\n  await Promise.all(promises);\n  promises = new Array();\n\n  // Divide the Model sections into DataModel sections, ServiceModel sections\n  // and simple type lists.\n  const dataModelSections = modelSections.filter(\n    elem =>\n      !elem.getAttribute(\"data-service-model\") &&\n      !elem.getAttribute(\"data-stereotype\") &&\n      !elem.getAttribute(\"data-schema-format\") &&\n      !elem.hasAttribute(\"data-class-diagram\")\n  );\n  const stereoTypeSections = modelSections.filter(elem =>\n    elem.getAttribute(\"data-stereotype\")\n  );\n  const serviceModelSections = modelSections.filter(elem =>\n    elem.getAttribute(\"data-service-model\")\n  );\n  const schemaSections = modelSections.filter(elem =>\n    elem.getAttribute(\"data-schema-format\")\n  );\n  const classDiagramSections = modelSections.filter(elem =>\n    elem.hasAttribute(\"data-class-diagram\")\n  );\n\n  // Process the DataModel sections.\n  if (dataModelSections.length > 0) {\n    promises.push(\n      ...Array.from(dataModelSections).map(async section => {\n        const modelId = section.getAttribute(\"data-model\") ?? \"\";\n        if (modelId === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_model}</h2>`\n          );\n          showError(\n            \"Cannot process DataModel sections without the Model id\",\n            name,\n            { elements: [section] }\n          );\n        } else {\n          section.setAttribute(\"id\", `${modelId}.${index}`);\n          index++;\n          try {\n            await processDataModel(config, section, modelId);\n          } catch (error) {\n            showError(`Cannot process DataModel ${modelId}: ${error}`, name);\n          }\n        }\n      })\n    );\n  }\n\n  // Process the StereoType sections.\n  if (stereoTypeSections.length > 0) {\n    promises.push(\n      ...Array.from(stereoTypeSections).map(async section => {\n        const modelId = section.getAttribute(\"data-model\") ?? \"\";\n        const stereoType = section.getAttribute(\"data-stereotype\") ?? \"\";\n        if (modelId === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_model}</h2>`\n          );\n          showError(\n            \"Cannot process SteroType sections without the Model id\",\n            name,\n            { elements: [section] }\n          );\n        } else if (stereoType === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_stereotype}</h2>`\n          );\n          showError(\n            \"Cannot process SteroType sections without the StereoType\",\n            name,\n            { elements: [section] }\n          );\n        } else {\n          section.setAttribute(\"id\", `${modelId}.${index}`);\n          index++;\n          try {\n            await processStereoType(config, section, modelId, stereoType);\n          } catch (error) {\n            showError(\n              `Cannot process StereoType ${modelId} ${stereoType}: ${error}`,\n              name\n            );\n          }\n        }\n      })\n    );\n  }\n\n  // Process the Schema sections.\n  if (schemaSections.length > 0) {\n    promises.push(\n      ...Array.from(schemaSections).map(async section => {\n        const modelId = section.getAttribute(\"data-model\") ?? \"\";\n        const schemaFormat =\n          section.getAttribute(\"data-schema-format\")?.toLowerCase() ?? \"\";\n        if (modelId === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_model}</h2>`\n          );\n          showError(\n            \"Cannot process Schema sections without the Model id\",\n            name,\n            { elements: [section] }\n          );\n        } else {\n          section.setAttribute(\"id\", `${modelId}.${index}`);\n          index++;\n          try {\n            if (schemaFormat === \"\" || schemaFormat === \"json-ld\") {\n              await processJsonSchemas(config, section, modelId, true);\n            } else if (schemaFormat === \"\" || schemaFormat === \"json\") {\n              await processJsonSchemas(config, section, modelId, false);\n            } else {\n              await processOpenApiSchema(config, section, modelId);\n            }\n          } catch (error) {\n            showError(`Cannot process Schema for ${modelId}: ${error}`, name);\n          }\n        }\n      })\n    );\n  }\n\n  // Process the ServiceModel sections.\n  if (serviceModelSections.length > 0) {\n    promises.push(\n      ...Array.from(serviceModelSections).map(async section => {\n        const modelId = section.getAttribute(\"data-model\") ?? \"\";\n        const serviceModelId = section.getAttribute(\"data-service-model\") ?? \"\";\n        if (modelId === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_model}</h2>`\n          );\n          showError(\n            \"Cannot process ServiceModel section without the Model id\",\n            name,\n            { elements: [section] }\n          );\n        } else if (serviceModelId === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_service_model}</h2>`\n          );\n          showError(\n            \"Cannot process ServiceModel section without the ServiceModel id\",\n            name,\n            { elements: [section] }\n          );\n        } else {\n          const preferredId = section.getAttribute(\"id\");\n          section.setAttribute(\"id\", `${modelId}.${index}`);\n          index++;\n          try {\n            await processServiceModel(config, section, preferredId);\n          } catch (error) {\n            showError(`Cannot process ServiceModel ${modelId}: ${error}`, name);\n          }\n        }\n      })\n    );\n  }\n\n  // Process the ClassDiagram sections.\n  if (classDiagramSections.length > 0) {\n    promises.push(\n      ...Array.from(classDiagramSections).map(async section => {\n        const modelId = section.getAttribute(\"data-model\") ?? \"\";\n        if (modelId === \"\") {\n          section.insertAdjacentElement(\n            \"afterbegin\",\n            html`<h2>${l10n.error_missing_model}</h2>`\n          );\n          showError(\n            \"Cannot process ClassDiagram section without the Model id\",\n            name,\n            { elements: [section] }\n          );\n        } else {\n          section.setAttribute(\"id\", `${modelId}.${index}`);\n          index++;\n          try {\n            await processClassDiagram(config, section, modelId, index);\n          } catch (error) {\n            showError(`Cannot process ClassDiagram ${modelId}: ${error}`, name);\n          }\n        }\n      })\n    );\n  }\n\n  const samples = document.querySelectorAll(\"[data-sample]\");\n  if (samples) {\n    promises.push(\n      ...Array.from(samples).map(async sample => {\n        const classId = sample.getAttribute(\"data-sample\");\n        try {\n          await processSample(config, sample);\n        } catch (error) {\n          showError(`Cannot generate sample ${classId}: ${error}`, name);\n        }\n      })\n    );\n  }\n\n  if (typeof window.ajv2019 === \"function\") {\n    const ajv = new window.ajv2019({\n      allErrors: true,\n    });\n    addFormats(ajv);\n    const examples = document.querySelectorAll(\"pre[data-schema]\");\n    if (examples) {\n      promises.push(\n        ...Array.from(examples).map(async example => {\n          const classId = example.getAttribute(\"data-schema\");\n          try {\n            await validateExample(config, ajv, example);\n          } catch (error) {\n            showError(`Cannot validate example ${classId}: ${error}`, name);\n          }\n        })\n      );\n    }\n  }\n\n  await Promise.all(promises);\n\n  // Clear the data model cache\n  Array.from(document.querySelectorAll(\"section[data-model]\"))\n    .map(\n      section => `${config.mps.source}-${section.getAttribute(\"data-model\")}`\n    )\n    .forEach(key => {\n      sessionStorage.removeItem(key);\n    });\n\n  // Remove MPS config from initialUserConfig so API_KEY is not exposed\n  sub(\"end-all\", () => {\n    const script = document.getElementById(\"initialUserConfig\");\n    const userConfig = JSON.parse(script.innerHTML);\n    if (\"mps\" in userConfig) {\n      delete userConfig.mdm;\n      script.innerHTML = JSON.stringify(userConfig, null, 2);\n    }\n  });\n\n  const style = document.createElement(\"style\");\n  style.textContent = css;\n  document.head.appendChild(style);\n}\n","export default {\n  en: {\n    error_sample_data: \"Could not get sample data. See developer console for details.\",\n    error_invalid_json: \"NOTE: This example contains invalid JSON for ${0}.\",\n    error_json_additional_property: \"  (additional property: \\\"{0}\\\")\",\n    error_missing_model: \"Missing Model id\",\n    error_missing_stereotype: \"Missing StereoType\",\n    error_missing_service_model: \"Missing ServiceModel id\"\n  },\n  es: {\n    error_sample_data: \"No se pudo obtener datos de ejemplo. Mire la consola de desarrollo para más detalles.\",\n    error_invalid_json: \"NOTA: Este ejemplo contiene JSON inválido por ${0}.\",\n    error_json_additional_property: \"  (propiedad adicional: \\\"{0}\\\")\",\n    error_missing_model: \"Modelo no encontrado\",\n    error_missing_stereotype: \"Esterotipo no encontrado\",\n    error_missing_service_model: \"Model de Servicio no encontrado\"\n  },\n  ca: {\n    error_sample_data: \"No s'han pogut obtenir dades d'exemple. Miri la consola de desenvolupament per a més detalls.\",\n    error_invalid_json: \"NOTA: Aquest exemple conté JSON invàlid per ${0}.\",\n    error_json_additional_property: \"  (propietat adicional: \\\"{0}\\\")\",\n    error_missing_model: \"Model no trobat\",\n    error_missing_stereotype: \"Esterotip no tobat\",\n    error_missing_service_model: \"Model de Servei no trobat\",\n  }\n};\n","// @ts-check\n// Module 1edtech/privacy\n// Handle the privacy section properly.\nimport confLevelTmpl from \"./templates/confidentialityLevelTemplate.js\";\nimport { getIntlData } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport localizationStrings from \"./translations/privacy.js\";\nimport privacyTmpl from \"./templates/privacyImplicationsTemplate.js\";\n\nexport const name = \"1edtech/privacy\";\n\nconst l10n = getIntlData(localizationStrings);\nconst privacyImplicationsKeys = [\n  \"ACCESSIBILITY\",\n  \"ANALYTICS\",\n  \"CONTAINER\",\n  \"CREDENTIALS\",\n  \"CREDENTIALSIDREF\",\n  \"DEMOGRAPHICS\",\n  \"EXTENSION\",\n  \"FINANCIAL\",\n  \"IDENTIFIER\",\n  \"IDENTIFIERREF\",\n  \"INSURANCE\",\n  \"LEGAL\",\n  \"MEDICAL\",\n  \"NA\",\n  \"OTHER\",\n  \"QUALIFICATION\",\n  \"PERSONAL\",\n  \"SOURCEDID\",\n  \"SOURCEDIDREF\",\n];\n\nconst confidentialityLevelKeys = [\n  \"UNRESTRICTED\",\n  \"NORMAL\",\n  \"RESTRICTED\",\n  \"VERYRESTRICTED\",\n];\n\n/**\n * @param {string} title\n * @returns {HTMLElement}\n */\nfunction createSection(title, header) {\n  return html`<section>\n    <h3>${title}</h3>\n    <p>${header}</p>\n  </section>`;\n}\n\n/**\n * Handles checking for the abstract, and inserts a temp one if not present.\n */\nexport async function run(conf) {\n  /** @type {HTMLElement} */\n  if (!conf.showPrivacyAnnotations) {\n    return;\n  }\n\n  const privacySection =\n    document.querySelector(\"section#privacy-appendix\") ||\n    html`<section id=\"privacy-appendix\"></section>`;\n\n  if (!document.querySelector(\"section#privacy-appendix > h2\")) {\n    privacySection.prepend(html`<h2>${l10n.privacy_section_header}</h2>`);\n  }\n\n  privacySection.classList.add(\"appendix\");\n\n  const piSection = createSection(\n    l10n.privacy_implications,\n    l10n.privacy_implications_paragraph\n  );\n  piSection.appendChild(privacyTmpl(privacyImplicationsKeys, l10n));\n  privacySection.appendChild(piSection);\n\n  const confSection = createSection(\n    l10n.confidentiality_level,\n    l10n.confidentiality_level_paragraph\n  );\n  confSection.appendChild(confLevelTmpl(confidentialityLevelKeys, l10n));\n  privacySection.appendChild(confSection);\n\n  document.body.appendChild(privacySection);\n}\n","export default {\n  en: {\n    privacy_section_header: \"Privacy\",\n    privacy_implications: \"Privacy Implications\",\n    privacy_implications_paragraph:\n      \"All of the privacy implications contained within this Information Model are described in this Section. All of the corresponding concepts and methods for these privacy annotations are defined in the Privacy Framework.\",\n    confidentiality_level: \"Confidentiality Level\",\n    confidentiality_level_paragraph:\n      \"All of the privacy classification of the exchanged payloads are described in this Section.\",\n    ACCESSIBILITY_label: \"Accessibility\",\n    ACCESSIBILITY_def:\n      \"denotes information about the accessibility personal needs and preferences of the user\",\n    ANALYTICS_label: \"Analytics\",\n    ANALYTICS_def:\n      \"denotes information that will be used to support the creation of learning analytics\",\n    CONTAINER_label: \"Container\",\n    CONTAINER_def:\n      \"denotes that the child attributes have privacy-sensitive information\",\n    CREDENTIALS_label: \"Credentials\",\n    CREDENTIALS_def:\n      \"denotes access control information for the use e.g. password, private key, etc.\",\n    CREDENTIALSIDREF_label: \"CredentialsIdRef\",\n    CREDENTIALSIDREF_def:\n      \"denotes reference to/use of an identifier to credentials information for the user\",\n    DEMOGRAPHICS_label: \"Demographics\",\n    DEMOGRAPHICS_def:\n      \"denotes information about the demographics of the user e.g. ethnicity, gender, etc.\",\n    EXTENSION_label: \"Extension\",\n    EXTENSION_def:\n      \"denotes that proprietary information can be included and so this MAY contain privacy-sensitive information\",\n    FINANCIAL_label: \"Financial\",\n    FINANCIAL_def:\n      \"denotes that the information is of a financial nature e.g. bank account, financial aid status, etc.\",\n    IDENTIFIER_label: \"Identifier\",\n    IDENTIFIER_def:\n      \"denotes a unique identifier that has been assigned, by some third party, to the user e.g. passport number, social security number, etc.\",\n    IDENTIFIERREF_label: \"IdentifierRef\",\n    IDENTIFIERREF_def:\n      \"denotes reference to/use of a unique identifier that has been assigned, by some third party, to the user\",\n    INSURANCE_label: \"Insurance/Assurance\",\n    INSURANCE_def:\n      \"denotes that the information is about the insurance life-assurance nature, e.g. type of insurance, etc.\",\n    LEGAL_label: \"Legal\",\n    LEGAL_def:\n      \"denotes that the information is of a legal or judicial nature e.g. Will, prison record, etc.\",\n    MEDICAL_label: \"Medical/Healthcare\",\n    MEDICAL_def:\n      \"denotes that the information is of a medical, or healthcare-related nature e.g. allergies, blood-type, mobility needs, etc.\",\n    NA_label: \"N/A\",\n    NA_def:\n      \"denotes that there are NO PRIVACY IMPLICATIONS for this attribute (this is the default setting)\",\n    OTHER_label: \"Other\",\n    OTHER_def:\n      \"denotes privacy sensitive information that is NOT covered by one of the other categories\",\n    QUALIFICATION_label: \"Qualification/Certification\",\n    QUALIFICATION_def:\n      \"denotes that the information is about education qualifications, skill-set certifications, microcredentials, etc.\",\n    PERSONAL_label: \"Personal\",\n    PERSONAL_def:\n      \"denotes personal information about the user e.g. name, address, etc.\",\n    SOURCEDID_label: \"SourcedId\",\n    SOURCEDID_def:\n      \"denotes the interoperability unique identifier that has been assigned and MUST be present for the correct usage of the corresponding 1EdTech specification\",\n    SOURCEDIDREF_label: \"SourcedIdRef\",\n    SOURCEDIDREF_def:\n      \"denotes reference to/use of the interoperability unique identifier, sourcedId, to link/point to an associated 1EdTech object\",\n    UNRESTRICTED_label: \"unrestricted\",\n    UNRESTRICTED_def:\n      \"there are no privacy concerns (this is the default value).\",\n    NORMAL_label: \"normal\",\n    NORMAL_def:\n      \"denotes that privacy sensitive data could be included and so all best practices to secure this data should be used.\",\n    RESTRICTED_label: \"restricted\",\n    RESTRICTED_def:\n      \"denotes that some of the data is more sensitive than usual or that many attributes information that when used together create increased vulnerability for identification of the associated individual or group.\",\n    VERYRESTRICTED_label: \"veryrestricted\",\n    VERYRESTRICTED_def:\n      \"denotes that the request could contain very sensitive privacy data. Depending on the capabilities of the Provider this very sensitive data may be obfuscated or may not even be present.\"\n  },\n  es: {\n    privacy_section_header: \"Privacidad\",\n    privacy_implications: \"Implicaciones de Privacidad\",\n    privacy_implications_paragraph:\n      \"Todas las implicaciones de privacidad referentes a este Modelo de Información se describen en esta Sección. Todos los conceptos y métodos correspondientes a estas anotaciones de privacidad están definidas en el Framework de Privacidad.\",\n    confidentiality_level: \"Nivel de Confidencialidad\",\n    confidentiality_level_paragraph:\n      \"Toda la clasificación de privacidad de los datos intercambiados se describen en esta Sección.\",\n    ACCESSIBILITY_label: \"Accessibility\",\n    ACCESSIBILITY_def:\n      \"denota información sobre las necesidades y preferencias personales sobre accesibilidad del usuario\",\n    ANALYTICS_label: \"Analytics\",\n    ANALYTICS_def:\n      \"denota información que será usada para la creación de analíticas de aprendizaje\",\n    CONTAINER_label: \"Container\",\n    CONTAINER_def:\n      \"denota que los atributos decendentes contienen información sensible respecto a la privacidad\",\n    CREDENTIALS_label: \"Credentials\",\n    CREDENTIALS_def:\n      \"denota información de control de acceso del usuario, p. ej. contraseña, llave privada, etc.\",\n    CREDENTIALSIDREF_label: \"CredentialsIdRef\",\n    CREDENTIALSIDREF_def:\n      \"denota referencia hacia / uso de un identificador de información de credenciales del usuario.\",\n    DEMOGRAPHICS_label: \"Demographics\",\n    DEMOGRAPHICS_def:\n      \"denota información demográfica del usuario, p. ej. raza, género, etc.\",\n    EXTENSION_label: \"Extension\",\n    EXTENSION_def:\n      \"denota que puede incluir información propietaria y, por lo tanto, PUEDE contener información sensible respecto a la privacidad\",\n    FINANCIAL_label: \"Financial\",\n    FINANCIAL_def:\n      \"denota que la información es de naturaleza financiera, p. ej. cuentas bancarias, estado financiero, etc.\",\n    IDENTIFIER_label: \"Identifier\",\n    IDENTIFIER_def:\n      \"denota un identificador único que ha sido asignado, por algún tercero, al usuario, p. ej. pasaporte, número de la seguridad social, nif, etc.\",\n    IDENTIFIERREF_label: \"IdentifierRef\",\n    IDENTIFIERREF_def:\n      \"denota referencia hacia/uso de un identificador único que ha sido asignado, por algún tercero, al usuario.\",\n    INSURANCE_label: \"Insurance/Assurance\",\n    INSURANCE_def:\n      \"denota que la información es de naturaleza aseguradora, p. ej. tipo de seguro, etc.\",\n    LEGAL_label: \"Legal\",\n    LEGAL_def:\n      \"denota que la información es de naturaleza legal o judicial, p. ej. Testamento, antecedentes penales, etc.\",\n    MEDICAL_label: \"Medical/Healthcare\",\n    MEDICAL_def:\n      \"denota que la información es de naturaleza médica o relacionada con la salud, p. ej. alergias, grupo sanguíneo, necesidades de movilidad, etc.\",\n    NA_label: \"N/A\",\n    NA_def:\n      \"denota que NO HAY IMPLICACIONES DE PRIVACIDAD para este atributo (este es el valor por defecto)\",\n    OTHER_label: \"Other\",\n    OTHER_def:\n      \"denota información sensible con respecto a la privacidad que NO está contenida en una de las otras categorías\",\n    QUALIFICATION_label: \"Qualification/Certification\",\n    QUALIFICATION_def:\n      \"denota que la información es sobre calificaciones educativas, certificaciones, microcredenciales, etc.\",\n    PERSONAL_label: \"Personal\",\n    PERSONAL_def:\n      \"denota información personal sobre el usuario, p. ej. nombre, dirección, etc.\",\n    SOURCEDID_label: \"SourcedId\",\n    SOURCEDID_def:\n      \"denota el identificador único de interoperabilidad que ha sido asignado y DEBE estar presente para el uso correcto de la especificación 1EdTech correspondiente\",\n    SOURCEDIDREF_label: \"SourcedIdRef\",\n    SOURCEDIDREF_def:\n      \"denota referencia hacia/uso de el identificador único de interoperabilidad, sourcedId, para enlazar/apuntar a un objeto 1EdTech asociado\",\n    UNRESTRICTED_label: \"unrestricted\",\n    UNRESTRICTED_def:\n      \"No hay problemas de privacidad (este es el valor por defecto).\",\n    NORMAL_label: \"normal\",\n    NORMAL_def:\n      \"denota que datos sensibles con respecto a la privacidad pueden ser incluidos y, por tanto, deben usarse todas las medidas para securizar esta información.\",\n    RESTRICTED_label: \"restricted\",\n    RESTRICTED_def:\n      \"denota que algunos de los datos son más sensibles de lo habitual o que contiene atributos que usados conjuntamente incrementan la vulnerabilidad de identificar al individuo o grupo asociado.\",\n    VERYRESTRICTED_label: \"veryrestricted\",\n    VERYRESTRICTED_def:\n      \"denota que la petición puede contener datos muy sensibles con respecto a la privacidad. Dependiendo de las capacidades del Proveedor estos datos extremadamente sensibles pueden ofuscarse o incluso no estar presentes.\"\n  },\n  ca: {\n    privacy_section_header: \"Privacitat\",\n    privacy_implications: \"Implicacions de Privacitat\",\n    privacy_implications_paragraph:\n      \"Totes les implicacions de privacitat referents a aquest Model d'Informació es descriuen en aquesta Secció. Tots els conceptes i mètodes corresponents a aquestes anotacions de privacitat estan definides en el Framework de Privacitat.\",\n    confidentiality_level: \"Nivell de Confidencialitat\",\n    confidentiality_level_paragraph:\n      \"Tota la classificació de privacitat de les dades intercanviades es descriuen en aquesta Secció.\",\n    ACCESSIBILITY_label: \"Accessibility\",\n    ACCESSIBILITY_def:\n      \"denota informació sobre les necessitats i preferències personals sobre accessibilitat de l'usuari\",\n    ANALYTICS_label: \"Analytics\",\n    ANALYTICS_def:\n      \"denota informació que serà usada per a la creació d'analítiques d'aprenentatge\",\n    CONTAINER_label: \"Container\",\n    CONTAINER_def:\n      \"denota que els atributs descendents contenen informació sensible respecte a la privacitat\",\n    CREDENTIALS_label: \"Credentials\",\n    CREDENTIALS_def:\n      \"denota informació de control de accés de l'usuari, p. ex.. contrasenya, clau privada, etc.\",\n    CREDENTIALSIDREF_label: \"CredentialsIdRef\",\n    CREDENTIALSIDREF_def:\n      \"denota referència cap a / ús d'un identificador de informació de credencials de l'usuari.\",\n    DEMOGRAPHICS_label: \"Demographics\",\n    DEMOGRAPHICS_def:\n      \"denota informació demogràfica de l'usuari, p. ex.. raça, gènere, etc.\",\n    EXTENSION_label: \"Extension\",\n    EXTENSION_def:\n    \"denota que pot incloure informació propietària i, per això, POT contenir informació sensible respecte a la privacitat\",\n    FINANCIAL_label: \"Financial\",\n    FINANCIAL_def:\n      \"denota que la informació és de naturalesa financera, p. ex.. comptes bancaris, estat financer, etc.\",\n    IDENTIFIER_label: \"Identifier\",\n    IDENTIFIER_def:\n      \"denota un identificador únic que ha estat assignat, per algun tercer, a l'usuari, p. ex. passaport, número de la seguretat social, nif, etc.\",\n    IDENTIFIERREF_label: \"IdentifierRef\",\n    IDENTIFIERREF_def:\n      \"denota referència cap a / ús d'un identificador únic que ha estat assignat, per algun tercer, a l'usuari.\",\n    INSURANCE_label: \"Insurance/Assurance\",\n    INSURANCE_def:\n      \"denota que la informació és de naturalesa asseguradora, e.g. tipus d'assegurança, etc.\",\n    LEGAL_label: \"Legal\",\n    LEGAL_def:\n      \"denota que la informació és de naturalesa legal o judicial, p. ex. Testament, antecedents penals, etc.\",\n    MEDICAL_label: \"Medical/Healthcare\",\n    MEDICAL_def:\n      \"denota que la informació és de naturalesa mèdica o relacionada amb la salut, p. ex. al·lèrgies, grup sanguini, necessitats de mobilitat, etc.\",\n    NA_label: \"N/A\",\n    NA_def:\n      \"denota que NO HI HA IMPLICACIONS DE PRIVACITAT per aquest atribut (aquest és el valor per defecte)\",\n    OTHER_label: \"Other\",\n    OTHER_def:\n      \"denota informació sensible respecte a la privacitat que NO està dins d'una de les altres categories\",\n    QUALIFICATION_label: \"Qualification/Certification\",\n    QUALIFICATION_def:\n      \"denota que la informació es sobre qualificacions educatives, certificacions, microcredencials, etc.\",\n    PERSONAL_label: \"Personal\",\n    PERSONAL_def:\n      \"denota informació personal sobre l'usuari, p. ex. nom, adreça, etc.\",\n    SOURCEDID_label: \"SourcedId\",\n    SOURCEDID_def:\n      \"denota l'identificador únic d'interoperabilitat que ha estat assignat i HA D'estar present per el correcte ús l'especificació 1EdTech corresponent\",\n    SOURCEDIDREF_label: \"SourcedIdRef\",\n    SOURCEDIDREF_def:\n      \"denota referència cap a / ús d'un identificador únic d'interoperabilitat, sourcedId, per enllçar/apuntar cap a un objecte 1EdTech associat\",\n    UNRESTRICTED_label: \"unrestricted\",\n    UNRESTRICTED_def:\n      \"No hi ha problemes de privacitat (aquest és el valor per defecte).\",\n    NORMAL_label: \"normal\",\n    NORMAL_def:\n      \"denota que dades sensibles respecte a la privacitat poden ser inclosos i, per tant, han d'emprar-se totes les mesures per protegir la informació.\",\n    RESTRICTED_label: \"restricted\",\n    RESTRICTED_def:\n      \"denota que algunes de les dades són més sensibles de l'habitual o que conté atributs que, emprats conjuntament, incrementen la vulnerabilitat d'identificar a l'individu o grup associat.\",\n    VERYRESTRICTED_label: \"veryrestricted\",\n    VERYRESTRICTED_def:\n      \"denota que la petició pot contenir dades molt sensibles respecte a la privacitat. Depenent de les capacitats del Proveïdor aquestes dades extremadament sensibles poden ofuscar-se o inclús no estar presents.\"\n  }\n\n};\n","/* eslint-disable prefer-template */\n// @ts-check\nimport { html } from \"../../core/import-maps.js\";\n\nexport default (keys, translations) => {\n  return html`<dl>\n    ${keys.map(\n      key => html`<dt>\n          <dfn id=\"privacy-${key.toLowerCase()}\">\n            ${translations[key + \"_label\"]}\n          </dfn>\n        </dt>\n        <dd>${translations[key + \"_def\"]}</dd>`\n    )}\n  </dl>`;\n};\n","/* eslint-disable prefer-template */\n// @ts-check\nimport { html } from \"../../core/import-maps.js\";\n\nexport default (keys, translations) => {\n  return html`<dl>\n    ${keys.map(\n      key => html`<dt>\n          <dfn id=\"privacy-${key.toLowerCase()}\">\n            ${translations[key + \"_label\"]}\n          </dfn>\n        </dt>\n        <dd>${translations[key + \"_def\"]}</dd>`\n    )}\n  </dl>`;\n};\n","// @ts-check\nexport const name = \"1edtech/post-markdown\";\n\n/**\n * Post processing of markdown transcludes. Run after markdown.\n *\n * @param {*} conf respecConfig\n */\nexport async function run(conf) {\n  if (conf.format !== \"markdown\") return;\n\n  // remove <md-only> elements\n  const mdOnlies = document.body.querySelectorAll(\"md-only\");\n  for (let i = 0; i < mdOnlies.length; i++) {\n    mdOnlies[i].parentNode.removeChild(mdOnlies[i]);\n  }\n}\n","// @ts-check\n/**\n * @module core/reindent\n *\n * Normalizes indents across the pre elements in the document,\n * so that indentation inside <pre> won't affect the rendered result.\n */\nimport { reindent } from \"./utils.js\";\nexport const name = \"core/reindent\";\n\nexport function run() {\n  for (const pre of document.getElementsByTagName(\"pre\")) {\n    pre.innerHTML = reindent(pre.innerHTML);\n  }\n}\n","/* eslint-disable prettier/prettier */\n// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData, showWarning } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/headers.js\";\nconst l10n = getIntlData(localizationStrings);\n\nconst name = \"1edtech/templates/headers\";\n\n/**\n * @param {*} conf\n */\nfunction getStatusString(conf) {\n  // specStatusString: an override of the default descriptions\n  if (conf.specStatusString) {\n    return conf.specStatusString;\n  }\n  // for generic docs, have a generic desc\n  if (conf.specType === \"doc\") {\n    return l10n.generic;\n  }\n  if (conf.specType === \"proposal\") {\n    return l10n.proposal;\n  }\n  // specStatus: See 1edtech/config.js for known values\n  switch (conf.specStatus) {\n    case \"Proposal\":\n      return l10n.proposal_status;\n    case \"Base Document\":\n      return l10n.base_doc_status;\n    case \"Candidate Final\":\n      return l10n.candidate_final_status;\n    case \"Candidate Final Public\":\n      return l10n.candidate_final_status;\n    case \"Final Release\":\n      return l10n.final_status;\n    default:\n      // 1edtech/config.js will issue error for unknown values\n      return l10n.unknown_status.replace(\"{0}\", conf.specStatus);\n  }\n}\n\nfunction showLink(link) {\n  if (!link.key) {\n    const msg =\n      \"Found a link without `key` attribute in the configuration. See dev console.\";\n    showWarning(msg, name);\n    return;\n  }\n  return html`\n    <tr class=\"${link.class ? link.class : null}\">\n      <td>${link.key}</td>\n      <td>\n        <table style=\"margin:0;border:none\">\n          <tr>\n            ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n          </tr>\n        </table>\n      </td>\n    </tr>\n  `;\n}\n\nfunction showLinkData(data) {\n  return html` <td class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </td>`;\n}\n\nfunction renderSpecVersion(conf) {\n  if (conf.specType !== \"doc\" && conf.specType !== \"proposal\") {\n    return html`<div class=\"subtitle\">\n        ${conf.specStatus}<br />${l10n.spec_version.replace(\"{0}\", conf.specVersion)}\n      </div>`;\n  }\n}\n\nfunction renderSpecStatus(conf) {\n  if (conf.specType !== \"doc\" && conf.specType !== \"proposal\") {\n    return html`<span\n      class=\"statusPD${conf.specStatus === \"Final Release\" ? ` ${l10n.final}` : \"\"}\"\n      data-content=\"${conf.specStatus}\"\n      >${conf.specStatus}</span\n    >`;\n  }\n}\n\nfunction renderVersionTable(conf) {\n  if (conf.specType !== \"doc\" && conf.specType !== \"proposal\") {\n    return html`<table\n  id=\"version-table\"\n  title=\"${l10n.version_table_title}\">\n    <tbody>\n      <tr>\n        <td>${l10n.document_version}:</td>\n        <td>${conf.docVersion}</td>\n      </tr>\n      <tr>\n        <td>${l10n.date_issued}:</td>\n        <td>${conf.specDate}</td>\n      </tr>\n      <tr>\n        <td>${l10n.status}:</td>\n        <td>${getStatusString(conf)}</td>\n      </tr>\n      <tr>\n        <td>${l10n.this_version}:</td>\n        <td><a href='${conf.thisURL}'>${conf.thisURL}</a></td>\n      </tr>\n      ${conf.specNature === \"normative\"\n        ? html`<tr>\n                <td>${l10n.latest_version}:</td>\n                <td><a href=\"${conf.latestURI}\">${conf.latestURI}</a></td>\n              </tr>\n              <tr>\n                <td>${l10n.errata}:</td>\n                <td><a href=\"${conf.errataURL}\">${conf.errataURL}</a></td>\n              </tr>`\n        : null\n      }\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </tbody>\n  </table>`;\n  } else {\n    return html`<table\n      id=\"version-table\"\n      title=\"${l10n.version_table_title}\">\n      <tbody>\n        <tr>\n          <td>${l10n.date_issued}:</td>\n          <td>${conf.specDate}</td>\n        </tr>\n        <tr>\n          <td>${l10n.status}:</td>\n          <td>${getStatusString(conf)}</td>\n        </tr>\n      </tbody>\n    </table>`;\n  }\n}\n\nfunction renderCopyright() {\n  return html`<div id=\"cpr\">\n    <p>\n      © ${new Date().getFullYear()} 1EdTech&reg; Consortium, Inc. ${l10n.copyright_tag}\n    </p>\n    <p>\n      ${l10n.trademark_information}:\n      <a href=\"https://www.1edtech.org/about/legal\"\n        >https://www.1edtech.org/about/legal\n      </a>\n    </p>\n  </div>`;\n}\n\nfunction renderDisclosure(conf) {\n  if (conf.specType === \"proposal\") {\n    return html`<div id=\"disclosure\">\n      <h2>${l10n.proposals}</h2>\n      <p>${l10n.proposals_disclosure}\n      </p>\n    </div>`;\n  } else {\n    return html`<div id=\"disclosure\">\n      <p>\n        ${l10n.disclosure_license_link_text}:\n        <a href=\"https://www.1edtech.org/standards/specification-license\">\n          https://www.1edtech.org/standards/specification-license</a\n        >.\n      </p>\n      <p>\n        ${l10n.disclosure_granted_permissions_text}\n      </p>\n      <p>\n        ${l10n.disclosure_granted_permissions_time_text}\n      </p>\n      <p>\n        ${l10n.disclosure_warranty_text}\n      </p>\n      <p>\n        ${l10n.disclosure_contributions_text}\n        <a href=\"mailto:support@1edtech.org\">\n          support@1edtech.org\n        </a>.\n      </p>\n    </div>`;\n  }\n}\n\nfunction renderIpr(conf) {\n  return html`<div id=\"ipr\">\n      <h2>${l10n.ipr_header}</h2>\n      <p>\n        ${l10n.ipr_intro}\n      </p>\n      <p>\n        ${l10n.ipr_text}:\n        <a href=\"https://www.1edtech.org/sites/default/files/media/docs/2023/imsipr_policyFinal.pdf\">\n          https://www.1edtech.org/sites/default/files/media/docs/2023/imsipr_policyFinal.pdf </a\n        >.\n      </p>\n    </div>\n    ${renderIprTable(conf)}`;\n}\n\nfunction renderIprTable(conf) {\n  if (conf.iprs) {\n    return html`<p>\n        ${l10n.ipr_table_intro}\n      </p>\n      <table>\n      <thead>\n        <tr>\n          <th>${l10n.org_name}</th>\n          <th>${l10n.date_election_made}</th>\n          <th>${l10n.necessary_claims}</th>\n          <th>${l10n.type}</th>\n        </th>\n      </thead>\n      <tbody>\n      ${conf.iprs.map(renderIprRow)}\n      </tbody>\n      </table>`;\n  }\n}\n\nfunction renderIprRow(element) {\n  return html`<tr>\n    <td>${element.company}</td>\n    <td>${element.electionDate}</td>\n    <td>${element.necessaryClaims}</td>\n    <td>${element.type}</td>\n  </tr>`;\n}\n\nexport default conf => {\n  return html`<header>\n    <div class=\"header-top\">\n      <h1 class=\"title\" id=\"title\">${conf.specTitle}</h1>\n      <a href=\"https://www.1edtech.org\" id=\"1edtech-logo\" style=\"margin-left:27px\">\n        <img\n          src=\"https://purl.imsglobal.org/respec/1edtech_logo_color_with_tagline.svg\"\n          width=\"300\" height=\"105\"\n          alt=\"${l10n.logo_alt}\"\n        />\n      </a>\n    </div>\n    ${renderSpecVersion(conf)} ${renderSpecStatus(conf)}\n    ${renderVersionTable(conf)} ${renderIpr(conf)} ${renderDisclosure(conf)}\n    ${renderCopyright()}\n  </header>`;\n};\n","export default {\n  en: {\n    generic: \"This is an informative 1EdTech document that may be revised at any time.\",\n    proposal: \"This is a proposal that may be revised at any time.\",\n    proposal_status: \"This document is for review and comment by 1EdTech Contributing Members.\",\n    base_doc_status: \"This document is for review and comment by 1EdTech Contributing Members.\",\n    candidate_final_status: \"This document is for review and adoption by the 1EdTech membership.\",\n    final_status: \"This document is made available for adoption by the public community at large.\",\n    unknown_status: \"Unknown <code>specStatus: \\\"{0}\\\"</code>\",\n    spec_version: \"Spec Version {0}\",\n    final: \"final\",\n    version_table_title: \"Version/Release Details\",\n    document_version: \"Document Version\",\n    date_issued: \"Date Issued\",\n    status: \"Status\",\n    this_version: \"This version\",\n    latest_version: \"Latest version\",\n    errata: \"Errata\",\n    copyright_tag: \"All Rights Reserved.\",\n    trademark_information: \"Trademark information\",\n    logo_alt: \"1EdTech logo\",\n    ipr_header: \"IPR and Distribution Notice\",\n    ipr_intro: \"Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the specification set forth in this document, and to provide supporting documentation.\",\n    ipr_text: \"1EdTech takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on 1EdTech's procedures with respect to rights in 1EdTech specifications can be found at the 1EdTech Intellectual Property Rights webpage\",\n    ipr_table_intro: \"The following participating organizations have made explicit license commitments to this specification:\",\n    org_name: \"Org name\",\n    date_election_made: \"Date election made\",\n    necessary_claims: \"Necessary claims\",\n    type: \"Type\",\n    proposals: \"Proposals\",\n    proposals_disclosure: \" Proposals are made available for the purposes of Project Group / Task Force only and should not be distributed outside of the 1EdTech Contributing Membership without the express written consent of 1EdTech. Provision of any work documents outside of the project group/ task force will revoke all privileges as an Invited Guest. Any documents provided non-participants will be done by 1EdTech only on the 1EdTech public website when the documents become publicly available.\",\n    disclosure_license_link_text: \"Use of this specification to develop products or services is governed by the license with 1EdTech found on the 1EdTech website\",\n    disclosure_granted_permissions_text: \"Permission is granted to all parties to use excerpts from this document as needed in producing requests for proposals.\",\n    disclosure_granted_permissions_time_text: \"The limited permissions granted above are perpetual and will not be revoked by 1EdTech or its successors or assigns.\",\n    disclosure_warranty_text: \"THIS SPECIFICATION IS BEING OFFERED WITHOUT ANY WARRANTY WHATSOEVER, AND IN PARTICULAR, ANY WARRANTY OF NONINFRINGEMENT IS EXPRESSLY DISCLAIMED. ANY USE OF THIS SPECIFICATION SHALL BE MADE ENTIRELY AT THE IMPLEMENTER'S OWN RISK, AND NEITHER THE CONSORTIUM, NOR ANY OF ITS MEMBERS OR SUBMITTERS, SHALL HAVE ANY LIABILITY WHATSOEVER TO ANY IMPLEMENTER OR THIRD PARTY FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, DIRECTLY OR INDIRECTLY, ARISING FROM THE USE OF THIS SPECIFICATION.\",\n    disclosure_contributions_text: \"Public contributions, comments and questions should be directed to\"\n  },\n  es: {\n    generic: \"Este es un documento informativo de 1EdTech que puede ser revisado en cualquier momento.\",\n    proposal: \"Esta es una propuesta que puede ser revisada en cualquier momento.\",\n    proposal_status: \"Este documento es para revisión y comentarios de los Miembros Contribuyentes de 1EdTech.\",\n    base_doc_status: \"Este documento es para revisión y comentarios de los Miembros Contribuyentes de 1EdTech.\",\n    candidate_final_status: \"Este documento es para revisión y adopción por parte de los miembros de 1EdTech.\",\n    final_status: \"Este documento está disponible para adopción por parte de la comunidad pública en general.\",\n    unknown_status: \"Estado desconocido <code>specStatus: \\\"{0}\\\"</code>\",\n    spec_version: \"Versión de la Especificación {0}\",\n    final: \"final\",\n    version_table_title: \"Detalles de la Versión/Lanzamiento\",\n    document_version: \"Versión del Documento\",\n    date_issued: \"Fecha de Emisión\",\n    status: \"Estado\",\n    this_version: \"Esta versión\",\n    latest_version: \"Última versión\",\n    errata: \"Erratas\",\n    copyright_tag: \"Todos los derechos reservados.\",\n    trademark_information: \"Información de marca registrada\",\n    logo_alt: \"Logo de 1EdTech\",\n    ipr_header: \"Aviso de Propiedad Intelectual y Distribución\",\n    ipr_intro: \"Se solicita a los destinatarios de este documento que presenten, junto con sus comentarios, notificación de cualquier reclamación de patente relevante u otros derechos de propiedad intelectual de los que puedan tener conocimiento y que puedan ser infringidos por cualquier implementación de la especificación establecida en este documento, y que proporcionen documentación de apoyo.\",\n    ipr_text: \"1EdTech no toma posición respecto a la validez o alcance de cualquier propiedad intelectual u otros derechos que puedan ser reclamados en relación con la implementación o uso de la tecnología descrita en este documento o la medida en que cualquier licencia bajo tales derechos pueda o no estar disponible; tampoco representa que haya hecho algún esfuerzo para identificar tales derechos. La información sobre los procedimientos de 1EdTech con respecto a los derechos en las especificaciones de 1EdTech se puede encontrar en la página web de Derechos de Propiedad Intelectual de 1EdTech\",\n    ipr_table_intro: \"Las siguientes organizaciones participantes han hecho compromisos de licencia explícitos para esta especificación:\",\n    org_name: \"Nombre de la organización\",\n    date_election_made: \"Fecha de elección\",\n    necessary_claims: \"Reclamaciones necesarias\",\n    type: \"Tipo\",\n    proposals: \"Propuestas\",\n    proposals_disclosure: \"Las propuestas están disponibles solo para los propósitos del Grupo de Proyecto / Grupo de Trabajo y no deben ser distribuidas fuera de la Membresía Contribuyente de 1EdTech sin el consentimiento expreso por escrito de 1EdTech. La provisión de cualquier documento de trabajo fuera del grupo de proyecto/grupo de trabajo revocará todos los privilegios como Invitado Invitado. Cualquier documento proporcionado a no participantes será hecho por 1EdTech solo en el sitio web público de 1EdTech cuando los documentos se hagan públicamente disponibles.\",\n    disclosure_license_link_text: \"El uso de esta especificación para desarrollar productos o servicios está regido por la licencia con 1EdTech que se encuentra en el sitio web de 1EdTech\",\n    disclosure_granted_permissions_text: \"Se concede permiso a todas las partes para usar extractos de este documento según sea necesario para producir solicitudes de propuestas.\",\n    disclosure_granted_permissions_time_text: \"Los permisos limitados otorgados anteriormente son perpetuos y no serán revocados por 1EdTech o sus sucesores o cesionarios.\",\n    disclosure_warranty_text: \"ESTA ESPECIFICACIÓN SE OFRECE SIN NINGUNA GARANTÍA DE NINGÚN TIPO, Y EN PARTICULAR, SE RENUNCIA EXPRESAMENTE A CUALQUIER GARANTÍA DE NO INFRACCIÓN. CUALQUIER USO DE ESTA ESPECIFICACIÓN SE HARÁ ENTERAMENTE BAJO EL RIESGO DEL IMPLEMENTADOR, Y NI EL CONSORCIO, NI NINGUNO DE SUS MIEMBROS O REMITENTES, TENDRÁN NINGUNA RESPONSABILIDAD DE NINGÚN TIPO ANTE NINGÚN IMPLEMENTADOR O TERCERO POR CUALQUIER DAÑO DE CUALQUIER NATURALEZA, DIRECTA O INDIRECTAMENTE, QUE SURJA DEL USO DE ESTA ESPECIFICACIÓN.\",\n    disclosure_contributions_text: \"Las contribuciones públicas, comentarios y preguntas deben dirigirse a\"\n  },\n  ca: {\n    generic: \"Aquest és un document informatiu de 1EdTech que pot ser revisat en qualsevol moment.\",\n    proposal: \"Aquesta és una proposta que pot ser revisada en qualsevol moment.\",\n    proposal_status: \"Aquest document és per a revisió i comentaris dels Membres Contribuents de 1EdTech.\",\n    base_doc_status: \"Aquest document és per a revisió i comentaris dels Membres Contribuents de 1EdTech.\",\n    candidate_final_status: \"Aquest document és per a revisió i adopció pels membres de 1EdTech.\",\n    final_status: \"Aquest document està disponible per a l'adopció per part de la comunitat pública en general.\",\n    unknown_status: \"Estat desconegut <code>specStatus: \\\"{0}\\\"</code>\",\n    spec_version: \"Versió de l'Especificació {0}\",\n    final: \"final\",\n    version_table_title: \"Detalls de la Versió/Llançament\",\n    document_version: \"Versió del Document\",\n    date_issued: \"Data d'Emissió\",\n    status: \"Estat\",\n    this_version: \"Aquesta versió\",\n    latest_version: \"Última versió\",\n    errata: \"Errates\",\n    copyright_tag: \"Tots els drets reservats.\",\n    trademark_information: \"Informació de marca registrada\",\n    logo_alt: \"Logotip de 1EdTech\",\n    ipr_header: \"Avís de Propietat Intel·lectual i Distribució\",\n    ipr_intro: \"Es demana als destinataris d'aquest document que presentin, juntament amb els seus comentaris, notificació de qualsevol reclamació de patent rellevant o altres drets de propietat intel·lectual dels quals puguin tenir coneixement i que puguin ser infringits per qualsevol implementació de l'especificació establerta en aquest document, i que proporcionin documentació de suport.\",\n    ipr_text: \"1EdTech no pren posició respecte a la validesa o abast de qualsevol propietat intel·lectual o altres drets que puguin ser reclamats en relació amb la implementació o ús de la tecnologia descrita en aquest document o la mesura en què qualsevol llicència sota aquests drets pugui o no estar disponible; tampoc representa que hagi fet cap esforç per identificar aquests drets. La informació sobre els procediments de 1EdTech respecte als drets en les especificacions de 1EdTech es pot trobar a la pàgina web de Drets de Propietat Intel·lectual de 1EdTech\",\n    ipr_table_intro: \"Les següents organitzacions participants han fet compromisos de llicència explícits per a aquesta especificació:\",\n    org_name: \"Nom de l'organització\",\n    date_election_made: \"Data de l'elecció\",\n    necessary_claims: \"Reclamacions necessàries\",\n    type: \"Tipus\",\n    proposals: \"Propostes\",\n    proposals_disclosure: \"Les propostes estan disponibles només per als propòsits del Grup de Projecte / Grup de Treball i no s'han de distribuir fora de la Membresia Contribuent de 1EdTech sense el consentiment exprés per escrit de 1EdTech. La provisió de qualsevol document de treball fora del grup de projecte/grup de treball revocarà tots els privilegis com a Convidat Convidat. Qualsevol document proporcionat a no participants serà fet per 1EdTech només al lloc web públic de 1EdTech quan els documents es facin públicament disponibles.\",\n    disclosure_license_link_text: \"L'ús d'aquesta especificació per desenvolupar productes o serveis està regit per la llicència amb 1EdTech que es troba al lloc web de 1EdTech\",\n    disclosure_granted_permissions_text: \"Es concedeix permís a totes les parts per utilitzar extractes d'aquest document segons sigui necessari per produir sol·licituds de propostes.\",\n    disclosure_granted_permissions_time_text: \"Els permisos limitats atorgats anteriorment són perpetus i no seran revocats per 1EdTech o els seus successors o cessionaris.\",\n    disclosure_warranty_text: \"AQUESTA ESPECIFICACIÓ S'OFEREIX SENSE CAP GARANTIA DE CAP TIPUS, I EN PARTICULAR, ES RENUNCIA EXPRESSAMENT A QUALSEVOL GARANTIA DE NO INFRACCIÓ. QUALSSEVOL ÚS D'AQUESTA ESPECIFICACIÓ ES FARÀ ENTERAMENT SOTA EL RISC DE L'IMPLEMENTADOR, I NI EL CONSORCI, NI CAP DELS SEUS MEMBRES O REMITENTS, TINDRAN CAP RESPONSABILITAT DE CAP TIPUS DAVANT DE CAP IMPLEMENTADOR O TERCER PER QUALSEVOL DANY DE QUALSEVOL NATURALESA, DIRECTA O INDIRECTAMENT, QUE SORGEIXI DE L'ÚS D'AQUESTA ESPECIFICACIÓ.\",\n    disclosure_contributions_text: \"Les contribucions públiques, comentaris i preguntes s'han de dirigir a\"\n  }\n};\n","// @ts-check\n/**\n * Module 1edtech/headers\n * Add 1EdTech boilerplate front matter to the document.\n */\nimport headersTmpl from \"./templates/headers.js\";\n\nexport const name = \"1edtech/headers\";\n\n/**\n * @param {*} conf\n */\nexport async function run(conf) {\n  document.title = `${conf.specTitle} ${conf.specVersion ?? \"\"} \n    ${conf.specStatus ?? \"\"}`;\n\n  const body = document.body;\n  const header = headersTmpl(conf);\n\n  if (body.firstChild) {\n    body.insertBefore(header, body.firstChild);\n  } else {\n    body.appendChild(header);\n  }\n}\n","// @ts-check\n// Module 1edtech/id-headers\n// All headings are expected to have an ID, unless their immediate container has one.\n\nexport const name = \"1edtech/id-headers\";\nimport { addId } from \"../core/utils.js\";\n\nexport function run(conf) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const headings = document.querySelectorAll(\n    `section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6`\n  );\n  for (const h of headings) {\n    // prefer for ID: heading.id > parentElement.id > newly generated heading.id\n    let id = h.id;\n    if (!id) {\n      addId(h);\n    }\n  }\n}\n","// @ts-check\n// Module 1edtech/abstract\n// Handle the abstract section properly.\nimport { html } from \"../core/import-maps.js\";\nimport { getIntlData, showWarning } from \"../core/utils.js\";\nexport const name = \"1edtech/abstract\";\n\nimport localizationStrings from \"./translations/abstract.js\";\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Handles checking for the abstract, and inserts a temp one if not present.\n */\nexport async function run() {\n  let abstract = document.getElementById(\"abstract\");\n  if (!abstract) {\n    showWarning(\"Document should have one element with 'abstract'\", name);\n    // insert a temp abstract\n    abstract = html`<section id=\"abstract\" class=\"introductory remove\">\n      <h2>${l10n.to_be_removed}</h2>\n    </section>`;\n    document.body.prepend(abstract);\n  }\n\n  if (abstract.tagName.startsWith(\"H\")) {\n    abstract.removeAttribute(\"id\");\n    abstract = abstract.parentElement;\n    abstract.id = \"abstract\";\n  }\n  if (abstract.tagName === \"SECTION\") {\n    if (!abstract.classList.contains(\"introductory\")) {\n      abstract.classList.add(\"introductory\");\n    }\n  }\n\n  let abstractHeading = document.querySelector(\"#abstract>h2\");\n  if (abstractHeading) {\n    return;\n  }\n  abstractHeading = document.createElement(\"h2\");\n  abstractHeading.textContent = l10n.abstract;\n  abstract.prepend(abstractHeading);\n}\n","export default {\n  en: {\n    abstract: \"Abstract\",\n    to_be_removed: \"To be removed\"\n  },\n  es : {\n    abstract: \"Resumen\",\n    to_be_removed: \"Para borrar\"\n  },\n  ca : {\n    abstract: \"Resume\",\n    to_be_removed: \"Per esborrar\"\n  }\n};\n","// @ts-check\n// Module core/data-transform\n// Support for the data-transform attribute\n// Any element in the tree that has a data-transform attribute is processed here.\n// The data-transform attribute can contain a white space separated list of functions\n// to call (these must have been defined globally). Each is called with a reference to\n// the core/utils plugin and the innerHTML of the element. The output of each is fed\n// as the input to the next, and the output of the last one replaces the HTML content\n// of the element.\n// IMPORTANT:\n//  It is unlikely that you should use this module. The odds are that unless you really\n//  know what you are doing, you should be using a dedicated module instead. This feature\n//  is not actively supported and support for it may be dropped. It is not accounted for\n//  in the test suite, and therefore could easily break.\nimport { runTransforms } from \"./utils.js\";\n\nexport const name = \"core/data-transform\";\n\nexport function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const transformables = document.querySelectorAll(\"[data-transform]\");\n  transformables.forEach(el => {\n    el.innerHTML = runTransforms(el.innerHTML, el.dataset.transform);\n    el.removeAttribute(\"data-transform\");\n  });\n}\n","// @ts-check\n// Module core/data-abbr\n// - Finds all elements with data-abbr attribute and processes them.\nimport { showError } from \"./utils.js\";\nexport const name = \"core/dfn-abbr\";\n\nexport function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const elements = document.querySelectorAll(\"[data-abbr]\");\n  for (const elem of elements) {\n    const { localName } = elem;\n    switch (localName) {\n      case \"dfn\":\n        processDfnElement(elem);\n        break;\n      default: {\n        const msg = `\\`data-abbr\\` attribute not supported on \\`${localName}\\` elements.`;\n        showError(msg, name, {\n          elements: [elem],\n          title: \"Error: unsupported.\",\n        });\n      }\n    }\n  }\n}\n/**\n * @param {HTMLElement} dfn\n */\nfunction processDfnElement(dfn) {\n  const abbr = generateAbbreviation(dfn);\n  // get normalized <dfn> textContent to remove spaces, tabs, new lines.\n  const fullForm = dfn.textContent.replace(/\\s\\s+/g, \" \").trim();\n  dfn.insertAdjacentHTML(\n    \"afterend\",\n    ` (<abbr title=\"${fullForm}\">${abbr}</abbr>)`\n  );\n  const lt = dfn.dataset.lt || \"\";\n  dfn.dataset.lt = lt\n    .split(\"|\")\n    .filter(i => i.trim())\n    .concat(abbr)\n    .join(\"|\");\n}\n\nfunction generateAbbreviation(elem) {\n  if (elem.dataset.abbr) return elem.dataset.abbr;\n  // Generates abbreviation from textContent\n  // e.g., \"Permanent Account Number\" -> \"PAN\"\n  return elem.textContent\n    .match(/\\b([a-z])/gi)\n    .join(\"\")\n    .toUpperCase();\n}\n","// @ts-check\n//\n// Ensure the conformance section has an id.\n//\n// core/inlines determines whether a document is informative by the\n// presence or absence of a section with id='conformance'. If the conformance\n// section is in Markddown, it will not have an id. This module will assign the\n// id to a section if the first header in the section is 'conformance' or\n// 'conformance statements' (ignoring case). For example,\n//\n// Note: Run after core/markdown and before core/inlines\n\nimport { addId } from \"../core/utils.js\";\n\nexport const name = \"1edtech/inlines\";\n\n/**\n * Find the Conformance section in parent and assign an id.\n *\n * @param {Element | HTMLElement} parent\n */\nfunction findConformanceSection(parent) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const headingElements = parent.querySelectorAll(\n    `:scope > h2, h3, h4, h5, h6`\n  );\n  for (const heading of headingElements) {\n    if (!heading.id) {\n      const title = heading.textContent;\n      if (\n        title.toLowerCase() == \"conformance\" ||\n        title.toLowerCase() == \"conformance statements\"\n      ) {\n        addId(heading, null, \"conformance\");\n        return heading;\n      }\n    }\n\n    const foundHeading = heading.id === \"conformance\";\n    if (foundHeading) {\n      return heading;\n    }\n  }\n\n  return null;\n}\n\n/**\n * @param {*} conf\n */\nexport async function run(conf) {\n  // No conformance section in 1EdTech Errata documents\n  if (conf.specType == \"errata\") {\n    return;\n  }\n\n  let conformance = document.querySelector(\"section#conformance\");\n  if (!conformance) {\n    conformance = findConformanceSection(document.body);\n  }\n}\n","// @ts-check\n// Parses an inline IDL string (`{{ idl string }}`)\n//  and renders its components as HTML\n\nimport { htmlJoinComma, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nconst idlPrimitiveRegex = /^[a-z]+(\\s+[a-z]+)+\\??$/; // {{unrestricted double?}} {{ double }}\nconst exceptionRegex = /\\B\"([^\"]*)\"\\B/; // {{ \"SomeException\" }}\n\n/**\n * Matches following patterns:\n * - `identifier(arg1, moreArgs)`\n * - `identifier()`\n * - `identifier(arg1, moreArgs)|text`\n * - `identifier(arg1, moreArgs)|text()`\n * - `identifier(arg1, moreArgs)|text(argA, moreArgs)`\n *\n * Groups: identifier, args, [text, [textArgs]]\n */\nconst methodRegex = /^(\\w+)\\(([^\\\\)]*)\\)(?:\\|(\\w+)(?:\\((?:([^\\\\)]*))\\))?)?$/;\n\nexport const slotRegex = /\\[\\[(\\w+(?: +\\w+)*)\\]\\](\\([^)]*\\))?$/;\n// matches: `value` or `[[value]]`\n// NOTE: [[value]] is actually a slot, but database has this as type=\"attribute\"\nconst attributeRegex = /^((?:\\[\\[)?(?:\\w+(?: +\\w+)*)(?:\\]\\])?)$/;\nconst baseRegex = /^(?:\\w+)\\??$/;\nconst enumRegex = /^(\\w+)\\[\"([\\w- ]*)\"\\]$/;\n// TODO: const splitRegex = /(?<=\\]\\]|\\b)\\./\n// https://github.com/speced/respec/pull/1848/files#r225087385\nconst methodSplitRegex = /\\.?(\\w+\\(.*\\)$)/;\nconst slotSplitRegex = /\\/(.+)/;\nconst isProbablySlotRegex = /\\[\\[.+\\]\\]/;\n/**\n * @typedef {object} IdlBase\n * @property {\"base\"} type\n * @property {string} identifier\n * @property {boolean} renderParent\n * @property {boolean} nullable\n * @property {InlineIdl | null} [parent]\n *\n * @typedef {object} IdlAttribute\n * @property {\"attribute\"} type\n * @property {string} identifier\n * @property {boolean} renderParent\n * @property {InlineIdl | null} [parent]\n *\n * @typedef {object} IdlInternalSlot\n * @property {\"internal-slot\"} type\n * @property {string} identifier\n * @property {string[]} [args]\n * @property {boolean} renderParent\n * @property {InlineIdl | null} [parent]\n * @property {\"attribute\"|\"method\"} slotType\n *\n * @typedef {object} IdlMethod\n * @property {\"method\"} type\n * @property {string} identifier\n * @property {string[]} args\n * @property {string | undefined} renderText\n * @property {string[] | undefined} renderArgs\n * @property {boolean} renderParent\n * @property {InlineIdl | null} [parent]\n *\n * @typedef {object} IdlEnum\n * @property {\"enum\"} type\n * @property {string} [identifier]\n * @property {string} enumValue\n * @property {boolean} renderParent\n * @property {InlineIdl | null} [parent]\n *\n * @typedef {object} IdlException\n * @property {\"exception\"} type\n * @property {string} identifier\n * @property {InlineIdl | null} [parent]\n *\n * @typedef {object} IdlPrimitive\n * @property {\"idl-primitive\"} type\n * @property {boolean} nullable\n * @property {string} identifier\n * @property {boolean} renderParent\n * @property {InlineIdl | null} [parent]\n *\n * @typedef {IdlBase | IdlAttribute | IdlInternalSlot | IdlMethod | IdlEnum | IdlException | IdlPrimitive} InlineIdl\n */\n\n/**\n * @param {string} str\n * @returns {InlineIdl[]}\n */\nfunction parseInlineIDL(str) {\n  // If it's got [[ string ]], then split as an internal slot\n  const isSlot = isProbablySlotRegex.test(str);\n  const splitter = isSlot ? slotSplitRegex : methodSplitRegex;\n  const [forPart, childString] = str.split(splitter);\n  if (isSlot && forPart && !childString) {\n    throw new SyntaxError(\n      `Internal slot missing \"for\" part. Expected \\`{{ InterfaceName/${forPart}}}\\` }.`\n    );\n  }\n  const tokens = forPart\n    .split(/[./]/)\n    .concat(childString)\n    .filter(s => s && s.trim())\n    .map(s => s.trim());\n  const renderParent = !str.includes(\"/\");\n  /** @type {InlineIdl[]} */\n  const results = [];\n  while (tokens.length) {\n    const value = tokens.pop();\n    // Method\n    if (methodRegex.test(value)) {\n      const [, identifier, allArgs, altText, altArgs] =\n        value.match(methodRegex);\n      const args = allArgs.split(/,\\s*/).filter(arg => arg);\n      const renderText = altText?.trim();\n      const renderArgs = altArgs?.split(/,\\s*/).filter(arg => arg);\n      results.push({\n        type: \"method\",\n        identifier,\n        args,\n        renderParent,\n        renderText,\n        renderArgs,\n      });\n      continue;\n    }\n    // Enum[\"enum value\"]\n    if (enumRegex.test(value)) {\n      const [, identifier, enumValue] = value.match(enumRegex);\n      results.push({ type: \"enum\", identifier, enumValue, renderParent });\n      continue;\n    }\n    // Exception - \"NotAllowedError\"\n    // Or alternate enum syntax: {{ EnumContainer / \"some enum value\" }}\n    if (exceptionRegex.test(value)) {\n      const [, identifier] = value.match(exceptionRegex);\n      if (renderParent) {\n        results.push({ type: \"exception\", identifier });\n      } else {\n        results.push({ type: \"enum\", enumValue: identifier, renderParent });\n      }\n      continue;\n    }\n    // internal slot\n    if (slotRegex.test(value)) {\n      const [, identifier, allArgs] = value.match(slotRegex);\n      const slotType = allArgs ? \"method\" : \"attribute\";\n      const args = allArgs\n        ?.slice(1, -1)\n        .split(/,\\s*/)\n        .filter(arg => arg);\n      results.push({\n        type: \"internal-slot\",\n        slotType,\n        identifier,\n        args,\n        renderParent,\n      });\n      continue;\n    }\n    // attribute\n    if (attributeRegex.test(value) && tokens.length) {\n      const [, identifier] = value.match(attributeRegex);\n      results.push({ type: \"attribute\", identifier, renderParent });\n      continue;\n    }\n    if (idlPrimitiveRegex.test(value)) {\n      const nullable = value.endsWith(\"?\");\n      const identifier = nullable ? value.slice(0, -1) : value;\n      results.push({\n        type: \"idl-primitive\",\n        identifier,\n        renderParent,\n        nullable,\n      });\n      continue;\n    }\n    // base, always final token\n    if (baseRegex.test(value) && tokens.length === 0) {\n      const nullable = value.endsWith(\"?\");\n      const identifier = nullable ? value.slice(0, -1) : value;\n      results.push({ type: \"base\", identifier, renderParent, nullable });\n      continue;\n    }\n    throw new SyntaxError(`IDL micro-syntax parsing error in \\`{{ ${str} }}\\``);\n  }\n  // link the list\n  results.forEach((item, i, list) => {\n    item.parent = list[i + 1] || null;\n  });\n  // return them in the order we found them...\n  return results.reverse();\n}\n\n/**\n * @param {IdlBase} details\n */\nfunction renderBase(details) {\n  // Check if base is a local variable in a section\n  const { identifier, renderParent, nullable } = details;\n  if (renderParent) {\n    return html`<a\n      data-xref-type=\"_IDL_\"\n      data-link-type=\"idl\"\n      data-lt=\"${identifier}\"\n      ><code>${identifier + (nullable ? \"?\" : \"\")}</code></a\n    >`;\n  }\n}\n\n/**\n * Internal slot: .[[identifier]] or [[identifier]]\n * @param {IdlInternalSlot} details\n */\nfunction renderInternalSlot(details) {\n  const { identifier, parent, slotType, renderParent, args } = details;\n  const { identifier: linkFor } = parent || {};\n  const isMethod = slotType === \"method\";\n  const argsHtml = isMethod\n    ? html`(${htmlJoinComma(args, htmlArgMapper)})`\n    : null;\n  const textArgs = isMethod ? `(${args.join(\", \")})` : \"\";\n  const lt = `[[${identifier}]]${textArgs}`;\n  const element = html`${parent && renderParent ? \".\" : \"\"}<a\n      data-xref-type=\"${slotType}\"\n      data-link-type=\"${slotType}\"\n      data-link-for=\"${linkFor}\"\n      data-xref-for=\"${linkFor}\"\n      data-lt=\"${lt}\"\n      ><code>[[${identifier}]]${argsHtml}</code></a\n    >`;\n  return element;\n}\n\nfunction htmlArgMapper(str, i, array) {\n  if (i < array.length - 1) return html`<var>${str}</var>`;\n  // only the last argument can be variadic\n  const parts = str.split(/(^\\.{3})(.+)/);\n  const isVariadic = parts.length > 1;\n  const arg = isVariadic ? parts[2] : parts[0];\n  return html`${isVariadic ? \"...\" : null}<var>${arg}</var>`;\n}\n/**\n * Attribute: .identifier\n * @param {IdlAttribute} details\n */\nfunction renderAttribute(details) {\n  const { parent, identifier, renderParent } = details;\n  const { identifier: linkFor } = parent || {};\n  const element = html`${renderParent ? \".\" : \"\"}<a\n      data-link-type=\"idl\"\n      data-xref-type=\"attribute|dict-member|const\"\n      data-link-for=\"${linkFor}\"\n      data-xref-for=\"${linkFor}\"\n      ><code>${identifier}</code></a\n    >`;\n  return element;\n}\n\n/**\n * Method: .identifier(arg1, arg2, ...), identifier(arg1, arg2, ...)\n * @param {IdlMethod} details\n */\nfunction renderMethod(details) {\n  const { args, identifier, type, parent, renderParent } = details;\n  const { renderText: text, renderArgs: textArgs } = details;\n  const { identifier: linkFor } = parent || {};\n  const argsText = htmlJoinComma(textArgs || args, htmlArgMapper);\n  const searchText = `${identifier}(${args.join(\", \")})`;\n  const element = html`${parent && renderParent ? \".\" : \"\"}<a\n      data-link-type=\"idl\"\n      data-xref-type=\"${type}\"\n      data-link-for=\"${linkFor}\"\n      data-xref-for=\"${linkFor}\"\n      data-lt=\"${searchText}\"\n      ><code>${text || identifier}</code></a\n    >${!text || textArgs ? html`<code>(${argsText})</code>` : \"\"}`;\n  return element;\n}\n\n/**\n * Enum:\n * Identifier[\"enum value\"]\n * Identifer / \"enum value\"\n * @param {IdlEnum} details\n */\nfunction renderEnum(details) {\n  const { identifier, enumValue, parent } = details;\n  const forContext = parent ? parent.identifier : identifier;\n  const element = html`\"<a\n      data-link-type=\"idl\"\n      data-xref-type=\"enum-value\"\n      data-link-for=\"${forContext}\"\n      data-xref-for=\"${forContext}\"\n      data-lt=\"${!enumValue ? \"the-empty-string\" : null}\"\n      ><code>${enumValue}</code></a\n    >\"`;\n  return element;\n}\n\n/**\n * Exception value: \"NotAllowedError\"\n * Only the WebIDL spec can define exceptions\n * @param {IdlException} details\n */\nfunction renderException(details) {\n  const { identifier } = details;\n  const element = html`\"<a\n      data-link-type=\"idl\"\n      data-cite=\"webidl\"\n      data-xref-type=\"exception\"\n      ><code>${identifier}</code></a\n    >\"`;\n  return element;\n}\n\n/**\n * Interface types: {{ unrestricted double }} {{long long}}\n * Only the WebIDL spec defines these types.\n * @param {IdlPrimitive} details\n */\nfunction renderIdlPrimitiveType(details) {\n  const { identifier, nullable } = details;\n  const element = html`<a\n    data-link-type=\"idl\"\n    data-cite=\"webidl\"\n    data-xref-type=\"interface\"\n    data-lt=\"${identifier}\"\n    ><code>${identifier + (nullable ? \"?\" : \"\")}</code></a\n  >`;\n  return element;\n}\n\n/**\n * Generates HTML by parsing an IDL string\n * @param {String} str IDL string\n * @return {Node} html output\n */\nexport function idlStringToHtml(str) {\n  let results;\n  try {\n    results = parseInlineIDL(str);\n  } catch (error) {\n    const el = html`<span>{{ ${str} }}</span>`;\n    const title = \"Error: Invalid inline IDL string.\";\n    showError(error.message, \"core/inlines\", { title, elements: [el] });\n    return el;\n  }\n  const render = html(document.createDocumentFragment());\n  const output = [];\n  for (const details of results) {\n    switch (details.type) {\n      case \"base\": {\n        const base = renderBase(details);\n        if (base) output.push(base);\n        break;\n      }\n      case \"attribute\":\n        output.push(renderAttribute(details));\n        break;\n      case \"internal-slot\":\n        output.push(renderInternalSlot(details));\n        break;\n      case \"method\":\n        output.push(renderMethod(details));\n        break;\n      case \"enum\":\n        output.push(renderEnum(details));\n        break;\n      case \"exception\":\n        output.push(renderException(details));\n        break;\n      case \"idl-primitive\":\n        output.push(renderIdlPrimitiveType(details));\n        break;\n      default:\n        throw new Error(\"Unknown type.\");\n    }\n  }\n  const result = render`${output}`;\n  return result;\n}\n","// @ts-check\n/**\n * Module core/biblio-db\n *\n * Wraps IndexedDB, allowing the storage of references and aliases on the\n * client.\n *\n * It's a standalone module that can be imported into other modules.\n *\n */\nimport { idb } from \"./import-maps.js\";\n\nexport const name = \"core/biblio-db\";\n\n/**\n * @typedef {keyof BiblioDb} AllowedType\n * @type {Set<AllowedType>}\n */\nconst ALLOWED_TYPES = new Set([\"alias\", \"reference\"]);\n/* Database initialization tracker */\nconst readyPromise = openIdb();\n\n/**\n * @typedef {object} BiblioDb\n *\n * @property {object} alias Object store for alias objects\n * @property {string} alias.key\n * @property {object} alias.value\n * @property {object} alias.indexes\n * @property {string} alias.aliasOf\n *\n * @property {object} reference Object store for reference objects\n * @property {string} reference.key\n * @property {object} reference.value\n *\n * @returns {Promise<import(\"idb\").IDBPDatabase<BiblioDb>>}\n */\nasync function openIdb() {\n  /** @type {import(\"idb\").IDBPDatabase<BiblioDb>} */\n  const db = await idb.openDB(\"respec-biblio2\", 12, {\n    upgrade(db) {\n      Array.from(db.objectStoreNames).map(storeName =>\n        db.deleteObjectStore(storeName)\n      );\n      const store = db.createObjectStore(\"alias\", { keyPath: \"id\" });\n      store.createIndex(\"aliasOf\", \"aliasOf\", { unique: false });\n      db.createObjectStore(\"reference\", { keyPath: \"id\" });\n    },\n  });\n  // Clean the database of expired biblio entries.\n  const now = Date.now();\n  for (const storeName of [...ALLOWED_TYPES]) {\n    const store = db.transaction(storeName, \"readwrite\").store;\n    const range = IDBKeyRange.lowerBound(now);\n    let result = await store.openCursor(range);\n    while (result?.value) {\n      /** @type {BiblioData} */\n      const entry = result.value;\n      if (entry.expires === undefined || entry.expires < now) {\n        await store.delete(entry.id);\n      }\n      result = await result.continue();\n    }\n  }\n\n  return db;\n}\n\nexport const biblioDB = {\n  get ready() {\n    return readyPromise;\n  },\n  /**\n   * Finds either a reference or an alias.\n   * If it's an alias, it resolves it.\n   *\n   * @param {String} id The reference or alias to look for.\n   * @return {Promise<BiblioData?>} The reference or null.\n   */\n  async find(id) {\n    if (await this.isAlias(id)) {\n      id = await this.resolveAlias(id);\n    }\n    return await this.get(\"reference\", id);\n  },\n  /**\n   * Checks if the database has an id for a given type.\n   *\n   * @param {AllowedType} type One of the ALLOWED_TYPES.\n   * @param {String} id The reference to find.\n   * @return {Promise<Boolean>} True if it has it, false otherwise.\n   */\n  async has(type, id) {\n    if (!ALLOWED_TYPES.has(type)) {\n      throw new TypeError(`Invalid type: ${type}`);\n    }\n    if (!id) {\n      throw new TypeError(\"id is required\");\n    }\n    const db = await this.ready;\n    const objectStore = db.transaction(type, \"readonly\").store;\n    const range = IDBKeyRange.only(id);\n    const result = await objectStore.openCursor(range);\n    return !!result;\n  },\n  /**\n   * Checks if a given id is an alias.\n   *\n   * @param {String} id The reference to check.\n   * @return {Promise<Boolean>} Resolves with true if found.\n   */\n  async isAlias(id) {\n    return await this.has(\"alias\", id);\n  },\n  /**\n   * Resolves an alias to its corresponding reference id.\n   *\n   * @param {String} id The id of the alias to look up.\n   * @return {Promise<String>} The id of the resolved reference.\n   */\n  async resolveAlias(id) {\n    if (!id) {\n      throw new TypeError(\"id is required\");\n    }\n    const db = await this.ready;\n\n    const objectStore = db.transaction(\"alias\", \"readonly\").store;\n    const range = IDBKeyRange.only(id);\n    const result = await objectStore.openCursor(range);\n    return result ? result.value.aliasOf : result;\n  },\n  /**\n   * Get a reference or alias out of the database.\n   *\n   * @param {AllowedType} type The type as per ALLOWED_TYPES.\n   * @param {string} id The id for what to look up.\n   * @return {Promise<BiblioData?>} Resolves with the retrieved object, or null.\n   */\n  async get(type, id) {\n    if (!ALLOWED_TYPES.has(type)) {\n      throw new TypeError(`Invalid type: ${type}`);\n    }\n    if (!id) {\n      throw new TypeError(\"id is required\");\n    }\n    const db = await this.ready;\n    const objectStore = db.transaction(type, \"readonly\").store;\n    const range = IDBKeyRange.only(id);\n    const result = await objectStore.openCursor(range);\n    return result ? result.value : result;\n  },\n  /**\n   * Adds references and aliases to database. This is usually the data from\n   * Specref's output (parsed JSON).\n   *\n   * @param {BibliographyMap} data An object that contains references and aliases.\n   * @param {number} expires The date/time when the data expires.\n   */\n  async addAll(data, expires) {\n    if (!data) {\n      return;\n    }\n    const aliasesAndRefs = { alias: [], reference: [] };\n    for (const id of Object.keys(data)) {\n      /** @type {BiblioData} */\n      const obj = { id, ...data[id], expires };\n      if (obj.aliasOf) {\n        aliasesAndRefs.alias.push(obj);\n      } else {\n        aliasesAndRefs.reference.push(obj);\n      }\n    }\n    const promisesToAdd = [...ALLOWED_TYPES].flatMap(type => {\n      return aliasesAndRefs[type].map(details => this.add(type, details));\n    });\n    await Promise.all(promisesToAdd);\n  },\n  /**\n   * Adds a reference or alias to the database.\n   *\n   * @param {AllowedType} type The type as per ALLOWED_TYPES.\n   * @param {BiblioData} details The object to store.\n   */\n  async add(type, details) {\n    if (!ALLOWED_TYPES.has(type)) {\n      throw new TypeError(`Invalid type: ${type}`);\n    }\n    if (typeof details !== \"object\") {\n      throw new TypeError(\"details should be an object\");\n    }\n    if (type === \"alias\" && !details.hasOwnProperty(\"aliasOf\")) {\n      throw new TypeError(\"Invalid alias object.\");\n    }\n    const db = await this.ready;\n    let isInDB = await this.has(type, details.id);\n    // update or add, depending of already having it in db\n    // or if it's expired\n    if (isInDB) {\n      const entry = await this.get(type, details.id);\n      if (entry?.expires < Date.now()) {\n        const { store } = db.transaction(type, \"readwrite\");\n        await store.delete(details.id);\n        isInDB = false;\n      }\n    }\n    const { store } = db.transaction(type, \"readwrite\");\n    return isInDB ? await store.put(details) : await store.add(details);\n  },\n  /**\n   * Closes the underlying database.\n   *\n   * @return {Promise<void>} Resolves after database closes.\n   */\n  async close() {\n    const db = await this.ready;\n    db.close();\n  },\n\n  /**\n   * Clears the underlying database\n   */\n  async clear() {\n    const db = await this.ready;\n    const storeNames = [...ALLOWED_TYPES];\n    const stores = db.transaction(storeNames, \"readwrite\");\n    const clearStorePromises = storeNames.map(name => {\n      return stores.objectStore(name).clear();\n    });\n    await Promise.all(clearStorePromises);\n  },\n};\n","// @ts-check\n// Module core/biblio\n// Pre-processes bibliographic references\n// Configuration:\n//  - localBiblio: override or supplement the official biblio with your own.\n\nimport { biblioDB } from \"./biblio-db.js\";\nimport { createResourceHint } from \"./utils.js\";\n\n/** @type {Conf['biblio']} */\nexport const biblio = {};\n\nexport const name = \"core/biblio\";\n\nconst bibrefsURL = new URL(\"https://api.specref.org/bibrefs?refs=\");\n\n// Opportunistically dns-prefetch to bibref server, as we don't know yet\n// if we will actually need to download references yet.\nconst link = createResourceHint({\n  hint: \"dns-prefetch\",\n  href: bibrefsURL.origin,\n});\ndocument.head.appendChild(link);\nlet doneResolver;\n\n/** @type {Promise<Conf['biblio']>} */\nconst done = new Promise(resolve => {\n  doneResolver = resolve;\n});\n\nexport async function updateFromNetwork(\n  refs,\n  options = { forceUpdate: false }\n) {\n  const refsToFetch = [...new Set(refs)].filter(ref => ref.trim());\n  // Update database if needed, if we are online\n  if (!refsToFetch.length || navigator.onLine === false) {\n    return null;\n  }\n  let response;\n  try {\n    response = await fetch(bibrefsURL.href + refsToFetch.join(\",\"));\n  } catch (err) {\n    console.error(err);\n    return null;\n  }\n  if ((!options.forceUpdate && !response.ok) || response.status !== 200) {\n    return null;\n  }\n  /** @type {Conf['biblio']} */\n  const data = await response.json();\n  // SpecRef updates every hour, so we should follow suit\n  // https://github.com/tobie/specref#hourly-auto-updating\n  const oneHourFromNow = Date.now() + 1000 * 60 * 60 * 1;\n  try {\n    const expires = response.headers.has(\"Expires\")\n      ? Math.min(Date.parse(response.headers.get(\"Expires\")), oneHourFromNow)\n      : oneHourFromNow;\n    await biblioDB.addAll(data, expires);\n  } catch (err) {\n    console.error(err);\n  }\n  return data;\n}\n\n/**\n * @param {string} key\n * @returns {Promise<BiblioData>}\n */\nexport async function resolveRef(key) {\n  const biblio = await done;\n  if (!biblio.hasOwnProperty(key)) {\n    return null;\n  }\n  const entry = biblio[key];\n  if (entry.aliasOf) {\n    return await resolveRef(entry.aliasOf);\n  }\n  return entry;\n}\n\n/**\n * @param {string[]} neededRefs\n */\nasync function getReferencesFromIdb(neededRefs) {\n  const idbRefs = [];\n  // See if we have them in IDB\n  try {\n    await biblioDB.ready; // can throw\n    const promisesToFind = neededRefs.map(async id => ({\n      id,\n      data: await biblioDB.find(id),\n    }));\n    idbRefs.push(...(await Promise.all(promisesToFind)));\n  } catch (err) {\n    // IndexedDB died, so we need to go to the network for all\n    // references\n    idbRefs.push(...neededRefs.map(id => ({ id, data: null })));\n    console.warn(err);\n  }\n\n  return idbRefs;\n}\n\nexport class Plugin {\n  /** @param {Conf} conf */\n  constructor(conf) {\n    this.conf = conf;\n  }\n\n  /**\n   * Normative references take precedence over informative ones,\n   * so any duplicates ones are removed from the informative set.\n   */\n  normalizeReferences() {\n    const normalizedNormativeRefs = new Set(\n      [...this.conf.normativeReferences].map(key => key.toLowerCase())\n    );\n    Array.from(this.conf.informativeReferences)\n      .filter(key => normalizedNormativeRefs.has(key.toLowerCase()))\n      .forEach(redundantKey =>\n        this.conf.informativeReferences.delete(redundantKey)\n      );\n  }\n\n  getRefKeys() {\n    return {\n      informativeReferences: Array.from(this.conf.informativeReferences),\n      normativeReferences: Array.from(this.conf.normativeReferences),\n    };\n  }\n\n  async run() {\n    const finish = () => {\n      doneResolver(this.conf.biblio);\n    };\n    if (!this.conf.localBiblio) {\n      this.conf.localBiblio = {};\n    }\n    this.conf.biblio = biblio;\n    const localAliases = Object.keys(this.conf.localBiblio)\n      .filter(key => this.conf.localBiblio[key].hasOwnProperty(\"aliasOf\"))\n      .map(key => this.conf.localBiblio[key].aliasOf)\n      .filter(key => !this.conf.localBiblio.hasOwnProperty(key));\n    this.normalizeReferences();\n    const allRefs = this.getRefKeys();\n    const neededRefs = Array.from(\n      new Set(\n        allRefs.normativeReferences\n          .concat(allRefs.informativeReferences)\n          // Filter, as to not go to network for local refs\n          .filter(key => !this.conf.localBiblio.hasOwnProperty(key))\n          // but include local aliases which refer to external specs\n          .concat(localAliases)\n          .sort()\n      )\n    );\n\n    const idbRefs = neededRefs.length\n      ? await getReferencesFromIdb(neededRefs)\n      : [];\n    const split = { hasData: [], noData: [] };\n    idbRefs.forEach(ref => {\n      (ref.data ? split.hasData : split.noData).push(ref);\n    });\n    split.hasData.forEach(ref => {\n      biblio[ref.id] = ref.data;\n    });\n    const externalRefs = split.noData.map(item => item.id);\n    if (externalRefs.length) {\n      // Going to the network for refs we don't have\n      const data = await updateFromNetwork(externalRefs, { forceUpdate: true });\n      Object.assign(biblio, data);\n    }\n    Object.assign(biblio, this.conf.localBiblio);\n    finish();\n  }\n}\n","// @ts-check\n// Module core/render-biblio\n// renders the biblio data pre-processed in core/biblio\n\nimport { addId, getIntlData, showError } from \"./utils.js\";\nimport { biblio } from \"./biblio.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/render-biblio\";\n\nconst localizationStrings = {\n  en: {\n    info_references: \"Informative references\",\n    norm_references: \"Normative references\",\n    references: \"References\",\n    reference_not_found: \"Reference not found.\",\n  },\n  ko: {\n    references: \"참조\",\n  },\n  nl: {\n    info_references: \"Informatieve referenties\",\n    norm_references: \"Normatieve referenties\",\n    references: \"Referenties\",\n  },\n  es: {\n    info_references: \"Referencias informativas\",\n    norm_references: \"Referencias normativas\",\n    references: \"Referencias\",\n    reference_not_found: \"Referencia no encontrada.\",\n  },\n  ja: {\n    info_references: \"参照用参考文献\",\n    norm_references: \"規範的参考文献\",\n    references: \"参考文献\",\n  },\n  de: {\n    info_references: \"Weiterführende Informationen\",\n    norm_references: \"Normen und Spezifikationen\",\n    references: \"Referenzen\",\n  },\n  zh: {\n    info_references: \"非规范性引用\",\n    norm_references: \"规范性引用\",\n    references: \"参考文献\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nconst REF_STATUSES = new Map([\n  [\"CR\", \"W3C Candidate Recommendation\"],\n  [\"ED\", \"W3C Editor's Draft\"],\n  [\"LCWD\", \"W3C Last Call Working Draft\"],\n  [\"NOTE\", \"W3C Working Group Note\"],\n  [\"PR\", \"W3C Proposed Recommendation\"],\n  [\"REC\", \"W3C Recommendation\"],\n  [\"WD\", \"W3C Working Draft\"],\n]);\n\nconst endWithDot = endNormalizer(\".\");\n\n/** @param {Conf} conf */\nexport function run(conf) {\n  const informs = Array.from(conf.informativeReferences);\n  const norms = Array.from(conf.normativeReferences);\n\n  if (!informs.length && !norms.length) return;\n\n  /** @type {HTMLElement} */\n  const refSection =\n    document.querySelector(\"section#references\") ||\n    html`<section id=\"references\"></section>`;\n\n  if (!document.querySelector(\"section#references > :is(h2, h1)\")) {\n    // We use a h1 here because this could be structured from markdown\n    // which would otherwise end up in the wrong document order\n    // when the document is restructured.\n    refSection.prepend(html`<h1>${l10n.references}</h1>`);\n  }\n\n  refSection.classList.add(\"appendix\");\n\n  if (norms.length) {\n    const sec = createReferencesSection(norms, l10n.norm_references);\n    refSection.appendChild(sec);\n  }\n  if (informs.length) {\n    const sec = createReferencesSection(informs, l10n.info_references);\n    refSection.appendChild(sec);\n  }\n\n  document.body.appendChild(refSection);\n}\n\n/**\n * @param {string[]} refs\n * @param {string} title\n * @returns {HTMLElement}\n */\nfunction createReferencesSection(refs, title) {\n  const { goodRefs, badRefs } = groupRefs(refs.map(toRefContent));\n  const uniqueRefs = getUniqueRefs(goodRefs);\n\n  const refsToShow = uniqueRefs\n    .concat(badRefs)\n    .sort((a, b) =>\n      a.ref.toLocaleLowerCase().localeCompare(b.ref.toLocaleLowerCase())\n    );\n\n  const sec = html`<section>\n    <h3>${title}</h3>\n    <dl class=\"bibliography\">${refsToShow.map(showRef)}</dl>\n  </section>`;\n  addId(sec, \"\", title);\n\n  const aliases = getAliases(goodRefs);\n  decorateInlineReference(uniqueRefs, aliases);\n  warnBadRefs(badRefs);\n\n  return sec;\n}\n\n/**\n * returns refcontent and unique key for a reference among its aliases\n * and warns about circular references\n * @param {String} ref\n * @typedef {ReturnType<typeof toRefContent>} Ref\n */\nfunction toRefContent(ref) {\n  let refcontent = biblio[ref];\n  let key = ref;\n  const circular = new Set([key]);\n  while (refcontent && refcontent.aliasOf) {\n    if (circular.has(refcontent.aliasOf)) {\n      refcontent = null;\n      const msg = `Circular reference in biblio DB between [\\`${ref}\\`] and [\\`${key}\\`].`;\n      showError(msg, name);\n    } else {\n      key = refcontent.aliasOf;\n      refcontent = biblio[key];\n      circular.add(key);\n    }\n  }\n  if (refcontent && !refcontent.id) {\n    refcontent.id = ref.toLowerCase();\n  }\n  return { ref, refcontent };\n}\n\n/** @param {Ref[]} refs */\nfunction groupRefs(refs) {\n  const goodRefs = [];\n  const badRefs = [];\n  for (const ref of refs) {\n    if (ref.refcontent) {\n      goodRefs.push(ref);\n    } else {\n      badRefs.push(ref);\n    }\n  }\n  return { goodRefs, badRefs };\n}\n\n/** @param {Ref[]} refs */\nfunction getUniqueRefs(refs) {\n  /** @type {Map<string, Ref>} */\n  const uniqueRefs = new Map();\n  for (const ref of refs) {\n    if (!uniqueRefs.has(ref.refcontent.id)) {\n      // the condition ensures that only the first used [[TERM]]\n      // shows up in #references section\n      uniqueRefs.set(ref.refcontent.id, ref);\n    }\n  }\n  return [...uniqueRefs.values()];\n}\n\n/**\n * Render an inline citation\n *\n * @param {String} ref the inline reference.\n * @param {String} [linkText] custom link text\n * @returns HTMLElement\n */\nexport function renderInlineCitation(ref, linkText) {\n  const key = ref.replace(/^(!|\\?)/, \"\");\n  const href = `#bib-${key.toLowerCase()}`;\n  const text = linkText || key;\n  const elem = html`<cite\n    ><a class=\"bibref\" href=\"${href}\" data-link-type=\"biblio\">${text}</a></cite\n  >`;\n  return linkText ? elem : html`[${elem}]`;\n}\n\n/**\n * renders a reference\n * @param {Ref} reference\n */\nfunction showRef(reference) {\n  const { ref, refcontent } = reference;\n  const refId = `bib-${ref.toLowerCase()}`;\n  const result = html`\n    <dt id=\"${refId}\">[${ref}]</dt>\n    <dd>\n      ${refcontent\n        ? { html: stringifyReference(refcontent) }\n        : html`<em class=\"respec-offending-element\"\n            >${l10n.reference_not_found}</em\n          >`}\n    </dd>\n  `;\n  return result;\n}\n\nfunction endNormalizer(endStr) {\n  return str => {\n    const trimmed = str.trim();\n    const result =\n      !trimmed || trimmed.endsWith(endStr) ? trimmed : trimmed + endStr;\n    return result;\n  };\n}\n\n/** @param {BiblioData|string} ref */\nfunction stringifyReference(ref) {\n  if (typeof ref === \"string\") return ref;\n  let output = `<cite>${ref.title}</cite>`;\n\n  output = ref.href ? `<a href=\"${ref.href}\">${output}</a>. ` : `${output}. `;\n\n  if (ref.authors && ref.authors.length) {\n    output += ref.authors.join(\"; \");\n    if (ref.etAl) output += \" et al\";\n    output += \". \";\n  }\n  if (ref.publisher) {\n    output = `${output} ${endWithDot(ref.publisher)} `;\n  }\n  if (ref.date) output += `${ref.date}. `;\n  if (ref.status) output += `${REF_STATUSES.get(ref.status) || ref.status}. `;\n  if (ref.href) output += `URL: <a href=\"${ref.href}\">${ref.href}</a>`;\n  return output;\n}\n\n/**\n * get aliases for a reference \"key\"\n */\nfunction getAliases(refs) {\n  return refs.reduce((aliases, ref) => {\n    const key = ref.refcontent.id;\n    const keys = !aliases.has(key)\n      ? aliases.set(key, []).get(key)\n      : aliases.get(key);\n    keys.push(ref.ref);\n    return aliases;\n  }, new Map());\n}\n\n/**\n * fix biblio reference URLs\n * Add title attribute to references\n */\nfunction decorateInlineReference(refs, aliases) {\n  refs\n    .map(({ ref, refcontent }) => {\n      const refUrl = `#bib-${ref.toLowerCase()}`;\n      const selectors = aliases\n        .get(refcontent.id)\n        .map(alias => `a.bibref[href=\"#bib-${alias.toLowerCase()}\"]`)\n        .join(\",\");\n      const elems = document.querySelectorAll(selectors);\n      return { refUrl, elems, refcontent };\n    })\n    .forEach(({ refUrl, elems, refcontent }) => {\n      elems.forEach(a => {\n        a.setAttribute(\"href\", refUrl);\n        a.setAttribute(\"title\", refcontent.title);\n        a.dataset.linkType = \"biblio\";\n      });\n    });\n}\n\n/**\n * warn about bad references\n */\nfunction warnBadRefs(refs) {\n  for (const { ref } of refs) {\n    /** @type {NodeListOf<HTMLElement>} */\n    const links = document.querySelectorAll(\n      `a.bibref[href=\"#bib-${ref.toLowerCase()}\"]`\n    );\n    const elements = [...links].filter(\n      ({ textContent: t }) => t.toLowerCase() === ref.toLowerCase()\n    );\n    const msg = `Reference \"[${ref}]\" not found.`;\n    const hint = `Search for [\"${ref}\"](https://www.specref.org?q=${ref}) on Specref to see if it exists or if it's misspelled.`;\n    showError(msg, name, { hint, elements });\n  }\n}\n","// @ts-check\n// Module core/inlines\n// Process all manners of inline information. These are done together despite it being\n// seemingly a better idea to orthogonalise them. The issue is that processing text nodes\n// is harder to orthogonalise, and in some browsers can also be particularly slow.\n// Things that are recognised are <abbr>/<acronym> which when used once are applied\n// throughout the document, [[REFERENCES]]/[[!REFERENCES]], {{ IDL }} and RFC2119 keywords.\n\nimport {\n  InsensitiveStringSet,\n  getIntlData,\n  getTextNodes,\n  norm,\n  refTypeFromContext,\n  showWarning,\n} from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nimport { idlStringToHtml } from \"./inline-idl-parser.js\";\nimport { renderInlineCitation } from \"./render-biblio.js\";\n\nexport const name = \"core/inlines\";\nexport const rfc2119Usage = {};\n\n/** @param {RegExp[]} regexes */\nconst joinRegex = regexes => new RegExp(regexes.map(re => re.source).join(\"|\"));\n\nconst localizationStrings = {\n  en: {\n    rfc2119Keywords() {\n      return joinRegex([\n        /\\bMUST(?:\\s+NOT)?\\b/,\n        /\\bSHOULD(?:\\s+NOT)?\\b/,\n        /\\bSHALL(?:\\s+NOT)?\\b/,\n        /\\bMAY\\b/,\n        /\\b(?:NOT\\s+)?REQUIRED\\b/,\n        /\\b(?:NOT\\s+)?RECOMMENDED\\b/,\n        /\\bOPTIONAL\\b/,\n      ]);\n    },\n  },\n  de: {\n    rfc2119Keywords() {\n      return joinRegex([\n        /\\bMUSS\\b/,\n        /\\bMÜSSEN\\b/,\n        /\\bERFORDERLICH\\b/,\n        /\\b(?:NICHT\\s+)?NÖTIG\\b/,\n        /\\bDARF(?:\\s+NICHT)?\\b/,\n        /\\bDÜRFEN(?:\\s+NICHT)?\\b/,\n        /\\bVERBOTEN\\b/,\n        /\\bSOLL(?:\\s+NICHT)?\\b/,\n        /\\bSOLLEN(?:\\s+NICHT)?\\b/,\n        /\\b(?:NICHT\\s+)?EMPFOHLEN\\b/,\n        /\\bKANN\\b/,\n        /\\bKÖNNEN\\b/,\n        /\\bOPTIONAL\\b/,\n      ]);\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n// Inline `code`\n// TODO: Replace (?!`) at the end with (?:<!`) at the start when Firefox + Safari\n// add support.\nconst inlineCodeRegExp = /(?:`[^`]+`)(?!`)/; // `code`\nconst inlineIdlReference = /(?:{{[^}]+\\?*}})/; // {{ WebIDLThing }}, {{ WebIDLThing? }}\nconst inlineVariable = /\\B\\|\\w[\\w\\s]*(?:\\s*:[\\w\\s&;\"?<>]+\\??)?\\|\\B/; // |var : Type?|\nconst inlineCitation = /(?:\\[\\[(?:!|\\\\|\\?)?[\\w.-]+(?:|[^\\]]+)?\\]\\])/; // [[citation]]\nconst inlineExpansion = /(?:\\[\\[\\[(?:!|\\\\|\\?)?#?[\\w-.]+\\]\\]\\])/; // [[[expand]]]\nconst inlineAnchor = /(?:\\[=[^=]+=\\])/; // Inline [= For/link =]\nconst inlineElement = /(?:\\[\\^[^^]+\\^\\])/; // Inline [^element^]\n\n/**\n * @example [^iframe^] // [^element^]\n * @example [^iframe/allow^] // [^element/element-attr^]\n * @param {string} matched\n * @return {HTMLElement}\n */\nfunction inlineElementMatches(matched) {\n  const value = matched.slice(2, -2).trim();\n  const [forPart, attribute, attrValue] = value\n    .split(\"/\", 3)\n    .map(s => s && s.trim())\n    .filter(s => !!s);\n\n  const [xrefType, xrefFor, textContent] = (() => {\n    // [^ /role ^], for example\n    const isGlobalAttr = value.startsWith(\"/\");\n    if (isGlobalAttr) {\n      return [\"element-attr\", null, forPart];\n    } else if (attrValue) {\n      return [\"attr-value\", `${forPart}/${attribute}`, attrValue];\n    } else if (attribute) {\n      return [\"element-attr\", forPart, attribute];\n    } else {\n      return [\"element\", null, forPart];\n    }\n  })();\n  return html`<code\n    ><a\n      data-xref-type=\"${xrefType}\"\n      data-xref-for=\"${xrefFor}\"\n      data-link-type=\"${xrefType}\"\n      data-link-for=\"${xrefFor}\"\n      >${textContent}</a\n    ></code\n  >`;\n}\n\n/**\n * @param {string} matched\n * @return {HTMLElement}\n */\nfunction inlineRFC2119Matches(matched) {\n  const value = norm(matched);\n  const nodeElement = html`<em class=\"rfc2119\">${value}</em>`;\n  // remember which ones were used\n  rfc2119Usage[value] = true;\n  return nodeElement;\n}\n\n/**\n * @param {string} matched\n * @return {HTMLElement}\n */\nfunction inlineRefMatches(matched) {\n  // slices \"[[[\" at the beginning and \"]]]\" at the end\n  const ref = matched.slice(3, -3).trim();\n  if (!ref.startsWith(\"#\")) {\n    return html`<a data-cite=\"${ref}\" data-matched-text=\"${matched}\"></a>`;\n  }\n  return html`<a href=\"${ref}\" data-matched-text=\"${matched}\"></a>`;\n}\n\n/**\n * @param {string} matched\n * @param {Text} text\n */\nfunction inlineXrefMatches(matched, text) {\n  // slices \"{{\" at the beginning and \"}}\" at the end\n  const ref = norm(matched.slice(2, -2));\n  if (ref.startsWith(\"\\\\\")) {\n    return matched.replace(\"\\\\\", \"\");\n  }\n\n  const node = idlStringToHtml(ref);\n  // If it's inside a dfn, it should just be coded, not linked.\n  // This is because dfn elements are treated as links by ReSpec via role=link.\n  const renderAsCode = !!text.parentElement.closest(\"dfn\");\n  return renderAsCode ? inlineCodeMatches(`\\`${node.textContent}\\``) : node;\n}\n\n/**\n * @param {string} matched\n * @param {Text} txt\n * @param {Object} conf\n * @return {Iterable<string | Node>}\n */\nfunction inlineBibrefMatches(matched, txt, conf) {\n  // slices \"[[\" at the start and \"]]\" at the end\n  const ref = matched.slice(2, -2);\n  if (ref.startsWith(\"\\\\\")) {\n    return [`[[${ref.slice(1)}]]`];\n  }\n\n  const [spec, linkText] = ref.split(\"|\").map(norm);\n  const { type, illegal } = refTypeFromContext(spec, txt.parentElement);\n  const cite = renderInlineCitation(spec, linkText);\n  const cleanRef = spec.replace(/^(!|\\?)/, \"\");\n  if (illegal && !conf.normativeReferences.has(cleanRef)) {\n    const citeElem = cite.childNodes[1] || cite;\n    const msg = `Normative references in informative sections are not allowed. `;\n    const hint = `Remove '!' from the start of the reference \\`[[${ref}]]\\``;\n    showWarning(msg, name, { elements: [citeElem], hint });\n  }\n\n  if (type === \"informative\" && !illegal) {\n    conf.informativeReferences.add(cleanRef);\n  } else {\n    conf.normativeReferences.add(cleanRef);\n  }\n  return cite.childNodes[1] ? cite.childNodes : [cite];\n}\n\n/**\n * @param {string} matched\n * @param {Text} txt\n * @param {Map<string, string>} abbrMap\n */\nfunction inlineAbbrMatches(matched, txt, abbrMap) {\n  return txt.parentElement.tagName === \"ABBR\"\n    ? matched\n    : html`<abbr title=\"${abbrMap.get(matched)}\">${matched}</abbr>`;\n}\n\n/**\n * @example |varName: type| => <var data-type=\"type\">varName</var>\n * @example |varName| => <var>varName</var>\n * @param {string} matched\n */\nfunction inlineVariableMatches(matched) {\n  // remove \"|\" at the beginning and at the end, then split at an optional `:`\n  const matches = matched.slice(1, -1).split(\":\", 2);\n  const [varName, type] = matches.map(s => s.trim());\n  return html`<var data-type=\"${type}\">${varName}</var>`;\n}\n\n/**\n * @example [= foo =] => <a>foo</a>\n * @example [= bar/foo =] => <a data-link-for=\"bar\" data-xref-for=\"bar\">foo</a>\n * @example [= `foo` =] => <a><code>foo</code></a>\n * @example [= foo|bar =] => <a data-lt=\"foo\">bar</a>\n * @param {string} matched\n */\nfunction inlineAnchorMatches(matched) {\n  matched = matched.slice(2, -2); // Chop [= =]\n  const parts = splitByFor(matched);\n  const [isFor, content] = parts.length === 2 ? parts : [null, parts[0]];\n  const [linkingText, text] = content.includes(\"|\")\n    ? content.split(\"|\", 2).map(s => s.trim())\n    : [null, content];\n  const processedContent = processInlineContent(text);\n  const forContext = isFor ? norm(isFor) : null;\n  return html`<a\n    data-link-type=\"dfn|abstract-op\"\n    data-link-for=\"${forContext}\"\n    data-xref-for=\"${forContext}\"\n    data-lt=\"${linkingText}\"\n    >${processedContent}</a\n  >`;\n}\n\nfunction inlineCodeMatches(matched) {\n  const clean = matched.slice(1, -1); // Chop ` and `\n  return html`<code>${clean}</code>`;\n}\n\nfunction processInlineContent(text) {\n  if (inlineCodeRegExp.test(text)) {\n    // We use a capture group to split, so we can process all the parts.\n    return text.split(/(`[^`]+`)(?!`)/).map(part => {\n      return part.startsWith(\"`\")\n        ? inlineCodeMatches(part)\n        : processInlineContent(part);\n    });\n  }\n  return document.createTextNode(text);\n}\n\nexport function run(conf) {\n  const abbrMap = new Map();\n  document.normalize();\n  if (!document.querySelector(\"section#conformance\")) {\n    // make the document informative\n    document.body.classList.add(\"informative\");\n  }\n  conf.normativeReferences = new InsensitiveStringSet();\n  conf.informativeReferences = new InsensitiveStringSet();\n\n  if (!conf.respecRFC2119) conf.respecRFC2119 = rfc2119Usage;\n\n  // PRE-PROCESSING\n  /** @type {NodeListOf<HTMLElement>} */\n  const abbrElements = document.querySelectorAll(\"abbr[title]:not(.exclude)\");\n  for (const { textContent, title } of abbrElements) {\n    const key = norm(textContent);\n    const value = norm(title);\n    abbrMap.set(key, value);\n  }\n  const abbrRx = abbrMap.size\n    ? new RegExp(`(?:\\\\b${[...abbrMap.keys()].join(\"\\\\b)|(?:\\\\b\")}\\\\b)`)\n    : null;\n\n  // PROCESSING\n  // Don't gather text nodes for these:\n  const exclusions = [\"#respec-ui\", \".head\", \"pre\", \"svg\"];\n  const txts = getTextNodes(document.body, exclusions, {\n    wsNodes: false, // we don't want nodes with just whitespace\n  });\n  const keywords = l10n.rfc2119Keywords();\n\n  const inlinesRegex = new RegExp(\n    `(${\n      joinRegex([\n        keywords,\n        inlineIdlReference,\n        inlineVariable,\n        inlineCitation,\n        inlineExpansion,\n        inlineAnchor,\n        inlineCodeRegExp,\n        inlineElement,\n        ...(abbrRx ? [abbrRx] : []),\n      ]).source\n    })`\n  );\n  for (const txt of txts) {\n    const subtxt = txt.data.split(inlinesRegex);\n    if (subtxt.length === 1) continue;\n    const df = document.createDocumentFragment();\n    let matched = true;\n    for (const t of subtxt) {\n      matched = !matched;\n      if (!matched) {\n        df.append(t);\n        continue;\n      }\n      switch (true) {\n        case t.startsWith(\"{{\"):\n          df.append(inlineXrefMatches(t, txt));\n          break;\n        case t.startsWith(\"[[[\"):\n          df.append(inlineRefMatches(t));\n          break;\n        case t.startsWith(\"[[\"):\n          df.append(...inlineBibrefMatches(t, txt, conf));\n          break;\n        case t.startsWith(\"|\"):\n          df.append(inlineVariableMatches(t));\n          break;\n        case t.startsWith(\"[=\"):\n          df.append(inlineAnchorMatches(t));\n          break;\n        case t.startsWith(\"`\"):\n          df.append(inlineCodeMatches(t));\n          break;\n        case t.startsWith(\"[^\"):\n          df.append(inlineElementMatches(t));\n          break;\n        case abbrMap.has(t):\n          df.append(inlineAbbrMatches(t, txt, abbrMap));\n          break;\n        case keywords.test(t):\n          df.append(inlineRFC2119Matches(t));\n          break;\n      }\n    }\n    txt.replaceWith(df);\n  }\n}\n\n/**\n * Linking strings are always composed of:\n *\n *   (for-part /)+ linking-text\n *\n * E.g., \" ReadableStream / set up / pullAlgorithm \".\n * Where \"ReadableStream/set up/\" is for-part, and \"pullAlgorithm\" is\n * the linking-text.\n *\n * The for part is optional, but when present can be two or three levels deep.\n *\n * @param {string} str\n *\n */\nfunction splitByFor(str) {\n  /** @param {string} str */\n  const cleanUp = str => str.replace(\"%%\", \"/\").split(\"/\").map(norm).join(\"/\");\n  const safeStr = str.replace(\"\\\\/\", \"%%\");\n  const lastSlashIdx = safeStr.lastIndexOf(\"/\");\n  if (lastSlashIdx === -1) {\n    return [cleanUp(safeStr)];\n  }\n  const forPart = safeStr.substring(0, lastSlashIdx);\n  const linkingText = safeStr.substring(lastSlashIdx + 1, safeStr.length);\n  return [cleanUp(forPart), cleanUp(linkingText)];\n}\n","// @ts-check\n// Module 1edtech/conformance\n//\n// Based on w3c/conformance with following differences:\n//\n// 1EdTech version:\n// - Skip if specType == 'Errata' (1EdTech Errata documents do not have a conformance section).\n// - Use slightly modified conformance text.\n//\n// Note: Run after inlines so the conformance section has an id and NormativeReferences is available.\nimport { getIntlData, htmlJoinAnd, showError, showWarning } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { renderInlineCitation } from \"../core/render-biblio.js\";\nimport { rfc2119Usage } from \"../core/inlines.js\";\nimport localizationStrings from \"./translations/conformance.js\";\nconst l10n = getIntlData(localizationStrings);\n\nexport const name = \"1edtech/conformance\";\n\n/**\n * core/inlines will count the actual occurances of each term and\n * both w3c/conformance and 1edtech/conformance will only list the terms\n * that are in rfc2119Usage. But the current version of the normative\n * text refers to all the keywords, so this stuffs the list with all\n * the keywords.\n */\nfunction stuffRfc299Usage() {\n  rfc2119Usage.MUST = true;\n  rfc2119Usage[\"MUST NOT\"] = true;\n  rfc2119Usage.REQUIRED = true;\n  rfc2119Usage.SHALL = true;\n  rfc2119Usage[\"SHALL NOT\"] = true;\n  rfc2119Usage.SHOULD = true;\n  rfc2119Usage[\"SHOULD NOT\"] = true;\n  rfc2119Usage.RECOMMENDED = true;\n  rfc2119Usage.MAY = true;\n  rfc2119Usage.OPTIONAL = true;\n}\n\n/**\n * @param {*} conf\n */\nfunction getNormativeText(conf) {\n  // Make sure all the terms referenced in the text below are included.\n  // Remove this step if you only want to list the terms that are actually\n  // used in this document.\n  stuffRfc299Usage();\n\n  // Build the HTML\n  const terms = [...Object.keys(rfc2119Usage)];\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n\n  console.log(renderInlineCitation(\"RFC2119\"))\n  const content = html`<p>\n      ${l10n.normative_text_paragraph_1}\n    </p>\n    ${terms.length\n      ? html`\n          <p>\n          ${plural ? `${l10n.the_plural} ${l10n.key_words}` : `${l10n.the} ${l10n.key_word}`}\n          ${[keywords]}\n          ${l10n.keywords_paragraph\n            .replace(\"{0}\", plural ? l10n.are : l10n.is)}\n            ${renderInlineCitation(\"RFC2119\")}.\n          </p>\n        `\n      : null}\n    <p>${l10n.normative_text_implementation}</p>`;\n\n  if (conf.skipCertGuideConformanceRef || conf.specType == \"cert\") {\n    return content;\n  }\n\n  return html`${content}\n    <p>\n      ${l10n.normative_text_certification_constraints}\n    </p>`;\n}\n\n/**\n * @param {*} conf\n */\nfunction getInformativeText(conf) {\n  if (!conf.mainSpecTitle) {\n    showWarning(\"No mainSpecTitle property found in config')\", name);\n  }\n\n  if (!conf.mainSpecBiblioKey) {\n    showWarning(\"No mainSpecBiblioKey property found in config')\", name);\n  }\n\n  return html` <p>\n    ${l10n.informative_text_paragraph_1.replace(\"{0}\", conf.mainSpecTitle ? conf.mainSpecTitle : \"\")}\n    ${conf.mainSpecBiblioKey ? renderInlineCitation(conf.mainSpecBiblioKey) : \"\"}.\n    ${l10n.informative_text_paragraph_2}\n  </p>`;\n}\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  // Add RFC2119 to the bibliography\n  conf.normativeReferences.add(\"RFC2119\");\n\n  // Get the appropriate text\n  let content;\n\n  if (conf.specNature === \"normative\") {\n    content = getNormativeText(conf);\n  } else if (conf.specNature === \"informative\") {\n    content = getInformativeText(conf);\n  }\n\n  if (conformance.tagName === \"SECTION\") {\n    conformance.prepend(...content.childNodes);\n  } else {\n    conformance.after(...content.childNodes);\n  }\n}\n\n/**\n * @param {*} conf\n */\nexport function run(conf) {\n  // No conformance section in 1EdTech Errata documents\n  if (conf.specType === \"errata\") {\n    return;\n  }\n\n  let conformance = document.querySelector(\"section#conformance\");\n  if (!conformance)\n    conformance = document.querySelector(\"section#conformance-0\");\n  if (!conformance)\n    conformance = document.querySelector(\"section #conformance\");\n  if (!conformance)\n    conformance = document.querySelector(\"section #conformance-0\");\n  if (!conformance) {\n    if (conf.specType === \"doc\") {\n      // Conformance is optional for generic documents\n      return;\n    }\n    // Otherwise, the conformance section is required\n    showError(\"No section found with id 'conformance'\", name);\n    return;\n  }\n\n  // Use 1EdTech specNature to determine conformance text\n  if (!conf.specNature) {\n    showError(\"Document must have config.specNature set\", name);\n  }\n\n  // 1EdTech standard is to have a Conformance heading\n  if (conformance.tagName === \"SECTION\") {\n    const conformanceHeading = conformance.querySelector(\n      \"h1, h2, h3, h4, h5, h6\"\n    );\n    if (!conformanceHeading) {\n      showWarning(\"No heading found in the conformance section\", name);\n    } else {\n      // Insert conformation text after heading\n      conformance = conformanceHeading;\n    }\n  }\n\n  // Insert the conformance text\n  processConformance(conformance, conf);\n}\n","export default {\n  en: {\n    informative_text_paragraph_1: \"This document is an informative resource in the Document Set of the {0} specification\",\n    informative_text_paragraph_2: \"As such, it does not include any normative requirements. Occurrences in this document of terms such as MAY, MUST, MUST NOT, SHOULD or RECOMMENDED have no impact on the conformance criteria for implementors of this specification.\",\n    normative_text_paragraph_1: \"As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.\",\n    key_word: \"key word\",\n    key_words: \"key words\",\n    is: \"is\",\n    are: \"are\",\n    the: \"The\",\n    the_plural: \"The\",\n    keywords_paragraph: \"in this document {0} to be interpreted as described in\",\n    normative_text_implementation: \"An implementation of this specification that fails to implement a MUST/REQUIRED/SHALL requirement or fails to abide by a MUST NOT/SHALL NOT prohibition is considered nonconformant. SHOULD/SHOULD NOT/RECOMMENDED statements constitute a best practice. Ignoring a best practice does not violate conformance but a decision to disregard such guidance should be carefully considered. MAY/OPTIONAL statements indicate that implementers are entirely free to choose whether or not to implement the option.\",\n    normative_text_certification_constraints: \"The <a href=\\\"#document-set\\\">Conformance and Certification Guide</a> for this specification may introduce greater normative constraints than those defined here for specific service or implementation categories.\"\n  },\n  es: {\n    informative_text_paragraph_1: \"Este documento es un recurso informativo dentro del Set de Documentos de la especificación {0}\",\n    informative_text_paragraph_2: \"Como tal, no incluye ningún requisito normativo. Las ocurrencias en este documento de términos como PUEDE, DEBE, NO DEBE, DEBERÍA o RECOMENDADO no tienen ningún impacto en los criterios de conformidad para los implementadores de esta especificación.\",\n    normative_text_paragraph_1: \"Así como las secciones marcadas como no normativas, todas las directrices de autoría, diagramas, ejemplos y notas en esta especificación no son normativas. Todo lo demás en esta especificación es normativo.\",\n    key_word: \"palabra clave\",\n    key_words: \"palabras clave\",\n    is: \"es\",\n    are: \"son\",\n    the: \"La\",\n    the_plural: \"Las\",\n    keywords_paragraph: \"en este documento ${0} interpretadas tal y como se describe en\",\n    normative_text_implementation: \"Una implementación de esta especificación que no implementa un requisito de DEBE/REQUERIDO/DEBERIA o no cumple con una prohibición de DEBE/NO DEBE se considera no conforme. Las declaraciones DEBERÍA/NO DEBERÍA/RECOMENDADO constituyen una buena práctica. Ignorar una buena práctica no viola la conformidad, pero la decisión de ignorar dicha guía debe considerarse cuidadosamente. Las declaraciones MAY/OPCIONAL indican que los implementadores son completamente libres de elegir si implementar o no la opción.\",\n    normative_text_certification_constraints: \"La <a href=\\\"#document-set\\\">Guía de Conformidad y Certificación</a> para esta especificación puede introducir restricciones normativas mayores que las definidas aquí para categorías específicas de servicio o implementación.\"\n  },\n  ca: {\n    informative_text_paragraph_1: \"Aquest document és un recurs informatiu dins del Set de Documents de l'especificació {0}\",\n    informative_text_paragraph_2: \"Com a tal, no inclou cap requisit normatiu. Les ocurrències en aquest document de termes com POT, HA DE, NO HA DE, o RECOMENAT no tenen cap impacte en els criteris de conformitat per als implementadors d'aquesta especificació.\",\n    normative_text_paragraph_1: \"A més de les seccions marcades com a no normatives, totes les directrius d'autoria, diagrames, exemples i notes en aquesta especificació són no normatives. Tota la resta en aquesta especificació és normativa.\",\n    key_word: \"paraula clau\",\n    key_words: \"paraules clau\",\n    is: \"és\",\n    are: \"són\",\n    the: \"La\",\n    the_plural: \"Les\",\n    keywords_paragraph: \"dins aquest document ${0} interpretades tal i com es descriu a\",\n    normative_text_implementation: \"Una implementació d'aquesta especificació que no implementi un requisit HA DE/REQUERIT/HAURIA DE o que no compleixi amb una prohibició HA DE/NO HA DE es considera inconformant. Les declaracions HAURIA DE/NO HAURIA DE/RECOMENAT constitueixen una bona práctica. Ignorar una bona pràctica no viola la conformitat, però s'ha de tenir en compte amb cura la decisió d'ignorar aquesta orientació. Les declaracions POT/OPCIONAL indiquen que els implementadors són totalment lliures de triar si implementar o no l'opció.\",\n    normative_text_certification_constraints: \"La <a href=\\\"#document-set\\\">Guia de Conformitat i Certificació</a> per a aquesta especificació pot introduir restriccions normatives més grans que les definides aquí per a categories específiques de serveis o d'implementació.\"\n  }\n};\n","import { MIMEType } from \"./import-maps.js\";\nimport { showError } from \"./utils.js\";\n\n/**\n * Validates MIME types strings.\n *\n * @type {DefinitionValidator} */\nexport function validateMimeType(text, type, elem, pluginName) {\n  try {\n    // Constructor can throw.\n    const type = new MIMEType(text);\n    if (type.toString() !== text) {\n      throw new Error(`Input doesn't match its canonical form: \"${type}\".`);\n    }\n  } catch (error) {\n    const msg = `Invalid ${type} \"${text}\": ${error.message}.`;\n    const hint =\n      \"Check that the MIME type has both a type and a sub-type, and that it's in a canonical form (e.g., `text/plain`).\";\n    showError(msg, pluginName, { hint, elements: [elem] });\n    return false;\n  }\n  return true;\n}\n\n/**\n * Validates the names of DOM attribute and elements.\n * @param {\"element-attr\" | \"element\"} type\n * @type {DefinitionValidator} */\nexport function validateDOMName(text, type, elem, pluginName) {\n  try {\n    switch (type) {\n      case \"element-attr\":\n        document.createAttribute(text);\n        return true;\n      case \"element\":\n        document.createElement(text);\n        return true;\n    }\n  } catch (err) {\n    const msg = `Invalid ${type} name \"${text}\": ${err.message}`;\n    const hint = `Check that the ${type} name is allowed per the XML's Name production for ${type}.`;\n    showError(msg, pluginName, { hint, elements: [elem] });\n  }\n  return false;\n}\n\n/**\n * Validates common variable or other named thing in a spec, like event names.\n *\n * @type {DefinitionValidator}\n */\nexport function validateCommonName(text, type, elem, pluginName) {\n  // Check a-z, maybe a dash and letters, case insensitive.\n  // Also, no spaces.\n  if (/^[a-z]+(-[a-z]+)*$/i.test(text)) {\n    return true; // all good\n  }\n  const msg = `Invalid ${type} name \"${text}\".`;\n  const hint = `Check that the ${type} name is allowed per the naming rules for this type.`;\n  showError(msg, pluginName, { hint, elements: [elem] });\n  return false;\n}\n\n/**\n * @type {DefinitionValidator} */\nexport function validateQuotedString(text, type, elem, pluginName) {\n  if (text.startsWith(`\"`) && text.endsWith(`\"`)) {\n    return validateCommonName(text.slice(1, -1), type, elem, pluginName);\n  }\n  const msg = `Invalid ${type} \"${text}\".`;\n  const hint = `Check that the ${type} is quoted with double quotes.`;\n  showError(msg, pluginName, { hint, elements: [elem] });\n  return false;\n}\n","// @ts-check\nimport { CaseInsensitiveMap } from \"./utils.js\";\n\n/** @type {CaseInsensitiveMap<Set<HTMLElement>>} */\nexport const definitionMap = new CaseInsensitiveMap();\n\n/**\n * @param {HTMLElement} dfn A definition element to register\n * @param {string[]} names Names to register the element by\n */\nexport function registerDefinition(dfn, names) {\n  for (const name of names) {\n    if (!definitionMap.has(name)) {\n      definitionMap.set(name, new Set());\n    }\n    definitionMap.get(name).add(dfn);\n  }\n}\n","// @ts-check\n// Module core/dfn\n// - Finds all <dfn> elements and populates definitionMap to identify them.\n\nimport {\n  codedJoinOr,\n  docLink,\n  getDfnTitles,\n  norm,\n  showError,\n  toMDCode,\n} from \"./utils.js\";\nimport {\n  validateCommonName,\n  validateDOMName,\n  validateMimeType,\n  validateQuotedString,\n} from \"./dfn-validators.js\";\nimport { registerDefinition } from \"./dfn-map.js\";\nimport { slotRegex } from \"./inline-idl-parser.js\";\n\nexport const name = \"core/dfn\";\n\n/** @type {Map<string, { requiresFor: boolean, validator?: DefinitionValidator, associateWith?: string}>}  */\nconst knownTypesMap = new Map([\n  [\"abstract-op\", { requiresFor: false }],\n  [\n    \"attr-value\",\n    {\n      requiresFor: true,\n      associateWith: \"a markup attribute\",\n      validator: validateCommonName,\n    },\n  ],\n  [\"element\", { requiresFor: false, validator: validateDOMName }],\n  [\n    \"element-attr\",\n    {\n      requiresFor: false,\n      validator: validateDOMName,\n    },\n  ],\n  [\n    \"element-state\",\n    {\n      requiresFor: true,\n      associateWith: \"a markup attribute\",\n      validator: validateCommonName,\n    },\n  ],\n  [\"event\", { requiresFor: false, validator: validateCommonName }],\n  [\"http-header\", { requiresFor: false }],\n  [\"media-type\", { requiresFor: false, validator: validateMimeType }],\n  [\"scheme\", { requiresFor: false, validator: validateCommonName }],\n  [\"permission\", { requiresFor: false, validator: validateQuotedString }],\n]);\n\nconst knownTypes = [...knownTypesMap.keys()];\n\nexport function run() {\n  for (const dfn of document.querySelectorAll(\"dfn\")) {\n    const titles = getDfnTitles(dfn);\n    registerDefinition(dfn, titles);\n\n    // It's a legacy cite or redefining a something it doesn't own, so it gets no benefit.\n    if (dfn.dataset.cite && /\\b#\\b/.test(dfn.dataset.cite)) {\n      continue;\n    }\n\n    const [linkingText] = titles;\n    computeType(dfn, linkingText);\n    computeExport(dfn);\n\n    // Only add `lt`s that are different from the text content\n    if (titles.length === 1 && linkingText === norm(dfn.textContent)) {\n      continue;\n    }\n    dfn.dataset.lt = titles.join(\"|\");\n  }\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {string} linkingText\n * */\nfunction computeType(dfn, linkingText) {\n  let type = \"\";\n\n  switch (true) {\n    // class defined type (e.g., \"<dfn class=\"element\">)\n    case knownTypes.some(name => dfn.classList.contains(name)):\n      // First one wins\n      type = [...dfn.classList].find(className => knownTypesMap.has(className));\n      validateDefinition(linkingText, type, dfn);\n      break;\n\n    // Internal slots: attributes+ methods (e.g., [[some words]](with, optional, arguments))\n    case slotRegex.test(linkingText):\n      type = processAsInternalSlot(linkingText, dfn);\n      break;\n  }\n\n  // Derive closest type\n  if (!type && !dfn.matches(\"[data-dfn-type]\")) {\n    /** @type {HTMLElement} */\n    const closestType = dfn.closest(\"[data-dfn-type]\");\n    type = closestType?.dataset.dfnType;\n  }\n  // only if we have type and one wasn't explicitly given.\n  if (type && !dfn.dataset.dfnType) {\n    dfn.dataset.dfnType = type;\n  }\n  // Finally, addContractDefaults() will add the type to the dfn if it's not there.\n  // But other modules may end up adding a type (e.g., the WebIDL module)\n}\n\n// Deal with export/no export\nfunction computeExport(dfn) {\n  switch (true) {\n    // Error if we have both exports and no exports.\n    case dfn.matches(\".export.no-export\"): {\n      const msg = docLink`Declares both \"${\"[no-export]\"}\" and \"${\"[export]\"}\" CSS class.`;\n      const hint = \"Please use only one.\";\n      showError(msg, name, { elements: [dfn], hint });\n      break;\n    }\n\n    // No export wins\n    case dfn.matches(\".no-export, [data-noexport]\"):\n      if (dfn.matches(\"[data-export]\")) {\n        const msg = docLink`Declares ${\"[no-export]\"} CSS class, but also has a \"${\"[data-export]\"}\" attribute.`;\n        const hint = \"Please chose only one.\";\n        showError(msg, name, { elements: [dfn], hint });\n        delete dfn.dataset.export;\n      }\n      dfn.dataset.noexport = \"\";\n      break;\n\n    // If the author explicitly asked for it to be exported, so let's export it.\n    case dfn.matches(\":is(.export):not([data-noexport], .no-export)\"):\n      dfn.dataset.export = \"\";\n      break;\n  }\n}\n\n/**\n * @param {string} text\n * @param {string} type\n * @param {HTMLElement} dfn\n */\nfunction validateDefinition(text, type, dfn) {\n  const entry = knownTypesMap.get(type);\n  if (entry.requiresFor && !dfn.dataset.dfnFor) {\n    const msg = docLink`Definition of type \"\\`${type}\\`\" requires a ${\"[data-dfn-for]\"} attribute.`;\n    const { associateWith } = entry;\n    const hint = docLink`Use a ${\"[data-dfn-for]\"} attribute to associate this with ${associateWith}.`;\n    showError(msg, name, { hint, elements: [dfn] });\n  }\n\n  if (entry.validator) {\n    entry.validator(text, type, dfn, name);\n  }\n}\n\n/**\n *\n * @param {string} title\n * @param {HTMLElement} dfn\n */\nfunction processAsInternalSlot(title, dfn) {\n  if (!dfn.dataset.hasOwnProperty(\"idl\")) {\n    dfn.dataset.idl = \"\";\n  }\n\n  // Automatically use the closest data-dfn-for as the parent.\n  /** @type HTMLElement */\n  const parent = dfn.closest(\"[data-dfn-for]\");\n  if (dfn !== parent && parent?.dataset.dfnFor) {\n    dfn.dataset.dfnFor = parent.dataset.dfnFor;\n  }\n\n  // Assure that it's data-dfn-for= something.\n  if (!dfn.dataset.dfnFor) {\n    const msg = `Internal slot \"${title}\" must be associated with a WebIDL interface.`;\n    const hint = docLink`Use a ${\"[data-dfn-for]\"} attribute to associate this dfn with a WebIDL interface.`;\n    showError(msg, name, { hint, elements: [dfn] });\n  }\n\n  // Don't export internal slots by default, as they are not supposed to be public.\n  if (!dfn.matches(\".export, [data-export]\")) {\n    dfn.dataset.noexport = \"\";\n  }\n\n  // If it ends with a ), then it's method. Attribute otherwise.\n  const derivedType = title.endsWith(\")\") ? \"method\" : \"attribute\";\n  if (!dfn.dataset.dfnType) {\n    return derivedType;\n  }\n\n  // Perform validation on the dfn's type.\n  const allowedSlotTypes = [\"attribute\", \"method\"];\n  const { dfnType } = dfn.dataset;\n  if (!allowedSlotTypes.includes(dfnType) || derivedType !== dfnType) {\n    const msg = docLink`Invalid ${\"[data-dfn-type]\"} attribute on internal slot.`;\n    const prettyTypes = codedJoinOr(allowedSlotTypes, {\n      quotes: true,\n    });\n    const hint = `The only allowed types are: ${prettyTypes}. The slot \"${title}\" seems to be a \"${toMDCode(\n      derivedType\n    )}\"?`;\n    showError(msg, name, { hint, elements: [dfn] });\n    return \"dfn\";\n  }\n  return dfnType;\n}\n","// @ts-check\n// Adds automatic pluralization to dfns\n// If a dfn is referenced as it's plural (and plural of `data-lt` attributes),\n//   plurals of it are automatically added to `data-plurals`.\n// The linking is done in core/link-to-dfn\n\nimport { norm as normalize } from \"./utils.js\";\nimport { pluralize } from \"./import-maps.js\";\nimport { registerDefinition } from \"./dfn-map.js\";\n\nexport const name = \"core/pluralize\";\n\nexport function run(conf) {\n  if (!conf.pluralize) return;\n\n  const pluralizeDfn = getPluralizer();\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const dfns = document.querySelectorAll(\n    \"dfn:not([data-lt-no-plural]):not([data-lt-noDefault])\"\n  );\n  dfns.forEach(dfn => {\n    const terms = [dfn.textContent];\n    if (dfn.dataset.lt) terms.push(...dfn.dataset.lt.split(\"|\"));\n    if (dfn.dataset.localLt) {\n      terms.push(...dfn.dataset.localLt.split(\"|\"));\n    }\n\n    const plurals = new Set(terms.map(pluralizeDfn).filter(plural => plural));\n\n    if (plurals.size) {\n      const userDefinedPlurals = dfn.dataset.plurals\n        ? dfn.dataset.plurals.split(\"|\")\n        : [];\n      const uniquePlurals = [...new Set([...userDefinedPlurals, ...plurals])];\n      dfn.dataset.plurals = uniquePlurals.join(\"|\");\n      registerDefinition(dfn, uniquePlurals);\n    }\n  });\n}\n\nfunction getPluralizer() {\n  /** @type {Set<string>} */\n  const links = new Set();\n  /** @type {NodeListOf<HTMLAnchorElement>} */\n  const reflessAnchors = document.querySelectorAll(\"a:not([href])\");\n  reflessAnchors.forEach(el => {\n    const normText = normalize(el.textContent).toLowerCase();\n    links.add(normText);\n    if (el.dataset.lt) {\n      links.add(el.dataset.lt);\n    }\n  });\n\n  /** @type {Set<string>} */\n  const dfnTexts = new Set();\n  /** @type {NodeListOf<HTMLElement>} */\n  const dfns = document.querySelectorAll(\"dfn:not([data-lt-noDefault])\");\n  dfns.forEach(dfn => {\n    const normText = normalize(dfn.textContent).toLowerCase();\n    dfnTexts.add(normText);\n    if (dfn.dataset.lt) {\n      dfn.dataset.lt.split(\"|\").forEach(lt => dfnTexts.add(lt));\n    }\n    if (dfn.dataset.localLt) {\n      dfn.dataset.localLt.split(\"|\").forEach(lt => dfnTexts.add(lt));\n    }\n  });\n\n  // returns pluralized/singularized term if `text` needs pluralization/singularization, \"\" otherwise\n  return function pluralizeDfn(/** @type {string} */ text) {\n    const normText = normalize(text).toLowerCase();\n    const plural = pluralize.isSingular(normText)\n      ? pluralize.plural(normText)\n      : pluralize.singular(normText);\n    return links.has(plural) && !dfnTexts.has(plural) ? plural : \"\";\n  };\n}\n","/* --- EXAMPLES --- */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\nspan.example-title {\n  text-transform: none;\n}\n\n:is(aside,div).example,\ndiv.illegal-example {\n  padding: 0.5em;\n  margin: 1em 0;\n  position: relative;\n  clear: both;\n}\n\ndiv.illegal-example {\n  color: red;\n}\n\ndiv.illegal-example p {\n  color: black;\n}\n\naside.example div.example {\n  border-left-width: 0.1em;\n  border-color: #999;\n  background: #fff;\n}\n`;\n","// @ts-check\n// Module core/examples\n// Manages examples, including marking them up, numbering, inserting the title,\n// and reindenting.\n// Examples are any pre element with class \"example\" or \"illegal-example\".\n// When an example is found, it is reported using the \"example\" event. This can\n// be used by a containing shell to extract all examples.\n\nimport { addId, getIntlData } from \"./utils.js\";\nimport css from \"../styles/examples.css.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/examples\";\n\nconst localizationStrings = {\n  en: {\n    example: \"Example\",\n  },\n  nl: {\n    example: \"Voorbeeld\",\n  },\n  es: {\n    example: \"Ejemplo\",\n  },\n  ko: {\n    example: \"예시\",\n  },\n  ja: {\n    example: \"例\",\n  },\n  de: {\n    example: \"Beispiel\",\n  },\n  zh: {\n    example: \"例\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @typedef {object} Report\n * @property {number} number\n * @property {boolean} illegal\n * @property {string} [title]\n * @property {string} [content]\n *\n * @param {HTMLElement} elem\n * @param {number} num\n * @param {Report} report\n */\nfunction makeTitle(elem, num, report) {\n  report.title = elem.title;\n  if (report.title) elem.removeAttribute(\"title\");\n  const number = num > 0 ? ` ${num}` : \"\";\n  const title = report.title\n    ? html`<span class=\"example-title\">: ${report.title}</span>`\n    : \"\";\n  return html`<div class=\"marker\">\n    <a class=\"self-link\">${l10n.example}<bdi>${number}</bdi></a\n    >${title}\n  </div>`;\n}\n\nexport function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const examples = document.querySelectorAll(\n    \"pre.example, pre.illegal-example, aside.example\"\n  );\n  if (!examples.length) return;\n\n  document.head.insertBefore(\n    html`<style>\n      ${css}\n    </style>`,\n    document.querySelector(\"link\")\n  );\n\n  let number = 0;\n  examples.forEach(example => {\n    const illegal = example.classList.contains(\"illegal-example\");\n    /** @type {Report} */\n    const report = {\n      number,\n      illegal,\n    };\n    const { title } = example;\n    if (example.localName === \"aside\") {\n      ++number;\n      const div = makeTitle(example, number, report);\n      example.prepend(div);\n      const id = addId(example, \"example\", title || String(number));\n      const selfLink = div.querySelector(\"a.self-link\");\n      selfLink.href = `#${id}`;\n    } else {\n      const inAside = !!example.closest(\"aside\");\n      if (!inAside) ++number;\n\n      report.content = example.innerHTML;\n\n      // wrap\n      example.classList.remove(\"example\", \"illegal-example\");\n      // relocate the id to the div\n      const id = example.id ? example.id : null;\n      if (id) example.removeAttribute(\"id\");\n      const exampleTitle = makeTitle(example, inAside ? 0 : number, report);\n      const div = html`<div class=\"example\" id=\"${id}\">\n        ${exampleTitle} ${example.cloneNode(true)}\n      </div>`;\n      addId(div, \"example\", title || String(number));\n      const selfLink = div.querySelector(\"a.self-link\");\n      selfLink.href = `#${div.id}`;\n      example.replaceWith(div);\n    }\n  });\n}\n","/* --- ISSUES/NOTES --- */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n.issue-label {\n  text-transform: initial;\n}\n\n.warning > p:first-child {\n  margin-top: 0;\n}\n.warning {\n  padding: 0.5em;\n  border-left-width: 0.5em;\n  border-left-style: solid;\n}\nspan.warning {\n  padding: 0.1em 0.5em 0.15em;\n}\n\n.issue.closed span.issue-number {\n  text-decoration: line-through;\n}\n\n.issue.closed span.issue-number::after {\n  content: \" (Closed)\";\n  font-size: smaller;\n}\n\n.warning {\n  border-color: #f11;\n  border-color: var(--warning-border, #f11);\n  border-width: 0.2em;\n  border-style: solid;\n  background: #fbe9e9;\n  background: var(--warning-bg, #fbe9e9);\n  color: black;\n  color: var(--text, black);\n}\n\n.warning-title:before {\n  content: \"⚠\"; /*U+26A0 WARNING SIGN*/\n  font-size: 1.3em;\n  float: left;\n  padding-right: 0.3em;\n  margin-top: -0.3em;\n}\n\nli.task-list-item {\n  list-style: none;\n}\n\ninput.task-list-item-checkbox {\n  margin: 0 0.35em 0.25em -1.6em;\n  vertical-align: middle;\n}\n\n.issue a.respec-gh-label {\n  padding: 5px;\n  margin: 0 2px 0 2px;\n  font-size: 10px;\n  text-transform: none;\n  text-decoration: none;\n  font-weight: bold;\n  border-radius: 4px;\n  position: relative;\n  bottom: 2px;\n  border: none;\n  display: inline-block;\n}\n`;\n","// @ts-check\n// Module core/issues-notes\n// Manages issues and notes, including marking them up, numbering, inserting the title,\n// and injecting the style sheet.\n// These are elements with classes \"issue\" or \"note\".\n// When an issue or note is found, it is reported using the \"issue\" or \"note\" event. This can\n// be used by a containing shell to extract all of these.\n// Issues are automatically numbered by default, but you can assign them specific numbers (or,\n// despite the name, any arbitrary identifier) using the data-number attribute. Note that as\n// soon as you use one data-number on any issue all the other issues stop being automatically\n// numbered to avoid involuntary clashes.\n// If the configuration has issueBase set to a non-empty string, and issues are\n// manually numbered, a link to the issue is created using issueBase and the issue number\nimport {\n  addId,\n  getIntlData,\n  parents,\n  showError,\n  showWarning,\n} from \"./utils.js\";\nimport css from \"../styles/issues-notes.css.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/issues-notes\";\n\nconst localizationStrings = {\n  en: {\n    editors_note: \"Editor's note\",\n    feature_at_risk: \"(Feature at Risk) Issue\",\n    issue: \"Issue\",\n    issue_summary: \"Issue summary\",\n    no_issues_in_spec: \"There are no issues listed in this specification.\",\n    note: \"Note\",\n    warning: \"Warning\",\n  },\n  ja: {\n    note: \"注\",\n    editors_note: \"編者注\",\n    feature_at_risk: \"(変更の可能性のある機能) Issue\",\n    issue: \"Issue\",\n    issue_summary: \"Issue の要約\",\n    no_issues_in_spec: \"この仕様には未解決の issues は含まれていません．\",\n    warning: \"警告\",\n  },\n  nl: {\n    editors_note: \"Redactionele noot\",\n    issue_summary: \"Lijst met issues\",\n    no_issues_in_spec: \"Er zijn geen problemen vermeld in deze specificatie.\",\n    note: \"Noot\",\n    warning: \"Waarschuwing\",\n  },\n  es: {\n    editors_note: \"Nota de editor\",\n    issue: \"Cuestión\",\n    issue_summary: \"Resumen de la cuestión\",\n    note: \"Nota\",\n    no_issues_in_spec: \"No hay problemas enumerados en esta especificación.\",\n    warning: \"Aviso\",\n  },\n  de: {\n    editors_note: \"Redaktioneller Hinweis\",\n    issue: \"Frage\",\n    issue_summary: \"Offene Fragen\",\n    no_issues_in_spec: \"Diese Spezifikation enthält keine offenen Fragen.\",\n    note: \"Hinweis\",\n    warning: \"Warnung\",\n  },\n  zh: {\n    editors_note: \"编者注\",\n    feature_at_risk: \"（有可能变动的特性）Issue\",\n    issue: \"Issue\",\n    issue_summary: \"Issue 总结\",\n    no_issues_in_spec: \"本规范中未列出任何 issue。\",\n    note: \"注\",\n    warning: \"警告\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @typedef {object} Report\n * @property {string} type\n * @property {boolean} inline\n * @property {number} number\n * @property {string} title\n\n * @typedef {object} GitHubLabel\n * @property {string} color\n * @property {string} name\n *\n * @typedef {object} GitHubIssue\n * @property {string} title\n * @property {string} state\n * @property {string} bodyHTML\n * @property {GitHubLabel[]} labels\n\n * @param {HTMLElement[]} ins\n * @param {Map<string, GitHubIssue>} ghIssues\n * @param {*} conf\n */\nfunction handleIssues(ins, ghIssues, conf) {\n  const getIssueNumber = createIssueNumberGetter();\n  const issueList = document.createElement(\"ul\");\n  ins.forEach(inno => {\n    const { type, displayType, isFeatureAtRisk } = getIssueType(inno);\n    const isIssue = type === \"issue\";\n    const isInline = inno.localName === \"span\";\n    const { number: dataNum } = inno.dataset;\n    const report = {\n      type,\n      inline: isInline,\n      title: inno.title,\n      number: getIssueNumber(inno),\n    };\n    // wrap\n    if (!isInline) {\n      const cssClass = isFeatureAtRisk ? `${type} atrisk` : type;\n      const ariaRole = type === \"note\" ? \"note\" : null;\n      const div = html`<div class=\"${cssClass}\" role=\"${ariaRole}\"></div>`;\n      const title = document.createElement(\"span\");\n      const className = `${type}-title marker`;\n      // prettier-ignore\n      const titleParent = html`<div role=\"heading\" class=\"${className}\">${title}</div>`;\n      addId(titleParent, \"h\", type);\n      let text = displayType;\n      if (inno.id) {\n        div.id = inno.id;\n        inno.removeAttribute(\"id\");\n      } else {\n        addId(\n          div,\n          \"issue-container\",\n          report.number ? `number-${report.number}` : \"\"\n        );\n      }\n      /** @type {GitHubIssue} */\n      let ghIssue;\n      if (isIssue) {\n        if (report.number !== undefined) {\n          text += ` ${report.number}`;\n        }\n        if (inno.dataset.hasOwnProperty(\"number\")) {\n          const link = linkToIssueTracker(dataNum, conf, { isFeatureAtRisk });\n          if (link) {\n            title.before(link);\n            link.append(title);\n          }\n          title.classList.add(\"issue-number\");\n          ghIssue = ghIssues.get(dataNum);\n          if (!ghIssue) {\n            const msg = `Failed to fetch issue number ${dataNum}.`;\n            showWarning(msg, name);\n          }\n          if (ghIssue && !report.title) {\n            report.title = ghIssue.title;\n          }\n        }\n        issueList.append(createIssueSummaryEntry(l10n.issue, report, div.id));\n      }\n      title.textContent = text;\n      if (report.title) {\n        inno.removeAttribute(\"title\");\n        const { repoURL = \"\" } = conf.github || {};\n        const labels = ghIssue ? ghIssue.labels : [];\n        if (ghIssue && ghIssue.state === \"CLOSED\") {\n          div.classList.add(\"closed\");\n        }\n        titleParent.append(createLabelsGroup(labels, report.title, repoURL));\n      }\n      /** @type {HTMLElement | DocumentFragment} */\n      let body = inno;\n      inno.replaceWith(div);\n      body.classList.remove(type);\n      body.removeAttribute(\"data-number\");\n      if (ghIssue && !body.innerHTML.trim()) {\n        body = document\n          .createRange()\n          .createContextualFragment(ghIssue.bodyHTML);\n      }\n      div.append(titleParent, body);\n      const level = parents(titleParent, \"section\").length + 2;\n      titleParent.setAttribute(\"aria-level\", level);\n    }\n  });\n  makeIssueSectionSummary(issueList);\n}\n\nfunction createIssueNumberGetter() {\n  if (document.querySelector(\".issue[data-number]\")) {\n    return element => {\n      if (element.dataset.number) {\n        return Number(element.dataset.number);\n      }\n    };\n  }\n\n  let issueNumber = 0;\n  return element => {\n    if (element.classList.contains(\"issue\") && element.localName !== \"span\") {\n      return ++issueNumber;\n    }\n  };\n}\n\n/**\n * @typedef {object} IssueType\n * @property {string} type\n * @property {string} displayType\n * @property {boolean} isFeatureAtRisk\n *\n * @param {HTMLElement} inno\n * @return {IssueType}\n */\nfunction getIssueType(inno) {\n  const isIssue = inno.classList.contains(\"issue\");\n  const isWarning = inno.classList.contains(\"warning\");\n  const isEdNote = inno.classList.contains(\"ednote\");\n  const isFeatureAtRisk = inno.classList.contains(\"atrisk\");\n  const type = isIssue\n    ? \"issue\"\n    : isWarning\n      ? \"warning\"\n      : isEdNote\n        ? \"ednote\"\n        : \"note\";\n  const displayType = isIssue\n    ? isFeatureAtRisk\n      ? l10n.feature_at_risk\n      : l10n.issue\n    : isWarning\n      ? l10n.warning\n      : isEdNote\n        ? l10n.editors_note\n        : l10n.note;\n  return { type, displayType, isFeatureAtRisk };\n}\n\n/**\n * @param {string} dataNum\n * @param {*} conf\n */\nfunction linkToIssueTracker(dataNum, conf, { isFeatureAtRisk = false } = {}) {\n  // Set issueBase to cause issue to be linked to the external issue tracker\n  if (!isFeatureAtRisk && conf.issueBase) {\n    return html`<a href=\"${conf.issueBase + dataNum}\" />`;\n  } else if (isFeatureAtRisk && conf.atRiskBase) {\n    return html`<a href=\"${conf.atRiskBase + dataNum}\" />`;\n  }\n}\n\n/**\n * @param {string} l10nIssue\n * @param {Report} report\n */\nfunction createIssueSummaryEntry(l10nIssue, report, id) {\n  const issueNumberText = `${l10nIssue}${\n    report.number ? ` ${report.number}` : \"\"\n  }`;\n  const title = report.title\n    ? html`<span style=\"text-transform: none\">: ${report.title}</span>`\n    : \"\";\n  return html`<li><a href=\"${`#${id}`}\">${issueNumberText}</a>${title}</li>`;\n}\n\n/**\n *\n * @param {HTMLUListElement} issueList\n */\nfunction makeIssueSectionSummary(issueList) {\n  const issueSummaryElement = document.getElementById(\"issue-summary\");\n  if (!issueSummaryElement) return;\n  const heading = issueSummaryElement.querySelector(\"h2, h3, h4, h5, h6\");\n\n  issueList.hasChildNodes()\n    ? issueSummaryElement.append(issueList)\n    : issueSummaryElement.append(html`<p>${l10n.no_issues_in_spec}</p>`);\n  if (\n    !heading ||\n    (heading && heading !== issueSummaryElement.firstElementChild)\n  ) {\n    issueSummaryElement.insertAdjacentHTML(\n      \"afterbegin\",\n      `<h1>${l10n.issue_summary}</h1>`\n    );\n  }\n}\n\n/**\n * @param {GitHubLabel[]} labels\n * @param {string} title\n * @param {string} repoURL\n */\nfunction createLabelsGroup(labels, title, repoURL) {\n  const labelsGroup = labels.map(label => createLabel(label, repoURL));\n  if (labelsGroup.length) {\n    labelsGroup.unshift(document.createTextNode(\" \"));\n  }\n  return html`<span class=\"issue-label\">: ${title}${labelsGroup}</span>`;\n}\n\n/**\n * Based on https://stackoverflow.com/a/3943023\n * See https://www.w3.org/WAI/WCAG21/Techniques/general/G18.html#tests\n * @param {string} bg background color as a hex value without '#'\n */\nfunction textColorFromBgColor(bg) {\n  const [r, g, b] = [bg.slice(0, 2), bg.slice(2, 4), bg.slice(4, 6)];\n  const [R, G, B] = [r, g, b]\n    .map(c => parseInt(c, 16) / 255)\n    .map(c => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4));\n  const L = 0.2126 * R + 0.7152 * G + 0.0722 * B;\n  return L > 0.179 ? \"#000\" : \"#fff\";\n}\n\n/**\n * @param {GitHubLabel} label\n * @param {string} repoURL\n */\nfunction createLabel(label, repoURL) {\n  const { color: bgColor, name } = label;\n  const issuesURL = new URL(\"./issues/\", repoURL);\n  issuesURL.searchParams.set(\"q\", `is:issue is:open label:\"${label.name}\"`);\n  const color = textColorFromBgColor(bgColor);\n  const style = `background-color: #${bgColor}; color: ${color}`;\n  const ariaLabel = `GitHub label: ${name}`;\n  return html` <a\n    class=\"respec-gh-label\"\n    style=\"${style}\"\n    href=\"${issuesURL.href}\"\n    aria-label=\"${ariaLabel}\"\n    >${name}</a\n  >`;\n}\n\n/**\n * @returns {Promise<Map<string, GitHubIssue>>}\n */\nasync function fetchAndStoreGithubIssues(github) {\n  if (!github || !github.apiBase) {\n    return new Map();\n  }\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const specIssues = document.querySelectorAll(\".issue[data-number]\");\n  const issueNumbers = [...specIssues]\n    .map(elem => Number.parseInt(elem.dataset.number, 10))\n    .filter(issueNumber => issueNumber);\n\n  if (!issueNumbers.length) {\n    return new Map();\n  }\n\n  const url = new URL(\"issues\", `${github.apiBase}/${github.fullName}/`);\n  url.searchParams.set(\"issues\", issueNumbers.join(\",\"));\n\n  const response = await fetch(url.href);\n  if (!response.ok) {\n    const msg = `Error fetching issues from GitHub. (HTTP Status ${response.status}).`;\n    showError(msg, name);\n    return new Map();\n  }\n\n  /** @type {{ [issueNumber: string]: GitHubIssue }} */\n  const issues = await response.json();\n  return new Map(Object.entries(issues));\n}\n\nexport async function run(conf) {\n  const query = \".issue, .note, .warning, .ednote\";\n  /** @type {NodeListOf<HTMLElement>} */\n  const allEls = document.querySelectorAll(query);\n\n  const issuesAndNotes = Array.from(allEls).filter(itm => {\n    // Removes any elements that are not HTML Elements (e.g., SVG nodes)\n    return itm instanceof HTMLElement;\n  });\n\n  if (!issuesAndNotes.length) {\n    return; // nothing to do.\n  }\n  const ghIssues = await fetchAndStoreGithubIssues(conf.github);\n  const { head: headElem } = document;\n  headElem.insertBefore(\n    html`<style>\n      ${css}\n    </style>`,\n    headElem.querySelector(\"link\")\n  );\n  handleIssues(issuesAndNotes, ghIssues, conf);\n  const ednotes = document.querySelectorAll(\".ednote\");\n  ednotes.forEach(ednote => {\n    ednote.classList.remove(\"ednote\");\n    ednote.classList.add(\"note\");\n  });\n}\n","// @ts-check\nimport { addId } from \"../core/utils.js\";\nimport { pub } from \"../core/pubsubhub.js\";\nimport { toHTMLElement } from \"./utils.js\";\n\nexport const name = \"1edtech/issues-notes\";\n\n/**\n * NOTE: No longer required. core/issues-notes.js handles note|warning|issue\n * just fine even if no github connection. Leaving this in the ims-default\n * profile to support existing markup.\n *\n * Handles admonitions, adding a top bar and a11y attrs\n * Types currently supported:\n * aside.note\n * aside.ednote\n * aside.warning\n * aside.issue (will yield error if status is final, warning if CF)\n *\n * Alternate syntax is div.aside.note|warning|issue\n *\n * This replaces core/issues-notes.js, which has github features we can't utilize\n * because of our non-open repos.\n *\n * @param {*} conf respecConfig\n */\nexport async function run(conf) {\n  // check and warn for issue admons in late process stages\n  const issues = document.body.querySelectorAll(\"aside.issue, div.aside.issue\");\n  if (issues.length > 0) {\n    if (conf.specStatus == \"Final Release\") {\n      pub(\n        \"error\",\n        \"Issue asides must not be present when the status is 'Final Release'\"\n      );\n    } else if (conf.specStatus == \"Candidate Final\") {\n      pub(\n        \"warn\",\n        \"Issue asides should not be present when the status is 'Candidate Final'\"\n      );\n    }\n  }\n\n  // prep the output element\n  /** @type {NodeListOf<HTMLElement>} */\n  const admons = document.body.querySelectorAll(\n    \"aside.note, aside.ednote, aside.warning, aside.issue, \" +\n      \" div.aside.note, div.aside.ednote div.aside.warning, div.aside.issue\"\n  );\n\n  admons.forEach(aside => {\n    const type = getAdmonType(aside);\n    aside.setAttribute(\"role\", \"note\");\n    aside.classList.add(\"admonition\");\n    if (!aside.hasAttribute(\"id\")) {\n      addId(aside);\n    }\n    const topBar = toHTMLElement(`<div class='admon-top'>${type}</div>`);\n    topBar.classList.add(`${type}-title`);\n    aside.insertAdjacentElement(\"afterbegin\", topBar);\n  });\n}\n\n/**\n * Returns the admonition type as a string based on the classList.\n * The three known types are \"note\", \"warning\", and \"issue\". If none\n * of those are present, returns \"info\".\n *\n * @param { * } aside the element to inspect\n * @returns { string } the admonition type as a string\n */\nfunction getAdmonType(aside) {\n  if (aside.classList.contains(\"note\")) {\n    return \"note\";\n  } else if (aside.classList.contains(\"warning\")) {\n    return \"warning\";\n  } else if (aside.classList.contains(\"issue\")) {\n    return \"issue\";\n  }\n  return \"info\";\n}\n","// @ts-check\n// Module core/best-practices\n// Handles the marking up of best practices, and can generate a summary of all of them.\n// The summary is generated if there is a section in the document with ID bp-summary.\n// Best practices are marked up with span.practicelab.\nimport { addId, getIntlData, makeSafeCopy, showWarning } from \"./utils.js\";\nimport { lang as defaultLang } from \"../core/l10n.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/best-practices\";\n\nconst localizationStrings = {\n  en: {\n    best_practice: \"Best Practice \",\n  },\n  ja: {\n    best_practice: \"最良実施例 \",\n  },\n  de: {\n    best_practice: \"Musterbeispiel \",\n  },\n  zh: {\n    best_practice: \"最佳实践 \",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\nconst lang = defaultLang in localizationStrings ? defaultLang : \"en\";\n\nexport function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const bps = document.querySelectorAll(\".practicelab\");\n  const bpSummary = document.getElementById(\"bp-summary\");\n  const summaryItems = bpSummary ? document.createElement(\"ul\") : null;\n  [...bps].forEach((bp, num) => {\n    const id = addId(bp, \"bp\");\n    const localizedBpName = html`<a class=\"marker self-link\" href=\"${`#${id}`}\"\n      ><bdi lang=\"${lang}\">${l10n.best_practice}${num + 1}</bdi></a\n    >`;\n\n    // Make the summary items, if we have a summary\n    if (summaryItems) {\n      const li = html`<li>${localizedBpName}: ${makeSafeCopy(bp)}</li>`;\n      summaryItems.appendChild(li);\n    }\n\n    const container = bp.closest(\"div\");\n    if (!container) {\n      // This is just an inline best practice...\n      bp.classList.add(\"advisement\");\n      return;\n    }\n\n    // Make the advisement box\n    container.classList.add(\"advisement\");\n    const title = html`${localizedBpName.cloneNode(true)}: ${bp}`;\n    container.prepend(...title.childNodes);\n  });\n  if (bps.length) {\n    if (bpSummary) {\n      bpSummary.appendChild(html`<h1>Best Practices Summary</h1>`);\n      bpSummary.appendChild(summaryItems);\n    }\n  } else if (bpSummary) {\n    const msg = `Using best practices summary (#bp-summary) but no best practices found.`;\n    showWarning(msg, name);\n    bpSummary.remove();\n  }\n}\n","// @ts-check\n// Module core/figure\n// Handles figures in the document.\n// Adds width and height to images, if they are missing.\n// Generates a Table of Figures wherever there is a #tof element.\n\nimport {\n  addId,\n  getIntlData,\n  getPreviousSections,\n  renameElement,\n  showWarning,\n  wrapInner,\n} from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/figures\";\n\nconst localizationStrings = {\n  en: {\n    list_of_figures: \"List of Figures\",\n    fig: \"Figure \",\n  },\n  ja: {\n    fig: \"図 \",\n    list_of_figures: \"図のリスト\",\n  },\n  ko: {\n    fig: \"그림 \",\n    list_of_figures: \"그림 목록\",\n  },\n  nl: {\n    fig: \"Figuur \",\n    list_of_figures: \"Lijst met figuren\",\n  },\n  es: {\n    fig: \"Figura \",\n    list_of_figures: \"Lista de Figuras\",\n  },\n  zh: {\n    fig: \"图 \",\n    list_of_figures: \"规范中包含的图\",\n  },\n  de: {\n    fig: \"Abbildung\",\n    list_of_figures: \"Abbildungsverzeichnis\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run() {\n  const tof = collectFigures();\n\n  // Create a Table of Figures if a section with id 'tof' exists.\n  const tofElement = document.getElementById(\"tof\");\n  if (tof.length && tofElement) {\n    decorateTableOfFigures(tofElement);\n    tofElement.append(\n      html`<h1>${l10n.list_of_figures}</h1>`,\n      html`<ul class=\"tof\">\n        ${tof}\n      </ul>`\n    );\n  }\n}\n\n/**\n * process all figures\n */\nfunction collectFigures() {\n  /** @type {HTMLElement[]} */\n  const tof = [];\n  document.querySelectorAll(\"figure\").forEach((fig, i) => {\n    const caption = fig.querySelector(\"figcaption\");\n\n    if (caption) {\n      decorateFigure(fig, caption, i);\n      tof.push(getTableOfFiguresListItem(fig.id, caption));\n    } else {\n      const msg = \"Found a `<figure>` without a `<figcaption>`.\";\n      showWarning(msg, name, { elements: [fig] });\n    }\n  });\n  return tof;\n}\n\n/**\n * @param {HTMLElement} figure\n * @param {HTMLElement} caption\n * @param {number} i\n */\nfunction decorateFigure(figure, caption, i) {\n  const title = caption.textContent;\n  addId(figure, \"fig\", title);\n  // set proper caption title\n  wrapInner(caption, html`<span class=\"fig-title\"></span>`);\n  caption.prepend(\n    html`<a class=\"self-link\" href=\"#${figure.id}\"\n      >${l10n.fig}<bdi class=\"figno\">${i + 1}</bdi></a\n    >`,\n    \" \"\n  );\n}\n\n/**\n * @param {string} figureId\n * @param {HTMLElement} caption\n * @return {HTMLElement}\n */\nfunction getTableOfFiguresListItem(figureId, caption) {\n  const tofCaption = caption.cloneNode(true);\n  tofCaption.querySelectorAll(\"a\").forEach(anchor => {\n    renameElement(anchor, \"span\").removeAttribute(\"href\");\n  });\n  return html`<li class=\"tofline\">\n    <a class=\"tocxref\" href=\"${`#${figureId}`}\">${tofCaption.childNodes}</a>\n  </li>`;\n}\n\n/**\n * if it has a parent section, don't touch it\n * if it has a class of appendix or introductory, don't touch it\n * if all the preceding section siblings are introductory, make it introductory\n * if there is a preceding section sibling which is an appendix, make it appendix\n * @param {Element} tofElement\n */\nfunction decorateTableOfFigures(tofElement) {\n  if (\n    tofElement.classList.contains(\"appendix\") ||\n    tofElement.classList.contains(\"introductory\") ||\n    tofElement.closest(\"section\")\n  ) {\n    return;\n  }\n\n  const previousSections = getPreviousSections(tofElement);\n  if (previousSections.every(sec => sec.classList.contains(\"introductory\"))) {\n    tofElement.classList.add(\"introductory\");\n  } else if (previousSections.some(sec => sec.classList.contains(\"appendix\"))) {\n    tofElement.classList.add(\"appendix\");\n  }\n}\n","// @ts-check\n/*\n * Fetch the online ims-biblio json and append the data to conf.localBiblio.\n * This approach allows us to reuse the W3C biblio logic & implementation untouched.\n * The effect is that we have three levels of sources for biblio entries:\n * - localBiblio\n * - ims-biblio on purl.imsglobal.org\n * - specref.org\n *\n * Note: Run before core/biblio\n */\n\nimport { showWarning } from \"../core/utils.js\";\n\nexport const name = \"1edtech/biblio\";\n\n/**\n * @param {*} conf\n */\nexport async function run(conf) {\n  let imsBiblioURL = \"https://purl.imsglobal.org/spec/ims-biblio.json\";\n  if (conf.overrideIMSbiblioLocation) {\n    imsBiblioURL = conf.overrideIMSbiblioLocation;\n  }\n\n  if (!conf.disableFetchIMSbiblio) {\n    // console.log(\"fetching ims biblio...\");\n    try {\n      const response = await fetch(imsBiblioURL, { mode: \"cors\" });\n      if (!response.ok) {\n        throw new Error(response.statusText);\n      }\n      const json = await response.json();\n      // TODO invalid json should be caught here\n      // JSON.stringify(conf.localBiblio) --> throws error?\n      // TODO we might want to worry about dupes and precedence\n      conf.localBiblio = Object.assign(conf.localBiblio || {}, json);\n    } catch (error) {\n      showWarning(\"Failed to fetch IMS biblio data: \" + error.toString(), name);\n    }\n  }\n}\n","// @ts-check\n/**\n * Module core/data-cite\n *\n * Allows citing other specifications using anchor elements. Simply add\n * \"data-cite\" and key of the specification.\n *\n * This module links elements that have `data-cite` attributes by converting\n * `data-cite` to `href` attributes. `data-cite` attributes are added to markup\n * directly by the author as well as via other modules like core/xref.\n *\n * @module core/data-cite\n */\n\nimport { biblio, resolveRef, updateFromNetwork } from \"./biblio.js\";\nimport {\n  refTypeFromContext,\n  showError,\n  showWarning,\n  wrapInner,\n} from \"./utils.js\";\nimport { sub } from \"./pubsubhub.js\";\nexport const name = \"core/data-cite\";\n\n/**\n * An arbitrary constant value used as an alias to the current spec's shortname. It\n * exists to simplify code as passing `conf.shortName` everywhere gets clumsy.\n * @type {string}\n */\nexport const THIS_SPEC = \"__SPEC__\";\n\n/**\n * Gets the link properties for the given citation details.\n * @param {CiteDetails} citeDetails - The citation details.\n * @returns {Promise<LinkProps|null>} The link properties or null if not found.\n */\nasync function getLinkProps(citeDetails) {\n  const { key, frag, path, href: canonicalHref } = citeDetails;\n  let href = \"\";\n  let title = \"\";\n\n  // This is just referring to this document\n  if (key === THIS_SPEC) {\n    href = document.location.href;\n  } else {\n    // Let's go look it up in spec ref...\n    const entry = await resolveRef(key);\n    if (!entry) {\n      return null;\n    }\n    href = entry.href;\n    title = entry.title;\n  }\n\n  if (canonicalHref) {\n    // Xref gave us a canonical link, so let's use that.\n    href = canonicalHref;\n  } else {\n    if (path) {\n      // See: https://github.com/speced/respec/issues/1856#issuecomment-429579475\n      const relPath = path.startsWith(\"/\") ? `.${path}` : path;\n      href = new URL(relPath, href).href;\n    }\n    if (frag) {\n      href = new URL(frag, href).href;\n    }\n  }\n\n  return { href, title };\n}\n\n/**\n * Links the given element with the provided link properties and citation details.\n * @param {HTMLElement} elem - The element to link.\n * @param {LinkProps} linkProps - The link properties.\n * @param {CiteDetails} citeDetails - The citation details.\n */\nfunction linkElem(elem, linkProps, citeDetails) {\n  const { href, title } = linkProps;\n  const wrapInCiteEl = !citeDetails.path && !citeDetails.frag;\n\n  switch (elem.localName) {\n    case \"a\": {\n      const el = /** @type {HTMLAnchorElement} */ (elem);\n      if (el.textContent === \"\" && el.dataset.lt !== \"the-empty-string\") {\n        el.textContent = title;\n      }\n      el.href = href;\n      if (wrapInCiteEl) {\n        const cite = document.createElement(\"cite\");\n        el.replaceWith(cite);\n        cite.append(el);\n      }\n      break;\n    }\n    case \"dfn\": {\n      const anchor = document.createElement(\"a\");\n      anchor.href = href;\n      anchor.dataset.cite = citeDetails.key;\n      anchor.dataset.citePath = citeDetails.path;\n      anchor.dataset.citeFrag = citeDetails.frag;\n      if (!elem.textContent) {\n        anchor.textContent = title;\n        elem.append(anchor);\n      } else {\n        wrapInner(elem, anchor);\n      }\n      if (wrapInCiteEl) {\n        const cite = document.createElement(\"cite\");\n        cite.append(anchor);\n        elem.append(cite);\n      }\n      if (\"export\" in elem.dataset) {\n        const msg = \"Exporting a linked external definition is not allowed.\";\n        const hint = \"Please remove the `data-export` attribute.\";\n        showError(msg, name, { hint, elements: [elem] });\n        delete elem.dataset.export;\n      }\n      elem.classList.add(\"externalDFN\");\n      elem.dataset.noExport = \"\";\n      break;\n    }\n  }\n}\n\n/**\n * @param {string} component\n * @return {(key: string) => string}\n */\nfunction makeComponentFinder(component) {\n  return key => {\n    const position = key.search(component);\n    return position !== -1 ? key.substring(position) : \"\";\n  };\n}\n\nconst findFrag = makeComponentFinder(\"#\");\nconst findPath = makeComponentFinder(\"/\");\n\n/**\n * Converts the given raw key to citation details.\n * @param {HTMLElement} elem - The element containing the citation details.\n * @returns {CiteDetails} The citation details.\n */\nexport function toCiteDetails(elem) {\n  const { dataset } = elem;\n  const { cite: rawKey, citeFrag, citePath, citeHref } = dataset;\n\n  // The key is a fragment, resolve using the shortName as key\n  if (rawKey.startsWith(\"#\") && !citeFrag) {\n    // Closes data-cite not starting with \"#\"\n    /** @type {HTMLElement} */\n    const closest = elem.parentElement.closest(\n      `[data-cite]:not([data-cite^=\"#\"])`\n    );\n    const { key: parentKey, isNormative: closestIsNormative } = closest\n      ? toCiteDetails(closest)\n      : { key: THIS_SPEC, isNormative: false };\n    dataset.cite = closestIsNormative ? parentKey : `?${parentKey}`;\n    dataset.citeFrag = rawKey.replace(\"#\", \"\"); // the key is acting as a fragment\n    return toCiteDetails(elem);\n  }\n\n  const frag = citeFrag ? `#${citeFrag}` : findFrag(rawKey);\n  const path = citePath || findPath(rawKey).split(\"#\")[0]; // path is always before \"#\"\n  const { type } = refTypeFromContext(rawKey, elem);\n  const isNormative = type === \"normative\";\n  // key is before \"/\" and \"#\" but after \"!\" or \"?\" (e.g., ?key/path#frag)\n  const hasPrecedingMark = /^[?|!]/.test(rawKey);\n  const key = rawKey.split(/[/|#]/)[0].substring(Number(hasPrecedingMark));\n  const details = { key, isNormative, frag, path, href: citeHref };\n  return details;\n}\n\n/**\n * Runs the data-cite processing on elements with the data-cite attribute.\n */\nexport async function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\n    \"dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])\"\n  );\n\n  await updateBiblio([...elems]);\n\n  for (const elem of elems) {\n    const originalKey = elem.dataset.cite;\n    const citeDetails = toCiteDetails(elem);\n    const linkProps = await getLinkProps(citeDetails);\n    if (linkProps) {\n      linkElem(elem, linkProps, citeDetails);\n    } else {\n      const msg = `Couldn't find a match for \"${originalKey}\"`;\n      if (elem.dataset.matchedText) {\n        elem.textContent = elem.dataset.matchedText;\n      }\n      showWarning(msg, name, { elements: [elem] });\n    }\n  }\n\n  sub(\"beforesave\", cleanup);\n}\n\n/**\n * Fetches and updates `biblio` with entries corresponding to the given elements.\n * @param {HTMLElement[]} elems - The elements requiring biblio entries.\n */\nasync function updateBiblio(elems) {\n  const promisesForBibEntries = elems.map(toCiteDetails).map(async entry => {\n    const result = await resolveRef(entry.key);\n    return { entry, result };\n  });\n  const bibEntries = await Promise.all(promisesForBibEntries);\n\n  const missingBibEntries = bibEntries\n    .filter(({ result }) => result === null)\n    .map(({ entry: { key } }) => key);\n\n  const newEntries = await updateFromNetwork(missingBibEntries);\n  if (newEntries) {\n    Object.assign(biblio, newEntries);\n  }\n}\n\n/**\n * Cleans up the data-cite attributes from the document.\n * @param {Document} doc - The document to cleanup.\n */\nfunction cleanup(doc) {\n  const attrToRemove = [\"data-cite\", \"data-cite-frag\", \"data-cite-path\"];\n  const elems = doc.querySelectorAll(\"a[data-cite], dfn[data-cite]\");\n  elems.forEach(elem =>\n    attrToRemove.forEach(attr => elem.removeAttribute(attr))\n  );\n}\n","// @ts-check\n// Module core/link-to-dfn\n// Gives definitions in definitionMap IDs and links <a> tags\n// to the matching definitions.\nimport {\n  CaseInsensitiveMap,\n  addId,\n  getIntlData,\n  getLinkTargets,\n  showError,\n  showWarning,\n  wrapInner,\n} from \"./utils.js\";\nimport { THIS_SPEC, toCiteDetails } from \"./data-cite.js\";\nimport { definitionMap } from \"./dfn-map.js\";\n\nexport const name = \"core/link-to-dfn\";\n\n/** @type {HTMLElement[]} */\nexport const possibleExternalLinks = [];\n\nconst localizationStrings = {\n  en: {\n    /**\n     * @param {string} title\n     */\n    duplicateMsg(title) {\n      return `Duplicate definition(s) of '${title}'`;\n    },\n    duplicateTitle: \"This is defined more than once in the document.\",\n  },\n  ja: {\n    /**\n     * @param {string} title\n     */\n    duplicateMsg(title) {\n      return `'${title}' の重複定義`;\n    },\n    duplicateTitle: \"この文書内で複数回定義されています．\",\n  },\n  de: {\n    /**\n     * @param {string} title\n     */\n    duplicateMsg(title) {\n      return `Mehrfache Definition von '${title}'`;\n    },\n    duplicateTitle:\n      \"Das Dokument enthält mehrere Definitionen dieses Eintrags.\",\n  },\n  zh: {\n    /**\n     * @param {string} title\n     */\n    duplicateMsg(title) {\n      return `'${title}' 的重复定义`;\n    },\n    duplicateTitle: \"在文档中有重复的定义。\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run(conf) {\n  const titleToDfns = mapTitleToDfns();\n  /** @type {HTMLAnchorElement[]} */\n  const badLinks = [];\n\n  /** @type {NodeListOf<HTMLAnchorElement>} */\n  const localAnchors = document.querySelectorAll(\n    \"a[data-cite=''], a:not([href]):not([data-cite]):not(.logo):not(.externalDFN)\"\n  );\n  for (const anchor of localAnchors) {\n    if (!anchor.dataset?.linkType && anchor.dataset?.xrefType) {\n      possibleExternalLinks.push(anchor);\n      continue;\n    }\n    const dfn = findMatchingDfn(anchor, titleToDfns);\n    if (dfn) {\n      const foundLocalMatch = processAnchor(anchor, dfn, titleToDfns);\n      if (!foundLocalMatch) {\n        possibleExternalLinks.push(anchor);\n      }\n    } else {\n      if (anchor.dataset.cite === \"\") {\n        badLinks.push(anchor);\n      } else {\n        possibleExternalLinks.push(anchor);\n      }\n    }\n  }\n\n  showLinkingError(badLinks);\n\n  // This needs to run before core/xref adds its data-cite and updates\n  // conf.normativeReferences and conf.informativeReferences.\n  updateReferences(conf);\n\n  if (!conf.xref) {\n    showLinkingError(possibleExternalLinks);\n  }\n}\n\nfunction mapTitleToDfns() {\n  /** @type {CaseInsensitiveMap<Map<string, Map<string, HTMLElement>>>} */\n  const titleToDfns = new CaseInsensitiveMap();\n  for (const key of definitionMap.keys()) {\n    const { result, duplicates } = collectDfns(key);\n    titleToDfns.set(key, result);\n    if (duplicates.length > 0) {\n      showError(l10n.duplicateMsg(key), name, {\n        title: l10n.duplicateTitle,\n        elements: duplicates,\n      });\n    }\n  }\n  return titleToDfns;\n}\n\n/**\n * @param {string} title\n */\nfunction collectDfns(title) {\n  /** @type {Map<string, Map<string, HTMLElement>>} */\n  const result = new Map();\n  const duplicates = [];\n  for (const dfn of definitionMap.get(title)) {\n    const { dfnType = \"dfn\" } = dfn.dataset;\n    const dfnFors = dfn.dataset.dfnFor?.split(\",\").map(s => s.trim()) ?? [\"\"];\n    for (const dfnFor of dfnFors) {\n      // check for potential duplicate definition\n      if (result.has(dfnFor) && result.get(dfnFor).has(dfnType)) {\n        const oldDfn = result.get(dfnFor).get(dfnType);\n        // We want <dfn> definitions to take precedence over\n        // definitions from WebIDL. WebIDL definitions wind\n        // up as <span>s instead of <dfn>.\n        const oldIsDfn = oldDfn.localName === \"dfn\";\n        const newIsDfn = dfn.localName === \"dfn\";\n        const isSameDfnType = dfnType === (oldDfn.dataset.dfnType || \"dfn\");\n        const isSameDfnFor =\n          (!dfnFor && !oldDfn.dataset.dfnFor) ||\n          oldDfn.dataset.dfnFor\n            ?.split(\",\")\n            .map(s => s.trim())\n            .includes(dfnFor);\n        if (oldIsDfn && newIsDfn && isSameDfnType && isSameDfnFor) {\n          duplicates.push(dfn);\n          continue;\n        }\n      }\n      if (!result.has(dfnFor)) {\n        result.set(dfnFor, new Map());\n      }\n      result.get(dfnFor).set(dfnType, dfn);\n      // We register non-dfn terms under the generic \"idl\" type as well\n      // for backwards-compatibility\n      if (\"idl\" in dfn.dataset || dfnType !== \"dfn\") {\n        result.get(dfnFor).set(\"idl\", dfn);\n      }\n      addId(dfn, \"dfn\", title);\n    }\n  }\n\n  return { result, duplicates };\n}\n\n/**\n * Find a potentially matching <dfn> for given anchor.\n * @param {HTMLAnchorElement} anchor\n * @param {ReturnType<typeof mapTitleToDfns>} titleToDfns\n */\nfunction findMatchingDfn(anchor, titleToDfns) {\n  const linkTargets = getLinkTargets(anchor);\n  const target = linkTargets.find(\n    target =>\n      titleToDfns.has(target.title) &&\n      titleToDfns.get(target.title).has(target.for)\n  );\n  if (!target) return;\n\n  const dfnsByType = titleToDfns.get(target.title).get(target.for);\n  const { linkType } = anchor.dataset;\n  if (linkType) {\n    for (const type of linkType.split(\"|\")) {\n      if (dfnsByType.get(type)) {\n        return dfnsByType.get(type);\n      }\n    }\n    return dfnsByType.get(\"dfn\");\n  } else {\n    // Assumption: if it's for something, it's more likely IDL.\n    const type = target.for ? \"idl\" : \"dfn\";\n    return dfnsByType.get(type) || dfnsByType.get(\"idl\");\n  }\n}\n\n/**\n * @param {HTMLAnchorElement} anchor\n * @param {HTMLElement} dfn\n * @param {ReturnType<typeof mapTitleToDfns>} titleToDfns\n */\nfunction processAnchor(anchor, dfn, titleToDfns) {\n  let noLocalMatch = false;\n  const { linkFor } = anchor.dataset;\n  const { dfnFor } = dfn.dataset;\n  if (dfn.dataset.cite) {\n    anchor.dataset.cite = dfn.dataset.cite;\n  } else if (\n    linkFor &&\n    !titleToDfns.get(linkFor) &&\n    dfnFor &&\n    !dfnFor\n      .split(\",\")\n      .map(s => s.trim())\n      .includes(linkFor)\n  ) {\n    noLocalMatch = true;\n  } else if (dfn.classList.contains(\"externalDFN\")) {\n    // data-lt[0] serves as unique id for the dfn which this element references\n    const lt = dfn.dataset.lt ? dfn.dataset.lt.split(\"|\") : [];\n    anchor.dataset.lt = lt[0] || dfn.textContent;\n    noLocalMatch = true;\n  } else if (anchor.dataset.idl !== \"partial\") {\n    anchor.href = `#${dfn.id}`;\n    anchor.classList.add(\"internalDFN\");\n  } else {\n    noLocalMatch = true;\n  }\n  if (!anchor.hasAttribute(\"data-link-type\")) {\n    anchor.dataset.linkType = \"idl\" in dfn.dataset ? \"idl\" : \"dfn\";\n  }\n  if (isCode(dfn)) {\n    wrapAsCode(anchor, dfn);\n  }\n  return !noLocalMatch;\n}\n\n/**\n * Check if a definition is a code\n * @param {HTMLElement} dfn a definition\n */\nfunction isCode(dfn) {\n  if (dfn.closest(\"code,pre\")) {\n    return true;\n  }\n  // Note that childNodes.length === 1 excludes\n  // definitions that have either other text, or other\n  // whitespace, inside the <dfn>.\n  if (dfn.childNodes.length !== 1) {\n    return false;\n  }\n  const [first] = /** @type {NodeListOf<HTMLElement>} */ (dfn.childNodes);\n  return first.localName === \"code\";\n}\n\n/**\n * Wrap links by <code>.\n * @param {HTMLAnchorElement} anchor a link\n * @param {HTMLElement} dfn a definition\n */\nfunction wrapAsCode(anchor, dfn) {\n  // only add code to IDL when the definition matches\n  const term = anchor.textContent.trim();\n  const isIDL = dfn.dataset.hasOwnProperty(\"idl\");\n  const needsCode = shouldWrapByCode(anchor) && shouldWrapByCode(dfn, term);\n  if (!isIDL || needsCode) {\n    wrapInner(anchor, document.createElement(\"code\"));\n  }\n}\n\n/**\n * @param {HTMLElement} elem\n * @param {string} term\n */\nfunction shouldWrapByCode(elem, term = \"\") {\n  switch (elem.localName) {\n    case \"a\":\n      if (!elem.querySelector(\"code\")) {\n        return true;\n      }\n      break;\n    default: {\n      const { dataset } = elem;\n      if (elem.textContent.trim() === term) {\n        return true;\n      } else if (dataset.title === term) {\n        return true;\n      } else if (dataset.lt || dataset.localLt) {\n        const terms = [];\n        if (dataset.lt) {\n          terms.push(...dataset.lt.split(\"|\"));\n        }\n        if (dataset.localLt) {\n          terms.push(...dataset.localLt.split(\"|\"));\n        }\n        return terms.includes(term);\n      }\n    }\n  }\n  return false;\n}\n\nfunction showLinkingError(elems) {\n  elems.forEach(elem => {\n    const msg = `Found linkless \\`<a>\\` element with text \"${elem.textContent}\" but no matching \\`<dfn>\\``;\n    const title = \"Linking error: not matching `<dfn>`\";\n    showWarning(msg, name, { title, elements: [elem] });\n  });\n}\n\n/**\n * Update references due to `data-cite` attributes.\n *\n * Also, make sure self-citing doesn't cause current document getting added to\n * bibliographic references section.\n * @param {Conf} conf\n */\nfunction updateReferences(conf) {\n  const { shortName = \"\" } = conf;\n  // Match shortName in a data-cite (with optional leading ?!), while skipping shortName as prefix.\n  // https://regex101.com/r/rsZyIJ/5\n  const regex = new RegExp(String.raw`^([?!])?${shortName}\\b([^-])`, \"i\");\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\n    \"dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])\"\n  );\n  for (const elem of elems) {\n    elem.dataset.cite = elem.dataset.cite.replace(regex, `$1${THIS_SPEC}$2`);\n    const { key, isNormative } = toCiteDetails(elem);\n    if (key === THIS_SPEC) continue;\n\n    if (!isNormative && !conf.normativeReferences.has(key)) {\n      conf.informativeReferences.add(key);\n    } else {\n      conf.normativeReferences.add(key);\n      conf.informativeReferences.delete(key);\n    }\n  }\n}\n","// @ts-check\nimport { API_URL } from \"./xref.js\";\nimport { idb } from \"./import-maps.js\";\n\n/**\n * @typedef {import('core/xref').RequestEntry} RequestEntry\n * @typedef {import('core/xref').Response} Response\n * @typedef {import('core/xref').SearchResultEntry} SearchResultEntry\n * @typedef {import('core/xref').XrefDatabase} XrefDatabase\n */\n\nconst STORE_NAME = \"xrefs\";\nconst VERSION_CHECK_WAIT = 5 * 60 * 1000; // 5 min\n\nasync function getIdbCache() {\n  /** @type {XrefDatabase} */\n  const db = await idb.openDB(\"xref\", 2, {\n    upgrade(db) {\n      [...db.objectStoreNames].forEach(s => db.deleteObjectStore(s));\n      const store = db.createObjectStore(STORE_NAME, { keyPath: \"query.id\" });\n      store.createIndex(\"byTerm\", \"query.term\", { unique: false });\n    },\n  });\n  return db;\n}\n\n/** @param {RequestEntry[]} queries */\nexport async function resolveXrefCache(queries) {\n  /** @type {Map<string, SearchResultEntry[]>} */\n  const cachedData = new Map();\n\n  const bustCache = await shouldBustCache();\n  if (bustCache) {\n    await clearXrefData();\n    return cachedData;\n  }\n\n  const requiredKeySet = new Set(queries.map(query => query.id));\n  try {\n    const cache = await getIdbCache();\n    let cursor = await cache.transaction(STORE_NAME).store.openCursor();\n    while (cursor) {\n      if (requiredKeySet.has(cursor.key)) {\n        cachedData.set(cursor.key, cursor.value.result);\n      }\n      cursor = await cursor.continue();\n    }\n  } catch (err) {\n    console.error(err);\n  }\n  return cachedData;\n}\n\n/**\n * Get last updated timestamp from server and bust cache based on that. This\n * way, we prevent dirty/erroneous/stale data being kept on a client (which is\n * possible if we use a `MAX_AGE` based caching strategy).\n */\nasync function shouldBustCache() {\n  const key = \"XREF:LAST_VERSION_CHECK\";\n  const lastChecked = parseInt(localStorage.getItem(key), 10);\n  const now = Date.now();\n\n  if (!lastChecked) {\n    localStorage.setItem(key, now.toString());\n    return false;\n  }\n  if (now - lastChecked < VERSION_CHECK_WAIT) {\n    // avoid checking network for any data update if old cache \"fresh\"\n    return false;\n  }\n\n  const url = new URL(\"meta/version\", API_URL).href;\n  const res = await fetch(url);\n  if (!res.ok) return false;\n  const lastUpdated = await res.text();\n  localStorage.setItem(key, now.toString());\n  return parseInt(lastUpdated, 10) > lastChecked;\n}\n\n/**\n * @param {RequestEntry[]} queries\n * @param {Map<string, SearchResultEntry[]>} results\n */\nexport async function cacheXrefData(queries, results) {\n  try {\n    const cache = await getIdbCache();\n    const tx = cache.transaction(STORE_NAME, \"readwrite\");\n    for (const query of queries) {\n      const result = results.get(query.id);\n      tx.objectStore(STORE_NAME).add({ query, result });\n    }\n    await tx.done;\n  } catch (e) {\n    console.error(e);\n  }\n}\n\nexport async function clearXrefData() {\n  try {\n    await getIdbCache().then(db => db.clear(STORE_NAME));\n  } catch (e) {\n    console.error(e);\n  }\n}\n","// @ts-check\n/**\n * @module core/xref\n *\n * Automatically adds external references.\n *\n * Searches for the terms which do not have a local definition at xref API and\n * for each query, adds `data-cite` attributes to respective elements.\n * `core/data-cite` later converts these data-cite attributes to actual links.\n * https://github.com/speced/respec/issues/1662\n */\n/**\n * @typedef {import('core/xref').RequestEntry} RequestEntry\n * @typedef {import('core/xref').Response} Response\n * @typedef {import('core/xref').SearchResultEntry} SearchResultEntry\n * @typedef {Map<string, { elems: HTMLElement[], results: SearchResultEntry[], query: RequestEntry }>} ErrorCollection\n * @typedef {{ ambiguous: ErrorCollection, notFound: ErrorCollection }} Errors\n */\nimport { cacheXrefData, resolveXrefCache } from \"./xref-db.js\";\nimport {\n  createResourceHint,\n  docLink,\n  joinAnd,\n  joinOr,\n  nonNormativeSelector,\n  norm as normalize,\n  showError,\n} from \"./utils.js\";\nimport { possibleExternalLinks } from \"./link-to-dfn.js\";\nimport { sub } from \"./pubsubhub.js\";\n\nexport const name = \"core/xref\";\n\nconst profiles = {\n  \"web-platform\": [\"HTML\", \"INFRA\", \"URL\", \"WEBIDL\", \"DOM\", \"FETCH\"],\n};\n\nexport const API_URL = \"https://respec.org/xref/\";\n\n/** @type {{ term: string; spec: string; element: HTMLElement }[]} */\nexport const informativeRefsInNormative = [];\n\nif (\n  !document.querySelector(\"link[rel='preconnect'][href='https://respec.org']\")\n) {\n  const link = createResourceHint({\n    hint: \"preconnect\",\n    href: \"https://respec.org\",\n  });\n  document.head.appendChild(link);\n}\n\n/**\n * @param {Object} conf respecConfig\n */\nexport async function run(conf) {\n  if (!conf.xref) {\n    return;\n  }\n\n  const xref = normalizeConfig(conf.xref);\n  if (xref.specs) {\n    const bodyCite = document.body.dataset.cite\n      ? document.body.dataset.cite.split(/\\s+/)\n      : [];\n    document.body.dataset.cite = bodyCite.concat(xref.specs).join(\" \");\n  }\n\n  const elems = possibleExternalLinks.concat(findExplicitExternalLinks());\n  if (!elems.length) return;\n\n  /** @type {RequestEntry[]} */\n  const queryKeys = [];\n  for (const elem of elems) {\n    const entry = getRequestEntry(elem);\n    entry.id = await objectHash(entry);\n    queryKeys.push(entry);\n  }\n\n  const data = await getData(queryKeys, xref.url);\n  addDataCiteToTerms(elems, queryKeys, data, conf);\n\n  sub(\"beforesave\", cleanup);\n}\n\n/**\n * Find additional references that need to be looked up externally.\n * Examples: a[data-cite=\"spec\"], dfn[data-cite=\"spec\"], dfn.externalDFN\n */\nfunction findExplicitExternalLinks() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const links = document.querySelectorAll(\n    \":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])\"\n  );\n  /** @type {NodeListOf<HTMLElement>} */\n  const externalDFNs = document.querySelectorAll(\"dfn.externalDFN\");\n  return [...links]\n    .filter(el => {\n      // ignore empties\n      if (el.textContent.trim() === \"\") return false;\n      /** @type {HTMLElement} */\n      const closest = el.closest(\"[data-cite]\");\n      return !closest || closest.dataset.cite !== \"\";\n    })\n    .concat(...externalDFNs);\n}\n\n/**\n * converts conf.xref to object with url and spec properties\n */\nfunction normalizeConfig(xref) {\n  const defaults = {\n    url: new URL(\"search/\", API_URL).href,\n    specs: null,\n  };\n\n  const config = Object.assign({}, defaults);\n\n  const type = Array.isArray(xref) ? \"array\" : typeof xref;\n  switch (type) {\n    case \"boolean\":\n      // using defaults already, as above\n      break;\n    case \"string\":\n      if (xref.toLowerCase() in profiles) {\n        Object.assign(config, { specs: profiles[xref.toLowerCase()] });\n      } else {\n        invalidProfileError(xref);\n      }\n      break;\n    case \"array\":\n      Object.assign(config, { specs: xref });\n      break;\n    case \"object\":\n      Object.assign(config, xref);\n      if (xref.profile) {\n        const profile = xref.profile.toLowerCase();\n        if (profile in profiles) {\n          const specs = (xref.specs ?? []).concat(profiles[profile]);\n          Object.assign(config, { specs });\n        } else {\n          invalidProfileError(xref.profile);\n        }\n      }\n      break;\n    default: {\n      const msg = `Invalid value for \\`xref\\` configuration option. Received: \"${xref}\".`;\n      showError(msg, name);\n    }\n  }\n  return config;\n\n  function invalidProfileError(profile) {\n    const supportedProfiles = joinOr(Object.keys(profiles), s => `\"${s}\"`);\n    const msg =\n      `Invalid profile \"${profile}\" in \\`respecConfig.xref\\`. ` +\n      `Please use one of the supported profiles: ${supportedProfiles}.`;\n    showError(msg, name);\n  }\n}\n\n/**\n * get xref API request entry (term and context) for given xref element\n * @param {HTMLElement} elem\n */\nfunction getRequestEntry(elem) {\n  const isIDL = \"xrefType\" in elem.dataset;\n\n  let term = getTermFromElement(elem);\n  if (!isIDL) term = term.toLowerCase();\n\n  const specs = getSpecContext(elem);\n  const types = getTypeContext(elem, isIDL);\n  const forContext = getForContext(elem, isIDL);\n\n  return {\n    // Add an empty `id` to ensure the shape of object returned stays same when\n    // actual `id` is added later (minor perf optimization, also makes\n    // TypeScript happy).\n    id: \"\",\n    term,\n    types,\n    ...(specs.length && { specs }),\n    ...(typeof forContext === \"string\" && { for: forContext }),\n  };\n}\n\n/** @param {HTMLElement} elem */\nexport function getTermFromElement(elem) {\n  const { lt: linkingText } = elem.dataset;\n  let term = linkingText ? linkingText.split(\"|\", 1)[0] : elem.textContent;\n  term = normalize(term);\n  return term === \"the-empty-string\" ? \"\" : term;\n}\n\n/**\n * Get spec context as a fallback chain, where each level (sub-array) represents\n * decreasing priority.\n * @param {HTMLElement} elem\n */\nfunction getSpecContext(elem) {\n  /** @type {string[][]} */\n  const specs = [];\n\n  /** @type {HTMLElement} */\n  let dataciteElem = elem.closest(\"[data-cite]\");\n\n  // Traverse up towards the root element, adding levels of lower priority specs\n  while (dataciteElem) {\n    const cite = dataciteElem.dataset.cite.toLowerCase().replace(/[!?]/g, \"\");\n    const cites = cite.split(/\\s+/).filter(s => s);\n    if (cites.length) {\n      specs.push(cites);\n    }\n    if (dataciteElem === elem) break;\n    dataciteElem = dataciteElem.parentElement.closest(\"[data-cite]\");\n  }\n\n  // If element itself contains data-cite, we don't take inline context into\n  // account. The inline bibref context has lowest priority, if available.\n  if (dataciteElem !== elem) {\n    const closestSection = elem.closest(\"section\");\n    /** @type {Iterable<HTMLElement>} */\n    const bibrefs = closestSection\n      ? closestSection.querySelectorAll(\"a.bibref\")\n      : [];\n    const inlineRefs = [...bibrefs].map(el => el.textContent.toLowerCase());\n    if (inlineRefs.length) {\n      specs.push(inlineRefs);\n    }\n  }\n\n  const uniqueSpecContext = dedupeSpecContext(specs);\n  return uniqueSpecContext;\n}\n\n/**\n * If we already have a spec in a higher priority level (closer to element) of\n * fallback chain, skip it from low priority levels, to prevent duplication.\n * @param {string[][]} specs\n * */\nfunction dedupeSpecContext(specs) {\n  /** @type {string[][]} */\n  const unique = [];\n  for (const level of specs) {\n    const higherPriority = unique[unique.length - 1] || [];\n    const uniqueSpecs = [...new Set(level)].filter(\n      spec => !higherPriority.includes(spec)\n    );\n    unique.push(uniqueSpecs.sort());\n  }\n  return unique;\n}\n\n/**\n * @param {HTMLElement} elem\n * @param {boolean} isIDL\n */\nfunction getForContext(elem, isIDL) {\n  if (elem.dataset.xrefFor) {\n    return normalize(elem.dataset.xrefFor);\n  }\n\n  if (isIDL) {\n    /** @type {HTMLElement} */\n    const dataXrefForElem = elem.closest(\"[data-xref-for]\");\n    if (dataXrefForElem) {\n      return normalize(dataXrefForElem.dataset.xrefFor);\n    }\n  }\n\n  return null;\n}\n\n/**\n * @param {HTMLElement} elem\n * @param {boolean} isIDL\n */\nfunction getTypeContext(elem, isIDL) {\n  if (isIDL) {\n    if (elem.dataset.xrefType) {\n      return elem.dataset.xrefType.split(\"|\");\n    }\n    return [\"_IDL_\"];\n  }\n\n  return [\"_CONCEPT_\"];\n}\n\n/**\n * @param {RequestEntry[]} queryKeys\n * @param {string} apiUrl\n * @returns {Promise<Map<string, SearchResultEntry[]>>}\n */\nasync function getData(queryKeys, apiUrl) {\n  const uniqueIds = new Set();\n  const uniqueQueryKeys = queryKeys.filter(key => {\n    return uniqueIds.has(key.id) ? false : uniqueIds.add(key.id) && true;\n  });\n\n  const resultsFromCache = await resolveXrefCache(uniqueQueryKeys);\n\n  const termsToLook = uniqueQueryKeys.filter(\n    key => !resultsFromCache.get(key.id)\n  );\n  const fetchedResults = await fetchFromNetwork(termsToLook, apiUrl);\n  if (fetchedResults.size) {\n    // add data to cache\n    await cacheXrefData(uniqueQueryKeys, fetchedResults);\n  }\n\n  return new Map([...resultsFromCache, ...fetchedResults]);\n}\n\n/**\n * @param {RequestEntry[]} queries\n * @param {string} url\n * @returns {Promise<Map<string, SearchResultEntry[]>>}\n */\nasync function fetchFromNetwork(queries, url) {\n  if (!queries.length) return new Map();\n\n  const options = {\n    method: \"POST\",\n    body: JSON.stringify({ queries }),\n    headers: {\n      \"Content-Type\": \"application/json\",\n    },\n  };\n  const response = await fetch(url, options);\n  const json = await response.json();\n  return new Map(json.results.map(({ id, result }) => [id, result]));\n}\n\n/**\n * Figures out from the tree structure if the reference is\n * normative (true) or informative (false).\n * @param {HTMLElement} elem\n */\nfunction isNormative(elem) {\n  const closestNormative = elem.closest(\".normative\");\n  const closestInform = elem.closest(nonNormativeSelector);\n  if (!closestInform || elem === closestNormative) {\n    return true;\n  }\n  return (\n    closestNormative &&\n    closestInform &&\n    closestInform.contains(closestNormative)\n  );\n}\n\n/**\n * adds data-cite attributes to elems for each term for which results are found.\n * adds citations to references section.\n * collects and shows linking errors if any.\n * @param {HTMLElement[]} elems\n * @param {RequestEntry[]} queryKeys\n * @param {Map<string, SearchResultEntry[]>} data\n * @param {any} conf\n */\nfunction addDataCiteToTerms(elems, queryKeys, data, conf) {\n  /** @type {Errors} */\n  const errors = { ambiguous: new Map(), notFound: new Map() };\n\n  for (let i = 0, l = elems.length; i < l; i++) {\n    if (elems[i].closest(\"[data-no-xref]\")) continue;\n\n    const elem = elems[i];\n    const query = queryKeys[i];\n\n    const { id } = query;\n    const results = data.get(id);\n    if (results.length === 1) {\n      addDataCite(elem, query, results[0], conf);\n    } else {\n      const collector = errors[results.length === 0 ? \"notFound\" : \"ambiguous\"];\n      if (!collector.has(id)) {\n        collector.set(id, { elems: [], results, query });\n      }\n      collector.get(id).elems.push(elem);\n    }\n  }\n\n  showErrors(errors);\n}\n\n/**\n * @param {HTMLElement} elem\n * @param {RequestEntry} query\n * @param {SearchResultEntry} result\n * @param {any} conf\n */\nfunction addDataCite(elem, query, result, conf) {\n  const { term, specs = [] } = query;\n  const { uri, shortname, spec, normative, type, for: forContext } = result;\n  // if authored spec context had `result.spec`, use it instead of shortname\n  const cite = specs.flat().includes(spec) ? spec : shortname;\n  // we use this \"partial\" URL to resolve parts of urls...\n  // but sometimes we get lucky and we get an absolute URL from xref\n  // which we can then use in other places (e.g., data-cite.js)\n  const url = new URL(uri, \"https://partial\");\n  const { pathname: citePath } = url;\n  const citeFrag = url.hash.slice(1);\n  const dataset = { cite, citePath, citeFrag, type };\n  if (forContext) dataset.linkFor = forContext[0];\n  if (url.origin && url.origin !== \"https://partial\") {\n    dataset.citeHref = url.href;\n  }\n  Object.assign(elem.dataset, dataset);\n\n  addToReferences(elem, cite, normative, term, conf);\n}\n\n/**\n * add specs for citation (references section)\n * @param {HTMLElement} elem\n * @param {string} cite\n * @param {boolean} normative\n * @param {string} term\n * @param {any} conf\n */\nfunction addToReferences(elem, cite, normative, term, conf) {\n  const isNormRef = isNormative(elem);\n  if (!isNormRef) {\n    // Only add it if not already normative...\n    if (!conf.normativeReferences.has(cite)) {\n      conf.informativeReferences.add(cite);\n    }\n    return;\n  }\n  if (normative) {\n    // If it was originally informative, we move the existing\n    // key to be normative.\n    const existingKey = conf.informativeReferences.has(cite)\n      ? conf.informativeReferences.getCanonicalKey(cite)\n      : cite;\n    conf.normativeReferences.add(existingKey);\n    conf.informativeReferences.delete(existingKey);\n    return;\n  }\n\n  // This is used by the informative-dfn linter\n  informativeRefsInNormative.push({ term, spec: cite, element: elem });\n}\n\n/** @param {Errors} errors */\nfunction showErrors({ ambiguous, notFound }) {\n  const getPrefilledFormURL = (term, query, specs = []) => {\n    const url = new URL(API_URL);\n    url.searchParams.set(\"term\", term);\n    if (query.for) url.searchParams.set(\"for\", query.for);\n    url.searchParams.set(\"types\", query.types.join(\",\"));\n    if (specs.length) url.searchParams.set(\"specs\", specs.join(\",\"));\n    return url.href;\n  };\n\n  const howToFix = (howToCiteURL, originalTerm) => {\n    return docLink`[See search matches for \"${originalTerm}\"](${howToCiteURL}) or ${\"[Learn about this error|#error-term-not-found]\"}.`;\n  };\n\n  for (const { query, elems } of notFound.values()) {\n    const specs = query.specs ? [...new Set(query.specs.flat())].sort() : [];\n    const originalTerm = getTermFromElement(elems[0]);\n    const formUrl = getPrefilledFormURL(originalTerm, query);\n    const specsString = joinAnd(specs, s => `**[${s}]**`);\n    const hint = howToFix(formUrl, originalTerm);\n    const forParent = query.for ? `, for **\"${query.for}\"**, ` : \"\";\n    const msg = `Couldn't find \"**${originalTerm}**\"${forParent} in this document or other cited documents: ${specsString}.`;\n    const title = \"No matching definition found.\";\n    showError(msg, name, { title, elements: elems, hint });\n  }\n\n  for (const { query, elems, results } of ambiguous.values()) {\n    const specs = [...new Set(results.map(entry => entry.shortname))].sort();\n    const specsString = joinAnd(specs, s => `**[${s}]**`);\n    const originalTerm = getTermFromElement(elems[0]);\n    const formUrl = getPrefilledFormURL(originalTerm, query, specs);\n    const forParent = query.for ? `, for **\"${query.for}\"**, ` : \"\";\n    const moreInfo = howToFix(formUrl, originalTerm);\n    const hint =\n      docLink`To fix, use the ${\"[data-cite]\"} attribute to pick the one you mean from the appropriate specification.` +\n      String.raw` ${moreInfo}`;\n    const msg = `The term \"**${originalTerm}**\"${forParent} is ambiguous because it's defined in ${specsString}.`;\n    const title = \"Definition is ambiguous.\";\n    showError(msg, name, { title, elements: elems, hint });\n  }\n}\n\nfunction objectHash(obj) {\n  const str = JSON.stringify(obj, Object.keys(obj).sort());\n  const buffer = new TextEncoder().encode(str);\n  return crypto.subtle.digest(\"SHA-1\", buffer).then(bufferToHexString);\n}\n\n/** @param {ArrayBuffer} buffer */\nfunction bufferToHexString(buffer) {\n  const byteArray = new Uint8Array(buffer);\n  return [...byteArray].map(v => v.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction cleanup(doc) {\n  const elems = doc.querySelectorAll(\n    \"a[data-xref-for], a[data-xref-type], a[data-link-for]\"\n  );\n  const attrToRemove = [\"data-xref-for\", \"data-xref-type\", \"data-link-for\"];\n  elems.forEach(el => {\n    attrToRemove.forEach(attr => el.removeAttribute(attr));\n  });\n}\n","/*\n@module \"core/dfn-index\"\nExtends and overrides some styles from `base.css`.\n*/\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\nul.index {\n  columns: 30ch;\n  column-gap: 1.5em;\n}\n\nul.index li {\n  list-style: inherit;\n}\n\nul.index li span {\n  color: inherit;\n  cursor: pointer;\n  white-space: normal;\n}\n\n#index-defined-here ul.index li {\n  font-size: 0.9rem;\n}\n\nul.index code {\n  color: inherit;\n}\n\n#index-defined-here .print-only {\n  display: none;\n}\n\n@media print {\n  #index-defined-here .print-only {\n    display: initial;\n  }\n}\n`;\n","// @ts-check\n/**\n * If a `<section id=\"index\">` exists, it is filled by a list of terms defined\n * (locally) by current document and a list of terms referenced (external) by\n * current document.\n */\n\nimport { addId, getIntlData, norm, xmlEscape } from \"./utils.js\";\nimport css from \"../styles/dfn-index.css.js\";\nimport { getTermFromElement } from \"./xref.js\";\nimport { html } from \"./import-maps.js\";\nimport { renderInlineCitation } from \"./render-biblio.js\";\nimport { sub } from \"./pubsubhub.js\";\nimport { toCiteDetails } from \"./data-cite.js\";\n\nexport const name = \"core/dfn-index\";\n\nconst localizationStrings = {\n  en: {\n    heading: \"Index\",\n    headingExternal: \"Terms defined by reference\",\n    headlingLocal: \"Terms defined by this specification\",\n    dfnOf: \"definition of\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n// Terms of these _types_ are wrapped in `<code>`.\nconst CODE_TYPES = new Set([\n  \"attribute\",\n  \"callback\",\n  \"dict-member\",\n  \"dictionary\",\n  \"element-attr\",\n  \"element\",\n  \"enum-value\",\n  \"enum\",\n  \"exception\",\n  \"extended-attribute\",\n  \"interface\",\n  \"method\",\n  \"typedef\",\n]);\n\n/**\n * @typedef {{ term: string, type: string, linkFor: string, elem: HTMLAnchorElement }} Entry\n */\n\nexport function run() {\n  const index = document.querySelector(\"section#index\");\n  if (!index) {\n    // See below...\n    sub(\"toc\", () => {}, { once: true });\n    return;\n  }\n\n  const styleEl = document.createElement(\"style\");\n  styleEl.textContent = css;\n  document.head.appendChild(styleEl);\n\n  index.classList.add(\"appendix\");\n  if (!index.querySelector(\"h2, h1\")) {\n    index.prepend(html`<h1>${l10n.heading}</h1>`);\n  }\n\n  const localTermIndex = html`<section id=\"index-defined-here\">\n    <h3>${l10n.headlingLocal}</h3>\n    ${createLocalTermIndex()}\n  </section>`;\n  index.append(localTermIndex);\n\n  const externalTermIndex = html`<section id=\"index-defined-elsewhere\">\n    <h3>${l10n.headingExternal}</h3>\n    ${createExternalTermIndex()}\n  </section>`;\n  index.append(externalTermIndex);\n  for (const el of externalTermIndex.querySelectorAll(\".index-term\")) {\n    addId(el, \"index-term\");\n  }\n\n  // XXX: This event is used to overcome an edge case with core/structure,\n  // related to a circular dependency in plugin run order. We want\n  // core/structure to run after dfn-index so the #index can be listed in the\n  // TOC, but we also want section numbers in dfn-index. So, we \"split\"\n  // core/dfn-index in two parts, one that runs before core/structure (using\n  // plugin order in profile) and the other (following) after section numbers\n  // are generated in core/structure (this event).\n  sub(\"toc\", appendSectionNumbers, { once: true });\n\n  sub(\"beforesave\", cleanup);\n}\n\nfunction createLocalTermIndex() {\n  const dataSortedByTerm = collectLocalTerms();\n  return html`<ul class=\"index\">\n    ${dataSortedByTerm.map(([term, dfns]) => renderLocalTerm(term, dfns))}\n  </ul>`;\n}\n\nfunction collectLocalTerms() {\n  /** @type {Map<string, HTMLElement[]>} */\n  const data = new Map();\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\"dfn:not([data-cite])\");\n  for (const elem of elems) {\n    if (!elem.id) continue;\n    const text = norm(elem.textContent);\n    const elemsByTerm = data.get(text) || data.set(text, []).get(text);\n    elemsByTerm.push(elem);\n  }\n\n  const dataSortedByTerm = [...data].sort(([a], [b]) =>\n    a.slice(a.search(/\\w/)).localeCompare(b.slice(b.search(/\\w/)))\n  );\n\n  return dataSortedByTerm;\n}\n\n/**\n * @param {string} term\n * @param {HTMLElement[]} dfns\n * @returns {HTMLLIElement}\n */\nfunction renderLocalTerm(term, dfns) {\n  const renderItem = (dfn, text, suffix) => {\n    const href = `#${dfn.id}`;\n    return html`<li data-id=${dfn.id}>\n      <a class=\"index-term\" href=\"${href}\">${{ html: text }}</a> ${suffix\n        ? { html: suffix }\n        : \"\"}\n    </li>`;\n  };\n\n  if (dfns.length === 1) {\n    const dfn = dfns[0];\n    const type = getLocalTermType(dfn);\n    const text = getLocalTermText(dfn, type, term);\n    const suffix = getLocalTermSuffix(dfn, type, term);\n    return renderItem(dfn, text, suffix);\n  }\n  return html`<li>\n    ${term}\n    <ul>\n      ${dfns.map(dfn => {\n        const type = getLocalTermType(dfn);\n        const text = getLocalTermSuffix(dfn, type, term) || l10n.dfnOf;\n        return renderItem(dfn, text);\n      })}\n    </ul>\n  </li>`;\n}\n\n/** @param {HTMLElement} dfn */\nfunction getLocalTermType(dfn) {\n  const ds = dfn.dataset;\n  const type = ds.dfnType || ds.idl || ds.linkType || \"\";\n  switch (type) {\n    case \"\":\n    case \"dfn\":\n      return \"\";\n    default:\n      return type;\n  }\n}\n\n/** @param {HTMLElement} dfn */\nfunction getLocalTermParentContext(dfn) {\n  /** @type {HTMLElement} */\n  const dfnFor = dfn.closest(\"[data-dfn-for]:not([data-dfn-for=''])\");\n  return dfnFor ? dfnFor.dataset.dfnFor : \"\";\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {string} type\n * @param {string} term\n */\nfunction getLocalTermText(dfn, type, term) {\n  let text = term;\n  if (type === \"enum-value\") {\n    text = `\"${text}\"`;\n  }\n  if (CODE_TYPES.has(type) || dfn.dataset.idl || dfn.closest(\"code\")) {\n    text = `<code>${text}</code>`;\n  }\n  return text;\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {string} type\n * @param {string} [term=\"\"]\n */\nfunction getLocalTermSuffix(dfn, type, term = \"\") {\n  if (term.startsWith(\"[[\")) {\n    const parent = getLocalTermParentContext(dfn);\n    return `internal slot for <code>${parent}</code>`;\n  }\n\n  switch (type) {\n    case \"dict-member\":\n    case \"method\":\n    case \"attribute\":\n    case \"enum-value\": {\n      const typeText =\n        type === \"dict-member\" ? \"member\" : type.replace(\"-\", \" \");\n      const parent = getLocalTermParentContext(dfn);\n      return `${typeText} for <code>${parent}</code>`;\n    }\n    case \"interface\":\n    case \"dictionary\":\n    case \"enum\": {\n      return type;\n    }\n    case \"constructor\": {\n      const parent = getLocalTermParentContext(dfn);\n      return `for <code>${parent}</code>`;\n    }\n    default:\n      return \"\";\n  }\n}\n\nfunction appendSectionNumbers() {\n  const getSectionNumber = id => {\n    const dfn = document.getElementById(id);\n    const sectionNumberEl = dfn.closest(\"section\").querySelector(\".secno\");\n    const secNum = `§${sectionNumberEl.textContent.trim()}`;\n    return html`<span class=\"print-only\">${secNum}</span>`;\n  };\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\"#index-defined-here li[data-id]\");\n  elems.forEach(el => el.append(getSectionNumber(el.dataset.id)));\n}\n\nfunction createExternalTermIndex() {\n  const data = collectExternalTerms();\n  const dataSortedBySpec = [...data.entries()].sort(([specA], [specB]) =>\n    specA.localeCompare(specB)\n  );\n  return html`<ul class=\"index\">\n    ${dataSortedBySpec.map(([spec, entries]) => {\n      return html`<li data-spec=\"${spec}\">\n        ${renderInlineCitation(spec)} defines the following:\n        <ul>\n          ${entries\n            .sort((a, b) => a.term.localeCompare(b.term))\n            .map(renderExternalTermEntry)}\n        </ul>\n      </li>`;\n    })}\n  </ul>`;\n}\n\nfunction collectExternalTerms() {\n  /** @type {Set<string>} */\n  const uniqueReferences = new Set();\n  /** @type {Map<string, Entry[]>} spec => entry[] */\n  const data = new Map();\n\n  /** @type {NodeListOf<HTMLAnchorElement>} */\n  const elements = document.querySelectorAll(`a[data-cite]`);\n  for (const elem of elements) {\n    if (!elem.dataset.cite) {\n      continue;\n    }\n    const { cite, citeFrag, xrefType, linkType } = elem.dataset;\n    if (!(xrefType || linkType || cite.includes(\"#\") || citeFrag)) {\n      // Not a reference to a definition\n      continue;\n    }\n    const uniqueID = elem.href;\n    if (uniqueReferences.has(uniqueID)) {\n      continue;\n    }\n\n    const { type, linkFor } = elem.dataset;\n    const term = getTermFromElement(elem);\n    if (!term) {\n      continue; // <a data-cite=\"SPEC\"></a>\n    }\n    const spec = toCiteDetails(elem).key.toUpperCase();\n\n    const entriesBySpec = data.get(spec) || data.set(spec, []).get(spec);\n    entriesBySpec.push({ term, type, linkFor, elem });\n    uniqueReferences.add(uniqueID);\n  }\n\n  return data;\n}\n\n/**\n * @param {Entry} entry\n * @returns {HTMLLIElement}\n */\nfunction renderExternalTermEntry(entry) {\n  const { elem } = entry;\n  const text = getTermText(entry);\n  const el = html`<li>\n    <span class=\"index-term\" data-href=\"${elem.href}\">${{ html: text }}</span>\n  </li>`;\n  return el;\n}\n\n// Terms of these _types_ are suffixed with their type info.\nconst TYPED_TYPES = new Map([\n  [\"attribute\", \"attribute\"],\n  [\"element-attr\", \"attribute\"],\n  [\"element\", \"element\"],\n  [\"enum\", \"enum\"],\n  [\"exception\", \"exception\"],\n  [\"extended-attribute\", \"extended attribute\"],\n  [\"interface\", \"interface\"],\n]);\n\n// These _terms_ have type suffix \"type\".\nconst TYPE_TERMS = new Set([\n  // Following are primitive types as per WebIDL spec:\n  \"boolean\",\n  \"byte\",\n  \"octet\",\n  \"short\",\n  \"unsigned short\",\n  \"long\",\n  \"unsigned long\",\n  \"long long\",\n  \"unsigned long long\",\n  \"float\",\n  \"unrestricted float\",\n  \"double\",\n  \"unrestricted double\",\n  // Following are not primitive types, but aren't interfaces either.\n  \"undefined\",\n  \"any\",\n  \"object\",\n  \"symbol\",\n]);\n\n/** @param {Entry} entry */\nfunction getTermText(entry) {\n  const { term, type, linkFor } = entry;\n  let text = xmlEscape(term);\n\n  if (CODE_TYPES.has(type)) {\n    if (type === \"extended-attribute\") {\n      text = `[${text}]`;\n    }\n    text = `<code>${text}</code>`;\n  }\n\n  const typeSuffix = TYPE_TERMS.has(term) ? \"type\" : TYPED_TYPES.get(type);\n  if (typeSuffix) {\n    text += ` ${typeSuffix}`;\n  }\n\n  if (linkFor) {\n    let linkForText = linkFor;\n    if (!/\\s/.test(linkFor)) {\n      // If linkFor is a single word, highlight it.\n      linkForText = `<code>${linkForText}</code>`;\n    }\n    if (type === \"element-attr\") {\n      linkForText += \" element\";\n    }\n    text += ` (for ${linkForText})`;\n  }\n\n  return text;\n}\n\n/** @param {Document} doc */\nfunction cleanup(doc) {\n  doc\n    .querySelectorAll(\"#index-defined-elsewhere li[data-spec]\")\n    .forEach(el => el.removeAttribute(\"data-spec\"));\n\n  doc\n    .querySelectorAll(\"#index-defined-here li[data-id]\")\n    .forEach(el => el.removeAttribute(\"data-id\"));\n}\n","// @ts-check\n\nimport { toHTMLNode } from \"./utils.js\";\nimport { getIntlData } from \"../core/utils.js\";\n\nimport localizationStrings from \"./translations/contrib.js\";\nconst l10n = getIntlData(localizationStrings);\n\nexport const name = \"1edtech/contrib\";\n\nexport async function run(conf) {\n  if (!conf.contributors) return;\n\n  if (conf.specType !== \"errata\") {\n    const useRoles = hasRoles(conf.contributors);\n    const contrib = toHTMLNode(`<section id='contributors' class=\"appendix\">\n    <h2>${l10n.title}</h2>\n    <p>${l10n.intro}</p>\n    <table class=\"contributors\" title=\"${l10n.title}\"\n      summary=\"${l10n.summary}\">\n      <thead>\n        <th>${l10n.name}</th>\n        <th>${l10n.organization}</th>\n        ${useRoles ? `<th>${l10n.role}</th>` : ``}\n      </thead>\n      <tbody>\n          ${personsToTableRows(conf.contributors, useRoles)}\n      </tbody>\n    </table>\n    </section>`);\n    document.body.appendChild(contrib);\n  }\n}\n\nfunction personsToTableRows(arr, useRoles) {\n  // use incoming sort\n  let ret = \"\";\n  arr.forEach(entry => {\n    ret += `<tr><td class='name'>${entry.name}</td>`;\n    ret += \"<td class='co'>\";\n    if (entry.company) ret += entry.company;\n    ret += \"</td>\";\n    if (useRoles) {\n      ret += \"<td class='role'>\";\n      if (entry.role) ret += entry.role;\n      ret += \"</td>\";\n    }\n    ret += \"</tr>\";\n  });\n  return ret;\n}\n\nfunction hasRoles(arr) {\n  let hasRoles = false;\n  arr.forEach(entry => {\n    if (entry.role && entry.role.trim().length > 0) {\n      hasRoles = true;\n    }\n  });\n  return hasRoles;\n}\n","export default {\n  en: {\n    title: \"List of Contributors\",\n    intro: \"The following individuals contributed to the development of this document:\",\n    summary: \"The list of contributors to this work.\",\n    name: \"Name\",\n    organization: \"Organization\",\n    role: \"Role\"\n  },\n  es : {\n    title: \"Lista de Colaboradores\",\n    intro: \"Las siguientes personas contribuyeron al desarrollo de este documento:\",\n    summary: \"La lista de colaboradores de este trabajo.\",\n    name: \"Nombre\",\n    organization: \"Organización\",\n    role: \"Rol\"\n  },\n  ca : {\n    title: \"Llista de Col&middot;laboradors\",\n    intro: \"Les persones següents van contribuir al desenvolupament d'aquest treball:\",\n    summary: \"La llista de col&middot;laboradors d'aquest treball.\",\n    name: \"Nomb\",\n    organization: \"Organització\",\n    role: \"Rol\"\n  }\n};\n","// @ts-check\n// Module core/fix-headers\n// Make sure that all h1-h6 headers (that are first direct children of sections) are actually\n// numbered at the right depth level. This makes it possible to just use any of them (conventionally\n// h2) with the knowledge that the proper depth level will be used\nimport { renameElement } from \"./utils.js\";\n\nexport const name = \"core/fix-headers\";\n\nexport function run() {\n  [...document.querySelectorAll(\"section:not(.introductory)\")]\n    .map(sec => sec.querySelector(\"h1, h2, h3, h4, h5, h6\"))\n    .filter(h => h)\n    .forEach(heading => {\n      const depth = Math.min(getParents(heading, \"section\").length + 1, 6);\n      renameElement(heading, `h${depth}`);\n    });\n}\n\nfunction getParents(el, selector) {\n  const parents = [];\n  while (el != el.ownerDocument.body) {\n    if (el.matches(selector)) parents.push(el);\n    el = el.parentElement;\n  }\n  return parents;\n}\n","// @ts-check\n// Module core/structure\n//  Handles producing the ToC and numbering sections across the document.\n\n// CONFIGURATION:\n//  - noTOC: if set to true, no TOC is generated and sections are not numbered\n//  - lang: can change the generated text (supported: en, fr)\n//  - maxTocLevel: only generate a TOC so many levels deep\n\nimport {\n  addId,\n  getIntlData,\n  parents,\n  renameElement,\n  showError,\n} from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nimport { pub } from \"./pubsubhub.js\";\n\nconst lowerHeaderTags = [\"h2\", \"h3\", \"h4\", \"h5\", \"h6\"];\n\nexport const name = \"core/structure\";\n\nconst localizationStrings = {\n  en: {\n    toc: \"Table of Contents\",\n  },\n  zh: {\n    toc: \"内容大纲\",\n  },\n  ko: {\n    toc: \"목차\",\n  },\n  ja: {\n    toc: \"目次\",\n  },\n  nl: {\n    toc: \"Inhoudsopgave\",\n  },\n  es: {\n    toc: \"Tabla de Contenidos\",\n  },\n  de: {\n    toc: \"Inhaltsverzeichnis\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @typedef {object} SectionInfo\n * @property {string} secno\n * @property {string} title\n *\n * Scans sections and generate ordered list element + ID-to-anchor-content dictionary.\n * @param {Section[]} sections the target element to find child sections\n * @param {number} maxTocLevel\n */\nfunction scanSections(sections, maxTocLevel, { prefix = \"\" } = {}) {\n  let appendixMode = false;\n  let lastNonAppendix = 0;\n  let index = 1;\n  if (prefix.length && !prefix.endsWith(\".\")) {\n    prefix += \".\";\n  }\n  if (sections.length === 0) {\n    return null;\n  }\n  /** @type {HTMLElement} */\n  const ol = html`<ol class=\"toc\"></ol>`;\n  for (const section of sections) {\n    if (section.isAppendix && !prefix && !appendixMode) {\n      lastNonAppendix = index;\n      appendixMode = true;\n    }\n    let secno = section.isIntro\n      ? \"\"\n      : appendixMode\n        ? appendixNumber(index - lastNonAppendix + 1)\n        : prefix + index;\n    const level = secno.split(\".\").length;\n    if (level === 1) {\n      secno += \".\";\n      // if this is a top level item, insert\n      // an OddPage comment so html2ps will correctly\n      // paginate the output\n      section.header.before(document.createComment(\"OddPage\"));\n    }\n\n    if (!section.isIntro) {\n      index += 1;\n      section.header.prepend(html`<bdi class=\"secno\">${secno} </bdi>`);\n    }\n\n    if (level <= maxTocLevel) {\n      const id = section.header.id || section.element.id;\n      const item = createTocListItem(section.header, id);\n      const sub = scanSections(section.subsections, maxTocLevel, {\n        prefix: secno,\n      });\n      if (sub) {\n        item.append(sub);\n      }\n      ol.append(item);\n    }\n  }\n  return ol;\n}\n\n/**\n * Convert a number to spreadsheet like column name.\n * For example, 1=A, 26=Z, 27=AA, 28=AB and so on..\n * @param {number} num\n */\nfunction appendixNumber(num) {\n  let s = \"\";\n  while (num > 0) {\n    num -= 1;\n    s = String.fromCharCode(65 + (num % 26)) + s;\n    num = Math.floor(num / 26);\n  }\n  return s;\n}\n\n/**\n * @typedef {object} Section\n * @property {Element} element\n * @property {Element} header\n * @property {string} title\n * @property {boolean} isIntro\n * @property {boolean} isAppendix\n * @property {Section[]} subsections\n *\n * @param {Element} parent\n */\nfunction getSectionTree(parent) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const sectionElements = parent.querySelectorAll(\":scope > section\");\n  /** @type {Section[]} */\n  const sections = [];\n\n  for (const section of sectionElements) {\n    const noToc = section.classList.contains(\"notoc\");\n    if (!section.children.length || noToc) {\n      continue;\n    }\n    const header = section.children[0];\n    if (!lowerHeaderTags.includes(header.localName)) {\n      continue;\n    }\n    const title = header.textContent;\n    addId(section, null, title);\n    sections.push({\n      element: section,\n      header,\n      title,\n      isIntro: Boolean(section.closest(\".introductory\")),\n      isAppendix: section.classList.contains(\"appendix\"),\n      subsections: getSectionTree(section),\n    });\n  }\n  return sections;\n}\n\n/**\n * @param {Element} header\n * @param {string} id\n */\nfunction createTocListItem(header, id) {\n  const anchor = html`<a href=\"${`#${id}`}\" class=\"tocxref\" />`;\n  anchor.append(...header.cloneNode(true).childNodes);\n  filterHeader(anchor);\n  return html`<li class=\"tocline\">${anchor}</li>`;\n}\n\n/**\n * Replaces any child <a> and <dfn> with <span>.\n * @param {HTMLElement} h\n */\nfunction filterHeader(h) {\n  h.querySelectorAll(\"a\").forEach(anchor => {\n    const span = renameElement(anchor, \"span\");\n    span.className = \"formerLink\";\n    span.removeAttribute(\"href\");\n  });\n  h.querySelectorAll(\"dfn\").forEach(dfn => {\n    const span = renameElement(dfn, \"span\");\n    span.removeAttribute(\"id\");\n  });\n}\n\nexport function run(conf) {\n  if (\"maxTocLevel\" in conf === false) {\n    conf.maxTocLevel = Infinity;\n  }\n\n  renameSectionHeaders();\n\n  // makeTOC\n  if (!conf.noTOC) {\n    skipFromToC();\n    const sectionTree = getSectionTree(document.body);\n    const result = scanSections(sectionTree, conf.maxTocLevel);\n    if (result) {\n      createTableOfContents(result);\n    }\n  }\n\n  // See core/dfn-index\n  pub(\"toc\");\n}\n\nfunction renameSectionHeaders() {\n  const headers = getNonintroductorySectionHeaders();\n  if (!headers.length) {\n    return;\n  }\n  headers.forEach(header => {\n    const depth = Math.min(parents(header, \"section\").length + 1, 6);\n    const h = `h${depth}`;\n    if (header.localName !== h) {\n      renameElement(header, h);\n    }\n  });\n}\n\nfunction getNonintroductorySectionHeaders() {\n  return [\n    ...document.querySelectorAll(\n      \"section:not(.introductory) :is(h1,h2,h3,h4,h5,h6):first-child\"\n    ),\n  ].filter(elem => !elem.closest(\"section.introductory\"));\n}\n\n/**\n * Skip descendent sections from appearing in ToC using data-max-toc.\n */\nfunction skipFromToC() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const sections = document.querySelectorAll(\"section[data-max-toc]\");\n  for (const section of sections) {\n    const maxToc = parseInt(section.dataset.maxToc, 10);\n    if (maxToc < 0 || maxToc > 6 || Number.isNaN(maxToc)) {\n      const msg = \"`data-max-toc` must have a value between 0-6 (inclusive).\";\n      showError(msg, name, { elements: [section] });\n      continue;\n    }\n\n    // `data-max-toc=0` is equivalent to adding a \".notoc\" to current section.\n    if (maxToc === 0) {\n      section.classList.add(\"notoc\");\n      continue;\n    }\n\n    // When `data-max-toc=2`, we skip all \":scope > section > section\" from ToC\n    // i.e., at §1, we will keep §1.1 but not §1.1.1\n    // Similarly, `data-max-toc=1` will keep §1, but not §1.1\n    const sectionToSkipFromToC = section.querySelectorAll(\n      `:scope > ${Array.from({ length: maxToc }, () => \"section\").join(\" > \")}`\n    );\n    for (const el of sectionToSkipFromToC) {\n      el.classList.add(\"notoc\");\n    }\n  }\n}\n\n/**\n * @param {HTMLElement} ol\n */\nfunction createTableOfContents(ol) {\n  if (!ol) {\n    return;\n  }\n  const nav = html`<nav id=\"toc\"></nav>`;\n  const h2 = html`<h2 class=\"introductory\">${l10n.toc}</h2>`;\n  addId(h2);\n  nav.append(h2, ol);\n  const ref =\n    document.getElementById(\"toc\") ||\n    document.getElementById(\"sotd\") ||\n    document.getElementById(\"abstract\");\n  if (ref) {\n    if (ref.id === \"toc\") {\n      ref.replaceWith(nav);\n    } else {\n      ref.after(nav);\n    }\n  }\n\n  const link = html`<p role=\"navigation\" id=\"back-to-top\">\n    <a href=\"#title\"><abbr title=\"Back to Top\">&uarr;</abbr></a>\n  </p>`;\n  document.body.append(link);\n}\n","// @ts-check\n// Module core/informative\n// Mark specific sections as informative, based on CSS\nimport { getIntlData } from \"../core/utils.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/informative\";\n\nconst localizationStrings = {\n  en: {\n    informative: \"This section is non-normative.\",\n  },\n  nl: {\n    informative: \"Dit onderdeel is niet normatief.\",\n  },\n  ko: {\n    informative: \"이 부분은 비규범적입니다.\",\n  },\n  ja: {\n    informative: \"この節は仕様には含まれません．\",\n  },\n  de: {\n    informative: \"Dieser Abschnitt ist nicht normativ.\",\n  },\n  zh: {\n    informative: \"本章节不包含规范性内容。\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run() {\n  Array.from(document.querySelectorAll(\"section.informative\"))\n    .map(informative => informative.querySelector(\"h2, h3, h4, h5, h6\"))\n    .filter(heading => heading)\n    .forEach(heading => {\n      heading.after(html`<p><em>${l10n.informative}</em></p>`);\n    });\n}\n","// @ts-check\n// Module core/id-headers\n// All headings are expected to have an ID, unless their immediate container has one.\n// This is currently in core though it comes from a W3C rule. It may move in the future.\n\nexport const name = \"core/id-headers\";\nimport { addId, getIntlData, norm } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    /**\n     *\n     * @param {\"Appendix\" | \"Section\"} sectionType\n     */\n    permalinkLabel(sectionType, sectionNumber) {\n      let label = `Permalink for${\n        !sectionNumber ? \" this\" : \"\"\n      } ${sectionType}`;\n      if (sectionNumber) {\n        label += ` ${norm(sectionNumber.textContent)}`;\n      }\n      return label;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const headings = document.querySelectorAll(\n    `section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6`\n  );\n  for (const h of headings) {\n    // prefer for ID: heading.id > parentElement.id > newly generated heading.id\n    let id = h.id;\n    if (!id) {\n      addId(h);\n      id = h.parentElement.id || h.id;\n    }\n    if (!conf.addSectionLinks) continue;\n    const label = l10n.permalinkLabel(\n      h.closest(\".appendix\") ? \"Appendix\" : \"Section\",\n      h.querySelector(\":scope > bdi.secno\")\n    );\n    const wrapper = html`<div class=\"header-wrapper\"></div>`;\n    h.replaceWith(wrapper);\n    const selfLink = html`<a\n      href=\"#${id}\"\n      class=\"self-link\"\n      aria-label=\"${label}\"\n    ></a>`;\n    wrapper.append(h, selfLink);\n  }\n}\n","/* container for stats */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n\n.caniuse-stats {\n  display: flex;\n  column-gap: 2em;\n}\n\n.caniuse-group {\n  display: flex;\n  flex: 1;\n  flex-direction: column;\n  justify-content: flex-end;\n  flex-basis: auto;\n}\n\n.caniuse-browsers {\n  display: flex;\n  align-items: baseline;\n  justify-content: space-between;\n  flex-wrap: wrap;\n  margin-top: .2em;\n  column-gap: .4em;\n  border-bottom: 1px solid #ccc;\n  row-gap: .4em;\n  padding-bottom: .4cm;\n}\n\n.caniuse-type {\n  align-self: center;\n  border-top: none;\n  text-transform: capitalize;\n  font-size: .8em;\n  margin-top: -.8em;\n  font-weight: bold;\n}\n\n.caniuse-type span {\n  background-color: var(--bg, white);\n  padding: 0 0.4em;\n}\n\n/* a browser version */\n.caniuse-cell {\n  align-items: center;\n  border-radius: 1cm;\n  color: #fff;\n  display: flex;\n  font-size: 90%;\n  min-width: 1.5cm;\n  padding: .3rem;\n  justify-content: space-evenly;\n  --supported: #2a8436dd;\n  --no-support: #c44230dd;\n  --no-support-alt: #b43b2bdd;\n  --partial: #807301dd;\n  --partial-alt: #746c00dd;\n  --unknown: #757575;\n\n  background: repeating-linear-gradient(\n    var(--caniuse-angle, 45deg),\n    var(--caniuse-bg) 0,\n    var(--caniuse-bg-alt) 1px,\n    var(--caniuse-bg-alt) 0.4em,\n    var(--caniuse-bg) calc(0.25em + 1px),\n    var(--caniuse-bg) 0.75em\n  );\n}\n\nimg.caniuse-browser {\n  filter: drop-shadow(0px 0px .1cm #666666);\n  background: transparent;\n}\n\n.caniuse-cell span.browser-version {\n  margin-left: 0.4em;\n  text-shadow: 0 0 0.1em #fff;\n  font-weight: 100;\n  font-size: .9em;\n}\n\n.caniuse-stats a[href] {\n  white-space: nowrap;\n  align-self: flex-end;\n}\n\n/* supports */\n.caniuse-cell.y {\n  background: var(--supported);\n}\n\n/* no support, disabled by default */\n.caniuse-cell:is(.n,.d) {\n  --caniuse-angle: 45deg;\n  --caniuse-bg: var(--no-support);\n  --caniuse-bg-alt: var(--no-support-alt);\n}\n\n.caniuse-cell.u {\n  background: var(--unknown);\n}\n\n.caniuse-cell.d {\n  --caniuse-angle: 180deg;\n}\n\n/* not supported by default / partial support etc\nsee https://github.com/Fyrd/caniuse/blob/master/CONTRIBUTING.md for stats */\n.caniuse-cell:is(.a,.x,.p) {\n  --caniuse-angle: 90deg;\n  --caniuse-bg: var(--partial);\n  --caniuse-bg-alt: var(--partial-alt);\n}\n\n/* handle case when printing */\n@media print {\n  .caniuse-cell.y::before {\n    content: \"✔️\";\n    padding: 0.5em;\n  }\n\n  .caniuse-cell.n::before {\n    content: \"❌\";\n    padding: 0.5em;\n  }\n\n  .caniuse-cell:is(.a,.d,.p,.x,.u)::before {\n    content: \"⚠️\";\n    padding: 0.5em;\n  }\n}\n`;\n","// @ts-check\n/**\n * Module: \"core/caniuse\"\n * Adds a caniuse support table for a \"feature\" #1238\n * Usage options: https://github.com/speced/respec/wiki/caniuse\n */\nimport { codedJoinAnd, docLink, showError, showWarning } from \"./utils.js\";\nimport { pub, sub } from \"./pubsubhub.js\";\nimport css from \"../styles/caniuse.css.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/caniuse\";\n\nconst API_URL = \"https://respec.org/caniuse/\";\n\nexport const BROWSERS = new Map([\n  [\"and_chr\", { name: \"Android Chrome\", path: \"chrome\", type: \"mobile\" }],\n  [\"and_ff\", { name: \"Android Firefox\", path: \"firefox\", type: \"mobile\" }],\n  [\"and_uc\", { name: \"Android UC\", path: \"uc\", type: \"mobile\" }],\n  [\"chrome\", { name: \"Chrome\", type: \"desktop\" }],\n  [\"edge\", { name: \"Edge\", type: \"desktop\" }],\n  [\"firefox\", { name: \"Firefox\", type: \"desktop\" }],\n  [\"ios_saf\", { name: \"iOS Safari\", path: \"safari-ios\", type: \"mobile\" }],\n  [\"op_mob\", { name: \"Opera Mobile\", path: \"opera\", type: \"mobile\" }],\n  [\"opera\", { name: \"Opera\", type: \"desktop\" }],\n  [\"safari\", { name: \"Safari\", type: \"desktop\" }],\n  [\n    \"samsung\",\n    { name: \"Samsung Internet\", path: \"samsung-internet\", type: \"mobile\" },\n  ],\n]);\n\nconst statToText = new Map([\n  [\"a\", \"almost supported (aka Partial support)\"],\n  [\"d\", \"disabled by default\"],\n  [\"n\", \"no support, or disabled by default\"],\n  [\"p\", \"no support, but has Polyfill\"],\n  [\"u\", \"unknown support\"],\n  [\"x\", \"requires prefix to work\"],\n  [\"y\", \"supported by default\"],\n]);\n\nexport function prepare(conf) {\n  if (!conf.caniuse) {\n    return; // nothing to do.\n  }\n  normalizeCaniuseConf(conf);\n  validateBrowsers(conf);\n  const options = conf.caniuse;\n  if (!options.feature) {\n    return; // no feature to show\n  }\n\n  document.head.appendChild(\n    html`<style\n      id=\"caniuse-stylesheet\"\n      class=\"${options.removeOnSave ? \"removeOnSave\" : \"\"}\"\n    >\n      ${css}\n    </style>`\n  );\n}\n/**\n * @param {string} browser\n * @returns\n */\nfunction getLogoSrc(browser) {\n  const path = BROWSERS.get(browser).path ?? browser;\n  return `https://www.w3.org/assets/logos/browser-logos/${path}/${path}.svg`;\n}\n\nexport async function run(conf) {\n  const options = conf.caniuse;\n  if (!options?.feature) return;\n\n  const featureURL = new URL(options.feature, \"https://caniuse.com/\").href;\n  const headDlElem = document.querySelector(\".head dl\");\n  const contentPromise = fetchStats(conf.caniuse)\n    .then(json => processJson(json, options))\n    .catch(err => handleError(err, options, featureURL));\n  const definitionPair = html`<dt class=\"caniuse-title\">Browser support:</dt>\n    <dd class=\"caniuse-stats\">\n      ${{\n        any: contentPromise,\n        placeholder: \"Fetching data from caniuse.com...\",\n      }}\n    </dd>`;\n  headDlElem.append(...definitionPair.childNodes);\n  await contentPromise;\n  pub(\"amend-user-config\", { caniuse: options.feature });\n  if (options.removeOnSave) {\n    // Will remove the browser support cells.\n    headDlElem\n      .querySelectorAll(\".caniuse-browser\")\n      .forEach(elem => elem.classList.add(\"removeOnSave\"));\n    sub(\"beforesave\", outputDoc => {\n      html.bind(outputDoc.querySelector(\".caniuse-stats\"))`\n        <a href=\"${featureURL}\">caniuse.com</a>`;\n    });\n  }\n}\n\nfunction handleError(err, options, featureURL) {\n  const msg = `Failed to retrieve feature \"${options.feature}\".`;\n  const hint = docLink`Please check the feature key on [caniuse.com](https://caniuse.com) and update ${\"[caniuse]\"}.`;\n  showError(msg, name, { hint });\n  console.error(err);\n  return html`<a href=\"${featureURL}\">caniuse.com</a>`;\n}\n\n/**\n * returns normalized `conf.caniuse` configuration\n * @param {Object} conf   configuration settings\n */\nfunction normalizeCaniuseConf(conf) {\n  const defaultBrowsers = new Set(BROWSERS.keys());\n  defaultBrowsers.delete(\"op_mob\");\n  defaultBrowsers.delete(\"opera\");\n  const DEFAULTS = { removeOnSave: true, browsers: [...defaultBrowsers] };\n  if (typeof conf.caniuse === \"string\") {\n    conf.caniuse = { feature: conf.caniuse, ...DEFAULTS };\n    return;\n  }\n  conf.caniuse = { ...DEFAULTS, ...conf.caniuse };\n}\n\nfunction validateBrowsers({ caniuse }) {\n  const { browsers } = caniuse;\n  const invalidBrowsers = browsers.filter(browser => !BROWSERS.has(browser));\n  if (invalidBrowsers.length) {\n    const names = codedJoinAnd(invalidBrowsers, { quotes: true });\n    const msg = docLink`Invalid browser(s): (${names}) in the \\`browser\\` property of ${\"[caniuse]\"}.`;\n    showWarning(msg, name);\n  }\n}\n\nasync function processJson(json, { feature }) {\n  /** @type {Array} */\n  const results = json.result;\n  const groups = new Map([\n    [\"desktop\", []],\n    [\"mobile\", []],\n  ]);\n  const toBrowserCell = browserCellRenderer(feature);\n  results.reduce(toBrowserCell, groups);\n  const out = [...groups]\n    .filter(([, arr]) => arr.length)\n    .map(\n      ([key, arr]) =>\n        html`<div class=\"caniuse-group\">\n          <div class=\"caniuse-browsers\">${arr}</div>\n          <div class=\"caniuse-type\"><span>${key}</div>\n        </div>`\n    );\n  out.push(\n    html`<a class=\"caniuse-cell\" href=\"https://caniuse.com/${feature}\"\n      >More info</a\n    >`\n  );\n  return out;\n}\n\nfunction browserCellRenderer(feature) {\n  return (groups, { browser: browserId, version, caniuse }) => {\n    const { name, type } = BROWSERS.get(browserId);\n    const versionLong = version ? ` version ${version}` : \"\";\n    const browserName = `${name}${versionLong}`;\n    const supportLevel = statToText.get(caniuse);\n    const ariaLabel = `${feature} is ${supportLevel} since ${browserName} on ${type}.`;\n    const cssClass = `caniuse-cell ${caniuse}`;\n    const title = capitalize(`${supportLevel} since ${browserName}.`);\n    const textVersion = version ? version : \"—\";\n    const src = getLogoSrc(browserId);\n    const result = html`\n      <div class=\"${cssClass}\" title=\"${title}\" aria-label=\"${ariaLabel}\">\n        <img\n          class=\"caniuse-browser\"\n          width=\"20\"\n          height=\"20\"\n          src=\"${src}\"\n          alt=\"${name} logo\"\n        /><span class=\"browser-version\">${textVersion}</span>\n      </div>\n    `;\n    groups.get(type).push(result);\n    return groups;\n  };\n}\n\n/**\n * @typedef {Record<string, [string, string[]][]>} ApiResponse\n * @throws {Error} on failure\n */\nasync function fetchStats(options) {\n  const { feature, browsers, apiURL } = options;\n  const url = new URL(apiURL || `./${feature}`, API_URL);\n  browsers.forEach(browser => url.searchParams.append(\"browsers\", browser));\n  const response = await fetch(url);\n  if (!response.ok) {\n    const { status, statusText } = response;\n    throw new Error(`Failed to get caniuse data: (${status}) ${statusText}`);\n  }\n  return response.json();\n}\n\nfunction capitalize(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\n","const css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n.mdn {\n  font-size: 0.75em;\n  position: absolute;\n  right: 0.3em;\n  min-width: 0;\n  margin-top: 3rem;\n}\n\n.mdn details {\n  width: 100%;\n  margin: 1px 0;\n  position: relative;\n  z-index: 10;\n  box-sizing: border-box;\n  padding: 0.4em;\n  padding-top: 0;\n}\n\n.mdn details[open] {\n  min-width: 25ch;\n  max-width: 32ch;\n  background: #fff;\n  background: var(--indextable-hover-bg, #fff);\n  color: black;\n  color: var(--indextable-hover-text, black);\n  box-shadow:\n    0 1em 3em -0.4em rgba(0, 0, 0, 0.3),\n    0 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow:\n    0 1em 3em -0.4em var(--tocsidebar-shadow, rgba(0, 0, 0, 0.3)),\n    0 0 1px 1px var(--tocsidebar-shadow, rgba(0, 0, 0, 0.05));\n  border-radius: 2px;\n  z-index: 11;\n  margin-bottom: 0.4em;\n}\n\n.mdn summary {\n  text-align: right;\n  cursor: default;\n  margin-right: -0.4em;\n}\n\n.mdn summary span {\n  font-family: zillaslab, Palatino, \"Palatino Linotype\", serif;\n  color: #fff;\n  color: var(--bg, #fff);\n  background-color: #000;\n  background-color: var(--text, #000);\n  display: inline-block;\n  padding: 3px;\n}\n\n.mdn a {\n  display: inline-block;\n  word-break: break-all;\n}\n\n.mdn p {\n  margin: 0;\n}\n\n.mdn .engines-all {\n  color: #058b00;\n}\n.mdn .engines-some {\n  color: #b00;\n}\n\n.mdn table {\n  width: 100%;\n  font-size: 0.9em;\n}\n\n.mdn td {\n  border: none;\n}\n\n.mdn td:nth-child(2) {\n  text-align: right;\n}\n\n.mdn .nosupportdata {\n  font-style: italic;\n  margin: 0;\n}\n\n.mdn tr::before {\n  content: \"\";\n  display: table-cell;\n  width: 1.5em;\n  height: 1.5em;\n  background: no-repeat center center / contain;\n  font-size: 0.75em;\n}\n\n.mdn .no,\n.mdn .unknown {\n  color: #cccccc;\n  filter: grayscale(100%);\n}\n\n.mdn .no::before,\n.mdn .unknown::before {\n  opacity: 0.5;\n}\n\n.mdn .chrome::before,\n.mdn .chrome_android::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/chrome/chrome.svg);\n}\n\n.mdn .edge::before,\n.mdn .edge_mobile::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/edge/edge.svg);\n}\n\n.mdn .firefox::before,\n.mdn .firefox_android::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/firefox/firefox.svg);\n}\n\n.mdn .opera::before,\n.mdn .opera_android::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/opera/opera.svg);\n}\n\n.mdn .safari::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/safari/safari.svg);\n}\n\n.mdn .safari_ios::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/safari-ios/safari-ios.svg);\n}\n\n.mdn .samsunginternet_android::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/samsung-internet/samsung-internet.svg);\n}\n\n.mdn .webview_android::before {\n  background-image: url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png);\n}\n`;\n","// @ts-check\nimport { fetchAndCache, getIntlData, showError } from \"./utils.js\";\nimport css from \"../styles/mdn-annotation.css.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/mdn-annotation\";\n\nconst BASE_JSON_PATH = \"https://w3c.github.io/mdn-spec-links/\";\nconst MDN_URL_BASE = \"https://developer.mozilla.org/en-US/docs/Web/\";\nconst MDN_BROWSERS = {\n  // The browser IDs here must match the ones in the imported JSON data.\n  // See the list of browser IDs at:\n  // https://github.com/mdn/browser-compat-data/blob/master/schemas/compat-data-schema.md#browser-identifiers.\n  chrome: \"Chrome\",\n  chrome_android: \"Chrome Android\",\n  edge: \"Edge\",\n  edge_mobile: \"Edge Mobile\",\n  firefox: \"Firefox\",\n  firefox_android: \"Firefox Android\",\n  // nodejs: \"Node.js\", // no data for features in HTML\n  opera: \"Opera\",\n  opera_android: \"Opera Android\",\n  // qq_android: \"QQ Browser\", // not enough data for features in HTML\n  safari: \"Safari\",\n  safari_ios: \"Safari iOS\",\n  samsunginternet_android: \"Samsung Internet\",\n  // uc_android: \"UC browser\", // not enough data for features in HTML\n  // uc_chinese_android: \"Chinese UC Browser\", // not enough data for features in HTML\n  webview_android: \"WebView Android\",\n};\n\nconst localizationStrings = {\n  en: {\n    inAllEngines: \"This feature is in all major engines.\",\n    inSomeEngines: \"This feature has limited support.\",\n  },\n  zh: {\n    inAllEngines: \"所有主要引擎均支持此特性。\",\n    inSomeEngines: \"此功能支持有限。\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {HTMLElement} node\n */\nfunction insertMDNBox(node) {\n  const targetAncestor = node.closest(\"section\");\n  if (!targetAncestor) return;\n  const { previousElementSibling: targetSibling } = targetAncestor;\n  if (targetSibling && targetSibling.classList.contains(\"mdn\")) {\n    // If the target ancestor already has a mdnBox inserted, we just use it\n    return targetSibling;\n  }\n  const mdnBox = html`<aside class=\"mdn\"></aside>`;\n  targetAncestor.before(mdnBox);\n  return mdnBox;\n}\n\n/**\n * @param {MdnEntry} mdnSpec\n * @returns {HTMLDetailsElement}\n */\nfunction attachMDNDetail(mdnSpec) {\n  const { name, slug, summary, support, engines } = mdnSpec;\n  const mdnSubPath = slug.slice(slug.indexOf(\"/\") + 1);\n  const href = `${MDN_URL_BASE}${slug}`;\n  const label = `Expand MDN details for ${name}`;\n  const engineSupport = getEngineSupportIcons(engines);\n  return html`<details>\n    <summary aria-label=\"${label}\"><span>MDN</span>${engineSupport}</summary>\n    <a title=\"${summary}\" href=\"${href}\">${mdnSubPath}</a>\n    ${getEngineSupport(engines)}\n    ${support\n      ? buildBrowserSupportTable(support)\n      : html`<p class=\"nosupportdata\">No support data.</p>`}\n  </details>`;\n}\n\n/**\n * @param {MdnEntry['support']} support\n * @returns {HTMLTableElement}\n */\nfunction buildBrowserSupportTable(support) {\n  /**\n   * @param {string | keyof MDN_BROWSERS} browserId\n   * @param {\"Yes\" | \"No\" | \"Unknown\"} yesNoUnknown\n   * @param {string} version\n   * @returns {HTMLTableRowElement}\n   */\n  function createRow(browserId, yesNoUnknown, version) {\n    const displayStatus = yesNoUnknown === \"Unknown\" ? \"?\" : yesNoUnknown;\n    const classList = `${browserId} ${yesNoUnknown.toLowerCase()}`;\n    return html`<tr class=\"${classList}\">\n      <td>${MDN_BROWSERS[browserId]}</td>\n      <td>${version ? version : displayStatus}</td>\n    </tr>`;\n  }\n\n  /**\n   * @param {string | keyof MDN_BROWSERS} browserId\n   * @param {VersionDetails} versionData\n   */\n  function createRowFromBrowserData(browserId, versionData) {\n    if (versionData.version_removed) {\n      return createRow(browserId, \"No\", \"\");\n    }\n    const versionAdded = versionData.version_added;\n    if (typeof versionAdded === \"boolean\") {\n      return createRow(browserId, versionAdded ? \"Yes\" : \"No\", \"\");\n    } else if (!versionAdded) {\n      return createRow(browserId, \"Unknown\", \"\");\n    } else {\n      return createRow(browserId, \"Yes\", `${versionAdded}+`);\n    }\n  }\n\n  return html`<table>\n    ${Object.keys(MDN_BROWSERS).map(browserId => {\n      return support[browserId]\n        ? createRowFromBrowserData(browserId, support[browserId])\n        : createRow(browserId, \"Unknown\", \"\");\n    })}\n  </table>`;\n}\n\nexport async function run(conf) {\n  const mdnKey = getMdnKey(conf);\n  if (!mdnKey) return;\n\n  const mdnSpecJson = await getMdnData(mdnKey, conf.mdn);\n  if (!mdnSpecJson) return;\n\n  const style = document.createElement(\"style\");\n  style.textContent = css;\n  document.head.append(style);\n\n  for (const elem of findElements(mdnSpecJson)) {\n    const mdnSpecArray = mdnSpecJson[elem.id];\n    const mdnBox = insertMDNBox(elem);\n    if (!mdnBox) continue;\n    for (const spec of mdnSpecArray) {\n      mdnBox.append(attachMDNDetail(spec));\n    }\n  }\n}\n\n/** @returns {string} */\nfunction getMdnKey(conf) {\n  const { shortName, mdn } = conf;\n  if (!mdn) return;\n  if (typeof mdn === \"string\") return mdn;\n  return mdn.key || shortName;\n}\n\n/**\n * @param {string} key MDN key\n * @param {object} mdnConf\n * @param {string} [mdnConf.specMapUrl]\n * @param {string} [mdnConf.baseJsonPath]\n * @param {number} [mdnConf.maxAge]\n *\n * @typedef {{ version_added: string|boolean|null, version_removed?: string }} VersionDetails\n * @typedef {Record<string | keyof MDN_BROWSERS, VersionDetails>} MdnSupportEntry\n * @typedef {{ name: string, title: string, slug: string, summary: string, support: MdnSupportEntry, engines: string[] }} MdnEntry\n * @typedef {Record<string, MdnEntry[]>} MdnData\n * @returns {Promise<MdnData|undefined>}\n */\nasync function getMdnData(key, mdnConf) {\n  const { baseJsonPath = BASE_JSON_PATH, maxAge = 60 * 60 * 24 * 1000 } =\n    mdnConf;\n  const url = new URL(`${key}.json`, baseJsonPath).href;\n  const res = await fetchAndCache(url, maxAge);\n  if (res.status === 404) {\n    const msg = `Could not find MDN data associated with key \"${key}\".`;\n    const hint = \"Please add a valid key to `respecConfig.mdn`\";\n    showError(msg, name, { hint });\n    return;\n  }\n  return await res.json();\n}\n\n/**\n * Find elements that can have an annotation box attached.\n * @param {MdnData} data\n */\nfunction findElements(data) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const elemsWithId = document.body.querySelectorAll(\"[id]:not(script)\");\n  return [...elemsWithId].filter(({ id }) => Array.isArray(data[id]));\n}\n\n/**\n * @param {MdnEntry['engines']} engines\n * @returns {HTMLSpanElement}\n */\nfunction getEngineSupportIcons(engines) {\n  if (engines.length === 3) {\n    return html`<span title=\"${l10n.inAllEngines}\">✅</span>`;\n  }\n  if (engines.length < 2) {\n    return html`<span title=\"${l10n.inSomeEngines}\">🚫</span>`;\n  }\n  return html`<span>&emsp;</span>`;\n}\n\n/**\n * @param {MdnEntry['engines']} engines\n * @returns {HTMLParagraphElement|undefined}\n */\nfunction getEngineSupport(engines) {\n  if (engines.length === 3) {\n    return html`<p class=\"engines-all\">${l10n.inAllEngines}</p>`;\n  }\n  if (engines.length < 2) {\n    return html`<p class=\"engines-some\">${l10n.inSomeEngines}</p>`;\n  }\n}\n","// @ts-check\n/**\n * module: 1edtech/exporter\n * Exports a ReSpec document, based on mime type, so it can be saved, etc.\n * Also performs cleanup, removing things that shouldn't be in published documents.\n * That is, elements that have a \"removeOnSave\" css class.\n *\n * Clone of core/exporter. This clone accepts application/cms as a mimeType\n * and will generate an HTML except suitable for Drupal or other CMS.\n */\n\nimport { removeCommentNodes, removeReSpec, showError } from \"../core/utils.js\";\nimport { expose } from \"../core/expose-modules.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { pub } from \"../core/pubsubhub.js\";\n\nconst name = \"1edtech/exporter\";\n\n/**\n * Creates a dataURI from a ReSpec document. It also cleans up the document\n * removing various things.\n *\n * @param {Document} doc document to export. useful for testing purposes\n * @returns a stringified data-uri of document that can be saved.\n */\nexport function rsDocToCmsDataURL(doc = document) {\n  const data = serializeHTML(doc);\n  const encodedString = encodeURIComponent(data);\n  return `data:text/html;charset=utf-8,${encodedString}`;\n}\n\n/**\n * Creates a dataURI of the CSS in a ReSpec document.\n *\n * @param {Document} doc document to export from.\n * @returns a stringified data-uri of stylesheet that can be saved.\n */\nexport async function rsDocToCssDataURL(doc = document) {\n  const data = await serializeCSS(doc);\n  const encodedString = encodeURIComponent(data);\n  return `data:text/css;charset=utf-8,${encodedString}`;\n}\n\nasync function serializeCSS(doc) {\n  const cloneDoc = doc.cloneNode(true);\n  cleanup(cloneDoc);\n  return await createCssExtract(cloneDoc.head);\n}\n\nfunction serializeHTML(doc) {\n  // Convert image urls to data uris before\n  // cloning the document. The clone does not\n  // have rendered images.\n  const images = doc.querySelectorAll(\"img\");\n  images.forEach(img => {\n    img.setAttribute(\"src\", getDataURL(img));\n  });\n  const cloneDoc = doc.cloneNode(true);\n  cleanup(cloneDoc);\n  createCmsExtract(cloneDoc.body);\n  return cloneDoc.body.innerHTML;\n}\n\nfunction cleanup(cloneDoc) {\n  const { head, body, documentElement } = cloneDoc;\n  removeCommentNodes(cloneDoc);\n\n  cloneDoc\n    .querySelectorAll(\".removeOnSave, #toc-nav\")\n    .forEach(elem => elem.remove());\n  body.classList.remove(\"toc-sidebar\");\n  removeReSpec(documentElement);\n\n  const insertions = cloneDoc.createDocumentFragment();\n\n  // Move meta viewport, as it controls the rendering on mobile.\n  const metaViewport = cloneDoc.querySelector(\"meta[name='viewport']\");\n  if (metaViewport && head.firstChild !== metaViewport) {\n    insertions.appendChild(metaViewport);\n  }\n\n  // Move charset to near top, as it needs to be in the first 512 bytes.\n  let metaCharset = cloneDoc.querySelector(\n    \"meta[charset], meta[content*='charset=']\"\n  );\n  if (!metaCharset) {\n    metaCharset = html`<meta charset=\"utf-8\" />`;\n  }\n  insertions.appendChild(metaCharset);\n\n  // Add meta generator\n  const respecVersion = `ReSpec ${window.respecVersion || \"Developer Channel\"}`;\n  const metaGenerator = html`\n    <meta name=\"generator\" content=\"${respecVersion}\" />\n  `;\n\n  insertions.appendChild(metaGenerator);\n  head.prepend(insertions);\n  pub(\"beforesave\", documentElement);\n}\n\n/**\n * Strip content that is not allowed in Drupal or other CMS.\n *\n * @param {HTMLElement} docBody The document body element\n */\nfunction createCmsExtract(docBody) {\n  let started = false;\n  let finished = false;\n  docBody.childNodes.forEach(node => {\n    if (!started) {\n      if (node.nodeName !== \"HEADER\") {\n        node.remove();\n      } else {\n        started = true;\n      }\n    } else if (!finished) {\n      if (node.nodeName == \"FOOTER\") {\n        finished = true;\n      } else if (node.nodeName == \"SCRIPT\") {\n        node.remove();\n      } else if (node.nodeName == \"STYLE\") {\n        node.remove();\n      }\n    } else {\n      node.remove();\n    }\n  });\n}\n\n/**\n * Combine all the stylesheets in the document head\n *\n * @param {HTMLElement} docHead The document body element\n * @returns A CSS stylesheet with all the styles combined\n */\nasync function createCssExtract(docHead) {\n  let css = \"\";\n  /** @type {NodeListOf<HTMLLinkElement>} */\n  const links = docHead.querySelectorAll(\"link[rel='stylesheet']\");\n  await Promise.all(\n    Array.from(links).map(async link => {\n      try {\n        const fetcher = await fetch(link.href);\n        const data = await fetcher.text();\n        css += data;\n      } catch (err) {\n        showError(`Cannot retrieve stylesheet ${link.href}. ${err}.`, name);\n      }\n    })\n  );\n  const styles = docHead.querySelectorAll(\"style\");\n  styles.forEach(style => {\n    css += style.innerText;\n  });\n  return css;\n}\n\n/**\n * Return a Data URL for the image. The Data URL will relace\n * the image source URL. This makes it easier to update the CMS\n * because there are no external image files to update.\n *\n * @param {HTMLImageElement} img\n */\nfunction getDataURL(img) {\n  try {\n    const canvas = img.ownerDocument.createElement(\"canvas\");\n    canvas.width = img.width;\n    canvas.height = img.height;\n    const context = canvas.getContext(\"2d\");\n    context.drawImage(img, 0, 0, img.width, img.height);\n    return canvas.toDataURL();\n  } catch (err) {\n    const message = err.toString();\n    if (!message.startsWith(\"SecurityError\")) {\n      showError(message, name);\n    }\n    return img.src;\n  }\n}\n\nexpose(name, { rsDocToCmsDataURL, rsDocToCssDataURL });\n","// @ts-check\n// Module ui/save-html\n// Saves content to HTML when asked to\nimport { concatDate, getIntlData, showWarning } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { rsDocToCmsDataURL } from \"../1edtech/exporter.js\";\nimport { rsDocToDataURL } from \"../core/exporter.js\";\nimport { ui } from \"../core/ui.js\";\n\nexport const name = \"ui/save-html\";\n\nconst localizationStrings = {\n  en: {\n    save_snapshot: \"Export\",\n  },\n  nl: {\n    save_snapshot: \"Bewaar Snapshot\",\n  },\n  ja: {\n    save_snapshot: \"保存する\",\n  },\n  de: {\n    save_snapshot: \"Exportieren\",\n  },\n  zh: {\n    save_snapshot: \"导出\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst downloadLinks = [\n  {\n    id: \"respec-save-as-html\",\n    ext: \"html\",\n    title: \"HTML\",\n    type: \"text/html\",\n    get href() {\n      return rsDocToDataURL(this.type);\n    },\n  },\n  {\n    id: \"respec-save-as-xml\",\n    ext: \"xhtml\",\n    title: \"XML\",\n    type: \"application/xml\",\n    get href() {\n      return rsDocToDataURL(this.type);\n    },\n  },\n  {\n    id: \"respec-save-as-epub\",\n    ext: \"epub\",\n    title: \"EPUB 3\",\n    type: \"application/epub+zip\",\n    get href() {\n      // Create and download an EPUB 3.2 version of the content\n      // Using the EPUB 3.2 conversion service set up at labs.w3.org/r2epub\n      // For more details on that service, see https://github.com/iherman/respec2epub\n      const epubURL = new URL(\"https://labs.w3.org/r2epub/\");\n      epubURL.searchParams.append(\"respec\", \"true\");\n      epubURL.searchParams.append(\"url\", document.location.href);\n      return epubURL.href;\n    },\n  },\n  {\n    id: \"respec-save-as-cms-extract\",\n    ext: \"txt\",\n    title: \"CMS EXTRACT\",\n    type: \"application/cms\",\n    get href() {\n      return rsDocToCmsDataURL();\n    },\n  },\n];\n\n/**\n * @param {typeof downloadLinks[0]} details\n */\nfunction toDownloadLink(details, conf) {\n  const { id, href, ext, title, type } = details;\n  const date = concatDate(conf.publishDate || new Date());\n  const filename = [conf.specStatus, conf.shortName || \"spec\", date].join(\"-\");\n  return html`<a\n    href=\"${href}\"\n    id=\"${id}\"\n    download=\"${filename}.${ext}\"\n    type=\"${type}\"\n    class=\"respec-save-button\"\n    onclick=${() => ui.closeModal()}\n    >${title}</a\n  >`;\n}\n\nexport function run(conf) {\n  const saveDialog = {\n    async show(button) {\n      await document.respec.ready;\n      const div = html`<div class=\"respec-save-buttons\">\n        ${downloadLinks.map(details => toDownloadLink(details, conf))}\n      </div>`;\n      ui.freshModal(l10n.save_snapshot, div, button);\n    },\n  };\n\n  const supportsDownload = \"download\" in HTMLAnchorElement.prototype;\n  let button;\n  if (supportsDownload) {\n    button = ui.addCommand(l10n.save_snapshot, show, \"Ctrl+Shift+Alt+S\", \"💾\");\n  }\n\n  function show() {\n    if (!supportsDownload) return;\n    saveDialog.show(button);\n  }\n}\n\n/**\n * @param {*} _\n * @param {string} mimeType\n */\nexport function exportDocument(_, mimeType) {\n  const msg =\n    \"Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.\";\n  const hint = \"Use core/exporter `rsDocToDataURL()` instead.\";\n  showWarning(msg, name, { hint });\n  return rsDocToDataURL(mimeType);\n}\n","// @ts-check\n// Module ui/search-specref\n// Search Specref database\nimport { getIntlData } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { ui } from \"../core/ui.js\";\n\nconst URL = \"https://respec.org/specref/\";\n\nconst localizationStrings = {\n  en: {\n    search_specref: \"Search Specref\",\n  },\n  nl: {\n    search_specref: \"Doorzoek Specref\",\n  },\n  ja: {\n    search_specref: \"仕様検索\",\n  },\n  de: {\n    search_specref: \"Spezifikationen durchsuchen\",\n  },\n  zh: {\n    search_specref: \"搜索 Specref\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst button = ui.addCommand(\n  l10n.search_specref,\n  show,\n  \"Ctrl+Shift+Alt+space\",\n  \"🔎\"\n);\n\nfunction show() {\n  const onLoad = e => e.target.classList.add(\"ready\");\n  /** @type {HTMLElement} */\n  const specrefSearchUI = html`\n    <iframe class=\"respec-iframe\" src=\"${URL}\" onload=${onLoad}></iframe>\n    <a href=\"${URL}\" target=\"_blank\">Open Search UI in a new tab</a>\n  `;\n  ui.freshModal(l10n.search_specref, specrefSearchUI, button);\n}\n","// @ts-check\n// Module ui/search-xref\n// Search xref database\nimport { getIntlData } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { ui } from \"../core/ui.js\";\n\nconst URL = \"https://respec.org/xref/\";\n\nconst localizationStrings = {\n  en: {\n    title: \"Search definitions\",\n  },\n  ja: {\n    title: \"定義検索\",\n  },\n  de: {\n    title: \"Definitionen durchsuchen\",\n  },\n  zh: {\n    title: \"搜索定义\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst button = ui.addCommand(l10n.title, show, \"Ctrl+Shift+Alt+x\", \"📚\");\n\nfunction show() {\n  const onLoad = e => e.target.classList.add(\"ready\");\n  const xrefSearchUI = html`\n    <iframe class=\"respec-iframe\" src=\"${URL}\" onload=\"${onLoad}\"></iframe>\n    <a href=\"${URL}\" target=\"_blank\">Open Search UI in a new tab</a>\n  `;\n  ui.freshModal(l10n.title, xrefSearchUI, button);\n}\n","// @ts-check\n// Module ui/about-respec\n// A simple about dialog with pointer to the help\nimport { getIntlData } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { ui } from \"../core/ui.js\";\n\nconst localizationStrings = {\n  en: {\n    about_respec: \"About\",\n  },\n  zh: {\n    about_respec: \"关于\",\n  },\n  nl: {\n    about_respec: \"Over\",\n  },\n  ja: {\n    about_respec: \"これについて\",\n  },\n  de: {\n    about_respec: \"Über\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n// window.respecVersion is added at build time (see tools/builder.js)\nwindow.respecVersion = window.respecVersion || \"Developer Edition\";\nconst div = document.createElement(\"div\");\nconst render = html.bind(div);\nconst button = ui.addCommand(\n  `${l10n.about_respec} ${window.respecVersion}`,\n  show,\n  \"Ctrl+Shift+Alt+A\",\n  \"ℹ️\"\n);\n\nfunction show() {\n  const entries = [];\n  if (\"getEntriesByType\" in performance) {\n    performance\n      .getEntriesByType(\"measure\")\n      .sort((a, b) => b.duration - a.duration)\n      .map(({ name, duration }) => {\n        const humanDuration =\n          duration > 1000\n            ? `${Math.round(duration / 1000.0)} second(s)`\n            : `${duration.toFixed(2)} milliseconds`;\n        return { name, duration: humanDuration };\n      })\n      .map(perfEntryToTR)\n      .forEach(entry => {\n        entries.push(entry);\n      });\n  }\n  render`\n  <p>\n    ReSpec is a document production toolchain, with a notable focus on W3C specifications.\n  </p>\n  <p>\n    <a href='https://respec.org/docs'>Documentation</a>,\n    <a href='https://github.com/speced/respec/issues'>Bugs</a>.\n  </p>\n  <table border=\"1\" width=\"100%\" hidden=\"${entries.length ? false : true}\">\n    <caption>\n      Loaded plugins\n    </caption>\n    <thead>\n      <tr>\n        <th>\n          Plugin Name\n        </th>\n        <th>\n          Processing time\n        </th>\n      </tr>\n    </thead>\n    <tbody>${entries}</tbody>\n  </table>\n`;\n  ui.freshModal(`${l10n.about_respec} - ${window.respecVersion}`, div, button);\n}\n\nfunction perfEntryToTR({ name, duration }) {\n  const moduleURL = `https://github.com/speced/respec/blob/develop/src/${name}.js`;\n  return html`\n    <tr>\n      <td><a href=\"${moduleURL}\">${name}</a></td>\n      <td>${duration}</td>\n    </tr>\n  `;\n}\n","// @ts-check\n/**\n * This Module adds a metatag description to the document, based on the\n * first paragraph of the abstract.\n */\nimport { html } from \"../core/import-maps.js\";\n\nexport const name = \"core/seo\";\n\nexport function run(conf) {\n  if (conf.gitRevision) {\n    // This allows to set a git revision of the source used to produce the\n    // generated content. Typically, this would be set when generating the\n    // static HTML via a build process.\n    // 'revision' is the name recommended in https://wiki.whatwg.org/wiki/MetaExtensions\n    const metaElem = html`<meta\n      name=\"revision\"\n      content=\"${conf.gitRevision}\"\n    />`;\n    document.head.appendChild(metaElem);\n  }\n\n  const firstParagraph = document.querySelector(\"#abstract p:first-of-type\");\n  if (!firstParagraph) {\n    return; // no abstract, so nothing to do\n  }\n  // Normalize whitespace: trim, remove new lines, tabs, etc.\n  const content = firstParagraph.textContent.replace(/\\s+/, \" \").trim();\n  const metaElem = document.createElement(\"meta\");\n  metaElem.name = \"description\";\n  metaElem.content = content;\n  document.head.appendChild(metaElem);\n}\n","// @ts-check\nexport const name = \"1edtech/seo\";\n\n/**\n * Add a canonical href\n *\n * @param {*} conf respecConfig\n *\n * Can be run before or after core/seo\n */\nexport async function run(conf) {\n  const linkElem = document.createElement(\"link\");\n  linkElem.setAttribute(\"rel\", \"canonical\");\n  linkElem.setAttribute(\"href\", conf.thisURL);\n  document.head.appendChild(linkElem);\n}\n","/*\nOne Light for ReSpec, with better color contrast\nAdapted from Atom One Light by Daniel Gamage (https://github.com/highlightjs/highlight.js/blob/c0b6ddbaaf7/src/styles/atom-one-light.css>\nOriginal One Light Syntax theme from https://github.com/atom/one-light-syntax\n*/\n\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n.hljs {\n  --base: #fafafa;\n  --mono-1: #383a42;\n  --mono-2: #686b77;\n  --mono-3: #717277;\n  --hue-1: #0b76c5;\n  --hue-2: #336ae3;\n  --hue-3: #a626a4;\n  --hue-4: #42803c;\n  --hue-5: #ca4706;\n  --hue-5-2: #c91243;\n  --hue-6: #986801;\n  --hue-6-2: #9a6a01;\n}\n\n/* There's no way to adapt this to \"manual\" theme toggle yet. */\n@media (prefers-color-scheme: dark) {\n  .hljs {\n    --base: #282c34;\n    --mono-1: #abb2bf;\n    --mono-2: #818896;\n    --mono-3: #5c6370;\n    --hue-1: #56b6c2;\n    --hue-2: #61aeee;\n    --hue-3: #c678dd;\n    --hue-4: #98c379;\n    --hue-5: #e06c75;\n    --hue-5-2: #be5046;\n    --hue-6: #d19a66;\n    --hue-6-2: #e6c07b;\n  }\n}\n\n.hljs {\n  display: block;\n  overflow-x: auto;\n  padding: 0.5em;\n  color: #383a42;\n  color: var(--mono-1, #383a42);\n  background: #fafafa;\n  background: var(--base, #fafafa);\n}\n\n.hljs-comment,\n.hljs-quote {\n  color: #717277;\n  color: var(--mono-3, #717277);\n  font-style: italic;\n}\n\n.hljs-doctag,\n.hljs-keyword,\n.hljs-formula {\n  color: #a626a4;\n  color: var(--hue-3, #a626a4);\n}\n\n.hljs-section,\n.hljs-name,\n.hljs-selector-tag,\n.hljs-deletion,\n.hljs-subst {\n  color: #ca4706;\n  color: var(--hue-5, #ca4706);\n  font-weight: bold;\n}\n\n.hljs-literal {\n  color: #0b76c5;\n  color: var(--hue-1, #0b76c5);\n}\n\n.hljs-string,\n.hljs-regexp,\n.hljs-addition,\n.hljs-attribute,\n.hljs-meta-string {\n  color: #42803c;\n  color: var(--hue-4, #42803c);\n}\n\n.hljs-built_in,\n.hljs-class .hljs-title {\n  color: #9a6a01;\n  color: var(--hue-6-2, #9a6a01);\n}\n\n.hljs-attr,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-type,\n.hljs-selector-class,\n.hljs-selector-attr,\n.hljs-selector-pseudo,\n.hljs-number {\n  color: #986801;\n  color: var(--hue-6, #986801);\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link,\n.hljs-meta,\n.hljs-selector-id,\n.hljs-title {\n  color: #336ae3;\n  color: var(--hue-2, #336ae3);\n}\n\n.hljs-emphasis {\n  font-style: italic;\n}\n\n.hljs-strong {\n  font-weight: bold;\n}\n\n.hljs-link {\n  text-decoration: underline;\n}\n`;\n","/**\n * @param {string} path\n */\nexport async function fetchBase(path) {\n  const response = await fetch(new URL(`../../${path}`, import.meta.url));\n  return await response.text();\n}\n","// @ts-check\n/**\n * Module core/worker\n *\n * Exports a Web Worker for ReSpec, allowing for\n * multi-threaded processing of things.\n */\nexport const name = \"core/worker\";\n\n// Opportunistically preload syntax highlighter, which is used by the worker\nimport { createResourceHint } from \"./utils.js\";\nimport { expose } from \"./expose-modules.js\";\nimport { fetchBase } from \"./text-loader.js\";\n// Opportunistically preload syntax highlighter\n/** @type ResourceHintOption */\nconst hint = {\n  hint: \"preload\",\n  href: \"https://www.w3.org/Tools/respec/respec-highlight\",\n  as: \"script\",\n};\nconst link = createResourceHint(hint);\ndocument.head.appendChild(link);\n\nasync function loadWorkerScript() {\n  try {\n    return (await import(\"text!../../worker/respec-worker.js\")).default;\n  } catch {\n    return fetchBase(\"worker/respec-worker.js\");\n  }\n}\n\nasync function createWorker() {\n  const workerScript = await loadWorkerScript();\n  const workerURL = URL.createObjectURL(\n    new Blob([workerScript], { type: \"application/javascript\" })\n  );\n  return new Worker(workerURL);\n}\n\nexport const workerPromise = createWorker();\n\nexpose(\n  name,\n  workerPromise.then(worker => ({ worker }))\n);\n","// @ts-check\n/**\n * Module core/highlight\n *\n * Performs syntax highlighting to all pre and code elements.\n */\nimport css from \"../styles/highlight.css.js\";\nimport { html } from \"./import-maps.js\";\nimport { msgIdGenerator } from \"./utils.js\";\nimport { workerPromise } from \"./worker.js\";\nexport const name = \"core/highlight\";\n\nconst nextMsgId = msgIdGenerator(\"highlight\");\n\nfunction getLanguageHint(classList) {\n  return Array.from(classList)\n    .filter(item => item !== \"highlight\" && item !== \"nolinks\")\n    .map(item => item.toLowerCase());\n}\n\nasync function highlightElement(elem) {\n  elem.setAttribute(\"aria-busy\", \"true\");\n  const languages = getLanguageHint(elem.classList);\n  let response;\n  try {\n    response = await sendHighlightRequest(elem.innerText, languages);\n  } catch (err) {\n    console.error(err);\n    return;\n  }\n  const { language, value } = response;\n  switch (elem.localName) {\n    case \"pre\":\n      elem.classList.remove(language);\n      elem.innerHTML = `<code class=\"hljs${\n        language ? ` ${language}` : \"\"\n      }\">${value}</code>`;\n      if (!elem.classList.length) elem.removeAttribute(\"class\");\n      break;\n    case \"code\":\n      elem.innerHTML = value;\n      elem.classList.add(\"hljs\");\n      if (language) elem.classList.add(language);\n      break;\n  }\n  elem.setAttribute(\"aria-busy\", \"false\");\n}\n\nasync function sendHighlightRequest(code, languages) {\n  const msg = {\n    action: \"highlight\",\n    code,\n    id: nextMsgId(),\n    languages,\n  };\n  const worker = await workerPromise;\n  worker.postMessage(msg);\n  return new Promise((resolve, reject) => {\n    const timeoutId = setTimeout(() => {\n      reject(new Error(\"Timed out waiting for highlight.\"));\n    }, 4000);\n    worker.addEventListener(\"message\", function listener(ev) {\n      const {\n        data: { id, language, value },\n      } = ev;\n      if (id !== msg.id) return; // not for us!\n      worker.removeEventListener(\"message\", listener);\n      clearTimeout(timeoutId);\n      resolve({ language, value });\n    });\n  });\n}\n\nexport async function run(conf) {\n  // Nothing to highlight\n  if (conf.noHighlightCSS) return;\n  const highlightables = [\n    ...document.querySelectorAll(`\n    pre:not(.idl):not(.nohighlight) > code:not(.nohighlight),\n    pre:not(.idl):not(.nohighlight),\n    code.highlight\n  `),\n  ].filter(\n    // Filter pre's that contain code\n    elem => elem.localName !== \"pre\" || !elem.querySelector(\"code\")\n  );\n  // Nothing to highlight\n  if (!highlightables.length) {\n    return;\n  }\n  const promisesToHighlight = highlightables\n    .filter(elem => elem.textContent.trim())\n    .map(highlightElement);\n  document.head.appendChild(\n    html`<style>\n      ${css}\n    </style>`\n  );\n  await Promise.all(promisesToHighlight);\n}\n","// @ts-check\n/**\n * Module core/data-tests\n *\n * Allows specs to link to test files in a test suite, by adding `details` of where\n * particular tests for a testable assertion can be found.\n *\n * `data-tests` takes a space separated list of URLs, e.g. data-test=\"foo.html bar.html\".\n *\n * Docs: https://respec.org/doc/#data-tests\n */\nimport {\n  codedJoinAnd,\n  docLink,\n  getIntlData,\n  showError,\n  showWarning,\n} from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nconst localizationStrings = {\n  en: {\n    missing_test_suite_uri: docLink`Found tests in your spec, but missing ${\"[testSuiteURI]\"} in your ReSpec config.`,\n    tests: \"tests\",\n    test: \"test\",\n  },\n  ja: {\n    missing_test_suite_uri: docLink`この仕様内にテストの項目を検出しましたが，ReSpec の設定に ${\"[testSuiteURI]\"} が見つかりません．`,\n    tests: \"テスト\",\n    test: \"テスト\",\n  },\n  de: {\n    missing_test_suite_uri: docLink`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${\"[testSuiteURI]\"} angegeben.`,\n    tests: \"Tests\",\n    test: \"Test\",\n  },\n  zh: {\n    missing_test_suite_uri: docLink`本规范中包含测试，但在 ReSpec 配置中缺少 ${\"[testSuiteURI]\"}。`,\n    tests: \"测试\",\n    test: \"测试\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport const name = \"core/data-tests\";\n\nfunction toListItem(href) {\n  const emojiList = [];\n  const [testFile] = new URL(href).pathname.split(\"/\").reverse();\n  const testParts = testFile.split(\".\");\n  let [testFileName] = testParts;\n\n  const isSecureTest = testParts.find(part => part === \"https\");\n  if (isSecureTest) {\n    const requiresConnectionEmoji = document.createElement(\"span\");\n    requiresConnectionEmoji.textContent = \"🔒\";\n    requiresConnectionEmoji.setAttribute(\n      \"aria-label\",\n      \"requires a secure connection\"\n    );\n    requiresConnectionEmoji.setAttribute(\"title\", \"Test requires HTTPS\");\n    testFileName = testFileName.replace(\".https\", \"\");\n    emojiList.push(requiresConnectionEmoji);\n  }\n\n  const isManualTest = testFileName\n    .split(\".\")\n    .join(\"-\")\n    .split(\"-\")\n    .find(part => part === \"manual\");\n  if (isManualTest) {\n    const manualPerformEmoji = document.createElement(\"span\");\n    manualPerformEmoji.textContent = \"💪\";\n    manualPerformEmoji.setAttribute(\n      \"aria-label\",\n      \"the test must be run manually\"\n    );\n    manualPerformEmoji.setAttribute(\"title\", \"Manual test\");\n    testFileName = testFileName.replace(\"-manual\", \"\");\n    emojiList.push(manualPerformEmoji);\n  }\n\n  const testList = html`\n    <li>\n      <a href=\"${href}\">${testFileName}</a>\n      ${emojiList}\n    </li>\n  `;\n  return testList;\n}\n\nexport function run(conf) {\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\"[data-tests]\");\n  const testables = [...elems].filter(elem => elem.dataset.tests);\n\n  if (!testables.length) {\n    return;\n  }\n  if (!conf.testSuiteURI) {\n    showError(l10n.missing_test_suite_uri, name);\n    return;\n  }\n\n  for (const elem of testables) {\n    const tests = elem.dataset.tests.split(/,/gm).map(url => url.trim());\n    const testURLs = toTestURLs(tests, conf.testSuiteURI, elem);\n    handleDuplicates(testURLs, elem);\n    const details = toHTML(testURLs);\n    elem.append(details);\n  }\n}\n\n/**\n * @param {string[]} tests\n * @param {string} testSuiteURI\n * @param {HTMLElement} elem\n */\nfunction toTestURLs(tests, testSuiteURI, elem) {\n  return tests\n    .map(test => {\n      try {\n        return new URL(test, testSuiteURI).href;\n      } catch {\n        const msg = docLink`Invalid URL in ${\"[data-tests]\"} attribute: ${test}.`;\n        showWarning(msg, name, { elements: [elem] });\n      }\n    })\n    .filter(href => href);\n}\n\n/**\n * @param {string[]} testURLs\n * @param {HTMLElement} elem\n */\nfunction handleDuplicates(testURLs, elem) {\n  const duplicates = testURLs.filter(\n    (link, i, self) => self.indexOf(link) !== i\n  );\n  if (duplicates.length) {\n    const msg = docLink`Duplicate tests found in the ${\"[data-tests]\"} attribute.`;\n    const tests = codedJoinAnd(duplicates, { quotes: true });\n    const hint = docLink`To fix, remove duplicates from ${\"[data-tests]\"}: ${tests}.`;\n    showWarning(msg, name, { hint, elements: [elem] });\n  }\n}\n\n/**\n * @param {string[]} testURLs\n */\nfunction toHTML(testURLs) {\n  const uniqueList = [...new Set(testURLs)];\n  const details = html`\n    <details class=\"respec-tests-details removeOnSave\">\n      <summary>tests: ${uniqueList.length}</summary>\n      <ul>\n        ${uniqueList.map(toListItem)}\n      </ul>\n    </details>\n  `;\n  return details;\n}\n","// @ts-check\nimport { showWarning } from \"./utils.js\";\nexport const name = \"core/list-sorter\";\n\nfunction makeSorter(direction) {\n  const order = direction === \"ascending\" ? 1 : -1;\n  return ({ textContent: a }, { textContent: b }) => {\n    return order * a.trim().localeCompare(b.trim());\n  };\n}\n/**\n * Shallow sort list items in OL, and UL elements.\n *\n * @param {HTMLUListElement} elem\n * @returns {DocumentFragment}\n */\nexport function sortListItems(elem, dir) {\n  const elements = [...elem.querySelectorAll(\":scope > li\")];\n  const sortedElements = elements.sort(makeSorter(dir)).reduce((frag, elem) => {\n    frag.appendChild(elem);\n    return frag;\n  }, document.createDocumentFragment());\n  return sortedElements;\n}\n\n/**\n * Shallow sort a definition list based on its definition terms (dt) elements.\n *\n * @param {HTMLDListElement} dl\n * @returns {DocumentFragment}\n */\nexport function sortDefinitionTerms(dl, dir) {\n  const elements = [...dl.querySelectorAll(\":scope > dt\")];\n  const sortedElements = elements.sort(makeSorter(dir)).reduce((frag, elem) => {\n    const { nodeType, nodeName } = elem;\n    const children = document.createDocumentFragment();\n    let { nextSibling: next } = elem;\n    while (next) {\n      if (!next.nextSibling) {\n        break;\n      }\n      children.appendChild(next.cloneNode(true));\n      const { nodeType: nextType, nodeName: nextName } = next.nextSibling;\n      const isSameType = nextType === nodeType && nextName === nodeName;\n      if (isSameType) {\n        break;\n      }\n      next = next.nextSibling;\n    }\n    children.prepend(elem.cloneNode(true));\n    frag.appendChild(children);\n    return frag;\n  }, document.createDocumentFragment());\n  return sortedElements;\n}\n\nexport function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const sortables = document.querySelectorAll(\"[data-sort]\");\n  for (const elem of sortables) {\n    let sortedElems;\n    const dir = elem.dataset.sort || \"ascending\";\n    switch (elem.localName) {\n      case \"dl\": {\n        const definition = /** @type {HTMLDListElement} */ (elem);\n        sortedElems = sortDefinitionTerms(definition, dir);\n        break;\n      }\n      case \"ol\":\n      case \"ul\": {\n        const list = /** @type {HTMLUListElement} */ (elem);\n        sortedElems = sortListItems(list, dir);\n        break;\n      }\n      default: {\n        const msg = `ReSpec can't sort ${elem.localName} elements.`;\n        showWarning(msg, name, { elements: [elem] });\n      }\n    }\n    if (sortedElems) {\n      const range = document.createRange();\n      range.selectNodeContents(elem);\n      range.deleteContents();\n      elem.appendChild(sortedElems);\n    }\n  }\n}\n","const css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\nvar:hover {\n  text-decoration: underline;\n  cursor: pointer;\n}\n\nvar.respec-hl {\n  color: var(--color, #000);\n  background-color: var(--bg-color);\n  box-shadow: 0 0 0px 2px var(--bg-color);\n}\n\n@media (prefers-color-scheme: dark) {\n  var.respec-hl {\n    filter: saturate(0.9) brightness(0.9)\n  }\n}\n\n/* highlight colors\n  https://github.com/w3c/tr-design/issues/152\n*/\nvar.respec-hl-c1 {\n  --bg-color: #f4d200;\n}\n\nvar.respec-hl-c2 {\n  --bg-color: #ff87a2;\n}\n\nvar.respec-hl-c3 {\n  --bg-color: #96e885;\n}\n\nvar.respec-hl-c4 {\n  --bg-color: #3eeed2;\n}\n\nvar.respec-hl-c5 {\n  --bg-color: #eacfb6;\n}\n\nvar.respec-hl-c6 {\n  --bg-color: #82ddff;\n}\n\nvar.respec-hl-c7 {\n  --bg-color: #ffbcf2;\n}\n\n@media print {\n  var.respec-hl {\n    background: none;\n    color: #000;\n    box-shadow: unset;\n  }\n}\n`;\n","// @ts-check\n/**\n * Module core/highlight-vars\n * Highlights occurrences of a <var> within the algorithm or the encompassing section on click.\n * Set `conf.highlightVars = true` to enable.\n * Removes highlights from <var> if clicked anywhere else.\n * All is done while keeping in mind that exported html stays clean\n * on export.\n */\nimport css from \"../styles/var.css.js\";\nimport { norm } from \"./utils.js\";\nimport { sub } from \"./pubsubhub.js\";\n\nexport const name = \"core/highlight-vars\";\n\nexport function run(conf) {\n  if (!conf.highlightVars) {\n    return;\n  }\n  const styleElement = document.createElement(\"style\");\n  styleElement.textContent = css;\n  styleElement.classList.add(\"removeOnSave\");\n  document.head.appendChild(styleElement);\n\n  document\n    .querySelectorAll(\"var\")\n    .forEach(varElem => varElem.addEventListener(\"click\", highlightListener));\n\n  // remove highlights, cleanup empty class/style attributes\n  sub(\"beforesave\", outputDoc => {\n    outputDoc.querySelectorAll(\"var.respec-hl\").forEach(removeHighlight);\n  });\n}\n\nfunction highlightListener(ev) {\n  ev.stopPropagation();\n  const { target: varElem } = ev;\n  const hightligtedElems = highlightVars(varElem);\n  const resetListener = () => {\n    const hlColor = getHighlightColor(varElem);\n    hightligtedElems.forEach(el => removeHighlight(el, hlColor));\n    [...HL_COLORS.keys()].forEach(key => HL_COLORS.set(key, true));\n  };\n  if (hightligtedElems.length) {\n    document.body.addEventListener(\"click\", resetListener, { once: true });\n  }\n}\n\n// availability of highlight colors. colors from var.css\nconst HL_COLORS = new Map([\n  [\"respec-hl-c1\", true],\n  [\"respec-hl-c2\", true],\n  [\"respec-hl-c3\", true],\n  [\"respec-hl-c4\", true],\n  [\"respec-hl-c5\", true],\n  [\"respec-hl-c6\", true],\n  [\"respec-hl-c7\", true],\n]);\n\nfunction getHighlightColor(target) {\n  // return current colors if applicable\n  const { value } = target.classList;\n  const re = /respec-hl-\\w+/;\n  const activeClass = re.test(value) && value.match(re);\n  if (activeClass) return activeClass[0];\n\n  // first color preference\n  if (HL_COLORS.get(\"respec-hl-c1\") === true) return \"respec-hl-c1\";\n\n  // otherwise get some other available color\n  return [...HL_COLORS.keys()].find(c => HL_COLORS.get(c)) || \"respec-hl-c1\";\n}\n\nfunction highlightVars(varElem) {\n  const textContent = norm(varElem.textContent);\n  const parent = varElem.closest(\".algorithm, section\");\n  const highlightColor = getHighlightColor(varElem);\n\n  const varsToHighlight = [...parent.querySelectorAll(\"var\")].filter(\n    el =>\n      norm(el.textContent) === textContent &&\n      el.closest(\".algorithm, section\") === parent\n  );\n\n  // update availability of highlight color\n  const colorStatus = varsToHighlight[0].classList.contains(\"respec-hl\");\n  HL_COLORS.set(highlightColor, colorStatus);\n\n  // highlight vars\n  if (colorStatus) {\n    varsToHighlight.forEach(el => removeHighlight(el, highlightColor));\n    return [];\n  } else {\n    varsToHighlight.forEach(el => addHighlight(el, highlightColor));\n  }\n  return varsToHighlight;\n}\n\nfunction removeHighlight(el, highlightColor) {\n  el.classList.remove(\"respec-hl\", highlightColor);\n  // clean up empty class attributes so they don't come in export\n  if (!el.classList.length) el.removeAttribute(\"class\");\n}\n\nfunction addHighlight(elem, highlightColor) {\n  elem.classList.add(\"respec-hl\", highlightColor);\n}\n","/* dfn popup panel that list all local references to a dfn */\n/**\n * TODO: Revert changes due to https://github.com/speced/respec/pull/2888 when\n * https://github.com/w3c/css-validator/pull/111 is fixed.\n */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\ndfn {\n  cursor: pointer;\n}\n\n.dfn-panel {\n  position: absolute;\n  z-index: 35;\n  min-width: 300px;\n  max-width: 500px;\n  padding: 0.5em 0.75em;\n  margin-top: 0.6em;\n  font-family: \"Helvetica Neue\", sans-serif;\n  font-size: small;\n  background: #fff;\n  background: var(--indextable-hover-bg, #fff);\n  color: black;\n  color: var(--text, black);\n  box-shadow: 0 1em 3em -0.4em rgba(0, 0, 0, 0.3),\n    0 0 1px 1px rgba(0, 0, 0, 0.05);\n  box-shadow: 0 1em 3em -0.4em var(--tocsidebar-shadow, rgba(0, 0, 0, 0.3)),\n    0 0 1px 1px var(--tocsidebar-shadow, rgba(0, 0, 0, 0.05));\n  border-radius: 2px;\n}\n/* Triangle/caret */\n.dfn-panel:not(.docked) > .caret {\n  position: absolute;\n  top: -9px;\n}\n.dfn-panel:not(.docked) > .caret::before,\n.dfn-panel:not(.docked) > .caret::after {\n  content: \"\";\n  position: absolute;\n  border: 10px solid transparent;\n  border-top: 0;\n  border-bottom: 10px solid #fff;\n  border-bottom-color: var(--indextable-hover-bg, #fff);\n  top: 0;\n}\n.dfn-panel:not(.docked) > .caret::before {\n  border-bottom: 9px solid #a2a9b1;\n  /* TODO: need slightly darker shade */\n  border-bottom-color: var(--indextable-hover-bg, #a2a9b1);\n}\n\n.dfn-panel * {\n  margin: 0;\n}\n\n.dfn-panel b {\n  display: block;\n  color: #000;\n  color: var(--text, #000);\n  margin-top: 0.25em;\n}\n\n.dfn-panel ul a[href] {\n  color: #333;\n  color: var(--text, #333);\n}\n\n.dfn-panel > div {\n  display: flex;\n}\n\n.dfn-panel a.self-link {\n  font-weight: bold;\n  margin-right: auto;\n}\n\n.dfn-panel .marker {\n  padding: 0.1em;\n  margin-left: 0.5em;\n  border-radius: 0.2em;\n  text-align: center;\n  white-space: nowrap;\n  font-size: 90%;\n  color: #040b1c;\n}\n\n.dfn-panel .marker.dfn-exported {\n  background: #d1edfd;\n  box-shadow: 0 0 0 0.125em #1ca5f940;\n}\n.dfn-panel .marker.idl-block {\n  background: #8ccbf2;\n  box-shadow: 0 0 0 0.125em #0670b161;\n}\n\n.dfn-panel a:not(:hover) {\n  text-decoration: none !important;\n  border-bottom: none !important;\n}\n\n.dfn-panel a[href]:hover {\n  border-bottom-width: 1px;\n}\n\n.dfn-panel ul {\n  padding: 0;\n}\n\n.dfn-panel li {\n  margin-left: 1em;\n}\n\n.dfn-panel.docked {\n  position: fixed;\n  left: 0.5em;\n  top: unset;\n  bottom: 2em;\n  margin: 0 auto;\n  /* 0.75em from padding (x2), 0.5em from left position, 0.2em border (x2) */\n  max-width: calc(100vw - 0.75em * 2 - 0.5em - 0.2em * 2);\n  max-height: 30vh;\n  overflow: auto;\n}\n`;\n","// @ts-check\n// Constructs \"dfn panels\" which show all the local references to a dfn and a\n// self link to the selected dfn. Based on Bikeshed's dfn panels at\n// https://github.com/tabatkins/bikeshed/blob/ef44162c2e/bikeshed/dfnpanels.py\nimport css from \"../styles/dfn-panel.css.js\";\nimport { fetchBase } from \"./text-loader.js\";\nimport { html } from \"./import-maps.js\";\nimport { norm } from \"./utils.js\";\n\nexport const name = \"core/dfn-panel\";\n\nexport async function run() {\n  document.head.insertBefore(\n    html`<style>\n      ${css}\n    </style>`,\n    document.querySelector(\"link\")\n  );\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\n    \"dfn[id]:not([data-cite]), #index-defined-elsewhere .index-term\"\n  );\n  const panels = document.createDocumentFragment();\n  for (const el of elems) {\n    panels.append(createPanel(el));\n    // Make it possible to reach el by tabbing,\n    // allowing keyboard action as needed.\n    el.tabIndex = 0;\n    el.setAttribute(\"aria-haspopup\", \"dialog\");\n  }\n  document.body.append(panels);\n\n  const script = document.createElement(\"script\");\n  script.id = \"respec-dfn-panel\";\n  script.textContent = await loadScript();\n  document.body.append(script);\n}\n\n/** @param {HTMLElement} dfn */\nfunction createPanel(dfn) {\n  const { id } = dfn;\n  const href = dfn.dataset.href || `#${id}`;\n  /** @type {NodeListOf<HTMLAnchorElement>} */\n  const links = document.querySelectorAll(`a[href=\"${href}\"]:not(.index-term)`);\n\n  const panelId = `dfn-panel-for-${dfn.id}`;\n  const definition = dfn.getAttribute(\"aria-label\") || norm(dfn.textContent);\n  /** @type {HTMLElement} */\n  const panel = html`\n    <div\n      class=\"dfn-panel\"\n      id=\"${panelId}\"\n      hidden\n      role=\"dialog\"\n      aria-modal=\"true\"\n      aria-label=\"Links in this document to definition: ${definition}\"\n    >\n      <span class=\"caret\"></span>\n      <div>\n        <a\n          class=\"self-link\"\n          href=\"${href}\"\n          aria-label=\"Permalink for definition: ${definition}. Activate to close this dialog.\"\n          >Permalink</a\n        >\n        ${dfnExportedMarker(dfn)} ${idlMarker(dfn, links)}\n      </div>\n      <p><b>Referenced in:</b></p>\n      ${referencesToHTML(id, links)}\n    </div>\n  `;\n  return panel;\n}\n\n/** @param {HTMLElement} dfn */\nfunction dfnExportedMarker(dfn) {\n  if (!dfn.matches(\"dfn[data-export]\")) return null;\n  return html`<span\n    class=\"marker dfn-exported\"\n    title=\"Definition can be referenced by other specifications\"\n    >exported</span\n  >`;\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {NodeListOf<HTMLAnchorElement>} links\n */\nfunction idlMarker(dfn, links) {\n  if (!dfn.hasAttribute(\"data-idl\")) return null;\n\n  for (const anchor of links) {\n    if (anchor.dataset.linkType !== dfn.dataset.dfnType) continue;\n    const parentIdlBlock = anchor.closest(\"pre.idl\");\n    if (parentIdlBlock && parentIdlBlock.id) {\n      const href = `#${parentIdlBlock.id}`;\n      return html`<a\n        href=\"${href}\"\n        class=\"marker idl-block\"\n        title=\"Jump to IDL declaration\"\n        >IDL</a\n      >`;\n    }\n  }\n  return null;\n}\n\n/**\n * @param {string} id dfn id\n * @param {NodeListOf<HTMLAnchorElement>} links\n * @returns {HTMLUListElement}\n */\nfunction referencesToHTML(id, links) {\n  if (!links.length) {\n    return html`<ul>\n      <li>Not referenced in this document.</li>\n    </ul>`;\n  }\n\n  /** @type {Map<string, string[]>} */\n  const titleToIDs = new Map();\n  links.forEach((link, i) => {\n    const linkID = link.id || `ref-for-${id}-${i + 1}`;\n    if (!link.id) link.id = linkID;\n    const title = getReferenceTitle(link);\n    const ids = titleToIDs.get(title) || titleToIDs.set(title, []).get(title);\n    ids.push(linkID);\n  });\n\n  /**\n   * Returns a list that is easier to render in `listItemToHTML`.\n   * @param {[string, string[]]} entry an entry from `titleToIDs`\n   * @returns {{ title: string, text: string, id: string, }[]} The first list item contains\n   * title from `getReferenceTitle`, rest of items contain strings like `(2)`,\n   * `(3)` as title.\n   */\n  const toLinkProps = ([title, ids]) => {\n    return [{ title, id: ids[0], text: title }].concat(\n      ids.slice(1).map((id, i) => ({\n        title: `Reference ${i + 2}`,\n        text: `(${i + 2})`,\n        id,\n      }))\n    );\n  };\n\n  /**\n   * @param {[string, string[]]} entry\n   * @returns {HTMLLIElement}\n   */\n  const listItemToHTML = entry => {\n    return html`<li>\n      ${toLinkProps(entry).map(link => {\n        return html`<a href=\"#${link.id}\" title=\"${link.title}\">${link.text}</a\n          >${\" \"}`;\n      })}\n    </li>`;\n  };\n\n  return html`<ul>\n    ${[...titleToIDs].map(listItemToHTML)}\n  </ul>`;\n}\n\n/** @param {HTMLAnchorElement} link */\nfunction getReferenceTitle(link) {\n  const section = link.closest(\"section\");\n  if (!section) return null;\n  const heading = section.querySelector(\"h1, h2, h3, h4, h5, h6\");\n  if (!heading) return null;\n  return `§ ${norm(heading.textContent)}`;\n}\n\nasync function loadScript() {\n  try {\n    return (await import(\"text!./dfn-panel.runtime.js\")).default;\n  } catch {\n    return fetchBase(\"./src/core/dfn-panel.runtime.js\");\n  }\n}\n","const css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\nvar {\n  position: relative;\n  cursor: pointer;\n}\n\nvar[data-type]::before,\nvar[data-type]::after {\n  position: absolute;\n  left: 50%;\n  top: -6px;\n  opacity: 0;\n  transition: opacity 0.4s;\n  pointer-events: none;\n}\n\n/* the triangle or arrow or caret or whatever */\nvar[data-type]::before {\n  content: \"\";\n  transform: translateX(-50%);\n  border-width: 4px 6px 0 6px;\n  border-style: solid;\n  border-color: transparent;\n  border-top-color: #222;\n}\n\n/* actual text */\nvar[data-type]::after {\n  content: attr(data-type);\n  transform: translateX(-50%) translateY(-100%);\n  background: #222;\n  text-align: center;\n  /* additional styling */\n  font-family: \"Dank Mono\", \"Fira Code\", monospace;\n  font-style: normal;\n  padding: 6px;\n  border-radius: 3px;\n  color: #daca88;\n  text-indent: 0;\n  font-weight: normal;\n}\n\nvar[data-type]:hover::after,\nvar[data-type]:hover::before {\n  opacity: 1;\n}\n`;\n","// @ts-check\n/**\n * Module core/data-type\n * Propagates data type of a <var> to subsequent instances within a section.\n * Also adds the CSS for the data type tooltip.\n * Set `conf.highlightVars = true` to enable.\n */\nimport css from \"../styles/datatype.css.js\";\n\nexport const name = \"core/data-type\";\n\nexport function run(conf) {\n  if (!conf.highlightVars) {\n    return;\n  }\n\n  const style = document.createElement(\"style\");\n  style.textContent = css;\n  document.head.appendChild(style);\n\n  let section = null;\n  const varMap = new Map();\n  /** @type {NodeListOf<HTMLElement>} */\n  const variables = document.querySelectorAll(\"section var\");\n  for (const varElem of variables) {\n    const currentSection = varElem.closest(\"section\");\n    if (section !== currentSection) {\n      section = currentSection;\n      varMap.clear();\n    }\n    if (varElem.dataset.type) {\n      varMap.set(varElem.textContent.trim(), varElem.dataset.type);\n      continue;\n    }\n    const type = varMap.get(varElem.textContent.trim());\n    if (type) varElem.dataset.type = type;\n  }\n}\n","/* For assertions in lists containing algorithms */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\n:root {\n  --assertion-border: #aaa;\n  --assertion-bg: #eee;\n  --assertion-text: black;\n}\n\n.assert {\n  border-left: 0.5em solid #aaa;\n  padding: 0.3em;\n  border-color: #aaa;\n  border-color: var(--assertion-border);\n  background: #eee;\n  background: var(--assertion-bg);\n  color: black;\n  color: var(--assertion-text);\n}\n\n/* There's no way to adapt this to \"manual\" theme toggle yet. */\n@media (prefers-color-scheme: dark) {\n  :root {\n    --assertion-border: #444;\n    --assertion-bg: var(--borderedblock-bg);\n    --assertion-text: var(--text);\n  }\n}\n`;\n","// @ts-check\n/**\nCurrently used only for adding 'assert' class to algorithm lists\n*/\nimport css from \"../styles/algorithms.css.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/algorithms\";\n\nexport function run() {\n  const elements = Array.from(\n    /** @type {NodeListOf<HTMLLIElement>} */ (\n      document.querySelectorAll(\"ol.algorithm li\")\n    )\n  ).filter(li => li.textContent.trim().startsWith(\"Assert: \"));\n  if (!elements.length) {\n    return;\n  }\n\n  for (const li of elements) {\n    li.classList.add(\"assert\");\n\n    // Link \"Assert\" to https://infra.spec.whatwg.org/#assert\n    const textNode = li.firstChild;\n    if (\n      textNode instanceof Text &&\n      textNode.textContent.startsWith(\"Assert: \")\n    ) {\n      textNode.textContent = textNode.textContent.replace(\"Assert: \", \"\");\n      li.prepend(\n        html`<a href=\"https://infra.spec.whatwg.org/#assert\">Assert</a>`,\n        \": \"\n      );\n    }\n  }\n\n  const style = document.createElement(\"style\");\n  style.textContent = css;\n  document.head.appendChild(style);\n}\n","// @ts-check\n// expands empty anchors based on their context.\n// Custom impl as core doesn't write \"§\\u00A0\" properly\nimport { makeSafeCopy, norm, renameElement, showError } from \"../core/utils.js\";\n\nexport const name = \"1edtech/anchor-expander\";\n\nexport function run() {\n  /** @type {NodeListOf<HTMLElement>} */\n  const anchorElements = document.querySelectorAll(\n    \"a[href^='#']:not(.self-link):not([href$='the-empty-string'])\"\n  );\n  const anchors = [...anchorElements].filter(a => a.textContent.trim() === \"\");\n  for (const a of anchors) {\n    const id = a.getAttribute(\"href\").slice(1);\n    const matchingElement = document.getElementById(id);\n    if (!matchingElement) {\n      a.textContent = a.getAttribute(\"href\");\n      const msg = `Couldn't expand inline reference. The id \"${id}\" is not in the document.`;\n      const title = `No matching id in document: ${id}.`;\n      showError(msg, name, { title, elements: [a] });\n      continue;\n    }\n    switch (matchingElement.localName) {\n      case \"h6\":\n      case \"h5\":\n      case \"h4\":\n      case \"h3\":\n      case \"h2\": {\n        processHeading(matchingElement, a);\n        break;\n      }\n      case \"section\": {\n        // find first heading in the section\n        processSection(matchingElement, id, a);\n        break;\n      }\n      case \"figure\": {\n        processFigure(matchingElement, id, a);\n        break;\n      }\n      case \"table\": {\n        processTable(matchingElement, id, a);\n        break;\n      }\n      case \"aside\":\n      case \"div\": {\n        processBox(matchingElement, id, a);\n        break;\n      }\n      default: {\n        a.textContent = a.getAttribute(\"href\");\n        const msg = \"ReSpec doesn't support expanding this kind of reference.\";\n        const title = `Can't expand \"#${id}\".`;\n        showError(msg, name, { title, elements: [a] });\n      }\n    }\n    localize(matchingElement, a);\n    a.normalize();\n  }\n}\n\nfunction processBox(matchingElement, id, a) {\n  const selfLink = matchingElement.querySelector(\".marker .self-link\");\n  if (!selfLink) {\n    a.textContent = a.getAttribute(\"href\");\n    const msg = `Found matching element \"${id}\", but it has no title or marker.`;\n    const title = \"Missing title.\";\n    showError(msg, name, { title, elements: [a] });\n    return;\n  }\n  const copy = makeSafeCopy(selfLink);\n  a.append(...copy.childNodes);\n  a.classList.add(\"box-ref\");\n}\n\nfunction processFigure(matchingElement, id, a) {\n  const figcaption = matchingElement.querySelector(\"figcaption\");\n  if (!figcaption) {\n    a.textContent = a.getAttribute(\"href\");\n    const msg = `Found matching figure \"${id}\", but figure is lacking a \\`<figcaption>\\`.`;\n    const title = \"Missing figcaption in referenced figure.\";\n    showError(msg, name, { title, elements: [a] });\n    return;\n  }\n  // get figure label and remove the fig-number class\n  const children = [\n    ...makeSafeCopy(figcaption.querySelector(\".self-link\")).childNodes,\n  ].map(node => {\n    // @ts-ignore\n    node.classList?.remove(\"figno\");\n    return node;\n  });\n  a.append(...children);\n  a.classList.add(\"fig-ref\");\n  const figTitle = figcaption.querySelector(\".fig-title\");\n  if (!a.hasAttribute(\"title\") && figTitle) {\n    a.title = norm(figTitle.textContent);\n  }\n}\n\nfunction processTable(matchingTable, id, a) {\n  if (!matchingTable.classList.contains(\"numbered\")) {\n    return;\n  }\n  const caption = matchingTable.querySelector(\"caption\");\n  if (!caption) {\n    a.textContent = a.getAttribute(\"href\");\n    const msg = `Found matching table \"${id}\", but table is lacking a \\`<caption>\\`.`;\n    const title = \"Missing caption in referenced table.\";\n    showError(msg, name, { title, elements: [a] });\n    return;\n  }\n\n  // get table label and remove the fig-number class\n  const children = [\n    ...makeSafeCopy(caption.querySelector(\".self-link\")).childNodes,\n  ].map(node => {\n    // @ts-ignore\n    // @ts-ignore\n    node.classList?.remove(\"tableno\");\n    return node;\n  });\n  a.append(...children);\n  a.classList.add(\"table-ref\");\n  const tableTitle = caption.querySelector(\".table-title\");\n  if (!a.hasAttribute(\"title\") && tableTitle) {\n    a.title = norm(tableTitle.textContent);\n  }\n}\n\nfunction processSection(matchingElement, id, a) {\n  const heading = matchingElement.querySelector(\"h6, h5, h4, h3, h2\");\n  if (!heading) {\n    a.textContent = a.getAttribute(\"href\");\n    const msg =\n      \"Found matching section, but the section was lacking a heading element.\";\n    const title = `No matching id in document: \"${id}\".`;\n    showError(msg, name, { title, elements: [a] });\n    return;\n  }\n  processHeading(heading, a);\n  localize(heading, a);\n}\n\nfunction processHeading(heading, a) {\n  const hadSelfLink = heading.parentNode.querySelector(\".self-link\");\n  const children = [...makeSafeCopy(heading).childNodes].filter(\n    // @ts-ignore\n    node => !node.classList || !node.classList.contains(\"self-link\")\n  );\n  a.append(...children);\n  if (hadSelfLink) a.prepend(\"§\\u00A0\");\n  a.classList.add(\"sec-ref\");\n  // Trim stray whitespace of the last text node (see bug #3265).\n  if (a.lastChild.nodeType === Node.TEXT_NODE) {\n    a.lastChild.textContent = a.lastChild.textContent.trimEnd();\n  }\n  // Replace all inner anchors for span elements (see bug #3136)\n  a.querySelectorAll(\"a\").forEach(a => {\n    const span = renameElement(a, \"span\");\n    // Remove the old attributes\n    for (const attr of [...span.attributes]) {\n      span.removeAttributeNode(attr);\n    }\n  });\n}\n\nfunction localize(matchingElement, newElement) {\n  for (const attrName of [\"dir\", \"lang\"]) {\n    // Already set on element, don't override.\n    if (newElement.hasAttribute(attrName)) continue;\n\n    // Closest in tree setting the attribute\n    const matchingClosest = matchingElement.closest(`[${attrName}]`);\n    if (!matchingClosest) continue;\n\n    // Closest to reference setting the attribute\n    const newClosest = newElement.closest(`[${attrName}]`);\n\n    // It's the same, so already inherited from closest (probably HTML element or body).\n    if (\n      newClosest &&\n      newClosest.getAttribute(attrName) ===\n        matchingClosest.getAttribute(attrName)\n    )\n      continue;\n    // Otherwise, set it.\n    newElement.setAttribute(attrName, matchingClosest.getAttribute(attrName));\n  }\n}\n","// @ts-check\n/**\n * Fetches commits between two commitish (tag or commit) - `from` and `to=HEAD`\n * and shows them as a list of \"changes during\" those commitish. If a filter\n * function is provided by the user, it is used to filter the commits that are\n * to be shown. Otherwise, all commits are shown.\n *\n * @typedef {{message: string, hash: string}} Commit\n */\nimport { github } from \"../github.js\";\nimport { html } from \"../import-maps.js\";\nimport { showError } from \"../utils.js\";\n\nexport const name = \"rs-changelog\";\n\nexport const element = class ChangelogElement extends HTMLElement {\n  constructor() {\n    super();\n    this.props = {\n      from: this.getAttribute(\"from\"),\n      to: this.getAttribute(\"to\") || \"HEAD\",\n      /** @type {(commit: Commit) => boolean} */\n      filter:\n        typeof window[this.getAttribute(\"filter\")] === \"function\"\n          ? window[this.getAttribute(\"filter\")]\n          : () => true,\n    };\n  }\n\n  connectedCallback() {\n    const { from, to, filter } = this.props;\n    html.bind(this)`\n      <ul>\n      ${{\n        any: fetchCommits(from, to, filter)\n          .then(commits => toHTML(commits))\n          .catch(error => showError(error.message, name, { elements: [this] }))\n          .finally(() => {\n            this.dispatchEvent(new CustomEvent(\"done\"));\n          }),\n        placeholder: \"Loading list of commits...\",\n      }}\n      </ul>\n    `;\n  }\n};\n\nasync function fetchCommits(from, to, filter) {\n  /** @type {Commit[]} */\n  let commits;\n  try {\n    const gh = await github;\n    if (!gh) {\n      throw new Error(\"`respecConfig.github` is not set\");\n    }\n    const url = new URL(\"commits\", `${gh.apiBase}/${gh.fullName}/`);\n    url.searchParams.set(\"from\", from);\n    url.searchParams.set(\"to\", to);\n\n    const res = await fetch(url.href);\n    if (!res.ok) {\n      throw new Error(\n        `Request to ${url} failed with status code ${res.status}`\n      );\n    }\n    commits = await res.json();\n    if (!commits.length) {\n      throw new Error(`No commits between ${from}..${to}.`);\n    }\n    commits = commits.filter(filter);\n  } catch (error) {\n    const msg = `Error loading commits from GitHub. ${error.message}`;\n    console.error(error);\n    throw new Error(msg);\n  }\n  return commits;\n}\n\nasync function toHTML(commits) {\n  const { repoURL } = await github;\n  return commits.map(commit => {\n    const [message, prNumber = null] = commit.message.split(/\\(#(\\d+)\\)/, 2);\n    const commitURL = `${repoURL}commit/${commit.hash}`;\n    const prURL = prNumber ? `${repoURL}pull/${prNumber}` : null;\n    const pr = prNumber && html` (<a href=\"${prURL}\">#${prNumber}</a>)`;\n    return html`<li><a href=\"${commitURL}\">${message.trim()}</a>${pr}</li>`;\n  });\n}\n","// @ts-check\n/**\n * Registers custom elements and waits for them to finish their processing.\n *\n * Every custom element file exports:\n * - `name`: registered name of the custom element, prefixed with `rs-`.\n * - `element`: class defintion of the custom element.\n *\n * Every custom element must dispatch a CustomEvent 'done' that tells the\n * element has finished its processing, with or without errors.\n *\n * @typedef {{ name: string, element: CustomElementConstructor }} CustomElementDfn\n */\n\nimport * as changelog from \"./rs-changelog.js\";\n/** @type {CustomElementDfn[]} */\nconst CUSTOM_ELEMENTS = [changelog];\n\nexport const name = \"core/custom-elements/index\";\n\nexport async function run() {\n  // prepare and register elements\n  CUSTOM_ELEMENTS.forEach(el => {\n    customElements.define(el.name, el.element);\n  });\n\n  // wait for each element to be ready\n  const selectors = CUSTOM_ELEMENTS.map(el => el.name).join(\", \");\n  const elems = document.querySelectorAll(selectors);\n  const readyPromises = [...elems].map(\n    el => new Promise(res => el.addEventListener(\"done\", res, { once: true }))\n  );\n  await Promise.all(readyPromises);\n}\n","// @ts-check\nexport const name = \"1edtech/cleanBody\";\n\n/**\n * A snapshot-time body merciless script and inline css remover. Intended to\n * be used only by admins. The activators are conf.cleanBodyScripts,\n * conf.cleanBodyCSS, alternatively conf.cleanBodyAll\n *\n * @param {*} conf respecConfig\n */\nexport async function run(conf) {\n  if (conf.cleanBodyAll || conf.cleanBodyScripts) {\n    const scripts = document.body.querySelectorAll(\"script\");\n    scripts.forEach(script => {\n      script.parentNode.removeChild(script);\n    });\n  }\n\n  if (conf.cleanBodyAll || conf.cleanBodyCSS) {\n    const styleElems = document.querySelectorAll(\"*[style]\");\n    styleElems.forEach(styleElem => {\n      styleElem.removeAttribute(\"style\");\n    });\n  }\n}\n","// @ts-check\n\nexport const name = \"1edtech/title-attrs\";\n\n/**\n * Adds title attributes to internal definition references. When the\n * reader hovers over the defined term, they will see the definition.\n *\n * If the term is defined in a definition list, the definiton is pulled\n * from the definition description element. For example,\n *\n * <dl>\n *   <dt><dfn>Term</dfn></dt>\n *   <dd>This is my term.</dd>\n * </dl>\n *\n * If the term is defined outside of a defintion list, the definition is\n * pulled from the nearest ancestor p, td, li, div, or aside. For example,\n *\n * <p>\n *   This is my <dfn>Term</dfn>.\n * <p>\n *\n * @param {*} conf respecConfig\n */\nexport async function run(conf) {\n  if (conf.noTitleAttrs) {\n    return;\n  }\n\n  // for now we deal only with a.internalDFN, whose title attr value is\n  // fetched from the destination link\n\n  const anchors = document.body.querySelectorAll(\"a[href].internalDFN\");\n  anchors.forEach(anchor => {\n    const selector = anchor.getAttribute(\"href\");\n    const dfn = document.body.querySelector(selector);\n    if (dfn && dfn.tagName === \"DFN\") {\n      let text = \"\";\n      if (hasAncestor(dfn, \"dt\")) {\n        // get the text content of the dd\n        const dt = dfn.closest(\"dt\");\n        const dd = dt.nextElementSibling;\n        if (dd && dd.tagName === \"DD\") {\n          text = dd.textContent;\n        }\n      } else {\n        // get the text content of the neareset dfn block(?) parent\n        const blockishParent = dfn.closest(\"p, td, li, div, aside\");\n        if (blockishParent) {\n          text = blockishParent.textContent;\n        }\n      }\n\n      if (text.length > 0) {\n        // console.log(text);\n        text = text.replace(/^(\\s*)|(\\s*)$/g, \"\").replace(/\\s+/g, \" \");\n        const ttl = document.createAttribute(\"title\");\n        ttl.value = text;\n        anchor.setAttributeNode(ttl);\n      }\n    }\n  });\n}\n\nfunction hasAncestor(element, ancestorName) {\n  const anc = element.closest(ancestorName);\n  return anc != null;\n}\n","// @ts-check\nexport const name = \"1edtech/scripts\";\n\n/**\n * Attach fixup script.\n *\n * @param {*} conf respecConfig\n */\nexport async function run(conf) {\n  if (!conf.noSideBarTOC) {\n    // 1EdTech canonical location\n    let fixupURL = \"https://purl.imsglobal.org/spec/fixup.js\";\n    if (conf.overrideFixupLocation) {\n      fixupURL = conf.overrideFixupLocation;\n    }\n    attachScript(fixupURL);\n  } else {\n    document.body.className += \" toc-inline\";\n  }\n}\n\n/**\n * Append the script to the document.\n *\n * @param {string} url the URL of the script to attach\n */\nfunction attachScript(url) {\n  const script = document.createElement(\"script\");\n  script.addEventListener(\n    \"load\",\n    () => {\n      if (window.location.hash) {\n        // eslint-disable-next-line\n        window.location = window.location;\n      }\n    },\n    { once: true }\n  );\n  script.src = url;\n  document.body.appendChild(script);\n}\n","// @ts-check\n\nexport const name = \"1edtech/comments\";\n\n/**\n * Remove all comment nodes.\n */\nexport async function run() {\n  const nodeIterator = document.createNodeIterator(\n    document.documentElement,\n    NodeFilter.SHOW_COMMENT\n  );\n  const comments = [];\n  let currentNode;\n\n  while ((currentNode = nodeIterator.nextNode())) {\n    comments.push(currentNode);\n  }\n\n  comments.forEach(comment => {\n    comment.parentElement.removeChild(comment);\n  });\n}\n","// Module 1edtech/focus-code\n// Make code nodes focusable byt setting their tabindex to 0.\n// This prevents a11y errors\nexport const name = \"1edtech/focus-code\";\n\n/**\n * @param {*} conf\n */\nexport async function run(conf) {\n  const codes = document.body.querySelectorAll(\"pre code\");\n  codes.forEach(code => {\n    code.tabIndex = 0;\n  });\n}\n\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { getIntlData } from \"../../core/utils.js\";\n\nimport localizationStrings from \"../translations/footers.js\";\nconst l10n = getIntlData(localizationStrings);\n\nexport default conf => {\n  return html`<footer>\n    <div id=\"endWarranty\">\n      <p>1EdTech&reg; Consortium, Inc. (\"1EdTech\") ${l10n.warranty_1}</p>\n      <p>${l10n.warranty_2}</p>\n      <p>${l10n.warranty_3}</p>\n      <p>${l10n.warranty_4}</p>\n      <p>${l10n.warranty_5}</p>\n      <p>${l10n.warranty_6}</p>\n      <p>\n        ${l10n.contact_url} <a href=\"https://www.1edtech.org\">www.1edtech.org</a>\n      </p>\n      <p>\n        ${l10n.contact_document}: ${conf.specTitle.replace(\"<br/>\", \" \")}\n        ${conf.specVersion}\n      </p>\n      <p>${l10n.contact_date}: ${conf.specDate}</p>\n      <div></div>\n    </div>\n  </footer>`;\n};\n","export default {\n  en: {\n    warranty_1: \"is publishing the information contained in this document (\\\"Specification\\\") for purposes of scientific, experimental, and scholarly collaboration only.\",\n    warranty_2: \"1EdTech makes no warranty or representation regarding the accuracy or completeness of the Specification.\",\n    warranty_3: \"This material is provided on an \\\"As Is\\\" and \\\"As Available\\\" basis.\",\n    warranty_4: \"The Specification is at all times subject to change and revision without notice.\",\n    warranty_5: \"It is your sole responsibility to evaluate the usefulness, accuracy, and completeness of the Specification as it relates to you.\",\n    warranty_6: \"1EdTech would appreciate receiving your comments and suggestions.\",\n    contact_url: \"Please contact 1EdTech through our website at\",\n    contact_document: \"Please refer to Document Name\",\n    contact_date: \"Date\"\n  },\n  es: {\n    warranty_1: \"publica la información contenida en este documento (\\\"Especificación\\\") solo con fines de colaboración científica, experimental y académica.\",\n    warranty_2: \"1EdTech no ofrece ninguna garantía ni representación con respecto a la exactitud o integridad de la Especificación.\",\n    warranty_3: \"Este material se proporciona tal cual.\",\n    warranty_4: \"La especificación está sujeta en todo momento a cambios y revisiones sin previo aviso.\",\n    warranty_5: \"Es su exclusiva responsabilidad evaluar la utilidad, precisión e integridad de la Especificación en lo que respecta a usted.\",\n    warranty_6: \"1EdTech agradecería recibir sus comentarios y sugerencias.\",\n    contact_url: \"Póngase en contacto con 1EdTech a través de nuestro sitio web en\",\n    contact_document: \"Por favor mencione el Nombre del Documento\",\n    contact_date: \"Fecha\"\n  },\n  ca: {\n    warranty_1: \"publica la informació continguda en aquest document (\\\"Especificació\\\") només amb finalitats de col·laboració científica, experimental i acadèmica.\",\n    warranty_2: \"1EdTech no ofereix cap garantia ni representació sobre l'exactitud o integritat de l'especificació.\",\n    warranty_3: \"Este material se proporciona tal cual.\",\n    warranty_4: \"L'Especificació està en tot moment subjecta a canvis i revisions sense previ avís.\",\n    warranty_5: \"És la seva única responsabilitat avaluar la utilitat, exactitud i integritat de l'especificació tal com es relaciona amb vostè.\",\n    warranty_6: \"1EdTech agrairia rebre els seus comentaris i suggeriments.\",\n    contact_url: \"Contacteu amb 1EdTech a través de la nostra pàgina web\",\n    contact_document: \"Si us plau, mencioni el Nom del Document\",\n    contact_date: \"Data\"\n  }\n};\n","/* eslint-disable prettier/prettier */\n// @ts-check\n/**\n * Module 1edtech/footers\n * \n * Add 1EdTech boilerplate back matter to the document.\n */\n\nimport footersTmpl from \"./templates/footers.js\";\n\nexport const name = \"1edtech/footers\";\n\n/**\n * @param {*} conf\n */\nexport async function run(conf) {\n\n  const footer = footersTmpl(conf);\n  document.body.appendChild(footer);\n}\n","// @ts-check\n/**\n * Checks whether the document has `<meta charset=\"utf-8\">` properly.\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"check-charset\";\nexport const name = \"core/linter-rules/check-charset\";\n\nconst localizationStrings = {\n  en: {\n    msg: `Document must only contain one \\`<meta>\\` tag with charset set to 'utf-8'`,\n    hint: `Add this line in your document \\`<head>\\` section - \\`<meta charset=\"utf-8\">\\` or set charset to \"utf-8\" if not set already.`,\n  },\n  zh: {\n    msg: `文档只能包含一个 charset 属性为 utf-8 的 \\`<meta>\\` 标签`,\n    hint: `将此行添加到文档的 \\`<head>\\` 部分—— \\`<meta charset=\"utf-8\">\\` 或将 charset 设置为 utf-8（如果尚未设置）。`,\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  /** @type {NodeListOf<HTMLMetaElement>} */\n  const metas = document.querySelectorAll(\"meta[charset]\");\n  const val = [];\n  for (const meta of metas) {\n    val.push(meta.getAttribute(\"charset\").trim().toLowerCase());\n  }\n  const utfExists = val.includes(\"utf-8\");\n\n  // only a single meta[charset] and is set to utf-8, correct case\n  if (utfExists && metas.length === 1) {\n    return;\n  }\n  // if more than one meta[charset] tag defined along with utf-8\n  // or\n  // no meta[charset] present in the document\n  showWarning(l10n.msg, name, { hint: l10n.hint, elements: [...metas] });\n}\n","// @ts-check\n/**\n * Linter rule \"check-punctuation\". Makes sure the there are no punctuations missing at the end of a <p>.\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"check-punctuation\";\nexport const name = \"core/linter-rules/check-punctuation\";\n\nconst punctuationMarks = [\".\", \":\", \"!\", \"?\"];\nconst humanMarks = punctuationMarks.map(mark => `\"${mark}\"`).join(\", \");\n\nconst localizationStrings = {\n  en: {\n    msg: \"`p` elements should end with a punctuation mark.\",\n    hint: `Please make sure \\`p\\` elements end with one of: ${humanMarks}.`,\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  // Check string ends with one of ., !, ?, :, ], or is empty.\n  const punctuatingRegExp = new RegExp(\n    `[${punctuationMarks.join(\"\")}\\\\]]$|^ *$`,\n    \"m\"\n  );\n\n  /** @type {NodeListOf<HTMLParagraphElement>} */\n  const elems = document.querySelectorAll(\"p:not(#back-to-top,#w3c-state)\");\n  const offendingElements = [...elems].filter(\n    elem => !punctuatingRegExp.test(elem.textContent.trim())\n  );\n\n  if (!offendingElements.length) {\n    return;\n  }\n  showWarning(l10n.msg, name, { hint: l10n.hint, elements: offendingElements });\n}\n","// @ts-check\n/**\n * Linter rule \"check-internal-slots\".\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"check-internal-slots\";\nexport const name = \"core/linter-rules/check-internal-slots\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"Internal slots should be preceded by a '.'\",\n    hint: \"Add a '.' between the elements mentioned.\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  /** @type {NodeListOf<HTMLAnchorElement>} */\n  const elems = document.querySelectorAll(\"var+a\");\n  const offendingElements = [...elems].filter(\n    ({ previousSibling: { nodeName } }) => {\n      const isPrevVar = nodeName && nodeName === \"VAR\";\n      return isPrevVar;\n    }\n  );\n\n  if (!offendingElements.length) {\n    return;\n  }\n\n  showWarning(l10n.msg, name, { hint: l10n.hint, elements: offendingElements });\n}\n","// @ts-check\n/**\n * Linter rule \"warn-local-ref\".\n * Warns about href's that link to nonexistent id's in a spec\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"local-refs-exist\";\nexport const name = \"core/linter-rules/local-refs-exist\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"Broken local reference found in document.\",\n    hint: \"Please fix the links mentioned.\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  /** @type {NodeListOf<HTMLAnchorElement>} */\n  const elems = document.querySelectorAll(\"a[href^='#']\");\n  const offendingElements = [...elems].filter(isBrokenHyperlink);\n  if (offendingElements.length) {\n    showWarning(l10n.msg, name, {\n      hint: l10n.hint,\n      elements: offendingElements,\n    });\n  }\n}\n\nfunction isBrokenHyperlink(elem) {\n  const id = elem.getAttribute(\"href\").substring(1);\n  const doc = elem.ownerDocument;\n  return !doc.getElementById(id) && !doc.getElementsByName(id).length;\n}\n","// @ts-check\n/**\n * Linter rule \"no-headingless-sections\".\n *\n * Checks that there are no sections in the document that don't start\n * with a heading element (h1-6).\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"no-headingless-sections\";\nexport const name = \"core/linter-rules/no-headingless-sections\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"All sections must start with a `h2-6` element.\",\n    hint: \"Add a `h2-6` to the offending section or use a `<div>`.\",\n  },\n  nl: {\n    msg: \"Alle secties moeten beginnen met een `h2-6` element.\",\n    hint: \"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `<div>`.\",\n  },\n  zh: {\n    msg: \"所有章节（section）都必须以 `h2-6` 元素开头。\",\n    hint: \"将 `h2-6` 添加到有问题的章节或使用 `<div>`。\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n  /** @type {NodeListOf<HTMLElement>} */\n  const sections = document.querySelectorAll(\n    \"section:not(.head,#abstract,#sotd)\"\n  );\n  const offendingElements = [...sections].filter(\n    ({ firstElementChild: e }) =>\n      !e ||\n      // no header wrapper and the first child is not a heading\n      !(e.matches(\".header-wrapper\") || e instanceof HTMLHeadingElement)\n  );\n\n  if (!offendingElements.length) return;\n\n  showWarning(l10n.msg, name, {\n    hint: l10n.hint,\n    elements: offendingElements,\n  });\n}\n","// @ts-check\n/**\n * Linter rule \"no-unused-vars\".\n *\n * Checks that an variable is used if declared (the first use is treated as\n * declaration).\n */\nimport { getIntlData, norm, showWarning } from \"../utils.js\";\n\nconst ruleName = \"no-unused-vars\";\nexport const name = \"core/linter-rules/no-unused-vars\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"Variable was defined, but never used.\",\n    hint: \"Add a `data-ignore-unused` attribute to the `<var>`.\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  const offendingElements = [];\n\n  /**\n   * Check if a <section> contains a `\".algorithm\"`\n   *\n   * The selector matches:\n   * ``` html\n   * <section><ul class=\"algorithm\"></ul></section>\n   * <section><div><ul class=\"algorithm\"></ul></div></section>\n   * ```\n   * The selector does not match:\n   * ``` html\n   * <section><section><ul class=\"algorithm\"></ul></section></section>\n   * ```\n   * @param {HTMLElement} section\n   */\n  const sectionContainsAlgorithm = section =>\n    !!section.querySelector(\n      \":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm\"\n    );\n\n  for (const section of document.querySelectorAll(\"section\")) {\n    if (!sectionContainsAlgorithm(section)) continue;\n\n    /**\n     * `<var>` in this section, but excluding those in child sections.\n     * @type {NodeListOf<HTMLElement>}\n     */\n    const varElems = section.querySelectorAll(\":scope > :not(section) var\");\n    if (!varElems.length) continue;\n\n    /** @type {Map<string, HTMLElement[]>} */\n    const varUsage = new Map();\n    for (const varElem of varElems) {\n      const key = norm(varElem.textContent);\n      const elems = varUsage.get(key) || varUsage.set(key, []).get(key);\n      elems.push(varElem);\n    }\n\n    for (const vars of varUsage.values()) {\n      if (vars.length === 1 && !vars[0].hasAttribute(\"data-ignore-unused\")) {\n        offendingElements.push(vars[0]);\n      }\n    }\n  }\n\n  if (offendingElements.length) {\n    showWarning(l10n.msg, name, {\n      hint: l10n.hint,\n      elements: offendingElements,\n    });\n  }\n}\n","// @ts-check\n/**\n * Checks that there is a section that has at least privacy and/or\n * security and considerations.\n *\n * The rule is \"privacy\" or \"security\", and \"considerations\", in any order,\n * case-insensitive, multi-line check.\n *\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"privsec-section\";\nexport const name = \"core/linter-rules/privsec-section\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"Document must have a 'Privacy and/or Security' Considerations section.\",\n    hint:\n      \"Add a privacy and/or security considerations section. \" +\n      \"See the [Self-Review Questionnaire](https://w3ctag.github.io/security-questionnaire/).\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nfunction hasPriSecConsiderations(doc) {\n  return Array.from(doc.querySelectorAll(\"h2, h3, h4, h5, h6\")).some(\n    ({ textContent: text }) => {\n      const saysPrivOrSec = /(privacy|security)/im.test(text);\n      const saysConsiderations = /(considerations)/im.test(text);\n      return (saysPrivOrSec && saysConsiderations) || saysPrivOrSec;\n    }\n  );\n}\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  if (conf.isRecTrack && !hasPriSecConsiderations(document)) {\n    showWarning(l10n.msg, name, { hint: l10n.hint });\n  }\n}\n","// @ts-check\n/**\n * Linter rule \"wpt-tests-exist\".\n * Warns about nonexistent web platform tests.\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"wpt-tests-exist\";\nexport const name = \"core/linter-rules/wpt-tests-exist\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"The following test could not be found in Web Platform Tests:\",\n    hint: \"Check [wpt.live](https://wpt.live) to see if it was deleted or renamed.\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  const filesInWPT = await getFilesInWPT(conf.testSuiteURI, conf.githubAPI);\n  if (!filesInWPT) {\n    return;\n  }\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const elems = document.querySelectorAll(\"[data-tests]\");\n  const testables = [...elems].filter(elem => elem.dataset.tests);\n\n  for (const elem of testables) {\n    elem.dataset.tests\n      .split(/,/gm)\n      .map(test => test.trim().split(\"#\")[0])\n      .filter(test => test && !filesInWPT.has(test))\n      .map(missingTest => {\n        showWarning(`${l10n.msg} \\`${missingTest}\\`.`, name, {\n          hint: l10n.hint,\n          elements: [elem],\n        });\n      });\n  }\n}\n\n/**\n * @param {string} testSuiteURI\n * @param {string} githubAPIBase\n */\nasync function getFilesInWPT(testSuiteURI, githubAPIBase) {\n  let wptDirectory;\n  try {\n    const testSuiteURL = new URL(testSuiteURI);\n    if (\n      testSuiteURL.pathname.startsWith(\"/web-platform-tests/wpt/tree/master/\")\n    ) {\n      const re = /web-platform-tests\\/wpt\\/tree\\/master\\/(.+)/;\n      wptDirectory = testSuiteURL.pathname.match(re)[1].replace(/\\//g, \"\");\n    } else {\n      wptDirectory = testSuiteURL.pathname.replace(/\\//g, \"\");\n    }\n  } catch (error) {\n    const msg = \"Failed to parse WPT directory from testSuiteURI\";\n    showWarning(msg, `linter/${name}`);\n    console.error(error);\n    return null;\n  }\n\n  const url = new URL(\"web-platform-tests/wpt/files\", `${githubAPIBase}/`);\n  url.searchParams.set(\"path\", wptDirectory);\n\n  const response = await fetch(url);\n  if (!response.ok) {\n    const error = await response.text();\n    const msg =\n      \"Failed to fetch files from WPT repository. \" +\n      `Request failed with error: ${error} (${response.status})`;\n    showWarning(msg, `linter/${name}`);\n    return null;\n  }\n  /** @type {{ entries: string[] }} */\n  const { entries } = await response.json();\n  const files = entries.filter(entry => !entry.endsWith(\"/\"));\n  return new Set(files);\n}\n","// @ts-check\n/**\n * Linter rule \"no-http-props\". Makes sure the there are no URLs that\n * start with http:// in the ReSpec config.\n */\nimport { docLink, getIntlData, joinAnd, showWarning } from \"../utils.js\";\n\nconst ruleName = \"no-http-props\";\nexport const name = \"core/linter-rules/no-http-props\";\n\nconst localizationStrings = {\n  en: {\n    msg: docLink`Insecure URLs are not allowed in ${\"[respecConfig]\"}.`,\n    hint: \"Please change the following properties to 'https://': \",\n  },\n  zh: {\n    msg: docLink`${\"[respecConfig]\"} 中不允许使用不安全的URL.`,\n    hint: \"请将以下属性更改为 https://：\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  // We can only really perform this check over http/https\n  // Using parent's location as tests are loaded in iframe as a srcdoc.\n  if (!parent.location.href.startsWith(\"http\")) {\n    return;\n  }\n\n  const offendingMembers = Object.getOwnPropertyNames(conf)\n    // this check is cheap, \"prevED\" is w3c exception.\n    .filter(key => (key.endsWith(\"URI\") && conf[key]) || key === \"prevED\")\n    // this check is expensive, so separate step\n    .filter(key =>\n      new URL(conf[key], parent.location.href).href.startsWith(\"http://\")\n    );\n\n  if (offendingMembers.length) {\n    const keys = joinAnd(offendingMembers, key => docLink`${`[${key}]`}`);\n    showWarning(l10n.msg, name, { hint: l10n.hint + keys });\n  }\n}\n","// @ts-check\n/**\n * Lints for accessibility issues using axe-core package.\n */\n\nimport { showError, showWarning } from \"../utils.js\";\n\nexport const name = \"core/linter-rules/a11y\";\n\nconst DISABLED_RULES = [\n  \"color-contrast\", // too slow 🐢\n  \"landmark-one-main\", // need to add a <main>, else it marks entire page as errored\n  \"landmark-unique\",\n  \"region\",\n];\n\nexport async function run(conf) {\n  if (!conf.lint?.a11y && /** legacy */ !conf.a11y) {\n    return;\n  }\n  const config = conf.lint?.a11y || /** legacy */ conf.a11y;\n\n  const options = config === true ? {} : config;\n  const violations = await getViolations(options);\n  for (const violation of violations) {\n    /**\n     * We're grouping by failureSummary as it contains hints to fix the issue.\n     * For example, with color-constrast rule, it tells about the present color\n     * contrast and how to fix it. If we don't group, errors will be repetitive.\n     * @type {Map<string, HTMLElement[]>}\n     */\n    const groupedBySummary = new Map();\n    for (const node of violation.nodes) {\n      const { failureSummary, element } = node;\n      const elements =\n        groupedBySummary.get(failureSummary) ||\n        groupedBySummary.set(failureSummary, []).get(failureSummary);\n      elements.push(element);\n    }\n\n    const { id, help, description, helpUrl } = violation;\n    const title = `a11y/${id}: ${help}.`;\n    for (const [failureSummary, elements] of groupedBySummary) {\n      const hints = formatHintsAsMarkdown(failureSummary);\n      const details = `\\n\\n${description}.\\n\\n${hints}. ([Learn more](${helpUrl}))`;\n      showWarning(title, name, { details, elements });\n    }\n  }\n}\n\n/**\n * @param {object} opts Options as described at https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter\n */\nasync function getViolations(opts) {\n  const { rules, ...otherOptions } = opts;\n  const options = {\n    rules: {\n      ...Object.fromEntries(DISABLED_RULES.map(id => [id, { enabled: false }])),\n      ...rules,\n    },\n    ...otherOptions,\n    elementRef: true,\n    resultTypes: [\"violations\"],\n    reporter: \"v1\", // v1 includes a `failureSummary`\n  };\n\n  let axe;\n  try {\n    axe = await importAxe();\n  } catch (error) {\n    const msg = \"Failed to load a11y linter.\";\n    showError(msg, name);\n    console.error(error);\n    return [];\n  }\n\n  try {\n    const result = await axe.run(document, options);\n    return result.violations;\n  } catch (error) {\n    const msg = \"Error while looking for a11y issues.\";\n    showError(msg, name);\n    console.error(error);\n    return [];\n  }\n}\n\n/** @returns {Promise<typeof window.axe>} */\nfunction importAxe() {\n  const script = document.createElement(\"script\");\n  script.classList.add(\"remove\");\n  script.src = \"https://cdn.jsdelivr.net/npm/axe-core@4/axe.min.js\";\n  document.head.appendChild(script);\n  return new Promise((resolve, reject) => {\n    script.onload = () => resolve(window.axe);\n    script.onerror = reject;\n  });\n}\n\n/** @param {string} text */\nfunction formatHintsAsMarkdown(text) {\n  const results = [];\n  for (const group of text.split(\"\\n\\n\")) {\n    const [msg, ...opts] = group.split(/^\\s{2}/m);\n    const options = opts.map(opt => `- ${opt.trimEnd()}`).join(\"\\n\");\n    results.push(`${msg}${options}`);\n  }\n  return results.join(\"\\n\\n\");\n}\n"],"names":["inAmd","window","require","deps","callback","modules","map","dep","Error","Promise","all","then","results","expose","name","object","subscriptions","EventTarget","pub","topic","detail","dispatchEvent","CustomEvent","parent","self","args","String","JSON","stringify","stack","postMessage","location","origin","sub","cb","options","once","addEventListener","e","removeList","html","document","documentElement","hasAttribute","lang","dir","l10n","config","en","instanceOfAny","constructors","some","c","idbProxyableTypes","cursorAdvanceMethods","transactionDoneMap","WeakMap","transformCache","reverseTransformCache","idbProxyTraps","get","target","prop","receiver","IDBTransaction","objectStoreNames","undefined","objectStore","wrap","set","value","has","replaceTraps","wrapFunction","func","IDBCursor","prototype","advance","continue","continuePrimaryKey","includes","apply","unwrap","this","request","transformCachableValue","tx","done","resolve","reject","unlisten","removeEventListener","complete","error","DOMException","cacheDonePromiseForTransaction","IDBDatabase","IDBObjectStore","IDBIndex","Proxy","IDBRequest","promise","success","result","promisifyRequest","newValue","readMethods","writeMethods","cachedMethods","Map","getMethod","targetFuncName","replace","useIndex","isWrite","method","async","storeName","transaction","store","index","shift","oldTraps","advanceMethodProps","methodMap","advanceResults","ittrProxiedCursorToOriginalProxy","cursorIteratorTraps","cachedFunc","iterate","cursor","openCursor","proxiedCursor","delete","isIteratorProp","Symbol","asyncIterator","blocked","indexedDB","deleteDatabase","event","oldVersion","version","upgrade","blocking","terminated","open","openPromise","newVersion","db","catch","HTTPTokenCodePoints","HTTPWhiteSpace","HTTPQuotedString","storeParam","params","paramName","paramValue","test","toLowerCase","_getDefaults","breaks","extensions","gfm","hooks","pedantic","renderer","silent","tokenizer","walkTokens","_defaults","changeDefaults","newDefaults","escapeTest","escapeReplace","RegExp","source","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","ch","escape$1","encode","unescapeTest","unescape","_","n","charAt","fromCharCode","parseInt","substring","caret","edit","regex","opt","obj","val","valSource","getRegex","cleanUrl","href","encodeURI","noopTest","exec","splitCells","tableRow","count","cells","match","offset","str","escaped","curr","split","i","trim","length","pop","splice","push","rtrim","invert","l","suffLen","currChar","slice","outputLink","cap","link","raw","lexer","title","text","state","inLink","token","type","tokens","inlineTokens","_Tokenizer","rules","constructor","space","src","block","newline","code","codeBlockStyle","fences","matchIndentToCode","indentToCode","node","matchIndentInNode","indentInNode","join","indentCodeCompensation","inline","anyPunctuation","heading","trimmed","depth","hr","blockquote","top","blockTokens","list","bull","isordered","ordered","start","loose","items","itemRegex","itemContents","endsWithBlankLine","endEarly","line","t","repeat","nextLine","indent","trimStart","search","blankLine","nextBulletRegex","Math","min","hrRegex","fencesBeginRegex","headingBeginRegex","rawLine","ischecked","istask","task","checked","trimEnd","spacers","filter","hasMultipleLineBreaks","pre","def","tag","table","headers","aligns","rows","item","header","align","row","cell","lheading","paragraph","escape","inRawBlock","trimmedUrl","rtrimSlash","lastParenIndex","b","indexOf","level","findClosingBracket","linkLen","reflink","links","nolink","emStrong","maskedSrc","prevChar","emStrongLDelim","punctuation","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","emStrongRDelimAst","emStrongRDelimUnd","lastIndex","lastCharLength","codespan","hasNonSpaceChars","hasSpaceCharsOnBothEnds","br","del","autolink","url","prevCapZero","_backpedal","inlineText","bullet","_paragraph","_blockLabel","_tag","_comment","blockNormal","gfmTable","blockGfm","blockPedantic","_punctuation","_inlineComment","_inlineLabel","inlineNormal","blockSkip","reflinkSearch","inlinePedantic","inlineGfm","inlineBreaks","normal","_Lexer","inlineQueue","Object","create","lex","lexInline","next","lastToken","cutSrc","lastParagraphClipped","leading","tabs","extTokenizer","call","startBlock","startIndex","Infinity","tempSrc","tempStart","forEach","getStartIndex","errMsg","charCodeAt","console","keepPrevChar","keys","lastIndexOf","startInline","_Renderer","infostring","quote","body","listitem","checkbox","tablerow","content","tablecell","flags","strong","em","cleanHref","out","image","_TextRenderer","_Parser","textRenderer","parse","parseInline","renderers","genericToken","ret","parser","headingToken","codeToken","tableToken","j","k","blockquoteToken","listToken","itemBody","unshift","htmlToken","paragraphToken","textToken","escapeToken","tagToken","linkToken","imageToken","strongToken","emToken","codespanToken","delToken","_Hooks","static","Set","preprocess","markdown","postprocess","processAllTokens","markedInstance","defaults","setOptions","parseMarkdown","Parser","Renderer","TextRenderer","Lexer","Tokenizer","Hooks","use","values","concat","childTokens","flat","pack","opts","ext","prevRenderer","extLevel","rendererProp","rendererFunc","tokenizerProp","tokenizerFunc","prevTokenizer","hooksProp","hooksFunc","prevHook","passThroughHooks","arg","packWalktokens","origOpt","warn","throwError","onError","toString","message","msg","marked","getDefaults","globalThis","global","getDefaultExportFromCjs","x","__esModule","hasOwnProperty","module","pluralize$1","exports","root","pluralize","commonjsGlobal","pluralRules","singularRules","uncountables","irregularPlurals","irregularSingles","sanitizeRule","rule","restoreCase","word","toUpperCase","substr","arguments","sanitizeWord","len","replaceWord","replaceMap","keepMap","checkWord","bool","inclusive","singular","plural","isPlural","isSingular","addPluralRule","replacement","addSingularRule","addUncountableRule","addIrregularRule","single","hyperHTML","N","defineProperty","r","a","configurable","o","random","s","WeakSet","add","m","u","insertBefore","selected","selectedIndex","f","querySelectorAll","y","w","nextSibling","E","remove","parentNode","removeChild","compare","before","h","d","v","p","g","Array","newi","oldi","prev","C","createEvent","initCustomEvent","bubbles","cancelable","_wire$","defineProperties","ELEMENT_NODE","nodeType","A","S","O","T","M","L","P","D","W","attributes","define","invoke","$","isArray","R","H","innerHTML","F","$1","childNodes","firstChild","appendChild","createDocumentFragment","createElementNS","I","z","V","Z","G","q","B","J","Q","U","X","Y","toFixed","ee","createElement","getAttribute","te","ne","re","ie","ae","oe","ue","ce","le","se","fe","he","de","ve","pe","ge","me","ye","sort","be","we","removeAttribute","nodeName","setAttributeNode","cloneNode","textContent","replaceChild","Ne","path","sparse","xe","Ee","Ce","convert","transform","Se","updates","fn","any","attribute","ke","Oe","Te","Me","setAttribute","getAttributeNode","je","style","_e","cssText","setProperty","Le","Pe","De","We","lastChild","ownerDocument","createRange","setStartBefore","setEndAfter","deleteContents","valueOf","$e","Re","Ke","Je","render","Fe","placeholder","He","Ie","ze","Ve","Ze","Ge","qe","Qe","Event","MutationObserver","observe","subtree","childList","clearTimeout","setTimeout","addedNodes","removedNodes","children","Ue","Xe","Ye","Ae","et","removeAttributeNode","createTextNode","tt","defaultView","navigator","userAgent","propertyIsEnumerable","isFrozen","nt","rt","it","at","ut","ot","ct","lt","template","tagger","st","ft","ht","dt","vt","pt","gt","wire","bind","Component","diff","hyper","for","handleEvent","currentTarget","svg","defaultState","dispatch","component","setState","idb","_idb","_marked","MIMEType","input","subtype","TypeError","parserMode","inputArray","from","position","char","fromEntries","entries","parseMimeType","parameters","essence","mimeType","size","paramStr","key","serialize","_pluralize","dashes","ISODate","Intl","DateTimeFormat","timeZone","year","month","day","docLang","startsWith","nonNormativeSelector","createResourceHint","URL","baseURI","linkElem","rel","hint","corsMode","crossOrigin","as","dontRemove","classList","removeReSpec","doc","elem","joinFactory","formatter","ListFormat","mapper","elemCount","formatToParts","conjunction","disjunction","joinAnd","joinOr","xmlEscape","norm","getIntlData","localizationStrings","data","getIntlDataForKey","linkCSS","urls","frag","reduce","nextLink","head","runTransforms","flist","funcArgs","methods","meth","showWarning","htmlJoinComma","array","joined","addId","pfx","txt","noLC","id","normalize","getElementById","nextId","getDfnTitles","titleSet","normText","dataset","child","getElementsByTagName","localLt","renameElement","newName","copyAttributes","localName","newElement","append","replaceWith","refTypeFromContext","ref","element","closestInformative","closest","isInformative","querySelector","illegal","wrapInner","outer","wrapper","parents","selector","parentElement","getElementIndentation","previousSibling","Node","TEXT_NODE","InsensitiveStringSet","super","getCanonicalKey","existingKey","find","makeSafeCopy","clone","dfn","removeCommentNodes","walker","createTreeWalker","NodeFilter","SHOW_COMMENT","comment","walkTree","nextNode","CaseInsensitiveMap","RespecError","plugin","isWarning","assign","elements","markAsOffending","toJSON","details","showError","pluginName","makePluginUtils","toMDCode","codedJoinAnd","quotes","addQuotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","insertions","metaViewport","metaCharset","respecVersion","metaGenerator","prepend","cleanup","XMLSerializer","serializeToString","el","outerHTML","prettify","doctype","ReSpec","_respecDonePromise","errors","warnings","rsError","ready","toHTML","runAll","plugs","respec","initReSpecGlobal","respecConfig","userConfig","amendConfig","newValues","script","includeConfig","URLSearchParams","overrideEntries","codedKey","codedValue","decodeURIComponent","decodedValue","overrideProps","overrideConfig","performance","mark","preProcess","promises","isFunction","utils","err","runnables","isRunnableModule","plug","run","Plugin","prepare","executePreparePass","timerId","measure","executeRunPass","postProcess","afterEnd","css$r","gtEntity","ampEntity","infoString","isEscaped","language","metaData","parseInfoString","example","illegalExample","className","firstSpace","metaDataStr","headingWithIdRegex","markdownToHtml","potentialMarkdown","convertElement","processMDSections","conf","hasMDSections","isMDFormat","rsUI","newBody","firstTwo","lastTwo","indentation","workaroundBlockLevelMarkdown","ariaDecorate","ariaMap","styleElement","css","insertStyle","respecUI","menu","closeButton","ui","closeModal","modal","overlay","trapFocus","buttons","respecPill","toggleMenu","toggle","hidden","focusableEls","firstFocusableEl","lastFocusableEl","focus","shiftKey","activeElement","preventDefault","stopPropagation","errWarn","arr","butName","buttonId","button","ol","fragment","createContextualFragment","rsErrorToHTML","li","firstElementChild","lastElementChild","freshModal","createWarnButton","label","show","hide","enable","addCommand","handler","_keyShort","icon","menuItem","warning","owner","currentOwner","headingId","generateMarkdownLink","plugins","readyState","domReady","ev","locationHash","l10n$I","style$1","compute","github$1","transclude","dataInclude","mps","privacy","postMarkdown","idHeaders$1","abstract","dataTransform","dataAbbr","inlines$1","inlines","conformance","examples","issuesNotes$1","issuesNotes","bestPractices","figures","biblio","biblio$2","linkToDfn","xref","dataCite","renderBiblio","dfnIndex","contrib","sections","fixHeaders","structure","informative","idHeaders","caniuse","mdnAnnotation","saveHtml","searchSpecref","searchXref","aboutRespec","seo$1","seo","highlight","dataTests","listSorter","highlightVars$1","dfnPanel","dataType","algorithms","anchorExpander","cleanBody","titleAttrs","scripts","comments","focusCode","footers","checkCharset","checkPunctuation","checkInternalSlots","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","wptTestsExist","noHttpProps","a11y","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","imsDefaults","css$p","noReSpecCSS","css$n","attachMetaViewport","meta","delimiter","separator","toKeyValuePairs","width","overrideCSSLocation","cssURL","check","specTitle","docVersion","specDate","Date","specNature","specType","shortName","specVersion","base","versionURL","thisURL","errataURL","latestURI","mainSpecURL","resolveGithubPromise","rejectGithubPromise","github","file_a_bug","participate","commit_history","ko","zh","ja","nl","es","ghURL","tempURL","repoURL","org","repo","pathname","branch","issueBase","commitHistoryURL","newProps","edDraftURI","githubToken","githubUser","atRiskBase","otherLinks","pullBase","githubAPI","hostname","excludeGithubLinks","otherLink","normalizedGHObj","apiBase","fullName","issuesURL","pullsURL","newIssuesURL","normalizedConfig","toHTMLNodes","string","toHTMLNode","newNodes","DOMBuilder","current","findPosition","tagName","findParent","findHeader","addHeader","section","addSection","addElement","builder","restructure","structuredInternals","processResponse","rawData","oninclude","includeReplace","includeFormat","fill","fillWithText","attr","removeIncludeAttributes","runIncludes","currentDepth","includables","promisesToInclude","include","includeId","response","fetch","MIN_INT32","MAX_INT32","validateInt32","Number","isInteger","validateInt64","validateNumber","classDiagramTemplate","diagram","default","mermaid","import","initialize","startOnLoad","cleanedSvg","privacy_implication","enumeration_name","ca","renderIssue","issue","renderNote","note","renderTerm","term","parentClass","documentation","description","issues","notes","renderType","stereoType","Property","Type","Description","Multiplicity","Privacy","ClassExtensibility","classTemplate","classData","properties","showPrivacyAnnotations","property","renderPrivacyImplicationDoc","privacyDoc","cardinality","renderCardinality","privacyImplications","renderPrivacyImplication","renderPrivacyImplicationCell","renderProperty","isExtensible","renderExtensibility","data_model_name","dataModelTemplate","dataModel","Vocabulary","Enumeration","Term","EnumerationExtensibility","enumerationTemplate","suffix","interfaceTemplate","serviceInterface","headerId","operations","jsonSchemaTemplate","schema","json_schema_name","jsonSchemasTemplate","openApiSchemaTemplate","modelData","Request","Parameter","Parameter_Type","Required","request_parameter_header","Optional","request_body_header","Content_Type_Header","Content_Type","Content_Description","Content_Required","Responses","request_header","operationTemplate","rootPath","operation","queryParameters","parameter","renderUrl","confidentiality_level","param","renderParmeterType","renderRequired","renderConfidentialityCell","renderParameter","renderRequestParameters","bodies","contentType","renderBodyType","renderRequestBody","renderRequestBodies","renderRequest","responses","flatMap","mergeResponseBodies","resp","statusCode","renderResponse","renderResponses","mergedResponses","confidentiality","renderConfidentiality","service_model_name","serviceModelTemplate","serviceModel","stereoTypeTemplate","types","classes","nameA","nameB","intro","embeddedSelectionTemplate","generalizations","renderSuperClass","cls","error_sample_data","error_invalid_json","error_json_additional_property","error_missing_model","error_missing_stereotype","error_missing_service_model","locale","getApiKey","apiKey","getBaseUrl","serverUrl","getJsonSchema","jsonLdEnabled","allowAdditionalProperties","res","ok","status","json","getModel","sessionStorage","getItem","query","model","modelByID","setItem","processClass","classModel","thisElement","nodeValue","insertAdjacentElement","processInterface","preferredId","operationSection","processOperation","processJsonSchema","processJsonSchemas","modelId","packageName","classSection","processOpenApiSchema","binding","getOpenApiSchema","processSample","parentElem","classId","includeOptionalFields","sampleData","getDataSample","sample","processClassDiagram","packageNames","classNames","omitProperties","hideTitle","packages","getClassDiagram","modelSections","models","findIndex","dataModelSections","stereoTypeSections","serviceModelSections","schemaSections","classDiagramSections","processDataModel","typeList","processStereoType","schemaFormat","serviceModelId","services","service","serviceInterfaces","interfaces","interfaceId","interfaceSection","processServiceModel","samples","ajv2019","ajv","allErrors","addFormat","addFormats","schemaId","schemaDef","preText","innerText","refs","$id","compile","validate","instancePath","keyword","additionalProperty","validateExample","removeItem","mdm","privacy_section_header","privacy_implications","privacy_implications_paragraph","confidentiality_level_paragraph","ACCESSIBILITY_label","ACCESSIBILITY_def","ANALYTICS_label","ANALYTICS_def","CONTAINER_label","CONTAINER_def","CREDENTIALS_label","CREDENTIALS_def","CREDENTIALSIDREF_label","CREDENTIALSIDREF_def","DEMOGRAPHICS_label","DEMOGRAPHICS_def","EXTENSION_label","EXTENSION_def","FINANCIAL_label","FINANCIAL_def","IDENTIFIER_label","IDENTIFIER_def","IDENTIFIERREF_label","IDENTIFIERREF_def","INSURANCE_label","INSURANCE_def","LEGAL_label","LEGAL_def","MEDICAL_label","MEDICAL_def","NA_label","NA_def","OTHER_label","OTHER_def","QUALIFICATION_label","QUALIFICATION_def","PERSONAL_label","PERSONAL_def","SOURCEDID_label","SOURCEDID_def","SOURCEDIDREF_label","SOURCEDIDREF_def","UNRESTRICTED_label","UNRESTRICTED_def","NORMAL_label","NORMAL_def","RESTRICTED_label","RESTRICTED_def","VERYRESTRICTED_label","VERYRESTRICTED_def","privacyImplicationsKeys","confidentialityLevelKeys","createSection","privacySection","piSection","translations","confSection","confLevelTmpl","mdOnlies","generic","proposal","proposal_status","base_doc_status","candidate_final_status","final_status","unknown_status","spec_version","final","version_table_title","document_version","date_issued","this_version","latest_version","errata","copyright_tag","trademark_information","logo_alt","ipr_header","ipr_intro","ipr_text","ipr_table_intro","org_name","date_election_made","necessary_claims","proposals","proposals_disclosure","disclosure_license_link_text","disclosure_granted_permissions_text","disclosure_granted_permissions_time_text","disclosure_warranty_text","disclosure_contributions_text","getStatusString","specStatusString","showLink","class","showLinkData","renderIpr","iprs","renderIprRow","renderIprTable","company","electionDate","necessaryClaims","headersTmpl","renderSpecVersion","renderSpecStatus","renderVersionTable","renderDisclosure","getFullYear","headings","to_be_removed","contains","abstractHeading","processDfnElement","abbr","fullForm","insertAdjacentHTML","headingElements","findConformanceSection","idlPrimitiveRegex","exceptionRegex","methodRegex","slotRegex","attributeRegex","baseRegex","enumRegex","methodSplitRegex","slotSplitRegex","isProbablySlotRegex","renderBase","identifier","renderParent","nullable","renderInternalSlot","slotType","linkFor","isMethod","argsHtml","htmlArgMapper","textArgs","parts","isVariadic","renderAttribute","renderMethod","renderText","renderArgs","argsText","searchText","renderEnum","enumValue","forContext","renderException","renderIdlPrimitiveType","idlStringToHtml","isSlot","splitter","forPart","childString","SyntaxError","allArgs","altText","altArgs","reverse","parseInlineIDL","output","ALLOWED_TYPES","readyPromise","openDB","deleteObjectStore","createObjectStore","keyPath","createIndex","unique","now","range","IDBKeyRange","lowerBound","entry","expires","openIdb","biblioDB","isAlias","resolveAlias","only","aliasOf","addAll","aliasesAndRefs","alias","reference","promisesToAdd","isInDB","put","close","clear","storeNames","stores","clearStorePromises","bibrefsURL","doneResolver","updateFromNetwork","forceUpdate","refsToFetch","onLine","oneHourFromNow","resolveRef","normalizeReferences","normalizedNormativeRefs","normativeReferences","informativeReferences","redundantKey","getRefKeys","localBiblio","localAliases","allRefs","neededRefs","idbRefs","promisesToFind","getReferencesFromIdb","hasData","noData","externalRefs","finish","info_references","norm_references","references","reference_not_found","REF_STATUSES","endWithDot","endStr","createReferencesSection","goodRefs","badRefs","refcontent","groupRefs","toRefContent","uniqueRefs","getUniqueRefs","refsToShow","toLocaleLowerCase","localeCompare","sec","showRef","aliases","getAliases","refUrl","selectors","elems","linkType","decorateInlineReference","warnBadRefs","circular","renderInlineCitation","linkText","refId","stringifyReference","authors","etAl","publisher","date","informs","norms","refSection","rfc2119Usage","joinRegex","regexes","rfc2119Keywords","inlineCodeRegExp","inlineIdlReference","inlineVariable","inlineCitation","inlineExpansion","inlineAnchor","inlineElement","inlineElementMatches","matched","attrValue","xrefType","xrefFor","inlineRFC2119Matches","nodeElement","inlineRefMatches","inlineXrefMatches","inlineCodeMatches","inlineBibrefMatches","spec","cite","cleanRef","citeElem","inlineAbbrMatches","abbrMap","inlineVariableMatches","matches","varName","inlineAnchorMatches","cleanUp","safeStr","lastSlashIdx","splitByFor","isFor","processedContent","processInlineContent","clean","part","respecRFC2119","abbrElements","abbrRx","txts","exclusions","wsNodes","exclusionQuery","nodeIterator","createNodeIterator","SHOW_TEXT","FILTER_REJECT","FILTER_ACCEPT","textNodes","getTextNodes","keywords","inlinesRegex","subtxt","df","informative_text_paragraph_1","informative_text_paragraph_2","normative_text_paragraph_1","key_word","key_words","is","are","the","the_plural","keywords_paragraph","normative_text_implementation","normative_text_certification_constraints","getNormativeText","MUST","REQUIRED","SHALL","SHOULD","RECOMMENDED","MAY","OPTIONAL","terms","log","skipCertGuideConformanceRef","processConformance","mainSpecTitle","mainSpecBiblioKey","getInformativeText","after","conformanceHeading","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","codedJoinOr","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$j","makeTitle","num","report","number","div","inAside","exampleTitle","css$h","editors_note","feature_at_risk","issue_summary","no_issues_in_spec","handleIssues","ins","ghIssues","getIssueNumber","issueNumber","createIssueNumberGetter","issueList","inno","displayType","isFeatureAtRisk","isIssue","isEdNote","getIssueType","isInline","dataNum","titleParent","ghIssue","linkToIssueTracker","l10nIssue","issueNumberText","createIssueSummaryEntry","labels","labelsGroup","color","bgColor","searchParams","bg","textColorFromBgColor","ariaLabel","createLabel","createLabelsGroup","bodyHTML","issueSummaryElement","hasChildNodes","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","issueNumbers","fetchAndStoreGithubIssues","headElem","ednote","aside","getAdmonType","topBar","best_practice","defaultLang","bps","bpSummary","summaryItems","bp","localizedBpName","container","list_of_figures","fig","tof","caption","figure","decorateFigure","figureId","tofCaption","anchor","getTableOfFiguresListItem","collectFigures","tofElement","previousSections","previous","previousElementSibling","iteratePreviousElements","getPreviousSections","every","decorateTableOfFigures","imsBiblioURL","overrideIMSbiblioLocation","disableFetchIMSbiblio","mode","statusText","THIS_SPEC","getLinkProps","citeDetails","canonicalHref","relPath","linkProps","wrapInCiteEl","citePath","citeFrag","noExport","makeComponentFinder","findFrag","findPath","toCiteDetails","rawKey","citeHref","parentKey","isNormative","closestIsNormative","hasPrecedingMark","attrToRemove","promisesForBibEntries","missingBibEntries","newEntries","updateBiblio","originalKey","matchedText","possibleExternalLinks","duplicateMsg","duplicateTitle","collectDfns","duplicates","dfnFors","oldDfn","oldIsDfn","newIsDfn","isSameDfnType","isSameDfnFor","findMatchingDfn","titleToDfns","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","first","isCode","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","STORE_NAME","VERSION_CHECK_WAIT","getIdbCache","resolveXrefCache","queries","cachedData","lastChecked","localStorage","API_URL","lastUpdated","shouldBustCache","clearXrefData","requiredKeySet","cache","profiles","informativeRefsInNormative","getRequestEntry","getTermFromElement","specs","dataciteElem","cites","closestSection","inlineRefs","uniqueSpecContext","higherPriority","uniqueSpecs","dedupeSpecContext","getSpecContext","getTypeContext","dataXrefForElem","getForContext","addDataCite","uri","shortname","normative","isNormRef","closestNormative","closestInform","addToReferences","objectHash","buffer","TextEncoder","crypto","subtle","digest","bufferToHexString","Uint8Array","padStart","invalidProfileError","profile","normalizeConfig","bodyCite","externalDFNs","findExplicitExternalLinks","queryKeys","apiUrl","uniqueIds","uniqueQueryKeys","resultsFromCache","termsToLook","fetchedResults","fetchFromNetwork","cacheXrefData","getData","ambiguous","notFound","collector","getPrefilledFormURL","howToFix","howToCiteURL","originalTerm","formUrl","specsString","forParent","moreInfo","showErrors","addDataCiteToTerms","css$f","headingExternal","headlingLocal","dfnOf","CODE_TYPES","getLocalTermType","ds","getLocalTermParentContext","getLocalTermSuffix","appendSectionNumbers","secNum","getSectionNumber","collectExternalTerms","uniqueReferences","uniqueID","renderExternalTermEntry","typeSuffix","TYPE_TERMS","TYPED_TYPES","linkForText","getTermText","styleEl","localTermIndex","dataSortedByTerm","collectLocalTerms","renderItem","getLocalTermText","renderLocalTerm","createLocalTermIndex","externalTermIndex","dataSortedBySpec","specA","specB","createExternalTermIndex","summary","organization","role","contributors","useRoles","hasRoles","personsToTableRows","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","noToc","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","createTableOfContents","permalinkLabel","sectionType","sectionNumber","selfLink","css$d","BROWSERS","statToText","defaultBrowsers","DEFAULTS","removeOnSave","browsers","feature","normalizeCaniuseConf","invalidBrowsers","browser","validateBrowsers","featureURL","headDlElem","contentPromise","apiURL","fetchStats","groups","toBrowserCell","browserId","browserName","supportLevel","cssClass","textVersion","getLogoSrc","browserCellRenderer","processJson","handleError","definitionPair","outputDoc","css$b","BASE_JSON_PATH","MDN_URL_BASE","MDN_BROWSERS","chrome","chrome_android","edge","edge_mobile","firefox","firefox_android","opera","opera_android","safari","safari_ios","samsunginternet_android","webview_android","inAllEngines","inSomeEngines","insertMDNBox","targetAncestor","targetSibling","mdnBox","attachMDNDetail","mdnSpec","slug","support","engines","mdnSubPath","engineSupport","getEngineSupportIcons","getEngineSupport","createRow","yesNoUnknown","displayStatus","createRowFromBrowserData","versionData","version_removed","versionAdded","version_added","buildBrowserSupportTable","mdnKey","mdn","getMdnKey","mdnSpecJson","mdnConf","baseJsonPath","maxAge","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","toISOString","cacheResponse","Response","blob","fetchAndCache","getMdnData","findElements","mdnSpecArray","rsDocToCmsDataURL","images","img","canvas","height","getContext","drawImage","toDataURL","getDataURL","docBody","started","finished","createCmsExtract","serializeHTML","rsDocToCssDataURL","docHead","fetcher","createCssExtract","serializeCSS","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","publishDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","search_specref","specrefSearchUI","xrefSearchUI","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","noHighlightCSS","highlightables","promisesToHighlight","missing_test_suite_uri","tests","toListItem","emojiList","testFile","testParts","testFileName","requiresConnectionEmoji","manualPerformEmoji","toTestURLs","testSuiteURI","handleDuplicates","testURLs","uniqueList","testables","makeSorter","direction","order","sortListItems","sortDefinitionTerms","dl","nextType","nextName","sortables","sortedElems","selectNodeContents","css$7","highlightListener","varElem","hightligtedElems","highlightColor","getHighlightColor","varsToHighlight","colorStatus","HL_COLORS","removeHighlight","addHighlight","resetListener","hlColor","activeClass","css$5","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","css$3","varMap","variables","currentSection","css$1","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","props","to","connectedCallback","fetchCommits","commits","commit","prNumber","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","cleanBodyAll","cleanBodyScripts","cleanBodyCSS","styleElem","noTitleAttrs","ancestorName","anc","hasAncestor","dd","nextElementSibling","blockishParent","ttl","noSideBarTOC","fixupURL","overrideFixupLocation","attachScript","currentNode","warranty_1","warranty_2","warranty_3","warranty_4","warranty_5","warranty_6","contact_url","contact_document","contact_date","footer","footersTmpl","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","isRecTrack","saysPrivOrSec","saysConsiderations","filesInWPT","githubAPIBase","wptDirectory","testSuiteURL","files","getFilesInWPT","missingTest","offendingMembers","getOwnPropertyNames","DISABLED_RULES","formatHintsAsMarkdown","group","violations","otherOptions","enabled","elementRef","resultTypes","reporter","axe","onload","onerror","importAxe","getViolations","violation","groupedBySummary","nodes","failureSummary","help","helpUrl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AAU64B,EAAY,KAAM,GACrD,IAGH,MAAMjR,EAAQ/mB,SAAS8jB,cAAc,SACrCiD,EAAMtB,YAAcqW,GACpB97B,SAASuwB,KAAK1N,YAAYkE,EAC5B,IE93CO,MAED1mB,GAAOyvB,GCXE,CACbvvB,GAAI,CACF23C,uBAAwB,UACxBC,qBAAsB,uBACtBC,+BACE,2NACFtI,sBAAuB,wBACvBuI,gCACE,6FACFC,oBAAqB,gBACrBC,kBACE,yFACFC,gBAAiB,YACjBC,cACE,sFACFC,gBAAiB,YACjBC,cACE,uEACFC,kBAAmB,cACnBC,gBACE,kFACFC,uBAAwB,mBACxBC,qBACE,oFACFC,mBAAoB,eACpBC,iBACE,sFACFC,gBAAiB,YACjBC,cACE,6GACFC,gBAAiB,YACjBC,cACE,sGACFC,iBAAkB,aAClBC,eACE,0IACFC,oBAAqB,gBACrBC,kBACE,2GACFC,gBAAiB,sBACjBC,cACE,0GACFC,YAAa,QACbC,UACE,+FACFC,cAAe,qBACfC,YACE,8HACFC,SAAU,MACVC,OACE,kGACFC,YAAa,QACbC,UACE,2FACFC,oBAAqB,8BACrBC,kBACE,mHACFC,eAAgB,WAChBC,aACE,uEACFC,gBAAiB,YACjBC,cACE,6JACFC,mBAAoB,eACpBC,iBACE,+HACFC,mBAAoB,eACpBC,iBACE,6DACFC,aAAc,SACdC,WACE,sHACFC,iBAAkB,aAClBC,eACE,kNACFC,qBAAsB,iBACtBC,mBACE,4LAEJ7U,GAAI,CACF4R,uBAAwB,aACxBC,qBAAsB,8BACtBC,+BACE,8OACFtI,sBAAuB,4BACvBuI,gCACE,gGACFC,oBAAqB,gBACrBC,kBACE,qGACFC,gBAAiB,YACjBC,cACE,kFACFC,gBAAiB,YACjBC,cACE,+FACFC,kBAAmB,cACnBC,gBACE,8FACFC,uBAAwB,mBACxBC,qBACE,gGACFC,mBAAoB,eACpBC,iBACE,wEACFC,gBAAiB,YACjBC,cACE,iIACFC,gBAAiB,YACjBC,cACE,2GACFC,iBAAkB,aAClBC,eACE,gJACFC,oBAAqB,gBACrBC,kBACE,6GACFC,gBAAiB,sBACjBC,cACE,sFACFC,YAAa,QACbC,UACE,6GACFC,cAAe,qBACfC,YACE,iJACFC,SAAU,MACVC,OACE,kGACFC,YAAa,QACbC,UACE,gHACFC,oBAAqB,8BACrBC,kBACE,yGACFC,eAAgB,WAChBC,aACE,+EACFC,gBAAiB,YACjBC,cACE,kKACFC,mBAAoB,eACpBC,iBACE,2IACFC,mBAAoB,eACpBC,iBACE,iEACFC,aAAc,SACdC,WACE,6JACFC,iBAAkB,aAClBC,eACE,iMACFC,qBAAsB,iBACtBC,mBACE,4NAEJ9P,GAAI,CACF6M,uBAAwB,aACxBC,qBAAsB,6BACtBC,+BACE,2OACFtI,sBAAuB,6BACvBuI,gCACE,kGACFC,oBAAqB,gBACrBC,kBACE,oGACFC,gBAAiB,YACjBC,cACE,iFACFC,gBAAiB,YACjBC,cACE,4FACFC,kBAAmB,cACnBC,gBACE,6FACFC,uBAAwB,mBACxBC,qBACE,4FACFC,mBAAoB,eACpBC,iBACE,wEACFC,gBAAiB,YACjBC,cACA,wHACAC,gBAAiB,YACjBC,cACE,sGACFC,iBAAkB,aAClBC,eACE,+IACFC,oBAAqB,gBACrBC,kBACE,4GACFC,gBAAiB,sBACjBC,cACE,yFACFC,YAAa,QACbC,UACE,yGACFC,cAAe,qBACfC,YACE,gJACFC,SAAU,MACVC,OACE,qGACFC,YAAa,QACbC,UACE,sGACFC,oBAAqB,8BACrBC,kBACE,sGACFC,eAAgB,WAChBC,aACE,sEACFC,gBAAiB,YACjBC,cACE,qJACFC,mBAAoB,eACpBC,iBACE,6IACFC,mBAAoB,eACpBC,iBACE,qEACFC,aAAc,SACdC,WACE,oJACFC,iBAAkB,aAClBC,eACE,4LACFC,qBAAsB,iBACtBC,mBACE,oND7NAC,GAA0B,CAC9B,gBACA,YACA,YACA,cACA,mBACA,eACA,YACA,YACA,aACA,gBACA,YACA,QACA,UACA,KACA,QACA,gBACA,WACA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