- ${(function (e) {
- const t = document.querySelector(".copyright");
- if (t) return (t.remove(), t);
- return ft`
- Copyright ${e.publishYear},
- AOM
- Licensing information is available at http://aomedia.org/license/
- The MATERIALS ARE PROVIDED “AS IS.” The Alliance for Open Media, its
- members,and its contributors expressly disclaim any warranties (express,
- implied, or otherwise), including implied warranties of merchantability,
- non-infringement, fitness for a particular purpose, or title, related to the
- materials. The entire risk as to implementing or otherwise using the
- materials is assumed by the implementer and user. IN NO EVENT WILL THE
- ALLIANCE FOR OPEN MEDIA, ITS MEMBERS, OR CONTRIBUTORS BE LIABLE TO ANY OTHER
- PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR
- CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND
- WITH RESPECT TO THIS DELIVERABLE OR ITS GOVERNING AGREEMENT, WHETHER BASED
- ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND
- WHETHER OR NOT THE OTHER MEMBER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
-
`;
- })(e)}
-
-
`;
- const $r = "aom/headers",
- Er = {
- PD: "Pre-Draft",
- WGD: "AOM Work Group Draft",
- WGA: "AOM Working Group Approved Draft",
- FD: "AOM Final Deliverable",
- },
- Sr = new Intl.DateTimeFormat(["en-US"], {
- timeZone: "UTC",
- year: "numeric",
- month: "long",
- day: "2-digit",
- });
- var _r = Object.freeze({
- __proto__: null,
- name: $r,
- run: function (e) {
- if (!e.specStatus) {
- Zt("Missing required configuration: `specStatus`", $r);
- }
- ((e.title = document.title || "No title"),
- e.subtitle || (e.subtitle = ""),
- (e.publishDate = (function (e, t, n = new Date()) {
- const r = e[t] ? new Date(e[t]) : new Date(n);
- if (Number.isFinite(r.valueOf())) {
- const e = kt.format(r);
- return new Date(e);
- }
- return (
- Zt(
- `[\`${t}\`](https://github.com/speced/respec/wiki/${t}) is not a valid date: "${e[t]}". Expected format 'YYYY-MM-DD'.`,
- $r
- ),
- new Date(kt.format(new Date()))
- );
- })(e, "publishDate", document.lastModified)),
- (e.thisVersion = `https://aomediacodec.github.io/${e.shortName}/`),
- (e.issueTracker = `https://github.com/AOMediaCodec/${e.shortName}/issues/`),
- (e.publishYear = e.publishDate.getUTCFullYear()),
- (e.publishHumanDate = Sr.format(e.publishDate)));
- const t = function (e) {
- if (!e.name) {
- Zt("All authors and editors must have a name.", $r);
- }
- };
- if ((e.formerEditors || (e.formerEditors = []), e.editors)) {
- e.editors.forEach(t);
- for (let t = 0; t < e.editors.length; t++) {
- const n = e.editors[t];
- "retiredDate" in n &&
- (e.formerEditors.push(n), e.editors.splice(t--, 1));
- }
- }
- if (!e.editors || 0 === e.editors.length) {
- Zt("At least one editor is required", $r);
- }
- (e.formerEditors.length && e.formerEditors.forEach(t),
- e.authors && e.authors.forEach(t),
- (e.multipleEditors = e.editors && e.editors.length > 1),
- (e.multipleFormerEditors = e.formerEditors.length > 1),
- (e.multipleAuthors = e.authors && e.authors.length > 1),
- e.copyrightStart &&
- e.copyrightStart == e.publishYear &&
- (e.copyrightStart = ""),
- (e.textStatus = Er[e.specStatus]),
- (e.dashDate = kt.format(e.publishDate)),
- (e.publishISODate = e.publishDate.toISOString()));
- const n = xr(e);
- (document.body.prepend(n),
- document.body.classList.add("h-entry"),
- nn("amend-user-config", {
- publishISODate: e.publishISODate,
- generatedSubtitle: `${e.longStatus} ${e.publishHumanDate}`,
- }));
- },
- });
- const Cr = "aom/abstract",
- Lr = Ot({ en: { abstract: "Abstract" } });
- var Ar = Object.freeze({
- __proto__: null,
- name: Cr,
- run: async function () {
- const e = document.getElementById("abstract");
- if (!e) {
- return void Zt(
- 'Document must have one element with `id="abstract"',
- Cr
- );
- }
- e.classList.add("introductory");
- let t = document.querySelector("#abstract>h2");
- t ||
- ((t = document.createElement("h2")),
- (t.textContent = Lr.abstract),
- e.prepend(t));
- },
- });
- var Tr = Object.freeze({
- __proto__: null,
- name: "core/data-transform",
- run: function () {
- document.querySelectorAll("[data-transform]").forEach(e => {
- ((e.innerHTML = Nt(e.innerHTML, e.dataset.transform)),
- e.removeAttribute("data-transform"));
- });
- },
- });
- const Rr = "core/dfn-abbr";
- function Or(e) {
- const t = (n = e).dataset.abbr
- ? n.dataset.abbr
- : (n.textContent
- ?.match(/\b([a-z])/gi)
- ?.join("")
- .toUpperCase() ?? "");
- var n;
- const r = e.textContent.replace(/\s\s+/g, " ").trim(),
- o = document.createElement("abbr");
- ((o.title = r), (o.textContent = t), e.after(" (", o, ")"));
- const i = e.dataset.lt || "";
- e.dataset.lt = i
- .split("|")
- .filter(e => e.trim())
- .concat(t)
- .join("|");
- }
- var Nr = Object.freeze({
- __proto__: null,
- name: Rr,
- run: function () {
- const e = document.querySelectorAll("[data-abbr]");
- for (const t of e) {
- const { localName: e } = t;
- if ("dfn" === e) Or(t);
- else {
- Zt(
- `\`data-abbr\` attribute not supported on \`${e}\` elements.`,
- Rr,
- { elements: [t], title: "Error: unsupported." }
- );
- }
- }
- },
- });
- var Pr = String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
-.assert{border-left:.5em solid #aaa;padding:.3em;border-color:#aaa;border-color:var(--assertion-border);background:#eee;background:var(--assertion-bg);color:#000;color:var(--assertion-text)}
-@media (prefers-color-scheme:dark){
-:root{--assertion-border:#444;--assertion-bg:var(--borderedblock-bg);--assertion-text:var(--text)}
-}`;
- var Ir = Object.freeze({
- __proto__: null,
- name: "core/algorithms",
- run: function () {
- const e = Array.from(
- document.querySelectorAll("ol.algorithm li")
- ).filter(e => e.textContent.trim().startsWith("Assert: "));
- if (!e.length) return;
- for (const t of e) {
- t.classList.add("assert");
- const e = t.firstChild;
- e instanceof Text &&
- e.textContent.startsWith("Assert: ") &&
- ((e.textContent = e.textContent.replace("Assert: ", "")),
- t.prepend(ft`Assert`, ": "));
- }
- const t = document.createElement("style");
- ((t.textContent = Pr), document.head.appendChild(t));
- },
- });
- const Dr = /^[a-z]+(\s+[a-z]+)+\??$/,
- jr = /\B"([^"]*)"\B/,
- zr = /^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,
- Mr = /\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,
- qr = /^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,
- Hr = /^(?:\w+)\??$/,
- Br = /^(\w+)\["([\w- ]*)"\]$/,
- Fr = /\.?(\w+\(.*\)$)/,
- Wr = /\/(.+)/,
- Ur = /\[\[.+\]\]/;
- function Gr(e) {
- const { identifier: t, renderParent: n, nullable: r } = e;
- if (n)
- return ft`${t + (r ? "?" : "")}`;
- }
- function Vr(e) {
- const {
- identifier: t,
- parent: n,
- slotType: r,
- renderParent: o,
- args: i,
- } = e,
- { identifier: s } = n || {},
- a = "method" === r,
- l = i ?? [],
- c = a ? ft`(${Pt(l, Zr)})` : null,
- u = a ? `(${l.join(", ")})` : "";
- return ft`${n && o ? "." : ""}[[${t}]]${c}`;
- }
- function Zr(e, t, n) {
- if (t < n.length - 1) return ft`${e}`;
- const r = e.split(/(^\.{3})(.+)/),
- o = r.length > 1,
- i = o ? r[2] : r[0];
- return ft`${o ? "..." : null}${i}`;
- }
- function Yr(e) {
- const { parent: t, identifier: n, renderParent: r } = e,
- { identifier: o } = t || {};
- return ft`${r ? "." : ""}${n}`;
- }
- function Kr(e) {
- const { args: t, identifier: n, type: r, parent: o, renderParent: i } = e,
- { renderText: s, renderArgs: a } = e,
- { identifier: l } = o || {},
- c = Pt(a || t, Zr),
- u = `${n}(${t.join(", ")})`;
- return ft`${o && i ? "." : ""}${s || n}${!s || a ? ft`(${c})` : ""}`;
- }
- function Xr(e) {
- const { identifier: t, enumValue: n, parent: r } = e,
- o = r ? r.identifier : t;
- return ft`"${n}"`;
- }
- function Qr(e) {
- const { identifier: t } = e;
- return ft`"${t}"`;
- }
- function Jr(e) {
- const { identifier: t, nullable: n } = e;
- return ft`${t + (n ? "?" : "")}`;
- }
- function eo(e) {
- let t;
- try {
- t = (function (e) {
- const t = Ur.test(e),
- n = t ? Wr : Fr,
- [r, o] = e.split(n);
- if (t && r && !o)
- throw new SyntaxError(
- `Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`
- );
- const i = r
- .split(/[./]/)
- .concat(o)
- .filter(e => e && e.trim())
- .map(e => e.trim()),
- s = !e.includes("/"),
- a = [];
- for (; i.length; ) {
- const t = i.pop() ?? "";
- if (zr.test(t)) {
- const [, e, n, r, o] = t.match(zr),
- i = (n ?? "").split(/,\s*/).filter(e => e),
- l = r?.trim(),
- c = o?.split(/,\s*/).filter(e => e);
- a.push({
- type: "method",
- identifier: e ?? "",
- args: i,
- renderParent: s,
- renderText: l,
- renderArgs: c,
- });
- } else if (Br.test(t)) {
- const [, e, n] = t.match(Br);
- a.push({
- type: "enum",
- identifier: e ?? "",
- enumValue: n ?? "",
- renderParent: s,
- });
- } else if (jr.test(t)) {
- const [, e] = t.match(jr);
- s
- ? a.push({ type: "exception", identifier: e ?? "" })
- : a.push({ type: "enum", enumValue: e ?? "", renderParent: s });
- } else if (Mr.test(t)) {
- const [, e, n] = t.match(Mr),
- r = n ? "method" : "attribute",
- o =
- n
- ?.slice(1, -1)
- .split(/,\s*/)
- .filter(e => e) ?? [];
- a.push({
- type: "internal-slot",
- slotType: r,
- identifier: e ?? "",
- args: o,
- renderParent: s,
- });
- } else if (qr.test(t) && i.length) {
- const [, e] = t.match(qr);
- a.push({
- type: "attribute",
- identifier: e ?? "",
- renderParent: s,
- });
- } else if (Dr.test(t)) {
- const e = t.endsWith("?"),
- n = e ? t.slice(0, -1) : t;
- a.push({
- type: "idl-primitive",
- identifier: n,
- renderParent: s,
- nullable: e,
- });
- } else {
- if (!Hr.test(t) || 0 !== i.length)
- throw new SyntaxError(
- `IDL micro-syntax parsing error in \`{{ ${e} }}\``
- );
- {
- const e = t.endsWith("?"),
- n = e ? t.slice(0, -1) : t;
- a.push({
- type: "base",
- identifier: n,
- renderParent: s,
- nullable: e,
- });
- }
- }
- }
- return (
- a.forEach((e, t, n) => {
- e.parent = n[t + 1] || null;
- }),
- a.reverse()
- );
- })(e);
- } catch (t) {
- const n = ft`{{ ${e} }}`,
- r = "Error: Invalid inline IDL string.";
- return (Zt(t.message, "core/inlines", { title: r, elements: [n] }), n);
- }
- const n = ft(document.createDocumentFragment()),
- r = [];
- for (const e of t)
- switch (e.type) {
- case "base": {
- const t = Gr(e);
- t && r.push(t);
- break;
- }
- case "attribute":
- r.push(Yr(e));
- break;
- case "internal-slot":
- r.push(Vr(e));
- break;
- case "method":
- r.push(Kr(e));
- break;
- case "enum":
- r.push(Xr(e));
- break;
- case "exception":
- r.push(Qr(e));
- break;
- case "idl-primitive":
- r.push(Jr(e));
- break;
- default:
- throw new Error("Unknown type.");
- }
- return n`${r}`;
- }
- const to = new Set(["alias", "reference"]),
- no = (async function () {
- const e = await mt.openDB("respec-biblio2", 12, {
- upgrade(e) {
- Array.from(e.objectStoreNames).map(t => e.deleteObjectStore(t));
- (e
- .createObjectStore("alias", { keyPath: "id" })
- .createIndex("aliasOf", "aliasOf", { unique: !1 }),
- e.createObjectStore("reference", { keyPath: "id" }));
- },
- }),
- t = Date.now();
- for (const n of [...to]) {
- const r = e.transaction(n, "readwrite").store,
- o = IDBKeyRange.lowerBound(t);
- let i = await r.openCursor(o);
- for (; i?.value; ) {
- const e = i.value;
- ((void 0 === e.expires || e.expires < t) && (await r.delete(e.id)),
- (i = await i.continue()));
- }
- }
- return e;
- })();
- const ro = {
- get ready() {
- return no;
- },
- async find(e) {
- return (
- (await this.isAlias(e)) && (e = (await this.resolveAlias(e)) ?? e),
- await this.get("reference", e)
- );
- },
- async has(e, t) {
- if (!to.has(e)) throw new TypeError(`Invalid type: ${e}`);
- if (!t) throw new TypeError("id is required");
- const n = (await this.ready).transaction(e, "readonly").store,
- r = IDBKeyRange.only(t);
- return !!(await n.openCursor(r));
- },
- async isAlias(e) {
- return await this.has("alias", e);
- },
- async resolveAlias(e) {
- if (!e) throw new TypeError("id is required");
- const t = (await this.ready).transaction("alias", "readonly").store,
- n = IDBKeyRange.only(e),
- r = await t.openCursor(n);
- return r ? r.value.aliasOf : null;
- },
- async get(e, t) {
- if (!to.has(e)) throw new TypeError(`Invalid type: ${e}`);
- if (!t) throw new TypeError("id is required");
- const n = (await this.ready).transaction(e, "readonly").store,
- r = IDBKeyRange.only(t),
- o = await n.openCursor(r);
- return o ? o.value : null;
- },
- async addAll(e, t) {
- if (!e) return;
- const n = { alias: [], reference: [] };
- for (const r of Object.keys(e)) {
- const o = { id: r, ...e[r], expires: t };
- o.aliasOf ? n.alias.push(o) : n.reference.push(o);
- }
- const r = [...to].flatMap(e => n[e].map(t => this.add(e, t)));
- await Promise.all(r);
- },
- async add(e, t) {
- if (!to.has(e)) throw new TypeError(`Invalid type: ${e}`);
- if ("object" != typeof t)
- throw new TypeError("details should be an object");
- if ("alias" === e && !t.hasOwnProperty("aliasOf"))
- throw new TypeError("Invalid alias object.");
- const n = await this.ready;
- let r = await this.has(e, t.id);
- if (r) {
- const o = await this.get(e, t.id);
- if (o && void 0 !== o.expires && o.expires < Date.now()) {
- const { store: o } = n.transaction(e, "readwrite");
- (await o.delete(t.id), (r = !1));
- }
- }
- const { store: o } = n.transaction(e, "readwrite");
- return r ? await o.put(t) : await o.add(t);
- },
- async close() {
- (await this.ready).close();
- },
- async clear() {
- const e = await this.ready,
- t = [...to],
- n = e.transaction(t, "readwrite"),
- r = t.map(e => n.objectStore(e).clear());
- await Promise.all(r);
- },
- },
- oo = {},
- io = new URL("https://api.specref.org/bibrefs?refs="),
- so = St({ hint: "dns-prefetch", href: io.origin });
- let ao;
- document.head.appendChild(so);
- const lo = new Promise(e => {
- ao = e;
- });
- async function co(e, t = { forceUpdate: !1 }) {
- const n = [...new Set(e)].filter(e => e.trim());
- if (!n.length || !1 === navigator.onLine) return null;
- let r;
- try {
- r = await fetch(io.href + n.join(","));
- } catch (e) {
- return (console.error(e), null);
- }
- if ((!t.forceUpdate && !r.ok) || 200 !== r.status) return null;
- const o = await r.json(),
- i = Date.now() + 36e5;
- try {
- const e = Date.parse(r.headers.get("Expires") || ""),
- t = Number.isNaN(e) ? i : Math.min(e, i);
- await ro.addAll(o, t);
- } catch (e) {
- console.error(e);
- }
- return o;
- }
- async function uo(e) {
- const t = await lo;
- if (!t.hasOwnProperty(e)) return null;
- const n = t[e];
- return n.aliasOf ? await uo(n.aliasOf) : n;
- }
- var po = Object.freeze({
- __proto__: null,
- Plugin: class {
- constructor(e) {
- this.conf = e;
- }
- normalizeReferences() {
- const e = new Set(
- [...this.conf.normativeReferences].map(e => e.toLowerCase())
- );
- Array.from(this.conf.informativeReferences)
- .filter(t => e.has(t.toLowerCase()))
- .forEach(e => this.conf.informativeReferences.delete(e));
- }
- getRefKeys() {
- return {
- informativeReferences: Array.from(this.conf.informativeReferences),
- normativeReferences: Array.from(this.conf.normativeReferences),
- };
- }
- async run() {
- (this.conf.localBiblio || (this.conf.localBiblio = {}),
- (this.conf.biblio = oo));
- const e = Object.keys(this.conf.localBiblio)
- .filter(e => this.conf.localBiblio?.[e]?.hasOwnProperty("aliasOf"))
- .map(e => this.conf.localBiblio?.[e]?.aliasOf)
- .filter(e => e && !this.conf.localBiblio?.hasOwnProperty(e));
- this.normalizeReferences();
- const t = this.getRefKeys(),
- n = Array.from(
- new Set(
- t.normativeReferences
- .concat(t.informativeReferences)
- .filter(e => !this.conf.localBiblio?.hasOwnProperty(e))
- .concat(e.filter(Boolean))
- .sort()
- )
- ),
- r = n.length
- ? await (async function (e) {
- const t = [];
- try {
- await ro.ready;
- const n = e.map(async e => ({
- id: e,
- data: await ro.find(e),
- }));
- t.push(...(await Promise.all(n)));
- } catch (n) {
- (t.push(...e.map(e => ({ id: e, data: null }))),
- console.warn(n));
- }
- return t;
- })(n)
- : [],
- o = { hasData: [], noData: [] };
- (r.forEach(e => {
- (e.data ? o.hasData : o.noData).push(e);
- }),
- o.hasData.forEach(e => {
- e.data && (oo[e.id] = e.data);
- }));
- const i = o.noData.map(e => e.id);
- if (i.length) {
- const e = await co(i, { forceUpdate: !0 });
- Object.assign(oo, e);
- }
- (Object.assign(oo, this.conf.localBiblio),
- (() => {
- ao(this.conf.biblio);
- })());
- }
- },
- biblio: oo,
- name: "core/biblio",
- resolveRef: uo,
- updateFromNetwork: co,
- });
- const ho = "core/render-biblio";
- function fo(e) {
- return `bib-${It(e)}`;
- }
- const mo = Ot({
- en: {
- info_references: "Informative references",
- norm_references: "Normative references",
- references: "References",
- reference_not_found: "Reference not found.",
- },
- ko: { references: "참조" },
- nl: {
- info_references: "Informatieve referenties",
- norm_references: "Normatieve referenties",
- references: "Referenties",
- },
- es: {
- info_references: "Referencias informativas",
- norm_references: "Referencias normativas",
- references: "Referencias",
- reference_not_found: "Referencia no encontrada.",
- },
- ja: {
- info_references: "参照用参考文献",
- norm_references: "規範的参考文献",
- references: "参考文献",
- },
- de: {
- info_references: "Weiterführende Informationen",
- norm_references: "Normen und Spezifikationen",
- references: "Referenzen",
- },
- zh: {
- info_references: "非规范性引用",
- norm_references: "规范性引用",
- references: "参考文献",
- },
- cs: {
- info_references: "Informativní odkazy",
- norm_references: "Normativní odkazy",
- references: "Odkazy",
- reference_not_found: "Odkaz nebyl nalezen.",
- },
- }),
- go = new Map([
- ["CR", "W3C Candidate Recommendation"],
- ["ED", "W3C Editor's Draft"],
- ["LCWD", "W3C Last Call Working Draft"],
- ["NOTE", "W3C Working Group Note"],
- ["PR", "W3C Proposed Recommendation"],
- ["REC", "W3C Recommendation"],
- ["WD", "W3C Working Draft"],
- ]),
- bo =
- ((yo = "."),
- e => {
- const t = e.trim();
- return !t || t.endsWith(yo) ? t : t + yo;
- });
- var yo;
- function wo(e, t) {
- const { goodRefs: n, badRefs: r } = (function (e) {
- const t = [],
- n = [];
- for (const r of e) r.refcontent ? t.push(r) : n.push(r);
- return { goodRefs: t, badRefs: n };
- })(e.map(vo)),
- o = (function (e) {
- const t = new Map();
- for (const n of e)
- t.has(n.refcontent?.id ?? "") || t.set(n.refcontent?.id ?? "", n);
- return [...t.values()];
- })(n),
- i = o
- .concat(r)
- .sort((e, t) =>
- e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase())
- ),
- s = ft`
-
${t}
-
${i.map(xo)}
- `;
- Dt(s, "", t);
- const a = (function (e) {
- const t = new Map();
- for (const n of e) {
- const e = n.refcontent?.id ?? "",
- r = t.has(e) ? t.get(e) : t.set(e, []).get(e);
- r?.push(n.ref);
- }
- return t;
- })(n);
- return (
- (function (e, t) {
- e.map(({ ref: e, refcontent: n }) => {
- const r = `#${fo(e)}`,
- o = (t.get(n.id ?? "") ?? [])
- .map(e => `a.bibref[href="#${fo(e)}"]`)
- .join(",");
- return {
- refUrl: r,
- elems: document.querySelectorAll(o),
- refcontent: n,
- };
- }).forEach(({ refUrl: e, elems: t, refcontent: n }) => {
- t.forEach(t => {
- (t.setAttribute("href", e),
- t.setAttribute("title", n.title),
- (t.dataset.linkType = "biblio"));
- });
- });
- })(o, a),
- (function (e) {
- for (const { ref: t } of e) {
- const e = [
- ...document.querySelectorAll(`a.bibref[href="#${fo(t)}"]`),
- ].filter(
- ({ textContent: e }) => e.toLowerCase() === t.toLowerCase()
- );
- Zt(`Reference "[${t}]" not found.`, ho, {
- hint: `Search for ["${t}"](https://www.specref.org?q=${t}) on Specref to see if it exists or if it's misspelled.`,
- elements: e,
- });
- }
- })(r),
- s
- );
- }
- function vo(e) {
- let t = oo[e],
- n = e;
- const r = new Set([n]);
- for (; t && t.aliasOf; )
- if (r.has(t.aliasOf)) {
- t = null;
- Zt(
- `Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,
- ho
- );
- } else ((n = t.aliasOf), (t = oo[n]), r.add(n));
- return (
- t && !t.id && (t.id = e.toLowerCase()),
- { ref: e, refcontent: t }
- );
- }
- function ko(e, t) {
- const n = e.replace(/^(!|\?)/, ""),
- r = `#${fo(n)}`,
- o = ft`${t || n}`;
- return t ? o : ft`[${o}]`;
- }
- function xo(e) {
- const { ref: t, refcontent: n } = e,
- r = fo(t);
- return ft`
-
- `;
- }
- function $o(e) {
- if ("string" == typeof e) return e;
- let t = `${e.title}`;
- if (
- ((t = e.href ? `${t}. ` : `${t}. `), e.authors)
- ) {
- if (!Array.isArray(e.authors)) {
- const t = `The "authors" field in reference "${e.id || e.title}" must be an array.`,
- n = `Use \`authors: [${JSON.stringify(e.authors)}]\` instead of \`authors: ${JSON.stringify(e.authors)}\`.`;
- (Zt(t, ho, { hint: n }), (e.authors = [e.authors]));
- }
- e.authors.length &&
- ((t += e.authors.join("; ")),
- e.etAl && (t += " et al"),
- t.endsWith(".") || (t += ". "));
- }
- return (
- e.publisher && (t = `${t} ${bo(e.publisher)} `),
- e.date && (t += `${e.date}. `),
- e.status && (t += `${go.get(e.status) || e.status}. `),
- e.href && (t += `URL: ${e.href}`),
- t
- );
- }
- var Eo = Object.freeze({
- __proto__: null,
- name: ho,
- renderInlineCitation: ko,
- run: function (e) {
- const t = Array.from(e.informativeReferences),
- n = Array.from(e.normativeReferences);
- if (!t.length && !n.length) return;
- const r =
- document.querySelector("section#references") ||
- ft``;
- if (
- (document.querySelector("section#references > :is(h2, h1)") ||
- r.prepend(ft`
${mo.references}
`),
- r.classList.add("appendix"),
- n.length)
- ) {
- const e = wo(n, mo.norm_references);
- r.appendChild(e);
- }
- if (t.length) {
- const e = wo(t, mo.info_references);
- r.appendChild(e);
- }
- document.body.appendChild(r);
- },
- });
- const So = "core/inlines",
- _o = {},
- Co = e => new RegExp(e.map(e => e.source).join("|")),
- Lo = Ot({
- en: {
- rfc2119Keywords: () =>
- Co([
- /\bMUST(?:\s+NOT)?\b/,
- /\bSHOULD(?:\s+NOT)?\b/,
- /\bSHALL(?:\s+NOT)?\b/,
- /\bMAY\b/,
- /\b(?:NOT\s+)?REQUIRED\b/,
- /\b(?:NOT\s+)?RECOMMENDED\b/,
- /\bOPTIONAL\b/,
- ]),
- },
- de: {
- rfc2119Keywords: () =>
- Co([
- /\bMUSS\b/,
- /\bMÜSSEN\b/,
- /\bERFORDERLICH\b/,
- /\b(?:NICHT\s+)?NÖTIG\b/,
- /\bDARF(?:\s+NICHT)?\b/,
- /\bDÜRFEN(?:\s+NICHT)?\b/,
- /\bVERBOTEN\b/,
- /\bSOLL(?:\s+NICHT)?\b/,
- /\bSOLLEN(?:\s+NICHT)?\b/,
- /\b(?:NICHT\s+)?EMPFOHLEN\b/,
- /\bKANN\b/,
- /\bKÖNNEN\b/,
- /\bOPTIONAL\b/,
- ]),
- },
- }),
- Ao = /(?:`[^`]+`)(?!`)/,
- To = /(?:{{[^}]+\?*}})/,
- Ro = /\B\|\w[\w\s]*(?:\s*:[\w\s&;"?<>]+\??)?\|\B/,
- Oo = /(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,
- No = /(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,
- Po = /(?:\[=[^=]+=\])/,
- Io = /(?:\[\^[^^]+\^\])/,
- Do = /(?:\{\^[^}^]+\^\})/;
- function jo(e) {
- const t = e.slice(2, -2).trim(),
- [n, r, o] = t
- .split("/", 3)
- .map(e => e && e.trim())
- .filter(e => !!e),
- [i, s, a] = t.startsWith("/")
- ? ["element-attr", null, n]
- : o
- ? ["attr-value", `${n}/${r}`, o]
- : r
- ? ["element-attr", n, r]
- : ["element", null, n];
- return ft`${a}`;
- }
- function zo(e) {
- const t = (
- e
- .slice(2, -2)
- .trim()
- .match(/"([^"]*)"|([^/]+)/g) || []
- ).map(e => e.trim());
- if (1 === t.length) {
- const e = t[0];
- return ft`${e}`;
- }
- const n = t[0],
- r = t[1],
- o = r.startsWith('"') && r.endsWith('"') ? "cddl-value" : "cddl-key";
- return ft`${r}`;
- }
- function Mo(e) {
- const t = Rt(e),
- n = ft`${t}`;
- return ((_o[t] = !0), n);
- }
- function qo(e) {
- const t = e.slice(3, -3).trim();
- return t.startsWith("#")
- ? ft``
- : ft``;
- }
- function Ho(e, t) {
- const n = Rt(e.slice(2, -2));
- if (n.startsWith("\\")) return e.replace(/^(\{\{\s*)\\/, "$1");
- const r = eo(n);
- return !!t.parentElement?.closest("dfn,a")
- ? Go(`\`${r.textContent}\``)
- : r;
- }
- function Bo(e, t, n) {
- const r = e.slice(2, -2);
- if (r.startsWith("\\")) return [`[[${r.slice(1)}]]`];
- const [o, i] = r.split("|").map(Rt),
- { type: s, illegal: a } = Mt(o, t.parentElement),
- l = ko(o, i),
- c = o.replace(/^(!|\?)/, "");
- if (a && !n.normativeReferences.has(c)) {
- const e = l.childNodes[1] || l;
- Yt(
- "Normative references in informative sections are not allowed. ",
- So,
- {
- elements: [e],
- hint: `Remove '!' from the start of the reference \`[[${r}]]\``,
- }
- );
- }
- return (
- "informative" !== s || a
- ? n.normativeReferences.add(c)
- : n.informativeReferences.add(c),
- l.childNodes[1] ? l.childNodes : [l]
- );
- }
- function Fo(e, t, n) {
- return "ABBR" === t.parentElement?.tagName
- ? e
- : ft`${e}`;
- }
- function Wo(e) {
- const t = e.slice(1, -1).split(":", 2),
- [n, r] = t.map(e => e.trim());
- return ft`${n}`;
- }
- function Uo(e) {
- const t = (function (e) {
- const t = e => e.replace("%%", "/").split("/").map(Rt).join("/"),
- n = e.replace("\\/", "%%"),
- r = n.lastIndexOf("/");
- if (-1 === r) return [t(n)];
- const o = n.substring(0, r),
- i = n.substring(r + 1, n.length);
- return [t(o), t(i)];
- })((e = e.slice(2, -2))),
- [n, r] = 2 === t.length ? t : [null, t[0]],
- [o, i] = r.includes("|")
- ? r.split("|", 2).map(e => e.trim())
- : [null, r],
- s = Vo(i),
- a = n ? Rt(n) : null;
- return ft`${s}`;
- }
- function Go(e) {
- const t = e.slice(1, -1);
- return ft`${t}`;
- }
- function Vo(e) {
- return Ao.test(e)
- ? e
- .split(/(`[^`]+`)(?!`)/)
- .map(e => (e.startsWith("`") ? Go(e) : Vo(e)))
- : document.createTextNode(e);
- }
- var Zo = Object.freeze({
- __proto__: null,
- name: So,
- rfc2119Usage: _o,
- run: function (e) {
- const t = new Map();
- (document.normalize(),
- document.querySelector("section#conformance") ||
- document.body.classList.add("informative"),
- (e.normativeReferences = new Bt()),
- (e.informativeReferences = new Bt()),
- e.respecRFC2119 || (e.respecRFC2119 = _o));
- const n = document.querySelectorAll("abbr[title]:not(.exclude)");
- for (const { textContent: e, title: r } of n) {
- const n = Rt(e),
- o = Rt(r);
- t.set(n, o);
- }
- const r = t.size
- ? new RegExp(
- `(?:\\b${[...t.keys()].map(e => vt(e)).join("\\b)|(?:\\b")}\\b)`
- )
- : null,
- o = (function (e, t = [], n = { wsNodes: !0 }) {
- const r = t.join(", "),
- o = document.createNodeIterator(e, NodeFilter.SHOW_TEXT, {
- acceptNode: e =>
- n.wsNodes || e.data.trim()
- ? r && e.parentElement?.closest(r)
- ? NodeFilter.FILTER_REJECT
- : NodeFilter.FILTER_ACCEPT
- : NodeFilter.FILTER_REJECT,
- }),
- i = [];
- let s;
- for (; (s = o.nextNode()); ) i.push(s);
- return i;
- })(
- document.body,
- ["#respec-ui", ".head", "pre", "svg", "script", "style"],
- { wsNodes: !1 }
- ),
- i = Lo.rfc2119Keywords(),
- s = new RegExp(
- `(${Co([i, To, Do, Ro, Oo, No, Po, Ao, Io, ...(r ? [r] : [])]).source})`
- );
- for (const n of o) {
- const r = n.data.split(s);
- if (1 === r.length) continue;
- const o = document.createDocumentFragment();
- let a = !0;
- for (const s of r)
- if (((a = !a), a))
- switch (!0) {
- case s.startsWith("{{"):
- o.append(Ho(s, n));
- break;
- case s.startsWith("{^"):
- o.append(zo(s));
- break;
- case s.startsWith("[[["):
- o.append(qo(s));
- break;
- case s.startsWith("[["):
- o.append(...Bo(s, n, e));
- break;
- case s.startsWith("|"):
- o.append(Wo(s));
- break;
- case s.startsWith("[="):
- o.append(Uo(s));
- break;
- case s.startsWith("`"):
- o.append(Go(s));
- break;
- case s.startsWith("[^"):
- o.append(jo(s));
- break;
- case t.has(s):
- o.append(Fo(s, n, t));
- break;
- case i.test(s):
- o.append(Mo(s));
- }
- else o.append(s);
- n.replaceWith(o);
- }
- },
- });
- const Yo = "aom/conformance",
- Ko = Ot({
- en: {
- conformance: "Conformance",
- normativity:
- "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.",
- keywordInterpretation: (e, t) => ft`
- The key word${t ? "s" : ""} ${e} in this document
- ${t ? "are" : "is"} to be interpreted as described in
- BCP 14
- ${ko("RFC2119")} ${ko("RFC8174")}
- when, and only when, ${t ? "they appear" : "it appears"} in all
- capitals, as shown here.
-
`,
- },
- });
- function Xo(e, t) {
- const n = [...Object.keys(_o)];
- n.length &&
- (t.normativeReferences.add("RFC2119"),
- t.normativeReferences.add("RFC8174"));
- const r =
- ((o = n.sort()),
- []
- .concat(Lt(o, e => ft`${e}`))
- .map(e => ("string" == typeof e ? ft`${e}` : e)));
- var o;
- const i = n.length > 1,
- s = ft`
-
${Ko.conformance}
-
${Ko.normativity}
- ${n.length ? Ko.keywordInterpretation(r, i) : null}
- `;
- e.prepend(...s.childNodes);
- }
- var Qo = Object.freeze({
- __proto__: null,
- name: Yo,
- run: function (e) {
- const t = document.querySelector("section#conformance");
- if (
- (t && !t.classList.contains("override") && Xo(t, e),
- !t && Object.keys(_o).length)
- ) {
- Yt(
- "Document uses RFC2119 keywords but lacks a conformance section.",
- Yo,
- { hint: 'Please add a ``.' }
- );
- }
- },
- });
- function Jo(e, t, n, r) {
- try {
- switch (t) {
- case "element-attr":
- return (document.createAttribute(e), !0);
- case "element":
- return (document.createElement(e), !0);
- }
- } catch (o) {
- Zt(`Invalid ${t} name "${e}": ${o.message}`, r, {
- hint: `Check that the ${t} name is allowed per the XML's Name production for ${t}.`,
- elements: [n],
- });
- }
- return !1;
- }
- function ei(e, t, n, r) {
- if (/^[a-z]+(-[a-z]+)*$/i.test(e)) return !0;
- return (
- Zt(`Invalid ${t} name "${e}".`, r, {
- hint: `Check that the ${t} name is allowed per the naming rules for this type.`,
- elements: [n],
- }),
- !1
- );
- }
- const ti = new Gt();
- function ni(e, t) {
- for (const n of t) (ti.has(n) || ti.set(n, new Set()), ti.get(n)?.add(e));
- }
- const ri = "core/dfn",
- oi = new Map([
- ["abstract-op", { requiresFor: !1 }],
- [
- "attr-value",
- {
- requiresFor: !0,
- associateWith: "a markup attribute",
- validator: ei,
- },
- ],
- ["element", { requiresFor: !1, validator: Jo }],
- ["element-attr", { requiresFor: !1, validator: Jo }],
- [
- "element-state",
- {
- requiresFor: !0,
- associateWith: "a markup attribute",
- validator: ei,
- },
- ],
- ["event", { requiresFor: !1, validator: ei }],
- ["http-header", { requiresFor: !1 }],
- [
- "media-type",
- {
- requiresFor: !1,
- validator: function (e, t, n, r) {
- try {
- const t = new bt(e);
- if (t.toString() !== e)
- throw new Error(
- `Input doesn't match its canonical form: "${t}".`
- );
- } catch (o) {
- return (
- Zt(`Invalid ${t} "${e}": ${o.message}.`, r, {
- hint: "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`).",
- elements: [n],
- }),
- !1
- );
- }
- return !0;
- },
- },
- ],
- ["scheme", { requiresFor: !1, validator: ei }],
- [
- "permission",
- {
- requiresFor: !1,
- validator: function (e, t, n, r) {
- return e.startsWith('"') && e.endsWith('"')
- ? ei(e.slice(1, -1), t, n, r)
- : (Zt(`Invalid ${t} "${e}".`, r, {
- hint: `Check that the ${t} is quoted with double quotes.`,
- elements: [n],
- }),
- !1);
- },
- },
- ],
- ]),
- ii = [...oi.keys()];
- function si(e, t) {
- let n = "";
- switch (!0) {
- case ii.some(t => e.classList.contains(t)):
- ((n = [...e.classList].find(e => oi.has(e)) ?? ""),
- (function (e, t, n) {
- const r = oi.get(t);
- if (r?.requiresFor && !n.dataset.dfnFor) {
- const e = Jt`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,
- { associateWith: o } = r,
- i = Jt`Use a ${"[data-dfn-for]"} attribute to associate this with ${o ?? ""}.`;
- Zt(e, ri, { hint: i, elements: [n] });
- }
- r?.validator && r.validator(e, t, n, ri);
- })(t, n, e));
- break;
- case Mr.test(t):
- n = (function (e, t) {
- t.dataset.hasOwnProperty("idl") || (t.dataset.idl = "");
- const n = t.closest("[data-dfn-for]");
- t !== n &&
- n?.dataset.dfnFor &&
- (t.dataset.dfnFor = n.dataset.dfnFor);
- if (!t.dataset.dfnFor) {
- const n = Jt`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;
- Zt(
- `Internal slot "${e}" must be associated with a WebIDL interface.`,
- ri,
- { hint: n, elements: [t] }
- );
- }
- t.matches(".export, [data-export]") || (t.dataset.noexport = "");
- const r = e.endsWith(")") ? "method" : "attribute";
- if (!t.dataset.dfnType) return r;
- const o = ["attribute", "method"],
- { dfnType: i } = t.dataset;
- if (!o.includes(i) || r !== i) {
- const n = Jt`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,
- i = `The only allowed types are: ${Qt(o, { quotes: !0 })}. The slot "${e}" seems to be a "${Xt(r)}"?`;
- return (Zt(n, ri, { hint: i, elements: [t] }), "dfn");
- }
- return i;
- })(t, e);
- }
- if (!n && !e.matches("[data-dfn-type]")) {
- const t = e.closest("[data-dfn-type]");
- n = t?.dataset.dfnType ?? "";
- }
- n && !e.dataset.dfnType && (e.dataset.dfnType = n);
- }
- function ai(e) {
- switch (!0) {
- case e.matches(".export.no-export"):
- Zt(
- Jt`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,
- ri,
- { elements: [e], hint: "Please use only one." }
- );
- break;
- case e.matches(".no-export, [data-noexport]"):
- if (e.matches("[data-export]")) {
- (Zt(
- Jt`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,
- ri,
- { elements: [e], hint: "Please chose only one." }
- ),
- delete e.dataset.export);
- }
- e.dataset.noexport = "";
- break;
- case e.matches(":is(.export):not([data-noexport], .no-export)"):
- e.dataset.export = "";
- }
- }
- var li = Object.freeze({
- __proto__: null,
- name: ri,
- run: function () {
- for (const e of document.querySelectorAll("dfn")) {
- const t = jt(e);
- if ((ni(e, t), e.dataset.cite && /\b#\b/.test(e.dataset.cite)))
- continue;
- const [n] = t;
- (si(e, n), ai(e));
- const r = (e.dataset.localLt || "").split("|").map(Rt),
- o = t.filter(e => !r.includes(e));
- (o.length > 1 || n !== Rt(e.textContent)) &&
- (e.dataset.lt = o.join("|"));
- }
- },
- });
- var ci = Object.freeze({
- __proto__: null,
- name: "core/pluralize",
- run: function (e) {
- if (!e.pluralize) return;
- const t = (function () {
- const e = new Set();
- document.querySelectorAll("a:not([href])").forEach(t => {
- const n = Rt(t.textContent).toLowerCase();
- (e.add(n), t.dataset.lt && e.add(t.dataset.lt));
- });
- const t = new Set(),
- n = document.querySelectorAll("dfn:not([data-lt-noDefault])");
- return (
- n.forEach(e => {
- const n = Rt(e.textContent).toLowerCase();
- (t.add(n),
- e.dataset.lt && e.dataset.lt.split("|").forEach(e => t.add(e)),
- e.dataset.localLt &&
- e.dataset.localLt.split("|").forEach(e => t.add(e)));
- }),
- function (n) {
- const r = Rt(n).toLowerCase(),
- o = yt.isSingular(r) ? yt.plural(r) : yt.singular(r);
- return e.has(o) && !t.has(o) ? o : "";
- }
- );
- })();
- document
- .querySelectorAll(
- "dfn:not([data-lt-no-plural]):not([data-lt-noDefault])"
- )
- .forEach(e => {
- const n = [e.textContent];
- (e.dataset.lt && n.push(...e.dataset.lt.split("|")),
- e.dataset.localLt && n.push(...e.dataset.localLt.split("|")));
- const r = new Set(n.map(t).filter(e => e));
- if (r.size) {
- const t = e.dataset.plurals ? e.dataset.plurals.split("|") : [],
- n = [...new Set([...t, ...r])];
- ((e.dataset.plurals = n.join("|")), ni(e, n));
- }
- });
- },
- });
- var ui = String.raw`span.example-title{text-transform:none}
-:is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both}
-div.illegal-example{color:red}
-div.illegal-example p{color:#000}
-aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;
- const di = Ot({
- en: { example: "Example" },
- nl: { example: "Voorbeeld" },
- es: { example: "Ejemplo" },
- ko: { example: "예시" },
- ja: { example: "例" },
- de: { example: "Beispiel" },
- zh: { example: "例" },
- cs: { example: "Příklad" },
- });
- function pi(e, t, n) {
- ((n.title = e.title), n.title && e.removeAttribute("title"));
- const r = t > 0 ? ` ${t}` : "",
- o = n.title ? ft`: ${n.title}` : "";
- return ft`
- `;
- }
- };
- async function ea(e, t, n, r, o) {
- let i;
- try {
- const s = await Xs;
- if (!s) throw new Error("`respecConfig.github` is not set");
- const a = r || s.fullName,
- l = new URL("commits", `${s.apiBase}/${a}/`);
- (e && l.searchParams.set("from", e),
- l.searchParams.set("to", t),
- o && l.searchParams.set("path", o));
- const c = await fetch(l.href);
- if (!c.ok)
- throw new Error(
- `Request to ${l} failed with status code ${c.status}`
- );
- if (((i = await c.json()), !i.length))
- throw new Error(`No commits between ${e}..${t}.`);
- i = i.filter(n);
- } catch (e) {
- const t = `Error loading commits from GitHub. ${e.message}`;
- throw new Error(t, { cause: e });
- }
- return i;
- }
- const ta = [Object.freeze({ __proto__: null, element: Js, name: Qs })];
- var na = Object.freeze({
- __proto__: null,
- name: "core/custom-elements/index",
- run: async function () {
- ta.forEach(e => {
- customElements.define(e.name, e.element);
- });
- const e = ta.map(e => e.name).join(", "),
- t = [...document.querySelectorAll(e)].map(
- e => new Promise(t => e.addEventListener("done", t, { once: !0 }))
- );
- await Promise.all(t);
- },
- });
- var ra = Object.freeze({
- __proto__: null,
- name: "core/dfn-contract",
- run: function () {
- (!(function () {
- const e = document.querySelectorAll(
- "dfn:is([data-dfn-type=''],:not([data-dfn-type]))"
- );
- for (const t of e) t.dataset.dfnType = "dfn";
- const t = document.querySelectorAll(
- "dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])"
- );
- for (const e of t) e.dataset.export = "";
- })(),
- (function () {
- const e = document.querySelectorAll(
- "dl.definitions dt:has(dfn[data-dfn-type])"
- );
- for (const t of e) {
- const e = t.querySelector("dfn[data-dfn-type]").id,
- n = t.nextElementSibling;
- n && !n.dataset.defines && e && (n.dataset.defines = `#${e}`);
- }
- const t = document.querySelectorAll(
- ".definition:has(dfn[data-dfn-type])"
- );
- for (const e of t) {
- const t = e.querySelector("dfn[data-dfn-type]");
- t.id && !e.dataset.defines && (e.dataset.defines = `#${t.id}`);
- }
- })());
- },
- });
- const oa = "core/linter-rules/check-charset",
- ia = Ot({
- en: {
- msg: "Document must only contain one `` tag with charset set to 'utf-8'",
- hint: 'Add this line in your document `` section - `` or set charset to "utf-8" if not set already.',
- },
- zh: {
- msg: "文档只能包含一个 charset 属性为 utf-8 的 `` 标签",
- hint: '将此行添加到文档的 `` 部分—— `` 或将 charset 设置为 utf-8(如果尚未设置)。',
- },
- cs: {
- msg: "Dokument smí obsahovat pouze jeden tag `` s charset nastaveným na 'utf-8'",
- hint: 'Přidejte tento řádek do sekce `` vašeho dokumentu - `` nebo nastavte charset na "utf-8", pokud ještě není nastaven.',
- },
- });
- var sa = Object.freeze({
- __proto__: null,
- name: oa,
- run: function (e) {
- if (!e.lint?.["check-charset"]) return;
- const t = document.querySelectorAll("meta[charset]"),
- n = [];
- for (const e of t)
- n.push((e.getAttribute("charset") ?? "").trim().toLowerCase());
- (n.includes("utf-8") && 1 === t.length) ||
- Yt(ia.msg, oa, { hint: ia.hint, elements: [...t] });
- },
- });
- const aa = "no-dfn-in-abstract",
- la = `core/linter-rules/${aa}`,
- ca = Ot({
- en: {
- msg: e =>
- `Definition \`${e}\` is in an unnumbered section (e.g. abstract or SotD).`,
- get hint() {
- return Jt`Definitions in unnumbered sections (abstract, SotD) are semantically out of place and appear in the terms index without a section number. Move this definition to a numbered section such as "Terminology". See ${"[export|#data-export]"}.`;
- },
- },
- }),
- ua = ["section#abstract", "section#sotd", "section.introductory"].join(
- ", "
- );
- var da = Object.freeze({
- __proto__: null,
- name: la,
- run: function (e) {
- if (!e.lint?.[aa]) return;
- const t = [...document.querySelectorAll("dfn")].filter(e =>
- e.closest(ua)
- );
- t.forEach(e => {
- const t = Rt(e.textContent);
- Yt(ca.msg(t), la, { hint: ca.hint, elements: [e] });
- });
- },
- });
- const pa = "core/linter-rules/check-punctuation",
- ha = [".", ":", "!", "?"],
- fa = ha.map(e => `"${e}"`).join(", "),
- ma = Ot({
- en: {
- msg: "`p` elements should end with a punctuation mark.",
- hint: `Please make sure \`p\` elements end with one of: ${fa}.`,
- },
- cs: {
- msg: "Elementy `p` by měly končit interpunkčním znaménkem.",
- hint: `Ujistěte se, že elementy \`p\` končí jedním z těchto znaků: ${fa}.`,
- },
- });
- var ga = Object.freeze({
- __proto__: null,
- name: pa,
- run: function (e) {
- if (!e.lint?.["check-punctuation"]) return;
- const t = new RegExp(`[${ha.join("")}\\]]$|^ *$`, "m"),
- n = [
- ...document.querySelectorAll("p:not(#back-to-top,#w3c-state)"),
- ].filter(e => !t.test(e.textContent.trim()));
- n.length && Yt(ma.msg, pa, { hint: ma.hint, elements: n });
- },
- });
- const ba = "core/linter-rules/local-refs-exist",
- ya = Ot({
- en: {
- msg: "Broken local reference found in document.",
- hint: "Please fix the links mentioned.",
- },
- cs: {
- msg: "V dokumentu byla nalezena nefunkční lokální reference.",
- hint: "Opravte prosím uvedené odkazy.",
- },
- });
- function wa(e) {
- const t = e.getAttribute("href")?.substring(1);
- if (!t) return;
- const n = e.ownerDocument;
- return !n.getElementById(t) && !n.getElementsByName(t).length;
- }
- var va = Object.freeze({
- __proto__: null,
- name: ba,
- run: function (e) {
- if (!e.lint?.["local-refs-exist"]) return;
- const t = [...document.querySelectorAll("a[href^='#']")].filter(wa);
- t.length && Yt(ya.msg, ba, { hint: ya.hint, elements: t });
- },
- });
- const ka = "core/linter-rules/no-headingless-sections",
- xa = Ot({
- en: {
- msg: "All sections must start with a `h2-6` element.",
- hint: "Add a `h2-6` to the offending section or use a `
`.",
- },
- nl: {
- msg: "Alle secties moeten beginnen met een `h2-6` element.",
- hint: "Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `