diff --git a/builds/respec-aom.js b/builds/respec-aom.js index bfd4f44c0b..e3e87ce797 100644 --- a/builds/respec-aom.js +++ b/builds/respec-aom.js @@ -1,4 +1,4 @@ -window.respecVersion="35.1.1",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function o(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:s});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return x(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){b=e(b)}function w(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),x(this.request)}:function(...t){return x(e.apply(k(this),t))}}function v(e){return"function"==typeof e?w(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function x(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(x(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const $=["get","getKey","getAll","getAllKeys","count"],E=["put","add","delete","clear"],_=new Map;function C(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_.get(t))return _.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=E.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!$.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return _.set(t,s),s}y((e=>({...e,get:(t,n,r)=>C(t,n)||e.get(t,n,r),has:(t,n)=>!!C(t,n)||e.has(t,n)})));const S=["continue","continuePrimaryKey","advance"],A={},L=new WeakMap,T=new WeakMap,R={get(e,t){if(!S.includes(t))return e[t];let n=A[t];return n||(n=A[t]=function(...e){L.set(this,T.get(this)[t](...e))}),n}};async function*N(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(T.set(n,t),g.set(n,k(t));t;)yield n,t=await(L.get(n)||t.continue()),L.delete(n)}function O(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}y((e=>({...e,get:(t,n,r)=>O(t,n)?N:e.get(t,n,r),has:(t,n)=>O(t,n)||e.has(t,n)})));var I=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),x(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=x(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(x(i.result),e.oldVersion,e.newVersion,x(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:x});const P=/^[!#$%&'*+-.^`|~\w]+$/,D=/[\u000A\u000D\u0009\u0020]/u,j=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function z(e,t,n){(t&&""!==t&&!e.has(t)&&j.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let q={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function F(e){q=e}const B=/[&<>"']/,H=new RegExp(B.source,"g"),W=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,U=new RegExp(W.source,"g"),V={"&":"&","<":"<",">":">",'"':""","'":"'"},Z=e=>V[e];function Y(e,t){if(t){if(B.test(e))return e.replace(H,Z)}else if(W.test(e))return e.replace(U,Z);return e}const G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function K(e){return e.replace(G,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Q=/(^|[^\[])\^/g;function X(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Q,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function J(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ee={exec:()=>null};function te(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ne(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=ne(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=te(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(te(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Y(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=ne(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),re(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return re(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Y(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Y(t[1]),n="mailto:"+e):(e=Y(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=Y(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=Y(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Y(t[0]),{type:"text",raw:t[0],text:e}}}}const se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ie=/(?:[*+-]|\d{1,9}[.)])/,ae=X(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ie).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ce=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,le=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ue=X(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",le).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),de=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ie).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe=/|$))/,he=X("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",fe).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ge={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",me).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ue,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:se,html:he,lheading:ae,list:de,newline:/^(?: *(?:\n|$))+/,paragraph:me,table:ee,text:/^[^\n]+/},be=X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ye={...ge,table:be,paragraph:X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},we={...ge,html:X("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(ce).replace("hr",se).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xe=/^( {2,}|\\)\n(?!\s*$)/,ke="\\p{P}\\p{S}",$e=X(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ke).getRegex(),Ee=X(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ke).getRegex(),_e=X("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ke).getRegex(),Ce=X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ke).getRegex(),Se=X(/\\([punct])/,"gu").replace(/punct/g,ke).getRegex(),Ae=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Le=X(fe).replace("(?:--\x3e|$)","--\x3e").getRegex(),Te=X("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Le).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Re=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne=X(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Re).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oe=X(/^!?\[(label)\]\[(ref)\]/).replace("label",Re).replace("ref",le).getRegex(),Ie=X(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex(),Pe={_backpedal:ee,anyPunctuation:Se,autolink:Ae,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:xe,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ee,emStrongLDelim:Ee,emStrongRDelimAst:_e,emStrongRDelimUnd:Ce,escape:ve,link:Ne,nolink:Ie,punctuation:$e,reflink:Oe,reflinkSearch:X("reflink|nolink(?!\\()","g").replace("reflink",Oe).replace("nolink",Ie).getRegex(),tag:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Be{options;constructor(e){this.options=e||q}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'
'+(n?e:Y(e,!0))+"
\n":"
"+(n?e:Y(e,!0))+"
\n"}blockquote(e){return`
\n${e}
\n`}html(e,t){return e}heading(e,t,n){return`${e}\n`}hr(){return"
\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e,t,n){return`
  • ${e}
  • \n`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){const r=J(e);if(null===r)return n;let o='
    ",o}image(e,t,n){const r=J(e);if(null===r)return n;let o=`${n}0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Be(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new oe(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];Ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Fe.lex(e,t??this.defaults)}parser(e,t){return We.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+Y(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ze(e,t){return Ve.parse(e,t)}Ze.options=Ze.setOptions=function(e){return Ve.setOptions(e),Ze.defaults=Ve.defaults,F(Ze.defaults),Ze},Ze.getDefaults=M,Ze.defaults=q,Ze.use=function(...e){return Ve.use(...e),Ze.defaults=Ve.defaults,F(Ze.defaults),Ze},Ze.walkTokens=function(e,t){return Ve.walkTokens(e,t)},Ze.parseInline=Ve.parseInline,Ze.Parser=We,Ze.parser=We.parse,Ze.Renderer=Be,Ze.TextRenderer=He,Ze.Lexer=Fe,Ze.lexer=Fe.lex,Ze.Tokenizer=oe,Ze.Hooks=Ue,Ze.parse=Ze,Ze.options,Ze.setOptions,Ze.use,Ze.walkTokens,Ze.parseInline,We.parse,Fe.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge,Ke={exports:{}};Ge=Ke,function(e,t){Ge.exports=t()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var o,s,a=(o=t[1],s=arguments,o.replace(/\$(\d{1,2})/g,(function(e,t){return s[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return a(t,s)}return t}function l(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):c(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&c(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(o,r,e),d.isPlural=u(o,r,e),d.singular=l(r,o,t),d.isSingular=u(r,o,t),d.addPluralRule=function(t,n){e.push([s(t),n])},d.addSingularRule=function(e,n){t.push([s(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var Qe=Ye(Ke.exports),Xe=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){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._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r>>0;ni;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,x=w.oldi;v"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(C),n=z("div");return n.innerHTML=''+e+"",j(t,n.firstChild.childNodes),t}:A)(e)});function j(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===C?_.createDocumentFragment():_.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,q,F,B,H,W,U,V,Z,Y=(q="appendChild",F="cloneNode",B="createTextNode",W=(H="importNode")in(M=e),(U=M.createDocumentFragment())[q](M[B]("g")),U[q](M[B]("")),(W?M[H](U,!0):U[F](!0)).childNodes.length<2?function e(t,n){for(var r=t[F](),o=t.childNodes||[],s=o.length,i=0;n&&i

    ',V.content.childNodes[0].getAttribute(Z)==K)||(K="_dt: "+K.slice(1,-1)+";",Q=!0)}catch(u){}var X="\x3c!--"+K+"--\x3e",J=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,oe=" \\f\\n\\r\\t",se="[^"+oe+"\\/>\"'=]+",ie="["+oe+"]+"+se,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+K+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+">"}var me=Q?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 ge(t,n,r,o){for(var s=t.childNodes,i=s.length,a=0;a{e.remove()}))}function dt(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:o})=>"element"===n&&t?t(o,r++,e):o))}}const pt=dt("conjunction"),ft=dt("disjunction");function ht(e,t){return pt(e,t).join("")}function mt(e){return e.trim().replace(/\s+/g," ")}function gt(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function bt(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){Ot(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}function yt(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>Je`${e}, `));return Je`${r}${n[n.length-1]}`}function wt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o=`x${o}`):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function vt(e){const t=new Set,n="ltNodefault"in e.dataset?"":mt(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>mt(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(mt(e))))}return[...t]}function xt(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function kt(e,t){const n=t.closest(ct);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function $t(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Et(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function _t(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Ct extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function St(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{xt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),At(t),t}function At(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Lt(t)])e.remove()}function*Lt(e){for(;e.nextNode();)yield e.currentNode}class Tt extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class Rt extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||wt(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:o,elements:s,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:o,elements:s,title:i,details:a,stack:n}}}function Nt(e,t,n={}){const r={...n,isWarning:!1};o("error",new Rt(e,t,r))}function Ot(e,t,n={}){const r={...n,isWarning:!0};o("warn",new Rt(e,t,r))}function It(e){return{showError:(t,n)=>Nt(t,e,n),showWarning:(t,n)=>Ot(t,e,n)}}function Pt(e){return e?`\`${e}\``:""}function Dt(e,{quotes:t}={quotes:!1}){return ft(e,t?e=>{return Pt((t=e,String(t)?`"${t}"`:""));var t}:Pt).join("")}function jt(e,...t){return zt(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[o,s]=r.slice(1,-1).split("|");if(s){return`${e}[${o}](${new URL(s,"https://respec.org/docs/")})`}return`${e}[\`${o}\`](https://respec.org/docs/#${o})`})).join(""))}function zt(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const Mt=new Map([["text/html","html"],["application/xml","xml"]]);function qt(e,t=document){const n=Mt.get(e);if(!n){const t=[...Mt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Ft(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Ft(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;At(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),ut(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=Je``);s.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=Je` +window.respecVersion="35.1.2",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function o(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:s});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return x(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){b=e(b)}function w(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),x(this.request)}:function(...t){return x(e.apply(k(this),t))}}function v(e){return"function"==typeof e?w(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function x(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(x(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const $=["get","getKey","getAll","getAllKeys","count"],E=["put","add","delete","clear"],_=new Map;function C(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(_.get(t))return _.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=E.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!$.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return _.set(t,s),s}y((e=>({...e,get:(t,n,r)=>C(t,n)||e.get(t,n,r),has:(t,n)=>!!C(t,n)||e.has(t,n)})));const S=["continue","continuePrimaryKey","advance"],A={},L=new WeakMap,T=new WeakMap,R={get(e,t){if(!S.includes(t))return e[t];let n=A[t];return n||(n=A[t]=function(...e){L.set(this,T.get(this)[t](...e))}),n}};async function*N(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(T.set(n,t),g.set(n,k(t));t;)yield n,t=await(L.get(n)||t.continue()),L.delete(n)}function O(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}y((e=>({...e,get:(t,n,r)=>O(t,n)?N:e.get(t,n,r),has:(t,n)=>O(t,n)||e.has(t,n)})));var I=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),x(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=x(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(x(i.result),e.oldVersion,e.newVersion,x(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:x});const P=/^[!#$%&'*+-.^`|~\w]+$/,D=/[\u000A\u000D\u0009\u0020]/u,j=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function z(e,t,n){(t&&""!==t&&!e.has(t)&&j.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let q={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function F(e){q=e}const B=/[&<>"']/,H=new RegExp(B.source,"g"),W=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,U=new RegExp(W.source,"g"),V={"&":"&","<":"<",">":">",'"':""","'":"'"},Z=e=>V[e];function Y(e,t){if(t){if(B.test(e))return e.replace(H,Z)}else if(W.test(e))return e.replace(U,Z);return e}const G=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function K(e){return e.replace(G,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Q=/(^|[^\[])\^/g;function X(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Q,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function J(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ee={exec:()=>null};function te(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ne(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=ne(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=te(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(te(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Y(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^
    /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=ne(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),re(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return re(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Y(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Y(t[1]),n="mailto:"+e):(e=Y(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=Y(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=Y(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Y(t[0]),{type:"text",raw:t[0],text:e}}}}const se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ie=/(?:[*+-]|\d{1,9}[.)])/,ae=X(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ie).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ce=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,le=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ue=X(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",le).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),de=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ie).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe=/|$))/,he=X("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",fe).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ge={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",me).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ue,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:se,html:he,lheading:ae,list:de,newline:/^(?: *(?:\n|$))+/,paragraph:me,table:ee,text:/^[^\n]+/},be=X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ye={...ge,table:be,paragraph:X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},we={...ge,html:X("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(ce).replace("hr",se).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xe=/^( {2,}|\\)\n(?!\s*$)/,ke="\\p{P}\\p{S}",$e=X(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ke).getRegex(),Ee=X(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ke).getRegex(),_e=X("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ke).getRegex(),Ce=X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ke).getRegex(),Se=X(/\\([punct])/,"gu").replace(/punct/g,ke).getRegex(),Ae=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Le=X(fe).replace("(?:--\x3e|$)","--\x3e").getRegex(),Te=X("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Le).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Re=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne=X(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Re).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Oe=X(/^!?\[(label)\]\[(ref)\]/).replace("label",Re).replace("ref",le).getRegex(),Ie=X(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex(),Pe={_backpedal:ee,anyPunctuation:Se,autolink:Ae,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:xe,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ee,emStrongLDelim:Ee,emStrongRDelimAst:_e,emStrongRDelimUnd:Ce,escape:ve,link:Ne,nolink:Ie,punctuation:$e,reflink:Oe,reflinkSearch:X("reflink|nolink(?!\\()","g").replace("reflink",Oe).replace("nolink",Ie).getRegex(),tag:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Be{options;constructor(e){this.options=e||q}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'
    '+(n?e:Y(e,!0))+"
    \n":"
    "+(n?e:Y(e,!0))+"
    \n"}blockquote(e){return`
    \n${e}
    \n`}html(e,t){return e}heading(e,t,n){return`${e}\n`}hr(){return"
    \n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e,t,n){return`
  • ${e}
  • \n`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    \n`}table(e,t){return t&&(t=`${t}`),"\n\n"+e+"\n"+t+"
    \n"}tablerow(e){return`\n${e}\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`\n`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){const r=J(e);if(null===r)return n;let o='
    ",o}image(e,t,n){const r=J(e);if(null===r)return n;let o=`${n}0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Be(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new oe(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];Ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Fe.lex(e,t??this.defaults)}parser(e,t){return We.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+Y(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ze(e,t){return Ve.parse(e,t)}Ze.options=Ze.setOptions=function(e){return Ve.setOptions(e),Ze.defaults=Ve.defaults,F(Ze.defaults),Ze},Ze.getDefaults=M,Ze.defaults=q,Ze.use=function(...e){return Ve.use(...e),Ze.defaults=Ve.defaults,F(Ze.defaults),Ze},Ze.walkTokens=function(e,t){return Ve.walkTokens(e,t)},Ze.parseInline=Ve.parseInline,Ze.Parser=We,Ze.parser=We.parse,Ze.Renderer=Be,Ze.TextRenderer=He,Ze.Lexer=Fe,Ze.lexer=Fe.lex,Ze.Tokenizer=oe,Ze.Hooks=Ue,Ze.parse=Ze,Ze.options,Ze.setOptions,Ze.use,Ze.walkTokens,Ze.parseInline,We.parse,Fe.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge,Ke={exports:{}};Ge=Ke,function(e,t){Ge.exports=t()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var o,s,a=(o=t[1],s=arguments,o.replace(/\$(\d{1,2})/g,(function(e,t){return s[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return a(t,s)}return t}function l(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):c(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&c(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(o,r,e),d.isPlural=u(o,r,e),d.singular=l(r,o,t),d.isSingular=u(r,o,t),d.addPluralRule=function(t,n){e.push([s(t),n])},d.addSingularRule=function(e,n){t.push([s(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var Qe=Ye(Ke.exports),Xe=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){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._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r>>0;ni;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,x=w.oldi;v"+e+"",r.querySelectorAll(t)):(r.innerHTML=e,r.childNodes)),n},function(e,t){return("svg"===t?function(e){var t=z(C),n=z("div");return n.innerHTML=''+e+"",j(t,n.firstChild.childNodes),t}:A)(e)});function j(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function z(e){return e===C?_.createDocumentFragment():_.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,q,F,B,H,W,U,V,Z,Y=(q="appendChild",F="cloneNode",B="createTextNode",W=(H="importNode")in(M=e),(U=M.createDocumentFragment())[q](M[B]("g")),U[q](M[B]("")),(W?M[H](U,!0):U[F](!0)).childNodes.length<2?function e(t,n){for(var r=t[F](),o=t.childNodes||[],s=o.length,i=0;n&&i

    ',V.content.childNodes[0].getAttribute(Z)==K)||(K="_dt: "+K.slice(1,-1)+";",Q=!0)}catch(u){}var X="\x3c!--"+K+"--\x3e",J=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,oe=" \\f\\n\\r\\t",se="[^"+oe+"\\/>\"'=]+",ie="["+oe+"]+"+se,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+K+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+">"}var me=Q?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 ge(t,n,r,o){for(var s=t.childNodes,i=s.length,a=0;a{e.remove()}))}function dt(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:o})=>"element"===n&&t?t(o,r++,e):o))}}const pt=dt("conjunction"),ft=dt("disjunction");function ht(e,t){return pt(e,t).join("")}function mt(e){return e.trim().replace(/\s+/g," ")}function gt(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function bt(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){Ot(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}function yt(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>Je`${e}, `));return Je`${r}${n[n.length-1]}`}function wt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o=`x${o}`):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function vt(e){const t=new Set,n="ltNodefault"in e.dataset?"":mt(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>mt(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(mt(e))))}return[...t]}function xt(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function kt(e,t){const n=t.closest(ct);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function $t(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Et(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function _t(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Ct extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function St(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{xt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),At(t),t}function At(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Lt(t)])e.remove()}function*Lt(e){for(;e.nextNode();)yield e.currentNode}class Tt extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class Rt extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||wt(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:o,elements:s,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:o,elements:s,title:i,details:a,stack:n}}}function Nt(e,t,n={}){const r={...n,isWarning:!1};o("error",new Rt(e,t,r))}function Ot(e,t,n={}){const r={...n,isWarning:!0};o("warn",new Rt(e,t,r))}function It(e){return{showError:(t,n)=>Nt(t,e,n),showWarning:(t,n)=>Ot(t,e,n)}}function Pt(e){return e?`\`${e}\``:""}function Dt(e,{quotes:t}={quotes:!1}){return ft(e,t?e=>{return Pt((t=e,String(t)?`"${t}"`:""));var t}:Pt).join("")}function jt(e,...t){return zt(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[o,s]=r.slice(1,-1).split("|");if(s){return`${e}[${o}](${new URL(s,"https://respec.org/docs/")})`}return`${e}[\`${o}\`](https://respec.org/docs/#${o})`})).join(""))}function zt(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const Mt=new Map([["text/html","html"],["application/xml","xml"]]);function qt(e,t=document){const n=Mt.get(e);if(!n){const t=[...Mt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Ft(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Ft(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;At(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),ut(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=Je``);s.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=Je` `;s.appendChild(l),t.prepend(s),o("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}n("core/exporter",{rsDocToDataURL:qt});class Bt{constructor(){this._respecDonePromise=new Promise((e=>{s("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],s("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),s("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return Ft("html",document)}}const Ht="core/post-process";const Wt="core/pre-process";const Ut="core/base-runner";async function Vt(e){!function(){const e=new Bt;Object.defineProperty(document,"respec",{value:e})}(),o("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),s("amend-user-config",n),s("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of i)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let o;try{o=JSON.parse(r)}catch{o=r}return[n,o]})),r=Object.fromEntries(n);Object.assign(e,r),o("amend-user-config",r)}(respecConfig),performance.mark(`${Ut}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||Nt("Every item in `preProcess` must be a JS function.",Wt),t})).map((async(t,n)=>{const r=It(`${Wt}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){Nt(`Function ${t.name} threw an error during \`preProcess\`.`,Wt,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,o)=>{const s=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),o(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){o(e)}finally{clearTimeout(s),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),o("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||Nt("Every item in `postProcess` must be a JS function.",Ht),t})).map((async(t,n)=>{const r=It(`${Ht}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){Nt(`Function ${t.name} threw an error during \`postProcess\`.`,Ht,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),o("end-all"),ut(document),performance.mark(`${Ut}-end`),performance.measure(Ut,`${Ut}-start`,`${Ut}-end`)}var Zt=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0} #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000} @@ -293,7 +293,7 @@ dd{margin-left:0} data-link-for="${i}" >${a}
    `}function ho(e){const t=mt(e),n=Je`${t}`;return no[t]=!0,n}function mo(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?Je``:Je``}function go(e,t){const n=mt(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Nr(n);return!!t.parentElement.closest("dfn")?xo(`\`${r.textContent}\``):r}function bo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(mt),{type:i,illegal:a}=kt(o,t.parentElement),c=Qr(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Ot("Normative references in informative sections are not allowed. ",to,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function yo(e,t,n){return"ABBR"===t.parentElement.tagName?e:Je`${e}`}function wo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return Je`${n}`}function vo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(mt).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=ko(s),a=n?mt(n):null;return Je``}function ho(e){const t=mt(e),n=Je`${t}`;return no[t]=!0,n}function mo(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?Je``:Je``}function go(e,t){const n=mt(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Nr(n);return!!t.parentElement.closest("dfn,a")?xo(`\`${r.textContent}\``):r}function bo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(mt),{type:i,illegal:a}=kt(o,t.parentElement),c=Qr(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Ot("Normative references in informative sections are not allowed. ",to,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function yo(e,t,n){return"ABBR"===t.parentElement.tagName?e:Je`${e}`}function wo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return Je`${n}`}function vo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(mt).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=ko(s),a=n?mt(n):null;return Je` 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\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 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 '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\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 && /^/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 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(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 = /|$))/;\nconst html = edit('^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\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 + '|(?=[ \\\\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', ')|<(?: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', ')|<(?: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', ')|<(?: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]+? *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '|\\\\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: /^ *\\[([^\\]]+)\\]: *]+)>?(?: +([\"(][^\\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]*?(?:(?=[\\\\\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 + '|^' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^') // 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]*?(?:(?=[\\\\ {\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 '
    '\n                + (escaped ? code : escape$1(code, true))\n                + '
    \\n';\n }\n return '
    '\n            + (escaped ? code : escape$1(code, true))\n            + '
    \\n';\n }\n blockquote(quote) {\n return `
    \\n${quote}
    \\n`;\n }\n html(html, block) {\n return html;\n }\n heading(text, level, raw) {\n // ignore IDs\n return `${text}\\n`;\n }\n hr() {\n return '
    \\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 + '\\n';\n }\n listitem(text, task, checked) {\n return `
  • ${text}
  • \\n`;\n }\n checkbox(checked) {\n return '';\n }\n paragraph(text) {\n return `

    ${text}

    \\n`;\n }\n table(header, body) {\n if (body)\n body = `${body}`;\n return '\\n'\n + '\\n'\n + header\n + '\\n'\n + body\n + '
    \\n';\n }\n tablerow(content) {\n return `\\n${content}\\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 + `\\n`;\n }\n /**\n * span level renderer\n */\n strong(text) {\n return `${text}`;\n }\n em(text) {\n return `${text}`;\n }\n codespan(text) {\n return `${text}`;\n }\n br() {\n return '
    ';\n }\n del(text) {\n return `${text}`;\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 = '
    ';\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 = `\"${text}\"`;\n 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 = '

    An error occurred:

    '\n                    + escape$1(e.message + '', true)\n                    + '
    ';\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;ro;)--c;l=u+r-c;var m=Array(l),y=s[c];for(--n;y;){for(var b=y.newi,w=y.oldi;b>>0;n\"+e+\"\",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=''+e+\"\",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

    ',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+\">\"}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 {\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, \"&\")\n .replace(/>/g, \">\")\n .replace(/\"/g, \""\")\n .replace(/>} 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>} 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} 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 * `` 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}\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 `` 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 `` 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
    ), 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 *

    Int3.member

    \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 Foo.Bar() 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 `
    ` 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} */\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} */\nexport class InsensitiveStringSet extends Set {\n /**\n * @param {Array} [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} walker\n * @return {IterableIterator}\n */\nfunction* walkTree(walker) {\n while (walker.nextNode()) {\n yield /** @type {T} */ (walker.currentNode);\n }\n}\n\n/**\n * @template ValueType\n * @extends {Map}\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[0]} message\n * @param {Parameters[1]} plugin\n * @param {Parameters[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[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``;\n }\n insertions.appendChild(metaCharset);\n\n // Add meta generator\n const respecVersion = `ReSpec ${window.respecVersion || \"Developer Channel\"}`;\n const metaGenerator = html`\n \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} */\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 = />/gm;\nconst ampEntity = /&/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 `
    ${code}
    `;\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(\"
    \", `
    `);\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      
    \n \"${text}\"\n
    ${title}
    \n
    \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 `${textContent}`;\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
    \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} */\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} 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``;\nconst menu = html``;\nconst closeButton = html` ui.closeModal()}\n  title=\"Close\"\n>\n  ❌\n`;\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``;\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``;\n  button.addEventListener(\"click\", () => {\n    button.setAttribute(\"aria-expanded\", \"true\");\n    const ol = html`
      `;\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``;\n const menuItem = html`
    1. ${button}
    2. `;\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`
      `;\n const id = `${currentOwner.id}-modal`;\n const headingId = `${id}-heading`;\n modal = html`\n ${closeButton}\n

      ${title}

      \n
      ${content}
      \n `;\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 ? `

      (plugin: \"${err.plugin}\")

      `\n : \"\";\n\n const hint = err.hint\n ? `\\n${markdownToHtml(\n `

      How to fix: ${reindent(\n err.hint\n )}`,\n {\n inline: !err.hint.includes(\"\\n\"),\n }\n )}\\n`\n : \"\";\n const elements = Array.isArray(err.elements)\n ? `

      Occurred ${\n err.elements.length\n } times at:

      \n ${markdownToHtml(err.elements.map(generateMarkdownLink).join(\"\\n\"))}`\n : \"\";\n const details = err.details\n ? `\\n\\n
      \\n${err.details}\\n
      \\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/aom/defaults.js\"),\n import(\"../src/core/style.js\"),\n import(\"../src/aom/style.js\"),\n import(\"../src/core/data-include.js\"),\n import(\"../src/core/markdown.js\"),\n import(\"../src/core/reindent.js\"),\n import(\"../src/core/title.js\"),\n import(\"../src/aom/headers.js\"),\n import(\"../src/aom/abstract.js\"),\n import(\"../src/core/data-transform.js\"),\n import(\"../src/core/data-abbr.js\"),\n import(\"../src/core/inlines.js\"),\n import(\"../src/aom/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 import(\"../src/core/best-practices.js\"),\n import(\"../src/core/figures.js\"),\n import(\"../src/core/biblio.js\"),\n import(\"../src/core/link-to-dfn.js\"),\n import(\"../src/core/data-cite.js\"),\n import(\"../src/core/render-biblio.js\"),\n import(\"../src/core/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/ui/save-html.js\"),\n import(\"../src/ui/about-respec.js\"),\n import(\"../src/core/seo.js\"),\n import(\"../src/core/highlight.js\"),\n import(\"../src/core/list-sorter.js\"),\n import(\"../src/core/highlight-vars.js\"),\n import(\"../src/core/data-type.js\"),\n import(\"../src/core/algorithms.js\"),\n import(\"../src/core/anchor-expander.js\"),\n import(\"../src/core/dfn-panel.js\"),\n import(\"../src/core/custom-elements/index.js\"),\n import(\"../src/core/dfn-contract.js\"),\n /* Linter 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/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/no-http-props.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 AOM specs\n */\nexport const name = \"aom/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst licenses = new Map([\n [\n \"aom\",\n {\n name: \"Alliance for Open Media License\",\n short: \"AOM\",\n url: \"http://aomedia.org/license/\",\n },\n ],\n]);\n\nconst aomDefaults = {\n // treat document as \"Common Markdown\" (with a little bit of HTML).\n // choice between Markdown and HTML depends on the complexity of the spec\n // example of Markdown spec: https://github.com/WICG/netinfo/blob/gh-pages/index.html\n // Helpful guide: https://respec.org/docs/#markdown\n format: \"markdown\",\n logos: [\n {\n src: \"https://aomedia.org/assets/images/aomedia-icon-only.png\",\n alt: \"AOM\",\n id: \"AOM\",\n height: 170,\n width: 170,\n url: \"https://aomedia.org/\",\n },\n ],\n license: \"aom\",\n};\n\nfunction computeProps(conf) {\n return {\n licenseInfo: licenses.get(conf.license),\n };\n}\n\nexport function run(conf) {\n // assign the defaults\n const lint =\n conf.lint === false\n ? false\n : {\n ...coreDefaults.lint,\n ...aomDefaults.lint,\n ...conf.lint,\n };\n Object.assign(conf, {\n ...coreDefaults,\n ...aomDefaults,\n ...conf,\n lint,\n });\n\n // computed properties\n Object.assign(conf, computeProps(conf));\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","// @ts-check\n// Module aom/style\n// Inserts a link to the appropriate style for the specification's maturity level.\n// CONFIGURATION\n// - specStatus: the short code for the specification's maturity level or type (required)\n\nimport {\n createResourceHint,\n linkCSS,\n showWarning,\n toKeyValuePairs,\n} from \"../core/utils.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nexport const name = \"aom/style\";\nfunction attachFixupScript(doc, version) {\n const script = doc.createElement(\"script\");\n if (location.hash) {\n script.addEventListener(\n \"load\",\n () => {\n window.location.href = location.hash;\n },\n { once: true }\n );\n }\n script.src = `https://www.w3.org/scripts/TR/${version}/fixup.js`;\n doc.body.appendChild(script);\n}\n\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 createMetaViewport() {\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 return meta;\n}\n\nfunction createBaseStyle() {\n const link = document.createElement(\"link\");\n link.rel = \"stylesheet\";\n link.href = \"https://www.w3.org/StyleSheets/TR/2016/base.css\";\n link.classList.add(\"removeOnSave\");\n return link;\n}\n\nfunction createResourceHints() {\n /** @type ResourceHintOption[] */\n const opts = [\n {\n hint: \"preconnect\", // for W3C styles and scripts.\n href: \"https://www.w3.org\",\n },\n {\n hint: \"preload\", // all specs need it, and we attach it on end-all.\n href: \"https://www.w3.org/scripts/TR/2016/fixup.js\",\n as: \"script\",\n },\n {\n hint: \"preload\", // all specs include on base.css.\n href: \"https://www.w3.org/StyleSheets/TR/2016/base.css\",\n as: \"style\",\n },\n ];\n const resourceHints = document.createDocumentFragment();\n for (const link of opts.map(createResourceHint)) {\n resourceHints.appendChild(link);\n }\n return resourceHints;\n}\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// Opportunistically apply base style\nelements.appendChild(createBaseStyle());\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n // Make meta viewport the first element in the head.\n elements.prepend(createMetaViewport());\n}\n\ndocument.head.prepend(elements);\n\nfunction styleMover(linkURL) {\n return exportDoc => {\n const w3cStyle = exportDoc.querySelector(`head link[href=\"${linkURL}\"]`);\n exportDoc.querySelector(\"head\").append(w3cStyle);\n };\n}\n\nexport function run(conf) {\n if (!conf.specStatus) {\n const msg = \"`respecConfig.specStatus` missing. Defaulting to 'base'.\";\n conf.specStatus = \"base\";\n showWarning(msg, name);\n }\n\n let styleFile = \"\";\n\n // Figure out which style file to use.\n switch (conf.specStatus.toUpperCase()) {\n case \"PD\":\n styleFile = \"W3C-UD\";\n break;\n default:\n styleFile = \"base.css\";\n break;\n }\n\n // Attach W3C fixup script after we are done.\n if (!conf.noToc) {\n sub(\n \"end-all\",\n () => {\n attachFixupScript(document, \"2016\");\n },\n { once: true }\n );\n }\n const finalStyleURL = `https://www.w3.org/StyleSheets/TR/2016/${styleFile}`;\n linkCSS(document, finalStyleURL);\n // Make sure the W3C stylesheet is the last stylesheet, as required by W3C Pub Rules.\n const moveStyle = styleMover(finalStyleURL);\n sub(\"beforesave\", moveStyle);\n}\n","/**\n * Module core/sections\n *\n * Adds
      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} */\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","// @ts-check\n/**\n * @module core/reindent\n *\n * Normalizes indents across the pre elements in the document,\n * so that indentation inside
       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","/**\n * This module handles the creation of the h1#title of a spec and\n * makes sure the  always matches the h1.\n *\n * If no h1#title is included, then the <title> becomes the h1#title.\n *\n * When a h1#title is included, it always takes precedence over the\n * <title> of a spec. An error will be displayed in case of\n * any mismatch.\n *\n */\n\nimport { getIntlData, norm, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/title\";\n\nconst localizationStrings = {\n  en: {\n    default_title: \"No Title\",\n  },\n  de: {\n    default_title: \"Kein Titel\",\n  },\n  zh: {\n    default_title: \"无标题\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {HTMLElement} */\n  const h1Elem =\n    document.querySelector(\"h1#title\") || html`<h1 id=\"title\"></h1>`;\n\n  // check existing element is ok to use\n  if (h1Elem.isConnected && h1Elem.textContent.trim() === \"\") {\n    const msg =\n      \"The document is missing a title, so using a default title. \" +\n      \"To fix this, please give your document a `<title>`. \" +\n      \"If you need special markup in the document's title, \" +\n      'please use a `<h1 id=\"title\">`.';\n    const title = \"Document is missing a title\";\n    showError(msg, name, { title, elements: [h1Elem] });\n  }\n\n  // Decorate the spec title\n  if (!h1Elem.id) h1Elem.id = \"title\";\n  h1Elem.classList.add(\"title\");\n\n  setDocumentTitle(conf, h1Elem);\n\n  // This will get relocated by a template later.\n  document.body.prepend(h1Elem);\n}\n\nfunction setDocumentTitle(conf, h1Elem) {\n  // If the h1 is newly created, it won't be connected. In this case\n  // we use the <title> or a localized fallback.\n  if (!h1Elem.isConnected) {\n    h1Elem.textContent = document.title || `${l10n.default_title}`;\n  }\n  // We replace \":<br>\" with \":\", and \"<br>\" with \"-\", as appropriate.\n  const tempElem = document.createElement(\"h1\");\n  tempElem.innerHTML = h1Elem.innerHTML\n    .replace(/:<br>/g, \": \")\n    .replace(/<br>/g, \" - \");\n  let documentTitle = norm(tempElem.textContent);\n\n  if (conf.isPreview && conf.prNumber) {\n    const prUrl = conf.prUrl || `${conf.github.repoURL}pull/${conf.prNumber}`;\n    const { childNodes } = html`\n      Preview of PR <a href=\"${prUrl}\">#${conf.prNumber}</a>:\n    `;\n    h1Elem.prepend(...childNodes);\n    documentTitle = `Preview of PR #${conf.prNumber}: ${documentTitle}`;\n  }\n\n  document.title = documentTitle;\n\n  // conf.title is deperecated - we are keeping this here just to\n  // retain backwards compat as we think the ePub generator\n  // relies on it.\n  conf.title = documentTitle;\n}\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { showWarning } from \"../../core/utils.js\";\n\nconst name = \"core/templates/show-link\";\n\n/**\n * @param {object} link\n * @param {string} link.key\n * @param {string} [link.class]\n * @param {LinkData[]} [link.data]\n */\nexport default function 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    console.warn(msg, link);\n    return;\n  }\n  return html`\n    <dt class=\"${link.class ? link.class : null}\">${link.key}</dt>\n    ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n  `;\n}\n\n/**\n * @typedef {object} LinkData\n * @property {string} [LinkData.class]\n * @property {string} [LinkData.href]\n * @property {string} [LinkData.value]\n * @param {LinkData} data\n */\nfunction showLinkData(data) {\n  return html`<dd class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </dd>`;\n}\n","// @ts-check\nimport { docLink, showError } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst name = \"core/templates/show-logo\";\n\n/**\n * Logo mapper. Takes a logo structure and converts it to HTML.\n *\n * @param {object} logo\n * @param {string} logo.src\n * @param {string} logo.url\n * @param {string} logo.alt\n * @param {string} [logo.id]\n * @param {number} [logo.width]\n * @param {number} [logo.height]\n * @param {number} index\n */\nexport default function showLogo(logo, index) {\n  /** @type {HTMLAnchorElement} */\n  const a = html`<a href=\"${logo.url || null}\" class=\"logo\"\n    ><img\n      alt=\"${logo.alt || null}\"\n      crossorigin\n      height=\"${logo.height || null}\"\n      id=\"${logo.id || null}\"\n      src=\"${logo.src || null}\"\n      width=\"${logo.width || null}\"\n    />\n  </a>`;\n  if (!logo.alt) {\n    const src = logo.src ? `, with \\`src\\` ${logo.src}, ` : \"\";\n    const msg = `Logo at index ${index}${src} is missing required \"\\`alt\\`\" property.`;\n    const hint = docLink`Add the missing \"\\`alt\\`\" property describing the logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  if (!logo.src) {\n    const msg = `Logo at index ${index} is missing \"\\`src\\`\" property.`;\n    const hint = docLink`The \\`src\\` property is required on every logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  return a;\n}\n","// @ts-check\n\nconst name = \"core/templates/show-people\";\n\nimport {\n  W3CDate,\n  getIntlData,\n  isValidConfDate,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    until(date) {\n      return html` Until ${date} `;\n    },\n  },\n  es: {\n    until(date) {\n      return html` Hasta ${date} `;\n    },\n  },\n  ko: {\n    until(date) {\n      return html` ${date} 이전 `;\n    },\n  },\n  ja: {\n    until(date) {\n      return html` ${date} 以前 `;\n    },\n  },\n  de: {\n    until(date) {\n      return html` bis ${date} `;\n    },\n  },\n  zh: {\n    until(date) {\n      return html` 直到 ${date} `;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst orcidIcon = () =>\n  html`<svg\n    width=\"16\"\n    height=\"16\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 256 256\"\n  >\n    <style>\n      .st1 {\n        fill: #fff;\n      }\n    </style>\n    <path\n      d=\"M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z\"\n      fill=\"#a6ce39\"\n    />\n    <path\n      class=\"st1\"\n      d=\"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z\"\n    />\n  </svg>`;\n\n/**\n * @param {Conf} conf\n * @param {\"editors\" | \"authors\" | \"formerEditors\"} propName - the name of the property of the people to render.\n */\nexport default function showPeople(conf, propName) {\n  const people = conf[propName];\n  if (!Array.isArray(people) || !people.length) return; // nothing to show...\n\n  const validatePerson = personValidator(propName);\n  return people.filter(validatePerson).map(personToHTML);\n}\n\n/**\n * @param {Person} person\n */\nfunction personToHTML(person) {\n  // The following are treated as opt-in HTML by hyperHTML\n  // we need to deprecate this!\n  const personName = [person.name];\n  const company = [person.company];\n  const editorId = person.w3cid || null;\n  const contents = [];\n  if (person.mailto) {\n    person.url = `mailto:${person.mailto}`;\n  }\n  if (person.url) {\n    const url = new URL(person.url, document.location.href);\n    const classList =\n      url.protocol === \"mailto:\"\n        ? \"ed_mailto u-email email p-name\"\n        : \"u-url url p-name fn\";\n    contents.push(\n      html`<a class=\"${classList}\" href=\"${person.url}\">${personName}</a>`\n    );\n  } else {\n    contents.push(html`<span class=\"p-name fn\">${personName}</span>`);\n  }\n  if (person.orcid) {\n    contents.push(\n      html`<a class=\"p-name orcid\" href=\"${person.orcid}\">${orcidIcon()}</a>`\n    );\n  }\n  if (person.company) {\n    const hCard = \"p-org org h-org\";\n    const companyElem = person.companyURL\n      ? html`<a class=\"${hCard}\" href=\"${person.companyURL}\">${company}</a>`\n      : html`<span class=\"${hCard}\">${company}</span>`;\n    contents.push(html` (${companyElem})`);\n  }\n  if (person.note) {\n    contents.push(document.createTextNode(` (${person.note})`));\n  }\n  if (person.extras) {\n    contents.push(...person.extras.map(extra => html`, ${renderExtra(extra)}`));\n  }\n  const { retiredDate } = person;\n  if (person.retiredDate) {\n    const time = html`<time datetime=\"${retiredDate}\"\n      >${W3CDate.format(new Date(retiredDate))}</time\n    >`;\n    contents.push(html` - ${l10n.until(time)} `);\n  }\n  const dd = html`<dd\n    class=\"editor p-author h-card vcard\"\n    data-editor-id=\"${editorId}\"\n  >\n    ${contents}\n  </dd>`;\n  return dd;\n}\n\nfunction renderExtra(extra) {\n  const classVal = extra.class || null;\n  const { name, href } = extra;\n  return href\n    ? html`<a href=\"${href}\" class=\"${classVal}\">${name}</a>`\n    : html`<span class=\"${classVal}\">${name}</span>`;\n}\n\n/**\n *\n * @param {string} prop\n */\nfunction personValidator(prop) {\n  /**\n   * @param {Person} person\n   * @param {Number} index\n   */\n  return function validatePerson(person, index) {\n    const docsUrl = \"https://respec.org/docs/\";\n    const seePersonHint = `See [person](${docsUrl}#person) configuration for available options.`;\n    const preamble =\n      `Error processing the [person object](${docsUrl}#person) ` +\n      `at index ${index} of the \"[\\`${prop}\\`](${docsUrl}#${prop})\" configuration option.`;\n\n    if (!person.name) {\n      const msg = `${preamble} Missing required property \\`\"name\"\\`.`;\n      showError(msg, name, { hint: seePersonHint });\n      return false;\n    }\n\n    if (person.orcid) {\n      const { orcid } = person;\n      const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n\n      if (orcidUrl.origin !== \"https://orcid.org\") {\n        const msg = `${preamble} ORCID \"${person.orcid}\" at index ${index} is invalid.`;\n        const hint = `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // trailing slash would mess up checksum\n      const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n      if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n        const msg = `${preamble} ORCID \"${orcidId}\" has wrong format.`;\n        const hint = `ORCIDs have the format \"1234-1234-1234-1234.\"`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      if (!checkOrcidChecksum(orcid)) {\n        const msg = `${preamble} ORCID \"${orcid}\" failed checksum check.`;\n        const hint = \"Please check that the ORCID is valid.\";\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // canonical form\n      person.orcid = orcidUrl.href;\n    }\n\n    if (person.retiredDate && !isValidConfDate(person.retiredDate)) {\n      const msg = `${preamble} The property \"\\`retiredDate\\`\" is not a valid date.`;\n      showError(msg, name, {\n        hint: `The expected format is YYYY-MM-DD. ${seePersonHint}`,\n      });\n      return false;\n    }\n\n    if (\n      person.hasOwnProperty(\"extras\") &&\n      !validateExtras(person.extras, seePersonHint, preamble)\n    ) {\n      return false;\n    }\n\n    if (person.url && person.mailto) {\n      const msg = `${preamble} Has both \"url\" and \"mailto\" property.`;\n      showWarning(msg, name, {\n        hint: `Please choose either \"url\" or \"mailto\" (\"url\" is preferred). ${seePersonHint}`,\n      });\n    }\n\n    if (person.companyURL && !person.company) {\n      const msg = `${preamble} Has a \"\\`companyURL\\`\" property but no \"\\`company\\`\" property.`;\n      showWarning(msg, name, {\n        hint: `Please add a \"\\`company\\`\" property. ${seePersonHint}.`,\n      });\n    }\n    return true;\n  };\n}\n\n/**\n *\n * @param {PersonExtras[]} extras\n * @param {string} hint\n * @param {string} preamble\n */\nfunction validateExtras(extras, hint, preamble) {\n  if (!Array.isArray(extras)) {\n    showError(\n      `${preamble}. A person's \"extras\" member must be an array.`,\n      name,\n      { hint }\n    );\n    return false;\n  }\n  return extras.every((extra, index) => {\n    switch (true) {\n      case typeof extra !== \"object\":\n        showError(\n          `${preamble}. Member \"extra\" at index ${index} is not an object.`,\n          name,\n          {\n            hint,\n          }\n        );\n        return false;\n      case !extra.hasOwnProperty(\"name\"):\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} is missing required \"name\" member.`,\n          name,\n          { hint }\n        );\n        return false;\n      case typeof extra.name === \"string\" && extra.name.trim() === \"\":\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} \"name\" can't be empty.`,\n          name,\n          { hint }\n        );\n        return false;\n    }\n    return true;\n  });\n}\n\n/**\n * @param {string} orcid\n * @returns {boolean}\n */\nfunction checkOrcidChecksum(orcid) {\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcid[orcid.length - 1];\n  const remainder = orcid\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  return lastDigit === lastDigitShould;\n}\n","// @ts-check\nimport { getIntlData } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\n\nconst localizationStrings = {\n  en: {\n    author: \"Author:\",\n    authors: \"Authors:\",\n    editor: \"Editor:\",\n    editors: \"Editors:\",\n    former_editor: \"Former editor:\",\n    former_editors: \"Former editors:\",\n    latest_editors_draft: \"Latest editor's draft:\",\n    latest_published_version: \"Latest approved version:\",\n    this_version: \"This version:\",\n    issue_tracker: \"Issue Tracker:\",\n  },\n};\n\nexport const l10n = getIntlData(localizationStrings);\n\nfunction getSpecSubTitleElem(conf) {\n  let specSubTitleElem = document.querySelector(\"h2#subtitle\");\n\n  if (specSubTitleElem && specSubTitleElem.parentElement) {\n    specSubTitleElem.remove();\n    conf.subtitle = specSubTitleElem.textContent.trim();\n  } else if (conf.subtitle) {\n    specSubTitleElem = document.createElement(\"h2\");\n    specSubTitleElem.textContent = conf.subtitle;\n    specSubTitleElem.id = \"subtitle\";\n  }\n  if (specSubTitleElem) {\n    specSubTitleElem.classList.add(\"subtitle\");\n  }\n  return specSubTitleElem;\n}\n\nexport default conf => {\n  return html`<div class=\"head\">\n    ${conf.specStatus !== \"PD\" ? conf.logos.map(showLogo) : \"\"}\n    ${document.querySelector(\"h1#title\")} ${getSpecSubTitleElem(conf)}\n    <h2>\n      ${conf.textStatus} -\n      <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n        >${conf.publishHumanDate}</time\n      >\n    </h2>\n    <dl>\n      <dt>${l10n.this_version}</dt>\n      <dd>\n        <a class=\"u-url\" href=\"${conf.thisVersion}\">${conf.thisVersion}</a>\n      </dd>\n      <dt>${l10n.issue_tracker}</dt>\n      <dd>\n        <a class=\"u-url\" href=\"${conf.issueTracker}\">${conf.issueTracker}</a>\n      </dd>\n      <dt>${conf.multipleEditors ? l10n.editors : l10n.editor}</dt>\n      ${showPeople(conf, \"editors\")}\n      ${Array.isArray(conf.formerEditors) && conf.formerEditors.length > 0\n        ? html`\n            <dt>\n              ${conf.multipleFormerEditors\n                ? l10n.former_editors\n                : l10n.former_editor}\n            </dt>\n            ${showPeople(conf, \"formerEditors\")}\n          `\n        : \"\"}\n      ${conf.authors\n        ? html`\n            <dt>${conf.multipleAuthors ? l10n.authors : l10n.author}</dt>\n            ${showPeople(conf, \"authors\")}\n          `\n        : \"\"}\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </dl>\n    ${renderCopyright(conf)}\n    <hr />\n  </div>`;\n};\n\nfunction renderCopyright(conf) {\n  // If there is already a copyright, let's relocate it.\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n    return existingCopyright;\n  }\n  return html`<p class=\"copyright\">\n    Copyright ${conf.publishYear},\n    <a href=\"https://www.w3.org/\"\n      ><abbr title=\"The Alliance for Open Media\">AOM</abbr></a\n    ><br />\n    Licensing information is available at http://aomedia.org/license/<br />\n    The MATERIALS ARE PROVIDED “AS IS.” The Alliance for Open Media, its\n    members,and its contributors expressly disclaim any warranties (express,\n    implied, or otherwise), including implied warranties of merchantability,\n    non-infringement, fitness for a particular purpose, or title, related to the\n    materials. The entire risk as to implementing or otherwise using the\n    materials is assumed by the implementer and user. IN NO EVENT WILL THE\n    ALLIANCE FOR OPEN MEDIA, ITS MEMBERS, OR CONTRIBUTORS BE LIABLE TO ANY OTHER\n    PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR\n    CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND\n    WITH RESPECT TO THIS DELIVERABLE OR ITS GOVERNING AGREEMENT, WHETHER BASED\n    ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND\n    WHETHER OR NOT THE OTHER MEMBER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n    DAMAGE.\n  </p>`;\n}\n","// @ts-check\n// Module aom/headers\n// Generate the headers material based on the provided configuration.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n//  - editors: an array of people editing the document (at least one is required). People\n//      are defined using:\n//          - name: the person's name (required)\n//          - url: URI for the person's home page\n//          - company: the person's company\n//          - companyURL: the URI for the person's company\n//          - mailto: the person's email\n//          - note: a note on the person (e.g. former editor)\n//  - authors: an array of people who are contributing authors of the document.\n//  - formerEditors: an array of people that had earlier edited the document but no longer edit.\n//  - subtitle: a subtitle for the specification\n//  - publishDate: the date to use for the publication, default to document.lastModified, and\n//      failing that to now. The format is YYYY-MM-DD or a Date object.\n//  - alternateFormats: a list of alternate formats for the document, each of which being\n//      defined by:\n//          - uri: the URI to the alternate\n//          - label: a label for the alternate\n//          - lang: optional language\n//          - type: optional MIME type\n//  - logos: a list of logos to use instead of the W3C logo, each of which being defined by:\n//          - src: the URI to the logo (target of <img src=>)\n//          - alt: alternate text for the image (<img alt=>), defaults to \"Logo\" or \"Logo 1\", \"Logo 2\", ...\n//            if src is not specified, this is the text of the \"logo\"\n//          - height: optional height of the logo (<img height=>)\n//          - width: optional width of the logo (<img width=>)\n//          - url: the URI to the organization represented by the logo (target of <a href=>)\n//          - id: optional id for the logo, permits custom CSS (wraps logo in <span id=>)\n//          - each logo element must specify either src or alt\n//  - otherLinks: an array of other links that you might want in the header (e.g., link github, twitter, etc).\n//         Example of usage: [{key: \"foo\", href:\"https://b\"}, {key: \"bar\", href:\"https://\"}].\n//         Allowed values are:\n//          - key: the key for the <dt> (e.g., \"Bug Tracker\"). Required.\n//          - value: The value that will appear in the <dd> (e.g., \"GitHub\"). Optional.\n//          - href: a URL for the value (e.g., \"https://foo.com/issues\"). Optional.\n//          - class: a string representing CSS classes. Optional.\n//  - license: can be one of the following\n//      - \"aom\"\nimport { ISODate, showError } from \"../core/utils.js\";\nimport headersTmpl from \"./templates/headers.js\";\nimport { pub } from \"../core/pubsubhub.js\";\n\nexport const name = \"aom/headers\";\n\nconst status2text = {\n  PD: \"Pre-Draft\",\n  WGD: \"AOM Work Group Draft\",\n  WGA: \"AOM Working Group Approved Draft\",\n  FD: \"AOM Final Deliverable\",\n};\n\nconst AOMDate = new Intl.DateTimeFormat([\"en-US\"], {\n  timeZone: \"UTC\",\n  year: \"numeric\",\n  month: \"long\",\n  day: \"2-digit\",\n});\n\n/**\n * @param {*} conf\n * @param {string} prop\n * @param {string | number | Date} fallbackDate\n */\nfunction validateDateAndRecover(conf, prop, fallbackDate = new Date()) {\n  const date = conf[prop] ? new Date(conf[prop]) : new Date(fallbackDate);\n  // if date is valid\n  if (Number.isFinite(date.valueOf())) {\n    const formattedDate = ISODate.format(date);\n    return new Date(formattedDate);\n  }\n  const msg =\n    `[\\`${prop}\\`](https://github.com/speced/respec/wiki/${prop}) ` +\n    `is not a valid date: \"${conf[prop]}\". Expected format 'YYYY-MM-DD'.`;\n  showError(msg, name);\n  return new Date(ISODate.format(new Date()));\n}\n\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"Missing required configuration: `specStatus`\";\n    showError(msg, name);\n  }\n  conf.title = document.title || \"No title\";\n  if (!conf.subtitle) conf.subtitle = \"\";\n  conf.publishDate = validateDateAndRecover(\n    conf,\n    \"publishDate\",\n    document.lastModified\n  );\n  conf.thisVersion = `https://aomediacodec.github.io/${conf.shortName}/`;\n  conf.issueTracker = `https://github.com/AOMediaCodec/${conf.shortName}/issues/`;\n  conf.publishYear = conf.publishDate.getUTCFullYear();\n  conf.publishHumanDate = AOMDate.format(conf.publishDate);\n  const peopCheck = function (it) {\n    if (!it.name) {\n      const msg = \"All authors and editors must have a name.\";\n      showError(msg, name);\n    }\n  };\n  if (!conf.formerEditors) conf.formerEditors = [];\n  if (conf.editors) {\n    conf.editors.forEach(peopCheck);\n    // Move any editors with retiredDate to formerEditors.\n    for (let i = 0; i < conf.editors.length; i++) {\n      const editor = conf.editors[i];\n      if (\"retiredDate\" in editor) {\n        conf.formerEditors.push(editor);\n        conf.editors.splice(i--, 1);\n      }\n    }\n  }\n  if (!conf.editors || conf.editors.length === 0) {\n    const msg = \"At least one editor is required\";\n    showError(msg, name);\n  }\n  if (conf.formerEditors.length) {\n    conf.formerEditors.forEach(peopCheck);\n  }\n  if (conf.authors) {\n    conf.authors.forEach(peopCheck);\n  }\n  conf.multipleEditors = conf.editors && conf.editors.length > 1;\n  conf.multipleFormerEditors = conf.formerEditors.length > 1;\n  conf.multipleAuthors = conf.authors && conf.authors.length > 1;\n  // (conf.alternateFormats || []).forEach(it => {\n  //   if (!it.uri || !it.label) {\n  //     const msg = \"All alternate formats must have a uri and a label.\";\n  //     showError(msg, name);\n  //   }\n  // });\n  if (conf.copyrightStart && conf.copyrightStart == conf.publishYear)\n    conf.copyrightStart = \"\";\n  conf.textStatus = status2text[conf.specStatus];\n  conf.dashDate = ISODate.format(conf.publishDate);\n  conf.publishISODate = conf.publishDate.toISOString();\n  // configuration done - yay!\n\n  // insert into document\n  const header = headersTmpl(conf);\n  document.body.prepend(header);\n  document.body.classList.add(\"h-entry\");\n\n  // Requested by https://github.com/speced/respec/issues/504\n  // Makes a record of a few auto-generated things.\n  pub(\"amend-user-config\", {\n    publishISODate: conf.publishISODate,\n    generatedSubtitle: `${conf.longStatus} ${conf.publishHumanDate}`,\n  });\n}\n","// @ts-check\n// Module aom/abstract\n// Handle the abstract section properly.\nimport { getIntlData, showError } from \"../core/utils.js\";\nexport const name = \"aom/abstract\";\n\nconst localizationStrings = {\n  en: {\n    abstract: \"Abstract\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run() {\n  const abs = document.getElementById(\"abstract\");\n  if (!abs) {\n    const msg = `Document must have one element with \\`id=\"abstract\"`;\n    showError(msg, name);\n    return;\n  }\n  abs.classList.add(\"introductory\");\n  let abstractHeading = document.querySelector(\"#abstract>h2\");\n  if (abstractHeading) {\n    return;\n  }\n  abstractHeading = document.createElement(\"h2\");\n  abstractHeading.textContent = l10n.abstract;\n  abs.prepend(abstractHeading);\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// 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 aom/conformance\n// Handle the conformance section properly.\nimport { getIntlData, htmlJoinAnd, 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\";\nexport const name = \"aom/conformance\";\n\nconst localizationStrings = {\n  en: {\n    conformance: \"Conformance\",\n    normativity:\n      \"As well as sections marked as non-normative, all authoring guidelines, \" +\n      \"diagrams, examples, and notes in this specification are non-normative. \" +\n      \"Everything else in this specification is normative.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        The key word${plural ? \"s\" : \"\"} ${keywords} in this document\n        ${plural ? \"are\" : \"is\"} to be interpreted as described in\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        when, and only when, they appear in all capitals, as shown here.\n      </p>`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  const terms = [...Object.keys(rfc2119Usage)];\n  // Add RFC2119 to bibliography\n  if (terms.length) {\n    conf.normativeReferences.add(\"RFC2119\");\n    conf.normativeReferences.add(\"RFC8174\");\n  }\n  // Put in the 2119 clause and reference\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n  const content = html`\n    <h1>${l10n.conformance}</h1>\n    <p>${l10n.normativity}</p>\n    ${terms.length ? l10n.keywordInterpretation(keywords, plural) : null}\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run(conf) {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance && !conformance.classList.contains(\"override\")) {\n    processConformance(conformance, conf);\n  }\n  // Warn when there are RFC2119/RFC8174 keywords, but not conformance section\n  if (!conformance && Object.keys(rfc2119Usage).length) {\n    const msg = `Document uses RFC2119 keywords but lacks a conformance section.`;\n    const hint = 'Please add a `<section id=\"conformance\">`.';\n    showWarning(msg, name, { hint });\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\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 * 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\n// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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\">↑</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","// @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 { 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\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/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","/*\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\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","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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","// @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\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","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\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 \"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 \"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"],"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","dateLang","docLang","startsWith","W3CDate","nonNormativeSelector","createResourceHint","URL","baseURI","linkElem","rel","hint","corsMode","crossOrigin","as","dontRemove","classList","removeReSpec","doc","elem","joinFactory","formatter","ListFormat","mapper","elemCount","formatToParts","conjunction","disjunction","joinAnd","norm","getIntlData","localizationStrings","data","getIntlDataForKey","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","codedJoinOr","quotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","head","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$h","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","substituteWithTextNodes","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$p","style$1","dataInclude","abstract","dataTransform","dataAbbr","inlines","conformance","examples","issuesNotes","bestPractices","figures","biblio$1","linkToDfn","dataCite","renderBiblio","contrib","sections","fixHeaders","structure","informative","idHeaders","saveHtml","aboutRespec","seo","highlight","listSorter","highlightVars$1","dataType","algorithms","anchorExpander","dfnPanel","dfnContract","checkCharset","checkPunctuation","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","noHttpProps","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","licenses","short","aomDefaults","logos","alt","height","width","license","licenseInfo","computeProps","css$f","noReSpecCSS","resourceHints","createResourceHints","createBaseStyle","meta","delimiter","separator","toKeyValuePairs","createMetaViewport","styleFile","noToc","attachFixupScript","finalStyleURL","linkURL","urls","frag","reduce","nextLink","linkCSS","exportDoc","w3cStyle","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","default_title","zh","h1Elem","isConnected","tempElem","documentTitle","isPreview","prNumber","prUrl","github","repoURL","setDocumentTitle","showLink","class","showLinkData","showLogo","logo","until","date","es","ko","ja","orcidIcon","showPeople","propName","people","validatePerson","person","docsUrl","seePersonHint","preamble","orcid","orcidUrl","orcidId","pathname","lastDigit","remainder","Number","acc","lastDigitInt","lastDigitShould","checkOrcidChecksum","retiredDate","rawDate","Date","extras","every","extra","validateExtras","mailto","companyURL","company","personToHTML","personName","editorId","w3cid","contents","protocol","hCard","companyElem","note","classVal","renderExtra","time","author","authors","editor","editors","former_editor","former_editors","latest_editors_draft","latest_published_version","this_version","issue_tracker","headersTmpl","specSubTitleElem","subtitle","getSpecSubTitleElem","textStatus","dashDate","publishHumanDate","thisVersion","issueTracker","multipleEditors","formerEditors","multipleFormerEditors","multipleAuthors","otherLinks","existingCopyright","publishYear","renderCopyright","status2text","PD","WGD","WGA","FD","AOMDate","publishDate","fallbackDate","isFinite","formattedDate","validateDateAndRecover","lastModified","shortName","getUTCFullYear","peopCheck","copyrightStart","publishISODate","toISOString","generatedSubtitle","longStatus","abs","abstractHeading","processDfnElement","abbr","fullForm","insertAdjacentHTML","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","base","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","flatMap","isInDB","put","close","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","forceUpdate","refsToFetch","onLine","ok","status","json","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","nl","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","etAl","publisher","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","normativity","keywordInterpretation","processConformance","terms","contains","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$d","makeTitle","num","report","number","div","inAside","exampleTitle","css$b","editors_note","feature_at_risk","issue","issue_summary","no_issues_in_spec","handleIssues","ins","ghIssues","getIssueNumber","issueNumber","createIssueNumberGetter","issueList","inno","displayType","isFeatureAtRisk","isIssue","isEdNote","getIssueType","isInline","dataNum","titleParent","ghIssue","issueBase","atRiskBase","linkToIssueTracker","l10nIssue","issueNumberText","createIssueSummaryEntry","labels","labelsGroup","color","bgColor","issuesURL","searchParams","bg","textColorFromBgColor","ariaLabel","createLabel","createLabelsGroup","bodyHTML","issueSummaryElement","hasChildNodes","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","apiBase","issueNumbers","fullName","issues","fetchAndStoreGithubIssues","headElem","ednote","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","decorateTableOfFigures","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","linkTargets","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","first","isCode","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","xref","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","res","maxAge","Request","cache","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","cacheResponse","Response","blob","fetchAndCache","showContributors","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","default","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","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","outputDoc","css$5","varMap","variables","currentSection","css$3","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","file_a_bug","participate","commit_history","props","to","connectedCallback","fetchCommits","commits","commit","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","isRecTrack","saysPrivOrSec","saysConsiderations","offendingMembers","getOwnPropertyNames"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IAC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D,UAClD,CAAC,gCAAiC,SAClC,CAAC,sBAAuB,UACxB,CAAC,oBAAqB,SACtB,CAAC,SAAU,MACX,CAAC,WAAY,OACb,CAAC,OAAQ,QACTtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU0B,cAAclB,EAAK,GAAIA,EAAK,GAClD,IAKG,CACE,CAAC,MAAO,IACR,CAAC,SAAU,MACX,CAAC,gEAAiE,QAClE,CAAC,kCAAmC,OACpC,CAAC,QAAS,KACV,CAAC,uFAAwF,QACzF,CAAC,oBAAqB,QACtB,CAAC,uBAAwB,UACzB,CAAC,sBAAuB,MACxB,CAAC,2FAA4F,MAC7F,CAAC,qEAAsE,SACvE,CAAC,iCAAkC,MACnC,CAAC,oBAAqB,QACtB,CAAC,4FAA6F,QAC9F,CAAC,yGAA0G,QAC3G,CAAC,8FAA+F,QAChG,CAAC,0BAA2B,OAC5B,CAAC,+BAAgC,QACjC,CAAC,sBAAuB,QACxB,CAAC,oBAAqB,UACtB,CAAC,eAAgB,MACjB,CAAC,YAAa,MACd,CAAC,QAAS,QACVtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU4B,gBAAgBpB,EAAK,GAAIA,EAAK,GACpD,IAKG,CAEE,YACA,SACA,SACA,MACA,WACA,UACA,OACA,YACA,QACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,UACA,QACA,WACA,MACA,WACA,cACA,QACA,SACA,WACA,YACA,MACA,SACA,YACA,YACA,YACA,WACA,WACA,MACA,UACA,UACA,WACA,WACA,eACA,SACA,SACA,YACA,WACA,YACA,cACA,QACA,UACA,QACA,SACA,aACA,YACA,WACA,OACA,QACA,OACA,QACA,QACA,MACA,QACA,OACA,OACA,YACA,OACA,WACA,SACA,SACA,YACA,WACA,OACA,WACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,iBACA,QACA,OACA,SACA,UACA,UACA,aACA,WACA,MACA,eAEA,gBACA,SACA,SACA,YACA,WACA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EAAKtN,GAAMxuB,OAAOQ,SAAS0K,MAAMA,KAAKmkB,WAAW,aAG7D,GAAIglC,EAAiBnoD,OAAQ,CAC3B,MAAMmL,EAAOyZ,GAAQujC,GAAkB7lC,GAAO4H,EAAO,GAAG,IAAI5H,SAC5DiD,GAAYlwB,GAAKyb,IAAKzd,GAAM,CAAEswB,KAAMtuB,GAAKsuB,KAAOxY,GACjD,CACH","x_google_ignoreList":[4,5,6,8]}
      \ No newline at end of file
      +{"version":3,"file":"respec-aom.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/aom.js","../src/core/location-hash.js","../src/core/defaults.js","../src/aom/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/aom/style.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/title.js","../src/core/templates/show-link.js","../src/core/templates/show-logo.js","../src/core/templates/show-people.js","../src/aom/templates/headers.js","../src/aom/headers.js","../src/aom/abstract.js","../src/core/data-transform.js","../src/core/data-abbr.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/aom/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/core/best-practices.js","../src/core/figures.js","../src/core/data-cite.js","../src/core/link-to-dfn.js","../src/core/contrib.js","../src/core/fix-headers.js","../src/core/structure.js","../src/core/informative.js","../src/core/id-headers.js","../src/ui/save-html.js","../src/ui/about-respec.js","../src/core/seo.js","../src/styles/highlight.css.js","../src/core/text-loader.js","../src/core/worker.js","../src/core/highlight.js","../src/core/list-sorter.js","../src/styles/var.css.js","../src/core/highlight-vars.js","../src/styles/datatype.css.js","../src/core/data-type.js","../src/styles/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/github.js","../src/core/custom-elements/rs-changelog.js","../src/core/custom-elements/index.js","../src/core/dfn-contract.js","../src/core/linter-rules/check-charset.js","../src/core/linter-rules/check-punctuation.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/no-http-props.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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/aom/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/aom/style.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/title.js\"),\n  import(\"../src/aom/headers.js\"),\n  import(\"../src/aom/abstract.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/data-abbr.js\"),\n  import(\"../src/core/inlines.js\"),\n  import(\"../src/aom/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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/biblio.js\"),\n  import(\"../src/core/link-to-dfn.js\"),\n  import(\"../src/core/data-cite.js\"),\n  import(\"../src/core/render-biblio.js\"),\n  import(\"../src/core/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/ui/save-html.js\"),\n  import(\"../src/ui/about-respec.js\"),\n  import(\"../src/core/seo.js\"),\n  import(\"../src/core/highlight.js\"),\n  import(\"../src/core/list-sorter.js\"),\n  import(\"../src/core/highlight-vars.js\"),\n  import(\"../src/core/data-type.js\"),\n  import(\"../src/core/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/custom-elements/index.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  /* Linter 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/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/no-http-props.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 AOM specs\n */\nexport const name = \"aom/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst licenses = new Map([\n  [\n    \"aom\",\n    {\n      name: \"Alliance for Open Media License\",\n      short: \"AOM\",\n      url: \"http://aomedia.org/license/\",\n    },\n  ],\n]);\n\nconst aomDefaults = {\n  // treat document as \"Common Markdown\" (with a little bit of HTML).\n  // choice between Markdown and HTML depends on the complexity of the spec\n  // example of Markdown spec: https://github.com/WICG/netinfo/blob/gh-pages/index.html\n  // Helpful guide: https://respec.org/docs/#markdown\n  format: \"markdown\",\n  logos: [\n    {\n      src: \"https://aomedia.org/assets/images/aomedia-icon-only.png\",\n      alt: \"AOM\",\n      id: \"AOM\",\n      height: 170,\n      width: 170,\n      url: \"https://aomedia.org/\",\n    },\n  ],\n  license: \"aom\",\n};\n\nfunction computeProps(conf) {\n  return {\n    licenseInfo: licenses.get(conf.license),\n  };\n}\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...aomDefaults.lint,\n          ...conf.lint,\n        };\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...aomDefaults,\n    ...conf,\n    lint,\n  });\n\n  // computed properties\n  Object.assign(conf, computeProps(conf));\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","// @ts-check\n// Module aom/style\n// Inserts a link to the appropriate style for the specification's maturity level.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n\nimport {\n  createResourceHint,\n  linkCSS,\n  showWarning,\n  toKeyValuePairs,\n} from \"../core/utils.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nexport const name = \"aom/style\";\nfunction attachFixupScript(doc, version) {\n  const script = doc.createElement(\"script\");\n  if (location.hash) {\n    script.addEventListener(\n      \"load\",\n      () => {\n        window.location.href = location.hash;\n      },\n      { once: true }\n    );\n  }\n  script.src = `https://www.w3.org/scripts/TR/${version}/fixup.js`;\n  doc.body.appendChild(script);\n}\n\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 createMetaViewport() {\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  return meta;\n}\n\nfunction createBaseStyle() {\n  const link = document.createElement(\"link\");\n  link.rel = \"stylesheet\";\n  link.href = \"https://www.w3.org/StyleSheets/TR/2016/base.css\";\n  link.classList.add(\"removeOnSave\");\n  return link;\n}\n\nfunction createResourceHints() {\n  /** @type ResourceHintOption[]  */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C styles and scripts.\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2016/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preload\", // all specs include on base.css.\n      href: \"https://www.w3.org/StyleSheets/TR/2016/base.css\",\n      as: \"style\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// Opportunistically apply base style\nelements.appendChild(createBaseStyle());\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(createMetaViewport());\n}\n\ndocument.head.prepend(elements);\n\nfunction styleMover(linkURL) {\n  return exportDoc => {\n    const w3cStyle = exportDoc.querySelector(`head link[href=\"${linkURL}\"]`);\n    exportDoc.querySelector(\"head\").append(w3cStyle);\n  };\n}\n\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"`respecConfig.specStatus` missing. Defaulting to 'base'.\";\n    conf.specStatus = \"base\";\n    showWarning(msg, name);\n  }\n\n  let styleFile = \"\";\n\n  // Figure out which style file to use.\n  switch (conf.specStatus.toUpperCase()) {\n    case \"PD\":\n      styleFile = \"W3C-UD\";\n      break;\n    default:\n      styleFile = \"base.css\";\n      break;\n  }\n\n  // Attach W3C fixup script after we are done.\n  if (!conf.noToc) {\n    sub(\n      \"end-all\",\n      () => {\n        attachFixupScript(document, \"2016\");\n      },\n      { once: true }\n    );\n  }\n  const finalStyleURL = `https://www.w3.org/StyleSheets/TR/2016/${styleFile}`;\n  linkCSS(document, finalStyleURL);\n  // Make sure the W3C stylesheet is the last stylesheet, as required by W3C Pub Rules.\n  const moveStyle = styleMover(finalStyleURL);\n  sub(\"beforesave\", moveStyle);\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","// @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","/**\n * This module handles the creation of the h1#title of a spec and\n * makes sure the <title> always matches the h1.\n *\n * If no h1#title is included, then the <title> becomes the h1#title.\n *\n * When a h1#title is included, it always takes precedence over the\n * <title> of a spec. An error will be displayed in case of\n * any mismatch.\n *\n */\n\nimport { getIntlData, norm, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/title\";\n\nconst localizationStrings = {\n  en: {\n    default_title: \"No Title\",\n  },\n  de: {\n    default_title: \"Kein Titel\",\n  },\n  zh: {\n    default_title: \"无标题\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {HTMLElement} */\n  const h1Elem =\n    document.querySelector(\"h1#title\") || html`<h1 id=\"title\"></h1>`;\n\n  // check existing element is ok to use\n  if (h1Elem.isConnected && h1Elem.textContent.trim() === \"\") {\n    const msg =\n      \"The document is missing a title, so using a default title. \" +\n      \"To fix this, please give your document a `<title>`. \" +\n      \"If you need special markup in the document's title, \" +\n      'please use a `<h1 id=\"title\">`.';\n    const title = \"Document is missing a title\";\n    showError(msg, name, { title, elements: [h1Elem] });\n  }\n\n  // Decorate the spec title\n  if (!h1Elem.id) h1Elem.id = \"title\";\n  h1Elem.classList.add(\"title\");\n\n  setDocumentTitle(conf, h1Elem);\n\n  // This will get relocated by a template later.\n  document.body.prepend(h1Elem);\n}\n\nfunction setDocumentTitle(conf, h1Elem) {\n  // If the h1 is newly created, it won't be connected. In this case\n  // we use the <title> or a localized fallback.\n  if (!h1Elem.isConnected) {\n    h1Elem.textContent = document.title || `${l10n.default_title}`;\n  }\n  // We replace \":<br>\" with \":\", and \"<br>\" with \"-\", as appropriate.\n  const tempElem = document.createElement(\"h1\");\n  tempElem.innerHTML = h1Elem.innerHTML\n    .replace(/:<br>/g, \": \")\n    .replace(/<br>/g, \" - \");\n  let documentTitle = norm(tempElem.textContent);\n\n  if (conf.isPreview && conf.prNumber) {\n    const prUrl = conf.prUrl || `${conf.github.repoURL}pull/${conf.prNumber}`;\n    const { childNodes } = html`\n      Preview of PR <a href=\"${prUrl}\">#${conf.prNumber}</a>:\n    `;\n    h1Elem.prepend(...childNodes);\n    documentTitle = `Preview of PR #${conf.prNumber}: ${documentTitle}`;\n  }\n\n  document.title = documentTitle;\n\n  // conf.title is deperecated - we are keeping this here just to\n  // retain backwards compat as we think the ePub generator\n  // relies on it.\n  conf.title = documentTitle;\n}\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { showWarning } from \"../../core/utils.js\";\n\nconst name = \"core/templates/show-link\";\n\n/**\n * @param {object} link\n * @param {string} link.key\n * @param {string} [link.class]\n * @param {LinkData[]} [link.data]\n */\nexport default function 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    console.warn(msg, link);\n    return;\n  }\n  return html`\n    <dt class=\"${link.class ? link.class : null}\">${link.key}</dt>\n    ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n  `;\n}\n\n/**\n * @typedef {object} LinkData\n * @property {string} [LinkData.class]\n * @property {string} [LinkData.href]\n * @property {string} [LinkData.value]\n * @param {LinkData} data\n */\nfunction showLinkData(data) {\n  return html`<dd class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </dd>`;\n}\n","// @ts-check\nimport { docLink, showError } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst name = \"core/templates/show-logo\";\n\n/**\n * Logo mapper. Takes a logo structure and converts it to HTML.\n *\n * @param {object} logo\n * @param {string} logo.src\n * @param {string} logo.url\n * @param {string} logo.alt\n * @param {string} [logo.id]\n * @param {number} [logo.width]\n * @param {number} [logo.height]\n * @param {number} index\n */\nexport default function showLogo(logo, index) {\n  /** @type {HTMLAnchorElement} */\n  const a = html`<a href=\"${logo.url || null}\" class=\"logo\"\n    ><img\n      alt=\"${logo.alt || null}\"\n      crossorigin\n      height=\"${logo.height || null}\"\n      id=\"${logo.id || null}\"\n      src=\"${logo.src || null}\"\n      width=\"${logo.width || null}\"\n    />\n  </a>`;\n  if (!logo.alt) {\n    const src = logo.src ? `, with \\`src\\` ${logo.src}, ` : \"\";\n    const msg = `Logo at index ${index}${src} is missing required \"\\`alt\\`\" property.`;\n    const hint = docLink`Add the missing \"\\`alt\\`\" property describing the logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  if (!logo.src) {\n    const msg = `Logo at index ${index} is missing \"\\`src\\`\" property.`;\n    const hint = docLink`The \\`src\\` property is required on every logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  return a;\n}\n","// @ts-check\n\nconst name = \"core/templates/show-people\";\n\nimport {\n  W3CDate,\n  getIntlData,\n  isValidConfDate,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    until(date) {\n      return html` Until ${date} `;\n    },\n  },\n  es: {\n    until(date) {\n      return html` Hasta ${date} `;\n    },\n  },\n  ko: {\n    until(date) {\n      return html` ${date} 이전 `;\n    },\n  },\n  ja: {\n    until(date) {\n      return html` ${date} 以前 `;\n    },\n  },\n  de: {\n    until(date) {\n      return html` bis ${date} `;\n    },\n  },\n  zh: {\n    until(date) {\n      return html` 直到 ${date} `;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst orcidIcon = () =>\n  html`<svg\n    width=\"16\"\n    height=\"16\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 256 256\"\n  >\n    <style>\n      .st1 {\n        fill: #fff;\n      }\n    </style>\n    <path\n      d=\"M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z\"\n      fill=\"#a6ce39\"\n    />\n    <path\n      class=\"st1\"\n      d=\"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z\"\n    />\n  </svg>`;\n\n/**\n * @param {Conf} conf\n * @param {\"editors\" | \"authors\" | \"formerEditors\"} propName - the name of the property of the people to render.\n */\nexport default function showPeople(conf, propName) {\n  const people = conf[propName];\n  if (!Array.isArray(people) || !people.length) return; // nothing to show...\n\n  const validatePerson = personValidator(propName);\n  return people.filter(validatePerson).map(personToHTML);\n}\n\n/**\n * @param {Person} person\n */\nfunction personToHTML(person) {\n  // The following are treated as opt-in HTML by hyperHTML\n  // we need to deprecate this!\n  const personName = [person.name];\n  const company = [person.company];\n  const editorId = person.w3cid || null;\n  const contents = [];\n  if (person.mailto) {\n    person.url = `mailto:${person.mailto}`;\n  }\n  if (person.url) {\n    const url = new URL(person.url, document.location.href);\n    const classList =\n      url.protocol === \"mailto:\"\n        ? \"ed_mailto u-email email p-name\"\n        : \"u-url url p-name fn\";\n    contents.push(\n      html`<a class=\"${classList}\" href=\"${person.url}\">${personName}</a>`\n    );\n  } else {\n    contents.push(html`<span class=\"p-name fn\">${personName}</span>`);\n  }\n  if (person.orcid) {\n    contents.push(\n      html`<a class=\"p-name orcid\" href=\"${person.orcid}\">${orcidIcon()}</a>`\n    );\n  }\n  if (person.company) {\n    const hCard = \"p-org org h-org\";\n    const companyElem = person.companyURL\n      ? html`<a class=\"${hCard}\" href=\"${person.companyURL}\">${company}</a>`\n      : html`<span class=\"${hCard}\">${company}</span>`;\n    contents.push(html` (${companyElem})`);\n  }\n  if (person.note) {\n    contents.push(document.createTextNode(` (${person.note})`));\n  }\n  if (person.extras) {\n    contents.push(...person.extras.map(extra => html`, ${renderExtra(extra)}`));\n  }\n  const { retiredDate } = person;\n  if (person.retiredDate) {\n    const time = html`<time datetime=\"${retiredDate}\"\n      >${W3CDate.format(new Date(retiredDate))}</time\n    >`;\n    contents.push(html` - ${l10n.until(time)} `);\n  }\n  const dd = html`<dd\n    class=\"editor p-author h-card vcard\"\n    data-editor-id=\"${editorId}\"\n  >\n    ${contents}\n  </dd>`;\n  return dd;\n}\n\nfunction renderExtra(extra) {\n  const classVal = extra.class || null;\n  const { name, href } = extra;\n  return href\n    ? html`<a href=\"${href}\" class=\"${classVal}\">${name}</a>`\n    : html`<span class=\"${classVal}\">${name}</span>`;\n}\n\n/**\n *\n * @param {string} prop\n */\nfunction personValidator(prop) {\n  /**\n   * @param {Person} person\n   * @param {Number} index\n   */\n  return function validatePerson(person, index) {\n    const docsUrl = \"https://respec.org/docs/\";\n    const seePersonHint = `See [person](${docsUrl}#person) configuration for available options.`;\n    const preamble =\n      `Error processing the [person object](${docsUrl}#person) ` +\n      `at index ${index} of the \"[\\`${prop}\\`](${docsUrl}#${prop})\" configuration option.`;\n\n    if (!person.name) {\n      const msg = `${preamble} Missing required property \\`\"name\"\\`.`;\n      showError(msg, name, { hint: seePersonHint });\n      return false;\n    }\n\n    if (person.orcid) {\n      const { orcid } = person;\n      const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n\n      if (orcidUrl.origin !== \"https://orcid.org\") {\n        const msg = `${preamble} ORCID \"${person.orcid}\" at index ${index} is invalid.`;\n        const hint = `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // trailing slash would mess up checksum\n      const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n      if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n        const msg = `${preamble} ORCID \"${orcidId}\" has wrong format.`;\n        const hint = `ORCIDs have the format \"1234-1234-1234-1234.\"`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      if (!checkOrcidChecksum(orcid)) {\n        const msg = `${preamble} ORCID \"${orcid}\" failed checksum check.`;\n        const hint = \"Please check that the ORCID is valid.\";\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // canonical form\n      person.orcid = orcidUrl.href;\n    }\n\n    if (person.retiredDate && !isValidConfDate(person.retiredDate)) {\n      const msg = `${preamble} The property \"\\`retiredDate\\`\" is not a valid date.`;\n      showError(msg, name, {\n        hint: `The expected format is YYYY-MM-DD. ${seePersonHint}`,\n      });\n      return false;\n    }\n\n    if (\n      person.hasOwnProperty(\"extras\") &&\n      !validateExtras(person.extras, seePersonHint, preamble)\n    ) {\n      return false;\n    }\n\n    if (person.url && person.mailto) {\n      const msg = `${preamble} Has both \"url\" and \"mailto\" property.`;\n      showWarning(msg, name, {\n        hint: `Please choose either \"url\" or \"mailto\" (\"url\" is preferred). ${seePersonHint}`,\n      });\n    }\n\n    if (person.companyURL && !person.company) {\n      const msg = `${preamble} Has a \"\\`companyURL\\`\" property but no \"\\`company\\`\" property.`;\n      showWarning(msg, name, {\n        hint: `Please add a \"\\`company\\`\" property. ${seePersonHint}.`,\n      });\n    }\n    return true;\n  };\n}\n\n/**\n *\n * @param {PersonExtras[]} extras\n * @param {string} hint\n * @param {string} preamble\n */\nfunction validateExtras(extras, hint, preamble) {\n  if (!Array.isArray(extras)) {\n    showError(\n      `${preamble}. A person's \"extras\" member must be an array.`,\n      name,\n      { hint }\n    );\n    return false;\n  }\n  return extras.every((extra, index) => {\n    switch (true) {\n      case typeof extra !== \"object\":\n        showError(\n          `${preamble}. Member \"extra\" at index ${index} is not an object.`,\n          name,\n          {\n            hint,\n          }\n        );\n        return false;\n      case !extra.hasOwnProperty(\"name\"):\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} is missing required \"name\" member.`,\n          name,\n          { hint }\n        );\n        return false;\n      case typeof extra.name === \"string\" && extra.name.trim() === \"\":\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} \"name\" can't be empty.`,\n          name,\n          { hint }\n        );\n        return false;\n    }\n    return true;\n  });\n}\n\n/**\n * @param {string} orcid\n * @returns {boolean}\n */\nfunction checkOrcidChecksum(orcid) {\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcid[orcid.length - 1];\n  const remainder = orcid\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  return lastDigit === lastDigitShould;\n}\n","// @ts-check\nimport { getIntlData } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\n\nconst localizationStrings = {\n  en: {\n    author: \"Author:\",\n    authors: \"Authors:\",\n    editor: \"Editor:\",\n    editors: \"Editors:\",\n    former_editor: \"Former editor:\",\n    former_editors: \"Former editors:\",\n    latest_editors_draft: \"Latest editor's draft:\",\n    latest_published_version: \"Latest approved version:\",\n    this_version: \"This version:\",\n    issue_tracker: \"Issue Tracker:\",\n  },\n};\n\nexport const l10n = getIntlData(localizationStrings);\n\nfunction getSpecSubTitleElem(conf) {\n  let specSubTitleElem = document.querySelector(\"h2#subtitle\");\n\n  if (specSubTitleElem && specSubTitleElem.parentElement) {\n    specSubTitleElem.remove();\n    conf.subtitle = specSubTitleElem.textContent.trim();\n  } else if (conf.subtitle) {\n    specSubTitleElem = document.createElement(\"h2\");\n    specSubTitleElem.textContent = conf.subtitle;\n    specSubTitleElem.id = \"subtitle\";\n  }\n  if (specSubTitleElem) {\n    specSubTitleElem.classList.add(\"subtitle\");\n  }\n  return specSubTitleElem;\n}\n\nexport default conf => {\n  return html`<div class=\"head\">\n    ${conf.specStatus !== \"PD\" ? conf.logos.map(showLogo) : \"\"}\n    ${document.querySelector(\"h1#title\")} ${getSpecSubTitleElem(conf)}\n    <h2>\n      ${conf.textStatus} -\n      <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n        >${conf.publishHumanDate}</time\n      >\n    </h2>\n    <dl>\n      <dt>${l10n.this_version}</dt>\n      <dd>\n        <a class=\"u-url\" href=\"${conf.thisVersion}\">${conf.thisVersion}</a>\n      </dd>\n      <dt>${l10n.issue_tracker}</dt>\n      <dd>\n        <a class=\"u-url\" href=\"${conf.issueTracker}\">${conf.issueTracker}</a>\n      </dd>\n      <dt>${conf.multipleEditors ? l10n.editors : l10n.editor}</dt>\n      ${showPeople(conf, \"editors\")}\n      ${Array.isArray(conf.formerEditors) && conf.formerEditors.length > 0\n        ? html`\n            <dt>\n              ${conf.multipleFormerEditors\n                ? l10n.former_editors\n                : l10n.former_editor}\n            </dt>\n            ${showPeople(conf, \"formerEditors\")}\n          `\n        : \"\"}\n      ${conf.authors\n        ? html`\n            <dt>${conf.multipleAuthors ? l10n.authors : l10n.author}</dt>\n            ${showPeople(conf, \"authors\")}\n          `\n        : \"\"}\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </dl>\n    ${renderCopyright(conf)}\n    <hr />\n  </div>`;\n};\n\nfunction renderCopyright(conf) {\n  // If there is already a copyright, let's relocate it.\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n    return existingCopyright;\n  }\n  return html`<p class=\"copyright\">\n    Copyright ${conf.publishYear},\n    <a href=\"https://www.w3.org/\"\n      ><abbr title=\"The Alliance for Open Media\">AOM</abbr></a\n    ><br />\n    Licensing information is available at http://aomedia.org/license/<br />\n    The MATERIALS ARE PROVIDED “AS IS.” The Alliance for Open Media, its\n    members,and its contributors expressly disclaim any warranties (express,\n    implied, or otherwise), including implied warranties of merchantability,\n    non-infringement, fitness for a particular purpose, or title, related to the\n    materials. The entire risk as to implementing or otherwise using the\n    materials is assumed by the implementer and user. IN NO EVENT WILL THE\n    ALLIANCE FOR OPEN MEDIA, ITS MEMBERS, OR CONTRIBUTORS BE LIABLE TO ANY OTHER\n    PARTY FOR LOST PROFITS OR ANY FORM OF INDIRECT, SPECIAL, INCIDENTAL, OR\n    CONSEQUENTIAL DAMAGES OF ANY CHARACTER FROM ANY CAUSES OF ACTION OF ANY KIND\n    WITH RESPECT TO THIS DELIVERABLE OR ITS GOVERNING AGREEMENT, WHETHER BASED\n    ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, AND\n    WHETHER OR NOT THE OTHER MEMBER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n    DAMAGE.\n  </p>`;\n}\n","// @ts-check\n// Module aom/headers\n// Generate the headers material based on the provided configuration.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n//  - editors: an array of people editing the document (at least one is required). People\n//      are defined using:\n//          - name: the person's name (required)\n//          - url: URI for the person's home page\n//          - company: the person's company\n//          - companyURL: the URI for the person's company\n//          - mailto: the person's email\n//          - note: a note on the person (e.g. former editor)\n//  - authors: an array of people who are contributing authors of the document.\n//  - formerEditors: an array of people that had earlier edited the document but no longer edit.\n//  - subtitle: a subtitle for the specification\n//  - publishDate: the date to use for the publication, default to document.lastModified, and\n//      failing that to now. The format is YYYY-MM-DD or a Date object.\n//  - alternateFormats: a list of alternate formats for the document, each of which being\n//      defined by:\n//          - uri: the URI to the alternate\n//          - label: a label for the alternate\n//          - lang: optional language\n//          - type: optional MIME type\n//  - logos: a list of logos to use instead of the W3C logo, each of which being defined by:\n//          - src: the URI to the logo (target of <img src=>)\n//          - alt: alternate text for the image (<img alt=>), defaults to \"Logo\" or \"Logo 1\", \"Logo 2\", ...\n//            if src is not specified, this is the text of the \"logo\"\n//          - height: optional height of the logo (<img height=>)\n//          - width: optional width of the logo (<img width=>)\n//          - url: the URI to the organization represented by the logo (target of <a href=>)\n//          - id: optional id for the logo, permits custom CSS (wraps logo in <span id=>)\n//          - each logo element must specify either src or alt\n//  - otherLinks: an array of other links that you might want in the header (e.g., link github, twitter, etc).\n//         Example of usage: [{key: \"foo\", href:\"https://b\"}, {key: \"bar\", href:\"https://\"}].\n//         Allowed values are:\n//          - key: the key for the <dt> (e.g., \"Bug Tracker\"). Required.\n//          - value: The value that will appear in the <dd> (e.g., \"GitHub\"). Optional.\n//          - href: a URL for the value (e.g., \"https://foo.com/issues\"). Optional.\n//          - class: a string representing CSS classes. Optional.\n//  - license: can be one of the following\n//      - \"aom\"\nimport { ISODate, showError } from \"../core/utils.js\";\nimport headersTmpl from \"./templates/headers.js\";\nimport { pub } from \"../core/pubsubhub.js\";\n\nexport const name = \"aom/headers\";\n\nconst status2text = {\n  PD: \"Pre-Draft\",\n  WGD: \"AOM Work Group Draft\",\n  WGA: \"AOM Working Group Approved Draft\",\n  FD: \"AOM Final Deliverable\",\n};\n\nconst AOMDate = new Intl.DateTimeFormat([\"en-US\"], {\n  timeZone: \"UTC\",\n  year: \"numeric\",\n  month: \"long\",\n  day: \"2-digit\",\n});\n\n/**\n * @param {*} conf\n * @param {string} prop\n * @param {string | number | Date} fallbackDate\n */\nfunction validateDateAndRecover(conf, prop, fallbackDate = new Date()) {\n  const date = conf[prop] ? new Date(conf[prop]) : new Date(fallbackDate);\n  // if date is valid\n  if (Number.isFinite(date.valueOf())) {\n    const formattedDate = ISODate.format(date);\n    return new Date(formattedDate);\n  }\n  const msg =\n    `[\\`${prop}\\`](https://github.com/speced/respec/wiki/${prop}) ` +\n    `is not a valid date: \"${conf[prop]}\". Expected format 'YYYY-MM-DD'.`;\n  showError(msg, name);\n  return new Date(ISODate.format(new Date()));\n}\n\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"Missing required configuration: `specStatus`\";\n    showError(msg, name);\n  }\n  conf.title = document.title || \"No title\";\n  if (!conf.subtitle) conf.subtitle = \"\";\n  conf.publishDate = validateDateAndRecover(\n    conf,\n    \"publishDate\",\n    document.lastModified\n  );\n  conf.thisVersion = `https://aomediacodec.github.io/${conf.shortName}/`;\n  conf.issueTracker = `https://github.com/AOMediaCodec/${conf.shortName}/issues/`;\n  conf.publishYear = conf.publishDate.getUTCFullYear();\n  conf.publishHumanDate = AOMDate.format(conf.publishDate);\n  const peopCheck = function (it) {\n    if (!it.name) {\n      const msg = \"All authors and editors must have a name.\";\n      showError(msg, name);\n    }\n  };\n  if (!conf.formerEditors) conf.formerEditors = [];\n  if (conf.editors) {\n    conf.editors.forEach(peopCheck);\n    // Move any editors with retiredDate to formerEditors.\n    for (let i = 0; i < conf.editors.length; i++) {\n      const editor = conf.editors[i];\n      if (\"retiredDate\" in editor) {\n        conf.formerEditors.push(editor);\n        conf.editors.splice(i--, 1);\n      }\n    }\n  }\n  if (!conf.editors || conf.editors.length === 0) {\n    const msg = \"At least one editor is required\";\n    showError(msg, name);\n  }\n  if (conf.formerEditors.length) {\n    conf.formerEditors.forEach(peopCheck);\n  }\n  if (conf.authors) {\n    conf.authors.forEach(peopCheck);\n  }\n  conf.multipleEditors = conf.editors && conf.editors.length > 1;\n  conf.multipleFormerEditors = conf.formerEditors.length > 1;\n  conf.multipleAuthors = conf.authors && conf.authors.length > 1;\n  // (conf.alternateFormats || []).forEach(it => {\n  //   if (!it.uri || !it.label) {\n  //     const msg = \"All alternate formats must have a uri and a label.\";\n  //     showError(msg, name);\n  //   }\n  // });\n  if (conf.copyrightStart && conf.copyrightStart == conf.publishYear)\n    conf.copyrightStart = \"\";\n  conf.textStatus = status2text[conf.specStatus];\n  conf.dashDate = ISODate.format(conf.publishDate);\n  conf.publishISODate = conf.publishDate.toISOString();\n  // configuration done - yay!\n\n  // insert into document\n  const header = headersTmpl(conf);\n  document.body.prepend(header);\n  document.body.classList.add(\"h-entry\");\n\n  // Requested by https://github.com/speced/respec/issues/504\n  // Makes a record of a few auto-generated things.\n  pub(\"amend-user-config\", {\n    publishISODate: conf.publishISODate,\n    generatedSubtitle: `${conf.longStatus} ${conf.publishHumanDate}`,\n  });\n}\n","// @ts-check\n// Module aom/abstract\n// Handle the abstract section properly.\nimport { getIntlData, showError } from \"../core/utils.js\";\nexport const name = \"aom/abstract\";\n\nconst localizationStrings = {\n  en: {\n    abstract: \"Abstract\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run() {\n  const abs = document.getElementById(\"abstract\");\n  if (!abs) {\n    const msg = `Document must have one element with \\`id=\"abstract\"`;\n    showError(msg, name);\n    return;\n  }\n  abs.classList.add(\"introductory\");\n  let abstractHeading = document.querySelector(\"#abstract>h2\");\n  if (abstractHeading) {\n    return;\n  }\n  abstractHeading = document.createElement(\"h2\");\n  abstractHeading.textContent = l10n.abstract;\n  abs.prepend(abstractHeading);\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// 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 or a `a`, 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,a\");\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 aom/conformance\n// Handle the conformance section properly.\nimport { getIntlData, htmlJoinAnd, 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\";\nexport const name = \"aom/conformance\";\n\nconst localizationStrings = {\n  en: {\n    conformance: \"Conformance\",\n    normativity:\n      \"As well as sections marked as non-normative, all authoring guidelines, \" +\n      \"diagrams, examples, and notes in this specification are non-normative. \" +\n      \"Everything else in this specification is normative.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        The key word${plural ? \"s\" : \"\"} ${keywords} in this document\n        ${plural ? \"are\" : \"is\"} to be interpreted as described in\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        when, and only when, they appear in all capitals, as shown here.\n      </p>`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  const terms = [...Object.keys(rfc2119Usage)];\n  // Add RFC2119 to bibliography\n  if (terms.length) {\n    conf.normativeReferences.add(\"RFC2119\");\n    conf.normativeReferences.add(\"RFC8174\");\n  }\n  // Put in the 2119 clause and reference\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n  const content = html`\n    <h1>${l10n.conformance}</h1>\n    <p>${l10n.normativity}</p>\n    ${terms.length ? l10n.keywordInterpretation(keywords, plural) : null}\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run(conf) {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance && !conformance.classList.contains(\"override\")) {\n    processConformance(conformance, conf);\n  }\n  // Warn when there are RFC2119/RFC8174 keywords, but not conformance section\n  if (!conformance && Object.keys(rfc2119Usage).length) {\n    const msg = `Document uses RFC2119 keywords but lacks a conformance section.`;\n    const hint = 'Please add a `<section id=\"conformance\">`.';\n    showWarning(msg, name, { hint });\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\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 * 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\n// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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\">↑</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","// @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 { 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\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/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","/*\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\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","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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","// @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\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","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\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 \"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 \"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"],"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","dateLang","docLang","startsWith","W3CDate","nonNormativeSelector","createResourceHint","URL","baseURI","linkElem","rel","hint","corsMode","crossOrigin","as","dontRemove","classList","removeReSpec","doc","elem","joinFactory","formatter","ListFormat","mapper","elemCount","formatToParts","conjunction","disjunction","joinAnd","norm","getIntlData","localizationStrings","data","getIntlDataForKey","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","codedJoinOr","quotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","head","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$h","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","substituteWithTextNodes","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$p","style$1","dataInclude","abstract","dataTransform","dataAbbr","inlines","conformance","examples","issuesNotes","bestPractices","figures","biblio$1","linkToDfn","dataCite","renderBiblio","contrib","sections","fixHeaders","structure","informative","idHeaders","saveHtml","aboutRespec","seo","highlight","listSorter","highlightVars$1","dataType","algorithms","anchorExpander","dfnPanel","dfnContract","checkCharset","checkPunctuation","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","noHttpProps","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","licenses","short","aomDefaults","logos","alt","height","width","license","licenseInfo","computeProps","css$f","noReSpecCSS","resourceHints","createResourceHints","createBaseStyle","meta","delimiter","separator","toKeyValuePairs","createMetaViewport","styleFile","noToc","attachFixupScript","finalStyleURL","linkURL","urls","frag","reduce","nextLink","linkCSS","exportDoc","w3cStyle","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","default_title","zh","h1Elem","isConnected","tempElem","documentTitle","isPreview","prNumber","prUrl","github","repoURL","setDocumentTitle","showLink","class","showLinkData","showLogo","logo","until","date","es","ko","ja","orcidIcon","showPeople","propName","people","validatePerson","person","docsUrl","seePersonHint","preamble","orcid","orcidUrl","orcidId","pathname","lastDigit","remainder","Number","acc","lastDigitInt","lastDigitShould","checkOrcidChecksum","retiredDate","rawDate","Date","extras","every","extra","validateExtras","mailto","companyURL","company","personToHTML","personName","editorId","w3cid","contents","protocol","hCard","companyElem","note","classVal","renderExtra","time","author","authors","editor","editors","former_editor","former_editors","latest_editors_draft","latest_published_version","this_version","issue_tracker","headersTmpl","specSubTitleElem","subtitle","getSpecSubTitleElem","textStatus","dashDate","publishHumanDate","thisVersion","issueTracker","multipleEditors","formerEditors","multipleFormerEditors","multipleAuthors","otherLinks","existingCopyright","publishYear","renderCopyright","status2text","PD","WGD","WGA","FD","AOMDate","publishDate","fallbackDate","isFinite","formattedDate","validateDateAndRecover","lastModified","shortName","getUTCFullYear","peopCheck","copyrightStart","publishISODate","toISOString","generatedSubtitle","longStatus","abs","abstractHeading","processDfnElement","abbr","fullForm","insertAdjacentHTML","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","base","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","flatMap","isInDB","put","close","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","forceUpdate","refsToFetch","onLine","ok","status","json","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","nl","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","etAl","publisher","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","normativity","keywordInterpretation","processConformance","terms","contains","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$d","makeTitle","num","report","number","div","inAside","exampleTitle","css$b","editors_note","feature_at_risk","issue","issue_summary","no_issues_in_spec","handleIssues","ins","ghIssues","getIssueNumber","issueNumber","createIssueNumberGetter","issueList","inno","displayType","isFeatureAtRisk","isIssue","isEdNote","getIssueType","isInline","dataNum","titleParent","ghIssue","issueBase","atRiskBase","linkToIssueTracker","l10nIssue","issueNumberText","createIssueSummaryEntry","labels","labelsGroup","color","bgColor","issuesURL","searchParams","bg","textColorFromBgColor","ariaLabel","createLabel","createLabelsGroup","bodyHTML","issueSummaryElement","hasChildNodes","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","apiBase","issueNumbers","fullName","issues","fetchAndStoreGithubIssues","headElem","ednote","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","decorateTableOfFigures","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","linkTargets","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","first","isCode","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","xref","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","res","maxAge","Request","cache","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","cacheResponse","Response","blob","fetchAndCache","showContributors","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","default","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","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","outputDoc","css$5","varMap","variables","currentSection","css$3","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","file_a_bug","participate","commit_history","props","to","connectedCallback","fetchCommits","commits","commit","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","isRecTrack","saysPrivOrSec","saysConsiderations","offendingMembers","getOwnPropertyNames"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IACHC,OAAOC,QAAQG,QAAQS,GAAQC,EAEnC,CCtBO,MAIDC,EAAgB,IAAIC,YAOnB,SAASC,EAAIC,EAAOC,GAEzB,GADAJ,EAAcK,cAAc,IAAIC,YAAYH,EAAO,CAAEC,YACjDnB,OAAOsB,SAAWtB,OAAOuB,KAC3B,OAGF,MAAMC,EAAOC,OAAOC,KAAKC,UAAUR,GAAQS,OAAST,IACpDnB,OAAOsB,OAAOO,YAAY,CAAEX,QAAOM,QAAQxB,OAAOsB,OAAOQ,SAASC,OACpE,CAWO,SAASC,EAAId,EAAOe,EAAIC,EAAU,CAAEC,MAAM,IAE/CpB,EAAcqB,iBAAiBlB,GADdmB,GAAKJ,EAAGI,EAAElB,SACqBe,EAClD,CAEAtB,EAnCoB,iBAmCP,CAAEoB,QCpCf,MAAMM,EAAa,CAAC,cAAe,cCG5B,MAEDC,EAAOC,SAASC,gBAGjBF,G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C,QACjC,CAAC,sBAAuB,QACxB,CAAC,oBAAqB,UACtB,CAAC,eAAgB,MACjB,CAAC,YAAa,MACd,CAAC,QAAS,QACVtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU4B,gBAAgBpB,EAAK,GAAIA,EAAK,GACpD,IAKG,CAEE,YACA,SACA,SACA,MACA,WACA,UACA,OACA,YACA,QACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,UACA,QACA,WACA,MACA,WACA,cACA,QACA,SACA,WACA,YACA,MACA,SACA,YACA,YACA,YACA,WACA,WACA,MACA,UACA,UACA,WACA,WACA,eACA,SACA,SACA,YACA,WACA,YACA,cACA,QACA,UACA,QACA,SACA,aACA,YACA,WACA,OACA,QACA,OACA,QACA,QACA,MACA,QACA,OACA,OACA,YACA,OACA,WACA,SACA,SACA,YACA,WACA,OACA,WACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,iBACA,QACA,OACA,SACA,UACA,UACA,aACA,WACA,MACA,eAEA,gBACA,SACA,SACA,YACA,WACA,QACA,WACAtH,QAAQ8G,EAAU6B,oBAEb7B,CACV,IAGA,IACIA,GAAyBR,GADNK,GAAYC,SCjgBGkC,GAAU,SAASC,GAAgB,IAAI/P,EAAE,CAAE,EAAC,IAAIA,EAAE9N,QAAQA,OAAO,CAAC,MAAMlB,GAAGgP,EAAE9N,QAAQ,SAAS8N,EAAEhP,GAAG,IAAIqJ,EAAErJ,EAAEgf,eAAeC,EAAEjf,EAAEyc,eAAexR,EAAEiU,EAAE5c,UAAU,OAAO2I,EAAElF,OAAO,SAAS/F,GAAG,OAAO6C,KAAKZ,IAAIjC,WAAWA,EAAE6C,KAAKuG,EAAE,EAAE6B,EAAE3J,IAAI,SAAStB,GAAG,OAAO6C,KAAKZ,IAAIjC,GAAGA,EAAE6C,KAAKuG,QAAG,CAAM,EAAE6B,EAAEhJ,IAAI,SAASjC,GAAG,OAAOif,EAAEvJ,KAAK1V,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ItP,iBAAiB,uBAAuBlf,MAC5D,EAAG+kB,YAAazZ,MACd,MAAMinD,EAAgB,uBAAuB5rD,KAAK2E,GAC5CknD,EAAqB,qBAAqB7rD,KAAK2E,GACrD,OAAQinD,GAAiBC,GAAuBD,CAAa,MAW/D1iC,GAAYlwB,GAAKyb,IAAKzd,GAAM,CAAEswB,KAAMtuB,GAAKsuB,MAE7C,ICnCA,MACatwB,GAAO,kCAYdgC,GAAOyvB,GAVe,CAC1BvvB,GAAI,CACFub,IAAKoZ,EAAO,oCAAoC,oBAChDvG,KAAM,0DAERsX,GAAI,CACFnqB,IAAKoZ,EAAO,GAAG,kCACfvG,KAAM,0EAKH,SAAaiM,GAClB,IAAKA,EAAKkH,OAhBK,iBAiBb,OAKF,IAAKhjC,OAAOQ,SAAS0K,KAAKmkB,WAAW,QACnC,OAGF,MAAMglC,EAAmBv+C,OAAOw+C,oBAAoBx4B,GAEjD3qB,QAAOqd,GAAQA,EAAI+H,SAAS,QAAUuF,EAAKtN,IAAiB,WAARA,IAEpDrd,QAAOqd,GACN,IAAIiB,IAAIqM,EAAKtN,GAAMxuB,OAAOQ,SAAS0K,MAAMA,KAAKmkB,WAAW,aAG7D,GAAIglC,EAAiBnoD,OAAQ,CAC3B,MAAMmL,EAAOyZ,GAAQujC,GAAkB7lC,GAAO4H,EAAO,GAAG,IAAI5H,SAC5DiD,GAAYlwB,GAAKyb,IAAKzd,GAAM,CAAEswB,KAAMtuB,GAAKsuB,KAAOxY,GACjD,CACH","x_google_ignoreList":[4,5,6,8]}
      \ No newline at end of file
      diff --git a/builds/respec-dini.js b/builds/respec-dini.js
      index 99e3f8c509..6a02d7d6f3 100644
      --- a/builds/respec-dini.js
      +++ b/builds/respec-dini.js
      @@ -1,4 +1,4 @@
      -window.respecVersion="35.1.1",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function o(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:s});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return x(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){b=e(b)}function w(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),x(this.request)}:function(...t){return x(e.apply(k(this),t))}}function v(e){return"function"==typeof e?w(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function x(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(x(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const $=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],E=new Map;function C(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(E.get(t))return E.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!$.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return E.set(t,s),s}y((e=>({...e,get:(t,n,r)=>C(t,n)||e.get(t,n,r),has:(t,n)=>!!C(t,n)||e.has(t,n)})));const S=["continue","continuePrimaryKey","advance"],L={},A=new WeakMap,T=new WeakMap,R={get(e,t){if(!S.includes(t))return e[t];let n=L[t];return n||(n=L[t]=function(...e){A.set(this,T.get(this)[t](...e))}),n}};async function*N(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(T.set(n,t),g.set(n,k(t));t;)yield n,t=await(A.get(n)||t.continue()),A.delete(n)}function P(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}y((e=>({...e,get:(t,n,r)=>P(t,n)?N:e.get(t,n,r),has:(t,n)=>P(t,n)||e.has(t,n)})));var j=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),x(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=x(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(x(i.result),e.oldVersion,e.newVersion,x(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:x});const D=/^[!#$%&'*+-.^`|~\w]+$/,O=/[\u000A\u000D\u0009\u0020]/u,z=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function I(e,t,n){(t&&""!==t&&!e.has(t)&&z.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function q(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let M={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function F(e){M=e}const B=/[&<>"']/,H=new RegExp(B.source,"g"),W=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,U=new RegExp(W.source,"g"),Z={"&":"&","<":"<",">":">",'"':""","'":"'"},V=e=>Z[e];function K(e,t){if(t){if(B.test(e))return e.replace(H,V)}else if(W.test(e))return e.replace(U,V);return e}const Y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function X(e){return e.replace(Y,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Q=/(^|[^\[])\^/g;function G(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Q,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function J(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ee={exec:()=>null};function te(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function ne(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){const s=e.charAt(r-o-1);if(s!==t||n){if(s===t||!n)break;o++}else o++}return e.slice(0,r-o)}function re(e,t,n,r){const o=t.href,s=t.title?K(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:s,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:s,text:K(i)}}class oe{options;rules;lexer;constructor(e){this.options=e||M}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ne(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=ne(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=te(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(te(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:K(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=ne(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),re(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return re(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=K(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=K(t[1]),n="mailto:"+e):(e=K(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=K(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=K(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:K(t[0]),{type:"text",raw:t[0],text:e}}}}const se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ie=/(?:[*+-]|\d{1,9}[.)])/,ae=G(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ie).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ce=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,le=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ue=G(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",le).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),de=G(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ie).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,he=G("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",fe).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=G(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ge={blockquote:G(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",me).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ue,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:se,html:he,lheading:ae,list:de,newline:/^(?: *(?:\n|$))+/,paragraph:me,table:ee,text:/^[^\n]+/},be=G("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ye={...ge,table:be,paragraph:G(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},we={...ge,html:G("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:G(ce).replace("hr",se).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xe=/^( {2,}|\\)\n(?!\s*$)/,ke="\\p{P}\\p{S}",$e=G(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ke).getRegex(),_e=G(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ke).getRegex(),Ee=G("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ke).getRegex(),Ce=G("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ke).getRegex(),Se=G(/\\([punct])/,"gu").replace(/punct/g,ke).getRegex(),Le=G(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Ae=G(fe).replace("(?:--\x3e|$)","--\x3e").getRegex(),Te=G("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ae).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Re=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne=G(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Re).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Pe=G(/^!?\[(label)\]\[(ref)\]/).replace("label",Re).replace("ref",le).getRegex(),je=G(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex(),De={_backpedal:ee,anyPunctuation:Se,autolink:Le,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:xe,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ee,emStrongLDelim:_e,emStrongRDelimAst:Ee,emStrongRDelimUnd:Ce,escape:ve,link:Ne,nolink:je,punctuation:$e,reflink:Pe,reflinkSearch:G("reflink|nolink(?!\\()","g").replace("reflink",Pe).replace("nolink",je).getRegex(),tag:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ee},Oe={...De,link:G(/^!?\[(label)\]\((.*?)\)/).replace("label",Re).getRegex(),reflink:G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Re).getRegex()},ze={...De,escape:G(ve).replace("])","~|])").getRegex(),url:G(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ie={...ze,br:G(xe).replace("{2,}","*").getRegex(),text:G(ze.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qe={normal:ge,gfm:ye,pedantic:we},Me={normal:De,gfm:ze,breaks:Ie,pedantic:Oe};class Fe{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qe.normal,inline:Me.normal};this.options.pedantic?(t.block=qe.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=qe.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:qe,inline:Me}}static lex(e,t){return new Fe(t).lex(e)}static lexInline(e,t){return new Fe(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,o,s;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+"    ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Be{options;constructor(e){this.options=e||M}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+K(r)+'">'+(n?e:K(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:K(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=J(e);if(null===r)return n;let o='<a href="'+(e=r)+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>",o}image(e,t,n){const r=J(e);if(null===r)return n;let o=`<img src="${e=r}" alt="${n}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return e}}class He{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class We{options;renderer;textRenderer;constructor(e){this.options=e||M,this.options.renderer=this.options.renderer||new Be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He}static parse(e,t){return new We(t).parse(e)}static parseInline(e,t){return new We(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(o.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=o;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,X(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=o;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=o;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let s="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});s+=this.renderer.tablerow(r)}n+=this.renderer.table(t,s);continue}case"blockquote":{const e=o,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=o,t=e.ordered,r=e.start,s=e.loose;let i="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,o=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);s?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],i+="\n"+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(i):i;continue}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=e||"";continue}}switch(o.type){case"escape":{const e=o;n+=t.text(e.text);break}case"html":{const e=o;n+=t.html(e.text);break}case"link":{const e=o;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=o;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=o;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=o;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=o;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=o;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=o;n+=t.text(e.text);break}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class Ue{options;constructor(e){this.options=e||M}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const Ze=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Fe.lex,We.parse);parseInline=this.#e(Fe.lexInline,We.parseInline);Parser=We;Renderer=Be;TextRenderer=He;Lexer=Fe;Tokenizer=oe;Hooks=Ue;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Be(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new oe(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];Ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Fe.lex(e,t??this.defaults)}parser(e,t){return We.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+K(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ve(e,t){return Ze.parse(e,t)}Ve.options=Ve.setOptions=function(e){return Ze.setOptions(e),Ve.defaults=Ze.defaults,F(Ve.defaults),Ve},Ve.getDefaults=q,Ve.defaults=M,Ve.use=function(...e){return Ze.use(...e),Ve.defaults=Ze.defaults,F(Ve.defaults),Ve},Ve.walkTokens=function(e,t){return Ze.walkTokens(e,t)},Ve.parseInline=Ze.parseInline,Ve.Parser=We,Ve.parser=We.parse,Ve.Renderer=Be,Ve.TextRenderer=He,Ve.Lexer=Fe,Ve.lexer=Fe.lex,Ve.Tokenizer=oe,Ve.Hooks=Ue,Ve.parse=Ve,Ve.options,Ve.setOptions,Ve.use,Ve.walkTokens,Ve.parseInline,We.parse,Fe.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ye,Xe={exports:{}};Ye=Xe,function(e,t){Ye.exports=t()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var o,s,a=(o=t[1],s=arguments,o.replace(/\$(\d{1,2})/g,(function(e,t){return s[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return a(t,s)}return t}function l(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):c(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&c(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(o,r,e),d.isPlural=u(o,r,e),d.singular=l(r,o,t),d.isSingular=u(r,o,t),d.addPluralRule=function(t,n){e.push([s(t),n])},d.addSingularRule=function(e,n){t.push([s(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var Qe=Ke(Xe.exports),Ge=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){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._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r<o;){var c,l=e(n[r],1);t.insertBefore(l,s),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function s(e,t){return e==t}function i(e){return e}function a(e,t,n,r,o,s,i){var a=s-o;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=o;c<n&&l<s&&i(e[c],r[l]);)c++,l++;if(l===s)return t;t=c+1}return-1}function c(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,o=t;r<o;){var s=(r+o)/2>>>0;n<e[s]?o=s:r=1+s}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return o(d,e,n,y,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var x=m-g,k=b-y,$=-1;if(x<k){if(-1<($=a(n,y,b,t,g,m,u)))return o(d,e,n,y,$,d(t[g],0)),o(d,e,n,$+x,b,c(d,t,m,h,f)),n}else if(k<x&&-1<($=a(t,g,m,n,y,b,u)))return l(d,t,g,$),l(d,t,$+k,m),n;return x<2||k<2?(o(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):x==k&&function(e,t,n,r,o,s){for(;r<o&&s(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?o(d,e,n,y,b,c(d,t,m,h,f)):function(e,t,n,r,s,i,a,c,u,d,f,h,m){!function(e,t,n,r,s,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:s++,f++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,c,l,u,d,p,f=n+s,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<s&&c<n&&i(r[o+l],e[t+c]);)l++,c++;if(l===s&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[o+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,o,s,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=o.slice(s,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+s))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,x=w.oldi;v<n;)y[--l]=1,--n;for(;x<i;)y[--l]=-1,--i;y[--l]=0,--n,--i,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;s<=i;)y[--l]=-1,--i;return y}(n,r,s,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,y,b,k,t,g,m,x,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(o){var s=r(o);return s&&(t.splice(e,1),n.splice(e,1)),s},forEach:function(e,r){t.forEach((function(t,o){e.call(r,n[o],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(o,s){return n[r(o)?e:t.push(o)-1]=s,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function x(e,t){var n="_"+e+"$";return{get:function(){return this[n]||k(this,n,t.call(this,e))},set:function(e){k(this,n,e)}}}var k=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(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,_,E,C,S,L,A={},T={},R=[],N=T.hasOwnProperty,P=0,j={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(P=R.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<P;n++){var r=R[n];if(N.call(e,r))return T[r](e[r],t)}}},D=Array.isArray||(_=($={}.toString).call([]),function(e){return $.call(e)===_}),O=(E=e,C="fragment",L="content"in I(S="template")?function(e){var t=I(S);return t.innerHTML=e,t.content}:function(e){var t,n=I(C),r=I(S);return z(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=I(C),n=I("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",z(t,n.firstChild.childNodes),t}:L)(e)});function z(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function I(e){return e===C?E.createDocumentFragment():E.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,M,F,B,H,W,U,Z,V,K=(M="appendChild",F="cloneNode",B="createTextNode",W=(H="importNode")in(q=e),(U=q.createDocumentFragment())[M](q[B]("g")),U[M](q[B]("")),(W?q[H](U,!0):U[F](!0)).childNodes.length<2?function e(t,n){for(var r=t[F](),o=t.childNodes||[],s=o.length,i=0;n&&i<s;i++)r[M](e(o[i],n));return r}:W?q[H]:function(e,t){return e[F](!!t)}),Y="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},X="-"+Math.random().toFixed(6)+"%",Q=!1;try{Z=e.createElement("template"),V="tabindex","content"in Z&&(Z.innerHTML="<p "+V+'="'+X+'"></p>',Z.content.childNodes[0].getAttribute(V)==X)||(X="_dt: "+X.slice(1,-1)+";",Q=!0)}catch(u){}var G="\x3c!--"+X+"--\x3e",J=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,oe=" \\f\\n\\r\\t",se="[^"+oe+"\\/>\"'=]+",ie="["+oe+"]+"+se,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+G+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+X+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=Q?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 ge(t,n,r,o){for(var s=t.childNodes,i=s.length,a=0;a<i;){var c=s[a];switch(c.nodeType){case ee:var l=o.concat(a);!function(t,n,r,o){for(var s,i=t.attributes,a=[],c=[],l=me(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===X;if(f||1<(s=p.value.split(G)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(be(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(be(g,o,m,s))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&Q&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var x=e.createElement(v);for(u=i.length,d=0;d<u;)x.setAttributeNode(i[d++].cloneNode(!0));x.textContent=t.textContent,t.parentNode.replaceChild(x,t)}}(c,n,r,l),ge(c,n,r,l);break;case J:var u=c.textContent;if(u===X)r.shift(),n.push(ne.test(t.nodeName)?ye(t,o):{type:"any",node:c,path:o.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,i--}break;case te:ne.test(t.nodeName)&&Y.call(c.textContent)===G&&(r.shift(),n.push(ye(t,o)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function ye(e,t){return{type:"text",node:e,path:t}}var we,ve=(we=new n,{get:function(e){return we.get(e)},set:function(e,t){return we.set(e,t),t}});function xe(e,t){var n=(e.convert||function(e){return e.join(G).replace(ue,he).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var o=O(n,e.type);$e(o);var s=[];return ge(o,s,t.slice(0),[]),{content:o,updates:function(n){for(var r=[],o=s.length,i=0,a=0;i<o;){var c=s[i++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return o+=a,function(){var e=arguments.length;if(o!==e-1)throw new Error(e-1+" values instead of "+o+"\n"+t.join("${value}"));for(var s=1,i=1;s<e;){var a=r[s-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[s++]+c[u++];a.fn(l)}else a.fn(arguments[s++])}return n}}}}var ke=[];function $e(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===Y.call(r.textContent).length&&e.removeChild(r)}}var _e,Ee,Ce=(_e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Ee=/([^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),Le(n,!0)}(e,t):Le(e.style,!1)});function Se(e,t,n){return t+"-"+n.toLowerCase()}function Le(e,t){var n,r;return function(o){var s,i,a,c;switch(typeof o){case"object":if(o){if("object"===n){if(!t&&r!==o)for(i in r)i in o||(e[i]="")}else t?e.value="":e.cssText="";for(i in s=t?{}:e,o)a="number"!=typeof(c=o[i])||_e.test(i)?c:c+"px",!t&&/^--/.test(i)?s.setProperty(i,a):s[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Ee,Se),":",e[t],";");return n.join("")}(r=s):r=o;break}default:r!=o&&(n="string",r=o,t?e.value=o||"":e.cssText=o||"")}}}var Ae,Te,Re=(Ae=[].slice,(Te=Ne.prototype).ELEMENT_NODE=1,Te.nodeType=111,Te.remove=function(e){var t,n=this.childNodes,r=this.firstChild,o=this.lastChild;return this._=null,e&&2===n.length?o.parentNode.removeChild(o):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(o),t.deleteContents()),r},Te.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,o=0,s=r.length;o<s;o++)t.appendChild(r[o]);return t},Ne);function Ne(e){var t=this.childNodes=Ae.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Pe(e){return{html:e}}function je(e,t){switch(e.nodeType){case We:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case He:return je(e.render(),t);default:return e}}function De(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(Pe).then(t):Promise.resolve(j.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var ze,Ie,qe,Me,Fe,Be="ownerSVGElement",He=v.prototype.nodeType,We=Re.prototype.nodeType,Ue=(Ie=(ze={Event:b,WeakSet:u}).Event,qe=ze.WeakSet,Me=!0,Fe=null,function(e){return Me&&(Me=!Me,Fe=new qe,function(e){var t=new qe,n=new qe;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,o=[],s=function(e){o.push(e),clearTimeout(r),r=setTimeout((function(){i(o.splice(r=0,o.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){s({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){s({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,o=e.length,s=0;s<o;s++)a((r=e[s]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var o,s=new Ie(t),i=e.length,a=0;a<i;1===(o=e[a++]).nodeType&&function e(t,n,r,o,s){Fe.has(t)&&!o.has(t)&&(s.delete(t),o.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,o,s));}(o,s,t,n,r));}}(e.ownerDocument)),Fe.add(e),e}),Ze=/^(?:form|list)$/i,Ve=[].slice;function Ke(t){return this.type=t,function(t){var n=ke,r=$e;return function(o){var s,i,a;return n!==o&&(s=t,i=n=o,a=ve.get(i)||ve.set(i,xe(s,i)),r=a.updates(K.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ye=!(Ke.prototype={attribute:function(e,t,n){var r,o=Be in e;if("style"===t)return Ce(e,n,o);if("."===t.slice(0,1))return l=e,u=t.slice(1),o?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?Ue(e):t.toLowerCase()in e&&(s=s.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(s,r,!1),(r=t)&&e.addEventListener(s,t,!1))}}if("data"===t||!o&&t in e&&!Ze.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in j.attributes)return function(n){var o=j.attributes[t](e,n);r!==o&&(null==(r=o)?e.removeAttribute(t):e.setAttribute(t,o))};var i,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:je,before:e},o=Be in e?"svg":"html",s=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":s?n!==a&&(n=a,t[0].textContent=a):(s=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=h(e.parentNode,t,[],r);break}default:if(s=!1,D(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(D(a[0])&&(a=a.concat.apply([],a)),Oe(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Oe(a)?a.then(i):"placeholder"in a?De(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,Ve.call(O([].concat(a.html).join(""),o).childNodes),r):i("length"in a?Ve.call(a):j.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var o;t!==r&&("object"==(o=typeof(t=r))&&r?Oe(r)?r.then(n):"placeholder"in r?De(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):j.invoke(r,n)):"function"==o?n(r(e)):e.textContent=null==r?"":r)}}}),Xe=function(t){var r,o,s,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(o={},s=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return o[t]||(o[t]=e)},Xe=c?s:(i=new n,function(e){return i.get(e)||(n=s(t=e),i.set(t,n),n);var t,n})):Ye=!0,Qe(t)};function Qe(e){return Ye?e:Xe(e)}function Ge(e){for(var t=arguments.length,n=[Qe(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Je=new n,et=function(e){var t,n,r;return function(){var o=Ge.apply(null,arguments);return r!==o[0]?(r=o[0],n=new Ke(e),t=nt(n.apply(n,o))):n.apply(n,o),t}},tt=function(e,t){var n=t.indexOf(":"),r=Je.get(e),o=t;return-1<n&&(o=t.slice(n+1),t=t.slice(0,n)||"html"),r||Je.set(e,r={}),r[o]||(r[o]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Re(t):e},rt=new n;function ot(){var e=rt.get(this),t=Ge.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ke(Be in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var st,it,at,ct,lt=j.define,ut=Ke.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return ot.bind(e)},dt.define=lt,dt.diff=h,(dt.hyper=dt).observe=Ue,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},st=et,it=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,c=t.get(e)||ct(e,t);switch(typeof o){case"object":case"function":var l=c.w||(c.w=new n);return l.get(o)||(s=l,i=o,a=new e(r),s.set(i,a),a);default:var u=c.p||(c.p=at(null));return u[o]||(u[o]=new e(r))}}(this,it.get(e)||(r=e,o=new w,it.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:x("html",st),svg:x("svg",st),state:x("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(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 o in r)n[o]=r[o];return!1!==t&&this.render(),this}}}),dt}(document);const Je=Ge,et=j,tt=Ve,nt=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",o=null,s=new Map,i="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(i){case"type":if("/"===c){i="subtype";continue}t+=c;break;case"subtype":if(";"===c){i="param-start";continue}n+=c;break;case"param-start":if(O.test(c)||";"===c)continue;r+=c,i="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){i="param-value",o=null;continue}s.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){i="collect-quoted-string";continue}if(";"===c){o=o.trimEnd(),i="param-start",I(s,r,o),r="";continue}o="string"==typeof o?o+c:c;break;case"collect-quoted-string":if('"'===c){I(s,r,o),i="ignore-input-until-next-param",r="",o=null;continue}if("\\"===c)continue;o="string"==typeof o?o+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&I(s,r,o);if(""===t.trim()||!D.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!D.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(s.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?D.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},rt=Qe,ot=/-/g,st=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),it="en"===l||l.startsWith("en-")?"en-AU":l,at=new Intl.DateTimeFormat(it,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===it?"2-digit":"numeric"}),ct=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function lt(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function ut(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function dt(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:o})=>"element"===n&&t?t(o,r++,e):o))}}const pt=dt("conjunction"),ft=dt("disjunction");function ht(e,t){return pt(e,t).join("")}function mt(e){return e.trim().replace(/\s+/g," ")}function gt(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function bt(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){Pt(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}function yt(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>Je`${e}, `));return Je`${r}${n[n.length-1]}`}function wt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o=`x${o}`):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function vt(e){const t=new Set,n="ltNodefault"in e.dataset?"":mt(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>mt(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(mt(e))))}return[...t]}function xt(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function kt(e,t){const n=t.closest(ct);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function $t(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function _t(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function Et(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Ct extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function St(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{xt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),Lt(t),t}function Lt(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...At(t)])e.remove()}function*At(e){for(;e.nextNode();)yield e.currentNode}class Tt extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class Rt extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||wt(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:o,elements:s,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:o,elements:s,title:i,details:a,stack:n}}}function Nt(e,t,n={}){const r={...n,isWarning:!1};o("error",new Rt(e,t,r))}function Pt(e,t,n={}){const r={...n,isWarning:!0};o("warn",new Rt(e,t,r))}function jt(e){return{showError:(t,n)=>Nt(t,e,n),showWarning:(t,n)=>Pt(t,e,n)}}function Dt(e){return e?`\`${e}\``:""}function Ot(e,{quotes:t}={quotes:!1}){return ft(e,t?e=>{return Dt((t=e,String(t)?`"${t}"`:""));var t}:Dt).join("")}function zt(e,...t){return It(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[o,s]=r.slice(1,-1).split("|");if(s){return`${e}[${o}](${new URL(s,"https://respec.org/docs/")})`}return`${e}[\`${o}\`](https://respec.org/docs/#${o})`})).join(""))}function It(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const qt=new Map([["text/html","html"],["application/xml","xml"]]);function Mt(e,t=document){const n=qt.get(e);if(!n){const t=[...qt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Ft(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Ft(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;Lt(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),ut(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=Je`<meta charset="utf-8" />`);s.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=Je`
      +window.respecVersion="35.1.2",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function o(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:s});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return x(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){b=e(b)}function w(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),x(this.request)}:function(...t){return x(e.apply(k(this),t))}}function v(e){return"function"==typeof e?w(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function x(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(x(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const $=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],E=new Map;function C(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(E.get(t))return E.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!$.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return E.set(t,s),s}y((e=>({...e,get:(t,n,r)=>C(t,n)||e.get(t,n,r),has:(t,n)=>!!C(t,n)||e.has(t,n)})));const S=["continue","continuePrimaryKey","advance"],L={},A=new WeakMap,T=new WeakMap,R={get(e,t){if(!S.includes(t))return e[t];let n=L[t];return n||(n=L[t]=function(...e){A.set(this,T.get(this)[t](...e))}),n}};async function*N(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(T.set(n,t),g.set(n,k(t));t;)yield n,t=await(A.get(n)||t.continue()),A.delete(n)}function P(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}y((e=>({...e,get:(t,n,r)=>P(t,n)?N:e.get(t,n,r),has:(t,n)=>P(t,n)||e.has(t,n)})));var j=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),x(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=x(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(x(i.result),e.oldVersion,e.newVersion,x(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:x});const D=/^[!#$%&'*+-.^`|~\w]+$/,O=/[\u000A\u000D\u0009\u0020]/u,z=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function I(e,t,n){(t&&""!==t&&!e.has(t)&&z.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function q(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let M={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function F(e){M=e}const B=/[&<>"']/,H=new RegExp(B.source,"g"),W=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,U=new RegExp(W.source,"g"),Z={"&":"&","<":"<",">":">",'"':""","'":"'"},V=e=>Z[e];function K(e,t){if(t){if(B.test(e))return e.replace(H,V)}else if(W.test(e))return e.replace(U,V);return e}const Y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function X(e){return e.replace(Y,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const Q=/(^|[^\[])\^/g;function G(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(Q,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function J(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ee={exec:()=>null};function te(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function ne(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){const s=e.charAt(r-o-1);if(s!==t||n){if(s===t||!n)break;o++}else o++}return e.slice(0,r-o)}function re(e,t,n,r){const o=t.href,s=t.title?K(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:s,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:s,text:K(i)}}class oe{options;rules;lexer;constructor(e){this.options=e||M}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ne(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=ne(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=te(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(te(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:K(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=ne(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),re(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return re(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=K(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=K(t[1]),n="mailto:"+e):(e=K(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=K(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=K(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:K(t[0]),{type:"text",raw:t[0],text:e}}}}const se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ie=/(?:[*+-]|\d{1,9}[.)])/,ae=G(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ie).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ce=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,le=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ue=G(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",le).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),de=G(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ie).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,he=G("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",fe).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=G(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ge={blockquote:G(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",me).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ue,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:se,html:he,lheading:ae,list:de,newline:/^(?: *(?:\n|$))+/,paragraph:me,table:ee,text:/^[^\n]+/},be=G("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ye={...ge,table:be,paragraph:G(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},we={...ge,html:G("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:G(ce).replace("hr",se).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xe=/^( {2,}|\\)\n(?!\s*$)/,ke="\\p{P}\\p{S}",$e=G(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,ke).getRegex(),_e=G(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,ke).getRegex(),Ee=G("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,ke).getRegex(),Ce=G("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,ke).getRegex(),Se=G(/\\([punct])/,"gu").replace(/punct/g,ke).getRegex(),Le=G(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Ae=G(fe).replace("(?:--\x3e|$)","--\x3e").getRegex(),Te=G("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ae).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Re=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne=G(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Re).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Pe=G(/^!?\[(label)\]\[(ref)\]/).replace("label",Re).replace("ref",le).getRegex(),je=G(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex(),De={_backpedal:ee,anyPunctuation:Se,autolink:Le,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:xe,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ee,emStrongLDelim:_e,emStrongRDelimAst:Ee,emStrongRDelimUnd:Ce,escape:ve,link:Ne,nolink:je,punctuation:$e,reflink:Pe,reflinkSearch:G("reflink|nolink(?!\\()","g").replace("reflink",Pe).replace("nolink",je).getRegex(),tag:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ee},Oe={...De,link:G(/^!?\[(label)\]\((.*?)\)/).replace("label",Re).getRegex(),reflink:G(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Re).getRegex()},ze={...De,escape:G(ve).replace("])","~|])").getRegex(),url:G(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ie={...ze,br:G(xe).replace("{2,}","*").getRegex(),text:G(ze.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qe={normal:ge,gfm:ye,pedantic:we},Me={normal:De,gfm:ze,breaks:Ie,pedantic:Oe};class Fe{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qe.normal,inline:Me.normal};this.options.pedantic?(t.block=qe.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=qe.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:qe,inline:Me}}static lex(e,t){return new Fe(t).lex(e)}static lexInline(e,t){return new Fe(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,o,s;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+"    ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Be{options;constructor(e){this.options=e||M}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+K(r)+'">'+(n?e:K(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:K(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=J(e);if(null===r)return n;let o='<a href="'+(e=r)+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>",o}image(e,t,n){const r=J(e);if(null===r)return n;let o=`<img src="${e=r}" alt="${n}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return e}}class He{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class We{options;renderer;textRenderer;constructor(e){this.options=e||M,this.options.renderer=this.options.renderer||new Be,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new He}static parse(e,t){return new We(t).parse(e)}static parseInline(e,t){return new We(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(o.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=o;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,X(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=o;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=o;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let s="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});s+=this.renderer.tablerow(r)}n+=this.renderer.table(t,s);continue}case"blockquote":{const e=o,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=o,t=e.ordered,r=e.start,s=e.loose;let i="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,o=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);s?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],i+="\n"+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(i):i;continue}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=e||"";continue}}switch(o.type){case"escape":{const e=o;n+=t.text(e.text);break}case"html":{const e=o;n+=t.html(e.text);break}case"link":{const e=o;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=o;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=o;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=o;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=o;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=o;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=o;n+=t.text(e.text);break}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class Ue{options;constructor(e){this.options=e||M}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const Ze=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Fe.lex,We.parse);parseInline=this.#e(Fe.lexInline,We.parseInline);Parser=We;Renderer=Be;TextRenderer=He;Lexer=Fe;Tokenizer=oe;Hooks=Ue;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Be(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new oe(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];Ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Fe.lex(e,t??this.defaults)}parser(e,t){return We.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+K(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ve(e,t){return Ze.parse(e,t)}Ve.options=Ve.setOptions=function(e){return Ze.setOptions(e),Ve.defaults=Ze.defaults,F(Ve.defaults),Ve},Ve.getDefaults=q,Ve.defaults=M,Ve.use=function(...e){return Ze.use(...e),Ve.defaults=Ze.defaults,F(Ve.defaults),Ve},Ve.walkTokens=function(e,t){return Ze.walkTokens(e,t)},Ve.parseInline=Ze.parseInline,Ve.Parser=We,Ve.parser=We.parse,Ve.Renderer=Be,Ve.TextRenderer=He,Ve.Lexer=Fe,Ve.lexer=Fe.lex,Ve.Tokenizer=oe,Ve.Hooks=Ue,Ve.parse=Ve,Ve.options,Ve.setOptions,Ve.use,Ve.walkTokens,Ve.parseInline,We.parse,Fe.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ye,Xe={exports:{}};Ye=Xe,function(e,t){Ye.exports=t()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var o,s,a=(o=t[1],s=arguments,o.replace(/\$(\d{1,2})/g,(function(e,t){return s[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return a(t,s)}return t}function l(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):c(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&c(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(o,r,e),d.isPlural=u(o,r,e),d.singular=l(r,o,t),d.isSingular=u(r,o,t),d.addPluralRule=function(t,n){e.push([s(t),n])},d.addSingularRule=function(e,n){t.push([s(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var Qe=Ke(Xe.exports),Ge=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){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._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r<o;){var c,l=e(n[r],1);t.insertBefore(l,s),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function s(e,t){return e==t}function i(e){return e}function a(e,t,n,r,o,s,i){var a=s-o;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=o;c<n&&l<s&&i(e[c],r[l]);)c++,l++;if(l===s)return t;t=c+1}return-1}function c(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,o=t;r<o;){var s=(r+o)/2>>>0;n<e[s]?o=s:r=1+s}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return o(d,e,n,y,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var x=m-g,k=b-y,$=-1;if(x<k){if(-1<($=a(n,y,b,t,g,m,u)))return o(d,e,n,y,$,d(t[g],0)),o(d,e,n,$+x,b,c(d,t,m,h,f)),n}else if(k<x&&-1<($=a(t,g,m,n,y,b,u)))return l(d,t,g,$),l(d,t,$+k,m),n;return x<2||k<2?(o(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):x==k&&function(e,t,n,r,o,s){for(;r<o&&s(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?o(d,e,n,y,b,c(d,t,m,h,f)):function(e,t,n,r,s,i,a,c,u,d,f,h,m){!function(e,t,n,r,s,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:s++,f++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,c,l,u,d,p,f=n+s,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<s&&c<n&&i(r[o+l],e[t+c]);)l++,c++;if(l===s&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[o+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,o,s,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=o.slice(s,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+s))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,x=w.oldi;v<n;)y[--l]=1,--n;for(;x<i;)y[--l]=-1,--i;y[--l]=0,--n,--i,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;s<=i;)y[--l]=-1,--i;return y}(n,r,s,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,y,b,k,t,g,m,x,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(o){var s=r(o);return s&&(t.splice(e,1),n.splice(e,1)),s},forEach:function(e,r){t.forEach((function(t,o){e.call(r,n[o],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(o,s){return n[r(o)?e:t.push(o)-1]=s,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function x(e,t){var n="_"+e+"$";return{get:function(){return this[n]||k(this,n,t.call(this,e))},set:function(e){k(this,n,e)}}}var k=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(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,_,E,C,S,L,A={},T={},R=[],N=T.hasOwnProperty,P=0,j={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(P=R.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<P;n++){var r=R[n];if(N.call(e,r))return T[r](e[r],t)}}},D=Array.isArray||(_=($={}.toString).call([]),function(e){return $.call(e)===_}),O=(E=e,C="fragment",L="content"in I(S="template")?function(e){var t=I(S);return t.innerHTML=e,t.content}:function(e){var t,n=I(C),r=I(S);return z(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=I(C),n=I("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",z(t,n.firstChild.childNodes),t}:L)(e)});function z(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function I(e){return e===C?E.createDocumentFragment():E.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,M,F,B,H,W,U,Z,V,K=(M="appendChild",F="cloneNode",B="createTextNode",W=(H="importNode")in(q=e),(U=q.createDocumentFragment())[M](q[B]("g")),U[M](q[B]("")),(W?q[H](U,!0):U[F](!0)).childNodes.length<2?function e(t,n){for(var r=t[F](),o=t.childNodes||[],s=o.length,i=0;n&&i<s;i++)r[M](e(o[i],n));return r}:W?q[H]:function(e,t){return e[F](!!t)}),Y="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},X="-"+Math.random().toFixed(6)+"%",Q=!1;try{Z=e.createElement("template"),V="tabindex","content"in Z&&(Z.innerHTML="<p "+V+'="'+X+'"></p>',Z.content.childNodes[0].getAttribute(V)==X)||(X="_dt: "+X.slice(1,-1)+";",Q=!0)}catch(u){}var G="\x3c!--"+X+"--\x3e",J=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,oe=" \\f\\n\\r\\t",se="[^"+oe+"\\/>\"'=]+",ie="["+oe+"]+"+se,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+G+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+X+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=Q?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 ge(t,n,r,o){for(var s=t.childNodes,i=s.length,a=0;a<i;){var c=s[a];switch(c.nodeType){case ee:var l=o.concat(a);!function(t,n,r,o){for(var s,i=t.attributes,a=[],c=[],l=me(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===X;if(f||1<(s=p.value.split(G)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(be(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(be(g,o,m,s))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&Q&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var x=e.createElement(v);for(u=i.length,d=0;d<u;)x.setAttributeNode(i[d++].cloneNode(!0));x.textContent=t.textContent,t.parentNode.replaceChild(x,t)}}(c,n,r,l),ge(c,n,r,l);break;case J:var u=c.textContent;if(u===X)r.shift(),n.push(ne.test(t.nodeName)?ye(t,o):{type:"any",node:c,path:o.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,i--}break;case te:ne.test(t.nodeName)&&Y.call(c.textContent)===G&&(r.shift(),n.push(ye(t,o)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function ye(e,t){return{type:"text",node:e,path:t}}var we,ve=(we=new n,{get:function(e){return we.get(e)},set:function(e,t){return we.set(e,t),t}});function xe(e,t){var n=(e.convert||function(e){return e.join(G).replace(ue,he).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var o=O(n,e.type);$e(o);var s=[];return ge(o,s,t.slice(0),[]),{content:o,updates:function(n){for(var r=[],o=s.length,i=0,a=0;i<o;){var c=s[i++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return o+=a,function(){var e=arguments.length;if(o!==e-1)throw new Error(e-1+" values instead of "+o+"\n"+t.join("${value}"));for(var s=1,i=1;s<e;){var a=r[s-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[s++]+c[u++];a.fn(l)}else a.fn(arguments[s++])}return n}}}}var ke=[];function $e(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===Y.call(r.textContent).length&&e.removeChild(r)}}var _e,Ee,Ce=(_e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Ee=/([^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),Le(n,!0)}(e,t):Le(e.style,!1)});function Se(e,t,n){return t+"-"+n.toLowerCase()}function Le(e,t){var n,r;return function(o){var s,i,a,c;switch(typeof o){case"object":if(o){if("object"===n){if(!t&&r!==o)for(i in r)i in o||(e[i]="")}else t?e.value="":e.cssText="";for(i in s=t?{}:e,o)a="number"!=typeof(c=o[i])||_e.test(i)?c:c+"px",!t&&/^--/.test(i)?s.setProperty(i,a):s[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Ee,Se),":",e[t],";");return n.join("")}(r=s):r=o;break}default:r!=o&&(n="string",r=o,t?e.value=o||"":e.cssText=o||"")}}}var Ae,Te,Re=(Ae=[].slice,(Te=Ne.prototype).ELEMENT_NODE=1,Te.nodeType=111,Te.remove=function(e){var t,n=this.childNodes,r=this.firstChild,o=this.lastChild;return this._=null,e&&2===n.length?o.parentNode.removeChild(o):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(o),t.deleteContents()),r},Te.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,o=0,s=r.length;o<s;o++)t.appendChild(r[o]);return t},Ne);function Ne(e){var t=this.childNodes=Ae.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Pe(e){return{html:e}}function je(e,t){switch(e.nodeType){case We:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case He:return je(e.render(),t);default:return e}}function De(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(Pe).then(t):Promise.resolve(j.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var ze,Ie,qe,Me,Fe,Be="ownerSVGElement",He=v.prototype.nodeType,We=Re.prototype.nodeType,Ue=(Ie=(ze={Event:b,WeakSet:u}).Event,qe=ze.WeakSet,Me=!0,Fe=null,function(e){return Me&&(Me=!Me,Fe=new qe,function(e){var t=new qe,n=new qe;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,o=[],s=function(e){o.push(e),clearTimeout(r),r=setTimeout((function(){i(o.splice(r=0,o.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){s({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){s({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,o=e.length,s=0;s<o;s++)a((r=e[s]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var o,s=new Ie(t),i=e.length,a=0;a<i;1===(o=e[a++]).nodeType&&function e(t,n,r,o,s){Fe.has(t)&&!o.has(t)&&(s.delete(t),o.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,o,s));}(o,s,t,n,r));}}(e.ownerDocument)),Fe.add(e),e}),Ze=/^(?:form|list)$/i,Ve=[].slice;function Ke(t){return this.type=t,function(t){var n=ke,r=$e;return function(o){var s,i,a;return n!==o&&(s=t,i=n=o,a=ve.get(i)||ve.set(i,xe(s,i)),r=a.updates(K.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ye=!(Ke.prototype={attribute:function(e,t,n){var r,o=Be in e;if("style"===t)return Ce(e,n,o);if("."===t.slice(0,1))return l=e,u=t.slice(1),o?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?Ue(e):t.toLowerCase()in e&&(s=s.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(s,r,!1),(r=t)&&e.addEventListener(s,t,!1))}}if("data"===t||!o&&t in e&&!Ze.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in j.attributes)return function(n){var o=j.attributes[t](e,n);r!==o&&(null==(r=o)?e.removeAttribute(t):e.setAttribute(t,o))};var i,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:je,before:e},o=Be in e?"svg":"html",s=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":s?n!==a&&(n=a,t[0].textContent=a):(s=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=h(e.parentNode,t,[],r);break}default:if(s=!1,D(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(D(a[0])&&(a=a.concat.apply([],a)),Oe(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Oe(a)?a.then(i):"placeholder"in a?De(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,Ve.call(O([].concat(a.html).join(""),o).childNodes),r):i("length"in a?Ve.call(a):j.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var o;t!==r&&("object"==(o=typeof(t=r))&&r?Oe(r)?r.then(n):"placeholder"in r?De(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):j.invoke(r,n)):"function"==o?n(r(e)):e.textContent=null==r?"":r)}}}),Xe=function(t){var r,o,s,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(o={},s=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return o[t]||(o[t]=e)},Xe=c?s:(i=new n,function(e){return i.get(e)||(n=s(t=e),i.set(t,n),n);var t,n})):Ye=!0,Qe(t)};function Qe(e){return Ye?e:Xe(e)}function Ge(e){for(var t=arguments.length,n=[Qe(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Je=new n,et=function(e){var t,n,r;return function(){var o=Ge.apply(null,arguments);return r!==o[0]?(r=o[0],n=new Ke(e),t=nt(n.apply(n,o))):n.apply(n,o),t}},tt=function(e,t){var n=t.indexOf(":"),r=Je.get(e),o=t;return-1<n&&(o=t.slice(n+1),t=t.slice(0,n)||"html"),r||Je.set(e,r={}),r[o]||(r[o]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Re(t):e},rt=new n;function ot(){var e=rt.get(this),t=Ge.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ke(Be in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var st,it,at,ct,lt=j.define,ut=Ke.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return ot.bind(e)},dt.define=lt,dt.diff=h,(dt.hyper=dt).observe=Ue,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},st=et,it=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,c=t.get(e)||ct(e,t);switch(typeof o){case"object":case"function":var l=c.w||(c.w=new n);return l.get(o)||(s=l,i=o,a=new e(r),s.set(i,a),a);default:var u=c.p||(c.p=at(null));return u[o]||(u[o]=new e(r))}}(this,it.get(e)||(r=e,o=new w,it.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:x("html",st),svg:x("svg",st),state:x("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(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 o in r)n[o]=r[o];return!1!==t&&this.render(),this}}}),dt}(document);const Je=Ge,et=j,tt=Ve,nt=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",o=null,s=new Map,i="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(i){case"type":if("/"===c){i="subtype";continue}t+=c;break;case"subtype":if(";"===c){i="param-start";continue}n+=c;break;case"param-start":if(O.test(c)||";"===c)continue;r+=c,i="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){i="param-value",o=null;continue}s.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){i="collect-quoted-string";continue}if(";"===c){o=o.trimEnd(),i="param-start",I(s,r,o),r="";continue}o="string"==typeof o?o+c:c;break;case"collect-quoted-string":if('"'===c){I(s,r,o),i="ignore-input-until-next-param",r="",o=null;continue}if("\\"===c)continue;o="string"==typeof o?o+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&I(s,r,o);if(""===t.trim()||!D.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!D.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(s.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?D.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},rt=Qe,ot=/-/g,st=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),it="en"===l||l.startsWith("en-")?"en-AU":l,at=new Intl.DateTimeFormat(it,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===it?"2-digit":"numeric"}),ct=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function lt(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function ut(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function dt(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:o})=>"element"===n&&t?t(o,r++,e):o))}}const pt=dt("conjunction"),ft=dt("disjunction");function ht(e,t){return pt(e,t).join("")}function mt(e){return e.trim().replace(/\s+/g," ")}function gt(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function bt(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){Pt(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}function yt(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>Je`${e}, `));return Je`${r}${n[n.length-1]}`}function wt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o=`x${o}`):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function vt(e){const t=new Set,n="ltNodefault"in e.dataset?"":mt(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>mt(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(mt(e))))}return[...t]}function xt(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function kt(e,t){const n=t.closest(ct);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function $t(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function _t(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function Et(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Ct extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function St(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{xt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),Lt(t),t}function Lt(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...At(t)])e.remove()}function*At(e){for(;e.nextNode();)yield e.currentNode}class Tt extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class Rt extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||wt(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:o,elements:s,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:o,elements:s,title:i,details:a,stack:n}}}function Nt(e,t,n={}){const r={...n,isWarning:!1};o("error",new Rt(e,t,r))}function Pt(e,t,n={}){const r={...n,isWarning:!0};o("warn",new Rt(e,t,r))}function jt(e){return{showError:(t,n)=>Nt(t,e,n),showWarning:(t,n)=>Pt(t,e,n)}}function Dt(e){return e?`\`${e}\``:""}function Ot(e,{quotes:t}={quotes:!1}){return ft(e,t?e=>{return Dt((t=e,String(t)?`"${t}"`:""));var t}:Dt).join("")}function zt(e,...t){return It(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[o,s]=r.slice(1,-1).split("|");if(s){return`${e}[${o}](${new URL(s,"https://respec.org/docs/")})`}return`${e}[\`${o}\`](https://respec.org/docs/#${o})`})).join(""))}function It(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const qt=new Map([["text/html","html"],["application/xml","xml"]]);function Mt(e,t=document){const n=qt.get(e);if(!n){const t=[...qt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Ft(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Ft(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;Lt(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),ut(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=Je`<meta charset="utf-8" />`);s.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=Je`
           <meta name="generator" content="${c}" />
         `;s.appendChild(l),t.prepend(s),o("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}n("core/exporter",{rsDocToDataURL:Mt});class Bt{constructor(){this._respecDonePromise=new Promise((e=>{s("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],s("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),s("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return Ft("html",document)}}const Ht="core/post-process";const Wt="core/pre-process";const Ut="core/base-runner";async function Zt(e){!function(){const e=new Bt;Object.defineProperty(document,"respec",{value:e})}(),o("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),s("amend-user-config",n),s("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of i)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let o;try{o=JSON.parse(r)}catch{o=r}return[n,o]})),r=Object.fromEntries(n);Object.assign(e,r),o("amend-user-config",r)}(respecConfig),performance.mark(`${Ut}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||Nt("Every item in `preProcess` must be a JS function.",Wt),t})).map((async(t,n)=>{const r=jt(`${Wt}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){Nt(`Function ${t.name} threw an error during \`preProcess\`.`,Wt,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,o)=>{const s=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),o(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){o(e)}finally{clearTimeout(s),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),o("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||Nt("Every item in `postProcess` must be a JS function.",Ht),t})).map((async(t,n)=>{const r=jt(`${Ht}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){Nt(`Function ${t.name} threw an error during \`postProcess\`.`,Ht,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),o("end-all"),ut(document),performance.mark(`${Ut}-end`),performance.measure(Ut,`${Ut}-start`,`${Ut}-end`)}var Vt=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0}
       #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}
      @@ -269,7 +269,7 @@ dd{margin-left:0}
             data-link-for="${i}"
             >${a}</a
           ></code
      -  >`}function go(e){const t=mt(e),n=Je`<em class="rfc2119">${t}</em>`;return oo[t]=!0,n}function bo(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?Je`<a href="${t}" data-matched-text="${e}"></a>`:Je`<a data-cite="${t}" data-matched-text="${e}"></a>`}function yo(e,t){const n=mt(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=jr(n);return!!t.parentElement.closest("dfn")?$o(`\`${r.textContent}\``):r}function wo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(mt),{type:i,illegal:a}=kt(o,t.parentElement),c=Jr(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Pt("Normative references in informative sections are not allowed. ",ro,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function vo(e,t,n){return"ABBR"===t.parentElement.tagName?e:Je`<abbr title="${n.get(e)}">${e}</abbr>`}function xo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return Je`<var data-type="${r}">${n}</var>`}function ko(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(mt).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=_o(s),a=n?mt(n):null;return Je`<a
      +  >`}function go(e){const t=mt(e),n=Je`<em class="rfc2119">${t}</em>`;return oo[t]=!0,n}function bo(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?Je`<a href="${t}" data-matched-text="${e}"></a>`:Je`<a data-cite="${t}" data-matched-text="${e}"></a>`}function yo(e,t){const n=mt(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=jr(n);return!!t.parentElement.closest("dfn,a")?$o(`\`${r.textContent}\``):r}function wo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(mt),{type:i,illegal:a}=kt(o,t.parentElement),c=Jr(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Pt("Normative references in informative sections are not allowed. ",ro,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function vo(e,t,n){return"ABBR"===t.parentElement.tagName?e:Je`<abbr title="${n.get(e)}">${e}</abbr>`}function xo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return Je`<var data-type="${r}">${n}</var>`}function ko(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(mt).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=_o(s),a=n?mt(n):null;return Je`<a
           data-link-type="dfn|abstract-op"
           data-link-for="${a}"
           data-xref-for="${a}"
      diff --git a/builds/respec-dini.js.map b/builds/respec-dini.js.map
      index 9e46ac6052..d14aa4b741 100644
      --- a/builds/respec-dini.js.map
      +++ b/builds/respec-dini.js.map
      @@ -1 +1 @@
      -{"version":3,"file":"respec-dini.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/dini.js","../src/core/location-hash.js","../src/core/defaults.js","../src/dini/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/dini/style.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/title.js","../src/core/templates/show-link.js","../src/core/templates/show-logo.js","../src/core/templates/show-people.js","../src/dini/templates/headers.js","../src/dini/headers.js","../src/dini/abstract.js","../src/core/data-transform.js","../src/core/data-abbr.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/dini/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/core/best-practices.js","../src/core/figures.js","../src/core/data-cite.js","../src/core/link-to-dfn.js","../src/core/contrib.js","../src/core/fix-headers.js","../src/core/structure.js","../src/core/informative.js","../src/core/id-headers.js","../src/ui/save-html.js","../src/ui/about-respec.js","../src/core/seo.js","../src/styles/highlight.css.js","../src/core/text-loader.js","../src/core/worker.js","../src/core/highlight.js","../src/core/list-sorter.js","../src/styles/var.css.js","../src/core/highlight-vars.js","../src/styles/datatype.css.js","../src/core/data-type.js","../src/styles/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/github.js","../src/core/custom-elements/rs-changelog.js","../src/core/custom-elements/index.js","../src/core/dfn-contract.js","../src/core/linter-rules/check-charset.js","../src/core/linter-rules/check-punctuation.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/no-http-props.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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/dini/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/dini/style.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/title.js\"),\n  import(\"../src/dini/headers.js\"),\n  import(\"../src/dini/abstract.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/data-abbr.js\"),\n  import(\"../src/core/inlines.js\"),\n  import(\"../src/dini/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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/biblio.js\"),\n  import(\"../src/core/link-to-dfn.js\"),\n  import(\"../src/core/data-cite.js\"),\n  import(\"../src/core/render-biblio.js\"),\n  import(\"../src/core/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/ui/save-html.js\"),\n  import(\"../src/ui/about-respec.js\"),\n  import(\"../src/core/seo.js\"),\n  import(\"../src/core/highlight.js\"),\n  import(\"../src/core/list-sorter.js\"),\n  import(\"../src/core/highlight-vars.js\"),\n  import(\"../src/core/data-type.js\"),\n  import(\"../src/core/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/custom-elements/index.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  /* Linter 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/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/no-http-props.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 DINI specs\n */\nexport const name = \"dini/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst licenses = new Map([\n  [\n    \"cc0\",\n    {\n      name: \"Creative Commons 0 Public Domain Dedication\",\n      short: \"CC0\",\n      url: \"https://creativecommons.org/publicdomain/zero/1.0/\",\n    },\n  ],\n  [\n    \"cc-by\",\n    {\n      name: \"Creative Commons Attribution 4.0 International Public License\",\n      short: \"CC-BY\",\n      url: \"https://creativecommons.org/licenses/by/4.0/legalcode\",\n    },\n  ],\n  [\n    \"cc-by-sa\",\n    {\n      name: \"Creative Commons Attribution-ShareAlike 4.0 International Public License\",\n      short: \"CC-BY-SA\",\n      url: \"https://creativecommons.org/licenses/by-sa/4.0/legalcode\",\n    },\n  ],\n]);\n\nconst diniDefaults = {\n  format: \"markdown\",\n  isED: false,\n  isNoTrack: true,\n  isPR: false,\n  lint: {\n    \"privsec-section\": true,\n    \"wpt-tests-exist\": false,\n  },\n  logos: [],\n  prependW3C: false,\n  doJsonLd: false,\n  license: \"cc-by\",\n  shortName: \"X\",\n  showPreviousVersion: false,\n};\n\nfunction computeProps(conf) {\n  return {\n    licenseInfo: licenses.get(conf.license),\n  };\n}\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...diniDefaults.lint,\n          ...conf.lint,\n        };\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...diniDefaults,\n    ...conf,\n    lint,\n  });\n\n  // computed properties\n  Object.assign(conf, computeProps(conf));\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","// @ts-check\n// Module dini/style\n// Inserts a link to the appropriate W3C style for the specification's maturity level.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n\nimport {\n  createResourceHint,\n  linkCSS,\n  showWarning,\n  toKeyValuePairs,\n} from \"../core/utils.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nexport const name = \"dini/style\";\nfunction attachFixupScript(doc, version) {\n  const script = doc.createElement(\"script\");\n  if (location.hash) {\n    script.addEventListener(\n      \"load\",\n      () => {\n        window.location.href = location.hash;\n      },\n      { once: true }\n    );\n  }\n  script.src = `https://www.w3.org/scripts/TR/${version}/fixup.js`;\n  doc.body.appendChild(script);\n}\n\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 createMetaViewport() {\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  return meta;\n}\n\nfunction createBaseStyle() {\n  const link = document.createElement(\"link\");\n  link.rel = \"stylesheet\";\n  link.href = \"https://www.w3.org/StyleSheets/TR/2016/base.css\";\n  link.classList.add(\"removeOnSave\");\n  return link;\n}\n\nfunction createResourceHints() {\n  /** @type ResourceHintOption[]  */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C styles and scripts.\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2016/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preload\", // all specs include on base.css.\n      href: \"https://www.w3.org/StyleSheets/TR/2016/base.css\",\n      as: \"style\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// Opportunistically apply base style\nelements.appendChild(createBaseStyle());\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(createMetaViewport());\n}\n\ndocument.head.prepend(elements);\n\nfunction styleMover(linkURL) {\n  return exportDoc => {\n    const w3cStyle = exportDoc.querySelector(`head link[href=\"${linkURL}\"]`);\n    exportDoc.querySelector(\"head\").append(w3cStyle);\n  };\n}\n\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"`respecConfig.specStatus` missing. Defaulting to 'base'.\";\n    conf.specStatus = \"base\";\n    showWarning(msg, name);\n  }\n\n  let styleFile = \"\";\n\n  // Figure out which style file to use.\n  switch (conf.specStatus.toUpperCase()) {\n    case \"UNOFFICIAL\":\n      styleFile = \"W3C-UD\";\n      break;\n    case \"BASE\":\n      styleFile = \"base.css\";\n      break;\n  }\n\n  // Attach W3C fixup script after we are done.\n  if (!conf.noToc) {\n    sub(\n      \"end-all\",\n      () => {\n        attachFixupScript(document, \"2016\");\n      },\n      { once: true }\n    );\n  }\n  const finalStyleURL = `https://www.w3.org/StyleSheets/TR/2016/${styleFile}`;\n  linkCSS(document, finalStyleURL);\n  // Make sure the W3C stylesheet is the last stylesheet, as required by W3C Pub Rules.\n  const moveStyle = styleMover(finalStyleURL);\n  sub(\"beforesave\", moveStyle);\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","// @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","/**\n * This module handles the creation of the h1#title of a spec and\n * makes sure the <title> always matches the h1.\n *\n * If no h1#title is included, then the <title> becomes the h1#title.\n *\n * When a h1#title is included, it always takes precedence over the\n * <title> of a spec. An error will be displayed in case of\n * any mismatch.\n *\n */\n\nimport { getIntlData, norm, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/title\";\n\nconst localizationStrings = {\n  en: {\n    default_title: \"No Title\",\n  },\n  de: {\n    default_title: \"Kein Titel\",\n  },\n  zh: {\n    default_title: \"无标题\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {HTMLElement} */\n  const h1Elem =\n    document.querySelector(\"h1#title\") || html`<h1 id=\"title\"></h1>`;\n\n  // check existing element is ok to use\n  if (h1Elem.isConnected && h1Elem.textContent.trim() === \"\") {\n    const msg =\n      \"The document is missing a title, so using a default title. \" +\n      \"To fix this, please give your document a `<title>`. \" +\n      \"If you need special markup in the document's title, \" +\n      'please use a `<h1 id=\"title\">`.';\n    const title = \"Document is missing a title\";\n    showError(msg, name, { title, elements: [h1Elem] });\n  }\n\n  // Decorate the spec title\n  if (!h1Elem.id) h1Elem.id = \"title\";\n  h1Elem.classList.add(\"title\");\n\n  setDocumentTitle(conf, h1Elem);\n\n  // This will get relocated by a template later.\n  document.body.prepend(h1Elem);\n}\n\nfunction setDocumentTitle(conf, h1Elem) {\n  // If the h1 is newly created, it won't be connected. In this case\n  // we use the <title> or a localized fallback.\n  if (!h1Elem.isConnected) {\n    h1Elem.textContent = document.title || `${l10n.default_title}`;\n  }\n  // We replace \":<br>\" with \":\", and \"<br>\" with \"-\", as appropriate.\n  const tempElem = document.createElement(\"h1\");\n  tempElem.innerHTML = h1Elem.innerHTML\n    .replace(/:<br>/g, \": \")\n    .replace(/<br>/g, \" - \");\n  let documentTitle = norm(tempElem.textContent);\n\n  if (conf.isPreview && conf.prNumber) {\n    const prUrl = conf.prUrl || `${conf.github.repoURL}pull/${conf.prNumber}`;\n    const { childNodes } = html`\n      Preview of PR <a href=\"${prUrl}\">#${conf.prNumber}</a>:\n    `;\n    h1Elem.prepend(...childNodes);\n    documentTitle = `Preview of PR #${conf.prNumber}: ${documentTitle}`;\n  }\n\n  document.title = documentTitle;\n\n  // conf.title is deperecated - we are keeping this here just to\n  // retain backwards compat as we think the ePub generator\n  // relies on it.\n  conf.title = documentTitle;\n}\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { showWarning } from \"../../core/utils.js\";\n\nconst name = \"core/templates/show-link\";\n\n/**\n * @param {object} link\n * @param {string} link.key\n * @param {string} [link.class]\n * @param {LinkData[]} [link.data]\n */\nexport default function 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    console.warn(msg, link);\n    return;\n  }\n  return html`\n    <dt class=\"${link.class ? link.class : null}\">${link.key}</dt>\n    ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n  `;\n}\n\n/**\n * @typedef {object} LinkData\n * @property {string} [LinkData.class]\n * @property {string} [LinkData.href]\n * @property {string} [LinkData.value]\n * @param {LinkData} data\n */\nfunction showLinkData(data) {\n  return html`<dd class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </dd>`;\n}\n","// @ts-check\nimport { docLink, showError } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst name = \"core/templates/show-logo\";\n\n/**\n * Logo mapper. Takes a logo structure and converts it to HTML.\n *\n * @param {object} logo\n * @param {string} logo.src\n * @param {string} logo.url\n * @param {string} logo.alt\n * @param {string} [logo.id]\n * @param {number} [logo.width]\n * @param {number} [logo.height]\n * @param {number} index\n */\nexport default function showLogo(logo, index) {\n  /** @type {HTMLAnchorElement} */\n  const a = html`<a href=\"${logo.url || null}\" class=\"logo\"\n    ><img\n      alt=\"${logo.alt || null}\"\n      crossorigin\n      height=\"${logo.height || null}\"\n      id=\"${logo.id || null}\"\n      src=\"${logo.src || null}\"\n      width=\"${logo.width || null}\"\n    />\n  </a>`;\n  if (!logo.alt) {\n    const src = logo.src ? `, with \\`src\\` ${logo.src}, ` : \"\";\n    const msg = `Logo at index ${index}${src} is missing required \"\\`alt\\`\" property.`;\n    const hint = docLink`Add the missing \"\\`alt\\`\" property describing the logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  if (!logo.src) {\n    const msg = `Logo at index ${index} is missing \"\\`src\\`\" property.`;\n    const hint = docLink`The \\`src\\` property is required on every logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  return a;\n}\n","// @ts-check\n\nconst name = \"core/templates/show-people\";\n\nimport {\n  W3CDate,\n  getIntlData,\n  isValidConfDate,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    until(date) {\n      return html` Until ${date} `;\n    },\n  },\n  es: {\n    until(date) {\n      return html` Hasta ${date} `;\n    },\n  },\n  ko: {\n    until(date) {\n      return html` ${date} 이전 `;\n    },\n  },\n  ja: {\n    until(date) {\n      return html` ${date} 以前 `;\n    },\n  },\n  de: {\n    until(date) {\n      return html` bis ${date} `;\n    },\n  },\n  zh: {\n    until(date) {\n      return html` 直到 ${date} `;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst orcidIcon = () =>\n  html`<svg\n    width=\"16\"\n    height=\"16\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 256 256\"\n  >\n    <style>\n      .st1 {\n        fill: #fff;\n      }\n    </style>\n    <path\n      d=\"M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z\"\n      fill=\"#a6ce39\"\n    />\n    <path\n      class=\"st1\"\n      d=\"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z\"\n    />\n  </svg>`;\n\n/**\n * @param {Conf} conf\n * @param {\"editors\" | \"authors\" | \"formerEditors\"} propName - the name of the property of the people to render.\n */\nexport default function showPeople(conf, propName) {\n  const people = conf[propName];\n  if (!Array.isArray(people) || !people.length) return; // nothing to show...\n\n  const validatePerson = personValidator(propName);\n  return people.filter(validatePerson).map(personToHTML);\n}\n\n/**\n * @param {Person} person\n */\nfunction personToHTML(person) {\n  // The following are treated as opt-in HTML by hyperHTML\n  // we need to deprecate this!\n  const personName = [person.name];\n  const company = [person.company];\n  const editorId = person.w3cid || null;\n  const contents = [];\n  if (person.mailto) {\n    person.url = `mailto:${person.mailto}`;\n  }\n  if (person.url) {\n    const url = new URL(person.url, document.location.href);\n    const classList =\n      url.protocol === \"mailto:\"\n        ? \"ed_mailto u-email email p-name\"\n        : \"u-url url p-name fn\";\n    contents.push(\n      html`<a class=\"${classList}\" href=\"${person.url}\">${personName}</a>`\n    );\n  } else {\n    contents.push(html`<span class=\"p-name fn\">${personName}</span>`);\n  }\n  if (person.orcid) {\n    contents.push(\n      html`<a class=\"p-name orcid\" href=\"${person.orcid}\">${orcidIcon()}</a>`\n    );\n  }\n  if (person.company) {\n    const hCard = \"p-org org h-org\";\n    const companyElem = person.companyURL\n      ? html`<a class=\"${hCard}\" href=\"${person.companyURL}\">${company}</a>`\n      : html`<span class=\"${hCard}\">${company}</span>`;\n    contents.push(html` (${companyElem})`);\n  }\n  if (person.note) {\n    contents.push(document.createTextNode(` (${person.note})`));\n  }\n  if (person.extras) {\n    contents.push(...person.extras.map(extra => html`, ${renderExtra(extra)}`));\n  }\n  const { retiredDate } = person;\n  if (person.retiredDate) {\n    const time = html`<time datetime=\"${retiredDate}\"\n      >${W3CDate.format(new Date(retiredDate))}</time\n    >`;\n    contents.push(html` - ${l10n.until(time)} `);\n  }\n  const dd = html`<dd\n    class=\"editor p-author h-card vcard\"\n    data-editor-id=\"${editorId}\"\n  >\n    ${contents}\n  </dd>`;\n  return dd;\n}\n\nfunction renderExtra(extra) {\n  const classVal = extra.class || null;\n  const { name, href } = extra;\n  return href\n    ? html`<a href=\"${href}\" class=\"${classVal}\">${name}</a>`\n    : html`<span class=\"${classVal}\">${name}</span>`;\n}\n\n/**\n *\n * @param {string} prop\n */\nfunction personValidator(prop) {\n  /**\n   * @param {Person} person\n   * @param {Number} index\n   */\n  return function validatePerson(person, index) {\n    const docsUrl = \"https://respec.org/docs/\";\n    const seePersonHint = `See [person](${docsUrl}#person) configuration for available options.`;\n    const preamble =\n      `Error processing the [person object](${docsUrl}#person) ` +\n      `at index ${index} of the \"[\\`${prop}\\`](${docsUrl}#${prop})\" configuration option.`;\n\n    if (!person.name) {\n      const msg = `${preamble} Missing required property \\`\"name\"\\`.`;\n      showError(msg, name, { hint: seePersonHint });\n      return false;\n    }\n\n    if (person.orcid) {\n      const { orcid } = person;\n      const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n\n      if (orcidUrl.origin !== \"https://orcid.org\") {\n        const msg = `${preamble} ORCID \"${person.orcid}\" at index ${index} is invalid.`;\n        const hint = `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // trailing slash would mess up checksum\n      const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n      if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n        const msg = `${preamble} ORCID \"${orcidId}\" has wrong format.`;\n        const hint = `ORCIDs have the format \"1234-1234-1234-1234.\"`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      if (!checkOrcidChecksum(orcid)) {\n        const msg = `${preamble} ORCID \"${orcid}\" failed checksum check.`;\n        const hint = \"Please check that the ORCID is valid.\";\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // canonical form\n      person.orcid = orcidUrl.href;\n    }\n\n    if (person.retiredDate && !isValidConfDate(person.retiredDate)) {\n      const msg = `${preamble} The property \"\\`retiredDate\\`\" is not a valid date.`;\n      showError(msg, name, {\n        hint: `The expected format is YYYY-MM-DD. ${seePersonHint}`,\n      });\n      return false;\n    }\n\n    if (\n      person.hasOwnProperty(\"extras\") &&\n      !validateExtras(person.extras, seePersonHint, preamble)\n    ) {\n      return false;\n    }\n\n    if (person.url && person.mailto) {\n      const msg = `${preamble} Has both \"url\" and \"mailto\" property.`;\n      showWarning(msg, name, {\n        hint: `Please choose either \"url\" or \"mailto\" (\"url\" is preferred). ${seePersonHint}`,\n      });\n    }\n\n    if (person.companyURL && !person.company) {\n      const msg = `${preamble} Has a \"\\`companyURL\\`\" property but no \"\\`company\\`\" property.`;\n      showWarning(msg, name, {\n        hint: `Please add a \"\\`company\\`\" property. ${seePersonHint}.`,\n      });\n    }\n    return true;\n  };\n}\n\n/**\n *\n * @param {PersonExtras[]} extras\n * @param {string} hint\n * @param {string} preamble\n */\nfunction validateExtras(extras, hint, preamble) {\n  if (!Array.isArray(extras)) {\n    showError(\n      `${preamble}. A person's \"extras\" member must be an array.`,\n      name,\n      { hint }\n    );\n    return false;\n  }\n  return extras.every((extra, index) => {\n    switch (true) {\n      case typeof extra !== \"object\":\n        showError(\n          `${preamble}. Member \"extra\" at index ${index} is not an object.`,\n          name,\n          {\n            hint,\n          }\n        );\n        return false;\n      case !extra.hasOwnProperty(\"name\"):\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} is missing required \"name\" member.`,\n          name,\n          { hint }\n        );\n        return false;\n      case typeof extra.name === \"string\" && extra.name.trim() === \"\":\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} \"name\" can't be empty.`,\n          name,\n          { hint }\n        );\n        return false;\n    }\n    return true;\n  });\n}\n\n/**\n * @param {string} orcid\n * @returns {boolean}\n */\nfunction checkOrcidChecksum(orcid) {\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcid[orcid.length - 1];\n  const remainder = orcid\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  return lastDigit === lastDigitShould;\n}\n","// @ts-check\nimport { getIntlData, showWarning } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\n\nconst name = \"dini/templates/headers\";\n\nconst ccLicense = \"https://creativecommons.org/licenses/by/4.0/legalcode\";\n\nconst localizationStrings = {\n  en: {\n    author: \"Author:\",\n    authors: \"Authors:\",\n    editor: \"Editor:\",\n    editors: \"Editors:\",\n    former_editor: \"Former editor:\",\n    former_editors: \"Former editors:\",\n    latest_editors_draft: \"Latest editor's draft:\",\n    latest_published_version: \"Latest published version:\",\n    this_version: \"This version:\",\n  },\n  ko: {\n    author: \"저자:\",\n    authors: \"저자:\",\n    editor: \"편집자:\",\n    editors: \"편집자:\",\n    former_editor: \"이전 편집자:\",\n    former_editors: \"이전 편집자:\",\n    latest_editors_draft: \"최신 편집 초안:\",\n    latest_published_version: \"최신 버전:\",\n    this_version: \"현재 버전:\",\n  },\n  zh: {\n    author: \"作者:\",\n    authors: \"作者:\",\n    editor: \"编辑:\",\n    editors: \"编辑:\",\n    former_editor: \"原编辑:\",\n    former_editors: \"原编辑:\",\n    latest_editors_draft: \"最新编辑草稿:\",\n    latest_published_version: \"最新发布版本:\",\n    this_version: \"本版本:\",\n  },\n  ja: {\n    author: \"著者:\",\n    authors: \"著者:\",\n    editor: \"編者:\",\n    editors: \"編者:\",\n    former_editor: \"以前の版の編者:\",\n    former_editors: \"以前の版の編者:\",\n    latest_editors_draft: \"最新の編集用草案:\",\n    latest_published_version: \"最新バージョン:\",\n    this_version: \"このバージョン:\",\n  },\n  nl: {\n    author: \"Auteur:\",\n    authors: \"Auteurs:\",\n    editor: \"Redacteur:\",\n    editors: \"Redacteurs:\",\n    latest_editors_draft: \"Laatste werkversie:\",\n    latest_published_version: \"Laatst gepubliceerde versie:\",\n    this_version: \"Deze versie:\",\n  },\n  es: {\n    author: \"Autor:\",\n    authors: \"Autores:\",\n    editor: \"Editor:\",\n    editors: \"Editores:\",\n    latest_editors_draft: \"Borrador de editor mas reciente:\",\n    latest_published_version: \"Versión publicada mas reciente:\",\n    this_version: \"Ésta versión:\",\n  },\n  de: {\n    author: \"Autor/in:\",\n    authors: \"Autor/innen:\",\n    editor: \"Redaktion:\",\n    editors: \"Redaktion:\",\n    former_editor: \"Frühere Mitwirkende:\",\n    former_editors: \"Frühere Mitwirkende:\",\n    latest_editors_draft: \"Letzter Entwurf:\",\n    latest_published_version: \"Letzte publizierte Fassung:\",\n    this_version: \"Diese Fassung:\",\n  },\n};\n\nexport const l10n = getIntlData(localizationStrings);\n\nfunction getSpecSubTitleElem(conf) {\n  let specSubTitleElem = document.querySelector(\"h2#subtitle\");\n\n  if (specSubTitleElem && specSubTitleElem.parentElement) {\n    specSubTitleElem.remove();\n    conf.subtitle = specSubTitleElem.textContent.trim();\n  } else if (conf.subtitle) {\n    specSubTitleElem = document.createElement(\"h2\");\n    specSubTitleElem.textContent = conf.subtitle;\n    specSubTitleElem.id = \"subtitle\";\n  }\n  if (specSubTitleElem) {\n    specSubTitleElem.classList.add(\"subtitle\");\n  }\n  return specSubTitleElem;\n}\n\nexport default conf => {\n  return html`<div class=\"head\">\n    ${conf.logos.map(showLogo)} ${document.querySelector(\"h1#title\")}\n    ${getSpecSubTitleElem(conf)}\n    <h2>\n      ${conf.textStatus}\n      <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n        >${conf.publishHumanDate}</time\n      >\n    </h2>\n    <dl>\n      <dt>${conf.multipleEditors ? l10n.editors : l10n.editor}</dt>\n      ${showPeople(conf, \"editors\")}\n      ${Array.isArray(conf.formerEditors) && conf.formerEditors.length > 0\n        ? html`\n            <dt>\n              ${conf.multipleFormerEditors\n                ? l10n.former_editors\n                : l10n.former_editor}\n            </dt>\n            ${showPeople(conf, \"formerEditors\")}\n          `\n        : \"\"}\n      ${conf.authors\n        ? html`\n            <dt>${conf.multipleAuthors ? l10n.authors : l10n.author}</dt>\n            ${showPeople(conf, \"authors\")}\n          `\n        : \"\"}\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </dl>\n    ${renderCopyright(conf)}\n    <hr />\n  </div>`;\n};\n\n/**\n * @param {string} text\n * @param {string} url\n * @param {string=} cssClass\n */\nfunction linkLicense(text, url, cssClass) {\n  return html`<a rel=\"license\" href=\"${url}\" class=\"${cssClass}\">${text}</a>`;\n}\n\nfunction renderCopyright(conf) {\n  // If there is already a copyright, let's relocate it.\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n    return existingCopyright;\n  }\n  if (conf.hasOwnProperty(\"overrideCopyright\")) {\n    const msg = \"The `overrideCopyright` configuration option is deprecated.\";\n    const hint = 'Please use `<p class=\"copyright\">` instead.';\n    showWarning(msg, name, { hint });\n  }\n  return conf.overrideCopyright\n    ? [conf.overrideCopyright]\n    : html`<p class=\"copyright\">\n        Dieses Dokument ist lizensiert unter\n        ${linkLicense(\n          \"Creative Commons Attribution 4.0 International Public License\",\n          ccLicense,\n          \"subfoot\"\n        )}.\n      </p>`;\n}\n","// @ts-check\n// Module dini/headers\n// Generate the headers material based on the provided configuration.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n//  - editors: an array of people editing the document (at least one is required). People\n//      are defined using:\n//          - name: the person's name (required)\n//          - url: URI for the person's home page\n//          - company: the person's company\n//          - companyURL: the URI for the person's company\n//          - mailto: the person's email\n//          - note: a note on the person (e.g. former editor)\n//  - authors: an array of people who are contributing authors of the document.\n//  - formerEditors: an array of people that had earlier edited the document but no longer edit.\n//  - subtitle: a subtitle for the specification\n//  - publishDate: the date to use for the publication, default to document.lastModified, and\n//      failing that to now. The format is YYYY-MM-DD or a Date object.\n//  - alternateFormats: a list of alternate formats for the document, each of which being\n//      defined by:\n//          - uri: the URI to the alternate\n//          - label: a label for the alternate\n//          - lang: optional language\n//          - type: optional MIME type\n//  - logos: a list of logos to use instead of the W3C logo, each of which being defined by:\n//          - src: the URI to the logo (target of <img src=>)\n//          - alt: alternate text for the image (<img alt=>), defaults to \"Logo\" or \"Logo 1\", \"Logo 2\", ...\n//            if src is not specified, this is the text of the \"logo\"\n//          - height: optional height of the logo (<img height=>)\n//          - width: optional width of the logo (<img width=>)\n//          - url: the URI to the organization represented by the logo (target of <a href=>)\n//          - id: optional id for the logo, permits custom CSS (wraps logo in <span id=>)\n//          - each logo element must specify either src or alt\n//  - otherLinks: an array of other links that you might want in the header (e.g., link github, twitter, etc).\n//         Example of usage: [{key: \"foo\", href:\"https://b\"}, {key: \"bar\", href:\"https://\"}].\n//         Allowed values are:\n//          - key: the key for the <dt> (e.g., \"Bug Tracker\"). Required.\n//          - value: The value that will appear in the <dd> (e.g., \"GitHub\"). Optional.\n//          - href: a URL for the value (e.g., \"https://foo.com/issues\"). Optional.\n//          - class: a string representing CSS classes. Optional.\n//  - license: can be one of the following\n//      - \"cc-by-sa\"\n//      - \"cc-by\"\n//      - \"cc0\"\nimport { ISODate, showError } from \"../core/utils.js\";\nimport headersTmpl from \"./templates/headers.js\";\nimport { pub } from \"../core/pubsubhub.js\";\n\nexport const name = \"dini/headers\";\n\nconst DINIDate = new Intl.DateTimeFormat([\"de-DE\"], {\n  timeZone: \"UTC\",\n  year: \"numeric\",\n  month: \"long\",\n  day: \"2-digit\",\n});\n\nconst status2text = {\n  unofficial: \"Entwurf vom\",\n  base: \"Spezifikation vom\",\n};\n\n/**\n * @param {*} conf\n * @param {string} prop\n * @param {string | number | Date} fallbackDate\n */\nfunction validateDateAndRecover(conf, prop, fallbackDate = new Date()) {\n  const date = conf[prop] ? new Date(conf[prop]) : new Date(fallbackDate);\n  // if date is valid\n  if (Number.isFinite(date.valueOf())) {\n    const formattedDate = ISODate.format(date);\n    return new Date(formattedDate);\n  }\n  const msg =\n    `[\\`${prop}\\`](https://github.com/speced/respec/wiki/${prop}) ` +\n    `is not a valid date: \"${conf[prop]}\". Expected format 'YYYY-MM-DD'.`;\n  showError(msg, name);\n  return new Date(ISODate.format(new Date()));\n}\n\nexport function run(conf) {\n  conf.isUnofficial = conf.specStatus === \"unofficial\";\n  conf.isBasic = conf.specStatus === \"base\";\n  if (!conf.specStatus) {\n    const msg = \"Missing required configuration: `specStatus`\";\n    showError(msg, name);\n  }\n  conf.title = document.title || \"Kein Titel\";\n  if (!conf.subtitle) conf.subtitle = \"\";\n  conf.publishDate = validateDateAndRecover(\n    conf,\n    \"publishDate\",\n    document.lastModified\n  );\n  conf.publishYear = conf.publishDate.getUTCFullYear();\n  conf.publishHumanDate = DINIDate.format(conf.publishDate);\n  const peopCheck = function (it) {\n    if (!it.name) {\n      const msg = \"All authors and editors must have a name.\";\n      showError(msg, name);\n    }\n    if (it.orcid) {\n      try {\n        it.orcid = normalizeOrcid(it.orcid);\n      } catch (e) {\n        const msg = `\"${it.orcid}\" is not an ORCID. ${e.message}`;\n        showError(msg, name);\n        // A failed orcid link could link to something outside of orcid,\n        // which would be misleading.\n        delete it.orcid;\n      }\n    }\n  };\n  if (!conf.formerEditors) conf.formerEditors = [];\n  if (conf.editors) {\n    conf.editors.forEach(peopCheck);\n    // Move any editors with retiredDate to formerEditors.\n    for (let i = 0; i < conf.editors.length; i++) {\n      const editor = conf.editors[i];\n      if (\"retiredDate\" in editor) {\n        conf.formerEditors.push(editor);\n        conf.editors.splice(i--, 1);\n      }\n    }\n  }\n  if (!conf.editors || conf.editors.length === 0) {\n    const msg = \"At least one editor is required\";\n    showError(msg, name);\n  }\n  if (conf.formerEditors.length) {\n    conf.formerEditors.forEach(peopCheck);\n  }\n  if (conf.authors) {\n    conf.authors.forEach(peopCheck);\n  }\n  conf.multipleEditors = conf.editors && conf.editors.length > 1;\n  conf.multipleFormerEditors = conf.formerEditors.length > 1;\n  conf.multipleAuthors = conf.authors && conf.authors.length > 1;\n  (conf.alternateFormats || []).forEach(it => {\n    if (!it.uri || !it.label) {\n      const msg = \"All alternate formats must have a uri and a label.\";\n      showError(msg, name);\n    }\n  });\n  if (conf.copyrightStart && conf.copyrightStart == conf.publishYear)\n    conf.copyrightStart = \"\";\n  conf.textStatus = status2text[conf.specStatus];\n  conf.dashDate = ISODate.format(conf.publishDate);\n  conf.publishISODate = conf.publishDate.toISOString();\n  // configuration done - yay!\n\n  // insert into document\n  const header = headersTmpl(conf);\n  document.body.prepend(header);\n  document.body.classList.add(\"h-entry\");\n\n  // Requested by https://github.com/speced/respec/issues/504\n  // Makes a record of a few auto-generated things.\n  pub(\"amend-user-config\", {\n    publishISODate: conf.publishISODate,\n    generatedSubtitle: `${conf.longStatus} ${conf.publishHumanDate}`,\n  });\n}\n\n/**\n * @param {string} orcid Either an ORCID URL or just the 16-digit ID which comes after the /\n * @return {string} the full ORCID URL. Throws an error if the ID is invalid.\n */\nfunction normalizeOrcid(orcid) {\n  const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n  if (orcidUrl.origin !== \"https://orcid.org\") {\n    throw new Error(\n      `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`\n    );\n  }\n\n  // trailing slash would mess up checksum\n  const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n  if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n    throw new Error(\n      `ORCIDs have the format \"1234-1234-1234-1234\", not \"${orcidId}\"`\n    );\n  }\n\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcidId[orcidId.length - 1];\n  const remainder = orcidId\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  if (lastDigit !== lastDigitShould) {\n    throw new Error(`\"${orcidId}\" has an invalid checksum.`);\n  }\n\n  return orcidUrl.href;\n}\n","// @ts-check\n// Module dini/abstract\n// Handle the abstract section properly.\nimport { getIntlData, showError } from \"../core/utils.js\";\nexport const name = \"dini/abstract\";\n\nconst localizationStrings = {\n  en: {\n    abstract: \"Abstract\",\n  },\n  ko: {\n    abstract: \"요약\",\n  },\n  zh: {\n    abstract: \"摘要\",\n  },\n  ja: {\n    abstract: \"要約\",\n  },\n  nl: {\n    abstract: \"Samenvatting\",\n  },\n  es: {\n    abstract: \"Resumen\",\n  },\n  de: {\n    abstract: \"Zusammenfassung\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run() {\n  const abs = document.getElementById(\"abstract\");\n  if (!abs) {\n    const msg = `Document must have one element with \\`id=\"abstract\"`;\n    showError(msg, name);\n    return;\n  }\n  abs.classList.add(\"introductory\");\n  let abstractHeading = document.querySelector(\"#abstract>h2\");\n  if (abstractHeading) {\n    return;\n  }\n  abstractHeading = document.createElement(\"h2\");\n  abstractHeading.textContent = l10n.abstract;\n  abs.prepend(abstractHeading);\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// 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 dini/conformance\n// Handle the conformance section properly.\nimport { getIntlData, htmlJoinAnd, 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\";\nexport const name = \"dini/conformance\";\n\nconst localizationStrings = {\n  en: {\n    conformance: \"Conformance\",\n    normativity:\n      \"As well as sections marked as non-normative, all authoring guidelines, \" +\n      \"diagrams, examples, and notes in this specification are non-normative. \" +\n      \"Everything else in this specification is normative.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        The key word${plural ? \"s\" : \"\"} ${keywords} in this document\n        ${plural ? \"are\" : \"is\"} to be interpreted as described in\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        when, and only when, they appear in all capitals, as shown here.\n      </p>`;\n    },\n  },\n  de: {\n    conformance: \"Anforderungen\",\n    normativity:\n      \"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten \" +\n      \"sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument \" +\n      \"nicht normativ. Alle anderen Angaben sind normativ.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        ${plural ? \"Die Schlüsselwörter\" : \"Das Schlüsselwort\"} ${keywords} in\n        diesem Dokument ${plural ? \"sind\" : \"ist\"} gemäß\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        und unter Berücksichtigung von\n        <a href=\"https://github.com/adfinis-sygroup/2119/blob/master/2119de.rst\"\n          >2119de</a\n        >\n        zu interpretieren, wenn und nur wenn ${plural ? \"sie\" : \"es\"} wie hier\n        gezeigt durchgehend groß geschrieben wurde${plural ? \"n\" : \"\"}.\n      </p>`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  const terms = [...Object.keys(rfc2119Usage)];\n  // Add RFC2119 to bibliography\n  if (terms.length) {\n    conf.normativeReferences.add(\"RFC2119\");\n    conf.normativeReferences.add(\"RFC8174\");\n  }\n  // Put in the 2119 clause and reference\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n  const content = html`\n    <h1>${l10n.conformance}</h1>\n    <p>${l10n.normativity}</p>\n    ${terms.length ? l10n.keywordInterpretation(keywords, plural) : null}\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run(conf) {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance && !conformance.classList.contains(\"override\")) {\n    processConformance(conformance, conf);\n  }\n  // Warn when there are RFC2119/RFC8174 keywords, but not conformance section\n  if (!conformance && Object.keys(rfc2119Usage).length) {\n    const msg = `Document uses RFC2119 keywords but lacks a conformance section.`;\n    const hint = 'Please add a `<section id=\"conformance\">`.';\n    showWarning(msg, name, { hint });\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\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 * 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\n// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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\">↑</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","// @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 { 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\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/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","/*\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\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","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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","// @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\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","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\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 \"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 \"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"],"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","dateLang","docLang","startsWith","W3CDate","nonNormativeSelector","createResourceHint","URL","baseURI","linkElem","rel","hint","corsMode","crossOrigin","as","dontRemove","classList","removeReSpec","doc","elem","joinFactory","formatter","ListFormat","mapper","elemCount","formatToParts","conjunction","disjunction","joinAnd","norm","getIntlData","localizationStrings","data","getIntlDataForKey","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","codedJoinOr","quotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","head","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$h","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","substituteWithTextNodes","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$p","style$1","dataInclude","abstract","dataTransform","dataAbbr","inlines","conformance","examples","issuesNotes","bestPractices","figures","biblio$1","linkToDfn","dataCite","renderBiblio","contrib","sections","fixHeaders","structure","informative","idHeaders","saveHtml","aboutRespec","seo","highlight","listSorter","highlightVars$1","dataType","algorithms","anchorExpander","dfnPanel","dfnContract","checkCharset","checkPunctuation","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","noHttpProps","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","licenses","short","diniDefaults","isED","isNoTrack","isPR","logos","prependW3C","doJsonLd","license","shortName","showPreviousVersion","licenseInfo","computeProps","css$f","noReSpecCSS","resourceHints","createResourceHints","createBaseStyle","meta","delimiter","separator","toKeyValuePairs","width","createMetaViewport","styleFile","noToc","attachFixupScript","finalStyleURL","linkURL","urls","frag","reduce","nextLink","linkCSS","exportDoc","w3cStyle","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","default_title","zh","h1Elem","isConnected","tempElem","documentTitle","isPreview","prNumber","prUrl","github","repoURL","setDocumentTitle","showLink","class","showLinkData","showLogo","logo","alt","height","until","date","es","ko","ja","orcidIcon","showPeople","propName","people","validatePerson","person","docsUrl","seePersonHint","preamble","orcid","orcidUrl","orcidId","pathname","lastDigit","remainder","Number","acc","lastDigitInt","lastDigitShould","checkOrcidChecksum","retiredDate","rawDate","Date","extras","every","extra","validateExtras","mailto","companyURL","company","personToHTML","personName","editorId","w3cid","contents","protocol","hCard","companyElem","note","classVal","renderExtra","time","ccLicense","author","authors","editor","editors","former_editor","former_editors","latest_editors_draft","latest_published_version","this_version","nl","headersTmpl","specSubTitleElem","subtitle","getSpecSubTitleElem","textStatus","dashDate","publishHumanDate","multipleEditors","formerEditors","multipleFormerEditors","multipleAuthors","otherLinks","existingCopyright","overrideCopyright","cssClass","renderCopyright","DINIDate","status2text","unofficial","base","isUnofficial","isBasic","publishDate","fallbackDate","isFinite","formattedDate","validateDateAndRecover","lastModified","publishYear","getUTCFullYear","peopCheck","normalizeOrcid","alternateFormats","uri","copyrightStart","publishISODate","toISOString","generatedSubtitle","longStatus","abs","abstractHeading","processDfnElement","abbr","fullForm","insertAdjacentHTML","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","flatMap","isInDB","put","close","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","forceUpdate","refsToFetch","onLine","ok","status","json","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","etAl","publisher","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","normativity","keywordInterpretation","processConformance","terms","contains","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$d","makeTitle","num","report","number","div","inAside","exampleTitle","css$b","editors_note","feature_at_risk","issue","issue_summary","no_issues_in_spec","handleIssues","ins","ghIssues","getIssueNumber","issueNumber","createIssueNumberGetter","issueList","inno","displayType","isFeatureAtRisk","isIssue","isEdNote","getIssueType","isInline","dataNum","titleParent","ghIssue","issueBase","atRiskBase","linkToIssueTracker","l10nIssue","issueNumberText","createIssueSummaryEntry","labels","labelsGroup","color","bgColor","issuesURL","searchParams","bg","textColorFromBgColor","ariaLabel","createLabel","createLabelsGroup","bodyHTML","issueSummaryElement","hasChildNodes","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","apiBase","issueNumbers","fullName","issues","fetchAndStoreGithubIssues","headElem","ednote","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","decorateTableOfFigures","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","linkTargets","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","first","isCode","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","xref","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","res","maxAge","Request","cache","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","cacheResponse","Response","blob","fetchAndCache","showContributors","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","default","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","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","outputDoc","css$5","varMap","variables","currentSection","css$3","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","file_a_bug","participate","commit_history","props","to","connectedCallback","fetchCommits","commits","commit","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","isRecTrack","saysPrivOrSec","saysConsiderations","offendingMembers","getOwnPropertyNames"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IACHC,OAAOC,QAAQG,QAAQS,GAAQC,EAEnC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AuB,UACxB,CAAC,oBAAqB,SACtB,CAAC,SAAU,MACX,CAAC,WAAY,OACb,CAAC,OAAQ,QACTtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU0B,cAAclB,EAAK,GAAIA,EAAK,GAClD,IAKG,CACE,CAAC,MAAO,IACR,CAAC,SAAU,MACX,CAAC,gEAAiE,QAClE,CAAC,kCAAmC,OACpC,CAAC,QAAS,KACV,CAAC,uFAAwF,QACzF,CAAC,oBAAqB,QACtB,CAAC,uBAAwB,UACzB,CAAC,sBAAuB,MACxB,CAAC,2FAA4F,MAC7F,CAAC,qEAAsE,SACvE,CAAC,iCAAkC,MACnC,CAAC,oBAAqB,QACtB,CAAC,4FAA6F,QAC9F,CAAC,yGAA0G,QAC3G,CAAC,8FAA+F,QAChG,CAAC,0BAA2B,OAC5B,CAAC,+BAAgC,QACjC,CAAC,sBAAuB,QACxB,CAAC,oBAAqB,UACtB,CAAC,eAAgB,MACjB,CAAC,YAAa,MACd,CAAC,QAAS,QACVtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU4B,gBAAgBpB,EAAK,GAAIA,EAAK,GACpD,IAKG,CAEE,YACA,SACA,SACA,MACA,WACA,UACA,OACA,YACA,QACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,UACA,QACA,WACA,MACA,WACA,cACA,QACA,SACA,WACA,YACA,MACA,SACA,YACA,YACA,YACA,WACA,WACA,MACA,UACA,UACA,WACA,WACA,eACA,SACA,SACA,YACA,WACA,YACA,cACA,QACA,UACA,QACA,SACA,aACA,YACA,WACA,OACA,QACA,OACA,QACA,QACA,MACA,QACA,OACA,OACA,YACA,OACA,WACA,SACA,SACA,YACA,WACA,OACA,WACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,iBACA,QACA,OACA,SACA,UACA,UACA,aACA,WACA,MACA,eAEA,gBACA,SACA,SACA,YACA,WACA,QACA,WACAtH,QAAQ8G,EAAU6B,oBAEb7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,IAAI5H,SAC5DiD,GAAYlwB,GAAKyb,IAAKzd,GAAM,CAAEswB,KAAMtuB,GAAKsuB,KAAOxY,GACjD,CACH","x_google_ignoreList":[4,5,6,8]}
      \ No newline at end of file
      +{"version":3,"file":"respec-dini.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/dini.js","../src/core/location-hash.js","../src/core/defaults.js","../src/dini/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/dini/style.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/title.js","../src/core/templates/show-link.js","../src/core/templates/show-logo.js","../src/core/templates/show-people.js","../src/dini/templates/headers.js","../src/dini/headers.js","../src/dini/abstract.js","../src/core/data-transform.js","../src/core/data-abbr.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/dini/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/core/best-practices.js","../src/core/figures.js","../src/core/data-cite.js","../src/core/link-to-dfn.js","../src/core/contrib.js","../src/core/fix-headers.js","../src/core/structure.js","../src/core/informative.js","../src/core/id-headers.js","../src/ui/save-html.js","../src/ui/about-respec.js","../src/core/seo.js","../src/styles/highlight.css.js","../src/core/text-loader.js","../src/core/worker.js","../src/core/highlight.js","../src/core/list-sorter.js","../src/styles/var.css.js","../src/core/highlight-vars.js","../src/styles/datatype.css.js","../src/core/data-type.js","../src/styles/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/github.js","../src/core/custom-elements/rs-changelog.js","../src/core/custom-elements/index.js","../src/core/dfn-contract.js","../src/core/linter-rules/check-charset.js","../src/core/linter-rules/check-punctuation.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/no-http-props.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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/dini/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/dini/style.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/title.js\"),\n  import(\"../src/dini/headers.js\"),\n  import(\"../src/dini/abstract.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/data-abbr.js\"),\n  import(\"../src/core/inlines.js\"),\n  import(\"../src/dini/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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/biblio.js\"),\n  import(\"../src/core/link-to-dfn.js\"),\n  import(\"../src/core/data-cite.js\"),\n  import(\"../src/core/render-biblio.js\"),\n  import(\"../src/core/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/ui/save-html.js\"),\n  import(\"../src/ui/about-respec.js\"),\n  import(\"../src/core/seo.js\"),\n  import(\"../src/core/highlight.js\"),\n  import(\"../src/core/list-sorter.js\"),\n  import(\"../src/core/highlight-vars.js\"),\n  import(\"../src/core/data-type.js\"),\n  import(\"../src/core/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/custom-elements/index.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  /* Linter 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/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/no-http-props.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 DINI specs\n */\nexport const name = \"dini/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst licenses = new Map([\n  [\n    \"cc0\",\n    {\n      name: \"Creative Commons 0 Public Domain Dedication\",\n      short: \"CC0\",\n      url: \"https://creativecommons.org/publicdomain/zero/1.0/\",\n    },\n  ],\n  [\n    \"cc-by\",\n    {\n      name: \"Creative Commons Attribution 4.0 International Public License\",\n      short: \"CC-BY\",\n      url: \"https://creativecommons.org/licenses/by/4.0/legalcode\",\n    },\n  ],\n  [\n    \"cc-by-sa\",\n    {\n      name: \"Creative Commons Attribution-ShareAlike 4.0 International Public License\",\n      short: \"CC-BY-SA\",\n      url: \"https://creativecommons.org/licenses/by-sa/4.0/legalcode\",\n    },\n  ],\n]);\n\nconst diniDefaults = {\n  format: \"markdown\",\n  isED: false,\n  isNoTrack: true,\n  isPR: false,\n  lint: {\n    \"privsec-section\": true,\n    \"wpt-tests-exist\": false,\n  },\n  logos: [],\n  prependW3C: false,\n  doJsonLd: false,\n  license: \"cc-by\",\n  shortName: \"X\",\n  showPreviousVersion: false,\n};\n\nfunction computeProps(conf) {\n  return {\n    licenseInfo: licenses.get(conf.license),\n  };\n}\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...diniDefaults.lint,\n          ...conf.lint,\n        };\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...diniDefaults,\n    ...conf,\n    lint,\n  });\n\n  // computed properties\n  Object.assign(conf, computeProps(conf));\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","// @ts-check\n// Module dini/style\n// Inserts a link to the appropriate W3C style for the specification's maturity level.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n\nimport {\n  createResourceHint,\n  linkCSS,\n  showWarning,\n  toKeyValuePairs,\n} from \"../core/utils.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nexport const name = \"dini/style\";\nfunction attachFixupScript(doc, version) {\n  const script = doc.createElement(\"script\");\n  if (location.hash) {\n    script.addEventListener(\n      \"load\",\n      () => {\n        window.location.href = location.hash;\n      },\n      { once: true }\n    );\n  }\n  script.src = `https://www.w3.org/scripts/TR/${version}/fixup.js`;\n  doc.body.appendChild(script);\n}\n\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 createMetaViewport() {\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  return meta;\n}\n\nfunction createBaseStyle() {\n  const link = document.createElement(\"link\");\n  link.rel = \"stylesheet\";\n  link.href = \"https://www.w3.org/StyleSheets/TR/2016/base.css\";\n  link.classList.add(\"removeOnSave\");\n  return link;\n}\n\nfunction createResourceHints() {\n  /** @type ResourceHintOption[]  */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C styles and scripts.\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2016/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preload\", // all specs include on base.css.\n      href: \"https://www.w3.org/StyleSheets/TR/2016/base.css\",\n      as: \"style\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// Opportunistically apply base style\nelements.appendChild(createBaseStyle());\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(createMetaViewport());\n}\n\ndocument.head.prepend(elements);\n\nfunction styleMover(linkURL) {\n  return exportDoc => {\n    const w3cStyle = exportDoc.querySelector(`head link[href=\"${linkURL}\"]`);\n    exportDoc.querySelector(\"head\").append(w3cStyle);\n  };\n}\n\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"`respecConfig.specStatus` missing. Defaulting to 'base'.\";\n    conf.specStatus = \"base\";\n    showWarning(msg, name);\n  }\n\n  let styleFile = \"\";\n\n  // Figure out which style file to use.\n  switch (conf.specStatus.toUpperCase()) {\n    case \"UNOFFICIAL\":\n      styleFile = \"W3C-UD\";\n      break;\n    case \"BASE\":\n      styleFile = \"base.css\";\n      break;\n  }\n\n  // Attach W3C fixup script after we are done.\n  if (!conf.noToc) {\n    sub(\n      \"end-all\",\n      () => {\n        attachFixupScript(document, \"2016\");\n      },\n      { once: true }\n    );\n  }\n  const finalStyleURL = `https://www.w3.org/StyleSheets/TR/2016/${styleFile}`;\n  linkCSS(document, finalStyleURL);\n  // Make sure the W3C stylesheet is the last stylesheet, as required by W3C Pub Rules.\n  const moveStyle = styleMover(finalStyleURL);\n  sub(\"beforesave\", moveStyle);\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","// @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","/**\n * This module handles the creation of the h1#title of a spec and\n * makes sure the <title> always matches the h1.\n *\n * If no h1#title is included, then the <title> becomes the h1#title.\n *\n * When a h1#title is included, it always takes precedence over the\n * <title> of a spec. An error will be displayed in case of\n * any mismatch.\n *\n */\n\nimport { getIntlData, norm, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/title\";\n\nconst localizationStrings = {\n  en: {\n    default_title: \"No Title\",\n  },\n  de: {\n    default_title: \"Kein Titel\",\n  },\n  zh: {\n    default_title: \"无标题\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {HTMLElement} */\n  const h1Elem =\n    document.querySelector(\"h1#title\") || html`<h1 id=\"title\"></h1>`;\n\n  // check existing element is ok to use\n  if (h1Elem.isConnected && h1Elem.textContent.trim() === \"\") {\n    const msg =\n      \"The document is missing a title, so using a default title. \" +\n      \"To fix this, please give your document a `<title>`. \" +\n      \"If you need special markup in the document's title, \" +\n      'please use a `<h1 id=\"title\">`.';\n    const title = \"Document is missing a title\";\n    showError(msg, name, { title, elements: [h1Elem] });\n  }\n\n  // Decorate the spec title\n  if (!h1Elem.id) h1Elem.id = \"title\";\n  h1Elem.classList.add(\"title\");\n\n  setDocumentTitle(conf, h1Elem);\n\n  // This will get relocated by a template later.\n  document.body.prepend(h1Elem);\n}\n\nfunction setDocumentTitle(conf, h1Elem) {\n  // If the h1 is newly created, it won't be connected. In this case\n  // we use the <title> or a localized fallback.\n  if (!h1Elem.isConnected) {\n    h1Elem.textContent = document.title || `${l10n.default_title}`;\n  }\n  // We replace \":<br>\" with \":\", and \"<br>\" with \"-\", as appropriate.\n  const tempElem = document.createElement(\"h1\");\n  tempElem.innerHTML = h1Elem.innerHTML\n    .replace(/:<br>/g, \": \")\n    .replace(/<br>/g, \" - \");\n  let documentTitle = norm(tempElem.textContent);\n\n  if (conf.isPreview && conf.prNumber) {\n    const prUrl = conf.prUrl || `${conf.github.repoURL}pull/${conf.prNumber}`;\n    const { childNodes } = html`\n      Preview of PR <a href=\"${prUrl}\">#${conf.prNumber}</a>:\n    `;\n    h1Elem.prepend(...childNodes);\n    documentTitle = `Preview of PR #${conf.prNumber}: ${documentTitle}`;\n  }\n\n  document.title = documentTitle;\n\n  // conf.title is deperecated - we are keeping this here just to\n  // retain backwards compat as we think the ePub generator\n  // relies on it.\n  conf.title = documentTitle;\n}\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { showWarning } from \"../../core/utils.js\";\n\nconst name = \"core/templates/show-link\";\n\n/**\n * @param {object} link\n * @param {string} link.key\n * @param {string} [link.class]\n * @param {LinkData[]} [link.data]\n */\nexport default function 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    console.warn(msg, link);\n    return;\n  }\n  return html`\n    <dt class=\"${link.class ? link.class : null}\">${link.key}</dt>\n    ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n  `;\n}\n\n/**\n * @typedef {object} LinkData\n * @property {string} [LinkData.class]\n * @property {string} [LinkData.href]\n * @property {string} [LinkData.value]\n * @param {LinkData} data\n */\nfunction showLinkData(data) {\n  return html`<dd class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </dd>`;\n}\n","// @ts-check\nimport { docLink, showError } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst name = \"core/templates/show-logo\";\n\n/**\n * Logo mapper. Takes a logo structure and converts it to HTML.\n *\n * @param {object} logo\n * @param {string} logo.src\n * @param {string} logo.url\n * @param {string} logo.alt\n * @param {string} [logo.id]\n * @param {number} [logo.width]\n * @param {number} [logo.height]\n * @param {number} index\n */\nexport default function showLogo(logo, index) {\n  /** @type {HTMLAnchorElement} */\n  const a = html`<a href=\"${logo.url || null}\" class=\"logo\"\n    ><img\n      alt=\"${logo.alt || null}\"\n      crossorigin\n      height=\"${logo.height || null}\"\n      id=\"${logo.id || null}\"\n      src=\"${logo.src || null}\"\n      width=\"${logo.width || null}\"\n    />\n  </a>`;\n  if (!logo.alt) {\n    const src = logo.src ? `, with \\`src\\` ${logo.src}, ` : \"\";\n    const msg = `Logo at index ${index}${src} is missing required \"\\`alt\\`\" property.`;\n    const hint = docLink`Add the missing \"\\`alt\\`\" property describing the logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  if (!logo.src) {\n    const msg = `Logo at index ${index} is missing \"\\`src\\`\" property.`;\n    const hint = docLink`The \\`src\\` property is required on every logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  return a;\n}\n","// @ts-check\n\nconst name = \"core/templates/show-people\";\n\nimport {\n  W3CDate,\n  getIntlData,\n  isValidConfDate,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    until(date) {\n      return html` Until ${date} `;\n    },\n  },\n  es: {\n    until(date) {\n      return html` Hasta ${date} `;\n    },\n  },\n  ko: {\n    until(date) {\n      return html` ${date} 이전 `;\n    },\n  },\n  ja: {\n    until(date) {\n      return html` ${date} 以前 `;\n    },\n  },\n  de: {\n    until(date) {\n      return html` bis ${date} `;\n    },\n  },\n  zh: {\n    until(date) {\n      return html` 直到 ${date} `;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst orcidIcon = () =>\n  html`<svg\n    width=\"16\"\n    height=\"16\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 256 256\"\n  >\n    <style>\n      .st1 {\n        fill: #fff;\n      }\n    </style>\n    <path\n      d=\"M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z\"\n      fill=\"#a6ce39\"\n    />\n    <path\n      class=\"st1\"\n      d=\"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z\"\n    />\n  </svg>`;\n\n/**\n * @param {Conf} conf\n * @param {\"editors\" | \"authors\" | \"formerEditors\"} propName - the name of the property of the people to render.\n */\nexport default function showPeople(conf, propName) {\n  const people = conf[propName];\n  if (!Array.isArray(people) || !people.length) return; // nothing to show...\n\n  const validatePerson = personValidator(propName);\n  return people.filter(validatePerson).map(personToHTML);\n}\n\n/**\n * @param {Person} person\n */\nfunction personToHTML(person) {\n  // The following are treated as opt-in HTML by hyperHTML\n  // we need to deprecate this!\n  const personName = [person.name];\n  const company = [person.company];\n  const editorId = person.w3cid || null;\n  const contents = [];\n  if (person.mailto) {\n    person.url = `mailto:${person.mailto}`;\n  }\n  if (person.url) {\n    const url = new URL(person.url, document.location.href);\n    const classList =\n      url.protocol === \"mailto:\"\n        ? \"ed_mailto u-email email p-name\"\n        : \"u-url url p-name fn\";\n    contents.push(\n      html`<a class=\"${classList}\" href=\"${person.url}\">${personName}</a>`\n    );\n  } else {\n    contents.push(html`<span class=\"p-name fn\">${personName}</span>`);\n  }\n  if (person.orcid) {\n    contents.push(\n      html`<a class=\"p-name orcid\" href=\"${person.orcid}\">${orcidIcon()}</a>`\n    );\n  }\n  if (person.company) {\n    const hCard = \"p-org org h-org\";\n    const companyElem = person.companyURL\n      ? html`<a class=\"${hCard}\" href=\"${person.companyURL}\">${company}</a>`\n      : html`<span class=\"${hCard}\">${company}</span>`;\n    contents.push(html` (${companyElem})`);\n  }\n  if (person.note) {\n    contents.push(document.createTextNode(` (${person.note})`));\n  }\n  if (person.extras) {\n    contents.push(...person.extras.map(extra => html`, ${renderExtra(extra)}`));\n  }\n  const { retiredDate } = person;\n  if (person.retiredDate) {\n    const time = html`<time datetime=\"${retiredDate}\"\n      >${W3CDate.format(new Date(retiredDate))}</time\n    >`;\n    contents.push(html` - ${l10n.until(time)} `);\n  }\n  const dd = html`<dd\n    class=\"editor p-author h-card vcard\"\n    data-editor-id=\"${editorId}\"\n  >\n    ${contents}\n  </dd>`;\n  return dd;\n}\n\nfunction renderExtra(extra) {\n  const classVal = extra.class || null;\n  const { name, href } = extra;\n  return href\n    ? html`<a href=\"${href}\" class=\"${classVal}\">${name}</a>`\n    : html`<span class=\"${classVal}\">${name}</span>`;\n}\n\n/**\n *\n * @param {string} prop\n */\nfunction personValidator(prop) {\n  /**\n   * @param {Person} person\n   * @param {Number} index\n   */\n  return function validatePerson(person, index) {\n    const docsUrl = \"https://respec.org/docs/\";\n    const seePersonHint = `See [person](${docsUrl}#person) configuration for available options.`;\n    const preamble =\n      `Error processing the [person object](${docsUrl}#person) ` +\n      `at index ${index} of the \"[\\`${prop}\\`](${docsUrl}#${prop})\" configuration option.`;\n\n    if (!person.name) {\n      const msg = `${preamble} Missing required property \\`\"name\"\\`.`;\n      showError(msg, name, { hint: seePersonHint });\n      return false;\n    }\n\n    if (person.orcid) {\n      const { orcid } = person;\n      const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n\n      if (orcidUrl.origin !== \"https://orcid.org\") {\n        const msg = `${preamble} ORCID \"${person.orcid}\" at index ${index} is invalid.`;\n        const hint = `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // trailing slash would mess up checksum\n      const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n      if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n        const msg = `${preamble} ORCID \"${orcidId}\" has wrong format.`;\n        const hint = `ORCIDs have the format \"1234-1234-1234-1234.\"`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      if (!checkOrcidChecksum(orcid)) {\n        const msg = `${preamble} ORCID \"${orcid}\" failed checksum check.`;\n        const hint = \"Please check that the ORCID is valid.\";\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // canonical form\n      person.orcid = orcidUrl.href;\n    }\n\n    if (person.retiredDate && !isValidConfDate(person.retiredDate)) {\n      const msg = `${preamble} The property \"\\`retiredDate\\`\" is not a valid date.`;\n      showError(msg, name, {\n        hint: `The expected format is YYYY-MM-DD. ${seePersonHint}`,\n      });\n      return false;\n    }\n\n    if (\n      person.hasOwnProperty(\"extras\") &&\n      !validateExtras(person.extras, seePersonHint, preamble)\n    ) {\n      return false;\n    }\n\n    if (person.url && person.mailto) {\n      const msg = `${preamble} Has both \"url\" and \"mailto\" property.`;\n      showWarning(msg, name, {\n        hint: `Please choose either \"url\" or \"mailto\" (\"url\" is preferred). ${seePersonHint}`,\n      });\n    }\n\n    if (person.companyURL && !person.company) {\n      const msg = `${preamble} Has a \"\\`companyURL\\`\" property but no \"\\`company\\`\" property.`;\n      showWarning(msg, name, {\n        hint: `Please add a \"\\`company\\`\" property. ${seePersonHint}.`,\n      });\n    }\n    return true;\n  };\n}\n\n/**\n *\n * @param {PersonExtras[]} extras\n * @param {string} hint\n * @param {string} preamble\n */\nfunction validateExtras(extras, hint, preamble) {\n  if (!Array.isArray(extras)) {\n    showError(\n      `${preamble}. A person's \"extras\" member must be an array.`,\n      name,\n      { hint }\n    );\n    return false;\n  }\n  return extras.every((extra, index) => {\n    switch (true) {\n      case typeof extra !== \"object\":\n        showError(\n          `${preamble}. Member \"extra\" at index ${index} is not an object.`,\n          name,\n          {\n            hint,\n          }\n        );\n        return false;\n      case !extra.hasOwnProperty(\"name\"):\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} is missing required \"name\" member.`,\n          name,\n          { hint }\n        );\n        return false;\n      case typeof extra.name === \"string\" && extra.name.trim() === \"\":\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} \"name\" can't be empty.`,\n          name,\n          { hint }\n        );\n        return false;\n    }\n    return true;\n  });\n}\n\n/**\n * @param {string} orcid\n * @returns {boolean}\n */\nfunction checkOrcidChecksum(orcid) {\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcid[orcid.length - 1];\n  const remainder = orcid\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  return lastDigit === lastDigitShould;\n}\n","// @ts-check\nimport { getIntlData, showWarning } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\n\nconst name = \"dini/templates/headers\";\n\nconst ccLicense = \"https://creativecommons.org/licenses/by/4.0/legalcode\";\n\nconst localizationStrings = {\n  en: {\n    author: \"Author:\",\n    authors: \"Authors:\",\n    editor: \"Editor:\",\n    editors: \"Editors:\",\n    former_editor: \"Former editor:\",\n    former_editors: \"Former editors:\",\n    latest_editors_draft: \"Latest editor's draft:\",\n    latest_published_version: \"Latest published version:\",\n    this_version: \"This version:\",\n  },\n  ko: {\n    author: \"저자:\",\n    authors: \"저자:\",\n    editor: \"편집자:\",\n    editors: \"편집자:\",\n    former_editor: \"이전 편집자:\",\n    former_editors: \"이전 편집자:\",\n    latest_editors_draft: \"최신 편집 초안:\",\n    latest_published_version: \"최신 버전:\",\n    this_version: \"현재 버전:\",\n  },\n  zh: {\n    author: \"作者:\",\n    authors: \"作者:\",\n    editor: \"编辑:\",\n    editors: \"编辑:\",\n    former_editor: \"原编辑:\",\n    former_editors: \"原编辑:\",\n    latest_editors_draft: \"最新编辑草稿:\",\n    latest_published_version: \"最新发布版本:\",\n    this_version: \"本版本:\",\n  },\n  ja: {\n    author: \"著者:\",\n    authors: \"著者:\",\n    editor: \"編者:\",\n    editors: \"編者:\",\n    former_editor: \"以前の版の編者:\",\n    former_editors: \"以前の版の編者:\",\n    latest_editors_draft: \"最新の編集用草案:\",\n    latest_published_version: \"最新バージョン:\",\n    this_version: \"このバージョン:\",\n  },\n  nl: {\n    author: \"Auteur:\",\n    authors: \"Auteurs:\",\n    editor: \"Redacteur:\",\n    editors: \"Redacteurs:\",\n    latest_editors_draft: \"Laatste werkversie:\",\n    latest_published_version: \"Laatst gepubliceerde versie:\",\n    this_version: \"Deze versie:\",\n  },\n  es: {\n    author: \"Autor:\",\n    authors: \"Autores:\",\n    editor: \"Editor:\",\n    editors: \"Editores:\",\n    latest_editors_draft: \"Borrador de editor mas reciente:\",\n    latest_published_version: \"Versión publicada mas reciente:\",\n    this_version: \"Ésta versión:\",\n  },\n  de: {\n    author: \"Autor/in:\",\n    authors: \"Autor/innen:\",\n    editor: \"Redaktion:\",\n    editors: \"Redaktion:\",\n    former_editor: \"Frühere Mitwirkende:\",\n    former_editors: \"Frühere Mitwirkende:\",\n    latest_editors_draft: \"Letzter Entwurf:\",\n    latest_published_version: \"Letzte publizierte Fassung:\",\n    this_version: \"Diese Fassung:\",\n  },\n};\n\nexport const l10n = getIntlData(localizationStrings);\n\nfunction getSpecSubTitleElem(conf) {\n  let specSubTitleElem = document.querySelector(\"h2#subtitle\");\n\n  if (specSubTitleElem && specSubTitleElem.parentElement) {\n    specSubTitleElem.remove();\n    conf.subtitle = specSubTitleElem.textContent.trim();\n  } else if (conf.subtitle) {\n    specSubTitleElem = document.createElement(\"h2\");\n    specSubTitleElem.textContent = conf.subtitle;\n    specSubTitleElem.id = \"subtitle\";\n  }\n  if (specSubTitleElem) {\n    specSubTitleElem.classList.add(\"subtitle\");\n  }\n  return specSubTitleElem;\n}\n\nexport default conf => {\n  return html`<div class=\"head\">\n    ${conf.logos.map(showLogo)} ${document.querySelector(\"h1#title\")}\n    ${getSpecSubTitleElem(conf)}\n    <h2>\n      ${conf.textStatus}\n      <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n        >${conf.publishHumanDate}</time\n      >\n    </h2>\n    <dl>\n      <dt>${conf.multipleEditors ? l10n.editors : l10n.editor}</dt>\n      ${showPeople(conf, \"editors\")}\n      ${Array.isArray(conf.formerEditors) && conf.formerEditors.length > 0\n        ? html`\n            <dt>\n              ${conf.multipleFormerEditors\n                ? l10n.former_editors\n                : l10n.former_editor}\n            </dt>\n            ${showPeople(conf, \"formerEditors\")}\n          `\n        : \"\"}\n      ${conf.authors\n        ? html`\n            <dt>${conf.multipleAuthors ? l10n.authors : l10n.author}</dt>\n            ${showPeople(conf, \"authors\")}\n          `\n        : \"\"}\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </dl>\n    ${renderCopyright(conf)}\n    <hr />\n  </div>`;\n};\n\n/**\n * @param {string} text\n * @param {string} url\n * @param {string=} cssClass\n */\nfunction linkLicense(text, url, cssClass) {\n  return html`<a rel=\"license\" href=\"${url}\" class=\"${cssClass}\">${text}</a>`;\n}\n\nfunction renderCopyright(conf) {\n  // If there is already a copyright, let's relocate it.\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n    return existingCopyright;\n  }\n  if (conf.hasOwnProperty(\"overrideCopyright\")) {\n    const msg = \"The `overrideCopyright` configuration option is deprecated.\";\n    const hint = 'Please use `<p class=\"copyright\">` instead.';\n    showWarning(msg, name, { hint });\n  }\n  return conf.overrideCopyright\n    ? [conf.overrideCopyright]\n    : html`<p class=\"copyright\">\n        Dieses Dokument ist lizensiert unter\n        ${linkLicense(\n          \"Creative Commons Attribution 4.0 International Public License\",\n          ccLicense,\n          \"subfoot\"\n        )}.\n      </p>`;\n}\n","// @ts-check\n// Module dini/headers\n// Generate the headers material based on the provided configuration.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n//  - editors: an array of people editing the document (at least one is required). People\n//      are defined using:\n//          - name: the person's name (required)\n//          - url: URI for the person's home page\n//          - company: the person's company\n//          - companyURL: the URI for the person's company\n//          - mailto: the person's email\n//          - note: a note on the person (e.g. former editor)\n//  - authors: an array of people who are contributing authors of the document.\n//  - formerEditors: an array of people that had earlier edited the document but no longer edit.\n//  - subtitle: a subtitle for the specification\n//  - publishDate: the date to use for the publication, default to document.lastModified, and\n//      failing that to now. The format is YYYY-MM-DD or a Date object.\n//  - alternateFormats: a list of alternate formats for the document, each of which being\n//      defined by:\n//          - uri: the URI to the alternate\n//          - label: a label for the alternate\n//          - lang: optional language\n//          - type: optional MIME type\n//  - logos: a list of logos to use instead of the W3C logo, each of which being defined by:\n//          - src: the URI to the logo (target of <img src=>)\n//          - alt: alternate text for the image (<img alt=>), defaults to \"Logo\" or \"Logo 1\", \"Logo 2\", ...\n//            if src is not specified, this is the text of the \"logo\"\n//          - height: optional height of the logo (<img height=>)\n//          - width: optional width of the logo (<img width=>)\n//          - url: the URI to the organization represented by the logo (target of <a href=>)\n//          - id: optional id for the logo, permits custom CSS (wraps logo in <span id=>)\n//          - each logo element must specify either src or alt\n//  - otherLinks: an array of other links that you might want in the header (e.g., link github, twitter, etc).\n//         Example of usage: [{key: \"foo\", href:\"https://b\"}, {key: \"bar\", href:\"https://\"}].\n//         Allowed values are:\n//          - key: the key for the <dt> (e.g., \"Bug Tracker\"). Required.\n//          - value: The value that will appear in the <dd> (e.g., \"GitHub\"). Optional.\n//          - href: a URL for the value (e.g., \"https://foo.com/issues\"). Optional.\n//          - class: a string representing CSS classes. Optional.\n//  - license: can be one of the following\n//      - \"cc-by-sa\"\n//      - \"cc-by\"\n//      - \"cc0\"\nimport { ISODate, showError } from \"../core/utils.js\";\nimport headersTmpl from \"./templates/headers.js\";\nimport { pub } from \"../core/pubsubhub.js\";\n\nexport const name = \"dini/headers\";\n\nconst DINIDate = new Intl.DateTimeFormat([\"de-DE\"], {\n  timeZone: \"UTC\",\n  year: \"numeric\",\n  month: \"long\",\n  day: \"2-digit\",\n});\n\nconst status2text = {\n  unofficial: \"Entwurf vom\",\n  base: \"Spezifikation vom\",\n};\n\n/**\n * @param {*} conf\n * @param {string} prop\n * @param {string | number | Date} fallbackDate\n */\nfunction validateDateAndRecover(conf, prop, fallbackDate = new Date()) {\n  const date = conf[prop] ? new Date(conf[prop]) : new Date(fallbackDate);\n  // if date is valid\n  if (Number.isFinite(date.valueOf())) {\n    const formattedDate = ISODate.format(date);\n    return new Date(formattedDate);\n  }\n  const msg =\n    `[\\`${prop}\\`](https://github.com/speced/respec/wiki/${prop}) ` +\n    `is not a valid date: \"${conf[prop]}\". Expected format 'YYYY-MM-DD'.`;\n  showError(msg, name);\n  return new Date(ISODate.format(new Date()));\n}\n\nexport function run(conf) {\n  conf.isUnofficial = conf.specStatus === \"unofficial\";\n  conf.isBasic = conf.specStatus === \"base\";\n  if (!conf.specStatus) {\n    const msg = \"Missing required configuration: `specStatus`\";\n    showError(msg, name);\n  }\n  conf.title = document.title || \"Kein Titel\";\n  if (!conf.subtitle) conf.subtitle = \"\";\n  conf.publishDate = validateDateAndRecover(\n    conf,\n    \"publishDate\",\n    document.lastModified\n  );\n  conf.publishYear = conf.publishDate.getUTCFullYear();\n  conf.publishHumanDate = DINIDate.format(conf.publishDate);\n  const peopCheck = function (it) {\n    if (!it.name) {\n      const msg = \"All authors and editors must have a name.\";\n      showError(msg, name);\n    }\n    if (it.orcid) {\n      try {\n        it.orcid = normalizeOrcid(it.orcid);\n      } catch (e) {\n        const msg = `\"${it.orcid}\" is not an ORCID. ${e.message}`;\n        showError(msg, name);\n        // A failed orcid link could link to something outside of orcid,\n        // which would be misleading.\n        delete it.orcid;\n      }\n    }\n  };\n  if (!conf.formerEditors) conf.formerEditors = [];\n  if (conf.editors) {\n    conf.editors.forEach(peopCheck);\n    // Move any editors with retiredDate to formerEditors.\n    for (let i = 0; i < conf.editors.length; i++) {\n      const editor = conf.editors[i];\n      if (\"retiredDate\" in editor) {\n        conf.formerEditors.push(editor);\n        conf.editors.splice(i--, 1);\n      }\n    }\n  }\n  if (!conf.editors || conf.editors.length === 0) {\n    const msg = \"At least one editor is required\";\n    showError(msg, name);\n  }\n  if (conf.formerEditors.length) {\n    conf.formerEditors.forEach(peopCheck);\n  }\n  if (conf.authors) {\n    conf.authors.forEach(peopCheck);\n  }\n  conf.multipleEditors = conf.editors && conf.editors.length > 1;\n  conf.multipleFormerEditors = conf.formerEditors.length > 1;\n  conf.multipleAuthors = conf.authors && conf.authors.length > 1;\n  (conf.alternateFormats || []).forEach(it => {\n    if (!it.uri || !it.label) {\n      const msg = \"All alternate formats must have a uri and a label.\";\n      showError(msg, name);\n    }\n  });\n  if (conf.copyrightStart && conf.copyrightStart == conf.publishYear)\n    conf.copyrightStart = \"\";\n  conf.textStatus = status2text[conf.specStatus];\n  conf.dashDate = ISODate.format(conf.publishDate);\n  conf.publishISODate = conf.publishDate.toISOString();\n  // configuration done - yay!\n\n  // insert into document\n  const header = headersTmpl(conf);\n  document.body.prepend(header);\n  document.body.classList.add(\"h-entry\");\n\n  // Requested by https://github.com/speced/respec/issues/504\n  // Makes a record of a few auto-generated things.\n  pub(\"amend-user-config\", {\n    publishISODate: conf.publishISODate,\n    generatedSubtitle: `${conf.longStatus} ${conf.publishHumanDate}`,\n  });\n}\n\n/**\n * @param {string} orcid Either an ORCID URL or just the 16-digit ID which comes after the /\n * @return {string} the full ORCID URL. Throws an error if the ID is invalid.\n */\nfunction normalizeOrcid(orcid) {\n  const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n  if (orcidUrl.origin !== \"https://orcid.org\") {\n    throw new Error(\n      `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`\n    );\n  }\n\n  // trailing slash would mess up checksum\n  const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n  if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n    throw new Error(\n      `ORCIDs have the format \"1234-1234-1234-1234\", not \"${orcidId}\"`\n    );\n  }\n\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcidId[orcidId.length - 1];\n  const remainder = orcidId\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  if (lastDigit !== lastDigitShould) {\n    throw new Error(`\"${orcidId}\" has an invalid checksum.`);\n  }\n\n  return orcidUrl.href;\n}\n","// @ts-check\n// Module dini/abstract\n// Handle the abstract section properly.\nimport { getIntlData, showError } from \"../core/utils.js\";\nexport const name = \"dini/abstract\";\n\nconst localizationStrings = {\n  en: {\n    abstract: \"Abstract\",\n  },\n  ko: {\n    abstract: \"요약\",\n  },\n  zh: {\n    abstract: \"摘要\",\n  },\n  ja: {\n    abstract: \"要約\",\n  },\n  nl: {\n    abstract: \"Samenvatting\",\n  },\n  es: {\n    abstract: \"Resumen\",\n  },\n  de: {\n    abstract: \"Zusammenfassung\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport async function run() {\n  const abs = document.getElementById(\"abstract\");\n  if (!abs) {\n    const msg = `Document must have one element with \\`id=\"abstract\"`;\n    showError(msg, name);\n    return;\n  }\n  abs.classList.add(\"introductory\");\n  let abstractHeading = document.querySelector(\"#abstract>h2\");\n  if (abstractHeading) {\n    return;\n  }\n  abstractHeading = document.createElement(\"h2\");\n  abstractHeading.textContent = l10n.abstract;\n  abs.prepend(abstractHeading);\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// 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 or a `a`, 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,a\");\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 dini/conformance\n// Handle the conformance section properly.\nimport { getIntlData, htmlJoinAnd, 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\";\nexport const name = \"dini/conformance\";\n\nconst localizationStrings = {\n  en: {\n    conformance: \"Conformance\",\n    normativity:\n      \"As well as sections marked as non-normative, all authoring guidelines, \" +\n      \"diagrams, examples, and notes in this specification are non-normative. \" +\n      \"Everything else in this specification is normative.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        The key word${plural ? \"s\" : \"\"} ${keywords} in this document\n        ${plural ? \"are\" : \"is\"} to be interpreted as described in\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        when, and only when, they appear in all capitals, as shown here.\n      </p>`;\n    },\n  },\n  de: {\n    conformance: \"Anforderungen\",\n    normativity:\n      \"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten \" +\n      \"sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument \" +\n      \"nicht normativ. Alle anderen Angaben sind normativ.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        ${plural ? \"Die Schlüsselwörter\" : \"Das Schlüsselwort\"} ${keywords} in\n        diesem Dokument ${plural ? \"sind\" : \"ist\"} gemäß\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        und unter Berücksichtigung von\n        <a href=\"https://github.com/adfinis-sygroup/2119/blob/master/2119de.rst\"\n          >2119de</a\n        >\n        zu interpretieren, wenn und nur wenn ${plural ? \"sie\" : \"es\"} wie hier\n        gezeigt durchgehend groß geschrieben wurde${plural ? \"n\" : \"\"}.\n      </p>`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  const terms = [...Object.keys(rfc2119Usage)];\n  // Add RFC2119 to bibliography\n  if (terms.length) {\n    conf.normativeReferences.add(\"RFC2119\");\n    conf.normativeReferences.add(\"RFC8174\");\n  }\n  // Put in the 2119 clause and reference\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n  const content = html`\n    <h1>${l10n.conformance}</h1>\n    <p>${l10n.normativity}</p>\n    ${terms.length ? l10n.keywordInterpretation(keywords, plural) : null}\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run(conf) {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance && !conformance.classList.contains(\"override\")) {\n    processConformance(conformance, conf);\n  }\n  // Warn when there are RFC2119/RFC8174 keywords, but not conformance section\n  if (!conformance && Object.keys(rfc2119Usage).length) {\n    const msg = `Document uses RFC2119 keywords but lacks a conformance section.`;\n    const hint = 'Please add a `<section id=\"conformance\">`.';\n    showWarning(msg, name, { hint });\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\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 * 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\n// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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\">↑</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","// @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 { 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\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/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","/*\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\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","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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","// @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\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","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\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 \"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 \"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"],"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","dateLang","docLang","startsWith","W3CDate","nonNormativeSelector","createResourceHint","URL","baseURI","linkElem","rel","hint","corsMode","crossOrigin","as","dontRemove","classList","removeReSpec","doc","elem","joinFactory","formatter","ListFormat","mapper","elemCount","formatToParts","conjunction","disjunction","joinAnd","norm","getIntlData","localizationStrings","data","getIntlDataForKey","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","codedJoinOr","quotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","head","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$h","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","substituteWithTextNodes","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$p","style$1","dataInclude","abstract","dataTransform","dataAbbr","inlines","conformance","examples","issuesNotes","bestPractices","figures","biblio$1","linkToDfn","dataCite","renderBiblio","contrib","sections","fixHeaders","structure","informative","idHeaders","saveHtml","aboutRespec","seo","highlight","listSorter","highlightVars$1","dataType","algorithms","anchorExpander","dfnPanel","dfnContract","checkCharset","checkPunctuation","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","noHttpProps","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","licenses","short","diniDefaults","isED","isNoTrack","isPR","logos","prependW3C","doJsonLd","license","shortName","showPreviousVersion","licenseInfo","computeProps","css$f","noReSpecCSS","resourceHints","createResourceHints","createBaseStyle","meta","delimiter","separator","toKeyValuePairs","width","createMetaViewport","styleFile","noToc","attachFixupScript","finalStyleURL","linkURL","urls","frag","reduce","nextLink","linkCSS","exportDoc","w3cStyle","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","default_title","zh","h1Elem","isConnected","tempElem","documentTitle","isPreview","prNumber","prUrl","github","repoURL","setDocumentTitle","showLink","class","showLinkData","showLogo","logo","alt","height","until","date","es","ko","ja","orcidIcon","showPeople","propName","people","validatePerson","person","docsUrl","seePersonHint","preamble","orcid","orcidUrl","orcidId","pathname","lastDigit","remainder","Number","acc","lastDigitInt","lastDigitShould","checkOrcidChecksum","retiredDate","rawDate","Date","extras","every","extra","validateExtras","mailto","companyURL","company","personToHTML","personName","editorId","w3cid","contents","protocol","hCard","companyElem","note","classVal","renderExtra","time","ccLicense","author","authors","editor","editors","former_editor","former_editors","latest_editors_draft","latest_published_version","this_version","nl","headersTmpl","specSubTitleElem","subtitle","getSpecSubTitleElem","textStatus","dashDate","publishHumanDate","multipleEditors","formerEditors","multipleFormerEditors","multipleAuthors","otherLinks","existingCopyright","overrideCopyright","cssClass","renderCopyright","DINIDate","status2text","unofficial","base","isUnofficial","isBasic","publishDate","fallbackDate","isFinite","formattedDate","validateDateAndRecover","lastModified","publishYear","getUTCFullYear","peopCheck","normalizeOrcid","alternateFormats","uri","copyrightStart","publishISODate","toISOString","generatedSubtitle","longStatus","abs","abstractHeading","processDfnElement","abbr","fullForm","insertAdjacentHTML","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","flatMap","isInDB","put","close","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","forceUpdate","refsToFetch","onLine","ok","status","json","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","etAl","publisher","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","normativity","keywordInterpretation","processConformance","terms","contains","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$d","makeTitle","num","report","number","div","inAside","exampleTitle","css$b","editors_note","feature_at_risk","issue","issue_summary","no_issues_in_spec","handleIssues","ins","ghIssues","getIssueNumber","issueNumber","createIssueNumberGetter","issueList","inno","displayType","isFeatureAtRisk","isIssue","isEdNote","getIssueType","isInline","dataNum","titleParent","ghIssue","issueBase","atRiskBase","linkToIssueTracker","l10nIssue","issueNumberText","createIssueSummaryEntry","labels","labelsGroup","color","bgColor","issuesURL","searchParams","bg","textColorFromBgColor","ariaLabel","createLabel","createLabelsGroup","bodyHTML","issueSummaryElement","hasChildNodes","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","apiBase","issueNumbers","fullName","issues","fetchAndStoreGithubIssues","headElem","ednote","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","decorateTableOfFigures","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","linkTargets","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","first","isCode","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","xref","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","res","maxAge","Request","cache","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","cacheResponse","Response","blob","fetchAndCache","showContributors","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","default","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","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","outputDoc","css$5","varMap","variables","currentSection","css$3","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","file_a_bug","participate","commit_history","props","to","connectedCallback","fetchCommits","commits","commit","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","isRecTrack","saysPrivOrSec","saysConsiderations","offendingMembers","getOwnPropertyNames"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IACHC,OAAOC,QAAQG,QAAQS,GAAQC,EAEnC,CCtBO,MAIDC,EAAgB,IAAIC,YAOnB,SAASC,EAAIC,EAAOC,GAEzB,GADAJ,EAAcK,cAAc,IAAIC,YAAYH,EAAO,CAAEC,YACjDnB,OAAOsB,SAAWtB,OAAOuB,KAC3B,OAGF,MAAMC,EAAOC,OAAOC,KAAKC,UAAUR,GAAQS,OAAST,IACpDnB,OAAOsB,OAAOO,YAAY,CAAEX,QAAOM,QAAQxB,OAAOsB,OAAOQ,SAASC,OACpE,CAWO,SAASC,EAAId,EAAOe,EAAIC,EAAU,CAAEC,MAAM,IAE/CpB,EAAcqB,iBAAiBlB,GADdmB,GAAKJ,EAAGI,EAAElB,SACqBe,EAClD,CAEAtB,EAnCoB,iBAmCP,CAAEoB,QCpCf,MAAMM,EAAa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AC,8FAA+F,QAChG,CAAC,0BAA2B,OAC5B,CAAC,+BAAgC,QACjC,CAAC,sBAAuB,QACxB,CAAC,oBAAqB,UACtB,CAAC,eAAgB,MACjB,CAAC,YAAa,MACd,CAAC,QAAS,QACVtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU4B,gBAAgBpB,EAAK,GAAIA,EAAK,GACpD,IAKG,CAEE,YACA,SACA,SACA,MACA,WACA,UACA,OACA,YACA,QACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,UACA,QACA,WACA,MACA,WACA,cACA,QACA,SACA,WACA,YACA,MACA,SACA,YACA,YACA,YACA,WACA,WACA,MACA,UACA,UACA,WACA,WACA,eACA,SACA,SACA,YACA,WACA,YACA,cACA,QACA,UACA,QACA,SACA,aACA,YACA,WACA,OACA,QACA,OACA,QACA,QACA,MACA,QACA,OACA,OACA,YACA,OACA,WACA,SACA,SACA,YACA,WACA,OACA,WACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,iBACA,QACA,OACA,SACA,UACA,UACA,aACA,WACA,MACA,eAEA,gBACA,SACA,SACA,YACA,WACA,QACA,WACAtH,QAAQ8G,EAAU6B,oBAEb7B,CACV,IAGA,IACIA,GAAyBR,GADNK,GAAYC,SCjgBGkC,GAAU,SAASC,GAAgB,IAAI/P,EAAE,CAAE,EAAC,IAAIA,EAAE9N,QAAQA,OAAO,CAAC,MAAMlB,GAAGgP,EAAE9N,QAAQ,SAAS8N,EAAEhP,GAAG,IAAIqJ,EAAErJ,EAAEgf,eAAeC,EAAEjf,EAAEyc,eAAexR,EAAEiU,EAAE5c,UAAU,OAAO2I,EAAElF,OAAO,SAAS/F,GAAG,OAAO6C,KAAKZ,IAAIjC,WAAWA,EAAE6C,KAAKuG,EAAE,EAAE6B,EAAE3J,IAAI,SAAStB,GAAG,OAAO6C,KAAKZ,IAAIjC,GAAGA,EAAE6C,KAAKuG,QAAG,CAAM,EAAE6B,EA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BAAuBpsD,KAAK2E,GAC5C0nD,EAAqB,qBAAqBrsD,KAAK2E,GACrD,OAAQynD,GAAiBC,GAAuBD,CAAa,MAW/DljC,GAAYlwB,GAAKyb,IAAKzd,GAAM,CAAEswB,KAAMtuB,GAAKsuB,MAE7C,ICnCA,MACatwB,GAAO,kCAYdgC,GAAOyvB,GAVe,CAC1BvvB,GAAI,CACFub,IAAKoZ,EAAO,oCAAoC,oBAChDvG,KAAM,0DAER2X,GAAI,CACFxqB,IAAKoZ,EAAO,GAAG,kCACfvG,KAAM,0EAKH,SAAaiM,GAClB,IAAKA,EAAKkH,OAhBK,iBAiBb,OAKF,IAAKhjC,OAAOQ,SAAS0K,KAAKmkB,WAAW,QACnC,OAGF,MAAMwlC,EAAmB/+C,OAAOg/C,oBAAoBh5B,GAEjD3qB,QAAOqd,GAAQA,EAAI+H,SAAS,QAAUuF,EAAKtN,IAAiB,WAARA,IAEpDrd,QAAOqd,GACN,IAAIiB,IAAIqM,EAAKtN,GAAMxuB,OAAOQ,SAAS0K,MAAMA,KAAKmkB,WAAW,aAG7D,GAAIwlC,EAAiB3oD,OAAQ,CAC3B,MAAMmL,EAAOyZ,GAAQ+jC,GAAkBrmC,GAAO4H,EAAO,GAAG,IAAI5H,SAC5DiD,GAAYlwB,GAAKyb,IAAKzd,GAAM,CAAEswB,KAAMtuB,GAAKsuB,KAAOxY,GACjD,CACH","x_google_ignoreList":[4,5,6,8]}
      \ No newline at end of file
      diff --git a/builds/respec-geonovum.js b/builds/respec-geonovum.js
      index c4bb464e37..9c99a41a2b 100644
      --- a/builds/respec-geonovum.js
      +++ b/builds/respec-geonovum.js
      @@ -1,4 +1,4 @@
      -window.respecVersion="35.1.1",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function o(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:s});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return k(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function w(e){b=e(b)}function y(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(x(this),t),k(this.request)}:function(...t){return k(e.apply(x(this),t))}}function v(e){return"function"==typeof e?y(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function k(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(k(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const x=e=>g.get(e);const $=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],E=new Map;function S(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(E.get(t))return E.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!$.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return E.set(t,s),s}w((e=>({...e,get:(t,n,r)=>S(t,n)||e.get(t,n,r),has:(t,n)=>!!S(t,n)||e.has(t,n)})));const C=["continue","continuePrimaryKey","advance"],L={},A=new WeakMap,T=new WeakMap,R={get(e,t){if(!C.includes(t))return e[t];let n=L[t];return n||(n=L[t]=function(...e){A.set(this,T.get(this)[t](...e))}),n}};async function*N(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(T.set(n,t),g.set(n,x(t));t;)yield n,t=await(A.get(n)||t.continue()),A.delete(n)}function j(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}w((e=>({...e,get:(t,n,r)=>j(t,n)?N:e.get(t,n,r),has:(t,n)=>j(t,n)||e.has(t,n)})));var P=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),k(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=k(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(k(i.result),e.oldVersion,e.newVersion,k(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:x,wrap:k});const I=/^[!#$%&'*+-.^`|~\w]+$/,O=/[\u000A\u000D\u0009\u0020]/u,z=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function D(e,t,n){(t&&""!==t&&!e.has(t)&&z.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function q(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let M={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function B(e){M=e}const F=/[&<>"']/,W=new RegExp(F.source,"g"),H=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,U=new RegExp(H.source,"g"),G={"&":"&","<":"<",">":">",'"':""","'":"'"},V=e=>G[e];function Z(e,t){if(t){if(F.test(e))return e.replace(W,V)}else if(H.test(e))return e.replace(U,V);return e}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Q(e){return e.replace(K,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const J=/(^|[^\[])\^/g;function X(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(J,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function Y(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ee={exec:()=>null};function te(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function ne(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){const s=e.charAt(r-o-1);if(s!==t||n){if(s===t||!n)break;o++}else o++}return e.slice(0,r-o)}function re(e,t,n,r){const o=t.href,s=t.title?Z(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:s,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:s,text:Z(i)}}class oe{options;rules;lexer;constructor(e){this.options=e||M}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ne(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=ne(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=te(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(te(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Z(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=ne(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),re(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return re(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Z(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Z(t[1]),n="mailto:"+e):(e=Z(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=Z(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=Z(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Z(t[0]),{type:"text",raw:t[0],text:e}}}}const se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ie=/(?:[*+-]|\d{1,9}[.)])/,ae=X(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ie).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ce=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,le=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ue=X(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",le).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),de=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ie).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,he=X("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",fe).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ge={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",me).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ue,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:se,html:he,lheading:ae,list:de,newline:/^(?: *(?:\n|$))+/,paragraph:me,table:ee,text:/^[^\n]+/},be=X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),we={...ge,table:be,paragraph:X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},ye={...ge,html:X("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(ce).replace("hr",se).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ke=/^( {2,}|\\)\n(?!\s*$)/,xe="\\p{P}\\p{S}",$e=X(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,xe).getRegex(),_e=X(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,xe).getRegex(),Ee=X("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,xe).getRegex(),Se=X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,xe).getRegex(),Ce=X(/\\([punct])/,"gu").replace(/punct/g,xe).getRegex(),Le=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Ae=X(fe).replace("(?:--\x3e|$)","--\x3e").getRegex(),Te=X("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ae).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Re=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne=X(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Re).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),je=X(/^!?\[(label)\]\[(ref)\]/).replace("label",Re).replace("ref",le).getRegex(),Pe=X(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex(),Ie={_backpedal:ee,anyPunctuation:Ce,autolink:Le,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:ke,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ee,emStrongLDelim:_e,emStrongRDelimAst:Ee,emStrongRDelimUnd:Se,escape:ve,link:Ne,nolink:Pe,punctuation:$e,reflink:je,reflinkSearch:X("reflink|nolink(?!\\()","g").replace("reflink",je).replace("nolink",Pe).getRegex(),tag:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ee},Oe={...Ie,link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",Re).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Re).getRegex()},ze={...Ie,escape:X(ve).replace("])","~|])").getRegex(),url:X(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},De={...ze,br:X(ke).replace("{2,}","*").getRegex(),text:X(ze.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qe={normal:ge,gfm:we,pedantic:ye},Me={normal:Ie,gfm:ze,breaks:De,pedantic:Oe};class Be{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qe.normal,inline:Me.normal};this.options.pedantic?(t.block=qe.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=qe.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:qe,inline:Me}}static lex(e,t){return new Be(t).lex(e)}static lexInline(e,t){return new Be(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,o,s;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+"    ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Fe{options;constructor(e){this.options=e||M}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+Z(r)+'">'+(n?e:Z(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Z(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=Y(e);if(null===r)return n;let o='<a href="'+(e=r)+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>",o}image(e,t,n){const r=Y(e);if(null===r)return n;let o=`<img src="${e=r}" alt="${n}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return e}}class We{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class He{options;renderer;textRenderer;constructor(e){this.options=e||M,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new We}static parse(e,t){return new He(t).parse(e)}static parseInline(e,t){return new He(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(o.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=o;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,Q(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=o;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=o;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let s="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});s+=this.renderer.tablerow(r)}n+=this.renderer.table(t,s);continue}case"blockquote":{const e=o,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=o,t=e.ordered,r=e.start,s=e.loose;let i="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,o=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);s?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],i+="\n"+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(i):i;continue}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=e||"";continue}}switch(o.type){case"escape":{const e=o;n+=t.text(e.text);break}case"html":{const e=o;n+=t.html(e.text);break}case"link":{const e=o;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=o;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=o;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=o;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=o;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=o;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=o;n+=t.text(e.text);break}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class Ue{options;constructor(e){this.options=e||M}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const Ge=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Be.lex,He.parse);parseInline=this.#e(Be.lexInline,He.parseInline);Parser=He;Renderer=Fe;TextRenderer=We;Lexer=Be;Tokenizer=oe;Hooks=Ue;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Fe(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new oe(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];Ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Be.lex(e,t??this.defaults)}parser(e,t){return He.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Z(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ve(e,t){return Ge.parse(e,t)}Ve.options=Ve.setOptions=function(e){return Ge.setOptions(e),Ve.defaults=Ge.defaults,B(Ve.defaults),Ve},Ve.getDefaults=q,Ve.defaults=M,Ve.use=function(...e){return Ge.use(...e),Ve.defaults=Ge.defaults,B(Ve.defaults),Ve},Ve.walkTokens=function(e,t){return Ge.walkTokens(e,t)},Ve.parseInline=Ge.parseInline,Ve.Parser=He,Ve.parser=He.parse,Ve.Renderer=Fe,Ve.TextRenderer=We,Ve.Lexer=Be,Ve.lexer=Be.lex,Ve.Tokenizer=oe,Ve.Hooks=Ue,Ve.parse=Ve,Ve.options,Ve.setOptions,Ve.use,Ve.walkTokens,Ve.parseInline,He.parse,Be.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke,Qe={exports:{}};Ke=Qe,function(e,t){Ke.exports=t()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var o,s,a=(o=t[1],s=arguments,o.replace(/\$(\d{1,2})/g,(function(e,t){return s[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return a(t,s)}return t}function l(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):c(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&c(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(o,r,e),d.isPlural=u(o,r,e),d.singular=l(r,o,t),d.isSingular=u(r,o,t),d.addPluralRule=function(t,n){e.push([s(t),n])},d.addSingularRule=function(e,n){t.push([s(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var Je=Ze(Qe.exports),Xe=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){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._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r<o;){var c,l=e(n[r],1);t.insertBefore(l,s),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function s(e,t){return e==t}function i(e){return e}function a(e,t,n,r,o,s,i){var a=s-o;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=o;c<n&&l<s&&i(e[c],r[l]);)c++,l++;if(l===s)return t;t=c+1}return-1}function c(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,o=t;r<o;){var s=(r+o)/2>>>0;n<e[s]?o=s:r=1+s}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,w=0;g<m&&w<b&&u(t[g],n[w]);)g++,w++;for(;g<m&&w<b&&u(t[m-1],n[b-1]);)m--,b--;var y=g===m,v=w===b;if(y&&v)return n;if(y&&w<b)return o(d,e,n,w,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var k=m-g,x=b-w,$=-1;if(k<x){if(-1<($=a(n,w,b,t,g,m,u)))return o(d,e,n,w,$,d(t[g],0)),o(d,e,n,$+k,b,c(d,t,m,h,f)),n}else if(x<k&&-1<($=a(t,g,m,n,w,b,u)))return l(d,t,g,$),l(d,t,$+x,m),n;return k<2||x<2?(o(d,e,n,w,b,d(t[g],0)),l(d,t,g,m)):k==x&&function(e,t,n,r,o,s){for(;r<o&&s(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?o(d,e,n,w,b,c(d,t,m,h,f)):function(e,t,n,r,s,i,a,c,u,d,f,h,m){!function(e,t,n,r,s,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:s++,f++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,c,l,u,d,p,f=n+s,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<s&&c<n&&i(r[o+l],e[t+c]);)l++,c++;if(l===s&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[o+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,o,s,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=o.slice(s,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+s))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var w=Array(l),y=u[c];for(--n;y;){for(var v=y.newi,k=y.oldi;v<n;)w[--l]=1,--n;for(;k<i;)w[--l]=-1,--i;w[--l]=0,--n,--i,y=y.prev}for(;t<=n;)w[--l]=1,--n;for(;s<=i;)w[--l]=-1,--i;return w}(n,r,s,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,w,b,x,t,g,m,k,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,w={};try{w.Map=Map}catch(u){w.Map=function(){var e=0,t=[],n=[];return{delete:function(o){var s=r(o);return s&&(t.splice(e,1),n.splice(e,1)),s},forEach:function(e,r){t.forEach((function(t,o){e.call(r,n[o],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(o,s){return n[r(o)?e:t.push(o)-1]=s,this}};function r(n){return-1<(e=t.indexOf(n))}}}var y=w.Map;function v(){return this}function k(e,t){var n="_"+e+"$";return{get:function(){return this[n]||x(this,n,t.call(this,e))},set:function(e){x(this,n,e)}}}var x=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(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,_,E,S,C,L,A={},T={},R=[],N=T.hasOwnProperty,j=0,P={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(j=R.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<j;n++){var r=R[n];if(N.call(e,r))return T[r](e[r],t)}}},I=Array.isArray||(_=($={}.toString).call([]),function(e){return $.call(e)===_}),O=(E=e,S="fragment",L="content"in D(C="template")?function(e){var t=D(C);return t.innerHTML=e,t.content}:function(e){var t,n=D(S),r=D(C);return z(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=D(S),n=D("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",z(t,n.firstChild.childNodes),t}:L)(e)});function z(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function D(e){return e===S?E.createDocumentFragment():E.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,M,B,F,W,H,U,G,V,Z=(M="appendChild",B="cloneNode",F="createTextNode",H=(W="importNode")in(q=e),(U=q.createDocumentFragment())[M](q[F]("g")),U[M](q[F]("")),(H?q[W](U,!0):U[B](!0)).childNodes.length<2?function e(t,n){for(var r=t[B](),o=t.childNodes||[],s=o.length,i=0;n&&i<s;i++)r[M](e(o[i],n));return r}:H?q[W]:function(e,t){return e[B](!!t)}),K="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},Q="-"+Math.random().toFixed(6)+"%",J=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+Q+'"></p>',G.content.childNodes[0].getAttribute(V)==Q)||(Q="_dt: "+Q.slice(1,-1)+";",J=!0)}catch(u){}var X="\x3c!--"+Q+"--\x3e",Y=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,oe=" \\f\\n\\r\\t",se="[^"+oe+"\\/>\"'=]+",ie="["+oe+"]+"+se,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+Q+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=J?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 ge(t,n,r,o){for(var s=t.childNodes,i=s.length,a=0;a<i;){var c=s[a];switch(c.nodeType){case ee:var l=o.concat(a);!function(t,n,r,o){for(var s,i=t.attributes,a=[],c=[],l=me(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===Q;if(f||1<(s=p.value.split(X)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(be(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(be(g,o,m,s))}}c.push(p)}}for(var w=((d=0)<(u=c.length)&&J&&!("ownerSVGElement"in t));d<u;){var y=c[d++];w&&(y.value=""),t.removeAttribute(y.name)}var v=t.nodeName;if(/^script$/i.test(v)){var k=e.createElement(v);for(u=i.length,d=0;d<u;)k.setAttributeNode(i[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(c,n,r,l),ge(c,n,r,l);break;case Y:var u=c.textContent;if(u===Q)r.shift(),n.push(ne.test(t.nodeName)?we(t,o):{type:"any",node:c,path:o.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,i--}break;case te:ne.test(t.nodeName)&&K.call(c.textContent)===X&&(r.shift(),n.push(we(t,o)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function we(e,t){return{type:"text",node:e,path:t}}var ye,ve=(ye=new n,{get:function(e){return ye.get(e)},set:function(e,t){return ye.set(e,t),t}});function ke(e,t){var n=(e.convert||function(e){return e.join(X).replace(ue,he).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var o=O(n,e.type);$e(o);var s=[];return ge(o,s,t.slice(0),[]),{content:o,updates:function(n){for(var r=[],o=s.length,i=0,a=0;i<o;){var c=s[i++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return o+=a,function(){var e=arguments.length;if(o!==e-1)throw new Error(e-1+" values instead of "+o+"\n"+t.join("${value}"));for(var s=1,i=1;s<e;){var a=r[s-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[s++]+c[u++];a.fn(l)}else a.fn(arguments[s++])}return n}}}}var xe=[];function $e(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===K.call(r.textContent).length&&e.removeChild(r)}}var _e,Ee,Se=(_e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Ee=/([^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),Le(n,!0)}(e,t):Le(e.style,!1)});function Ce(e,t,n){return t+"-"+n.toLowerCase()}function Le(e,t){var n,r;return function(o){var s,i,a,c;switch(typeof o){case"object":if(o){if("object"===n){if(!t&&r!==o)for(i in r)i in o||(e[i]="")}else t?e.value="":e.cssText="";for(i in s=t?{}:e,o)a="number"!=typeof(c=o[i])||_e.test(i)?c:c+"px",!t&&/^--/.test(i)?s.setProperty(i,a):s[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Ee,Ce),":",e[t],";");return n.join("")}(r=s):r=o;break}default:r!=o&&(n="string",r=o,t?e.value=o||"":e.cssText=o||"")}}}var Ae,Te,Re=(Ae=[].slice,(Te=Ne.prototype).ELEMENT_NODE=1,Te.nodeType=111,Te.remove=function(e){var t,n=this.childNodes,r=this.firstChild,o=this.lastChild;return this._=null,e&&2===n.length?o.parentNode.removeChild(o):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(o),t.deleteContents()),r},Te.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,o=0,s=r.length;o<s;o++)t.appendChild(r[o]);return t},Ne);function Ne(e){var t=this.childNodes=Ae.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function je(e){return{html:e}}function Pe(e,t){switch(e.nodeType){case He:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case We:return Pe(e.render(),t);default:return e}}function Ie(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(je).then(t):Promise.resolve(P.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var ze,De,qe,Me,Be,Fe="ownerSVGElement",We=v.prototype.nodeType,He=Re.prototype.nodeType,Ue=(De=(ze={Event:b,WeakSet:u}).Event,qe=ze.WeakSet,Me=!0,Be=null,function(e){return Me&&(Me=!Me,Be=new qe,function(e){var t=new qe,n=new qe;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,o=[],s=function(e){o.push(e),clearTimeout(r),r=setTimeout((function(){i(o.splice(r=0,o.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){s({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){s({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,o=e.length,s=0;s<o;s++)a((r=e[s]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var o,s=new De(t),i=e.length,a=0;a<i;1===(o=e[a++]).nodeType&&function e(t,n,r,o,s){Be.has(t)&&!o.has(t)&&(s.delete(t),o.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,o,s));}(o,s,t,n,r));}}(e.ownerDocument)),Be.add(e),e}),Ge=/^(?:form|list)$/i,Ve=[].slice;function Ze(t){return this.type=t,function(t){var n=xe,r=$e;return function(o){var s,i,a;return n!==o&&(s=t,i=n=o,a=ve.get(i)||ve.set(i,ke(s,i)),r=a.updates(Z.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ke=!(Ze.prototype={attribute:function(e,t,n){var r,o=Fe in e;if("style"===t)return Se(e,n,o);if("."===t.slice(0,1))return l=e,u=t.slice(1),o?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?Ue(e):t.toLowerCase()in e&&(s=s.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(s,r,!1),(r=t)&&e.addEventListener(s,t,!1))}}if("data"===t||!o&&t in e&&!Ge.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in P.attributes)return function(n){var o=P.attributes[t](e,n);r!==o&&(null==(r=o)?e.removeAttribute(t):e.setAttribute(t,o))};var i,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:Pe,before:e},o=Fe in e?"svg":"html",s=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":s?n!==a&&(n=a,t[0].textContent=a):(s=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=h(e.parentNode,t,[],r);break}default:if(s=!1,I(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(I(a[0])&&(a=a.concat.apply([],a)),Oe(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Oe(a)?a.then(i):"placeholder"in a?Ie(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,Ve.call(O([].concat(a.html).join(""),o).childNodes),r):i("length"in a?Ve.call(a):P.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var o;t!==r&&("object"==(o=typeof(t=r))&&r?Oe(r)?r.then(n):"placeholder"in r?Ie(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):P.invoke(r,n)):"function"==o?n(r(e)):e.textContent=null==r?"":r)}}}),Qe=function(t){var r,o,s,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(o={},s=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return o[t]||(o[t]=e)},Qe=c?s:(i=new n,function(e){return i.get(e)||(n=s(t=e),i.set(t,n),n);var t,n})):Ke=!0,Je(t)};function Je(e){return Ke?e:Qe(e)}function Xe(e){for(var t=arguments.length,n=[Je(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Ye=new n,et=function(e){var t,n,r;return function(){var o=Xe.apply(null,arguments);return r!==o[0]?(r=o[0],n=new Ze(e),t=nt(n.apply(n,o))):n.apply(n,o),t}},tt=function(e,t){var n=t.indexOf(":"),r=Ye.get(e),o=t;return-1<n&&(o=t.slice(n+1),t=t.slice(0,n)||"html"),r||Ye.set(e,r={}),r[o]||(r[o]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Re(t):e},rt=new n;function ot(){var e=rt.get(this),t=Xe.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ze(Fe in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var st,it,at,ct,lt=P.define,ut=Ze.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return ot.bind(e)},dt.define=lt,dt.diff=h,(dt.hyper=dt).observe=Ue,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},st=et,it=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,c=t.get(e)||ct(e,t);switch(typeof o){case"object":case"function":var l=c.w||(c.w=new n);return l.get(o)||(s=l,i=o,a=new e(r),s.set(i,a),a);default:var u=c.p||(c.p=at(null));return u[o]||(u[o]=new e(r))}}(this,it.get(e)||(r=e,o=new y,it.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:k("html",st),svg:k("svg",st),state:k("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(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 o in r)n[o]=r[o];return!1!==t&&this.render(),this}}}),dt}(document);const Ye=Xe,et=P,tt=Ve,nt=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",o=null,s=new Map,i="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(i){case"type":if("/"===c){i="subtype";continue}t+=c;break;case"subtype":if(";"===c){i="param-start";continue}n+=c;break;case"param-start":if(O.test(c)||";"===c)continue;r+=c,i="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){i="param-value",o=null;continue}s.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){i="collect-quoted-string";continue}if(";"===c){o=o.trimEnd(),i="param-start",D(s,r,o),r="";continue}o="string"==typeof o?o+c:c;break;case"collect-quoted-string":if('"'===c){D(s,r,o),i="ignore-input-until-next-param",r="",o=null;continue}if("\\"===c)continue;o="string"==typeof o?o+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&D(s,r,o);if(""===t.trim()||!I.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!I.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(s.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?I.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},rt=Je,ot=/-/g,st=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"});"en"===l||l.startsWith("en-");const it=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function at(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function ct(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function lt(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:o})=>"element"===n&&t?t(o,r++,e):o))}}const ut=lt("conjunction"),dt=lt("disjunction");function pt(e,t){return ut(e,t).join("")}function ft(e){return e.trim().replace(/\s+/g," ")}function ht(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function mt(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){Rt(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}function gt(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>Ye`${e}, `));return Ye`${r}${n[n.length-1]}`}function bt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o=`x${o}`):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function wt(e){const t=new Set,n="ltNodefault"in e.dataset?"":ft(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>ft(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(ft(e))))}return[...t]}function yt(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function vt(e,t){const n=t.closest(it);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function kt(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function xt(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function $t(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class _t extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function Et(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{yt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),St(t),t}function St(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Ct(t)])e.remove()}function*Ct(e){for(;e.nextNode();)yield e.currentNode}class Lt extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class At extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||bt(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:o,elements:s,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:o,elements:s,title:i,details:a,stack:n}}}function Tt(e,t,n={}){const r={...n,isWarning:!1};o("error",new At(e,t,r))}function Rt(e,t,n={}){const r={...n,isWarning:!0};o("warn",new At(e,t,r))}function Nt(e){return{showError:(t,n)=>Tt(t,e,n),showWarning:(t,n)=>Rt(t,e,n)}}function jt(e){return e?`\`${e}\``:""}function Pt(e,{quotes:t}={quotes:!1}){return dt(e,t?e=>jt(It(e)):jt).join("")}function It(e){return String(e)?`"${e}"`:""}function Ot(e,...t){return zt(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[o,s]=r.slice(1,-1).split("|");if(s){return`${e}[${o}](${new URL(s,"https://respec.org/docs/")})`}return`${e}[\`${o}\`](https://respec.org/docs/#${o})`})).join(""))}function zt(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const Dt=new Map([["text/html","html"],["application/xml","xml"]]);function qt(e,t=document){const n=Dt.get(e);if(!n){const t=[...Dt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Mt(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Mt(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;St(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),ct(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=Ye`<meta charset="utf-8" />`);s.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=Ye`
      +window.respecVersion="35.1.2",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function o(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function s(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:s});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return k(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function w(e){b=e(b)}function y(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(x(this),t),k(this.request)}:function(...t){return k(e.apply(x(this),t))}}function v(e){return"function"==typeof e?y(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function k(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{t(k(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const x=e=>g.get(e);const $=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],E=new Map;function S(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(E.get(t))return E.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!$.includes(n))return;const s=async function(e,...t){const s=this.transaction(e,o?"readwrite":"readonly");let i=s.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),o&&s.done]))[0]};return E.set(t,s),s}w((e=>({...e,get:(t,n,r)=>S(t,n)||e.get(t,n,r),has:(t,n)=>!!S(t,n)||e.has(t,n)})));const C=["continue","continuePrimaryKey","advance"],L={},A=new WeakMap,T=new WeakMap,R={get(e,t){if(!C.includes(t))return e[t];let n=L[t];return n||(n=L[t]=function(...e){A.set(this,T.get(this)[t](...e))}),n}};async function*N(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,R);for(T.set(n,t),g.set(n,x(t));t;)yield n,t=await(A.get(n)||t.continue()),A.delete(n)}function j(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}w((e=>({...e,get:(t,n,r)=>j(t,n)?N:e.get(t,n,r),has:(t,n)=>j(t,n)||e.has(t,n)})));var P=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),k(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=k(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(k(i.result),e.oldVersion,e.newVersion,k(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{s&&e.addEventListener("close",(()=>s())),o&&e.addEventListener("versionchange",(e=>o(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:x,wrap:k});const I=/^[!#$%&'*+-.^`|~\w]+$/,O=/[\u000A\u000D\u0009\u0020]/u,z=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function D(e,t,n){(t&&""!==t&&!e.has(t)&&z.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function q(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let M={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function B(e){M=e}const F=/[&<>"']/,W=new RegExp(F.source,"g"),H=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,U=new RegExp(H.source,"g"),G={"&":"&","<":"<",">":">",'"':""","'":"'"},V=e=>G[e];function Z(e,t){if(t){if(F.test(e))return e.replace(W,V)}else if(H.test(e))return e.replace(U,V);return e}const K=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Q(e){return e.replace(K,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const J=/(^|[^\[])\^/g;function X(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(J,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}function Y(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const ee={exec:()=>null};function te(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function ne(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){const s=e.charAt(r-o-1);if(s!==t||n){if(s===t||!n)break;o++}else o++}return e.slice(0,r-o)}function re(e,t,n,r){const o=t.href,s=t.title?Z(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:s,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:s,text:Z(i)}}class oe{options;rules;lexer;constructor(e){this.options=e||M}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:ne(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=ne(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=ne(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),o.test(l))break;if(s.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(o.test(r))break;if(s.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}o.loose||(c?o.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=i}o.items[o.items.length-1].raw=i.trimEnd(),o.items[o.items.length-1].text=a.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=te(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(const e of n)s.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of o)s.rows.push(te(e,s.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Z(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=ne(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),re(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return re(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,s,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){i+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){a+=s;continue}if(i-=s,i>0)continue;s=Math.min(s,s+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=Z(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=Z(t[1]),n="mailto:"+e):(e=Z(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=Z(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=Z(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:Z(t[0]),{type:"text",raw:t[0],text:e}}}}const se=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ie=/(?:[*+-]|\d{1,9}[.)])/,ae=X(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ie).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ce=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,le=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ue=X(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",le).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),de=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ie).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,he=X("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",fe).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ge={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",me).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:ue,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:se,html:he,lheading:ae,list:de,newline:/^(?: *(?:\n|$))+/,paragraph:me,table:ee,text:/^[^\n]+/},be=X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),we={...ge,table:be,paragraph:X(ce).replace("hr",se).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},ye={...ge,html:X("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",fe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(ce).replace("hr",se).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ae).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ve=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ke=/^( {2,}|\\)\n(?!\s*$)/,xe="\\p{P}\\p{S}",$e=X(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,xe).getRegex(),_e=X(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,xe).getRegex(),Ee=X("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,xe).getRegex(),Se=X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,xe).getRegex(),Ce=X(/\\([punct])/,"gu").replace(/punct/g,xe).getRegex(),Le=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Ae=X(fe).replace("(?:--\x3e|$)","--\x3e").getRegex(),Te=X("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ae).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Re=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne=X(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Re).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),je=X(/^!?\[(label)\]\[(ref)\]/).replace("label",Re).replace("ref",le).getRegex(),Pe=X(/^!?\[(ref)\](?:\[\])?/).replace("ref",le).getRegex(),Ie={_backpedal:ee,anyPunctuation:Ce,autolink:Le,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:ke,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ee,emStrongLDelim:_e,emStrongRDelimAst:Ee,emStrongRDelimUnd:Se,escape:ve,link:Ne,nolink:Pe,punctuation:$e,reflink:je,reflinkSearch:X("reflink|nolink(?!\\()","g").replace("reflink",je).replace("nolink",Pe).getRegex(),tag:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ee},Oe={...Ie,link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",Re).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Re).getRegex()},ze={...Ie,escape:X(ve).replace("])","~|])").getRegex(),url:X(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},De={...ze,br:X(ke).replace("{2,}","*").getRegex(),text:X(ze.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qe={normal:ge,gfm:we,pedantic:ye},Me={normal:Ie,gfm:ze,breaks:De,pedantic:Oe};class Be{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||M,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qe.normal,inline:Me.normal};this.options.pedantic?(t.block=qe.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=qe.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:qe,inline:Me}}static lex(e,t){return new Be(t).lex(e)}static lexInline(e,t){return new Be(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,o,s;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+"    ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],s&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),s=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,o,s,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Fe{options;constructor(e){this.options=e||M}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+Z(r)+'">'+(n?e:Z(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Z(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=Y(e);if(null===r)return n;let o='<a href="'+(e=r)+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>",o}image(e,t,n){const r=Y(e);if(null===r)return n;let o=`<img src="${e=r}" alt="${n}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return e}}class We{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class He{options;renderer;textRenderer;constructor(e){this.options=e||M,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new We}static parse(e,t){return new He(t).parse(e)}static parseInline(e,t){return new He(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(o.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=o;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,Q(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=o;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=o;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let s="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});s+=this.renderer.tablerow(r)}n+=this.renderer.table(t,s);continue}case"blockquote":{const e=o,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=o,t=e.ordered,r=e.start,s=e.loose;let i="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,o=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);s?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,s),i+=this.renderer.listitem(a,o,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=o;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=o;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let s=o,i=s.tokens?this.parseInline(s.tokens):s.text;for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],i+="\n"+(s.tokens?this.parseInline(s.tokens):s.text);n+=t?this.renderer.paragraph(i):i;continue}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const o=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=e||"";continue}}switch(o.type){case"escape":{const e=o;n+=t.text(e.text);break}case"html":{const e=o;n+=t.html(e.text);break}case"link":{const e=o;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=o;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=o;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=o;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=o;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=o;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=o;n+=t.text(e.text);break}default:{const e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class Ue{options;constructor(e){this.options=e||M}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const Ge=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(Be.lex,He.parse);parseInline=this.#e(Be.lexInline,He.parseInline);Parser=He;Renderer=Fe;TextRenderer=We;Lexer=Be;Tokenizer=oe;Hooks=Ue;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const o=e[r].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Fe(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.renderer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new oe(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],s=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Ue;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,o=e.hooks[r],s=t[r];Ue.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>s.call(t,e)));const n=o.call(t,e);return s.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Be.lex(e,t??this.defaults)}parser(e,t){return He.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const o={...r},s={...this.defaults,...o};!0===this.defaults.async&&!1===o.async&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const i=this.#t(!!s.silent,!!s.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then((t=>e(t,s))).then((e=>s.hooks?s.hooks.processAllTokens(e):e)).then((e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(i);try{s.hooks&&(n=s.hooks.preprocess(n));let r=e(n,s);s.hooks&&(r=s.hooks.processAllTokens(r)),s.walkTokens&&this.walkTokens(r,s.walkTokens);let o=t(r,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+Z(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ve(e,t){return Ge.parse(e,t)}Ve.options=Ve.setOptions=function(e){return Ge.setOptions(e),Ve.defaults=Ge.defaults,B(Ve.defaults),Ve},Ve.getDefaults=q,Ve.defaults=M,Ve.use=function(...e){return Ge.use(...e),Ve.defaults=Ge.defaults,B(Ve.defaults),Ve},Ve.walkTokens=function(e,t){return Ge.walkTokens(e,t)},Ve.parseInline=Ge.parseInline,Ve.Parser=He,Ve.parser=He.parse,Ve.Renderer=Fe,Ve.TextRenderer=We,Ve.Lexer=Be,Ve.lexer=Be.lex,Ve.Tokenizer=oe,Ve.Hooks=Ue,Ve.parse=Ve,Ve.options,Ve.setOptions,Ve.use,Ve.walkTokens,Ve.parseInline,He.parse,Be.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke,Qe={exports:{}};Ke=Qe,function(e,t){Ke.exports=t()}(0,(function(){var e=[],t=[],n={},r={},o={};function s(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var o,s,a=(o=t[1],s=arguments,o.replace(/\$(\d{1,2})/g,(function(e,t){return s[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var o=r.length;o--;){var s=r[o];if(s[0].test(t))return a(t,s)}return t}function l(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):c(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&c(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(o,r,e),d.isPlural=u(o,r,e),d.singular=l(r,o,t),d.isSingular=u(r,o,t),d.addPluralRule=function(t,n){e.push([s(t),n])},d.addSingularRule=function(e,n){t.push([s(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),o[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var Je=Ze(Qe.exports),Xe=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,o=s.prototype;return o.delete=function(e){return this.has(e)&&delete e[this._]},o.get=function(e){return this.has(e)?e[this._]:void 0},o.has=function(e){return r.call(e,this._)},o.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},s;function s(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=o.prototype;function o(){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._]},r.WeakSet=o}(Math.random(),Object.defineProperty)}function o(e,t,n,r,o,s){for(var i=("selectedIndex"in t),a=i;r<o;){var c,l=e(n[r],1);t.insertBefore(l,s),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function s(e,t){return e==t}function i(e){return e}function a(e,t,n,r,o,s,i){var a=s-o;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=o;c<n&&l<s&&i(e[c],r[l]);)c++,l++;if(l===s)return t;t=c+1}return-1}function c(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,o=t;r<o;){var s=(r+o)/2>>>0;n<e[s]?o=s:r=1+s}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,w=0;g<m&&w<b&&u(t[g],n[w]);)g++,w++;for(;g<m&&w<b&&u(t[m-1],n[b-1]);)m--,b--;var y=g===m,v=w===b;if(y&&v)return n;if(y&&w<b)return o(d,e,n,w,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var k=m-g,x=b-w,$=-1;if(k<x){if(-1<($=a(n,w,b,t,g,m,u)))return o(d,e,n,w,$,d(t[g],0)),o(d,e,n,$+k,b,c(d,t,m,h,f)),n}else if(x<k&&-1<($=a(t,g,m,n,w,b,u)))return l(d,t,g,$),l(d,t,$+x,m),n;return k<2||x<2?(o(d,e,n,w,b,d(t[g],0)),l(d,t,g,m)):k==x&&function(e,t,n,r,o,s){for(;r<o&&s(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?o(d,e,n,w,b,c(d,t,m,h,f)):function(e,t,n,r,s,i,a,c,u,d,f,h,m){!function(e,t,n,r,s,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:s++,f++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,c,l,u,d,p,f=n+s,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<s&&c<n&&i(r[o+l],e[t+c]);)l++,c++;if(l===s&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[o+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,o,s,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=o.slice(s,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+s))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var w=Array(l),y=u[c];for(--n;y;){for(var v=y.newi,k=y.oldi;v<n;)w[--l]=1,--n;for(;k<i;)w[--l]=-1,--i;w[--l]=0,--n,--i,y=y.prev}for(;t<=n;)w[--l]=1,--n;for(;s<=i;)w[--l]=-1,--i;return w}(n,r,s,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,w,b,x,t,g,m,k,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,w={};try{w.Map=Map}catch(u){w.Map=function(){var e=0,t=[],n=[];return{delete:function(o){var s=r(o);return s&&(t.splice(e,1),n.splice(e,1)),s},forEach:function(e,r){t.forEach((function(t,o){e.call(r,n[o],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(o,s){return n[r(o)?e:t.push(o)-1]=s,this}};function r(n){return-1<(e=t.indexOf(n))}}}var y=w.Map;function v(){return this}function k(e,t){var n="_"+e+"$";return{get:function(){return this[n]||x(this,n,t.call(this,e))},set:function(e){x(this,n,e)}}}var x=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(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,_,E,S,C,L,A={},T={},R=[],N=T.hasOwnProperty,j=0,P={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(j=R.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<j;n++){var r=R[n];if(N.call(e,r))return T[r](e[r],t)}}},I=Array.isArray||(_=($={}.toString).call([]),function(e){return $.call(e)===_}),O=(E=e,S="fragment",L="content"in D(C="template")?function(e){var t=D(C);return t.innerHTML=e,t.content}:function(e){var t,n=D(S),r=D(C);return z(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=D(S),n=D("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",z(t,n.firstChild.childNodes),t}:L)(e)});function z(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function D(e){return e===S?E.createDocumentFragment():E.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,M,B,F,W,H,U,G,V,Z=(M="appendChild",B="cloneNode",F="createTextNode",H=(W="importNode")in(q=e),(U=q.createDocumentFragment())[M](q[F]("g")),U[M](q[F]("")),(H?q[W](U,!0):U[B](!0)).childNodes.length<2?function e(t,n){for(var r=t[B](),o=t.childNodes||[],s=o.length,i=0;n&&i<s;i++)r[M](e(o[i],n));return r}:H?q[W]:function(e,t){return e[B](!!t)}),K="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},Q="-"+Math.random().toFixed(6)+"%",J=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+Q+'"></p>',G.content.childNodes[0].getAttribute(V)==Q)||(Q="_dt: "+Q.slice(1,-1)+";",J=!0)}catch(u){}var X="\x3c!--"+Q+"--\x3e",Y=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,oe=" \\f\\n\\r\\t",se="[^"+oe+"\\/>\"'=]+",ie="["+oe+"]+"+se,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+Q+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=J?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 ge(t,n,r,o){for(var s=t.childNodes,i=s.length,a=0;a<i;){var c=s[a];switch(c.nodeType){case ee:var l=o.concat(a);!function(t,n,r,o){for(var s,i=t.attributes,a=[],c=[],l=me(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===Q;if(f||1<(s=p.value.split(X)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(be(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(be(g,o,m,s))}}c.push(p)}}for(var w=((d=0)<(u=c.length)&&J&&!("ownerSVGElement"in t));d<u;){var y=c[d++];w&&(y.value=""),t.removeAttribute(y.name)}var v=t.nodeName;if(/^script$/i.test(v)){var k=e.createElement(v);for(u=i.length,d=0;d<u;)k.setAttributeNode(i[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(c,n,r,l),ge(c,n,r,l);break;case Y:var u=c.textContent;if(u===Q)r.shift(),n.push(ne.test(t.nodeName)?we(t,o):{type:"any",node:c,path:o.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,i--}break;case te:ne.test(t.nodeName)&&K.call(c.textContent)===X&&(r.shift(),n.push(we(t,o)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function we(e,t){return{type:"text",node:e,path:t}}var ye,ve=(ye=new n,{get:function(e){return ye.get(e)},set:function(e,t){return ye.set(e,t),t}});function ke(e,t){var n=(e.convert||function(e){return e.join(X).replace(ue,he).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var o=O(n,e.type);$e(o);var s=[];return ge(o,s,t.slice(0),[]),{content:o,updates:function(n){for(var r=[],o=s.length,i=0,a=0;i<o;){var c=s[i++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return o+=a,function(){var e=arguments.length;if(o!==e-1)throw new Error(e-1+" values instead of "+o+"\n"+t.join("${value}"));for(var s=1,i=1;s<e;){var a=r[s-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[s++]+c[u++];a.fn(l)}else a.fn(arguments[s++])}return n}}}}var xe=[];function $e(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===K.call(r.textContent).length&&e.removeChild(r)}}var _e,Ee,Se=(_e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Ee=/([^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),Le(n,!0)}(e,t):Le(e.style,!1)});function Ce(e,t,n){return t+"-"+n.toLowerCase()}function Le(e,t){var n,r;return function(o){var s,i,a,c;switch(typeof o){case"object":if(o){if("object"===n){if(!t&&r!==o)for(i in r)i in o||(e[i]="")}else t?e.value="":e.cssText="";for(i in s=t?{}:e,o)a="number"!=typeof(c=o[i])||_e.test(i)?c:c+"px",!t&&/^--/.test(i)?s.setProperty(i,a):s[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Ee,Ce),":",e[t],";");return n.join("")}(r=s):r=o;break}default:r!=o&&(n="string",r=o,t?e.value=o||"":e.cssText=o||"")}}}var Ae,Te,Re=(Ae=[].slice,(Te=Ne.prototype).ELEMENT_NODE=1,Te.nodeType=111,Te.remove=function(e){var t,n=this.childNodes,r=this.firstChild,o=this.lastChild;return this._=null,e&&2===n.length?o.parentNode.removeChild(o):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(o),t.deleteContents()),r},Te.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,o=0,s=r.length;o<s;o++)t.appendChild(r[o]);return t},Ne);function Ne(e){var t=this.childNodes=Ae.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function je(e){return{html:e}}function Pe(e,t){switch(e.nodeType){case He:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case We:return Pe(e.render(),t);default:return e}}function Ie(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(je).then(t):Promise.resolve(P.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var ze,De,qe,Me,Be,Fe="ownerSVGElement",We=v.prototype.nodeType,He=Re.prototype.nodeType,Ue=(De=(ze={Event:b,WeakSet:u}).Event,qe=ze.WeakSet,Me=!0,Be=null,function(e){return Me&&(Me=!Me,Be=new qe,function(e){var t=new qe,n=new qe;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,o=[],s=function(e){o.push(e),clearTimeout(r),r=setTimeout((function(){i(o.splice(r=0,o.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){s({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){s({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,o=e.length,s=0;s<o;s++)a((r=e[s]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var o,s=new De(t),i=e.length,a=0;a<i;1===(o=e[a++]).nodeType&&function e(t,n,r,o,s){Be.has(t)&&!o.has(t)&&(s.delete(t),o.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,o,s));}(o,s,t,n,r));}}(e.ownerDocument)),Be.add(e),e}),Ge=/^(?:form|list)$/i,Ve=[].slice;function Ze(t){return this.type=t,function(t){var n=xe,r=$e;return function(o){var s,i,a;return n!==o&&(s=t,i=n=o,a=ve.get(i)||ve.set(i,ke(s,i)),r=a.updates(Z.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ke=!(Ze.prototype={attribute:function(e,t,n){var r,o=Fe in e;if("style"===t)return Se(e,n,o);if("."===t.slice(0,1))return l=e,u=t.slice(1),o?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?Ue(e):t.toLowerCase()in e&&(s=s.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(s,r,!1),(r=t)&&e.addEventListener(s,t,!1))}}if("data"===t||!o&&t in e&&!Ge.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in P.attributes)return function(n){var o=P.attributes[t](e,n);r!==o&&(null==(r=o)?e.removeAttribute(t):e.setAttribute(t,o))};var i,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:Pe,before:e},o=Fe in e?"svg":"html",s=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":s?n!==a&&(n=a,t[0].textContent=a):(s=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=h(e.parentNode,t,[],r);break}default:if(s=!1,I(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(I(a[0])&&(a=a.concat.apply([],a)),Oe(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Oe(a)?a.then(i):"placeholder"in a?Ie(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,Ve.call(O([].concat(a.html).join(""),o).childNodes),r):i("length"in a?Ve.call(a):P.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var o;t!==r&&("object"==(o=typeof(t=r))&&r?Oe(r)?r.then(n):"placeholder"in r?Ie(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):P.invoke(r,n)):"function"==o?n(r(e)):e.textContent=null==r?"":r)}}}),Qe=function(t){var r,o,s,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(o={},s=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return o[t]||(o[t]=e)},Qe=c?s:(i=new n,function(e){return i.get(e)||(n=s(t=e),i.set(t,n),n);var t,n})):Ke=!0,Je(t)};function Je(e){return Ke?e:Qe(e)}function Xe(e){for(var t=arguments.length,n=[Je(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Ye=new n,et=function(e){var t,n,r;return function(){var o=Xe.apply(null,arguments);return r!==o[0]?(r=o[0],n=new Ze(e),t=nt(n.apply(n,o))):n.apply(n,o),t}},tt=function(e,t){var n=t.indexOf(":"),r=Ye.get(e),o=t;return-1<n&&(o=t.slice(n+1),t=t.slice(0,n)||"html"),r||Ye.set(e,r={}),r[o]||(r[o]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Re(t):e},rt=new n;function ot(){var e=rt.get(this),t=Xe.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ze(Fe in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var st,it,at,ct,lt=P.define,ut=Ze.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return ot.bind(e)},dt.define=lt,dt.diff=h,(dt.hyper=dt).observe=Ue,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},st=et,it=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,c=t.get(e)||ct(e,t);switch(typeof o){case"object":case"function":var l=c.w||(c.w=new n);return l.get(o)||(s=l,i=o,a=new e(r),s.set(i,a),a);default:var u=c.p||(c.p=at(null));return u[o]||(u[o]=new e(r))}}(this,it.get(e)||(r=e,o=new y,it.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:k("html",st),svg:k("svg",st),state:k("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(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 o in r)n[o]=r[o];return!1!==t&&this.render(),this}}}),dt}(document);const Ye=Xe,et=P,tt=Ve,nt=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",o=null,s=new Map,i="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(i){case"type":if("/"===c){i="subtype";continue}t+=c;break;case"subtype":if(";"===c){i="param-start";continue}n+=c;break;case"param-start":if(O.test(c)||";"===c)continue;r+=c,i="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){i="param-value",o=null;continue}s.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){i="collect-quoted-string";continue}if(";"===c){o=o.trimEnd(),i="param-start",D(s,r,o),r="";continue}o="string"==typeof o?o+c:c;break;case"collect-quoted-string":if('"'===c){D(s,r,o),i="ignore-input-until-next-param",r="",o=null;continue}if("\\"===c)continue;o="string"==typeof o?o+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&D(s,r,o);if(""===t.trim()||!I.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!I.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(s.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?I.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},rt=Je,ot=/-/g,st=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"});"en"===l||l.startsWith("en-");const it=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function at(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function ct(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function lt(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:o})=>"element"===n&&t?t(o,r++,e):o))}}const ut=lt("conjunction"),dt=lt("disjunction");function pt(e,t){return ut(e,t).join("")}function ft(e){return e.trim().replace(/\s+/g," ")}function ht(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function mt(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){Rt(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}function gt(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>Ye`${e}, `));return Ye`${r}${n[n.length-1]}`}function bt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=r?n:n.toLowerCase();if(o=o.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),o?!/\.$/.test(o)&&/^[a-z]/i.test(t||o)||(o=`x${o}`):o="generatedID",t&&(o=`${t}-${o}`),e.ownerDocument.getElementById(o)){let t=0,n=`${o}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${o}-${t}`;o=n}return e.id=o,o}function wt(e){const t=new Set,n="ltNodefault"in e.dataset?"":ft(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>ft(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(ft(e))))}return[...t]}function yt(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function vt(e,t){const n=t.closest(it);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function kt(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function xt(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function $t(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class _t extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function Et(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{yt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),St(t),t}function St(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Ct(t)])e.remove()}function*Ct(e){for(;e.nextNode();)yield e.currentNode}class Lt extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class At extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||bt(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:o,elements:s,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:o,elements:s,title:i,details:a,stack:n}}}function Tt(e,t,n={}){const r={...n,isWarning:!1};o("error",new At(e,t,r))}function Rt(e,t,n={}){const r={...n,isWarning:!0};o("warn",new At(e,t,r))}function Nt(e){return{showError:(t,n)=>Tt(t,e,n),showWarning:(t,n)=>Rt(t,e,n)}}function jt(e){return e?`\`${e}\``:""}function Pt(e,{quotes:t}={quotes:!1}){return dt(e,t?e=>jt(It(e)):jt).join("")}function It(e){return String(e)?`"${e}"`:""}function Ot(e,...t){return zt(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[o,s]=r.slice(1,-1).split("|");if(s){return`${e}[${o}](${new URL(s,"https://respec.org/docs/")})`}return`${e}[\`${o}\`](https://respec.org/docs/#${o})`})).join(""))}function zt(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const Dt=new Map([["text/html","html"],["application/xml","xml"]]);function qt(e,t=document){const n=Dt.get(e);if(!n){const t=[...Dt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Mt(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Mt(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;St(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),ct(r);const s=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&s.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=Ye`<meta charset="utf-8" />`);s.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=Ye`
           <meta name="generator" content="${c}" />
         `;s.appendChild(l),t.prepend(s),o("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}n("core/exporter",{rsDocToDataURL:qt});class Bt{constructor(){this._respecDonePromise=new Promise((e=>{s("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],s("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),s("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return Mt("html",document)}}const Ft="core/post-process";const Wt="core/pre-process";const Ht="core/base-runner";async function Ut(e){!function(){const e=new Bt;Object.defineProperty(document,"respec",{value:e})}(),o("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),s("amend-user-config",n),s("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of i)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let o;try{o=JSON.parse(r)}catch{o=r}return[n,o]})),r=Object.fromEntries(n);Object.assign(e,r),o("amend-user-config",r)}(respecConfig),performance.mark(`${Ht}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||Tt("Every item in `preProcess` must be a JS function.",Wt),t})).map((async(t,n)=>{const r=Nt(`${Wt}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){Tt(`Function ${t.name} threw an error during \`preProcess\`.`,Wt,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,o)=>{const s=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),o(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){o(e)}finally{clearTimeout(s),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),o("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||Tt("Every item in `postProcess` must be a JS function.",Ft),t})).map((async(t,n)=>{const r=Nt(`${Ft}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){Tt(`Function ${t.name} threw an error during \`postProcess\`.`,Ft,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),o("end-all"),ct(document),performance.mark(`${Ht}-end`),performance.measure(Ht,`${Ht}-start`,`${Ht}-end`)}var Gt=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0}
       #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}
      @@ -210,7 +210,7 @@ dd{margin-left:0}
             data-link-for="${i}"
             >${a}</a
           ></code
      -  >`}function Xr(e){const t=ft(e),n=Ye`<em class="rfc2119">${t}</em>`;return Br[t]=!0,n}function Yr(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?Ye`<a href="${t}" data-matched-text="${e}"></a>`:Ye`<a data-cite="${t}" data-matched-text="${e}"></a>`}function eo(e,t){const n=ft(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=br(n);return!!t.parentElement.closest("dfn")?so(`\`${r.textContent}\``):r}function to(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(ft),{type:i,illegal:a}=vt(o,t.parentElement),c=Or(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Rt("Normative references in informative sections are not allowed. ",Mr,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function no(e,t,n){return"ABBR"===t.parentElement.tagName?e:Ye`<abbr title="${n.get(e)}">${e}</abbr>`}function ro(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return Ye`<var data-type="${r}">${n}</var>`}function oo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(ft).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=io(s),a=n?ft(n):null;return Ye`<a
      +  >`}function Xr(e){const t=ft(e),n=Ye`<em class="rfc2119">${t}</em>`;return Br[t]=!0,n}function Yr(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?Ye`<a href="${t}" data-matched-text="${e}"></a>`:Ye`<a data-cite="${t}" data-matched-text="${e}"></a>`}function eo(e,t){const n=ft(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=br(n);return!!t.parentElement.closest("dfn,a")?so(`\`${r.textContent}\``):r}function to(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(ft),{type:i,illegal:a}=vt(o,t.parentElement),c=Or(o,s),l=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;Rt("Normative references in informative sections are not allowed. ",Mr,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function no(e,t,n){return"ABBR"===t.parentElement.tagName?e:Ye`<abbr title="${n.get(e)}">${e}</abbr>`}function ro(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return Ye`<var data-type="${r}">${n}</var>`}function oo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(ft).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const o=n.substring(0,r),s=n.substring(r+1,n.length);return[t(o),t(s)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[o,s]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=io(s),a=n?ft(n):null;return Ye`<a
           data-link-type="dfn|abstract-op"
           data-link-for="${a}"
           data-xref-for="${a}"
      diff --git a/builds/respec-geonovum.js.map b/builds/respec-geonovum.js.map
      index e70d42472c..2a3b7255bc 100644
      --- a/builds/respec-geonovum.js.map
      +++ b/builds/respec-geonovum.js.map
      @@ -1 +1 @@
      -{"version":3,"file":"respec-geonovum.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/geonovum.js","../src/core/location-hash.js","../src/core/defaults.js","../src/geonovum/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/geonovum/style.js","../src/geonovum/l10n.js","../src/core/github.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/data-transform.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/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/core/best-practices.js","../src/core/figures.js","../src/core/data-cite.js","../src/core/link-to-dfn.js","../src/core/contrib.js","../src/core/fix-headers.js","../src/core/structure.js","../src/core/informative.js","../src/core/id-headers.js","../src/geonovum/conformance.js","../src/ui/save-html.js","../src/ui/search-specref.js","../src/ui/about-respec.js","../src/core/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/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/dfn-contract.js","../src/core/linter-rules/check-charset.js","../src/core/linter-rules/check-punctuation.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/no-http-props.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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/geonovum/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/geonovum/style.js\"),\n  import(\"../src/geonovum/l10n.js\"),\n  import(\"../src/core/github.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/inlines.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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/biblio.js\"),\n  import(\"../src/core/link-to-dfn.js\"),\n  import(\"../src/core/data-cite.js\"),\n  import(\"../src/core/render-biblio.js\"),\n  import(\"../src/core/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/geonovum/conformance.js\"),\n  import(\"../src/ui/save-html.js\"),\n  import(\"../src/ui/search-specref.js\"),\n  import(\"../src/ui/about-respec.js\"),\n  import(\"../src/core/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/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  /* Linter 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/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/no-http-props.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 Geonovum documents\n */\nexport const name = \"geonovum/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst licenses = new Map([\n  [\n    \"cc0\",\n    {\n      name: \"Creative Commons 0 Public Domain Dedication\",\n      short: \"CC0\",\n      url: \"https://creativecommons.org/publicdomain/zero/1.0/\",\n    },\n  ],\n  [\n    \"cc-by\",\n    {\n      name: \"Creative Commons Attribution 4.0 International Public License\",\n      short: \"CC-BY\",\n      url: \"https://creativecommons.org/licenses/by/4.0/legalcode\",\n    },\n  ],\n  [\n    \"cc-by-nd\",\n    {\n      name: \"Creative Commons Attribution-NoDerivatives 4.0 International Public License\",\n      short: \"CC-BY-ND\",\n      url: \"https://creativecommons.org/licenses/by-nd/4.0/legalcode.nl\",\n    },\n  ],\n]);\n\nconst geonovumDefaults = {\n  lint: {\n    \"privsec-section\": true,\n  },\n  doJsonLd: true,\n  license: \"cc-by\",\n  specStatus: \"GN-BASIS\",\n  logos: [\n    {\n      src: \"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg\",\n      alt: \"Geonovum\",\n      id: \"Geonovum\",\n      height: 67,\n      width: 132,\n      url: \"https://www.geonovum.nl/\",\n    },\n  ],\n};\n\nfunction computeProps(conf) {\n  return {\n    isCCBY: conf.license === \"cc-by\",\n    licenseInfo: licenses.get(conf.license),\n    isBasic: conf.specStatus === \"GN-BASIS\",\n    isRegular: conf.specStatus === \"GN-BASIS\",\n  };\n}\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...geonovumDefaults.lint,\n          ...conf.lint,\n        };\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...geonovumDefaults,\n    ...conf,\n    lint,\n  });\n  // computed properties\n  Object.assign(conf, computeProps(conf));\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","// @ts-check\n// Module geonovum/style\n// Inserts a link to the appropriate Geonovum style for the specification's maturity level.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n\nimport {\n  createResourceHint,\n  linkCSS,\n  showWarning,\n  toKeyValuePairs,\n} from \"../core/utils.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nexport const name = \"geonovum/style\";\nfunction attachFixupScript(doc, version) {\n  const script = doc.createElement(\"script\");\n  script.addEventListener(\n    \"load\",\n    () => {\n      if (window.location.hash) {\n        window.location.href = window.location.hash;\n      }\n    },\n    { once: true }\n  );\n  script.src = `https://www.w3.org/scripts/TR/${version}/fixup.js`;\n  doc.body.appendChild(script);\n}\n\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 createMetaViewport() {\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  return meta;\n}\n\nfunction createStyle(css_name) {\n  const link = document.createElement(\"link\");\n  link.rel = \"stylesheet\";\n  link.href = `https://tools.geostandaarden.nl/respec/style/${css_name}.css`;\n  return link;\n}\n\nfunction createResourceHints() {\n  /** @type ResourceHintOption[] */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C fixup.js\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2016/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preconnect\", // for Geonovum styles and scripts.\n      href: \"https://tools.geostandaarden.nl/\",\n    },\n    {\n      hint: \"preload\", // all Geonovum specs import base.css.\n      href: \"https://tools.geostandaarden.nl/respec/style/base.css\",\n      as: \"style\",\n    },\n    {\n      hint: \"preload\", // all Geonovum specs show the logo.\n      href: \"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg\",\n      as: \"image\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// add favicon for Geonovum\nconst favicon = document.createElement(\"link\");\nfavicon.rel = \"shortcut icon\";\nfavicon.type = \"image/x-icon\";\nfavicon.href =\n  \"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.ico\";\ndocument.head.prepend(favicon);\n\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(createMetaViewport());\n}\n\ndocument.head.prepend(elements);\n\n// export function run(conf, doc, cb) {\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"`respecConfig.specStatus` missing. Defaulting to 'GN-BASIS'.\";\n    conf.specStatus = \"GN-BASIS\";\n    showWarning(msg, name);\n  }\n\n  if (document.body.querySelector(\"figure.scalable\")) {\n    // Apply leaflet style if class scalable is present\n    document.head.appendChild(createStyle(\"leaflet\"));\n    document.head.appendChild(createStyle(\"font-awesome\"));\n  }\n\n  let styleFile = \"\";\n\n  // Figure out which style file to use.\n  switch (conf.specStatus.toUpperCase()) {\n    case \"GN-WV\":\n      styleFile += \"GN-WV.css\";\n      break;\n    case \"GN-CV\":\n      styleFile += \"GN-CV.css\";\n      break;\n    case \"GN-VV\":\n      styleFile += \"GN-VV.css\";\n      break;\n    case \"GN-DEF\":\n      styleFile += \"GN-DEF.css\";\n      break;\n    case \"GN-BASIS\":\n      styleFile += \"GN-BASIS.css\";\n      break;\n    default:\n      styleFile = \"base.css\";\n  }\n\n  if (!conf.noToc) {\n    sub(\n      \"end-all\",\n      () => {\n        attachFixupScript(document, \"2016\");\n      },\n      { once: true }\n    );\n  }\n  const finalStyleURL = `https://tools.geostandaarden.nl/respec/style/${styleFile}`;\n  linkCSS(document, finalStyleURL);\n}\n","// @ts-check\n// Module geonovum/l10n\n// Looks at the lang attribute on the root element and uses it to manage the config.l10n object so\n// that other parts of the system can localise their text\nimport { html } from \"../core/import-maps.js\";\nimport { l10n } from \"../core/l10n.js\";\nexport const name = \"geonovum/l10n\";\nconst additions = {\n  en: {\n    status_at_publication: html`This section describes the status of this\n      document at the time of its publication. Other documents may supersede\n      this document. A list of current Geonovum publications and the latest\n      revision of this document can be found via\n      <a href=\"https://www.geonovum.nl/geo-standaarden/alle-standaarden\"\n        >https://www.geonovum.nl/geo-standaarden/alle-standaarden</a\n      >(in Dutch).`,\n  },\n  nl: {\n    status_at_publication: html`Deze paragraaf beschrijft de status van dit\n      document ten tijde van publicatie. Het is mogelijk dat er actuelere\n      versies van dit document bestaan. Een lijst van Geonovum publicaties en de\n      laatste gepubliceerde versie van dit document zijn te vinden op\n      <a href=\"https://www.geonovum.nl/geo-standaarden/alle-standaarden\"\n        >https://www.geonovum.nl/geo-standaarden/alle-standaarden</a\n      >.`,\n  },\n};\n\nObject.keys(additions).forEach(key => {\n  if (!l10n[key]) l10n[key] = {};\n  Object.assign(l10n[key], additions[key]);\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","/**\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","// @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","// @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// 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","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\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 * 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\n// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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\">↑</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","// @ts-check\n// Module geonovum/conformance\n// Handle the conformance section properly.\n// based on W3C conformance, but because Geonovum has different requirements, have a separate module\nimport { html } from \"../core/import-maps.js\";\nexport const name = \"geonovum/conformance\";\n\n/**\n * @param {Element} conformance\n */\nfunction processConformance(conformance) {\n  const content = html`\n    <h2>Conformiteit</h2>\n    <p>\n      Naast onderdelen die als niet normatief gemarkeerd zijn, zijn ook alle\n      diagrammen, voorbeelden, en noten in dit document niet normatief. Verder\n      is alles in dit document normatief.\n    </p>\n    <p>Informatief en normatief.</p>\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run() {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance) {\n    processConformance(conformance);\n  }\n}\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 { 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\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/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","/*\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","/* 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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\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 \"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 \"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"],"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","norm","getIntlData","localizationStrings","data","getIntlDataForKey","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","codedJoinOr","quotes","addQuotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","head","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$f","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","substituteWithTextNodes","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$o","style$1","l10n$m","github$1","dataInclude","dataTransform","inlines","examples","issuesNotes","bestPractices","figures","biblio$1","linkToDfn","dataCite","renderBiblio","contrib","sections","fixHeaders","structure","informative","idHeaders","conformance","saveHtml","searchSpecref","aboutRespec","seo","highlight","dataTests","listSorter","highlightVars$1","algorithms","anchorExpander","dfnPanel","dfnContract","checkCharset","checkPunctuation","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","noHttpProps","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","licenses","short","geonovumDefaults","doJsonLd","license","logos","alt","height","width","isCCBY","licenseInfo","isBasic","isRegular","computeProps","css$d","noReSpecCSS","createStyle","css_name","resourceHints","createResourceHints","favicon","meta","delimiter","separator","toKeyValuePairs","createMetaViewport","styleFile","noToc","attachFixupScript","urls","frag","reduce","nextLink","linkCSS","additions","status_at_publication","nl","resolveGithubPromise","rejectGithubPromise","github","file_a_bug","participate","commit_history","ko","zh","ja","es","ghURL","tempURL","repoURL","org","repo","pathname","branch","issueBase","commitHistoryURL","newProps","edDraftURI","githubToken","githubUser","atRiskBase","otherLinks","pullBase","shortName","githubAPI","hostname","excludeGithubLinks","otherLink","normalizedGHObj","apiBase","fullName","issuesURL","pullsURL","newIssuesURL","normalizedConfig","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","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","base","ALLOWED_TYPES","readyPromise","openDB","deleteObjectStore","createObjectStore","keyPath","createIndex","unique","now","Date","range","IDBKeyRange","lowerBound","entry","expires","openIdb","biblioDB","isAlias","resolveAlias","only","aliasOf","addAll","aliasesAndRefs","alias","reference","promisesToAdd","flatMap","isInDB","put","close","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","forceUpdate","refsToFetch","onLine","ok","status","json","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","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","contains","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","terms","plurals","userDefinedPlurals","uniquePlurals","css$b","makeTitle","num","report","number","div","inAside","exampleTitle","css$9","editors_note","feature_at_risk","issue","issue_summary","no_issues_in_spec","note","handleIssues","ins","ghIssues","getIssueNumber","Number","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","insertAdjacentHTML","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","issueNumbers","issues","fetchAndStoreGithubIssues","headElem","ednote","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","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","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","xref","editors","editor","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","res","maxAge","Request","cache","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","toISOString","cacheResponse","Response","blob","fetchAndCache","showContributors","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","processConformance","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","publishDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","search_specref","specrefSearchUI","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$7","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","default","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","missing_test_suite_uri","tests","toListItem","emojiList","testFile","testParts","testFileName","requiresConnectionEmoji","manualPerformEmoji","toTestURLs","testSuiteURI","handleDuplicates","testURLs","codedJoinAnd","uniqueList","testables","makeSorter","direction","order","sortListItems","sortDefinitionTerms","dl","nextType","nextName","sortables","sortedElems","selectNodeContents","css$5","highlightListener","varElem","hightligtedElems","highlightColor","getHighlightColor","varsToHighlight","colorStatus","HL_COLORS","removeHighlight","addHighlight","resetListener","hlColor","activeClass","outputDoc","css$3","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","isRecTrack","saysPrivOrSec","saysConsiderations","offendingMembers","getOwnPropertyNames"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IACHC,OAAOC,QAAQG,QAAQS,GAAQC,EAEnC,CCtBO,MAIDC,EAAgB,IAAIC,YAOnB,SAASC,EAAIC,EAAOC,GAEzB,GADAJ,EAAcK,cAAc,IAAIC,YAAYH,EAAO,CAAEC,YACjDnB,OAAOsB,SAAWtB,OAAOuB,KAC3B,OAGF,MAAMC,EAAOC,OAAOC,KAAKC,UAAUR,GAAQS,OAAST,IACpDnB,OAAOsB,OAAOO,YAAY,CAAEX,QAAOM,QAAQxB,OAAOsB,OAAOQ,SAASC,OACpE,CAWO,SAASC,EAAId,EAAOe,EAAIC,EAAU,CAAEC,MAAM,IAE/CpB,EAAcqB,iBAAiBlB,GADdmB,GAAKJ,EAAGI,EAA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nC,CAAC,oBAAqB,QACtB,CAAC,4FAA6F,QAC9F,CAAC,yGAA0G,QAC3G,CAAC,8FAA+F,QAChG,CAAC,0BAA2B,OAC5B,CAAC,+BAAgC,QACjC,CAAC,sBAAuB,QACxB,CAAC,oBAAqB,UACtB,CAAC,eAAgB,MACjB,CAAC,YAAa,MACd,CAAC,QAAS,QACVtH,SAAQ,SAAUsH,GAClB,OAAOR,EAAU4B,gBAAgBpB,EAAK,GAAIA,EAAK,GACpD,IAKG,CAEE,YACA,SACA,SACA,MACA,WACA,UACA,OACA,YACA,QACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,UACA,QACA,WACA,MACA,WACA,cACA,QACA,SACA,WACA,YACA,MACA,SACA,YACA,YACA,YACA,WACA,WACA,MACA,UACA,UACA,WACA,WACA,eACA,SACA,SACA,YACA,WACA,YACA,cACA,QACA,UACA,QACA,SACA,aACA,YACA,WACA,OACA,QACA,OACA,QACA,QACA,MACA,QACA,OACA,OACA,YACA,OACA,WACA,SACA,SACA,YACA,WACA,OACA,WACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,iBACA,QACA,OACA,SACA,UACA,UACA,aACA,WACA,MACA,eAEA,gBACA,SACA,SACA,YACA,WACA,QACA,WACAtH,QAAQ8G,EAAU6B,oBAEb7B,CACV,IAGA,IACIA,GAAyBR,GADNK,GAAYC,SCjgBGkC,GAAU,SAASC,GAAgB,IAAI/P,EAAE,CAAE,EAAC,IAAIA,EAAE9N,QAAQA,OAAO,CAAC,MAAMlB,GAAGgP,EAAE9N,QAAQ,SAAS8N,EAAEhP,GAAG,IAAIqJ,EAAErJ,EAAEgf,eAAeC,EAAEjf,EAAEyc,eAAexR,EAAEiU,EAAE5c,UAAU,OAAO2I,EAAElF,OAAO,SAAS/F,GAAG,OAAO6C,KAAKZ,IAAIjC,WAAWA,EAAE6C,KAAKuG,EAAE,EAAE6B,EAAE3J,IAAI,SAAStB,GAAG,OA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AARA,IAEpDrd,QAAOqd,GACN,IAAIe,IAAIsM,EAAKrN,GAAMxuB,OAAOQ,SAAS0K,MAAMA,KAAKkkB,WAAW,aAG7D,GAAIugC,EAAiBzjD,OAAQ,CAC3B,MAAMmL,EAAOuZ,GAAQ++B,GAAkBnhC,GAAO2H,EAAO,GAAG,IAAI3H,SAC5D+C,GAAYhwB,GAAKyb,IAAKzd,GAAM,CAAEowB,KAAMpuB,GAAKouB,KAAOtY,GACjD,CACH","x_google_ignoreList":[4,5,6,8]}
      \ No newline at end of file
      +{"version":3,"file":"respec-geonovum.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/geonovum.js","../src/core/location-hash.js","../src/core/defaults.js","../src/geonovum/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/geonovum/style.js","../src/geonovum/l10n.js","../src/core/github.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/data-transform.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/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/core/best-practices.js","../src/core/figures.js","../src/core/data-cite.js","../src/core/link-to-dfn.js","../src/core/contrib.js","../src/core/fix-headers.js","../src/core/structure.js","../src/core/informative.js","../src/core/id-headers.js","../src/geonovum/conformance.js","../src/ui/save-html.js","../src/ui/search-specref.js","../src/ui/about-respec.js","../src/core/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/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/dfn-contract.js","../src/core/linter-rules/check-charset.js","../src/core/linter-rules/check-punctuation.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/no-http-props.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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/geonovum/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/geonovum/style.js\"),\n  import(\"../src/geonovum/l10n.js\"),\n  import(\"../src/core/github.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/inlines.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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/biblio.js\"),\n  import(\"../src/core/link-to-dfn.js\"),\n  import(\"../src/core/data-cite.js\"),\n  import(\"../src/core/render-biblio.js\"),\n  import(\"../src/core/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/geonovum/conformance.js\"),\n  import(\"../src/ui/save-html.js\"),\n  import(\"../src/ui/search-specref.js\"),\n  import(\"../src/ui/about-respec.js\"),\n  import(\"../src/core/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/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  /* Linter 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/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/no-http-props.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 Geonovum documents\n */\nexport const name = \"geonovum/defaults\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst licenses = new Map([\n  [\n    \"cc0\",\n    {\n      name: \"Creative Commons 0 Public Domain Dedication\",\n      short: \"CC0\",\n      url: \"https://creativecommons.org/publicdomain/zero/1.0/\",\n    },\n  ],\n  [\n    \"cc-by\",\n    {\n      name: \"Creative Commons Attribution 4.0 International Public License\",\n      short: \"CC-BY\",\n      url: \"https://creativecommons.org/licenses/by/4.0/legalcode\",\n    },\n  ],\n  [\n    \"cc-by-nd\",\n    {\n      name: \"Creative Commons Attribution-NoDerivatives 4.0 International Public License\",\n      short: \"CC-BY-ND\",\n      url: \"https://creativecommons.org/licenses/by-nd/4.0/legalcode.nl\",\n    },\n  ],\n]);\n\nconst geonovumDefaults = {\n  lint: {\n    \"privsec-section\": true,\n  },\n  doJsonLd: true,\n  license: \"cc-by\",\n  specStatus: \"GN-BASIS\",\n  logos: [\n    {\n      src: \"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg\",\n      alt: \"Geonovum\",\n      id: \"Geonovum\",\n      height: 67,\n      width: 132,\n      url: \"https://www.geonovum.nl/\",\n    },\n  ],\n};\n\nfunction computeProps(conf) {\n  return {\n    isCCBY: conf.license === \"cc-by\",\n    licenseInfo: licenses.get(conf.license),\n    isBasic: conf.specStatus === \"GN-BASIS\",\n    isRegular: conf.specStatus === \"GN-BASIS\",\n  };\n}\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...geonovumDefaults.lint,\n          ...conf.lint,\n        };\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...geonovumDefaults,\n    ...conf,\n    lint,\n  });\n  // computed properties\n  Object.assign(conf, computeProps(conf));\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","// @ts-check\n// Module geonovum/style\n// Inserts a link to the appropriate Geonovum style for the specification's maturity level.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n\nimport {\n  createResourceHint,\n  linkCSS,\n  showWarning,\n  toKeyValuePairs,\n} from \"../core/utils.js\";\nimport { sub } from \"../core/pubsubhub.js\";\nexport const name = \"geonovum/style\";\nfunction attachFixupScript(doc, version) {\n  const script = doc.createElement(\"script\");\n  script.addEventListener(\n    \"load\",\n    () => {\n      if (window.location.hash) {\n        window.location.href = window.location.hash;\n      }\n    },\n    { once: true }\n  );\n  script.src = `https://www.w3.org/scripts/TR/${version}/fixup.js`;\n  doc.body.appendChild(script);\n}\n\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 createMetaViewport() {\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  return meta;\n}\n\nfunction createStyle(css_name) {\n  const link = document.createElement(\"link\");\n  link.rel = \"stylesheet\";\n  link.href = `https://tools.geostandaarden.nl/respec/style/${css_name}.css`;\n  return link;\n}\n\nfunction createResourceHints() {\n  /** @type ResourceHintOption[] */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C fixup.js\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2016/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preconnect\", // for Geonovum styles and scripts.\n      href: \"https://tools.geostandaarden.nl/\",\n    },\n    {\n      hint: \"preload\", // all Geonovum specs import base.css.\n      href: \"https://tools.geostandaarden.nl/respec/style/base.css\",\n      as: \"style\",\n    },\n    {\n      hint: \"preload\", // all Geonovum specs show the logo.\n      href: \"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg\",\n      as: \"image\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// add favicon for Geonovum\nconst favicon = document.createElement(\"link\");\nfavicon.rel = \"shortcut icon\";\nfavicon.type = \"image/x-icon\";\nfavicon.href =\n  \"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.ico\";\ndocument.head.prepend(favicon);\n\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(createMetaViewport());\n}\n\ndocument.head.prepend(elements);\n\n// export function run(conf, doc, cb) {\nexport function run(conf) {\n  if (!conf.specStatus) {\n    const msg = \"`respecConfig.specStatus` missing. Defaulting to 'GN-BASIS'.\";\n    conf.specStatus = \"GN-BASIS\";\n    showWarning(msg, name);\n  }\n\n  if (document.body.querySelector(\"figure.scalable\")) {\n    // Apply leaflet style if class scalable is present\n    document.head.appendChild(createStyle(\"leaflet\"));\n    document.head.appendChild(createStyle(\"font-awesome\"));\n  }\n\n  let styleFile = \"\";\n\n  // Figure out which style file to use.\n  switch (conf.specStatus.toUpperCase()) {\n    case \"GN-WV\":\n      styleFile += \"GN-WV.css\";\n      break;\n    case \"GN-CV\":\n      styleFile += \"GN-CV.css\";\n      break;\n    case \"GN-VV\":\n      styleFile += \"GN-VV.css\";\n      break;\n    case \"GN-DEF\":\n      styleFile += \"GN-DEF.css\";\n      break;\n    case \"GN-BASIS\":\n      styleFile += \"GN-BASIS.css\";\n      break;\n    default:\n      styleFile = \"base.css\";\n  }\n\n  if (!conf.noToc) {\n    sub(\n      \"end-all\",\n      () => {\n        attachFixupScript(document, \"2016\");\n      },\n      { once: true }\n    );\n  }\n  const finalStyleURL = `https://tools.geostandaarden.nl/respec/style/${styleFile}`;\n  linkCSS(document, finalStyleURL);\n}\n","// @ts-check\n// Module geonovum/l10n\n// Looks at the lang attribute on the root element and uses it to manage the config.l10n object so\n// that other parts of the system can localise their text\nimport { html } from \"../core/import-maps.js\";\nimport { l10n } from \"../core/l10n.js\";\nexport const name = \"geonovum/l10n\";\nconst additions = {\n  en: {\n    status_at_publication: html`This section describes the status of this\n      document at the time of its publication. Other documents may supersede\n      this document. A list of current Geonovum publications and the latest\n      revision of this document can be found via\n      <a href=\"https://www.geonovum.nl/geo-standaarden/alle-standaarden\"\n        >https://www.geonovum.nl/geo-standaarden/alle-standaarden</a\n      >(in Dutch).`,\n  },\n  nl: {\n    status_at_publication: html`Deze paragraaf beschrijft de status van dit\n      document ten tijde van publicatie. Het is mogelijk dat er actuelere\n      versies van dit document bestaan. Een lijst van Geonovum publicaties en de\n      laatste gepubliceerde versie van dit document zijn te vinden op\n      <a href=\"https://www.geonovum.nl/geo-standaarden/alle-standaarden\"\n        >https://www.geonovum.nl/geo-standaarden/alle-standaarden</a\n      >.`,\n  },\n};\n\nObject.keys(additions).forEach(key => {\n  if (!l10n[key]) l10n[key] = {};\n  Object.assign(l10n[key], additions[key]);\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","/**\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","// @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","// @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// 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 or a `a`, 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,a\");\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","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\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 * 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\n// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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\">↑</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","// @ts-check\n// Module geonovum/conformance\n// Handle the conformance section properly.\n// based on W3C conformance, but because Geonovum has different requirements, have a separate module\nimport { html } from \"../core/import-maps.js\";\nexport const name = \"geonovum/conformance\";\n\n/**\n * @param {Element} conformance\n */\nfunction processConformance(conformance) {\n  const content = html`\n    <h2>Conformiteit</h2>\n    <p>\n      Naast onderdelen die als niet normatief gemarkeerd zijn, zijn ook alle\n      diagrammen, voorbeelden, en noten in dit document niet normatief. Verder\n      is alles in dit document normatief.\n    </p>\n    <p>Informatief en normatief.</p>\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run() {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance) {\n    processConformance(conformance);\n  }\n}\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 { 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\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/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","/*\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","/* 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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\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 \"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 \"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"],"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","norm","getIntlData","localizationStrings","data","getIntlDataForKey","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","codedJoinOr","quotes","addQuotes","docLink","strings","reindent","endsWith","linkingText","lines","indents","leastIndent","mimeTypes","rsDocToDataURL","format","validTypes","encodeURIComponent","cloneDoc","head","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$f","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","substituteWithTextNodes","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$o","style$1","l10n$m","github$1","dataInclude","dataTransform","inlines","examples","issuesNotes","bestPractices","figures","biblio$1","linkToDfn","dataCite","renderBiblio","contrib","sections","fixHeaders","structure","informative","idHeaders","conformance","saveHtml","searchSpecref","aboutRespec","seo","highlight","dataTests","listSorter","highlightVars$1","algorithms","anchorExpander","dfnPanel","dfnContract","checkCharset","checkPunctuation","localRefsExist","noHeadinglessSections","noUnusedVars","privsecSection","noHttpProps","ReSpec.run","hash","newHash","isLegacyFrag","coreDefaults","lint","specStatus","highlightVars","addSectionLinks","licenses","short","geonovumDefaults","doJsonLd","license","logos","alt","height","width","isCCBY","licenseInfo","isBasic","isRegular","computeProps","css$d","noReSpecCSS","createStyle","css_name","resourceHints","createResourceHints","favicon","meta","delimiter","separator","toKeyValuePairs","createMetaViewport","styleFile","noToc","attachFixupScript","urls","frag","reduce","nextLink","linkCSS","additions","status_at_publication","nl","resolveGithubPromise","rejectGithubPromise","github","file_a_bug","participate","commit_history","ko","zh","ja","es","ghURL","tempURL","repoURL","org","repo","pathname","branch","issueBase","commitHistoryURL","newProps","edDraftURI","githubToken","githubUser","atRiskBase","otherLinks","pullBase","shortName","githubAPI","hostname","excludeGithubLinks","otherLink","normalizedGHObj","apiBase","fullName","issuesURL","pullsURL","newIssuesURL","normalizedConfig","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","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","base","ALLOWED_TYPES","readyPromise","openDB","deleteObjectStore","createObjectStore","keyPath","createIndex","unique","now","Date","range","IDBKeyRange","lowerBound","entry","expires","openIdb","biblioDB","isAlias","resolveAlias","only","aliasOf","addAll","aliasesAndRefs","alias","reference","promisesToAdd","flatMap","isInDB","put","close","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","forceUpdate","refsToFetch","onLine","ok","status","json","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","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","contains","dfnFor","validateDefinition","idl","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","terms","plurals","userDefinedPlurals","uniquePlurals","css$b","makeTitle","num","report","number","div","inAside","exampleTitle","css$9","editors_note","feature_at_risk","issue","issue_summary","no_issues_in_spec","note","handleIssues","ins","ghIssues","getIssueNumber","Number","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","insertAdjacentHTML","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","issueNumbers","issues","fetchAndStoreGithubIssues","headElem","ednote","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","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","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","xref","editors","editor","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","res","maxAge","Request","cache","cachedResponse","caches","clonedResponse","customHeaders","Headers","expiryDate","toISOString","cacheResponse","Response","blob","fetchAndCache","showContributors","getParents","lowerHeaderTags","toc","scanSections","maxTocLevel","prefix","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","Boolean","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","processConformance","save_snapshot","downloadLinks","epubURL","toDownloadLink","sep","concatDate","publishDate","filename","saveDialog","supportsDownload","HTMLAnchorElement","search_specref","specrefSearchUI","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","css$7","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","default","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","namespace","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","missing_test_suite_uri","tests","toListItem","emojiList","testFile","testParts","testFileName","requiresConnectionEmoji","manualPerformEmoji","toTestURLs","testSuiteURI","handleDuplicates","testURLs","codedJoinAnd","uniqueList","testables","makeSorter","direction","order","sortListItems","sortDefinitionTerms","dl","nextType","nextName","sortables","sortedElems","selectNodeContents","css$5","highlightListener","varElem","hightligtedElems","highlightColor","getHighlightColor","varsToHighlight","colorStatus","HL_COLORS","removeHighlight","addHighlight","resetListener","hlColor","activeClass","outputDoc","css$3","textNode","Text","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","definition","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","metas","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLHeadingElement","sectionContainsA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/respec-highlight.js b/builds/respec-highlight.js
      index 3abae99cbc..c9c754cf37 100644
      --- a/builds/respec-highlight.js
      +++ b/builds/respec-highlight.js
      @@ -1 +1 @@
      -var hljs=function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{const i=e[t],a=typeof i;"object"!==a&&"function"!==a||Object.isFrozen(i)||n(i)})),e}class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e,...n){const t=Object.create(null);for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}const r=e=>!!e.scope;class o{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!r(e))return;const n=((e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const t=e.split(".");return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ")}return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)}closeNode(e){r(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const s=(e={})=>{const n={children:[]};return Object.assign(n,e),n};class c{constructor(){this.rootNode=s(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n=s({scope:e});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{c._collapse(e)})))}}class l extends c{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,n){const t=e.root;n&&(t.scope=`language:${n}`),this.add(t)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(e){return e?"string"==typeof e?e:e.source:null}function g(e){return b("(?=",e,")")}function u(e){return b("(?:",e,")*")}function h(e){return b("(?:",e,")?")}function b(...e){return e.map((e=>d(e))).join("")}function m(...e){const n=function(e){const n=e[e.length-1];return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}(e);return"("+(n.capture?"":"?:")+e.map((e=>d(e))).join("|")+")"}function p(e){return new RegExp(e.toString()+"|").exec("").length-1}const f=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function y(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t;let i=d(e),a="";for(;i.length>0;){const e=f.exec(i);if(!e){a+=i;break}a+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+n):(a+=e[0],"("===e[0]&&t++)}return a})).map((e=>`(${e})`)).join(n)}const E="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",_="\\b\\d+(\\.\\d+)?",x="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",v="\\b(0b[01]+)",k={begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[k]},O={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[k]},A=function(e,n,t={}){const i=a({scope:"comment",begin:e,end:n,contains:[]},t);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const r=m("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:b(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},S=A("//","$"),M=A("/\\*","\\*/"),T=A("#","$"),R={scope:"number",begin:_,relevance:0},I={scope:"number",begin:x,relevance:0},C={scope:"number",begin:v,relevance:0},L={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[k,{begin:/\[/,end:/\]/,relevance:0,contains:[k]}]},j={scope:"title",begin:E,relevance:0},B={scope:"title",begin:w,relevance:0},D={begin:"\\.\\s*"+w,relevance:0};var z=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:k,BINARY_NUMBER_MODE:C,BINARY_NUMBER_RE:v,COMMENT:A,C_BLOCK_COMMENT_MODE:M,C_LINE_COMMENT_MODE:S,C_NUMBER_MODE:I,C_NUMBER_RE:x,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:E,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:D,NUMBER_MODE:R,NUMBER_RE:_,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:O,REGEXP_MODE:L,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=b(n,/.*\b/,e.binary,/\b.*/)),a({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},TITLE_MODE:j,UNDERSCORE_IDENT_RE:w,UNDERSCORE_TITLE_MODE:B});function P(e,n){"."===e.input[e.index-1]&&n.ignoreMatch()}function $(e,n){void 0!==e.className&&(e.scope=e.className,delete e.className)}function U(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=P,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function H(e,n){Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function Z(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function F(e,n){void 0===e.relevance&&(e.relevance=1)}const G=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n]})),e.keywords=t.keywords,e.begin=b(t.beforeMatch,g(t.begin)),e.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},e.relevance=0,delete t.beforeMatch},W=["of","and","for","in","not","or","if","then","parent","list","value"],K="keyword";function X(e,n,t=K){const i=Object.create(null);return"string"==typeof e?a(t,e.split(" ")):Array.isArray(e)?a(t,e):Object.keys(e).forEach((function(t){Object.assign(i,X(e[t],n,t))})),i;function a(e,t){n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((function(n){const t=n.split("|");i[t[0]]=[e,q(t[0],t[1])]}))}}function q(e,n){return n?Number(n):function(e){return W.includes(e.toLowerCase())}(e)?0:1}const Q={},V=e=>{console.error(e)},J=(e,...n)=>{console.log(`WARN: ${e}`,...n)},Y=(e,n)=>{Q[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),Q[`${e}/${n}`]=!0)},ee=new Error;function ne(e,n,{key:t}){let i=0;const a=e[t],r={},o={};for(let e=1;e<=n.length;e++)o[e+i]=a[e],r[e+i]=!0,i+=p(n[e-1]);e[t]=o,e[t]._emit=r,e[t]._multi=!0}function te(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw V("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ee;if("object"!=typeof e.beginScope||null===e.beginScope)throw V("beginScope must be object"),ee;ne(e,e.begin,{key:"beginScope"}),e.begin=y(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw V("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ee;if("object"!=typeof e.endScope||null===e.endScope)throw V("endScope must be object"),ee;ne(e,e.end,{key:"endScope"}),e.end=y(e.end,{joinWith:""})}}(e)}function ie(e){function n(n,t){return new RegExp(d(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(y(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),i=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))),n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;let t=n.exec(e);if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&this.considerAll()),t}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),function t(r,o){const s=r;if(r.isCompiled)return s;[$,Z,te,G].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))),r.__beforeBegin=null,[U,H,F].forEach((e=>e(r,o))),r.isCompiled=!0;let c=null;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),c=r.keywords.$pattern,delete r.keywords.$pattern),c=c||/\w+/,r.keywords&&(r.keywords=X(r.keywords,e.case_insensitive)),s.keywordPatternRe=n(c,!0),o&&(r.begin||(r.begin=/\B|\b/),s.beginRe=n(s.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(s.endRe=n(s.end)),s.terminatorEnd=d(s.end)||"",r.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(s.illegalRe=n(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(n){return a(e,{variants:null},n)})));if(e.cachedVariants)return e.cachedVariants;if(ae(e))return a(e,{starts:e.starts?a(e.starts):null});if(Object.isFrozen(e))return a(e);return e}("self"===e?r:e)}))),r.contains.forEach((function(e){t(e,s)})),r.starts&&t(r.starts,o),s.matcher=function(e){const n=new i;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(s),s}(e)}function ae(e){return!!e&&(e.endsWithParent||ae(e.starts))}class re extends Error{constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}}const oe=i,se=a,ce=Symbol("nomatch"),le=function(e){const i=Object.create(null),a=Object.create(null),r=[];let o=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let d={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function p(e){return d.noHighlightRe.test(e)}function f(e,n,t){let i="",a="";"object"==typeof n?(i=e,t=n.ignoreIllegals,a=n.language):(Y("10.7.0","highlight(lang, code, ...args) has been deprecated."),Y("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),a=e,i=n),void 0===t&&(t=!0);const r={code:i,language:a};O("before:highlight",r);const o=r.result?r.result:y(r.language,r.code,t);return o.code=r.code,O("after:highlight",o),o}function y(e,n,a,r){const c=Object.create(null);function l(){if(!O.keywords)return void S.addText(M);let e=0;O.keywordPatternRe.lastIndex=0;let n=O.keywordPatternRe.exec(M),t="";for(;n;){t+=M.substring(e,n.index);const a=x.case_insensitive?n[0].toLowerCase():n[0],r=(i=a,O.keywords[i]);if(r){const[e,i]=r;if(S.addText(t),t="",c[a]=(c[a]||0)+1,c[a]<=7&&(T+=i),e.startsWith("_"))t+=n[0];else{const t=x.classNameAliases[e]||e;u(n[0],t)}}else t+=n[0];e=O.keywordPatternRe.lastIndex,n=O.keywordPatternRe.exec(M)}var i;t+=M.substring(e),S.addText(t)}function g(){null!=O.subLanguage?function(){if(""===M)return;let e=null;if("string"==typeof O.subLanguage){if(!i[O.subLanguage])return void S.addText(M);e=y(O.subLanguage,M,!0,A[O.subLanguage]),A[O.subLanguage]=e._top}else e=E(M,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(T+=e.relevance),S.__addSublanguage(e._emitter,e.language)}():l(),M=""}function u(e,n){""!==e&&(S.startScope(n),S.addText(e),S.endScope())}function h(e,n){let t=1;const i=n.length-1;for(;t<=i;){if(!e._emit[t]){t++;continue}const i=x.classNameAliases[e[t]]||e[t],a=n[t];i?u(a,i):(M=a,l(),M=""),t++}}function b(e,n){return e.scope&&"string"==typeof e.scope&&S.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(u(M,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),M=""):e.beginScope._multi&&(h(e.beginScope,n),M="")),O=Object.create(e,{parent:{value:O}}),O}function m(e,n,i){let a=function(e,n){const t=e&&e.exec(n);return t&&0===t.index}(e.endRe,i);if(a){if(e["on:end"]){const i=new t(e);e["on:end"](n,i),i.isMatchIgnored&&(a=!1)}if(a){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,n,i)}function p(e){return 0===O.matcher.regexIndex?(M+=e[0],1):(C=!0,0)}function f(e){const t=e[0],i=n.substring(e.index),a=m(O,e,i);if(!a)return ce;const r=O;O.endScope&&O.endScope._wrap?(g(),u(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(g(),h(O.endScope,e)):r.skip?M+=t:(r.returnEnd||r.excludeEnd||(M+=t),g(),r.excludeEnd&&(M=t));do{O.scope&&S.closeNode(),O.skip||O.subLanguage||(T+=O.relevance),O=O.parent}while(O!==a.parent);return a.starts&&b(a.starts,e),r.returnEnd?0:t.length}let w={};function _(i,r){const s=r&&r[0];if(M+=i,null==s)return g(),0;if("begin"===w.type&&"end"===r.type&&w.index===r.index&&""===s){if(M+=n.slice(r.index,r.index+1),!o){const n=new Error(`0 width match regex (${e})`);throw n.languageName=e,n.badRule=w.rule,n}return 1}if(w=r,"begin"===r.type)return function(e){const n=e[0],i=e.rule,a=new t(i),r=[i.__beforeBegin,i["on:begin"]];for(const t of r)if(t&&(t(e,a),a.isMatchIgnored))return p(n);return i.skip?M+=n:(i.excludeBegin&&(M+=n),g(),i.returnBegin||i.excludeBegin||(M=n)),b(i,e),i.returnBegin?0:n.length}(r);if("illegal"===r.type&&!a){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(O.scope||"<unnamed>")+'"');throw e.mode=O,e}if("end"===r.type){const e=f(r);if(e!==ce)return e}if("illegal"===r.type&&""===s)return 1;if(I>1e5&&I>3*r.index){throw new Error("potential infinite loop, way more iterations than matches")}return M+=s,s.length}const x=v(e);if(!x)throw V(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=ie(x);let N="",O=r||k;const A={},S=new d.__emitter(d);!function(){const e=[];for(let n=O;n!==x;n=n.parent)n.scope&&e.unshift(n.scope);e.forEach((e=>S.openNode(e)))}();let M="",T=0,R=0,I=0,C=!1;try{if(x.__emitTokens)x.__emitTokens(n,S);else{for(O.matcher.considerAll();;){I++,C?C=!1:O.matcher.considerAll(),O.matcher.lastIndex=R;const e=O.matcher.exec(n);if(!e)break;const t=_(n.substring(R,e.index),e);R=e.index+t}_(n.substring(R))}return S.finalize(),N=S.toHTML(),{language:e,value:N,relevance:T,illegal:!1,_emitter:S,_top:O}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:oe(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:R,context:n.slice(R-100,R+100),mode:t.mode,resultSoFar:N},_emitter:S};if(o)return{language:e,value:oe(n),illegal:!1,relevance:0,errorRaised:t,_emitter:S,_top:O};throw t}}function E(e,n){n=n||d.languages||Object.keys(i);const t=function(e){const n={value:oe(e),illegal:!1,relevance:0,_top:c,_emitter:new d.__emitter(d)};return n._emitter.addText(e),n}(e),a=n.filter(v).filter(N).map((n=>y(n,e,!1)));a.unshift(t);const r=a.sort(((e,n)=>{if(e.relevance!==n.relevance)return n.relevance-e.relevance;if(e.language&&n.language){if(v(e.language).supersetOf===n.language)return 1;if(v(n.language).supersetOf===e.language)return-1}return 0})),[o,s]=r,l=o;return l.secondBest=s,l}function w(e){let n=null;const t=function(e){let n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=d.languageDetectRe.exec(n);if(t){const n=v(t[1]);return n||(J(s.replace("{}",t[1])),J("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"}return n.split(/\s+/).find((e=>p(e)||v(e)))}(e);if(p(t))return;if(O("before:highlightElement",{el:e,language:t}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(d.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),d.throwUnescapedHTML)){throw new re("One of your code blocks includes unescaped HTML.",e.innerHTML)}n=e;const i=n.textContent,r=t?f(i,{language:t,ignoreIllegals:!0}):E(i);e.innerHTML=r.value,e.dataset.highlighted="yes",function(e,n,t){const i=n&&a[n]||t;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,t,r.language),e.result={language:r.language,re:r.relevance,relevance:r.relevance},r.secondBest&&(e.secondBest={language:r.secondBest.language,relevance:r.secondBest.relevance}),O("after:highlightElement",{el:e,result:r,text:i})}let _=!1;function x(){if("loading"===document.readyState)return void(_=!0);document.querySelectorAll(d.cssSelector).forEach(w)}function v(e){return e=(e||"").toLowerCase(),i[e]||i[a[e]]}function k(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{a[e.toLowerCase()]=n}))}function N(e){const n=v(e);return n&&!n.disableAutodetect}function O(e,n){const t=e;r.forEach((function(e){e[t]&&e[t](n)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){_&&x()}),!1),Object.assign(e,{highlight:f,highlightAuto:E,highlightAll:x,highlightElement:w,highlightBlock:function(e){return Y("10.7.0","highlightBlock will be removed entirely in v12.0"),Y("10.7.0","Please use highlightElement now."),w(e)},configure:function(e){d=se(d,e)},initHighlighting:()=>{x(),Y("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")},initHighlightingOnLoad:function(){x(),Y("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")},registerLanguage:function(n,t){let a=null;try{a=t(e)}catch(e){if(V("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;V(e),a=c}a.name||(a.name=n),i[n]=a,a.rawDefinition=t.bind(null,e),a.aliases&&k(a.aliases,{languageName:n})},unregisterLanguage:function(e){delete i[e];for(const n of Object.keys(a))a[n]===e&&delete a[n]},listLanguages:function(){return Object.keys(i)},getLanguage:v,registerAliases:k,autoDetection:N,inherit:se,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{e["before:highlightBlock"](Object.assign({block:n.el},n))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{e["after:highlightBlock"](Object.assign({block:n.el},n))})}(e),r.push(e)},removePlugin:function(e){const n=r.indexOf(e);-1!==n&&r.splice(n,1)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="11.9.0",e.regex={concat:b,lookahead:g,either:m,optional:h,anyNumberOfTimes:u};for(const e in z)"object"==typeof z[e]&&n(z[e]);return Object.assign(e,z),e},de=le({});de.newInstance=()=>le({});var ge=de;de.HighlightJS=de,de.default=de;var ue=e(ge);const he=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],be=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],me=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],pe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],fe=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();const ye="[A-Za-z$_][0-9A-Za-z$_]*",Ee=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],we=["true","false","null","undefined","NaN","Infinity"],_e=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xe=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ve=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ke=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ne=[].concat(ve,_e,xe);return ue.configure({tabReplace:"  ",languages:["abnf","css","http","javascript","json","xml"]}),ue.registerLanguage("abnf",(function(e){const n=e.regex,t=e.COMMENT(/;/,/$/);return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],contains:[{scope:"operator",match:/=\/?/},{scope:"attribute",match:n.concat(/^[a-zA-Z][a-zA-Z0-9-]*/,/(?=\s*=)/)},t,{scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},{scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},{scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},{scope:"symbol",match:/%[si](?=".*")/},e.QUOTE_STRING_MODE,e.NUMBER_MODE]}})),ue.registerLanguage("css",(function(e){const n=e.regex,t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),i=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+me.join("|")+")"},{begin:":(:)?("+pe.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+fe.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:n.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:be.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+he.join("|")+")\\b"}]}})),ue.registerLanguage("http",(function(e){const n="HTTP/([32]|1\\.[01])",t={className:"attribute",begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},i=[t,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+n+" \\d{3})",end:/$/,contains:[{className:"meta",begin:n},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},{begin:"(?=^[A-Z]+ (.*?) "+n+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:n},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},e.inherit(t,{relevance:0})]}})),ue.registerLanguage("javascript",(function(e){const n=e.regex,t=ye,i="<>",a="</>",r={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{const t=e[0].length+e.index,i=e.input[t];if("<"===i||","===i)return void n.ignoreMatch();let a;">"===i&&(((e,{after:n})=>{const t="</"+e[0].slice(1);return-1!==e.input.indexOf(t,n)})(e,{after:t})||n.ignoreMatch());const r=e.input.substring(t);((a=r.match(/^\s*=/))||(a=r.match(/^\s+extends\s+/))&&0===a.index)&&n.ignoreMatch()}},o={$pattern:ye,keyword:Ee,literal:we,built_in:Ne,"variable.language":ke},s="[0-9](_?[0-9])*",c=`\\.(${s})`,l="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${l})((${c})|\\.)?|(${c}))[eE][+-]?(${s})\\b`},{begin:`\\b(${l})\\b((${c})\\b|\\.)?|(${c})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},u={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},b={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},m={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},p={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,h,b,m,{match:/\$\d+/},d];g.contains=f.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(f)});const y=[].concat(p,g.contains),E=y.concat([{begin:/\(/,end:/\)/,keywords:o,contains:["self"].concat(y)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:E},_={variants:[{match:[/class/,/\s+/,t,/\s+/,/extends/,/\s+/,n.concat(t,"(",n.concat(/\./,t),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,t],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[..._e,...xe]}},v={variants:[{match:[/function/,/\s+/,t,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},k={match:n.concat(/\b/,(N=[...ve,"super","import"],n.concat("(?!",N.join("|"),")")),t,n.lookahead(/\(/)),className:"title.function",relevance:0};var N;const O={begin:n.concat(/\./,n.lookahead(n.concat(t,/(?![0-9A-Za-z$_(])/))),end:t,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},A={match:[/get|set/,/\s+/,t,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,t,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,h,b,m,p,{match:/\$\d+/},d,x,{className:"attr",begin:t+n.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[p,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:a},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:r.begin,"on:begin":r.isTrulyOpeningTag,end:r.end}],subLanguage:"xml",contains:[{begin:r.begin,end:r.end,skip:!0,contains:["self"]}]}]},v,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:t,className:"title.function"})]},{match:/\.\.\./,relevance:0},O,{match:"\\$"+t,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},_,A,{match:/\$[(.]/}]}})),ue.registerLanguage("json",(function(e){const n=["true","false","null"],t={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",keywords:{literal:n},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,t,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),ue.registerLanguage("xml",(function(e){const n=e.regex,t=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},r=e.inherit(a,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),c={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,s,o,r,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,r,s,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[c],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[c],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(t,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:c}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),ue}();
      +var hljs=function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{const i=e[t],r=typeof i;"object"!==r&&"function"!==r||Object.isFrozen(i)||n(i)})),e}class t{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(e,...n){const t=Object.create(null);for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}const a=e=>!!e.scope;class o{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!a(e))return;const n=((e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const t=e.split(".");return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ")}return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)}closeNode(e){a(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const s=(e={})=>{const n={children:[]};return Object.assign(n,e),n};class l{constructor(){this.rootNode=s(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n=s({scope:e});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,n){const t=e.root;n&&(t.scope=`language:${n}`),this.add(t)}toHTML(){return new o(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(e){return e?"string"==typeof e?e:e.source:null}function g(e){return b("(?=",e,")")}function u(e){return b("(?:",e,")*")}function h(e){return b("(?:",e,")?")}function b(...e){return e.map((e=>d(e))).join("")}function f(...e){const n=function(e){const n=e[e.length-1];return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}(e);return"("+(n.capture?"":"?:")+e.map((e=>d(e))).join("|")+")"}function p(e){return new RegExp(e.toString()+"|").exec("").length-1}const m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function y(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t;let i=d(e),r="";for(;i.length>0;){const e=m.exec(i);if(!e){r+=i;break}r+=i.substring(0,e.index),i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+String(Number(e[1])+n):(r+=e[0],"("===e[0]&&t++)}return r})).map((e=>`(${e})`)).join(n)}const E="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",k="\\b\\d+(\\.\\d+)?",x="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",_="\\b(0b[01]+)",v={begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[v]},O={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[v]},A=function(e,n,t={}){const i=r({scope:"comment",begin:e,end:n,contains:[]},t);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return i.contains.push({begin:b(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},S=A("//","$"),M=A("/\\*","\\*/"),T=A("#","$"),R={scope:"number",begin:k,relevance:0},I={scope:"number",begin:x,relevance:0},C={scope:"number",begin:_,relevance:0},L={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,contains:[v]}]},j={scope:"title",begin:E,relevance:0},B={scope:"title",begin:w,relevance:0},D={begin:"\\.\\s*"+w,relevance:0};var z=Object.freeze({__proto__:null,APOS_STRING_MODE:N,BACKSLASH_ESCAPE:v,BINARY_NUMBER_MODE:C,BINARY_NUMBER_RE:_,COMMENT:A,C_BLOCK_COMMENT_MODE:M,C_LINE_COMMENT_MODE:S,C_NUMBER_MODE:I,C_NUMBER_RE:x,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{n.data._beginMatch!==e[1]&&n.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:E,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:D,NUMBER_MODE:R,NUMBER_RE:k,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:O,REGEXP_MODE:L,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=b(n,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},TITLE_MODE:j,UNDERSCORE_IDENT_RE:w,UNDERSCORE_TITLE_MODE:B});function P(e,n){"."===e.input[e.index-1]&&n.ignoreMatch()}function $(e,n){void 0!==e.className&&(e.scope=e.className,delete e.className)}function U(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=P,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function H(e,n){Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function Z(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function G(e,n){void 0===e.relevance&&(e.relevance=1)}const F=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n]})),e.keywords=t.keywords,e.begin=b(t.beforeMatch,g(t.begin)),e.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},e.relevance=0,delete t.beforeMatch},W=["of","and","for","in","not","or","if","then","parent","list","value"],K="keyword";function X(e,n,t=K){const i=Object.create(null);return"string"==typeof e?r(t,e.split(" ")):Array.isArray(e)?r(t,e):Object.keys(e).forEach((function(t){Object.assign(i,X(e[t],n,t))})),i;function r(e,t){n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((function(n){const t=n.split("|");i[t[0]]=[e,q(t[0],t[1])]}))}}function q(e,n){return n?Number(n):function(e){return W.includes(e.toLowerCase())}(e)?0:1}const Q={},V=e=>{console.error(e)},J=(e,...n)=>{console.log(`WARN: ${e}`,...n)},Y=(e,n)=>{Q[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),Q[`${e}/${n}`]=!0)},ee=new Error;function ne(e,n,{key:t}){let i=0;const r=e[t],a={},o={};for(let e=1;e<=n.length;e++)o[e+i]=r[e],a[e+i]=!0,i+=p(n[e-1]);e[t]=o,e[t]._emit=a,e[t]._multi=!0}function te(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw V("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ee;if("object"!=typeof e.beginScope||null===e.beginScope)throw V("beginScope must be object"),ee;ne(e,e.begin,{key:"beginScope"}),e.begin=y(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw V("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ee;if("object"!=typeof e.endScope||null===e.endScope)throw V("endScope must be object"),ee;ne(e,e.end,{key:"endScope"}),e.end=y(e.end,{joinWith:""})}}(e)}function ie(e){function n(n,t){return new RegExp(d(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,n){n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=n(y(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const n=this.matcherRe.exec(e);if(!n)return null;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),i=this.matchIndexes[t];return n.splice(0,t),Object.assign(n,i)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))),n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex;let t=n.exec(e);if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}return t&&(this.regexIndex+=t.position+1,this.regexIndex===this.count&&this.considerAll()),t}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language.  See documentation.");return e.classNameAliases=r(e.classNameAliases||{}),function t(a,o){const s=a;if(a.isCompiled)return s;[$,Z,te,F].forEach((e=>e(a,o))),e.compilerExtensions.forEach((e=>e(a,o))),a.__beforeBegin=null,[U,H,G].forEach((e=>e(a,o))),a.isCompiled=!0;let l=null;return"object"==typeof a.keywords&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),l=a.keywords.$pattern,delete a.keywords.$pattern),l=l||/\w+/,a.keywords&&(a.keywords=X(a.keywords,e.case_insensitive)),s.keywordPatternRe=n(l,!0),o&&(a.begin||(a.begin=/\B|\b/),s.beginRe=n(s.begin),a.end||a.endsWithParent||(a.end=/\B|\b/),a.end&&(s.endRe=n(s.end)),s.terminatorEnd=d(s.end)||"",a.endsWithParent&&o.terminatorEnd&&(s.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(s.illegalRe=n(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(n){return r(e,{variants:null},n)})));if(e.cachedVariants)return e.cachedVariants;if(re(e))return r(e,{starts:e.starts?r(e.starts):null});if(Object.isFrozen(e))return r(e);return e}("self"===e?a:e)}))),a.contains.forEach((function(e){t(e,s)})),a.starts&&t(a.starts,o),s.matcher=function(e){const n=new i;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n}(s),s}(e)}function re(e){return!!e&&(e.endsWithParent||re(e.starts))}class ae extends Error{constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}}const oe=i,se=r,le=Symbol("nomatch"),ce=function(e){const i=Object.create(null),r=Object.create(null),a=[];let o=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let d={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function p(e){return d.noHighlightRe.test(e)}function m(e,n,t){let i="",r="";"object"==typeof n?(i=e,t=n.ignoreIllegals,r=n.language):(Y("10.7.0","highlight(lang, code, ...args) has been deprecated."),Y("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),r=e,i=n),void 0===t&&(t=!0);const a={code:i,language:r};O("before:highlight",a);const o=a.result?a.result:y(a.language,a.code,t);return o.code=a.code,O("after:highlight",o),o}function y(e,n,r,a){const l=Object.create(null);function c(){if(!O.keywords)return void S.addText(M);let e=0;O.keywordPatternRe.lastIndex=0;let n=O.keywordPatternRe.exec(M),t="";for(;n;){t+=M.substring(e,n.index);const r=x.case_insensitive?n[0].toLowerCase():n[0],a=(i=r,O.keywords[i]);if(a){const[e,i]=a;if(S.addText(t),t="",l[r]=(l[r]||0)+1,l[r]<=7&&(T+=i),e.startsWith("_"))t+=n[0];else{const t=x.classNameAliases[e]||e;u(n[0],t)}}else t+=n[0];e=O.keywordPatternRe.lastIndex,n=O.keywordPatternRe.exec(M)}var i;t+=M.substring(e),S.addText(t)}function g(){null!=O.subLanguage?function(){if(""===M)return;let e=null;if("string"==typeof O.subLanguage){if(!i[O.subLanguage])return void S.addText(M);e=y(O.subLanguage,M,!0,A[O.subLanguage]),A[O.subLanguage]=e._top}else e=E(M,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(T+=e.relevance),S.__addSublanguage(e._emitter,e.language)}():c(),M=""}function u(e,n){""!==e&&(S.startScope(n),S.addText(e),S.endScope())}function h(e,n){let t=1;const i=n.length-1;for(;t<=i;){if(!e._emit[t]){t++;continue}const i=x.classNameAliases[e[t]]||e[t],r=n[t];i?u(r,i):(M=r,c(),M=""),t++}}function b(e,n){return e.scope&&"string"==typeof e.scope&&S.openNode(x.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(u(M,x.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),M=""):e.beginScope._multi&&(h(e.beginScope,n),M="")),O=Object.create(e,{parent:{value:O}}),O}function f(e,n,i){let r=function(e,n){const t=e&&e.exec(n);return t&&0===t.index}(e.endRe,i);if(r){if(e["on:end"]){const i=new t(e);e["on:end"](n,i),i.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return f(e.parent,n,i)}function p(e){return 0===O.matcher.regexIndex?(M+=e[0],1):(C=!0,0)}function m(e){const t=e[0],i=n.substring(e.index),r=f(O,e,i);if(!r)return le;const a=O;O.endScope&&O.endScope._wrap?(g(),u(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(g(),h(O.endScope,e)):a.skip?M+=t:(a.returnEnd||a.excludeEnd||(M+=t),g(),a.excludeEnd&&(M=t));do{O.scope&&S.closeNode(),O.skip||O.subLanguage||(T+=O.relevance),O=O.parent}while(O!==r.parent);return r.starts&&b(r.starts,e),a.returnEnd?0:t.length}let w={};function k(i,a){const s=a&&a[0];if(M+=i,null==s)return g(),0;if("begin"===w.type&&"end"===a.type&&w.index===a.index&&""===s){if(M+=n.slice(a.index,a.index+1),!o){const n=new Error(`0 width match regex (${e})`);throw n.languageName=e,n.badRule=w.rule,n}return 1}if(w=a,"begin"===a.type)return function(e){const n=e[0],i=e.rule,r=new t(i),a=[i.__beforeBegin,i["on:begin"]];for(const t of a)if(t&&(t(e,r),r.isMatchIgnored))return p(n);return i.skip?M+=n:(i.excludeBegin&&(M+=n),g(),i.returnBegin||i.excludeBegin||(M=n)),b(i,e),i.returnBegin?0:n.length}(a);if("illegal"===a.type&&!r){const e=new Error('Illegal lexeme "'+s+'" for mode "'+(O.scope||"<unnamed>")+'"');throw e.mode=O,e}if("end"===a.type){const e=m(a);if(e!==le)return e}if("illegal"===a.type&&""===s)return 1;if(I>1e5&&I>3*a.index){throw new Error("potential infinite loop, way more iterations than matches")}return M+=s,s.length}const x=_(e);if(!x)throw V(s.replace("{}",e)),new Error('Unknown language: "'+e+'"');const v=ie(x);let N="",O=a||v;const A={},S=new d.__emitter(d);!function(){const e=[];for(let n=O;n!==x;n=n.parent)n.scope&&e.unshift(n.scope);e.forEach((e=>S.openNode(e)))}();let M="",T=0,R=0,I=0,C=!1;try{if(x.__emitTokens)x.__emitTokens(n,S);else{for(O.matcher.considerAll();;){I++,C?C=!1:O.matcher.considerAll(),O.matcher.lastIndex=R;const e=O.matcher.exec(n);if(!e)break;const t=k(n.substring(R,e.index),e);R=e.index+t}k(n.substring(R))}return S.finalize(),N=S.toHTML(),{language:e,value:N,relevance:T,illegal:!1,_emitter:S,_top:O}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:oe(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:R,context:n.slice(R-100,R+100),mode:t.mode,resultSoFar:N},_emitter:S};if(o)return{language:e,value:oe(n),illegal:!1,relevance:0,errorRaised:t,_emitter:S,_top:O};throw t}}function E(e,n){n=n||d.languages||Object.keys(i);const t=function(e){const n={value:oe(e),illegal:!1,relevance:0,_top:l,_emitter:new d.__emitter(d)};return n._emitter.addText(e),n}(e),r=n.filter(_).filter(N).map((n=>y(n,e,!1)));r.unshift(t);const a=r.sort(((e,n)=>{if(e.relevance!==n.relevance)return n.relevance-e.relevance;if(e.language&&n.language){if(_(e.language).supersetOf===n.language)return 1;if(_(n.language).supersetOf===e.language)return-1}return 0})),[o,s]=a,c=o;return c.secondBest=s,c}function w(e){let n=null;const t=function(e){let n=e.className+" ";n+=e.parentNode?e.parentNode.className:"";const t=d.languageDetectRe.exec(n);if(t){const n=_(t[1]);return n||(J(s.replace("{}",t[1])),J("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"}return n.split(/\s+/).find((e=>p(e)||_(e)))}(e);if(p(t))return;if(O("before:highlightElement",{el:e,language:t}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(d.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),d.throwUnescapedHTML)){throw new ae("One of your code blocks includes unescaped HTML.",e.innerHTML)}n=e;const i=n.textContent,a=t?m(i,{language:t,ignoreIllegals:!0}):E(i);e.innerHTML=a.value,e.dataset.highlighted="yes",function(e,n,t){const i=n&&r[n]||t;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,t,a.language),e.result={language:a.language,re:a.relevance,relevance:a.relevance},a.secondBest&&(e.secondBest={language:a.secondBest.language,relevance:a.secondBest.relevance}),O("after:highlightElement",{el:e,result:a,text:i})}let k=!1;function x(){if("loading"===document.readyState)return void(k=!0);document.querySelectorAll(d.cssSelector).forEach(w)}function _(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}function v(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=n}))}function N(e){const n=_(e);return n&&!n.disableAutodetect}function O(e,n){const t=e;a.forEach((function(e){e[t]&&e[t](n)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){k&&x()}),!1),Object.assign(e,{highlight:m,highlightAuto:E,highlightAll:x,highlightElement:w,highlightBlock:function(e){return Y("10.7.0","highlightBlock will be removed entirely in v12.0"),Y("10.7.0","Please use highlightElement now."),w(e)},configure:function(e){d=se(d,e)},initHighlighting:()=>{x(),Y("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")},initHighlightingOnLoad:function(){x(),Y("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")},registerLanguage:function(n,t){let r=null;try{r=t(e)}catch(e){if(V("Language definition for '{}' could not be registered.".replace("{}",n)),!o)throw e;V(e),r=l}r.name||(r.name=n),i[n]=r,r.rawDefinition=t.bind(null,e),r.aliases&&v(r.aliases,{languageName:n})},unregisterLanguage:function(e){delete i[e];for(const n of Object.keys(r))r[n]===e&&delete r[n]},listLanguages:function(){return Object.keys(i)},getLanguage:_,registerAliases:v,autoDetection:N,inherit:se,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{e["before:highlightBlock"](Object.assign({block:n.el},n))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{e["after:highlightBlock"](Object.assign({block:n.el},n))})}(e),a.push(e)},removePlugin:function(e){const n=a.indexOf(e);-1!==n&&a.splice(n,1)}}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString="11.10.0",e.regex={concat:b,lookahead:g,either:f,optional:h,anyNumberOfTimes:u};for(const e in z)"object"==typeof z[e]&&n(z[e]);return Object.assign(e,z),e},de=ce({});de.newInstance=()=>ce({});var ge=de;de.HighlightJS=de,de.default=de;var ue=e(ge);const he=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],be=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),fe=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),pe=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),me=["accent-color","align-content","align-items","align-self","alignment-baseline","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-end-end-radius","border-end-start-radius","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","cx","cy","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","empty-cells","enable-background","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","flood-color","flood-opacity","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","kerning","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","marker","marker-end","marker-mid","marker-start","mask","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","speak","speak-as","src","tab-size","table-layout","text-anchor","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-offset","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","vector-effect","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index"].sort().reverse();const ye="[A-Za-z$_][0-9A-Za-z$_]*",Ee=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],we=["true","false","null","undefined","NaN","Infinity"],ke=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],xe=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_e=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ve=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ne=[].concat(_e,ke,xe);return ue.configure({tabReplace:"  ",languages:["abnf","css","http","javascript","json","xml"]}),ue.registerLanguage("abnf",(function(e){const n=e.regex,t=e.COMMENT(/;/,/$/);return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],contains:[{scope:"operator",match:/=\/?/},{scope:"attribute",match:n.concat(/^[a-zA-Z][a-zA-Z0-9-]*/,/(?=\s*=)/)},t,{scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},{scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},{scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},{scope:"symbol",match:/%[si](?=".*")/},e.QUOTE_STRING_MODE,e.NUMBER_MODE]}})),ue.registerLanguage("css",(function(e){const n=e.regex,t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),i=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[t.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},t.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+fe.join("|")+")"},{begin:":(:)?("+pe.join("|")+")"}]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+me.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[t.BLOCK_COMMENT,t.HEXCOLOR,t.IMPORTANT,t.CSS_NUMBER_MODE,...i,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...i,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},t.FUNCTION_DISPATCH]},{begin:n.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:be.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...i,t.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+he.join("|")+")\\b"}]}})),ue.registerLanguage("http",(function(e){const n="HTTP/([32]|1\\.[01])",t={className:"attribute",begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},i=[t,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+n+" \\d{3})",end:/$/,contains:[{className:"meta",begin:n},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},{begin:"(?=^[A-Z]+ (.*?) "+n+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:n},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:i}},e.inherit(t,{relevance:0})]}})),ue.registerLanguage("javascript",(function(e){const n=e.regex,t=ye,i="<>",r="</>",a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{const t=e[0].length+e.index,i=e.input[t];if("<"===i||","===i)return void n.ignoreMatch();let r;">"===i&&(((e,{after:n})=>{const t="</"+e[0].slice(1);return-1!==e.input.indexOf(t,n)})(e,{after:t})||n.ignoreMatch());const a=e.input.substring(t);((r=a.match(/^\s*=/))||(r=a.match(/^\s+extends\s+/))&&0===r.index)&&n.ignoreMatch()}},o={$pattern:ye,keyword:Ee,literal:we,built_in:Ne,"variable.language":ve},s="[0-9](_?[0-9])*",l=`\\.(${s})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${s})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},g={className:"subst",begin:"\\$\\{",end:"\\}",keywords:o,contains:[]},u={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"css"}},b={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,g],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,g]},p={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},m=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,h,b,f,{match:/\$\d+/},d];g.contains=m.concat({begin:/\{/,end:/\}/,keywords:o,contains:["self"].concat(m)});const y=[].concat(p,g.contains),E=y.concat([{begin:/(\s*)\(/,end:/\)/,keywords:o,contains:["self"].concat(y)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:E},k={variants:[{match:[/class/,/\s+/,t,/\s+/,/extends/,/\s+/,n.concat(t,"(",n.concat(/\./,t),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,t],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...ke,...xe]}},_={variants:[{match:[/function/,/\s+/,t,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},v={match:n.concat(/\b/,(N=[..._e,"super","import"].map((e=>`${e}\\s*\\(`)),n.concat("(?!",N.join("|"),")")),t,n.lookahead(/\s*\(/)),className:"title.function",relevance:0};var N;const O={begin:n.concat(/\./,n.lookahead(n.concat(t,/(?![0-9A-Za-z$_(])/))),end:t,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},A={match:[/get|set/,/\s+/,t,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},S="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",M={match:[/const|var|let/,/\s+/,t,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(S)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:o,exports:{PARAMS_CONTAINS:E,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,u,h,b,f,p,{match:/\$\d+/},d,x,{className:"attr",begin:t+n.lookahead(":"),relevance:0},M,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[p,e.REGEXP_MODE,{className:"function",begin:S,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,contains:E}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i,end:r},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},_,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:t,className:"title.function"})]},{match:/\.\.\./,relevance:0},O,{match:"\\$"+t,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},v,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},k,A,{match:/\$[(.]/}]}})),ue.registerLanguage("json",(function(e){const n=["true","false","null"],t={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:n},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,t,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),ue.registerLanguage("xml",(function(e){const n=e.regex,t=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(r,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"string"}),s=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,s,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,a,s,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[s]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(t,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:l}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),ue}();
      diff --git a/builds/respec-w3c.js b/builds/respec-w3c.js
      index 8e36aed2d0..2ee853c5ed 100644
      --- a/builds/respec-w3c.js
      +++ b/builds/respec-w3c.js
      @@ -1,4 +1,4 @@
      -window.respecVersion="35.1.1",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function s(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function o(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:o});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return $(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){b=e(b)}function w(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),$(this.request)}:function(...t){return $(e.apply(k(this),t))}}function v(e){return"function"==typeof e?w(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function $(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t($(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",o)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const x=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],S=new Map;function C(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(S.get(t))return S.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!x.includes(n))return;const o=async function(e,...t){const o=this.transaction(e,s?"readwrite":"readonly");let i=o.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),s&&o.done]))[0]};return S.set(t,o),o}y((e=>({...e,get:(t,n,r)=>C(t,n)||e.get(t,n,r),has:(t,n)=>!!C(t,n)||e.has(t,n)})));const R=["continue","continuePrimaryKey","advance"],E={},A=new WeakMap,T=new WeakMap,L={get(e,t){if(!R.includes(t))return e[t];let n=E[t];return n||(n=E[t]=function(...e){A.set(this,T.get(this)[t](...e))}),n}};async function*P(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,L);for(T.set(n,t),g.set(n,k(t));t;)yield n,t=await(A.get(n)||t.continue()),A.delete(n)}function I(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}y((e=>({...e,get:(t,n,r)=>I(t,n)?P:e.get(t,n,r),has:(t,n)=>I(t,n)||e.has(t,n)})));var D=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),$(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:o}={}){const i=indexedDB.open(e,t),a=$(i);return r&&i.addEventListener("upgradeneeded",(e=>{r($(i.result),e.oldVersion,e.newVersion,$(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:$});function N(e,t,n,r,s,{level:o="error",autofix:i,ruleName:a}={}){function c(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function l(n,{precedes:r}={}){const s=n.map((e=>e.trivia+e.value)).join(""),o=e[t];return"eof"===o.type?s:r?s+o.trivia:s.slice(o.trivia.length)}const u="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,d=function(e){const t=e.split("\n");return t[t.length-1]}(l(c(-5),{precedes:!0})),p=c(5),f=l(p),h=d+f.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===s?"since":"inside",g=`${s} error at line ${u}${e.name?` in ${e.name}`:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map((e=>function(e,t){let n=e;return t&&(n+=` ${t}`),n}(e.type,e.name))).join(" -> ")}(n)}\``:""}:\n${h}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:o,ruleName:a,autofix:i,input:f,tokens:p}}function j(e,t,n,r){return N(e,t,n,r,"Syntax")}function O(e,t,n,r,s={}){return s.ruleName=n,N(t.source,e.index,t,r,"Validation",s)}class M{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t,writable:!0},parent:{value:null,writable:!0},this:{value:this}})}toJSON(){const e={type:void 0,name:void 0,inheritance:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}function q(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=q(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=q(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function z(e,t){if(t.cache.dictionaryIncludesRequiredField.has(e))return t.cache.dictionaryIncludesRequiredField.get(e);t.cache.dictionaryIncludesRequiredField.set(e,void 0);let n=e.members.some((e=>e.required));if(!n&&e.inheritance){const r=t.unique.get(e.inheritance);r?z(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class U extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class W extends M{static parser(e,t){return()=>{const n=e.consumeKind(t);if(n)return new W({source:e.source,tokens:{value:n}})}}get value(){return ie(this.tokens.value.value)}write(e){return e.ts.wrap([e.token(this.tokens.value),e.token(this.tokens.separator)])}}class F extends W{static parse(e){const t=e.consumeKind("eof");if(t)return new F({source:e.source,tokens:{value:t}})}get type(){return"eof"}}function B(e,t){return ae(e,{parser:W.parser(e,t),listName:t+" list"})}const H=["identifier","decimal","integer","string"],G=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map((e=>[e,`Legacy${e}`])),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function V(e){for(const t of H){const n=B(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class Y extends M{static parse(e){const t={assign:e.consume("=")},n=ye(new Y({source:e.source,tokens:t}));if(n.list=[],t.assign){if(t.asterisk=e.consume("*"),t.asterisk)return n.this;t.secondaryName=e.consumeKind(...H)}return t.open=e.consume("("),t.open?(n.list=n.rhsIsList?V(e):de(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):t.assign&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.asterisk&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.asterisk?"*":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.token(this.tokens.asterisk),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list.map((n=>"identifier-list"===t?e.identifier(n,this.parent):n.write(e))),e.token(this.tokens.close)])}}class K extends M{static parse(e){const t=e.consumeKind("identifier");if(t)return new K({source:e.source,tokens:{name:t},params:Y.parse(e)})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;if(!e)return null;return{type:e,value:this.params.rhsIsList?n:this.params.tokens.secondaryName?ie(t.secondaryName.value):null}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/609) for more information.";yield O(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(G.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${G.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more information.`;yield O(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=G.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.wrap([e.ts.trivia(this.tokens.name.trivia),e.ts.extendedAttribute(e.ts.wrap([e.ts.extendedAttributeReference(this.name),this.params.write(e)])),e.token(this.tokens.separator)])}}class Z extends U{static parse(e){const t={};t.open=e.consume("[");const n=new Z({source:e.source,tokens:t});return t.open?(n.push(...ae(e,{parser:K.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Expected a closing token for the extended attribute list"),n.length||(e.unconsume(t.close.index),e.error("An extended attribute list must not be empty")),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n):n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map((t=>t.write(e))),e.token(this.tokens.close)]):""}}function J(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function Q(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","sequence","record");if(!n)return;const r=ye(new X({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error(`No opening bracket after ${n.value}`),n.value){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=fe(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"sequence":case"FrozenArray":case"ObservableArray":{const s=pe(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...$e)||e.error(`Record key must be one of: ${$e.join(", ")}`),s=new X({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const o=pe(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,o);break}}return r.idlType||e.error(`Error parsing generic type ${n.value}`),r.tokens.close=e.consume(">")||e.error(`Missing closing bracket after ${n.value}`),r.this}(e,t)||ue(e);if(!n){const t=e.consumeKind("identifier")||e.consume(...$e,...ve);if(!t)return;n=new X({source:e.source,tokens:{base:t}}),e.probe("<")&&e.error(`Unsupported generic type ${t.value}`)}return"Promise"===n.generic&&e.probe("?")&&e.error("Promise type cannot be nullable"),n.type=t||null,J(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class X extends M{static parse(e,t){return Q(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=ye(new X({source:e.source,tokens:n}));for(r.type=t||null;;){const n=pe(e,t)||e.error("No type after open parenthesis or 'or' in union type");"any"===n.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===n.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(n);const s=e.consume("or");if(!s)break;n.tokens.separator=s}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),J(e,r),r.this}(e,t)}constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[],writable:!0}),this.extAttrs=new Z({source:e,tokens:{}})}get generic(){return this.subtype.length&&this.tokens.base?this.tokens.base.value:""}get nullable(){return Boolean(this.tokens.nullable)}get union(){return Boolean(this.subtype.length)&&!this.tokens.base}get idlType(){if(this.subtype.length)return this.subtype;return ie([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter((e=>e)).map((e=>e.value)).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"BufferSource"===this.idlType)for(const e of[this.extAttrs,this.parent?.extAttrs])for(const t of e){if("AllowShared"!==t.name)continue;const n="`[AllowShared] BufferSource` is now replaced with AllowSharedBufferSource.";yield O(this.tokens.base,this,"migrate-allowshared",n,{autofix:ee(this,t,e)})}if("void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/whatwg/webidl/issues/60) for more information.";yield O(this.tokens.base,this,"replace-void",e,{autofix:(t=this,()=>{t.tokens.base.value="undefined"})})}var t;const n=!this.union&&e.unique.get(this.idlType),r=this.union?this:n&&"typedef"===n.type?n.idlType:void 0;if(r&&this.nullable){const{reference:t}=q(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield O(e,this,"no-nullable-union-dict",n)}}else for(const t of this.subtype)yield*t.validate(e)}write(e){return e.ts.wrap([this.extAttrs.write(e),(()=>{if(this.union||this.generic)return e.ts.wrap([e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),...this.subtype.map((t=>t.write(e))),e.token(this.tokens.close)]);const t=this.tokens.prefix||this.tokens.base,n=this.tokens.prefix?[this.tokens.prefix.value,e.ts.trivia(this.tokens.base.trivia)]:[],r=e.reference(e.ts.wrap([...n,this.tokens.base.value,e.token(this.tokens.postfix)]),{unescaped:this.idlType,context:this});return e.ts.wrap([e.ts.trivia(t.trivia),r])})(),e.token(this.tokens.nullable),e.token(this.tokens.separator)])}}function ee(e,t,n){return()=>{const r=n.indexOf(t);n.splice(r,1),!n.length&&e.tokens.base.trivia.match(/^\s$/)&&(e.tokens.base.trivia=""),e.tokens.base.value="AllowSharedBufferSource"}}class te extends M{static parse(e){const t=e.consume("=");if(!t)return null;const n=ce(e)||e.consumeKind("string")||e.consume("null","[","{")||e.error("No value for default"),r=[n];if("["===n.value){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.value){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new te({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"expression",{value:n})}get type(){return le(this.expression[0]).type}get value(){return le(this.expression[0]).value}get negative(){return le(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map((t=>e.token(t)))])}}class ne extends M{static parse(e){const t=e.position,n={},r=ye(new ne({source:e.source,tokens:n}));return r.extAttrs=Z.parse(e),n.optional=e.consume("optional"),r.idlType=pe(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeKind("identifier")||e.consume(...ke),n.name?(r.default=n.optional?te.parse(e):null,r.this):e.unconsume(t)):e.unconsume(t)}get type(){return"argument"}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return ie(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=q(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield O(this.tokens.name,this,"no-nullable-dict-arg",e)}else if(this.optional){if(!this.default){const e="Optional dictionary arguments must have a default value of `{}`.";yield O(this.tokens.name,this,"dict-arg-default",e,{autofix:re(this)})}}else if(this.parent&&!z(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e),r=t.slice(n+1).some((e=>!e.optional));return!r}(this)){const e="Dictionary argument must be optional if it has no required fields";yield O(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=be(n.idlType);n.tokens.optional={...e,type:"optional",value:"optional"},e.trivia=" ",re(n)()})})}var n}write(e){return e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.optional),e.ts.type(this.idlType.write(e)),e.token(this.tokens.variadic),e.name_token(this.tokens.name,{data:this}),this.default?this.default.write(e):"",e.token(this.tokens.separator)])}}function re(e){return()=>{e.default=te.parse(new Ce(" = {}"))}}class se extends M{static parse(e,{special:t,regular:n}={}){const r={special:t},s=ye(new se({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=fe(e)||e.error("Missing return type"),r.name=e.consumeKind("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=de(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?ie(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(yield*this.extAttrs.validate(e),!this.name&&["","static"].includes(this.special)){const e="Regular or static operations must have both a return type and an identifier.";yield O(this.tokens.open,this,"incomplete-op",e)}this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this,n=this.idlType?[e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close)]:[];return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),this.tokens.name?e.token(this.tokens.special):e.token(this.tokens.special,e.ts.nameless,{data:this,parent:t}),...n,e.token(this.tokens.termination)]),{data:this,parent:t})}}class oe extends M{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,o={special:t},i=ye(new oe({source:e.source,tokens:o}));if(t||n||(o.special=e.consume("inherit")),"inherit"===i.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),o.readonly=e.consume("readonly"),r&&!o.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),o.base=e.consume("attribute"),o.base)return i.idlType=pe(e,"attribute-type")||e.error("Attribute lacks a type"),o.name=e.consumeKind("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),o.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),i.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return ie(this.tokens.name.value)}*validate(e){if(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),["sequence","record"].includes(this.idlType.generic)){const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield O(this.tokens.name,this,"attr-invalid-type",e)}{const{reference:t}=q(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield O(e,this,"attr-invalid-type",n)}}if(this.readonly&&function(e,t){if(e.union)return!1;if(e.extAttrs.some((e=>"EnforceRange"===e.name)))return!0;const n=t.unique.get(e.idlType);return"typedef"===n?.type&&n.idlType.extAttrs.some((e=>"EnforceRange"===e.name))}(this.idlType,e)){const e=this.idlType.tokens.base,t="Readonly attributes cannot accept [EnforceRange] extended attribute.";yield O(e,this,"attr-invalid-type",t)}}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.special),e.token(this.tokens.readonly),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.termination)]),{data:this,parent:t})}}function ie(e){return e.startsWith("_")?e.slice(1):e}function ae(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const o=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error(`Trailing comma in ${r}`);break}if(s.tokens.separator=e.consume(","),o.push(s),!s.tokens.separator)break}return o}function ce(e){return e.consumeKind("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function le({type:e,value:t}){switch(e){case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)}}switch(t){case"true":case"false":return{type:"boolean",value:"true"===t};case"Infinity":case"-Infinity":return{type:"Infinity",negative:t.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};default:return{type:t}}}function ue(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new X({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new X({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("bigint","boolean","byte","octet","undefined");return r?new X({source:t,tokens:{base:r}}):void 0}function de(e){return ae(e,{parser:ne.parse,listName:"arguments list"})}function pe(e,t){const n=Z.parse(e),r=X.parse(e,t);return r&&(ye(r).extAttrs=n),r}function fe(e,t){const n=X.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new X({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function he(e){const t=e.consume("stringifier");if(!t)return;return oe.parse(e,{special:t})||se.parse(e,{special:t})||e.error("Unterminated stringifier")}function me(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ge(e){return()=>{if(e.extAttrs.length){const t=new Ce("Exposed=Window,"),n=K.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=` ${r.tokens.name.trivia}`),e.extAttrs.unshift(n)}else{ye(e).extAttrs=Z.parse(new Ce("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia=`\n${me(t)}`}}}function be(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return be(e.idlType);return Object.values(e.tokens).sort(((e,t)=>e.index-t.index))[0]}function ye(e,t){if(t||(t=e),!e)return e;return new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)&&"source"!==t?ye(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}})}const we={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/\/\/.*|\/\*[\s\S]*?\*\//y,other:/[^\t\n\r 0-9A-Za-z]/y},ve=["ArrayBuffer","SharedArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","Float32Array","Float64Array","any","object","symbol"],$e=["ByteString","DOMString","USVString"],ke=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],xe=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(ke,$e,ve),_e=["(",")",",","...",":",";","<","=",">","?","*","[","]","{","}"],Se=["_constructor","toString","_toString"];class Ce{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,o=0;for(;n<e.length;){const a=e.charAt(n);let c=-1;if(/[\t\n\r ]/.test(a)?c=i("whitespace",{noFlushTrivia:!0}):"/"===a&&(c=i("comment",{noFlushTrivia:!0})),-1!==c){const e=t.pop().value;s+=(e.match(/\n/g)||[]).length,r+=e,o-=1}else if(/[-0-9.A-Z_a-z]/.test(a)){if(c=i("decimal"),-1===c&&(c=i("integer")),-1===c){c=i("identifier");const e=t.length-1,n=t[e];if(-1!==c){if(Se.includes(n.value)){const r=`${ie(n.value)} is a reserved identifier and must not be used.`;throw new Re(j(t,e,null,r))}xe.includes(n.value)&&(n.type="inline")}}}else'"'===a&&(c=i("string"));for(const i of _e)if(e.startsWith(i,n)){t.push({type:"inline",value:i,trivia:r,line:s,index:o}),r="",n+=i.length,c=n;break}if(-1===c&&(c=i("other")),-1===c)throw new Error("Token stream not progressing");n=c,o+=1}return t.push({type:"eof",value:"",trivia:r,line:s,index:o}),t;function i(i,{noFlushTrivia:a}={}){const c=we[i];c.lastIndex=n;const l=c.exec(e);return l?(t.push({type:i,value:l[0],trivia:r,line:s,index:o}),a||(r=""),c.lastIndex):-1}}(e),this.position=0}error(e){throw new Re(j(this.source,this.position,this.current,e))}probeKind(e){return this.source.length>this.position&&this.source[this.position].type===e}probe(e){return this.probeKind("inline")&&this.source[this.position].value===e}consumeKind(...e){for(const t of e){if(!this.probeKind(t))continue;const e=this.source[this.position];return this.position++,e}}consume(...e){if(!this.probeKind("inline"))return;const t=this.source[this.position];for(const n of e)if(t.value===n)return this.position++,t}consumeIdentifier(e){if(this.probeKind("identifier")&&this.source[this.position].value===e)return this.consumeKind("identifier")}unconsume(e){this.position=e}}class Re extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:o,tokens:i}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=o,this.tokens=i}}class Ee extends W{static parse(e){const t=e.consumeKind("string");if(t)return new Ee({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}write(e){const{parent:t}=this;return e.ts.wrap([e.ts.trivia(this.tokens.value.trivia),e.ts.definition(e.ts.wrap(['"',e.ts.name(this.value,{data:this,parent:t}),'"']),{data:this,parent:t}),e.token(this.tokens.separator)])}}class Ae extends M{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consumeKind("identifier")||e.error("No name for enum");const n=ye(new Ae({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=ae(e,{parser:Ee.parse,allowDangler:!0,listName:"enumeration"}),e.probeKind("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n.this}get type(){return"enum"}get name(){return ie(this.tokens.name.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.open),e.ts.wrap(this.values.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Te extends M{static parse(e){const t=e.consumeKind("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consumeKind("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new Te({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return ie(this.tokens.target.value)}get includes(){return ie(this.tokens.mixin.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.reference_token(this.tokens.target,this),e.token(this.tokens.includes),e.reference_token(this.tokens.mixin,this),e.token(this.tokens.termination)]),{data:this})}}class Le extends M{static parse(e){const t={},n=ye(new Le({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=pe(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consumeKind("identifier")||e.error("Typedef lacks a name"),e.current=n.this,t.termination=e.consume(";")||e.error("Unterminated typedef, expected `;`"),n.this}get type(){return"typedef"}get name(){return ie(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class Pe extends M{static parse(e,t){const n={base:t},r=ye(new Pe({source:e.source,tokens:n}));return n.name=e.consumeKind("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=fe(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=de(e),n.close=e.consume(")")||e.error("Unterminated callback"),n.termination=e.consume(";")||e.error("Unterminated callback, expected `;`"),r.this}get type(){return"callback"}get name(){return ie(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.assign),e.ts.type(this.idlType.write(e)),e.token(this.tokens.open),...this.arguments.map((t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Ie extends M{static parse(e,t,{inheritable:n,allowedMembers:r}){const{tokens:s,type:o}=t;for(s.name=e.consumeKind("identifier")||e.error(`Missing name in ${o}`),e.current=t,t=ye(t),n&&Object.assign(s,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeKind("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),s.open=e.consume("{")||e.error(`Bodyless ${o}`),t.members=[];;){if(s.close=e.consume("}"),s.close)return s.termination=e.consume(";")||e.error(`Missing semicolon after ${o}`),t.this;const n=Z.parse(e);let i;for(const[t,...n]of r)if(i=ye(t(e,...n)),i)break;i||e.error("Unknown member"),i.extAttrs=n,t.members.push(i.this)}}get partial(){return!!this.tokens.partial}get name(){return ie(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?ie(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.callback),e.token(this.tokens.partial),e.token(this.tokens.base),e.token(this.tokens.mixin),e.name_token(this.tokens.name,{data:this}),(()=>this.tokens.inheritance?e.ts.wrap([e.token(this.tokens.colon),e.ts.trivia(this.tokens.inheritance.trivia),e.ts.inheritance(e.reference(this.tokens.inheritance.value,{context:this}))]):"")(),e.token(this.tokens.open),e.ts.wrap(this.members.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class De extends M{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=ue(e);if(!n){const t=e.consumeKind("identifier")||e.error("Const lacks a type");n=new X({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consumeKind("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=ce(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new De({source:e.source,tokens:t});return ye(r).idlType=n,r}get type(){return"const"}get name(){return ie(this.tokens.name.value)}get value(){return le(this.tokens.value)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.assign),e.token(this.tokens.value),e.token(this.tokens.termination)]),{data:this,parent:t})}}class Ne extends M{static parse(e){const t=e.position,n=ye(new Ne({source:e.source,tokens:{}})),{tokens:r}=n;if(r.readonly=e.consume("readonly"),r.readonly||(r.async=e.consume("async")),r.base=r.readonly?e.consume("maplike","setlike"):r.async?e.consume("iterable"):e.consume("iterable","maplike","setlike"),!r.base)return void e.unconsume(t);const{type:s}=n,o="maplike"===s,i=o||"iterable"===s,a=n.async&&"iterable"===s;r.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=pe(e)||e.error(`Missing a type argument in ${s} declaration`);return n.idlType=[c],n.arguments=[],i&&(c.tokens.separator=e.consume(","),c.tokens.separator?n.idlType.push(pe(e)):o&&e.error(`Missing second type argument in ${s} declaration`)),r.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(r.argsOpen=e.consume("("),n.arguments.push(...de(e)),r.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),r.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),n.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.readonly),e.token(this.tokens.async),e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),e.ts.wrap(this.idlType.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.argsOpen),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.argsClose),e.token(this.tokens.termination)]),{data:this,parent:this.parent})}}class je extends M{static parse(e){const t=e.consume("constructor");if(!t)return;const n={base:t};n.open=e.consume("(")||e.error("No argument list in constructor");const r=de(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new je({source:e.source,tokens:n});return ye(s).arguments=r,s}get type(){return"constructor"}*validate(e){for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function Oe(e){const t=e.consume("static");if(!t)return;return oe.parse(e,{special:t})||se.parse(e,{special:t})||e.error("No body in static member")}class Me extends Ie{static parse(e,t,{extMembers:n=[],partial:r=null}={}){const s={partial:r,base:t};return Ie.parse(e,new Me({source:e.source,tokens:s}),{inheritable:!r,allowedMembers:[...n,[De.parse],[je.parse],[Oe],[he],[Ne.parse],[oe.parse],[se.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Interfaces must have `[Exposed]` extended attribute. To fix, add, for example, `[Exposed=Window]`. Please also consider carefully if your interface should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield O(this.tokens.name,this,"require-exposed",e,{autofix:ge(this)})}const t=this.extAttrs.filter((e=>"Constructor"===e.name));for(const e of t){const t="Constructors should now be represented as a `constructor()` operation on the interface instead of `[Constructor]` extended attribute. Refer to the [WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) for more information.";yield O(e.tokens.name,this,"constructor-member",t,{autofix:qe(this,e)})}if(this.extAttrs.some((e=>"Global"===e.name))){const e=this.extAttrs.filter((e=>"LegacyFactoryFunction"===e.name));for(const t of e){const e="Interfaces marked as `[Global]` cannot have factory functions.";yield O(t.tokens.name,this,"no-constructible-global",e)}const t=this.members.filter((e=>"constructor"===e.type));for(const e of t){const t="Interfaces marked as `[Global]` cannot have constructors.";yield O(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=function(e){const t=i(e);return{statics:new Set(t.filter((e=>"static"===e.special)).map((e=>e.name))),nonstatics:new Set(t.filter((e=>"static"!==e.special)).map((e=>e.name)))}}(t),r=e.partials.get(t.name)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=i(e),s=r.filter((e=>"static"===e.special)),a=r.filter((e=>"static"!==e.special));yield*o(s,n.statics,e,t),yield*o(a,n.nonstatics,e,t),s.forEach((e=>n.statics.add(e.name))),a.forEach((e=>n.nonstatics.add(e.name)))}function*o(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The ${"static"===s.special?"static ":""}operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield O(s.tokens.name,n,"no-cross-overload",t)}}}function i(e){return e.members.filter((({type:e})=>"operation"===e))}}(e,this))}}function qe(e,t){return e=ye(e),()=>{const n=me(e.extAttrs.tokens.open.trivia),r=e.members.length?me(be(e.members[0]).trivia):function(e){const t=me(e),n=t.includes("\t")?"\t":"  ";return t+n}(n),s=je.parse(new Ce(`\n${r}constructor();`));s.extAttrs=new Z({source:e.source,tokens:{}}),ye(s).arguments=t.arguments;const o=function(e,t){const n=e.slice().reverse().findIndex(t);return-1===n?n:e.length-n-1}(e.members,(e=>"constructor"===e.type));e.members.splice(o+1,0,s);const{close:i}=e.tokens;i.trivia.includes("\n")||(i.trivia+=`\n${n}`);const{extAttrs:a}=e,c=a.indexOf(t),l=a.splice(c,1);a.length?a.length===c?a[c-1].tokens.separator=void 0:a[c].tokens.name.trivia.trim()||(a[c].tokens.name.trivia=l[0].tokens.name.trivia):a.tokens.open=a.tokens.close=void 0}}class ze extends Ie{static parse(e,t,{extMembers:n=[],partial:r}={}){const s={partial:r,base:t};if(s.mixin=e.consume("mixin"),s.mixin)return Ie.parse(e,new ze({source:e.source,tokens:s}),{allowedMembers:[...n,[De.parse],[he],[oe.parse,{noInherit:!0}],[se.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class Ue extends M{static parse(e){const t={},n=ye(new Ue({source:e.source,tokens:t}));return n.extAttrs=Z.parse(e),t.required=e.consume("required"),n.idlType=pe(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeKind("identifier")||e.error("Dictionary member lacks a name"),n.default=te.parse(e),t.required&&n.default&&e.error("Required member must not have a default"),t.termination=e.consume(";")||e.error("Unterminated dictionary member, expected `;`"),n.this}get type(){return"field"}get name(){return ie(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.required),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),this.default?this.default.write(e):"",e.token(this.tokens.termination)]),{data:this,parent:t})}}class We extends Ie{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("dictionary"),r.base)return Ie.parse(e,new We({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[...t,[Ue.parse]]})}get type(){return"dictionary"}}class Fe extends Ie{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("namespace"),r.base)return Ie.parse(e,new Fe({source:e.source,tokens:r}),{allowedMembers:[...t,[oe.parse,{noInherit:!0,readonly:!0}],[De.parse],[se.parse,{regular:!0}]]})}get type(){return"namespace"}*validate(e){if(!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Namespaces must have [Exposed] extended attribute. To fix, add, for example, [Exposed=Window]. Please also consider carefully if your namespace should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield O(this.tokens.name,this,"require-exposed",e,{autofix:ge(this)})}yield*super.validate(e)}}class Be extends Ie{static parse(e,t,{extMembers:n=[]}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return Ie.parse(e,new Be({source:e.source,tokens:r}),{allowedMembers:[...n,[De.parse],[se.parse,{regular:!0}]]})}get type(){return"callback interface"}}function He(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function o(n){const o=s("interface");if(o)return ze.parse(e,o,{...n,...t?.extensions?.mixin})||Me.parse(e,o,{...n,...t?.extensions?.interface})||r("Interface has no proper body")}function i(){if(t.productions)for(const n of t.productions){const t=n(e);if(t)return t}return function(){const n=s("callback");if(n)return e.probe("interface")?Be.parse(e,n,{...t?.extensions?.callbackInterface}):Pe.parse(e,n)}()||o()||function(){const n=s("partial");if(n)return We.parse(e,{partial:n,...t?.extensions?.dictionary})||o({partial:n})||Fe.parse(e,{partial:n,...t?.extensions?.namespace})||r("Partial doesn't apply to anything")}()||We.parse(e,t?.extensions?.dictionary)||Ae.parse(e)||Le.parse(e)||Te.parse(e)||Fe.parse(e,t?.extensions?.namespace)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=Z.parse(e),n=i();if(!n){t.length&&r("Stray extended attributes");break}ye(n).extAttrs=t,s.push(n)}const o=F.parse(e);return t.concrete&&s.push(o),s}();return e.position<n.length&&r("Unrecognised tokens"),a}function Ge(e){return e}const Ve={wrap:e=>e.join(""),trivia:Ge,name:Ge,reference:Ge,type:Ge,generic:Ge,nameless:Ge,inheritance:Ge,definition:Ge,extendedAttribute:Ge,extendedAttributeReference:Ge};class Ye{constructor(e){this.ts=Object.assign({},Ve,e)}reference(e,{unescaped:t,context:n}){return t||(t=e.startsWith("_")?e.slice(1):e),this.ts.reference(e,t,n)}token(e,t=Ge,...n){if(!e)return"";const r=t(e.value,...n);return this.ts.wrap([this.ts.trivia(e.trivia),r])}reference_token(e,t){return this.token(e,this.reference.bind(this),{context:t})}name_token(e,t){return this.token(e,this.ts.name,t)}identifier(e,t){return this.ts.wrap([this.reference_token(e.tokens.value,t),this.token(e.tokens.separator)])}}function Ke(e,t){const n=new Map,r=e.filter((e=>"includes"===e.type));for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Ze(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:Ke(e,t),cache:{typedefIncludesDictionary:new WeakMap,dictionaryIncludesRequiredField:new WeakMap}}}(e);for(const e of t.all)e.validate&&(yield*e.validate(t));yield*function*({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield O(n.tokens.name,n,"no-duplicate",r)}}(t)}var Je=Object.freeze({__proto__:null,WebIDLParseError:Re,parse:function(e,t={}){const n=new Ce(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),He(n,t)},validate:function(e){return[...Ze((t=e,t.flat?t.flat():[].concat(...t)))];var t},write:function(e,{templates:t=Ve}={}){t=Object.assign({},Ve,t);const n=new Ye(t);return t.wrap(e.map((e=>e.write(n))))}});const Qe=/^[!#$%&'*+-.^`|~\w]+$/,Xe=/[\u000A\u000D\u0009\u0020]/u,et=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function tt(e,t,n){(t&&""!==t&&!e.has(t)&&et.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function nt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let rt={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function st(e){rt=e}const ot=/[&<>"']/,it=new RegExp(ot.source,"g"),at=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ct=new RegExp(at.source,"g"),lt={"&":"&","<":"<",">":">",'"':""","'":"'"},ut=e=>lt[e];function dt(e,t){if(t){if(ot.test(e))return e.replace(it,ut)}else if(at.test(e))return e.replace(ct,ut);return e}const pt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ft(e){return e.replace(pt,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const ht=/(^|[^\[])\^/g;function mt(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(ht,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}function gt(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const bt={exec:()=>null};function yt(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function wt(e,t,n){const r=e.length;if(0===r)return"";let s=0;for(;s<r;){const o=e.charAt(r-s-1);if(o!==t||n){if(o===t||!n)break;s++}else s++}return e.slice(0,r-s)}function vt(e,t,n,r){const s=t.href,o=t.title?dt(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:o,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:o,text:dt(i)}}class $t{options;rules;lexer;constructor(e){this.options=e||rt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:wt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=wt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=wt(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),s.test(l))break;if(o.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(s.test(r))break;if(o.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}s.loose||(c?s.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),s.raw+=i}s.items[s.items.length-1].raw=i.trimEnd(),s.items[s.items.length-1].text=a.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){const t=s.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));s.loose=n}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yt(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(const e of n)o.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of s)o.rows.push(yt(e,o.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:dt(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=wt(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),vt(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return vt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let s,o,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(o=[...s].length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+o);if(Math.min(n,o)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=dt(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=dt(t[1]),n="mailto:"+e):(e=dt(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=dt(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=dt(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:dt(t[0]),{type:"text",raw:t[0],text:e}}}}const kt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xt=/(?:[*+-]|\d{1,9}[.)])/,_t=mt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,xt).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),St=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ct=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Rt=mt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Ct).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Et=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xt).getRegex(),At="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Tt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Lt=mt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Tt).replace("tag",At).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pt=mt(St).replace("hr",kt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex(),It={blockquote:mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pt).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:Rt,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:kt,html:Lt,lheading:_t,list:Et,newline:/^(?: *(?:\n|$))+/,paragraph:Pt,table:bt,text:/^[^\n]+/},Dt=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",kt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex(),Nt={...It,table:Dt,paragraph:mt(St).replace("hr",kt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex()},jt={...It,html:mt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Tt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(St).replace("hr",kt).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_t).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ot=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Mt=/^( {2,}|\\)\n(?!\s*$)/,qt="\\p{P}\\p{S}",zt=mt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,qt).getRegex(),Ut=mt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,qt).getRegex(),Wt=mt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,qt).getRegex(),Ft=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,qt).getRegex(),Bt=mt(/\\([punct])/,"gu").replace(/punct/g,qt).getRegex(),Ht=mt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Gt=mt(Tt).replace("(?:--\x3e|$)","--\x3e").getRegex(),Vt=mt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Gt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Kt=mt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Yt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Zt=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",Yt).replace("ref",Ct).getRegex(),Jt=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ct).getRegex(),Qt={_backpedal:bt,anyPunctuation:Bt,autolink:Ht,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Mt,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:bt,emStrongLDelim:Ut,emStrongRDelimAst:Wt,emStrongRDelimUnd:Ft,escape:Ot,link:Kt,nolink:Jt,punctuation:zt,reflink:Zt,reflinkSearch:mt("reflink|nolink(?!\\()","g").replace("reflink",Zt).replace("nolink",Jt).getRegex(),tag:Vt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:bt},Xt={...Qt,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",Yt).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yt).getRegex()},en={...Qt,escape:mt(Ot).replace("])","~|])").getRegex(),url:mt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tn={...en,br:mt(Mt).replace("{2,}","*").getRegex(),text:mt(en.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nn={normal:It,gfm:Nt,pedantic:jt},rn={normal:Qt,gfm:en,breaks:tn,pedantic:Xt};class sn{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||rt,this.options.tokenizer=this.options.tokenizer||new $t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:nn.normal,inline:rn.normal};this.options.pedantic?(t.block=nn.pedantic,t.inline=rn.pedantic):this.options.gfm&&(t.block=nn.gfm,this.options.breaks?t.inline=rn.breaks:t.inline=rn.gfm),this.tokenizer.rules=t}static get rules(){return{block:nn,inline:rn}}static lex(e,t){return new sn(t).lex(e)}static lexInline(e,t){return new sn(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,s,o;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+"    ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,s,o,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,o.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class on{options;constructor(e){this.options=e||rt}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+dt(r)+'">'+(n?e:dt(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:dt(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=gt(e);if(null===r)return n;let s='<a href="'+(e=r)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+n+"</a>",s}image(e,t,n){const r=gt(e);if(null===r)return n;let s=`<img src="${e=r}" alt="${n}"`;return t&&(s+=` title="${t}"`),s+=">",s}text(e){return e}}class an{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class cn{options;renderer;textRenderer;constructor(e){this.options=e||rt,this.options.renderer=this.options.renderer||new on,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new an}static parse(e,t){return new cn(t).parse(e)}static parseInline(e,t){return new cn(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=s,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(s.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=s;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,ft(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=s;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=s;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let o="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(r)}n+=this.renderer.table(t,o);continue}case"blockquote":{const e=s,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=s,t=e.ordered,r=e.start,o=e.loose;let i="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,s=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);o?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,o),i+=this.renderer.listitem(a,s,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=s;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=s;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=s,i=o.tokens?this.parseInline(o.tokens):o.text;for(;r+1<e.length&&"text"===e[r+1].type;)o=e[++r],i+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);n+=t?this.renderer.paragraph(i):i;continue}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}switch(s.type){case"escape":{const e=s;n+=t.text(e.text);break}case"html":{const e=s;n+=t.html(e.text);break}case"link":{const e=s;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=s;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=s;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=s;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=s;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=s;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=s;n+=t.text(e.text);break}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ln{options;constructor(e){this.options=e||rt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const un=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(sn.lex,cn.parse);parseInline=this.#e(sn.lexInline,cn.parseInline);Parser=cn;Renderer=on;TextRenderer=an;Lexer=sn;Tokenizer=$t;Hooks=ln;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new on(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,s=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $t(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,s=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ln;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,s=e.hooks[r],o=t[r];ln.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(s.call(t,e)).then((e=>o.call(t,e)));const n=s.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return sn.lex(e,t??this.defaults)}parser(e,t){return cn.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const s={...r},o={...this.defaults,...s};!0===this.defaults.async&&!1===s.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const i=this.#t(!!o.silent,!!o.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then((t=>e(t,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let r=e(n,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let s=t(r,o);return o.hooks&&(s=o.hooks.postprocess(s)),s}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+dt(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function dn(e,t){return un.parse(e,t)}dn.options=dn.setOptions=function(e){return un.setOptions(e),dn.defaults=un.defaults,st(dn.defaults),dn},dn.getDefaults=nt,dn.defaults=rt,dn.use=function(...e){return un.use(...e),dn.defaults=un.defaults,st(dn.defaults),dn},dn.walkTokens=function(e,t){return un.walkTokens(e,t)},dn.parseInline=un.parseInline,dn.Parser=cn,dn.parser=cn.parse,dn.Renderer=on,dn.TextRenderer=an,dn.Lexer=sn,dn.lexer=sn.lex,dn.Tokenizer=$t,dn.Hooks=ln,dn.parse=dn,dn.options,dn.setOptions,dn.use,dn.walkTokens,dn.parseInline,cn.parse,sn.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fn,hn={exports:{}};fn=hn,function(e,t){fn.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var s,o,a=(s=t[1],o=arguments,s.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var s=r.length;s--;){var o=r[s];if(o[0].test(t))return a(t,o)}return t}function l(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?i(r,s):e.hasOwnProperty(s)?i(r,e[s]):c(s,r,n)}}function u(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&c(s,s,n)===s}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(s,r,e),d.isPlural=u(s,r,e),d.singular=l(r,s,t),d.isSingular=u(r,s,t),d.addPluralRule=function(t,n){e.push([o(t),n])},d.addSingularRule=function(e,n){t.push([o(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var mn=pn(hn.exports),gn=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=o.prototype;return s.delete=function(e){return this.has(e)&&delete e[this._]},s.get=function(e){return this.has(e)?e[this._]:void 0},s.has=function(e){return r.call(e,this._)},s.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},o;function o(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=s.prototype;function s(){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._]},r.WeakSet=s}(Math.random(),Object.defineProperty)}function s(e,t,n,r,s,o){for(var i=("selectedIndex"in t),a=i;r<s;){var c,l=e(n[r],1);t.insertBefore(l,o),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function o(e,t){return e==t}function i(e){return e}function a(e,t,n,r,s,o,i){var a=o-s;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=s;c<n&&l<o&&i(e[c],r[l]);)c++,l++;if(l===o)return t;t=c+1}return-1}function c(e,t,n,r,s){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:s}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,s=t;r<s;){var o=(r+s)/2>>>0;n<e[o]?s=o:r=1+o}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||o,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return s(d,e,n,y,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var $=m-g,k=b-y,x=-1;if($<k){if(-1<(x=a(n,y,b,t,g,m,u)))return s(d,e,n,y,x,d(t[g],0)),s(d,e,n,x+$,b,c(d,t,m,h,f)),n}else if(k<$&&-1<(x=a(t,g,m,n,y,b,u)))return l(d,t,g,x),l(d,t,x+k,m),n;return $<2||k<2?(s(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):$==k&&function(e,t,n,r,s,o){for(;r<s&&o(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?s(d,e,n,y,b,c(d,t,m,h,f)):function(e,t,n,r,o,i,a,c,u,d,f,h,m){!function(e,t,n,r,o,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:o++,f++;break;case 1:d.push(r[o]),s(t,n,r,o++,o,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,s,o,i){var a,c,l,u,d,p,f=n+o,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<o&&c<n&&i(r[s+l],e[t+c]);)l++,c++;if(l===o&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[s+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,s,o,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=s.slice(o,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+o))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,$=w.oldi;v<n;)y[--l]=1,--n;for(;$<i;)y[--l]=-1,--i;y[--l]=0,--n,--i,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;o<=i;)y[--l]=-1,--i;return y}(n,r,o,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,y,b,k,t,g,m,$,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(s){var o=r(s);return o&&(t.splice(e,1),n.splice(e,1)),o},forEach:function(e,r){t.forEach((function(t,s){e.call(r,n[s],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(s,o){return n[r(s)?e:t.push(s)-1]=o,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function $(e,t){var n="_"+e+"$";return{get:function(){return this[n]||k(this,n,t.call(this,e))},set:function(e){k(this,n,e)}}}var k=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(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var x,_,S,C,R,E,A={},T={},L=[],P=T.hasOwnProperty,I=0,D={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(I=L.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<I;n++){var r=L[n];if(P.call(e,r))return T[r](e[r],t)}}},N=Array.isArray||(_=(x={}.toString).call([]),function(e){return x.call(e)===_}),j=(S=e,C="fragment",E="content"in M(R="template")?function(e){var t=M(R);return t.innerHTML=e,t.content}:function(e){var t,n=M(C),r=M(R);return O(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=M(C),n=M("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",O(t,n.firstChild.childNodes),t}:E)(e)});function O(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function M(e){return e===C?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,z,U,W,F,B,H,G,V,Y=(z="appendChild",U="cloneNode",W="createTextNode",B=(F="importNode")in(q=e),(H=q.createDocumentFragment())[z](q[W]("g")),H[z](q[W]("")),(B?q[F](H,!0):H[U](!0)).childNodes.length<2?function e(t,n){for(var r=t[U](),s=t.childNodes||[],o=s.length,i=0;n&&i<o;i++)r[z](e(s[i],n));return r}:B?q[F]:function(e,t){return e[U](!!t)}),K="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},Z="-"+Math.random().toFixed(6)+"%",J=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+Z+'"></p>',G.content.childNodes[0].getAttribute(V)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",J=!0)}catch(u){}var Q="\x3c!--"+Z+"--\x3e",X=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,se=" \\f\\n\\r\\t",oe="[^"+se+"\\/>\"'=]+",ie="["+se+"]+"+oe,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+oe.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+se+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+se+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+Q+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+Z+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=J?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 ge(t,n,r,s){for(var o=t.childNodes,i=o.length,a=0;a<i;){var c=o[a];switch(c.nodeType){case ee:var l=s.concat(a);!function(t,n,r,s){for(var o,i=t.attributes,a=[],c=[],l=me(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===Z;if(f||1<(o=p.value.split(Q)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(be(g,s,m,null));else{for(var b=o.length-2;b--;)r.shift();n.push(be(g,s,m,o))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&J&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var $=e.createElement(v);for(u=i.length,d=0;d<u;)$.setAttributeNode(i[d++].cloneNode(!0));$.textContent=t.textContent,t.parentNode.replaceChild($,t)}}(c,n,r,l),ge(c,n,r,l);break;case X:var u=c.textContent;if(u===Z)r.shift(),n.push(ne.test(t.nodeName)?ye(t,s):{type:"any",node:c,path:s.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,i--}break;case te:ne.test(t.nodeName)&&K.call(c.textContent)===Q&&(r.shift(),n.push(ye(t,s)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function ye(e,t){return{type:"text",node:e,path:t}}var we,ve=(we=new n,{get:function(e){return we.get(e)},set:function(e,t){return we.set(e,t),t}});function $e(e,t){var n=(e.convert||function(e){return e.join(Q).replace(ue,he).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var s=j(n,e.type);xe(s);var o=[];return ge(s,o,t.slice(0),[]),{content:s,updates:function(n){for(var r=[],s=o.length,i=0,a=0;i<s;){var c=o[i++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return s+=a,function(){var e=arguments.length;if(s!==e-1)throw new Error(e-1+" values instead of "+s+"\n"+t.join("${value}"));for(var o=1,i=1;o<e;){var a=r[o-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[o++]+c[u++];a.fn(l)}else a.fn(arguments[o++])}return n}}}}var ke=[];function xe(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===K.call(r.textContent).length&&e.removeChild(r)}}var _e,Se,Ce=(_e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Se=/([^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),Ee(n,!0)}(e,t):Ee(e.style,!1)});function Re(e,t,n){return t+"-"+n.toLowerCase()}function Ee(e,t){var n,r;return function(s){var o,i,a,c;switch(typeof s){case"object":if(s){if("object"===n){if(!t&&r!==s)for(i in r)i in s||(e[i]="")}else t?e.value="":e.cssText="";for(i in o=t?{}:e,s)a="number"!=typeof(c=s[i])||_e.test(i)?c:c+"px",!t&&/^--/.test(i)?o.setProperty(i,a):o[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Se,Re),":",e[t],";");return n.join("")}(r=o):r=s;break}default:r!=s&&(n="string",r=s,t?e.value=s||"":e.cssText=s||"")}}}var Ae,Te,Le=(Ae=[].slice,(Te=Pe.prototype).ELEMENT_NODE=1,Te.nodeType=111,Te.remove=function(e){var t,n=this.childNodes,r=this.firstChild,s=this.lastChild;return this._=null,e&&2===n.length?s.parentNode.removeChild(s):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(s),t.deleteContents()),r},Te.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,s=0,o=r.length;s<o;s++)t.appendChild(r[s]);return t},Pe);function Pe(e){var t=this.childNodes=Ae.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Ie(e){return{html:e}}function De(e,t){switch(e.nodeType){case Be:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Fe:return De(e.render(),t);default:return e}}function Ne(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(Ie).then(t):Promise.resolve(D.invoke(e,t)).then(t)}function je(e){return null!=e&&"then"in e}var Oe,Me,qe,ze,Ue,We="ownerSVGElement",Fe=v.prototype.nodeType,Be=Le.prototype.nodeType,He=(Me=(Oe={Event:b,WeakSet:u}).Event,qe=Oe.WeakSet,ze=!0,Ue=null,function(e){return ze&&(ze=!ze,Ue=new qe,function(e){var t=new qe,n=new qe;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,s=[],o=function(e){s.push(e),clearTimeout(r),r=setTimeout((function(){i(s.splice(r=0,s.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){o({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){o({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,s=e.length,o=0;o<s;o++)a((r=e[o]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var s,o=new Me(t),i=e.length,a=0;a<i;1===(s=e[a++]).nodeType&&function e(t,n,r,s,o){Ue.has(t)&&!s.has(t)&&(o.delete(t),s.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,s,o));}(s,o,t,n,r));}}(e.ownerDocument)),Ue.add(e),e}),Ge=/^(?:form|list)$/i,Ve=[].slice;function Ye(t){return this.type=t,function(t){var n=ke,r=xe;return function(s){var o,i,a;return n!==s&&(o=t,i=n=s,a=ve.get(i)||ve.set(i,$e(o,i)),r=a.updates(Y.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ke=!(Ye.prototype={attribute:function(e,t,n){var r,s=We in e;if("style"===t)return Ce(e,n,s);if("."===t.slice(0,1))return l=e,u=t.slice(1),s?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var o=t.slice(2);return"connected"===o||"disconnected"===o?He(e):t.toLowerCase()in e&&(o=o.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(o,r,!1),(r=t)&&e.addEventListener(o,t,!1))}}if("data"===t||!s&&t in e&&!Ge.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in D.attributes)return function(n){var s=D.attributes[t](e,n);r!==s&&(null==(r=s)?e.removeAttribute(t):e.setAttribute(t,s))};var i,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:De,before:e},s=We in e?"svg":"html",o=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":o?n!==a&&(n=a,t[0].textContent=a):(o=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){o=!1,t=h(e.parentNode,t,[],r);break}default:if(o=!1,N(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(N(a[0])&&(a=a.concat.apply([],a)),je(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):je(a)?a.then(i):"placeholder"in a?Ne(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,Ve.call(j([].concat(a.html).join(""),s).childNodes),r):i("length"in a?Ve.call(a):D.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var s;t!==r&&("object"==(s=typeof(t=r))&&r?je(r)?r.then(n):"placeholder"in r?Ne(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):D.invoke(r,n)):"function"==s?n(r(e)):e.textContent=null==r?"":r)}}}),Ze=function(t){var r,s,o,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(s={},o=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return s[t]||(s[t]=e)},Ze=c?o:(i=new n,function(e){return i.get(e)||(n=o(t=e),i.set(t,n),n);var t,n})):Ke=!0,Je(t)};function Je(e){return Ke?e:Ze(e)}function Qe(e){for(var t=arguments.length,n=[Je(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Xe=new n,et=function(e){var t,n,r;return function(){var s=Qe.apply(null,arguments);return r!==s[0]?(r=s[0],n=new Ye(e),t=nt(n.apply(n,s))):n.apply(n,s),t}},tt=function(e,t){var n=t.indexOf(":"),r=Xe.get(e),s=t;return-1<n&&(s=t.slice(n+1),t=t.slice(0,n)||"html"),r||Xe.set(e,r={}),r[s]||(r[s]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Le(t):e},rt=new n;function st(){var e=rt.get(this),t=Qe.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ye(We in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var ot,it,at,ct,lt=D.define,ut=Ye.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return st.bind(e)},dt.define=lt,dt.diff=h,(dt.hyper=dt).observe=He,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},ot=et,it=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,s){var o,i,a,c=t.get(e)||ct(e,t);switch(typeof s){case"object":case"function":var l=c.w||(c.w=new n);return l.get(s)||(o=l,i=s,a=new e(r),o.set(i,a),a);default:var u=c.p||(c.p=at(null));return u[s]||(u[s]=new e(r))}}(this,it.get(e)||(r=e,s=new w,it.set(r,s),s),e,null==t?"default":t);var r,s}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:$("html",ot),svg:$("svg",ot),state:$("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(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 s in r)n[s]=r[s];return!1!==t&&this.render(),this}}}),dt}(document);const bn=gn,yn=D,wn=dn,vn=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",s=null,o=new Map,i="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(i){case"type":if("/"===c){i="subtype";continue}t+=c;break;case"subtype":if(";"===c){i="param-start";continue}n+=c;break;case"param-start":if(Xe.test(c)||";"===c)continue;r+=c,i="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){i="param-value",s=null;continue}o.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){i="collect-quoted-string";continue}if(";"===c){s=s.trimEnd(),i="param-start",tt(o,r,s),r="";continue}s="string"==typeof s?s+c:c;break;case"collect-quoted-string":if('"'===c){tt(o,r,s),i="ignore-input-until-next-param",r="",s=null;continue}if("\\"===c)continue;s="string"==typeof s?s+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&tt(o,r,s);if(""===t.trim()||!Qe.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!Qe.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(o.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?Qe.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},$n=mn,kn=Je,xn=/-/g;const _n=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),Sn="en"===l||l.startsWith("en-")?"en-AU":l,Cn=new Intl.DateTimeFormat(Sn,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===Sn?"2-digit":"numeric"}),Rn=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function En(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function An(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function Tn(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:s})=>"element"===n&&t?t(s,r++,e):s))}}const Ln=Tn("conjunction"),Pn=Tn("disjunction");function In(e,t){return Ln(e,t).join("")}function Dn(e,t){return Pn(e,t).join("")}function Nn(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/</g,"<")}function jn(e){return e.trim().replace(/\s+/g," ")}function On(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=Mn(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function Mn(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}function qn(e,t=""){return _n.format(e).replace(xn,t)}function zn(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){ir(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}async function Un(e,t=864e5){const n=new Request(e),r=new URL(n.url);let s,o;if("caches"in window)try{if(s=await caches.open(r.origin),o=await s.match(n),o&&new Date(o.headers.get("Expires"))>new Date)return o}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&o)return console.warn(`Returning a stale cached response for ${r}`),o;if(s&&i.ok){const e=i.clone(),r=new Headers(i.headers),o=new Date(Date.now()+t);r.set("Expires",o.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return i}function Wn(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>bn`${e}, `));return bn`${r}${n[n.length-1]}`}function Fn(e,t){return[].concat(Ln(e,t)).map((e=>"string"==typeof e?bn`${e}`:e))}function Bn(e,t=""){const n=function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(jn(e.textContent));return Hn(e,t,n)}function Hn(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=r?n:n.toLowerCase();if(s=s.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s=`x${s}`):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Gn(e){const t=new Set,n="ltNodefault"in e.dataset?"":jn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>jn(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(jn(e))))}return[...t]}function Vn(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function Yn(e,t){const n=t.closest(Rn);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function Kn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Zn(e){const t=[];for(const n of function*(e){let t=e;for(;t.previousElementSibling;)t=t.previousElementSibling,yield t}(e))"section"===n.localName&&t.push(n);return t}function Jn(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function Qn(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Xn extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function er(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{Vn(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),tr(t),t}function tr(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...nr(t)])e.remove()}function*nr(e){for(;e.nextNode();)yield e.currentNode}class rr extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class sr extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||Hn(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:o,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:o,title:i,details:a,stack:n}}}function or(e,t,n={}){const r={...n,isWarning:!1};s("error",new sr(e,t,r))}function ir(e,t,n={}){const r={...n,isWarning:!0};s("warn",new sr(e,t,r))}function ar(e){return{showError:(t,n)=>or(t,e,n),showWarning:(t,n)=>ir(t,e,n)}}function cr(e){return e?`\`${e}\``:""}function lr(e,{quotes:t}={quotes:!1}){return Dn(e,t?e=>cr(dr(e)):cr)}function ur(e,{quotes:t}={quotes:!1}){return In(e,t?e=>cr(dr(e)):cr)}function dr(e){return String(e)?`"${e}"`:""}function pr(e,...t){return fr(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,o]=r.slice(1,-1).split("|");if(o){return`${e}[${s}](${new URL(o,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`})).join(""))}function fr(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const hr=new Map([["text/html","html"],["application/xml","xml"]]);function mr(e,t=document){const n=hr.get(e);if(!n){const t=[...hr.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=gr(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function gr(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;tr(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),An(r);const o=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&o.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=bn`<meta charset="utf-8" />`);o.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=bn`
      +window.respecVersion="35.1.2",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=!!window.require;if(!t){const e=function(e,t){const n=e.map((e=>{if(!(e in window.require.modules))throw new Error(`Unsupported dependency name: ${e}`);return window.require.modules[e]}));Promise.all(n).then((e=>t(...e)))};e.modules={},window.require=e}function n(e,n){t||(window.require.modules[e]=n)}const r=new EventTarget;function s(e,t){if(r.dispatchEvent(new CustomEvent(e,{detail:t})),window.parent===window.self)return;const n=String(JSON.stringify(t?.stack||t));window.parent.postMessage({topic:e,args:n},window.parent.location.origin)}function o(e,t,n={once:!1}){r.addEventListener(e,(e=>t(e.detail)),n)}n("core/pubsubhub",{sub:o});const i=["githubToken","githubUser"];const a=document.documentElement;a?.hasAttribute("lang")||(a.lang="en",a.hasAttribute("dir")||(a.dir="ltr"));const c={},l=a?.lang??"en";var u=Object.freeze({__proto__:null,l10n:c,lang:l,name:"core/l10n",run:function(e){e.l10n=c[l]||c.en}});const d=(e,t)=>t.some((t=>e instanceof t));let p,f;const h=new WeakMap,m=new WeakMap,g=new WeakMap;let b={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return $(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function y(e){b=e(b)}function w(e){return(f||(f=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(k(this),t),$(this.request)}:function(...t){return $(e.apply(k(this),t))}}function v(e){return"function"==typeof e?w(e):(e instanceof IDBTransaction&&function(e){if(h.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)}));h.set(e,t)}(e),d(e,p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,b):e)}function $(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t($(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",o)}));return g.set(t,e),t}(e);if(m.has(e))return m.get(e);const t=v(e);return t!==e&&(m.set(e,t),g.set(t,e)),t}const k=e=>g.get(e);const x=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],S=new Map;function C(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(S.get(t))return S.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!s&&!x.includes(n))return;const o=async function(e,...t){const o=this.transaction(e,s?"readwrite":"readonly");let i=o.store;return r&&(i=i.index(t.shift())),(await Promise.all([i[n](...t),s&&o.done]))[0]};return S.set(t,o),o}y((e=>({...e,get:(t,n,r)=>C(t,n)||e.get(t,n,r),has:(t,n)=>!!C(t,n)||e.has(t,n)})));const R=["continue","continuePrimaryKey","advance"],E={},A=new WeakMap,T=new WeakMap,L={get(e,t){if(!R.includes(t))return e[t];let n=E[t];return n||(n=E[t]=function(...e){A.set(this,T.get(this)[t](...e))}),n}};async function*P(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,L);for(T.set(n,t),g.set(n,k(t));t;)yield n,t=await(A.get(n)||t.continue()),A.delete(n)}function I(e,t){return t===Symbol.asyncIterator&&d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&d(e,[IDBIndex,IDBObjectStore])}y((e=>({...e,get:(t,n,r)=>I(t,n)?P:e.get(t,n,r),has:(t,n)=>I(t,n)||e.has(t,n)})));var D=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),$(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:s,terminated:o}={}){const i=indexedDB.open(e,t),a=$(i);return r&&i.addEventListener("upgradeneeded",(e=>{r($(i.result),e.oldVersion,e.newVersion,$(i.transaction),e)})),n&&i.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),a.then((e=>{o&&e.addEventListener("close",(()=>o())),s&&e.addEventListener("versionchange",(e=>s(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),a},unwrap:k,wrap:$});function N(e,t,n,r,s,{level:o="error",autofix:i,ruleName:a}={}){function c(n){return n>0?e.slice(t,t+n):e.slice(Math.max(t+n,0),t)}function l(n,{precedes:r}={}){const s=n.map((e=>e.trivia+e.value)).join(""),o=e[t];return"eof"===o.type?s:r?s+o.trivia:s.slice(o.trivia.length)}const u="eof"!==e[t].type?e[t].line:e.length>1?e[t-1].line:1,d=function(e){const t=e.split("\n");return t[t.length-1]}(l(c(-5),{precedes:!0})),p=c(5),f=l(p),h=d+f.split("\n")[0]+"\n"+(" ".repeat(d.length)+"^"),m="Syntax"===s?"since":"inside",g=`${s} error at line ${u}${e.name?` in ${e.name}`:""}${n&&n.name?`, ${m} \`${n.partial?"partial ":""}${function(e){const t=[e];for(;e&&e.parent;){const{parent:n}=e;t.unshift(n),e=n}return t.map((e=>function(e,t){let n=e;return t&&(n+=` ${t}`),n}(e.type,e.name))).join(" -> ")}(n)}\``:""}:\n${h}`;return{message:`${g} ${r}`,bareMessage:r,context:g,line:u,sourceName:e.name,level:o,ruleName:a,autofix:i,input:f,tokens:p}}function j(e,t,n,r){return N(e,t,n,r,"Syntax")}function O(e,t,n,r,s={}){return s.ruleName=n,N(t.source,e.index,t,r,"Validation",s)}class M{constructor({source:e,tokens:t}){Object.defineProperties(this,{source:{value:e},tokens:{value:t,writable:!0},parent:{value:null,writable:!0},this:{value:this}})}toJSON(){const e={type:void 0,name:void 0,inheritance:void 0};let t=this;for(;t!==Object.prototype;){const n=Object.getOwnPropertyDescriptors(t);for(const[t,r]of Object.entries(n))(r.enumerable||r.get)&&(e[t]=this[t]);t=Object.getPrototypeOf(t)}return e}}function q(e,t,{useNullableInner:n}={}){if(!e.union){const r=t.unique.get(e.idlType);if(!r)return;if("typedef"===r.type){const{typedefIncludesDictionary:n}=t.cache;if(n.has(r))return n.get(r);t.cache.typedefIncludesDictionary.set(r,void 0);const s=q(r.idlType,t);if(t.cache.typedefIncludesDictionary.set(r,s),s)return{reference:e,dictionary:s.dictionary}}if("dictionary"===r.type&&(n||!e.nullable))return{reference:e,dictionary:r}}for(const n of e.subtype){const e=q(n,t);if(e)return n.union?e:{reference:n,dictionary:e.dictionary}}}function z(e,t){if(t.cache.dictionaryIncludesRequiredField.has(e))return t.cache.dictionaryIncludesRequiredField.get(e);t.cache.dictionaryIncludesRequiredField.set(e,void 0);let n=e.members.some((e=>e.required));if(!n&&e.inheritance){const r=t.unique.get(e.inheritance);r?z(r,t)&&(n=!0):n=!0}return t.cache.dictionaryIncludesRequiredField.set(e,n),n}class U extends Array{constructor({source:e,tokens:t}){super(),Object.defineProperties(this,{source:{value:e},tokens:{value:t},parent:{value:null,writable:!0}})}}class W extends M{static parser(e,t){return()=>{const n=e.consumeKind(t);if(n)return new W({source:e.source,tokens:{value:n}})}}get value(){return ie(this.tokens.value.value)}write(e){return e.ts.wrap([e.token(this.tokens.value),e.token(this.tokens.separator)])}}class F extends W{static parse(e){const t=e.consumeKind("eof");if(t)return new F({source:e.source,tokens:{value:t}})}get type(){return"eof"}}function B(e,t){return ae(e,{parser:W.parser(e,t),listName:t+" list"})}const H=["identifier","decimal","integer","string"],G=new Map([...["NoInterfaceObject","LenientSetter","LenientThis","TreatNonObjectAsNull","Unforgeable"].map((e=>[e,`Legacy${e}`])),["NamedConstructor","LegacyFactoryFunction"],["OverrideBuiltins","LegacyOverrideBuiltIns"],["TreatNullAs","LegacyNullToEmptyString"]]);function V(e){for(const t of H){const n=B(e,t);if(n.length)return n}e.error("Expected identifiers, strings, decimals, or integers but none found")}class Y extends M{static parse(e){const t={assign:e.consume("=")},n=ye(new Y({source:e.source,tokens:t}));if(n.list=[],t.assign){if(t.asterisk=e.consume("*"),t.asterisk)return n.this;t.secondaryName=e.consumeKind(...H)}return t.open=e.consume("("),t.open?(n.list=n.rhsIsList?V(e):de(e),t.close=e.consume(")")||e.error("Unexpected token in extended attribute argument list")):t.assign&&!t.secondaryName&&e.error("No right hand side to extended attribute assignment"),n.this}get rhsIsList(){return this.tokens.assign&&!this.tokens.asterisk&&!this.tokens.secondaryName}get rhsType(){return this.rhsIsList?this.list[0].tokens.value.type+"-list":this.tokens.asterisk?"*":this.tokens.secondaryName?this.tokens.secondaryName.type:null}write(e){const{rhsType:t}=this;return e.ts.wrap([e.token(this.tokens.assign),e.token(this.tokens.asterisk),e.reference_token(this.tokens.secondaryName,this.parent),e.token(this.tokens.open),...this.list.map((n=>"identifier-list"===t?e.identifier(n,this.parent):n.write(e))),e.token(this.tokens.close)])}}class K extends M{static parse(e){const t=e.consumeKind("identifier");if(t)return new K({source:e.source,tokens:{name:t},params:Y.parse(e)})}constructor({source:e,tokens:t,params:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"params",{value:n})}get type(){return"extended-attribute"}get name(){return this.tokens.name.value}get rhs(){const{rhsType:e,tokens:t,list:n}=this.params;if(!e)return null;return{type:e,value:this.params.rhsIsList?n:this.params.tokens.secondaryName?ie(t.secondaryName.value):null}}get arguments(){const{rhsIsList:e,list:t}=this.params;return!t||e?[]:t}*validate(e){const{name:t}=this;if("LegacyNoInterfaceObject"===t){const e="`[LegacyNoInterfaceObject]` extended attribute is an undesirable feature that may be removed from Web IDL in the future. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/609) for more information.";yield O(this.tokens.name,this,"no-nointerfaceobject",e,{level:"warning"})}else if(G.has(t)){const e=`\`[${t}]\` extended attribute is a legacy feature that is now renamed to \`[${G.get(t)}]\`. Refer to the [relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more information.`;yield O(this.tokens.name,this,"renamed-legacy",e,{level:"warning",autofix:(n=this,()=>{const{name:e}=n;n.tokens.name.value=G.get(e),"TreatNullAs"===e&&(n.params.tokens={})})})}var n;for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.wrap([e.ts.trivia(this.tokens.name.trivia),e.ts.extendedAttribute(e.ts.wrap([e.ts.extendedAttributeReference(this.name),this.params.write(e)])),e.token(this.tokens.separator)])}}class Z extends U{static parse(e){const t={};t.open=e.consume("[");const n=new Z({source:e.source,tokens:t});return t.open?(n.push(...ae(e,{parser:K.parse,listName:"extended attribute"})),t.close=e.consume("]")||e.error("Expected a closing token for the extended attribute list"),n.length||(e.unconsume(t.close.index),e.error("An extended attribute list must not be empty")),e.probe("[")&&e.error("Illegal double extended attribute lists, consider merging them"),n):n}*validate(e){for(const t of this)yield*t.validate(e)}write(e){return this.length?e.ts.wrap([e.token(this.tokens.open),...this.map((t=>t.write(e))),e.token(this.tokens.close)]):""}}function J(e,t){const n=e.consume("?");n&&(t.tokens.nullable=n),e.probe("?")&&e.error("Can't nullable more than once")}function Q(e,t){let n=function(e,t){const n=e.consume("FrozenArray","ObservableArray","Promise","sequence","record");if(!n)return;const r=ye(new X({source:e.source,tokens:{base:n}}));switch(r.tokens.open=e.consume("<")||e.error(`No opening bracket after ${n.value}`),n.value){case"Promise":{e.probe("[")&&e.error("Promise type cannot have extended attribute");const n=fe(e,t)||e.error("Missing Promise subtype");r.subtype.push(n);break}case"sequence":case"FrozenArray":case"ObservableArray":{const s=pe(e,t)||e.error(`Missing ${n.value} subtype`);r.subtype.push(s);break}case"record":{e.probe("[")&&e.error("Record key cannot have extended attribute");const n=e.consume(...$e)||e.error(`Record key must be one of: ${$e.join(", ")}`),s=new X({source:e.source,tokens:{base:n}});s.tokens.separator=e.consume(",")||e.error("Missing comma after record key type"),s.type=t;const o=pe(e,t)||e.error("Error parsing generic type record");r.subtype.push(s,o);break}}return r.idlType||e.error(`Error parsing generic type ${n.value}`),r.tokens.close=e.consume(">")||e.error(`Missing closing bracket after ${n.value}`),r.this}(e,t)||ue(e);if(!n){const t=e.consumeKind("identifier")||e.consume(...$e,...ve);if(!t)return;n=new X({source:e.source,tokens:{base:t}}),e.probe("<")&&e.error(`Unsupported generic type ${t.value}`)}return"Promise"===n.generic&&e.probe("?")&&e.error("Promise type cannot be nullable"),n.type=t||null,J(e,n),n.nullable&&"any"===n.idlType&&e.error("Type `any` cannot be made nullable"),n}class X extends M{static parse(e,t){return Q(e,t)||function(e,t){const n={};if(n.open=e.consume("("),!n.open)return;const r=ye(new X({source:e.source,tokens:n}));for(r.type=t||null;;){const n=pe(e,t)||e.error("No type after open parenthesis or 'or' in union type");"any"===n.idlType&&e.error("Type `any` cannot be included in a union type"),"Promise"===n.generic&&e.error("Type `Promise` cannot be included in a union type"),r.subtype.push(n);const s=e.consume("or");if(!s)break;n.tokens.separator=s}return r.idlType.length<2&&e.error("At least two types are expected in a union type but found less"),n.close=e.consume(")")||e.error("Unterminated union type"),J(e,r),r.this}(e,t)}constructor({source:e,tokens:t}){super({source:e,tokens:t}),Object.defineProperty(this,"subtype",{value:[],writable:!0}),this.extAttrs=new Z({source:e,tokens:{}})}get generic(){return this.subtype.length&&this.tokens.base?this.tokens.base.value:""}get nullable(){return Boolean(this.tokens.nullable)}get union(){return Boolean(this.subtype.length)&&!this.tokens.base}get idlType(){if(this.subtype.length)return this.subtype;return ie([this.tokens.prefix,this.tokens.base,this.tokens.postfix].filter((e=>e)).map((e=>e.value)).join(" "))}*validate(e){if(yield*this.extAttrs.validate(e),"BufferSource"===this.idlType)for(const e of[this.extAttrs,this.parent?.extAttrs])for(const t of e){if("AllowShared"!==t.name)continue;const n="`[AllowShared] BufferSource` is now replaced with AllowSharedBufferSource.";yield O(this.tokens.base,this,"migrate-allowshared",n,{autofix:ee(this,t,e)})}if("void"===this.idlType){const e="`void` is now replaced by `undefined`. Refer to the [relevant GitHub issue](https://github.com/whatwg/webidl/issues/60) for more information.";yield O(this.tokens.base,this,"replace-void",e,{autofix:(t=this,()=>{t.tokens.base.value="undefined"})})}var t;const n=!this.union&&e.unique.get(this.idlType),r=this.union?this:n&&"typedef"===n.type?n.idlType:void 0;if(r&&this.nullable){const{reference:t}=q(r,e)||{};if(t){const e=(this.union?t:this).tokens.base,n="Nullable union cannot include a dictionary type.";yield O(e,this,"no-nullable-union-dict",n)}}else for(const t of this.subtype)yield*t.validate(e)}write(e){return e.ts.wrap([this.extAttrs.write(e),(()=>{if(this.union||this.generic)return e.ts.wrap([e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),...this.subtype.map((t=>t.write(e))),e.token(this.tokens.close)]);const t=this.tokens.prefix||this.tokens.base,n=this.tokens.prefix?[this.tokens.prefix.value,e.ts.trivia(this.tokens.base.trivia)]:[],r=e.reference(e.ts.wrap([...n,this.tokens.base.value,e.token(this.tokens.postfix)]),{unescaped:this.idlType,context:this});return e.ts.wrap([e.ts.trivia(t.trivia),r])})(),e.token(this.tokens.nullable),e.token(this.tokens.separator)])}}function ee(e,t,n){return()=>{const r=n.indexOf(t);n.splice(r,1),!n.length&&e.tokens.base.trivia.match(/^\s$/)&&(e.tokens.base.trivia=""),e.tokens.base.value="AllowSharedBufferSource"}}class te extends M{static parse(e){const t=e.consume("=");if(!t)return null;const n=ce(e)||e.consumeKind("string")||e.consume("null","[","{")||e.error("No value for default"),r=[n];if("["===n.value){const t=e.consume("]")||e.error("Default sequence value must be empty");r.push(t)}else if("{"===n.value){const t=e.consume("}")||e.error("Default dictionary value must be empty");r.push(t)}return new te({source:e.source,tokens:{assign:t},expression:r})}constructor({source:e,tokens:t,expression:n}){super({source:e,tokens:t}),n.parent=this,Object.defineProperty(this,"expression",{value:n})}get type(){return le(this.expression[0]).type}get value(){return le(this.expression[0]).value}get negative(){return le(this.expression[0]).negative}write(e){return e.ts.wrap([e.token(this.tokens.assign),...this.expression.map((t=>e.token(t)))])}}class ne extends M{static parse(e){const t=e.position,n={},r=ye(new ne({source:e.source,tokens:n}));return r.extAttrs=Z.parse(e),n.optional=e.consume("optional"),r.idlType=pe(e,"argument-type"),r.idlType?(n.optional||(n.variadic=e.consume("...")),n.name=e.consumeKind("identifier")||e.consume(...ke),n.name?(r.default=n.optional?te.parse(e):null,r.this):e.unconsume(t)):e.unconsume(t)}get type(){return"argument"}get optional(){return!!this.tokens.optional}get variadic(){return!!this.tokens.variadic}get name(){return ie(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e);const t=q(this.idlType,e,{useNullableInner:!0});if(t)if(this.idlType.nullable){const e="Dictionary arguments cannot be nullable.";yield O(this.tokens.name,this,"no-nullable-dict-arg",e)}else if(this.optional){if(!this.default){const e="Optional dictionary arguments must have a default value of `{}`.";yield O(this.tokens.name,this,"dict-arg-default",e,{autofix:re(this)})}}else if(this.parent&&!z(t.dictionary,e)&&function(e){const t=e.parent.arguments||e.parent.list,n=t.indexOf(e),r=t.slice(n+1).some((e=>!e.optional));return!r}(this)){const e="Dictionary argument must be optional if it has no required fields";yield O(this.tokens.name,this,"dict-arg-optional",e,{autofix:(n=this,()=>{const e=be(n.idlType);n.tokens.optional={...e,type:"optional",value:"optional"},e.trivia=" ",re(n)()})})}var n}write(e){return e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.optional),e.ts.type(this.idlType.write(e)),e.token(this.tokens.variadic),e.name_token(this.tokens.name,{data:this}),this.default?this.default.write(e):"",e.token(this.tokens.separator)])}}function re(e){return()=>{e.default=te.parse(new Ce(" = {}"))}}class se extends M{static parse(e,{special:t,regular:n}={}){const r={special:t},s=ye(new se({source:e.source,tokens:r}));return t&&"stringifier"===t.value&&(r.termination=e.consume(";"),r.termination)?(s.arguments=[],s):(t||n||(r.special=e.consume("getter","setter","deleter")),s.idlType=fe(e)||e.error("Missing return type"),r.name=e.consumeKind("identifier")||e.consume("includes"),r.open=e.consume("(")||e.error("Invalid operation"),s.arguments=de(e),r.close=e.consume(")")||e.error("Unterminated operation"),r.termination=e.consume(";")||e.error("Unterminated operation, expected `;`"),s.this)}get type(){return"operation"}get name(){const{name:e}=this.tokens;return e?ie(e.value):""}get special(){return this.tokens.special?this.tokens.special.value:""}*validate(e){if(yield*this.extAttrs.validate(e),!this.name&&["","static"].includes(this.special)){const e="Regular or static operations must have both a return type and an identifier.";yield O(this.tokens.open,this,"incomplete-op",e)}this.idlType&&(yield*this.idlType.validate(e));for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this,n=this.idlType?[e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close)]:[];return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),this.tokens.name?e.token(this.tokens.special):e.token(this.tokens.special,e.ts.nameless,{data:this,parent:t}),...n,e.token(this.tokens.termination)]),{data:this,parent:t})}}class oe extends M{static parse(e,{special:t,noInherit:n=!1,readonly:r=!1}={}){const s=e.position,o={special:t},i=ye(new oe({source:e.source,tokens:o}));if(t||n||(o.special=e.consume("inherit")),"inherit"===i.special&&e.probe("readonly")&&e.error("Inherited attributes cannot be read-only"),o.readonly=e.consume("readonly"),r&&!o.readonly&&e.probe("attribute")&&e.error("Attributes must be readonly in this context"),o.base=e.consume("attribute"),o.base)return i.idlType=pe(e,"attribute-type")||e.error("Attribute lacks a type"),o.name=e.consumeKind("identifier")||e.consume("async","required")||e.error("Attribute lacks a name"),o.termination=e.consume(";")||e.error("Unterminated attribute, expected `;`"),i.this;e.unconsume(s)}get type(){return"attribute"}get special(){return this.tokens.special?this.tokens.special.value:""}get readonly(){return!!this.tokens.readonly}get name(){return ie(this.tokens.name.value)}*validate(e){if(yield*this.extAttrs.validate(e),yield*this.idlType.validate(e),["sequence","record"].includes(this.idlType.generic)){const e=`Attributes cannot accept ${this.idlType.generic} types.`;yield O(this.tokens.name,this,"attr-invalid-type",e)}{const{reference:t}=q(this.idlType,e)||{};if(t){const e=(this.idlType.union?t:this.idlType).tokens.base,n="Attributes cannot accept dictionary types.";yield O(e,this,"attr-invalid-type",n)}}if(this.readonly&&function(e,t){if(e.union)return!1;if(e.extAttrs.some((e=>"EnforceRange"===e.name)))return!0;const n=t.unique.get(e.idlType);return"typedef"===n?.type&&n.idlType.extAttrs.some((e=>"EnforceRange"===e.name))}(this.idlType,e)){const e=this.idlType.tokens.base,t="Readonly attributes cannot accept [EnforceRange] extended attribute.";yield O(e,this,"attr-invalid-type",t)}}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.special),e.token(this.tokens.readonly),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.termination)]),{data:this,parent:t})}}function ie(e){return e.startsWith("_")?e.slice(1):e}function ae(e,{parser:t,allowDangler:n,listName:r="list"}){const s=t(e);if(!s)return[];s.tokens.separator=e.consume(",");const o=[s];for(;s.tokens.separator;){const s=t(e);if(!s){n||e.error(`Trailing comma in ${r}`);break}if(s.tokens.separator=e.consume(","),o.push(s),!s.tokens.separator)break}return o}function ce(e){return e.consumeKind("decimal","integer")||e.consume("true","false","Infinity","-Infinity","NaN")}function le({type:e,value:t}){switch(e){case"decimal":case"integer":return{type:"number",value:t};case"string":return{type:"string",value:t.slice(1,-1)}}switch(t){case"true":case"false":return{type:"boolean",value:"true"===t};case"Infinity":case"-Infinity":return{type:"Infinity",negative:t.startsWith("-")};case"[":return{type:"sequence",value:[]};case"{":return{type:"dictionary"};default:return{type:t}}}function ue(e){const{source:t}=e,n=function(){const n=e.consume("unsigned"),r=e.consume("short","long");if(r){const s=e.consume("long");return new X({source:t,tokens:{prefix:n,base:r,postfix:s}})}n&&e.error("Failed to parse integer type")}()||function(){const n=e.consume("unrestricted"),r=e.consume("float","double");if(r)return new X({source:t,tokens:{prefix:n,base:r}});n&&e.error("Failed to parse float type")}();if(n)return n;const r=e.consume("bigint","boolean","byte","octet","undefined");return r?new X({source:t,tokens:{base:r}}):void 0}function de(e){return ae(e,{parser:ne.parse,listName:"arguments list"})}function pe(e,t){const n=Z.parse(e),r=X.parse(e,t);return r&&(ye(r).extAttrs=n),r}function fe(e,t){const n=X.parse(e,t||"return-type");if(n)return n;const r=e.consume("void");if(r){const t=new X({source:e.source,tokens:{base:r}});return t.type="return-type",t}}function he(e){const t=e.consume("stringifier");if(!t)return;return oe.parse(e,{special:t})||se.parse(e,{special:t})||e.error("Unterminated stringifier")}function me(e){const t=e.split("\n");if(t.length){const e=t[t.length-1].match(/^\s+/);if(e)return e[0]}return""}function ge(e){return()=>{if(e.extAttrs.length){const t=new Ce("Exposed=Window,"),n=K.parse(t);n.tokens.separator=t.consume(",");const r=e.extAttrs[0];/^\s/.test(r.tokens.name.trivia)||(r.tokens.name.trivia=` ${r.tokens.name.trivia}`),e.extAttrs.unshift(n)}else{ye(e).extAttrs=Z.parse(new Ce("[Exposed=Window]"));const t=e.tokens.base.trivia;e.extAttrs.tokens.open.trivia=t,e.tokens.base.trivia=`\n${me(t)}`}}}function be(e){if(e.extAttrs.length)return e.extAttrs.tokens.open;if("operation"===e.type&&!e.special)return be(e.idlType);return Object.values(e.tokens).sort(((e,t)=>e.index-t.index))[0]}function ye(e,t){if(t||(t=e),!e)return e;return new Proxy(e,{get(e,t){const n=e[t];return Array.isArray(n)&&"source"!==t?ye(n,e):n},set(e,n,r){if(e[n]=r,!r)return!0;if(Array.isArray(r))for(const e of r)void 0!==e.parent&&(e.parent=t);else void 0!==r.parent&&(r.parent=t);return!0}})}const we={decimal:/-?(?=[0-9]*\.|[0-9]+[eE])(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,integer:/-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,identifier:/[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,string:/"[^"]*"/y,whitespace:/[\t\n\r ]+/y,comment:/\/\/.*|\/\*[\s\S]*?\*\//y,other:/[^\t\n\r 0-9A-Za-z]/y},ve=["ArrayBuffer","SharedArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","BigInt64Array","BigUint64Array","Float32Array","Float64Array","any","object","symbol"],$e=["ByteString","DOMString","USVString"],ke=["async","attribute","callback","const","constructor","deleter","dictionary","enum","getter","includes","inherit","interface","iterable","maplike","namespace","partial","required","setlike","setter","static","stringifier","typedef","unrestricted"],xe=["-Infinity","FrozenArray","Infinity","NaN","ObservableArray","Promise","bigint","boolean","byte","double","false","float","long","mixin","null","octet","optional","or","readonly","record","sequence","short","true","undefined","unsigned","void"].concat(ke,$e,ve),_e=["(",")",",","...",":",";","<","=",">","?","*","[","]","{","}"],Se=["_constructor","toString","_toString"];class Ce{constructor(e){this.source=function(e){const t=[];let n=0,r="",s=1,o=0;for(;n<e.length;){const a=e.charAt(n);let c=-1;if(/[\t\n\r ]/.test(a)?c=i("whitespace",{noFlushTrivia:!0}):"/"===a&&(c=i("comment",{noFlushTrivia:!0})),-1!==c){const e=t.pop().value;s+=(e.match(/\n/g)||[]).length,r+=e,o-=1}else if(/[-0-9.A-Z_a-z]/.test(a)){if(c=i("decimal"),-1===c&&(c=i("integer")),-1===c){c=i("identifier");const e=t.length-1,n=t[e];if(-1!==c){if(Se.includes(n.value)){const r=`${ie(n.value)} is a reserved identifier and must not be used.`;throw new Re(j(t,e,null,r))}xe.includes(n.value)&&(n.type="inline")}}}else'"'===a&&(c=i("string"));for(const i of _e)if(e.startsWith(i,n)){t.push({type:"inline",value:i,trivia:r,line:s,index:o}),r="",n+=i.length,c=n;break}if(-1===c&&(c=i("other")),-1===c)throw new Error("Token stream not progressing");n=c,o+=1}return t.push({type:"eof",value:"",trivia:r,line:s,index:o}),t;function i(i,{noFlushTrivia:a}={}){const c=we[i];c.lastIndex=n;const l=c.exec(e);return l?(t.push({type:i,value:l[0],trivia:r,line:s,index:o}),a||(r=""),c.lastIndex):-1}}(e),this.position=0}error(e){throw new Re(j(this.source,this.position,this.current,e))}probeKind(e){return this.source.length>this.position&&this.source[this.position].type===e}probe(e){return this.probeKind("inline")&&this.source[this.position].value===e}consumeKind(...e){for(const t of e){if(!this.probeKind(t))continue;const e=this.source[this.position];return this.position++,e}}consume(...e){if(!this.probeKind("inline"))return;const t=this.source[this.position];for(const n of e)if(t.value===n)return this.position++,t}consumeIdentifier(e){if(this.probeKind("identifier")&&this.source[this.position].value===e)return this.consumeKind("identifier")}unconsume(e){this.position=e}}class Re extends Error{constructor({message:e,bareMessage:t,context:n,line:r,sourceName:s,input:o,tokens:i}){super(e),this.name="WebIDLParseError",this.bareMessage=t,this.context=n,this.line=r,this.sourceName=s,this.input=o,this.tokens=i}}class Ee extends W{static parse(e){const t=e.consumeKind("string");if(t)return new Ee({source:e.source,tokens:{value:t}})}get type(){return"enum-value"}get value(){return super.value.slice(1,-1)}write(e){const{parent:t}=this;return e.ts.wrap([e.ts.trivia(this.tokens.value.trivia),e.ts.definition(e.ts.wrap(['"',e.ts.name(this.value,{data:this,parent:t}),'"']),{data:this,parent:t}),e.token(this.tokens.separator)])}}class Ae extends M{static parse(e){const t={};if(t.base=e.consume("enum"),!t.base)return;t.name=e.consumeKind("identifier")||e.error("No name for enum");const n=ye(new Ae({source:e.source,tokens:t}));return e.current=n.this,t.open=e.consume("{")||e.error("Bodyless enum"),n.values=ae(e,{parser:Ee.parse,allowDangler:!0,listName:"enumeration"}),e.probeKind("string")&&e.error("No comma between enum values"),t.close=e.consume("}")||e.error("Unexpected value in enum"),n.values.length||e.error("No value in enum"),t.termination=e.consume(";")||e.error("No semicolon after enum"),n.this}get type(){return"enum"}get name(){return ie(this.tokens.name.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.open),e.ts.wrap(this.values.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Te extends M{static parse(e){const t=e.consumeKind("identifier");if(!t)return;const n={target:t};if(n.includes=e.consume("includes"),n.includes)return n.mixin=e.consumeKind("identifier")||e.error("Incomplete includes statement"),n.termination=e.consume(";")||e.error("No terminating ; for includes statement"),new Te({source:e.source,tokens:n});e.unconsume(t.index)}get type(){return"includes"}get target(){return ie(this.tokens.target.value)}get includes(){return ie(this.tokens.mixin.value)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.reference_token(this.tokens.target,this),e.token(this.tokens.includes),e.reference_token(this.tokens.mixin,this),e.token(this.tokens.termination)]),{data:this})}}class Le extends M{static parse(e){const t={},n=ye(new Le({source:e.source,tokens:t}));if(t.base=e.consume("typedef"),t.base)return n.idlType=pe(e,"typedef-type")||e.error("Typedef lacks a type"),t.name=e.consumeKind("identifier")||e.error("Typedef lacks a name"),e.current=n.this,t.termination=e.consume(";")||e.error("Unterminated typedef, expected `;`"),n.this}get type(){return"typedef"}get name(){return ie(this.tokens.name.value)}*validate(e){yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.termination)]),{data:this})}}class Pe extends M{static parse(e,t){const n={base:t},r=ye(new Pe({source:e.source,tokens:n}));return n.name=e.consumeKind("identifier")||e.error("Callback lacks a name"),e.current=r.this,n.assign=e.consume("=")||e.error("Callback lacks an assignment"),r.idlType=fe(e)||e.error("Callback lacks a return type"),n.open=e.consume("(")||e.error("Callback lacks parentheses for arguments"),r.arguments=de(e),n.close=e.consume(")")||e.error("Unterminated callback"),n.termination=e.consume(";")||e.error("Unterminated callback, expected `;`"),r.this}get type(){return"callback"}get name(){return ie(this.tokens.name.value)}*validate(e){yield*this.extAttrs.validate(e),yield*this.idlType.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.name_token(this.tokens.name,{data:this}),e.token(this.tokens.assign),e.ts.type(this.idlType.write(e)),e.token(this.tokens.open),...this.arguments.map((t=>t.write(e))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class Ie extends M{static parse(e,t,{inheritable:n,allowedMembers:r}){const{tokens:s,type:o}=t;for(s.name=e.consumeKind("identifier")||e.error(`Missing name in ${o}`),e.current=t,t=ye(t),n&&Object.assign(s,function(e){const t=e.consume(":");return t?{colon:t,inheritance:e.consumeKind("identifier")||e.error("Inheritance lacks a type")}:{}}(e)),s.open=e.consume("{")||e.error(`Bodyless ${o}`),t.members=[];;){if(s.close=e.consume("}"),s.close)return s.termination=e.consume(";")||e.error(`Missing semicolon after ${o}`),t.this;const n=Z.parse(e);let i;for(const[t,...n]of r)if(i=ye(t(e,...n)),i)break;i||e.error("Unknown member"),i.extAttrs=n,t.members.push(i.this)}}get partial(){return!!this.tokens.partial}get name(){return ie(this.tokens.name.value)}get inheritance(){return this.tokens.inheritance?ie(this.tokens.inheritance.value):null}*validate(e){for(const t of this.members)t.validate&&(yield*t.validate(e))}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.callback),e.token(this.tokens.partial),e.token(this.tokens.base),e.token(this.tokens.mixin),e.name_token(this.tokens.name,{data:this}),(()=>this.tokens.inheritance?e.ts.wrap([e.token(this.tokens.colon),e.ts.trivia(this.tokens.inheritance.trivia),e.ts.inheritance(e.reference(this.tokens.inheritance.value,{context:this}))]):"")(),e.token(this.tokens.open),e.ts.wrap(this.members.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this})}}class De extends M{static parse(e){const t={};if(t.base=e.consume("const"),!t.base)return;let n=ue(e);if(!n){const t=e.consumeKind("identifier")||e.error("Const lacks a type");n=new X({source:e.source,tokens:{base:t}})}e.probe("?")&&e.error("Unexpected nullable constant type"),n.type="const-type",t.name=e.consumeKind("identifier")||e.error("Const lacks a name"),t.assign=e.consume("=")||e.error("Const lacks value assignment"),t.value=ce(e)||e.error("Const lacks a value"),t.termination=e.consume(";")||e.error("Unterminated const, expected `;`");const r=new De({source:e.source,tokens:t});return ye(r).idlType=n,r}get type(){return"const"}get name(){return ie(this.tokens.name.value)}get value(){return le(this.tokens.value)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),e.token(this.tokens.assign),e.token(this.tokens.value),e.token(this.tokens.termination)]),{data:this,parent:t})}}class Ne extends M{static parse(e){const t=e.position,n=ye(new Ne({source:e.source,tokens:{}})),{tokens:r}=n;if(r.readonly=e.consume("readonly"),r.readonly||(r.async=e.consume("async")),r.base=r.readonly?e.consume("maplike","setlike"):r.async?e.consume("iterable"):e.consume("iterable","maplike","setlike"),!r.base)return void e.unconsume(t);const{type:s}=n,o="maplike"===s,i=o||"iterable"===s,a=n.async&&"iterable"===s;r.open=e.consume("<")||e.error(`Missing less-than sign \`<\` in ${s} declaration`);const c=pe(e)||e.error(`Missing a type argument in ${s} declaration`);return n.idlType=[c],n.arguments=[],i&&(c.tokens.separator=e.consume(","),c.tokens.separator?n.idlType.push(pe(e)):o&&e.error(`Missing second type argument in ${s} declaration`)),r.close=e.consume(">")||e.error(`Missing greater-than sign \`>\` in ${s} declaration`),e.probe("(")&&(a?(r.argsOpen=e.consume("("),n.arguments.push(...de(e)),r.argsClose=e.consume(")")||e.error("Unterminated async iterable argument list")):e.error("Arguments are only allowed for `async iterable`")),r.termination=e.consume(";")||e.error(`Missing semicolon after ${s} declaration`),n.this}get type(){return this.tokens.base.value}get readonly(){return!!this.tokens.readonly}get async(){return!!this.tokens.async}*validate(e){for(const t of this.idlType)yield*t.validate(e);for(const t of this.arguments)yield*t.validate(e)}write(e){return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.readonly),e.token(this.tokens.async),e.token(this.tokens.base,e.ts.generic),e.token(this.tokens.open),e.ts.wrap(this.idlType.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.argsOpen),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.argsClose),e.token(this.tokens.termination)]),{data:this,parent:this.parent})}}class je extends M{static parse(e){const t=e.consume("constructor");if(!t)return;const n={base:t};n.open=e.consume("(")||e.error("No argument list in constructor");const r=de(e);n.close=e.consume(")")||e.error("Unterminated constructor"),n.termination=e.consume(";")||e.error("No semicolon after constructor");const s=new je({source:e.source,tokens:n});return ye(s).arguments=r,s}get type(){return"constructor"}*validate(e){for(const t of this.arguments)yield*t.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.base,e.ts.nameless,{data:this,parent:t}),e.token(this.tokens.open),e.ts.wrap(this.arguments.map((t=>t.write(e)))),e.token(this.tokens.close),e.token(this.tokens.termination)]),{data:this,parent:t})}}function Oe(e){const t=e.consume("static");if(!t)return;return oe.parse(e,{special:t})||se.parse(e,{special:t})||e.error("No body in static member")}class Me extends Ie{static parse(e,t,{extMembers:n=[],partial:r=null}={}){const s={partial:r,base:t};return Ie.parse(e,new Me({source:e.source,tokens:s}),{inheritable:!r,allowedMembers:[...n,[De.parse],[je.parse],[Oe],[he],[Ne.parse],[oe.parse],[se.parse]]})}get type(){return"interface"}*validate(e){if(yield*this.extAttrs.validate(e),!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Interfaces must have `[Exposed]` extended attribute. To fix, add, for example, `[Exposed=Window]`. Please also consider carefully if your interface should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield O(this.tokens.name,this,"require-exposed",e,{autofix:ge(this)})}const t=this.extAttrs.filter((e=>"Constructor"===e.name));for(const e of t){const t="Constructors should now be represented as a `constructor()` operation on the interface instead of `[Constructor]` extended attribute. Refer to the [WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) for more information.";yield O(e.tokens.name,this,"constructor-member",t,{autofix:qe(this,e)})}if(this.extAttrs.some((e=>"Global"===e.name))){const e=this.extAttrs.filter((e=>"LegacyFactoryFunction"===e.name));for(const t of e){const e="Interfaces marked as `[Global]` cannot have factory functions.";yield O(t.tokens.name,this,"no-constructible-global",e)}const t=this.members.filter((e=>"constructor"===e.type));for(const e of t){const t="Interfaces marked as `[Global]` cannot have constructors.";yield O(e.tokens.base,this,"no-constructible-global",t)}}yield*super.validate(e),this.partial||(yield*function*(e,t){const n=function(e){const t=i(e);return{statics:new Set(t.filter((e=>"static"===e.special)).map((e=>e.name))),nonstatics:new Set(t.filter((e=>"static"!==e.special)).map((e=>e.name)))}}(t),r=e.partials.get(t.name)||[],s=e.mixinMap.get(t.name)||[];for(const e of[...r,...s]){const r=i(e),s=r.filter((e=>"static"===e.special)),a=r.filter((e=>"static"!==e.special));yield*o(s,n.statics,e,t),yield*o(a,n.nonstatics,e,t),s.forEach((e=>n.statics.add(e.name))),a.forEach((e=>n.nonstatics.add(e.name)))}function*o(e,t,n,r){for(const s of e){const{name:e}=s;if(e&&t.has(e)){const t=`The ${"static"===s.special?"static ":""}operation "${e}" has already been defined for the base interface "${r.name}" either in itself or in a mixin`;yield O(s.tokens.name,n,"no-cross-overload",t)}}}function i(e){return e.members.filter((({type:e})=>"operation"===e))}}(e,this))}}function qe(e,t){return e=ye(e),()=>{const n=me(e.extAttrs.tokens.open.trivia),r=e.members.length?me(be(e.members[0]).trivia):function(e){const t=me(e),n=t.includes("\t")?"\t":"  ";return t+n}(n),s=je.parse(new Ce(`\n${r}constructor();`));s.extAttrs=new Z({source:e.source,tokens:{}}),ye(s).arguments=t.arguments;const o=function(e,t){const n=e.slice().reverse().findIndex(t);return-1===n?n:e.length-n-1}(e.members,(e=>"constructor"===e.type));e.members.splice(o+1,0,s);const{close:i}=e.tokens;i.trivia.includes("\n")||(i.trivia+=`\n${n}`);const{extAttrs:a}=e,c=a.indexOf(t),l=a.splice(c,1);a.length?a.length===c?a[c-1].tokens.separator=void 0:a[c].tokens.name.trivia.trim()||(a[c].tokens.name.trivia=l[0].tokens.name.trivia):a.tokens.open=a.tokens.close=void 0}}class ze extends Ie{static parse(e,t,{extMembers:n=[],partial:r}={}){const s={partial:r,base:t};if(s.mixin=e.consume("mixin"),s.mixin)return Ie.parse(e,new ze({source:e.source,tokens:s}),{allowedMembers:[...n,[De.parse],[he],[oe.parse,{noInherit:!0}],[se.parse,{regular:!0}]]})}get type(){return"interface mixin"}}class Ue extends M{static parse(e){const t={},n=ye(new Ue({source:e.source,tokens:t}));return n.extAttrs=Z.parse(e),t.required=e.consume("required"),n.idlType=pe(e,"dictionary-type")||e.error("Dictionary member lacks a type"),t.name=e.consumeKind("identifier")||e.error("Dictionary member lacks a name"),n.default=te.parse(e),t.required&&n.default&&e.error("Required member must not have a default"),t.termination=e.consume(";")||e.error("Unterminated dictionary member, expected `;`"),n.this}get type(){return"field"}get name(){return ie(this.tokens.name.value)}get required(){return!!this.tokens.required}*validate(e){yield*this.idlType.validate(e)}write(e){const{parent:t}=this;return e.ts.definition(e.ts.wrap([this.extAttrs.write(e),e.token(this.tokens.required),e.ts.type(this.idlType.write(e)),e.name_token(this.tokens.name,{data:this,parent:t}),this.default?this.default.write(e):"",e.token(this.tokens.termination)]),{data:this,parent:t})}}class We extends Ie{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("dictionary"),r.base)return Ie.parse(e,new We({source:e.source,tokens:r}),{inheritable:!n,allowedMembers:[...t,[Ue.parse]]})}get type(){return"dictionary"}}class Fe extends Ie{static parse(e,{extMembers:t=[],partial:n}={}){const r={partial:n};if(r.base=e.consume("namespace"),r.base)return Ie.parse(e,new Fe({source:e.source,tokens:r}),{allowedMembers:[...t,[oe.parse,{noInherit:!0,readonly:!0}],[De.parse],[se.parse,{regular:!0}]]})}get type(){return"namespace"}*validate(e){if(!this.partial&&this.extAttrs.every((e=>"Exposed"!==e.name))){const e="Namespaces must have [Exposed] extended attribute. To fix, add, for example, [Exposed=Window]. Please also consider carefully if your namespace should also be exposed in a Worker scope. Refer to the [WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) for more information.";yield O(this.tokens.name,this,"require-exposed",e,{autofix:ge(this)})}yield*super.validate(e)}}class Be extends Ie{static parse(e,t,{extMembers:n=[]}={}){const r={callback:t};if(r.base=e.consume("interface"),r.base)return Ie.parse(e,new Be({source:e.source,tokens:r}),{allowedMembers:[...n,[De.parse],[se.parse,{regular:!0}]]})}get type(){return"callback interface"}}function He(e,t){const n=e.source;function r(t){e.error(t)}function s(...t){return e.consume(...t)}function o(n){const o=s("interface");if(o)return ze.parse(e,o,{...n,...t?.extensions?.mixin})||Me.parse(e,o,{...n,...t?.extensions?.interface})||r("Interface has no proper body")}function i(){if(t.productions)for(const n of t.productions){const t=n(e);if(t)return t}return function(){const n=s("callback");if(n)return e.probe("interface")?Be.parse(e,n,{...t?.extensions?.callbackInterface}):Pe.parse(e,n)}()||o()||function(){const n=s("partial");if(n)return We.parse(e,{partial:n,...t?.extensions?.dictionary})||o({partial:n})||Fe.parse(e,{partial:n,...t?.extensions?.namespace})||r("Partial doesn't apply to anything")}()||We.parse(e,t?.extensions?.dictionary)||Ae.parse(e)||Le.parse(e)||Te.parse(e)||Fe.parse(e,t?.extensions?.namespace)}const a=function(){if(!n.length)return[];const s=[];for(;;){const t=Z.parse(e),n=i();if(!n){t.length&&r("Stray extended attributes");break}ye(n).extAttrs=t,s.push(n)}const o=F.parse(e);return t.concrete&&s.push(o),s}();return e.position<n.length&&r("Unrecognised tokens"),a}function Ge(e){return e}const Ve={wrap:e=>e.join(""),trivia:Ge,name:Ge,reference:Ge,type:Ge,generic:Ge,nameless:Ge,inheritance:Ge,definition:Ge,extendedAttribute:Ge,extendedAttributeReference:Ge};class Ye{constructor(e){this.ts=Object.assign({},Ve,e)}reference(e,{unescaped:t,context:n}){return t||(t=e.startsWith("_")?e.slice(1):e),this.ts.reference(e,t,n)}token(e,t=Ge,...n){if(!e)return"";const r=t(e.value,...n);return this.ts.wrap([this.ts.trivia(e.trivia),r])}reference_token(e,t){return this.token(e,this.reference.bind(this),{context:t})}name_token(e,t){return this.token(e,this.ts.name,t)}identifier(e,t){return this.ts.wrap([this.reference_token(e.tokens.value,t),this.token(e.tokens.separator)])}}function Ke(e,t){const n=new Map,r=e.filter((e=>"includes"===e.type));for(const e of r){const r=t.get(e.includes);if(!r)continue;const s=n.get(e.target);s?s.push(r):n.set(e.target,[r])}return n}function*Ze(e){const t=function(e){const t=new Map,n=new Set,r=new Map;for(const s of e)if(s.partial){const e=r.get(s.name);e?e.push(s):r.set(s.name,[s])}else s.name&&(t.has(s.name)?n.add(s):t.set(s.name,s));return{all:e,unique:t,partials:r,duplicates:n,mixinMap:Ke(e,t),cache:{typedefIncludesDictionary:new WeakMap,dictionaryIncludesRequiredField:new WeakMap}}}(e);for(const e of t.all)e.validate&&(yield*e.validate(t));yield*function*({unique:e,duplicates:t}){for(const n of t){const{name:t}=n,r=`The name "${t}" of type "${e.get(t).type}" was already seen`;yield O(n.tokens.name,n,"no-duplicate",r)}}(t)}var Je=Object.freeze({__proto__:null,WebIDLParseError:Re,parse:function(e,t={}){const n=new Ce(e);return void 0!==t.sourceName&&(n.source.name=t.sourceName),He(n,t)},validate:function(e){return[...Ze((t=e,t.flat?t.flat():[].concat(...t)))];var t},write:function(e,{templates:t=Ve}={}){t=Object.assign({},Ve,t);const n=new Ye(t);return t.wrap(e.map((e=>e.write(n))))}});const Qe=/^[!#$%&'*+-.^`|~\w]+$/,Xe=/[\u000A\u000D\u0009\u0020]/u,et=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function tt(e,t,n){(t&&""!==t&&!e.has(t)&&et.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function nt(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let rt={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function st(e){rt=e}const ot=/[&<>"']/,it=new RegExp(ot.source,"g"),at=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ct=new RegExp(at.source,"g"),lt={"&":"&","<":"<",">":">",'"':""","'":"'"},ut=e=>lt[e];function dt(e,t){if(t){if(ot.test(e))return e.replace(it,ut)}else if(at.test(e))return e.replace(ct,ut);return e}const pt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function ft(e){return e.replace(pt,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const ht=/(^|[^\[])\^/g;function mt(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(ht,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}function gt(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const bt={exec:()=>null};function yt(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function wt(e,t,n){const r=e.length;if(0===r)return"";let s=0;for(;s<r;){const o=e.charAt(r-s-1);if(o!==t||n){if(o===t||!n)break;s++}else s++}return e.slice(0,r-s)}function vt(e,t,n,r){const s=t.href,o=t.title?dt(t.title):null,i=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:s,title:o,text:i,tokens:r.inlineTokens(i)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:s,title:o,text:dt(i)}}class $t{options;rules;lexer;constructor(e){this.options=e||rt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:wt(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=wt(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n    $1");e=wt(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let i="",a="",c=!1;for(;e;){let n=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;i=t[0],e=e.substring(i.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),l=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(l)&&(i+=l+"\n",e=e.substring(l.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),s=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const c=e.split("\n",1)[0];if(l=c,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),s.test(l))break;if(o.test(l))break;if(t.test(l))break;if(n.test(e))break;if(l.search(/[^ ]/)>=u||!l.trim())a+="\n"+l.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(s.test(r))break;if(o.test(r))break;if(n.test(r))break;a+="\n"+l}d||l.trim()||(d=!0),i+=c+"\n",e=e.substring(c.length+1),r=l.slice(u)}}s.loose||(c?s.loose=!0:/\n *\n *$/.test(i)&&(c=!0));let p,f=null;this.options.gfm&&(f=/^\[[ xX]\] /.exec(a),f&&(p="[ ] "!==f[0],a=a.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:i,task:!!f,checked:p,loose:!1,text:a,tokens:[]}),s.raw+=i}s.items[s.items.length-1].raw=i.trimEnd(),s.items[s.items.length-1].text=a.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){const t=s.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));s.loose=n}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=yt(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),s=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(const e of n)o.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of s)o.rows.push(yt(e,o.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:dt(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=wt(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),vt(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return vt(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let s,o,i=n,a=0;const c="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=c.exec(t));){if(s=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!s)continue;if(o=[...s].length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+a);const t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+o);if(Math.min(n,o)%2){const e=c.slice(1,-1);return{type:"em",raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}const l=c.slice(2,-2);return{type:"strong",raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=dt(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=dt(t[1]),n="mailto:"+e):(e=dt(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=dt(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=dt(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:dt(t[0]),{type:"text",raw:t[0],text:e}}}}const kt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xt=/(?:[*+-]|\d{1,9}[.)])/,_t=mt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,xt).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),St=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ct=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Rt=mt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Ct).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Et=mt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xt).getRegex(),At="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Tt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Lt=mt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Tt).replace("tag",At).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Pt=mt(St).replace("hr",kt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex(),It={blockquote:mt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pt).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:Rt,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:kt,html:Lt,lheading:_t,list:Et,newline:/^(?: *(?:\n|$))+/,paragraph:Pt,table:bt,text:/^[^\n]+/},Dt=mt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",kt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex(),Nt={...It,table:Dt,paragraph:mt(St).replace("hr",kt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",At).getRegex()},jt={...It,html:mt("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Tt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mt(St).replace("hr",kt).replace("heading"," *#{1,6} *[^\n]").replace("lheading",_t).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ot=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Mt=/^( {2,}|\\)\n(?!\s*$)/,qt="\\p{P}\\p{S}",zt=mt(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,qt).getRegex(),Ut=mt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,qt).getRegex(),Wt=mt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,qt).getRegex(),Ft=mt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,qt).getRegex(),Bt=mt(/\\([punct])/,"gu").replace(/punct/g,qt).getRegex(),Ht=mt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).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])?)+(?![-_])/).getRegex(),Gt=mt(Tt).replace("(?:--\x3e|$)","--\x3e").getRegex(),Vt=mt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Gt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Kt=mt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Yt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Zt=mt(/^!?\[(label)\]\[(ref)\]/).replace("label",Yt).replace("ref",Ct).getRegex(),Jt=mt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ct).getRegex(),Qt={_backpedal:bt,anyPunctuation:Bt,autolink:Ht,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Mt,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:bt,emStrongLDelim:Ut,emStrongRDelimAst:Wt,emStrongRDelimUnd:Ft,escape:Ot,link:Kt,nolink:Jt,punctuation:zt,reflink:Zt,reflinkSearch:mt("reflink|nolink(?!\\()","g").replace("reflink",Zt).replace("nolink",Jt).getRegex(),tag:Vt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:bt},Xt={...Qt,link:mt(/^!?\[(label)\]\((.*?)\)/).replace("label",Yt).getRegex(),reflink:mt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yt).getRegex()},en={...Qt,escape:mt(Ot).replace("])","~|])").getRegex(),url:mt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},tn={...en,br:mt(Mt).replace("{2,}","*").getRegex(),text:mt(en.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},nn={normal:It,gfm:Nt,pedantic:jt},rn={normal:Qt,gfm:en,breaks:tn,pedantic:Xt};class sn{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||rt,this.options.tokenizer=this.options.tokenizer||new $t,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:nn.normal,inline:rn.normal};this.options.pedantic?(t.block=nn.pedantic,t.inline=rn.pedantic):this.options.gfm&&(t.block=nn.gfm,this.options.breaks?t.inline=rn.breaks:t.inline=rn.gfm),this.tokenizer.rules=t}static get rules(){return{block:nn,inline:rn}}static lex(e,t){return new sn(t).lex(e)}static lexInline(e,t){return new sn(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,r,s,o;for(e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+"    ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,s,o,i,a,c=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(c));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(c));)c=c.slice(0,o.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(i||(a=""),i=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,c,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(s=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(s))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),i=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class on{options;constructor(e){this.options=e||rt}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+dt(r)+'">'+(n?e:dt(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:dt(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=gt(e);if(null===r)return n;let s='<a href="'+(e=r)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+n+"</a>",s}image(e,t,n){const r=gt(e);if(null===r)return n;let s=`<img src="${e=r}" alt="${n}"`;return t&&(s+=` title="${t}"`),s+=">",s}text(e){return e}}class an{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class cn{options;renderer;textRenderer;constructor(e){this.options=e||rt,this.options.renderer=this.options.renderer||new on,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new an}static parse(e,t){return new cn(t).parse(e)}static parseInline(e,t){return new cn(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=s,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(s.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=s;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,ft(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=s;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=s;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let o="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(r)}n+=this.renderer.table(t,o);continue}case"blockquote":{const e=s,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=s,t=e.ordered,r=e.start,o=e.loose;let i="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,s=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);o?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,o),i+=this.renderer.listitem(a,s,!!r)}n+=this.renderer.list(i,t,r);continue}case"html":{const e=s;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=s;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=s,i=o.tokens?this.parseInline(o.tokens):o.text;for(;r+1<e.length&&"text"===e[r+1].type;)o=e[++r],i+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);n+=t?this.renderer.paragraph(i):i;continue}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const s=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}switch(s.type){case"escape":{const e=s;n+=t.text(e.text);break}case"html":{const e=s;n+=t.html(e.text);break}case"link":{const e=s;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=s;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=s;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=s;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=s;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=s;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=s;n+=t.text(e.text);break}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ln{options;constructor(e){this.options=e||rt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}const un=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(sn.lex,cn.parse);parseInline=this.#e(sn.lexInline,cn.parseInline);Parser=cn;Renderer=on;TextRenderer=an;Lexer=sn;Tokenizer=$t;Hooks=ln;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{const s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new on(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,s=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new $t(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,s=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ln;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,s=e.hooks[r],o=t[r];ln.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(s.call(t,e)).then((e=>o.call(t,e)));const n=s.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return sn.lex(e,t??this.defaults)}parser(e,t){return cn.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const s={...r},o={...this.defaults,...s};!0===this.defaults.async&&!1===s.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const i=this.#t(!!o.silent,!!o.async);if(null==n)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then((t=>e(t,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let r=e(n,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let s=t(r,o);return o.hooks&&(s=o.hooks.postprocess(s)),s}catch(e){return i(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+dt(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function dn(e,t){return un.parse(e,t)}dn.options=dn.setOptions=function(e){return un.setOptions(e),dn.defaults=un.defaults,st(dn.defaults),dn},dn.getDefaults=nt,dn.defaults=rt,dn.use=function(...e){return un.use(...e),dn.defaults=un.defaults,st(dn.defaults),dn},dn.walkTokens=function(e,t){return un.walkTokens(e,t)},dn.parseInline=un.parseInline,dn.Parser=cn,dn.parser=cn.parse,dn.Renderer=on,dn.TextRenderer=an,dn.Lexer=sn,dn.lexer=sn.lex,dn.Tokenizer=$t,dn.Hooks=ln,dn.parse=dn,dn.options,dn.setOptions,dn.use,dn.walkTokens,dn.parseInline,cn.parse,sn.lex;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fn,hn={exports:{}};fn=hn,function(e,t){fn.exports=t()}(0,(function(){var e=[],t=[],n={},r={},s={};function o(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t){return e.replace(t[0],(function(n,r){var s,o,a=(s=t[1],o=arguments,s.replace(/\$(\d{1,2})/g,(function(e,t){return o[t]||""})));return i(""===n?e[r-1]:n,a)}))}function c(e,t,r){if(!e.length||n.hasOwnProperty(e))return t;for(var s=r.length;s--;){var o=r[s];if(o[0].test(t))return a(t,o)}return t}function l(e,t,n){return function(r){var s=r.toLowerCase();return t.hasOwnProperty(s)?i(r,s):e.hasOwnProperty(s)?i(r,e[s]):c(s,r,n)}}function u(e,t,n,r){return function(r){var s=r.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&c(s,s,n)===s}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=l(s,r,e),d.isPlural=u(s,r,e),d.singular=l(r,s,t),d.isSingular=u(r,s,t),d.addPluralRule=function(t,n){e.push([o(t),n])},d.addSingularRule=function(e,n){t.push([o(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(e){return d.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return d.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return d.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d}));var mn=pn(hn.exports),gn=function(e){var t={};try{t.WeakMap=WeakMap}catch(u){t.WeakMap=function(e,t){var n=t.defineProperty,r=t.hasOwnProperty,s=o.prototype;return s.delete=function(e){return this.has(e)&&delete e[this._]},s.get=function(e){return this.has(e)?e[this._]:void 0},s.has=function(e){return r.call(e,this._)},s.set=function(e,t){return n(e,this._,{configurable:!0,value:t}),this},o;function o(t){n(this,"_",{value:"_@ungap/weakmap"+e++}),t&&t.forEach(i,this)}function i(e){this.set(e[0],e[1])}}(Math.random(),Object)}var n=t.WeakMap,r={};try{r.WeakSet=WeakSet}catch(u){!function(e,t){var n=s.prototype;function s(){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._]},r.WeakSet=s}(Math.random(),Object.defineProperty)}function s(e,t,n,r,s,o){for(var i=("selectedIndex"in t),a=i;r<s;){var c,l=e(n[r],1);t.insertBefore(l,o),i&&a&&l.selected&&(a=!a,c=t.selectedIndex,t.selectedIndex=c<0?r:d.call(t.querySelectorAll("option"),l)),r++}}function o(e,t){return e==t}function i(e){return e}function a(e,t,n,r,s,o,i){var a=o-s;if(a<1)return-1;for(;a<=n-t;){for(var c=t,l=s;c<n&&l<o&&i(e[c],r[l]);)c++,l++;if(l===o)return t;t=c+1}return-1}function c(e,t,n,r,s){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:s}function l(e,t,n,r){for(;n<r;)f(e(t[n++],-1))}var u=r.WeakSet,d=[].indexOf,p=function(e,t,n){for(var r=1,s=t;r<s;){var o=(r+s)/2>>>0;n<e[o]?s=o:r=1+o}return r},f=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function h(e,t,n,r){for(var u=(r=r||{}).compare||o,d=r.node||i,f=null==r.before?null:d(r.before,0),h=t.length,m=h,g=0,b=n.length,y=0;g<m&&y<b&&u(t[g],n[y]);)g++,y++;for(;g<m&&y<b&&u(t[m-1],n[b-1]);)m--,b--;var w=g===m,v=y===b;if(w&&v)return n;if(w&&y<b)return s(d,e,n,y,b,c(d,t,g,h,f)),n;if(v&&g<m)return l(d,t,g,m),n;var $=m-g,k=b-y,x=-1;if($<k){if(-1<(x=a(n,y,b,t,g,m,u)))return s(d,e,n,y,x,d(t[g],0)),s(d,e,n,x+$,b,c(d,t,m,h,f)),n}else if(k<$&&-1<(x=a(t,g,m,n,y,b,u)))return l(d,t,g,x),l(d,t,x+k,m),n;return $<2||k<2?(s(d,e,n,y,b,d(t[g],0)),l(d,t,g,m)):$==k&&function(e,t,n,r,s,o){for(;r<s&&o(n[r],e[t-1]);)r++,t--;return 0===t}(n,b,t,g,m,u)?s(d,e,n,y,b,c(d,t,m,h,f)):function(e,t,n,r,o,i,a,c,u,d,f,h,m){!function(e,t,n,r,o,i,a,c,u){for(var d=[],p=e.length,f=a,h=0;h<p;)switch(e[h++]){case 0:o++,f++;break;case 1:d.push(r[o]),s(t,n,r,o++,o,f<c?t(i[f],0):u);break;case-1:f++}for(h=0;h<p;)switch(e[h++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:l(t,i,a++,a)}}(function(e,t,n,r,s,o,i){var a,c,l,u,d,p,f=n+o,h=[];e:for(b=0;b<=f;b++){if(50<b)return null;for(p=b-1,u=b?h[b-1]:[0,0],d=h[b]=[],a=-b;a<=b;a+=2){for(c=(l=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;l<o&&c<n&&i(r[s+l],e[t+c]);)l++,c++;if(l===o&&c===n)break e;d[b+a]=l}}for(var m=Array(b/2+f/2),g=m.length-1,b=h.length-1;0<=b;b--){for(;0<l&&0<c&&i(r[s+l-1],e[t+c-1]);)m[g--]=0,l--,c--;if(!b)break;p=b-1,u=b?h[b-1]:[0,0],(a=l-c)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(c--,m[g--]=1):(l--,m[g--]=-1)}return m}(n,r,i,a,c,d,h)||function(e,t,n,r,s,o,i,a){var c=0,l=r<a?r:a,u=Array(l++),d=Array(l);d[0]=-1;for(var f=1;f<l;f++)d[f]=i;for(var h=s.slice(o,i),m=t;m<n;m++){var g,b=h.indexOf(e[m]);-1<b&&-1<(c=p(d,l,g=b+o))&&(d[c]=g,u[c]={newi:m,oldi:g,prev:u[c-1]})}for(c=--l,--i;d[c]>i;)--c;l=a+r-c;var y=Array(l),w=u[c];for(--n;w;){for(var v=w.newi,$=w.oldi;v<n;)y[--l]=1,--n;for(;$<i;)y[--l]=-1,--i;y[--l]=0,--n,--i,w=w.prev}for(;t<=n;)y[--l]=1,--n;for(;o<=i;)y[--l]=-1,--i;return y}(n,r,o,i,a,c,u,d),e,t,n,r,a,c,f,m)}(d,e,n,y,b,k,t,g,m,$,h,u,f),n}var m={};function g(t,n){n=n||{};var r=e.createEvent("CustomEvent");return r.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),r}m.CustomEvent="function"==typeof CustomEvent?CustomEvent:(g["prototype"]=new g("").constructor.prototype,g);var b=m.CustomEvent,y={};try{y.Map=Map}catch(u){y.Map=function(){var e=0,t=[],n=[];return{delete:function(s){var o=r(s);return o&&(t.splice(e,1),n.splice(e,1)),o},forEach:function(e,r){t.forEach((function(t,s){e.call(r,n[s],t,this)}),this)},get:function(t){return r(t)?n[e]:void 0},has:r,set:function(s,o){return n[r(s)?e:t.push(s)-1]=o,this}};function r(n){return-1<(e=t.indexOf(n))}}}var w=y.Map;function v(){return this}function $(e,t){var n="_"+e+"$";return{get:function(){return this[n]||k(this,n,t.call(this,e))},set:function(e){k(this,n,e)}}}var k=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(v.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var x,_,S,C,R,E,A={},T={},L=[],P=T.hasOwnProperty,I=0,D={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in T||(I=L.push(e)),T[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<I;n++){var r=L[n];if(P.call(e,r))return T[r](e[r],t)}}},N=Array.isArray||(_=(x={}.toString).call([]),function(e){return x.call(e)===_}),j=(S=e,C="fragment",E="content"in M(R="template")?function(e){var t=M(R);return t.innerHTML=e,t.content}:function(e){var t,n=M(C),r=M(R);return O(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=M(C),n=M("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",O(t,n.firstChild.childNodes),t}:E)(e)});function O(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function M(e){return e===C?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var q,z,U,W,F,B,H,G,V,Y=(z="appendChild",U="cloneNode",W="createTextNode",B=(F="importNode")in(q=e),(H=q.createDocumentFragment())[z](q[W]("g")),H[z](q[W]("")),(B?q[F](H,!0):H[U](!0)).childNodes.length<2?function e(t,n){for(var r=t[U](),s=t.childNodes||[],o=s.length,i=0;n&&i<o;i++)r[z](e(s[i],n));return r}:B?q[F]:function(e,t){return e[U](!!t)}),K="".trim||function(){return String(this).replace(/^\s+|\s+/g,"")},Z="-"+Math.random().toFixed(6)+"%",J=!1;try{G=e.createElement("template"),V="tabindex","content"in G&&(G.innerHTML="<p "+V+'="'+Z+'"></p>',G.content.childNodes[0].getAttribute(V)==Z)||(Z="_dt: "+Z.slice(1,-1)+";",J=!0)}catch(u){}var Q="\x3c!--"+Z+"--\x3e",X=8,ee=1,te=3,ne=/^(?:style|textarea)$/i,re=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,se=" \\f\\n\\r\\t",oe="[^"+se+"\\/>\"'=]+",ie="["+se+"]+"+oe,ae="<([A-Za-z]+[A-Za-z0-9:._-]*)((?:",ce="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+oe.replace("\\/","")+"))?)",le=new RegExp(ae+ie+ce+"+)(["+se+"]*/?>)","g"),ue=new RegExp(ae+ie+ce+"*)(["+se+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+Q+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,fe)+r}function fe(e,t,n){return t+(n||'"')+Z+(n||'"')}function he(e,t,n){return re.test(t)?e:"<"+t+n+"></"+t+">"}var me=J?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 ge(t,n,r,s){for(var o=t.childNodes,i=o.length,a=0;a<i;){var c=o[a];switch(c.nodeType){case ee:var l=s.concat(a);!function(t,n,r,s){for(var o,i=t.attributes,a=[],c=[],l=me(i,r),u=l.length,d=0;d<u;){var p=l[d++],f=p.value===Z;if(f||1<(o=p.value.split(Q)).length){var h=p.name;if(a.indexOf(h)<0){a.push(h);var m=r.shift().replace(f?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+h+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(f)n.push(be(g,s,m,null));else{for(var b=o.length-2;b--;)r.shift();n.push(be(g,s,m,o))}}c.push(p)}}for(var y=((d=0)<(u=c.length)&&J&&!("ownerSVGElement"in t));d<u;){var w=c[d++];y&&(w.value=""),t.removeAttribute(w.name)}var v=t.nodeName;if(/^script$/i.test(v)){var $=e.createElement(v);for(u=i.length,d=0;d<u;)$.setAttributeNode(i[d++].cloneNode(!0));$.textContent=t.textContent,t.parentNode.replaceChild($,t)}}(c,n,r,l),ge(c,n,r,l);break;case X:var u=c.textContent;if(u===Z)r.shift(),n.push(ne.test(t.nodeName)?ye(t,s):{type:"any",node:c,path:s.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(c),a--,i--}break;case te:ne.test(t.nodeName)&&K.call(c.textContent)===Q&&(r.shift(),n.push(ye(t,s)))}a++}}function be(e,t,n,r){return{type:"attr",node:e,path:t,name:n,sparse:r}}function ye(e,t){return{type:"text",node:e,path:t}}var we,ve=(we=new n,{get:function(e){return we.get(e)},set:function(e,t){return we.set(e,t),t}});function $e(e,t){var n=(e.convert||function(e){return e.join(Q).replace(ue,he).replace(le,pe)})(t),r=e.transform;r&&(n=r(n));var s=j(n,e.type);xe(s);var o=[];return ge(s,o,t.slice(0),[]),{content:s,updates:function(n){for(var r=[],s=o.length,i=0,a=0;i<s;){var c=o[i++],l=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,c.path);switch(c.type){case"any":r.push({fn:e.any(l,[]),sparse:!1});break;case"attr":var u=c.sparse,d=e.attribute(l,c.name,c.node);null===u?r.push({fn:d,sparse:!1}):(a+=u.length-2,r.push({fn:d,sparse:!0,values:u}));break;case"text":r.push({fn:e.text(l),sparse:!1}),l.textContent=""}}return s+=a,function(){var e=arguments.length;if(s!==e-1)throw new Error(e-1+" values instead of "+s+"\n"+t.join("${value}"));for(var o=1,i=1;o<e;){var a=r[o-i];if(a.sparse){var c=a.values,l=c[0],u=1,d=c.length;for(i+=d-2;u<d;)l+=arguments[o++]+c[u++];a.fn(l)}else a.fn(arguments[o++])}return n}}}}var ke=[];function xe(e){for(var t=e.childNodes,n=t.length;n--;){var r=t[n];1!==r.nodeType&&0===K.call(r.textContent).length&&e.removeChild(r)}}var _e,Se,Ce=(_e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,Se=/([^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),Ee(n,!0)}(e,t):Ee(e.style,!1)});function Re(e,t,n){return t+"-"+n.toLowerCase()}function Ee(e,t){var n,r;return function(s){var o,i,a,c;switch(typeof s){case"object":if(s){if("object"===n){if(!t&&r!==s)for(i in r)i in s||(e[i]="")}else t?e.value="":e.cssText="";for(i in o=t?{}:e,s)a="number"!=typeof(c=s[i])||_e.test(i)?c:c+"px",!t&&/^--/.test(i)?o.setProperty(i,a):o[i]=a;n="object",t?e.value=function(e){var t,n=[];for(t in e)n.push(t.replace(Se,Re),":",e[t],";");return n.join("")}(r=o):r=s;break}default:r!=s&&(n="string",r=s,t?e.value=s||"":e.cssText=s||"")}}}var Ae,Te,Le=(Ae=[].slice,(Te=Pe.prototype).ELEMENT_NODE=1,Te.nodeType=111,Te.remove=function(e){var t,n=this.childNodes,r=this.firstChild,s=this.lastChild;return this._=null,e&&2===n.length?s.parentNode.removeChild(s):((t=this.ownerDocument.createRange()).setStartBefore(e?n[1]:r),t.setEndAfter(s),t.deleteContents()),r},Te.valueOf=function(e){var t=this._,n=null==t;if(n&&(t=this._=this.ownerDocument.createDocumentFragment()),n||e)for(var r=this.childNodes,s=0,o=r.length;s<o;s++)t.appendChild(r[s]);return t},Pe);function Pe(e){var t=this.childNodes=Ae.call(e,0);this.firstChild=t[0],this.lastChild=t[t.length-1],this.ownerDocument=t[0].ownerDocument,this._=null}function Ie(e){return{html:e}}function De(e,t){switch(e.nodeType){case Be:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Fe:return De(e.render(),t);default:return e}}function Ne(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(Ie).then(t):Promise.resolve(D.invoke(e,t)).then(t)}function je(e){return null!=e&&"then"in e}var Oe,Me,qe,ze,Ue,We="ownerSVGElement",Fe=v.prototype.nodeType,Be=Le.prototype.nodeType,He=(Me=(Oe={Event:b,WeakSet:u}).Event,qe=Oe.WeakSet,ze=!0,Ue=null,function(e){return ze&&(ze=!ze,Ue=new qe,function(e){var t=new qe,n=new qe;try{new MutationObserver(i).observe(e,{subtree:!0,childList:!0})}catch(t){var r=0,s=[],o=function(e){s.push(e),clearTimeout(r),r=setTimeout((function(){i(s.splice(r=0,s.length))}),0)};e.addEventListener("DOMNodeRemoved",(function(e){o({addedNodes:[],removedNodes:[e.target]})}),!0),e.addEventListener("DOMNodeInserted",(function(e){o({addedNodes:[e.target],removedNodes:[]})}),!0)}function i(e){for(var r,s=e.length,o=0;o<s;o++)a((r=e[o]).removedNodes,"disconnected",n,t),a(r.addedNodes,"connected",t,n)}function a(e,t,n,r){for(var s,o=new Me(t),i=e.length,a=0;a<i;1===(s=e[a++]).nodeType&&function e(t,n,r,s,o){Ue.has(t)&&!s.has(t)&&(o.delete(t),s.add(t),t.dispatchEvent(n));for(var i=t.children||[],a=i.length,c=0;c<a;e(i[c++],n,r,s,o));}(s,o,t,n,r));}}(e.ownerDocument)),Ue.add(e),e}),Ge=/^(?:form|list)$/i,Ve=[].slice;function Ye(t){return this.type=t,function(t){var n=ke,r=xe;return function(s){var o,i,a;return n!==s&&(o=t,i=n=s,a=ve.get(i)||ve.set(i,$e(o,i)),r=a.updates(Y.call(e,a.content,!0))),r.apply(null,arguments)}}(this)}var Ke=!(Ye.prototype={attribute:function(e,t,n){var r,s=We in e;if("style"===t)return Ce(e,n,s);if("."===t.slice(0,1))return l=e,u=t.slice(1),s?function(e){try{l[u]=e}catch(t){l.setAttribute(u,e)}}:function(e){l[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){c!==!!e&&((c=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var o=t.slice(2);return"connected"===o||"disconnected"===o?He(e):t.toLowerCase()in e&&(o=o.toLowerCase()),function(t){r!==t&&(r&&e.removeEventListener(o,r,!1),(r=t)&&e.addEventListener(o,t,!1))}}if("data"===t||!s&&t in e&&!Ge.test(t))return function(n){r!==n&&(r=n,e[t]!==n&&null==n?(e[t]="",e.removeAttribute(t)):e[t]=n)};if(t in D.attributes)return function(n){var s=D.attributes[t](e,n);r!==s&&(null==(r=s)?e.removeAttribute(t):e.setAttribute(t,s))};var i,a,c,l,u,d=!1,p=n.cloneNode(!0);return function(t){r!==t&&(r=t,p.value!==t&&(null==t?(d&&(d=!1,e.removeAttributeNode(p)),p.value=t):(p.value=t,d||(d=!0,e.setAttributeNode(p)))))}},any:function(e,t){var n,r={node:De,before:e},s=We in e?"svg":"html",o=!1;return function i(a){switch(typeof a){case"string":case"number":case"boolean":o?n!==a&&(n=a,t[0].textContent=a):(o=!0,n=a,t=h(e.parentNode,t,[(c=a,e.ownerDocument.createTextNode(c))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){o=!1,t=h(e.parentNode,t,[],r);break}default:if(o=!1,N(n=a))if(0===a.length)t.length&&(t=h(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(N(a[0])&&(a=a.concat.apply([],a)),je(a[0])){Promise.all(a).then(i);break}default:t=h(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=h(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):je(a)?a.then(i):"placeholder"in a?Ne(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=h(e.parentNode,t,Ve.call(j([].concat(a.html).join(""),s).childNodes),r):i("length"in a?Ve.call(a):D.invoke(a,i))}var c}},text:function(e){var t;return function n(r){var s;t!==r&&("object"==(s=typeof(t=r))&&r?je(r)?r.then(n):"placeholder"in r?Ne(r,n):n("text"in r?String(r.text):"any"in r?r.any:"html"in r?[].concat(r.html).join(""):"length"in r?Ve.call(r).join(""):D.invoke(r,n)):"function"==s?n(r(e)):e.textContent=null==r?"":r)}}}),Ze=function(t){var r,s,o,i,a=(r=(e.defaultView.navigator||{}).userAgent,/(Firefox|Safari)\/(\d+)/.test(r)&&!/(Chrom[eium]+|Android)\/(\d+)/.test(r)),c=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||c?(s={},o=function(e){for(var t=".",n=0;n<e.length;n++)t+=e[n].length+"."+e[n];return s[t]||(s[t]=e)},Ze=c?o:(i=new n,function(e){return i.get(e)||(n=o(t=e),i.set(t,n),n);var t,n})):Ke=!0,Je(t)};function Je(e){return Ke?e:Ze(e)}function Qe(e){for(var t=arguments.length,n=[Je(e)],r=1;r<t;)n.push(arguments[r++]);return n}var Xe=new n,et=function(e){var t,n,r;return function(){var s=Qe.apply(null,arguments);return r!==s[0]?(r=s[0],n=new Ye(e),t=nt(n.apply(n,s))):n.apply(n,s),t}},tt=function(e,t){var n=t.indexOf(":"),r=Xe.get(e),s=t;return-1<n&&(s=t.slice(n+1),t=t.slice(0,n)||"html"),r||Xe.set(e,r={}),r[s]||(r[s]=et(t))},nt=function(e){var t=e.childNodes,n=t.length;return 1===n?t[0]:n?new Le(t):e},rt=new n;function st(){var e=rt.get(this),t=Qe.apply(null,arguments);return e&&e.template===t[0]?e.tagger.apply(null,t):function(e){var t=new Ye(We in this?"svg":"html");rt.set(this,{tagger:t,template:e}),this.textContent="",this.appendChild(t.apply(null,arguments))}.apply(this,t),this}var ot,it,at,ct,lt=D.define,ut=Ye.prototype;function dt(e){return arguments.length<2?null==e?et("html"):"string"==typeof e?dt.wire(null,e):"raw"in e?et("html")(e):"nodeType"in e?dt.bind(e):tt(e,"html"):("raw"in e?et("html"):dt.wire).apply(null,arguments)}return dt.Component=v,dt.bind=function(e){return st.bind(e)},dt.define=lt,dt.diff=h,(dt.hyper=dt).observe=He,dt.tagger=ut,dt.wire=function(e,t){return null==e?et(t||"html"):tt(e,t||"html")},dt._={WeakMap:n,WeakSet:u},ot=et,it=new n,at=Object.create,ct=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(v,{for:{configurable:!0,value:function(e,t){return function(e,t,r,s){var o,i,a,c=t.get(e)||ct(e,t);switch(typeof s){case"object":case"function":var l=c.w||(c.w=new n);return l.get(s)||(o=l,i=s,a=new e(r),o.set(i,a),a);default:var u=c.p||(c.p=at(null));return u[s]||(u[s]=new e(r))}}(this,it.get(e)||(r=e,s=new w,it.set(r,s),s),e,null==t?"default":t);var r,s}}}),Object.defineProperties(v.prototype,{handleEvent:{value:function(e){var t=e.currentTarget;this["getAttribute"in t&&t.getAttribute("data-call")||"on"+e.type](e)}},html:$("html",ot),svg:$("svg",ot),state:$("state",(function(){return this.defaultState})),defaultState:{get:function(){return{}}},dispatch:{value:function(e,t){var n=this._wire$;if(n){var r=new b(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 s in r)n[s]=r[s];return!1!==t&&this.render(),this}}}),dt}(document);const bn=gn,yn=D,wn=dn,vn=class{constructor(e){const{type:t,subtype:n,params:r}=function(e){if(e=e.trim(),!e)throw new TypeError("Invalid input.");let t="",n="",r="",s=null,o=new Map,i="type",a=Array.from(e);for(let e=0;e<a.length;e++){const c=a[e];switch(i){case"type":if("/"===c){i="subtype";continue}t+=c;break;case"subtype":if(";"===c){i="param-start";continue}n+=c;break;case"param-start":if(Xe.test(c)||";"===c)continue;r+=c,i="param-name";break;case"param-name":if("="===c||";"===c){if("="===c){i="param-value",s=null;continue}o.set(r.toLowerCase(),null),r="";continue}r+=c;break;case"param-value":if('"'==c){i="collect-quoted-string";continue}if(";"===c){s=s.trimEnd(),i="param-start",tt(o,r,s),r="";continue}s="string"==typeof s?s+c:c;break;case"collect-quoted-string":if('"'===c){tt(o,r,s),i="ignore-input-until-next-param",r="",s=null;continue}if("\\"===c)continue;s="string"==typeof s?s+c:c;break;case"ignore-input-until-next-param":if(";"!==c)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&tt(o,r,s);if(""===t.trim()||!Qe.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!Qe.test(n))throw new TypeError("Invalid subtype");return{type:t,subtype:n,params:Object.fromEntries(o.entries())}}(e);this.type=t.trim().toLowerCase(),this.subtype=n.trimEnd().toLowerCase(),this.parameters=new Map(Object.entries(r))}get essence(){return`${this.type}/${this.subtype}`}toString(){return function(e){const{parameters:t,essence:n}=e;if(!t.size)return n;let r=";";for(const[e,n]of t.entries())r+=e,null!==n?Qe.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},$n=mn,kn=Je,xn=/-/g;const _n=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"}),Sn="en"===l||l.startsWith("en-")?"en-AU":l,Cn=new Intl.DateTimeFormat(Sn,{timeZone:"UTC",year:"numeric",month:"long",day:"en-AU"===Sn?"2-digit":"numeric"}),Rn=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function En(e){const t=new URL(e.href,document.baseURI),n=document.createElement("link");let{href:r}=t;switch(n.rel=e.hint,n.rel){case"dns-prefetch":case"preconnect":r=t.origin,(e.corsMode||t.origin!==document.location.origin)&&(n.crossOrigin=e.corsMode||"anonymous");break;case"preload":"as"in e&&n.setAttribute("as",e.as),e.corsMode&&(n.crossOrigin=e.corsMode)}return n.href=r,e.dontRemove||n.classList.add("removeOnSave"),n}function An(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function Tn(e,t="long"){const n=new Intl.ListFormat(l,{style:t,type:e});return(e,t)=>{let r=0;return n.formatToParts(e).map((({type:n,value:s})=>"element"===n&&t?t(s,r++,e):s))}}const Ln=Tn("conjunction"),Pn=Tn("disjunction");function In(e,t){return Ln(e,t).join("")}function Dn(e,t){return Pn(e,t).join("")}function Nn(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/"/g,""").replace(/</g,"<")}function jn(e){return e.trim().replace(/\s+/g," ")}function On(e,t=l){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=Mn(e,n,t)||e.en[n];if(!r)throw new Error(`No l10n data for key: "${n}"`);return r}})}function Mn(e,t,n=l){return n=n.toLowerCase(),e[n]?.[t]||e[n.match(/^(\w{2,3})-.+$/)?.[1]]?.[t]}function qn(e,t=""){return _n.format(e).replace(xn,t)}function zn(e,t,...n){const r=[this,e,...n];if(t){const n=t.split(/\s+/);for(const t of n){const n=window[t];if(n)try{e=n.apply(this,r)}catch(e){ir(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace."}),console.error(e)}}}return e}async function Un(e,t=864e5){const n=new Request(e),r=new URL(n.url);let s,o;if("caches"in window)try{if(s=await caches.open(r.origin),o=await s.match(n),o&&new Date(o.headers.get("Expires"))>new Date)return o}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&o)return console.warn(`Returning a stale cached response for ${r}`),o;if(s&&i.ok){const e=i.clone(),r=new Headers(i.headers),o=new Date(Date.now()+t);r.set("Expires",o.toISOString());const a=new Response(await e.blob(),{headers:r});await s.put(n,a).catch(console.error)}return i}function Wn(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>bn`${e}, `));return bn`${r}${n[n.length-1]}`}function Fn(e,t){return[].concat(Ln(e,t)).map((e=>"string"==typeof e?bn`${e}`:e))}function Bn(e,t=""){const n=function(e){let t=0;for(const n of e)t=Math.imul(31,t)+n.charCodeAt(0)|0;return String(t)}(jn(e.textContent));return Hn(e,t,n)}function Hn(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let s=r?n:n.toLowerCase();if(s=s.trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,""),s?!/\.$/.test(s)&&/^[a-z]/i.test(t||s)||(s=`x${s}`):s="generatedID",t&&(s=`${t}-${s}`),e.ownerDocument.getElementById(s)){let t=0,n=`${s}-${t}`;for(;e.ownerDocument.getElementById(n);)t+=1,n=`${s}-${t}`;s=n}return e.id=s,s}function Gn(e){const t=new Set,n="ltNodefault"in e.dataset?"":jn(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>jn(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r.title?t.add(r.title):'""'===e.textContent&&t.add("the-empty-string"),t.add(n),t.delete(""),e.dataset.localLt){e.dataset.localLt.split("|").forEach((e=>t.add(jn(e))))}return[...t]}function Vn(e,t,n={copyAttributes:!0}){if(e.localName===t)return e;const r=e.ownerDocument.createElement(t);if(n.copyAttributes)for(const{name:t,value:n}of e.attributes)r.setAttribute(t,n);return r.append(...e.childNodes),e.replaceWith(r),r}function Yn(e,t){const n=t.closest(Rn);let r=!1;if(n&&(r=!t.closest(".normative")||!n.querySelector(".normative")),e.startsWith("!")){if(r)return{type:"informative",illegal:!0};r=!1}else e.startsWith("?")&&(r=!0);return{type:r?"informative":"normative",illegal:!1}}function Kn(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Zn(e){const t=[];for(const n of function*(e){let t=e;for(;t.previousElementSibling;)t=t.previousElementSibling,yield t}(e))"section"===n.localName&&t.push(n);return t}function Jn(e,t){const n=[];let r=e.parentElement;for(;r;){const e=r.closest(t);if(!e)break;n.push(e),r=e.parentElement}return n}function Qn(e){const{previousSibling:t}=e;if(!t||t.nodeType!==Node.TEXT_NODE)return"";const n=t.textContent.lastIndexOf("\n");if(-1===n)return"";const r=t.textContent.slice(n+1);return/\S/.test(r)?"":r}class Xn extends Set{constructor(e=[]){super();for(const t of e)this.add(t)}add(e){return this.has(e)||this.getCanonicalKey(e)?this:super.add(e)}has(e){return super.has(e)||[...this.keys()].some((t=>t.toLowerCase()===e.toLowerCase()))}delete(e){return super.has(e)?super.delete(e):super.delete(this.getCanonicalKey(e))}getCanonicalKey(e){return super.has(e)?e:[...this.keys()].find((t=>t.toLowerCase()===e.toLowerCase()))}}function er(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{Vn(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),tr(t),t}function tr(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...nr(t)])e.remove()}function*nr(e){for(;e.nextNode();)yield e.currentNode}class rr extends Map{constructor(e=[]){return super(),e.forEach((([e,t])=>{this.set(e,t)})),this}set(e,t){return super.set(e.toLowerCase(),t),this}get(e){return super.get(e.toLowerCase())}has(e){return super.has(e.toLowerCase())}delete(e){return super.delete(e.toLowerCase())}}class sr extends Error{constructor(e,t,n){super(e);const r=n.isWarning?"ReSpecWarning":"ReSpecError";Object.assign(this,{message:e,plugin:t,name:r,...n}),n.elements&&n.elements.forEach((t=>function(e,t,n){e.classList.add("respec-offending-element"),e.hasAttribute("title")||e.setAttribute("title",n||t),e.id||Hn(e,"respec-offender")}(t,e,n.title)))}toJSON(){const{message:e,name:t,stack:n}=this,{plugin:r,hint:s,elements:o,title:i,details:a}=this;return{message:e,name:t,plugin:r,hint:s,elements:o,title:i,details:a,stack:n}}}function or(e,t,n={}){const r={...n,isWarning:!1};s("error",new sr(e,t,r))}function ir(e,t,n={}){const r={...n,isWarning:!0};s("warn",new sr(e,t,r))}function ar(e){return{showError:(t,n)=>or(t,e,n),showWarning:(t,n)=>ir(t,e,n)}}function cr(e){return e?`\`${e}\``:""}function lr(e,{quotes:t}={quotes:!1}){return Dn(e,t?e=>cr(dr(e)):cr)}function ur(e,{quotes:t}={quotes:!1}){return In(e,t?e=>cr(dr(e)):cr)}function dr(e){return String(e)?`"${e}"`:""}function pr(e,...t){return fr(e.map(((e,n)=>{const r=t[n];if(!r)return e;if(!r.startsWith("[")&&!r.endsWith("]"))return e+r;const[s,o]=r.slice(1,-1).split("|");if(o){return`${e}[${s}](${new URL(o,"https://respec.org/docs/")})`}return`${e}[\`${s}\`](https://respec.org/docs/#${s})`})).join(""))}function fr(e){if(!e)return e;const t=e.trimEnd().split("\n");for(;t.length&&!t[0].trim();)t.shift();const n=t.filter((e=>e.trim())).map((e=>e.search(/[^\s]/))),r=Math.min(...n);return t.map((e=>e.slice(r))).join("\n")}const hr=new Map([["text/html","html"],["application/xml","xml"]]);function mr(e,t=document){const n=hr.get(e);if(!n){const t=[...hr.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=gr(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function gr(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;tr(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),An(r);const o=e.createDocumentFragment(),i=e.querySelector("meta[name='viewport']");i&&t.firstChild!==i&&o.appendChild(i);let a=e.querySelector("meta[charset], meta[content*='charset=']");a||(a=bn`<meta charset="utf-8" />`);o.appendChild(a);const c=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=bn`
           <meta name="generator" content="${c}" />
         `;o.appendChild(l),t.prepend(o),s("beforesave",r)}(n);let r="";if("xml"===e)r=(new XMLSerializer).serializeToString(n);else!function(e){e.querySelectorAll("style").forEach((e=>{e.innerHTML=`\n${e.innerHTML}\n`})),e.querySelectorAll("head > *").forEach((e=>{e.outerHTML=`\n${e.outerHTML}`}))}(n),n.doctype&&(r+=(new XMLSerializer).serializeToString(n.doctype)),r+=n.documentElement.outerHTML;return r}n("core/exporter",{rsDocToDataURL:mr});class br{constructor(){this._respecDonePromise=new Promise((e=>{o("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],o("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),o("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return gr("html",document)}}const yr="core/post-process";const wr="core/pre-process";const vr="core/base-runner";async function $r(e){!function(){const e=new br;Object.defineProperty(document,"respec",{value:e})}(),s("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),o("amend-user-config",n),o("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of i)e in t&&delete t[e];e.innerHTML=JSON.stringify(t,null,2),document.head.appendChild(e)}))}(respecConfig),function(e){const t=new URLSearchParams(document.location.search),n=Array.from(t).filter((([e,t])=>!!e&&!!t)).map((([e,t])=>{const n=decodeURIComponent(e),r=decodeURIComponent(t.replace(/%3D/g,"="));let s;try{s=JSON.parse(r)}catch{s=r}return[n,s]})),r=Object.fromEntries(n);Object.assign(e,r),s("amend-user-config",r)}(respecConfig),performance.mark(`${vr}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||or("Every item in `preProcess` must be a JS function.",wr),t})).map((async(t,n)=>{const r=ar(`${wr}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){or(`Function ${t.name} threw an error during \`preProcess\`.`,wr,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}}(respecConfig);const t=e.filter((e=>{return(t=e)&&(t.run||t.Plugin);var t}));t.forEach((e=>!e.name&&console.warn("Plugin lacks name:",e))),await async function(e,t){for(const n of e.filter((e=>e.prepare)))try{await n.prepare(t)}catch(e){console.error(e)}}(t,respecConfig),await async function(e,t){for(const n of e){const e=n.name||"";try{await new Promise((async(r,s)=>{const o=setTimeout((()=>{const t=`Plugin ${e} took too long.`;console.error(t,n),s(new Error(t))}),15e3);performance.mark(`${e}-start`);try{n.Plugin?(await new n.Plugin(t).run(),r()):n.run&&(await n.run(t),r())}catch(e){s(e)}finally{clearTimeout(o),performance.mark(`${e}-end`),performance.measure(e,`${e}-start`,`${e}-end`)}}))}catch(e){console.error(e)}}}(t,respecConfig),s("plugins-done",respecConfig),await async function(e){if(Array.isArray(e.postProcess)){const t=e.postProcess.filter((e=>{const t="function"==typeof e;return t||or("Every item in `postProcess` must be a JS function.",yr),t})).map((async(t,n)=>{const r=ar(`${yr}/${t.name||`[${n}]`}`);try{return await t(e,document,r)}catch(e){or(`Function ${t.name} threw an error during \`postProcess\`.`,yr,{hint:"See developer console."}),console.error(e)}}));await Promise.all(t)}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),s("end-all"),An(document),performance.mark(`${vr}-end`),performance.measure(vr,`${vr}-start`,`${vr}-end`)}var kr=String.raw`.respec-modal .close-button{position:absolute;z-index:inherit;padding:.2em;font-weight:700;cursor:pointer;margin-left:5px;border:none;background:0 0}
       #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}
      @@ -808,7 +808,7 @@ dd{margin-left:0}
             data-link-for="${i}"
             >${a}</a
           ></code
      -  >`}function Li(e){const t=jn(e),n=bn`<em class="rfc2119">${t}</em>`;return vi[t]=!0,n}function Pi(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?bn`<a href="${t}" data-matched-text="${e}"></a>`:bn`<a data-cite="${t}" data-matched-text="${e}"></a>`}function Ii(e,t){const n=jn(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Zo(n);return!!t.parentElement.closest("dfn")?Mi(`\`${r.textContent}\``):r}function Di(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,o]=r.split("|").map(jn),{type:i,illegal:a}=Yn(s,t.parentElement),c=mi(s,o),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;ir("Normative references in informative sections are not allowed. ",wi,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function Ni(e,t,n){return"ABBR"===t.parentElement.tagName?e:bn`<abbr title="${n.get(e)}">${e}</abbr>`}function ji(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return bn`<var data-type="${r}">${n}</var>`}function Oi(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(jn).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),o=n.substring(r+1,n.length);return[t(s),t(o)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,o]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=qi(o),a=n?jn(n):null;return bn`<a
      +  >`}function Li(e){const t=jn(e),n=bn`<em class="rfc2119">${t}</em>`;return vi[t]=!0,n}function Pi(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?bn`<a href="${t}" data-matched-text="${e}"></a>`:bn`<a data-cite="${t}" data-matched-text="${e}"></a>`}function Ii(e,t){const n=jn(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Zo(n);return!!t.parentElement.closest("dfn,a")?Mi(`\`${r.textContent}\``):r}function Di(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[s,o]=r.split("|").map(jn),{type:i,illegal:a}=Yn(s,t.parentElement),c=mi(s,o),l=s.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(l)){const e=c.childNodes[1]||c;ir("Normative references in informative sections are not allowed. ",wi,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(l):n.informativeReferences.add(l),c.childNodes[1]?c.childNodes:[c]}function Ni(e,t,n){return"ABBR"===t.parentElement.tagName?e:bn`<abbr title="${n.get(e)}">${e}</abbr>`}function ji(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return bn`<var data-type="${r}">${n}</var>`}function Oi(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(jn).join("/"),n=e.replace("\\/","%%"),r=n.lastIndexOf("/");if(-1===r)return[t(n)];const s=n.substring(0,r),o=n.substring(r+1,n.length);return[t(s),t(o)]}(e=e.slice(2,-2)),[n,r]=2===t.length?t:[null,t[0]],[s,o]=r.includes("|")?r.split("|",2).map((e=>e.trim())):[null,r],i=qi(o),a=n?jn(n):null;return bn`<a
           data-link-type="dfn|abstract-op"
           data-link-for="${a}"
           data-xref-for="${a}"
      @@ -935,7 +935,7 @@ a.idlEnumItem{color:#000;border-bottom:1px dotted #ccc;text-decoration:none}
           >${e}</a
         >`;if(s&&"typedef"!==t.type&&!(t.partial&&!o)){const e=pr`See ${"using `data-dfn-for`|#data-dfn-for"} in ReSpec's documentation.`;ir(`Missing \`<dfn>\` for${r?` \`${r}\`'s`:""} \`${"operation"===t.type?`${s}()`:s}\` ${t.type}.`,La,{elements:[c],hint:e})}return c}const ja=new WeakMap;function Oa(e,t=""){if(ja.has(e))return ja.get(e);const n=function(e,t){let n=function(e){switch(e.type){case"enum-value":return e.value;case"operation":return e.name||e.special;default:return e.name||e.type}}(e);const r=e.special&&""===e.name?"anonymous-":"";let s=function(e,t){if(!t)return`idl-def-${e.toLowerCase()}`;return`idl-def-${t.toLowerCase()}-${e.toLowerCase()}`}(r+n,t);switch(e.type){case"callback interface":case"dictionary":case"interface":case"interface mixin":s+=function(e){if(!e.partial)return"";Ia[e.name]||(Ia[e.name]=0);return Ia[e.name]+=1,`-partial-${Ia[e.name]}`}(e);break;case"constructor":case"operation":{const r=function(e,t){const n=`${t}.${e}`,r=`${n}()`;let s;Pa[r]||(Pa[r]=0);Pa[n]?s=`!overload-${Pa[n]}`:Pa[n]=0;return Pa[r]+=1,Pa[n]+=1,s||""}(n,t);r?(n+=r,s+=r):e.arguments.length&&(s+=e.arguments.map((e=>`-${e.name.toLowerCase()}`)).join(""));break}}return{name:n,idlId:s}}(e,t);return ja.set(e,n),n}const Ma=["interface","interface mixin","dictionary","namespace","enum","typedef","callback"];function qa(e,t){let n;try{n=kn.parse(e.textContent,{sourceName:String(t)})}catch(t){return or(`Failed to parse WebIDL: ${t.bareMessage}.`,La,{title:t.bareMessage,details:`<pre>${t.context}</pre>`,elements:[e]}),[]}e.classList.add("def","idl");const r=kn.write(n,{templates:Da});bn.bind(e)`${r}`,Kn(e,document.createElement("code")),e.querySelectorAll("[data-idl]").forEach((e=>{if(e.dataset.dfnFor)return;const t=e.dataset.title,n=e.dataset.dfnType,r=e.parentElement.closest("[data-idl][data-title]");r&&!Ma.includes(n)&&(e.dataset.dfnFor=r.dataset.title),"dfn"===e.localName&&Vi(e,[t])}));const s=e.closest("[data-cite], body"),{dataset:o}=s;if(o.cite||(o.cite="WEBIDL"),!/\bwebidl\b/i.test(o.cite)){const e=o.cite.trim().split(/\s+/);o.cite=["WEBIDL",...e].join(" ")}return za(e),n}function za(e){Bn(e,"webidl");const t=bn`<span class="idlHeader"
           ><a class="self-link" href="${`#${e.id}`}">WebIDL</a></span
      -  >`;e.prepend(t),Ra(t)}var Ua=Object.freeze({__proto__:null,addIDLHeader:za,name:Ta,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=Aa,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map(qa),r=kn.validate(n);for(const t of r){let r=`<pre>${Nn(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n      <pre>${Nn(kn.write(n[t.sourceName]))}</pre>`}or(`WebIDL validation error: ${t.bareMessage}`,La,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});const Wa="core/data-cite",Fa="__SPEC__";async function Ba(e){const{key:t,frag:n,path:r,href:s}=e;let o="",i="";if(t===Fa)o=document.location.href;else{const e=await ii(t);if(!e)return null;o=e.href,i=e.title}if(s)o=s;else{if(r){const e=r.startsWith("/")?`.${r}`:r;o=new URL(e,o).href}n&&(o=new URL(n,o).href)}return{href:o,title:i}}function Ha(e,t,n){const{href:r,title:s}=t,o=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,o){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,t.dataset.cite=n.key,t.dataset.citePath=n.path,t.dataset.citeFrag=n.frag,e.textContent?Kn(e,t):(t.textContent=s,e.append(t)),o){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){or("Exporting a linked external definition is not allowed.",Wa,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function Ga(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const Va=Ga("#"),Ya=Ga("/");function Ka(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:o}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:s,isNormative:o}=r?Ka(r):{key:Fa,isNormative:!1};return t.cite=o?s:`?${s}`,t.citeFrag=n.replace("#",""),Ka(e)}const i=r?`#${r}`:Va(n),a=s||Ya(n).split("#")[0],{type:c}=Yn(n,e),l="normative"===c,u=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:i,path:a,href:o}}function Za(e){const t=["data-cite","data-cite-frag","data-cite-path"];e.querySelectorAll("a[data-cite], dfn[data-cite]").forEach((e=>t.forEach((t=>e.removeAttribute(t)))))}var Ja=Object.freeze({__proto__:null,THIS_SPEC:Fa,name:Wa,run:async function(){const e=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");await async function(e){const t=e.map(Ka).map((async e=>({entry:e,result:await ii(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await oi(n);r&&Object.assign(ei,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=Ka(t),r=await Ba(n);if(r)Ha(t,r,n);else{const n=`Couldn't find a match for "${e}"`;t.dataset.matchedText&&(t.textContent=t.dataset.matchedText),ir(n,Wa,{elements:[t]})}}o("beforesave",Za)},toCiteDetails:Ka});const Qa="core/link-to-dfn",Xa=[],ec={en:{duplicateMsg:e=>`Duplicate definition(s) of '${e}'`,duplicateTitle:"This is defined more than once in the document."},ja:{duplicateMsg:e=>`'${e}' の重複定義`,duplicateTitle:"この文書内で複数回定義されています."},de:{duplicateMsg:e=>`Mehrfache Definition von '${e}'`,duplicateTitle:"Das Dokument enthält mehrere Definitionen dieses Eintrags."},zh:{duplicateMsg:e=>`'${e}' 的重复定义`,duplicateTitle:"在文档中有重复的定义。"}},tc=On(ec);function nc(e){const t=new Map,n=[];for(const r of Gi.get(e)){const{dfnType:s="dfn"}=r.dataset,o=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const i of o){if(t.has(i)&&t.get(i).has(s)){const e=t.get(i).get(s),o="dfn"===e.localName,a="dfn"===r.localName,c=s===(e.dataset.dfnType||"dfn"),l=!i&&!e.dataset.dfnFor||e.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(i);if(o&&a&&c&&l){n.push(r);continue}}t.has(i)||t.set(i,new Map),t.get(i).set(s,r),("idl"in r.dataset||"dfn"!==s)&&t.get(i).set("idl",r),Hn(r,"dfn",e)}}return{result:t,duplicates:n}}function rc(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"",r=Gn(e).reduce(((e,r)=>{const s=r.split(".");return 2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e}),[]);return r}(e),r=n.find((e=>t.has(e.title)&&t.get(e.title).has(e.for)));if(!r)return;const s=t.get(r.title).get(r.for),{linkType:o}=e.dataset;if(o){for(const e of o.split("|"))if(s.get(e))return s.get(e);return s.get("dfn")}{const e=r.for?"idl":"dfn";return s.get(e)||s.get("idl")}}function sc(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:o}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&o&&!o.split(",").map((e=>e.trim())).includes(s))r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href=`#${t.id}`,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=oc(e)&&oc(t,n);r&&!s||Kn(e,document.createElement("code"))}(e,t),!r}function oc(e,t=""){if("a"===e.localName){if(!e.querySelector("code"))return!0}else{const{dataset:n}=e;if(e.textContent.trim()===t)return!0;if(n.title===t)return!0;if(n.lt||n.localLt){const e=[];return n.lt&&e.push(...n.lt.split("|")),n.localLt&&e.push(...n.localLt.split("|")),e.includes(t)}}return!1}function ic(e){e.forEach((e=>{ir(`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,Qa,{title:"Linking error: not matching `<dfn>`",elements:[e]})}))}var ac=Object.freeze({__proto__:null,name:Qa,possibleExternalLinks:Xa,run:async function(e){const t=function(){const e=new rr;for(const t of Gi.keys()){const{result:n,duplicates:r}=nc(t);e.set(t,n),r.length>0&&or(tc.duplicateMsg(t),Qa,{title:tc.duplicateTitle,elements:r})}return e}(),n=[],r=document.querySelectorAll("a[data-cite=''], a:not([href]):not([data-cite]):not(.logo):not(.externalDFN)");for(const e of r){if(!e.dataset?.linkType&&e.dataset?.xrefType){Xa.push(e);continue}const r=rc(e,t);if(r){sc(e,r,t)||Xa.push(e)}else""===e.dataset.cite?n.push(e):Xa.push(e)}ic(n),function(e){const{shortName:t=""}=e,n=new RegExp(String.raw`^([?!])?${t}\b([^-])`,"i"),r=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const t of r){t.dataset.cite=t.dataset.cite.replace(n,`$1${Fa}$2`);const{key:r,isNormative:s}=Ka(t);r!==Fa&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||ic(Xa)}});const cc="xrefs",lc=3e5;async function uc(){return await yn.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t)));e.createObjectStore(cc,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function dc(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e),10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<lc)return!1;const r=new URL("meta/version",hc).href,s=await fetch(r);if(!s.ok)return!1;const o=await s.text();return localStorage.setItem(e,n.toString()),parseInt(o,10)>t}())return await async function(){try{await uc().then((e=>e.clear(cc)))}catch(e){console.error(e)}}(),t;const n=new Set(e.map((e=>e.id)));try{const e=await uc();let r=await e.transaction(cc).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const pc="core/xref",fc={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},hc="https://respec.org/xref/",mc=[];if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=En({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function gc(e){const t="xrefType"in e.dataset;let n=bc(e);t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=n.dataset.cite.toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter((e=>e));if(r.length&&t.push(r),n===e)break;n=n.parentElement.closest("[data-cite]")}if(n!==e){const n=e.closest("section"),r=[...n?n.querySelectorAll("a.bibref"):[]].map((e=>e.textContent.toLowerCase()));r.length&&t.push(r)}const r=function(e){const t=[];for(const n of e){const e=t[t.length-1]||[],r=[...new Set(n)].filter((t=>!e.includes(t)));t.push(r.sort())}return t}(t);return r}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),o=function(e,t){if(e.dataset.xrefFor)return jn(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return jn(t.dataset.xrefFor)}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof o&&{for:o}}}function bc(e){const{lt:t}=e.dataset;let n=t?t.split("|",1)[0]:e.textContent;return n=jn(n),"the-empty-string"===n?"":n}function yc(e,t,n,r){const{term:s,specs:o=[]}=t,{uri:i,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=o.flat().includes(c)?c:a,f=new URL(i,"https://partial"),{pathname:h}=f,m={cite:p,citePath:h,citeFrag:f.hash.slice(1),type:u};d&&(m.linkFor=d[0]),f.origin&&"https://partial"!==f.origin&&(m.citeHref=f.href),Object.assign(e.dataset,m),function(e,t,n,r,s){const o=function(e){const t=e.closest(".normative"),n=e.closest(Rn);return!n||e===t||t&&n&&n.contains(t)}(e);if(!o)return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t):t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}mc.push({term:r,spec:t,element:e})}(e,p,l,s,r)}function wc(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(vc)}function vc(e){return[...new Uint8Array(e)].map((e=>e.toString(16).padStart(2,"0"))).join("")}function $c(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach((e=>{n.forEach((t=>e.removeAttribute(t)))}))}var kc=Object.freeze({__proto__:null,API_URL:hc,getTermFromElement:bc,informativeRefsInNormative:mc,name:pc,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:new URL("search/",hc).href,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":e.toLowerCase()in fc?Object.assign(n,{specs:fc[e.toLowerCase()]}):r(e);break;case"array":Object.assign(n,{specs:e});break;case"object":if(Object.assign(n,e),e.profile){const t=e.profile.toLowerCase();if(t in fc){const r=(e.specs??[]).concat(fc[t]);Object.assign(n,{specs:r})}else r(e.profile)}break;default:or(`Invalid value for \`xref\` configuration option. Received: "${e}".`,pc)}return n;function r(e){or(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${Dn(Object.keys(fc),(e=>`"${e}"`))}.`,pc)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Xa.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter((e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite})).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=gc(e);t.id=await wc(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter((e=>!n.has(e.id)&&(n.add(e.id)&&!0))),s=await dc(r),o=r.filter((e=>!s.get(e.id))),i=await async function(e,t){if(!e.length)return new Map;const n={method:"POST",body:JSON.stringify({queries:e}),headers:{"Content-Type":"application/json"}},r=await fetch(t,n),s=await r.json();return new Map(s.results.map((({id:e,result:t})=>[e,t])))}(o,t);i.size&&await async function(e,t){try{const n=(await uc()).transaction(cc,"readwrite");for(const r of e){const e=t.get(r.id);n.objectStore(cc).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,i);return new Map([...s,...i])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let o=0,i=e.length;o<i;o++){if(e[o].closest("[data-no-xref]"))continue;const i=e[o],a=t[o],{id:c}=a,l=n.get(c);if(1===l.length)yc(i,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c).elems.push(i)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(hc);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>pr`[See search matches for "${t}"](${e}) or ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],o=bc(s[0]),i=n(o,e),a=In(t,(e=>`**[${e}]**`)),c=r(i,o);or(`Couldn't find "**${o}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,pc,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:o}of e.values()){const e=[...new Set(o.map((e=>e.shortname)))].sort(),i=In(e,(e=>`**[${e}]**`)),a=bc(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=r(c,a),d=pr`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification.`+String.raw` ${u}`;or(`The term "**${a}**"${l} is ambiguous because it's defined in ${i}.`,pc,{title:"Definition is ambiguous.",elements:s,hint:d})}}(s)}(n,r,s,e),o("beforesave",$c)}});var xc=String.raw`ul.index{columns:30ch;column-gap:1.5em}
      +  >`;e.prepend(t),Ra(t)}var Ua=Object.freeze({__proto__:null,addIDLHeader:za,name:Ta,run:async function(){const e=document.querySelectorAll("pre.idl, pre.webidl");if(!e.length)return;const t=document.createElement("style");t.textContent=Aa,document.querySelector("head link, head > *:last-child").before(t);const n=[...e].map(qa),r=kn.validate(n);for(const t of r){let r=`<pre>${Nn(t.context)}</pre>`;if(t.autofix){t.autofix();r+=`Try fixing as:\n      <pre>${Nn(kn.write(n[t.sourceName]))}</pre>`}or(`WebIDL validation error: ${t.bareMessage}`,La,{details:r,elements:[e[t.sourceName]],title:t.bareMessage})}document.normalize()}});const Wa="core/data-cite",Fa="__SPEC__";async function Ba(e){const{key:t,frag:n,path:r,href:s}=e;let o="",i="";if(t===Fa)o=document.location.href;else{const e=await ii(t);if(!e)return null;o=e.href,i=e.title}if(s)o=s;else{if(r){const e=r.startsWith("/")?`.${r}`:r;o=new URL(e,o).href}n&&(o=new URL(n,o).href)}return{href:o,title:i}}function Ha(e,t,n){const{href:r,title:s}=t,o=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=s),t.href=r,o){const e=document.createElement("cite");t.replaceWith(e),e.append(t)}break}case"dfn":{const t=document.createElement("a");if(t.href=r,t.dataset.cite=n.key,t.dataset.citePath=n.path,t.dataset.citeFrag=n.frag,e.textContent?Kn(e,t):(t.textContent=s,e.append(t)),o){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){or("Exporting a linked external definition is not allowed.",Wa,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function Ga(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const Va=Ga("#"),Ya=Ga("/");function Ka(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:s,citeHref:o}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:s,isNormative:o}=r?Ka(r):{key:Fa,isNormative:!1};return t.cite=o?s:`?${s}`,t.citeFrag=n.replace("#",""),Ka(e)}const i=r?`#${r}`:Va(n),a=s||Ya(n).split("#")[0],{type:c}=Yn(n,e),l="normative"===c,u=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(u)),isNormative:l,frag:i,path:a,href:o}}function Za(e){const t=["data-cite","data-cite-frag","data-cite-path"];e.querySelectorAll("a[data-cite], dfn[data-cite]").forEach((e=>t.forEach((t=>e.removeAttribute(t)))))}var Ja=Object.freeze({__proto__:null,THIS_SPEC:Fa,name:Wa,run:async function(){const e=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");await async function(e){const t=e.map(Ka).map((async e=>({entry:e,result:await ii(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await oi(n);r&&Object.assign(ei,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=Ka(t),r=await Ba(n);if(r)Ha(t,r,n);else{const n=`Couldn't find a match for "${e}"`;t.dataset.matchedText&&(t.textContent=t.dataset.matchedText),ir(n,Wa,{elements:[t]})}}o("beforesave",Za)},toCiteDetails:Ka});const Qa="core/link-to-dfn",Xa=[],ec={en:{duplicateMsg:e=>`Duplicate definition(s) of '${e}'`,duplicateTitle:"This is defined more than once in the document."},ja:{duplicateMsg:e=>`'${e}' の重複定義`,duplicateTitle:"この文書内で複数回定義されています."},de:{duplicateMsg:e=>`Mehrfache Definition von '${e}'`,duplicateTitle:"Das Dokument enthält mehrere Definitionen dieses Eintrags."},zh:{duplicateMsg:e=>`'${e}' 的重复定义`,duplicateTitle:"在文档中有重复的定义。"}},tc=On(ec);function nc(e){const t=new Map,n=[];for(const r of Gi.get(e)){const{dfnType:s="dfn"}=r.dataset,o=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const i of o){if(t.has(i)&&t.get(i).has(s)){const e=t.get(i).get(s),o="dfn"===e.localName,a="dfn"===r.localName,c=s===(e.dataset.dfnType||"dfn"),l=!i&&!e.dataset.dfnFor||e.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(i);if(o&&a&&c&&l){n.push(r);continue}}t.has(i)||t.set(i,new Map),t.get(i).set(s,r),("idl"in r.dataset||"dfn"!==s)&&t.get(i).set("idl",r),Hn(r,"dfn",e)}}return{result:t,duplicates:n}}function rc(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"",r=Gn(e).reduce(((e,r)=>{const s=r.split(".");return 2===s.length&&e.push({for:s[0],title:s[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e}),[]);return r}(e),r=n.find((e=>t.has(e.title)&&t.get(e.title).has(e.for)));if(!r)return;const s=t.get(r.title).get(r.for),{linkType:o}=e.dataset;if(o){for(const e of o.split("|"))if(s.get(e))return s.get(e);return s.get("dfn")}{const e=r.for?"idl":"dfn";return s.get(e)||s.get("idl")}}function sc(e,t,n){let r=!1;const{linkFor:s}=e.dataset,{dfnFor:o}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(s&&!n.get(s)&&o&&!o.split(",").map((e=>e.trim())).includes(s))r=!0;else if(t.classList.contains("externalDFN")){const n=t.dataset.lt?t.dataset.lt.split("|"):[];e.dataset.lt=n[0]||t.textContent,r=!0}else"partial"!==e.dataset.idl?(e.href=`#${t.id}`,e.classList.add("internalDFN")):r=!0;return e.hasAttribute("data-link-type")||(e.dataset.linkType="idl"in t.dataset?"idl":"dfn"),function(e){if(e.closest("code,pre"))return!0;if(1!==e.childNodes.length)return!1;const[t]=e.childNodes;return"code"===t.localName}(t)&&function(e,t){const n=e.textContent.trim(),r=t.dataset.hasOwnProperty("idl"),s=oc(e)&&oc(t,n);r&&!s||Kn(e,document.createElement("code"))}(e,t),!r}function oc(e,t=""){if("a"===e.localName){if(!e.querySelector("code"))return!0}else{const{dataset:n}=e;if(e.textContent.trim()===t)return!0;if(n.title===t)return!0;if(n.lt||n.localLt){const e=[];return n.lt&&e.push(...n.lt.split("|")),n.localLt&&e.push(...n.localLt.split("|")),e.includes(t)}}return!1}function ic(e){e.forEach((e=>{ir(`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,Qa,{title:"Linking error: not matching `<dfn>`",elements:[e]})}))}var ac=Object.freeze({__proto__:null,name:Qa,possibleExternalLinks:Xa,run:async function(e){const t=function(){const e=new rr;for(const t of Gi.keys()){const{result:n,duplicates:r}=nc(t);e.set(t,n),r.length>0&&or(tc.duplicateMsg(t),Qa,{title:tc.duplicateTitle,elements:r})}return e}(),n=[],r=document.querySelectorAll("a[data-cite=''], a:not([href]):not([data-cite]):not(.logo):not(.externalDFN)");for(const e of r){if(!e.dataset?.linkType&&e.dataset?.xrefType){Xa.push(e);continue}const r=rc(e,t);if(r){sc(e,r,t)||Xa.push(e)}else""===e.dataset.cite?n.push(e):Xa.push(e)}ic(n),function(e){const{shortName:t=""}=e,n=new RegExp(String.raw`^([?!])?${t}\b([^-])`,"i"),r=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const t of r){t.dataset.cite=t.dataset.cite.replace(n,`$1${Fa}$2`);const{key:r,isNormative:s}=Ka(t);r!==Fa&&(s||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||ic(Xa)}});const cc="xrefs",lc=3e5;async function uc(){return await yn.openDB("xref",2,{upgrade(e){[...e.objectStoreNames].forEach((t=>e.deleteObjectStore(t)));e.createObjectStore(cc,{keyPath:"query.id"}).createIndex("byTerm","query.term",{unique:!1})}})}async function dc(e){const t=new Map;if(await async function(){const e="XREF:LAST_VERSION_CHECK",t=parseInt(localStorage.getItem(e),10),n=Date.now();if(!t)return localStorage.setItem(e,n.toString()),!1;if(n-t<lc)return!1;const r=new URL("meta/version",hc).href,s=await fetch(r);if(!s.ok)return!1;const o=await s.text();return localStorage.setItem(e,n.toString()),parseInt(o,10)>t}())return await async function(){try{await uc().then((e=>e.clear(cc)))}catch(e){console.error(e)}}(),t;const n=new Set(e.map((e=>e.id)));try{const e=await uc();let r=await e.transaction(cc).store.openCursor();for(;r;)n.has(r.key)&&t.set(r.key,r.value.result),r=await r.continue()}catch(e){console.error(e)}return t}const pc="core/xref",fc={"web-platform":["HTML","INFRA","URL","WEBIDL","DOM","FETCH"]},hc="https://respec.org/xref/",mc=[];if(!document.querySelector("link[rel='preconnect'][href='https://respec.org']")){const e=En({hint:"preconnect",href:"https://respec.org"});document.head.appendChild(e)}function gc(e){const t="xrefType"in e.dataset;let n=bc(e);t||(n=n.toLowerCase());const r=function(e){const t=[];let n=e.closest("[data-cite]");for(;n;){const r=n.dataset.cite.toLowerCase().replace(/[!?]/g,"").split(/\s+/).filter((e=>e));if(r.length&&t.push(r),n===e)break;n=n.parentElement.closest("[data-cite]")}if(n!==e){const n=e.closest("section"),r=[...n?n.querySelectorAll("a.bibref"):[]].map((e=>e.textContent.toLowerCase()));r.length&&t.push(r)}const r=function(e){const t=[];for(const n of e){const e=t[t.length-1]||[],r=[...new Set(n)].filter((t=>!e.includes(t)));t.push(r.sort())}return t}(t);return r}(e),s=function(e,t){if(t)return e.dataset.xrefType?e.dataset.xrefType.split("|"):["_IDL_"];return["_CONCEPT_"]}(e,t),o=function(e,t){if(e.dataset.xrefFor)return jn(e.dataset.xrefFor);if(t){const t=e.closest("[data-xref-for]");if(t)return jn(t.dataset.xrefFor)}return null}(e,t);return{id:"",term:n,types:s,...r.length&&{specs:r},..."string"==typeof o&&{for:o}}}function bc(e){const{lt:t}=e.dataset;let n=t?t.split("|",1)[0]:e.textContent;return n=jn(n),"the-empty-string"===n?"":n}function yc(e,t,n,r){const{term:s,specs:o=[]}=t,{uri:i,shortname:a,spec:c,normative:l,type:u,for:d}=n,p=o.flat().includes(c)?c:a,f=new URL(i,"https://partial");let{pathname:h}=f;"/"===h&&(h="");const m={cite:p,citePath:h,citeFrag:f.hash.slice(1),type:u};d&&(m.linkFor=d[0]),f.origin&&"https://partial"!==f.origin&&(m.citeHref=f.href),Object.assign(e.dataset,m),function(e,t,n,r,s){const o=function(e){const t=e.closest(".normative"),n=e.closest(Rn);return!n||e===t||t&&n&&n.contains(t)}(e);if(!o)return void(s.normativeReferences.has(t)||s.informativeReferences.add(t));if(n){const e=s.informativeReferences.has(t)?s.informativeReferences.getCanonicalKey(t):t;return s.normativeReferences.add(e),void s.informativeReferences.delete(e)}mc.push({term:r,spec:t,element:e})}(e,p,l,s,r)}function wc(e){const t=JSON.stringify(e,Object.keys(e).sort()),n=(new TextEncoder).encode(t);return crypto.subtle.digest("SHA-1",n).then(vc)}function vc(e){return[...new Uint8Array(e)].map((e=>e.toString(16).padStart(2,"0"))).join("")}function $c(e){const t=e.querySelectorAll("a[data-xref-for], a[data-xref-type], a[data-link-for]"),n=["data-xref-for","data-xref-type","data-link-for"];t.forEach((e=>{n.forEach((t=>e.removeAttribute(t)))}))}var kc=Object.freeze({__proto__:null,API_URL:hc,getTermFromElement:bc,informativeRefsInNormative:mc,name:pc,run:async function(e){if(!e.xref)return;const t=function(e){const t={url:new URL("search/",hc).href,specs:null},n=Object.assign({},t);switch(Array.isArray(e)?"array":typeof e){case"boolean":break;case"string":e.toLowerCase()in fc?Object.assign(n,{specs:fc[e.toLowerCase()]}):r(e);break;case"array":Object.assign(n,{specs:e});break;case"object":if(Object.assign(n,e),e.profile){const t=e.profile.toLowerCase();if(t in fc){const r=(e.specs??[]).concat(fc[t]);Object.assign(n,{specs:r})}else r(e.profile)}break;default:or(`Invalid value for \`xref\` configuration option. Received: "${e}".`,pc)}return n;function r(e){or(`Invalid profile "${e}" in \`respecConfig.xref\`. Please use one of the supported profiles: ${Dn(Object.keys(fc),(e=>`"${e}"`))}.`,pc)}}(e.xref);if(t.specs){const e=document.body.dataset.cite?document.body.dataset.cite.split(/\s+/):[];document.body.dataset.cite=e.concat(t.specs).join(" ")}const n=Xa.concat(function(){const e=document.querySelectorAll(":is(a,dfn)[data-cite]:not([data-cite=''],[data-cite*='#'])"),t=document.querySelectorAll("dfn.externalDFN");return[...e].filter((e=>{if(""===e.textContent.trim())return!1;const t=e.closest("[data-cite]");return!t||""!==t.dataset.cite})).concat(...t)}());if(!n.length)return;const r=[];for(const e of n){const t=gc(e);t.id=await wc(t),r.push(t)}const s=await async function(e,t){const n=new Set,r=e.filter((e=>!n.has(e.id)&&(n.add(e.id)&&!0))),s=await dc(r),o=r.filter((e=>!s.get(e.id))),i=await async function(e,t){if(!e.length)return new Map;const n={method:"POST",body:JSON.stringify({queries:e}),headers:{"Content-Type":"application/json"}},r=await fetch(t,n),s=await r.json();return new Map(s.results.map((({id:e,result:t})=>[e,t])))}(o,t);i.size&&await async function(e,t){try{const n=(await uc()).transaction(cc,"readwrite");for(const r of e){const e=t.get(r.id);n.objectStore(cc).add({query:r,result:e})}await n.done}catch(e){console.error(e)}}(r,i);return new Map([...s,...i])}(r,t.url);!function(e,t,n,r){const s={ambiguous:new Map,notFound:new Map};for(let o=0,i=e.length;o<i;o++){if(e[o].closest("[data-no-xref]"))continue;const i=e[o],a=t[o],{id:c}=a,l=n.get(c);if(1===l.length)yc(i,a,l[0],r);else{const e=s[0===l.length?"notFound":"ambiguous"];e.has(c)||e.set(c,{elems:[],results:l,query:a}),e.get(c).elems.push(i)}}!function({ambiguous:e,notFound:t}){const n=(e,t,n=[])=>{const r=new URL(hc);return r.searchParams.set("term",e),t.for&&r.searchParams.set("for",t.for),r.searchParams.set("types",t.types.join(",")),n.length&&r.searchParams.set("specs",n.join(",")),r.href},r=(e,t)=>pr`[See search matches for "${t}"](${e}) or ${"[Learn about this error|#error-term-not-found]"}.`;for(const{query:e,elems:s}of t.values()){const t=e.specs?[...new Set(e.specs.flat())].sort():[],o=bc(s[0]),i=n(o,e),a=In(t,(e=>`**[${e}]**`)),c=r(i,o);or(`Couldn't find "**${o}**"${e.for?`, for **"${e.for}"**, `:""} in this document or other cited documents: ${a}.`,pc,{title:"No matching definition found.",elements:s,hint:c})}for(const{query:t,elems:s,results:o}of e.values()){const e=[...new Set(o.map((e=>e.shortname)))].sort(),i=In(e,(e=>`**[${e}]**`)),a=bc(s[0]),c=n(a,t,e),l=t.for?`, for **"${t.for}"**, `:"",u=r(c,a),d=pr`To fix, use the ${"[data-cite]"} attribute to pick the one you mean from the appropriate specification.`+String.raw` ${u}`;or(`The term "**${a}**"${l} is ambiguous because it's defined in ${i}.`,pc,{title:"Definition is ambiguous.",elements:s,hint:d})}}(s)}(n,r,s,e),o("beforesave",$c)}});var xc=String.raw`ul.index{columns:30ch;column-gap:1.5em}
       ul.index li{list-style:inherit}
       ul.index li span{color:inherit;cursor:pointer;white-space:normal}
       #index-defined-here ul.index li{font-size:.9rem}
      diff --git a/builds/respec-w3c.js.map b/builds/respec-w3c.js.map
      index 3bcc0966eb..3f6a749c6c 100644
      --- a/builds/respec-w3c.js.map
      +++ b/builds/respec-w3c.js.map
      @@ -1 +1 @@
      -{"version":3,"file":"respec-w3c.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/webidl2/lib/error.js","../node_modules/webidl2/lib/productions/base.js","../node_modules/webidl2/lib/validators/helpers.js","../node_modules/webidl2/lib/productions/array-base.js","../node_modules/webidl2/lib/productions/token.js","../node_modules/webidl2/lib/productions/extended-attributes.js","../node_modules/webidl2/lib/productions/type.js","../node_modules/webidl2/lib/productions/default.js","../node_modules/webidl2/lib/productions/argument.js","../node_modules/webidl2/lib/productions/operation.js","../node_modules/webidl2/lib/productions/attribute.js","../node_modules/webidl2/lib/productions/helpers.js","../node_modules/webidl2/lib/tokeniser.js","../node_modules/webidl2/lib/productions/enum.js","../node_modules/webidl2/lib/productions/includes.js","../node_modules/webidl2/lib/productions/typedef.js","../node_modules/webidl2/lib/productions/callback.js","../node_modules/webidl2/lib/productions/container.js","../node_modules/webidl2/lib/productions/constant.js","../node_modules/webidl2/lib/productions/iterable.js","../node_modules/webidl2/lib/productions/constructor.js","../node_modules/webidl2/lib/productions/interface.js","../node_modules/webidl2/lib/validators/interface.js","../node_modules/webidl2/lib/productions/mixin.js","../node_modules/webidl2/lib/productions/field.js","../node_modules/webidl2/lib/productions/dictionary.js","../node_modules/webidl2/lib/productions/namespace.js","../node_modules/webidl2/lib/productions/callback-interface.js","../node_modules/webidl2/lib/webidl2.js","../node_modules/webidl2/lib/writer.js","../node_modules/webidl2/lib/validator.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/w3c.js","../src/core/location-hash.js","../src/w3c/group.js","../src/core/templates/show-link.js","../src/core/templates/show-logo.js","../src/core/templates/show-people.js","../src/w3c/templates/headers.js","../src/w3c/templates/cgbg-headers.js","../src/w3c/templates/sotd.js","../src/w3c/templates/cgbg-sotd.js","../src/w3c/headers.js","../src/core/defaults.js","../src/w3c/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/w3c/style.js","../src/core/github.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/title.js","../src/w3c/level.js","../src/w3c/abstract.js","../src/core/data-transform.js","../src/core/data-abbr.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/w3c/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/core/best-practices.js","../src/core/figures.js","../src/core/tables.js","../src/core/dfn-finder.js","../src/core/webidl-clipboard.js","../src/styles/webidl.css.js","../src/core/webidl.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/core/contrib.js","../src/core/fix-headers.js","../src/core/webidl-index.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/ui/save-html.js","../src/ui/search-specref.js","../src/ui/search-xref.js","../src/ui/about-respec.js","../src/core/seo.js","../src/w3c/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/datatype.css.js","../src/core/data-type.js","../src/styles/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/custom-elements/rs-changelog.js","../src/core/custom-elements/index.js","../src/core/web-monetization.js","../src/core/dfn-contract.js","../src/core/before-save.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-captionless-tables.js","../src/core/linter-rules/no-unused-dfns.js","../src/core/linter-rules/no-headingless-sections.js","../src/core/linter-rules/no-unused-vars.js","../src/w3c/linter-rules/required-sections.js","../src/core/linter-rules/wpt-tests-exist.js","../src/core/linter-rules/no-http-props.js","../src/core/linter-rules/a11y.js","../src/core/linter-rules/informative-dfn.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 * @param {string} text\n */\nfunction lastLine(text) {\n  const splitted = text.split(\"\\n\");\n  return splitted[splitted.length - 1];\n}\n\nfunction appendIfExist(base, target) {\n  let result = base;\n  if (target) {\n    result += ` ${target}`;\n  }\n  return result;\n}\n\nfunction contextAsText(node) {\n  const hierarchy = [node];\n  while (node && node.parent) {\n    const { parent } = node;\n    hierarchy.unshift(parent);\n    node = parent;\n  }\n  return hierarchy.map((n) => appendIfExist(n.type, n.name)).join(\" -> \");\n}\n\n/**\n * @typedef {object} WebIDL2ErrorOptions\n * @property {\"error\" | \"warning\"} [level]\n * @property {Function} [autofix]\n * @property {string} [ruleName]\n *\n * @typedef {ReturnType<typeof error>} WebIDLErrorData\n *\n * @param {string} message error message\n * @param {*} position\n * @param {*} current\n * @param {*} message\n * @param {\"Syntax\" | \"Validation\"} kind error type\n * @param {WebIDL2ErrorOptions=} options\n */\nfunction error(\n  source,\n  position,\n  current,\n  message,\n  kind,\n  { level = \"error\", autofix, ruleName } = {}\n) {\n  /**\n   * @param {number} count\n   */\n  function sliceTokens(count) {\n    return count > 0\n      ? source.slice(position, position + count)\n      : source.slice(Math.max(position + count, 0), position);\n  }\n\n  /**\n   * @param {import(\"./tokeniser.js\").Token[]} inputs\n   * @param {object} [options]\n   * @param {boolean} [options.precedes]\n   * @returns\n   */\n  function tokensToText(inputs, { precedes } = {}) {\n    const text = inputs.map((t) => t.trivia + t.value).join(\"\");\n    const nextToken = source[position];\n    if (nextToken.type === \"eof\") {\n      return text;\n    }\n    if (precedes) {\n      return text + nextToken.trivia;\n    }\n    return text.slice(nextToken.trivia.length);\n  }\n\n  const maxTokens = 5; // arbitrary but works well enough\n  const line =\n    source[position].type !== \"eof\"\n      ? source[position].line\n      : source.length > 1\n      ? source[position - 1].line\n      : 1;\n\n  const precedingLastLine = lastLine(\n    tokensToText(sliceTokens(-maxTokens), { precedes: true })\n  );\n\n  const subsequentTokens = sliceTokens(maxTokens);\n  const subsequentText = tokensToText(subsequentTokens);\n  const subsequentFirstLine = subsequentText.split(\"\\n\")[0];\n\n  const spaced = \" \".repeat(precedingLastLine.length) + \"^\";\n  const sourceContext = precedingLastLine + subsequentFirstLine + \"\\n\" + spaced;\n\n  const contextType = kind === \"Syntax\" ? \"since\" : \"inside\";\n  const inSourceName = source.name ? ` in ${source.name}` : \"\";\n  const grammaticalContext =\n    current && current.name\n      ? `, ${contextType} \\`${current.partial ? \"partial \" : \"\"}${contextAsText(\n          current\n        )}\\``\n      : \"\";\n  const context = `${kind} error at line ${line}${inSourceName}${grammaticalContext}:\\n${sourceContext}`;\n  return {\n    message: `${context} ${message}`,\n    bareMessage: message,\n    context,\n    line,\n    sourceName: source.name,\n    level,\n    ruleName,\n    autofix,\n    input: subsequentText,\n    tokens: subsequentTokens,\n  };\n}\n\n/**\n * @param {string} message error message\n */\nexport function syntaxError(source, position, current, message) {\n  return error(source, position, current, message, \"Syntax\");\n}\n\n/**\n * @param {string} message error message\n * @param {WebIDL2ErrorOptions} [options]\n */\nexport function validationError(\n  token,\n  current,\n  ruleName,\n  message,\n  options = {}\n) {\n  options.ruleName = ruleName;\n  return error(\n    current.source,\n    token.index,\n    current,\n    message,\n    \"Validation\",\n    options\n  );\n}\n","export class Base {\n  /**\n   * @param {object} initializer\n   * @param {Base[\"source\"]} initializer.source\n   * @param {Base[\"tokens\"]} initializer.tokens\n   */\n  constructor({ source, tokens }) {\n    Object.defineProperties(this, {\n      source: { value: source },\n      tokens: { value: tokens, writable: true },\n      parent: { value: null, writable: true },\n      this: { value: this }, // useful when escaping from proxy\n    });\n  }\n\n  toJSON() {\n    const json = { type: undefined, name: undefined, inheritance: undefined };\n    let proto = this;\n    while (proto !== Object.prototype) {\n      const descMap = Object.getOwnPropertyDescriptors(proto);\n      for (const [key, value] of Object.entries(descMap)) {\n        if (value.enumerable || value.get) {\n          // @ts-ignore - allow indexing here\n          json[key] = this[key];\n        }\n      }\n      proto = Object.getPrototypeOf(proto);\n    }\n    return json;\n  }\n}\n","/**\n * @typedef {import(\"../validator.js\").Definitions} Definitions\n * @typedef {import(\"../productions/dictionary.js\").Dictionary} Dictionary\n * @typedef {import(\"../../lib/productions/type\").Type} Type\n *\n * @param {Type} idlType\n * @param {Definitions} defs\n * @param {object} [options]\n * @param {boolean} [options.useNullableInner] use when the input idlType is nullable and you want to use its inner type\n * @return {{ reference: *, dictionary: Dictionary }} the type reference that ultimately includes dictionary.\n */\nexport function idlTypeIncludesDictionary(\n  idlType,\n  defs,\n  { useNullableInner } = {}\n) {\n  if (!idlType.union) {\n    const def = defs.unique.get(idlType.idlType);\n    if (!def) {\n      return;\n    }\n    if (def.type === \"typedef\") {\n      const { typedefIncludesDictionary } = defs.cache;\n      if (typedefIncludesDictionary.has(def)) {\n        // Note that this also halts when it met indeterminate state\n        // to prevent infinite recursion\n        return typedefIncludesDictionary.get(def);\n      }\n      defs.cache.typedefIncludesDictionary.set(def, undefined); // indeterminate state\n      const result = idlTypeIncludesDictionary(def.idlType, defs);\n      defs.cache.typedefIncludesDictionary.set(def, result);\n      if (result) {\n        return {\n          reference: idlType,\n          dictionary: result.dictionary,\n        };\n      }\n    }\n    if (def.type === \"dictionary\" && (useNullableInner || !idlType.nullable)) {\n      return {\n        reference: idlType,\n        dictionary: def,\n      };\n    }\n  }\n  for (const subtype of idlType.subtype) {\n    const result = idlTypeIncludesDictionary(subtype, defs);\n    if (result) {\n      if (subtype.union) {\n        return result;\n      }\n      return {\n        reference: subtype,\n        dictionary: result.dictionary,\n      };\n    }\n  }\n}\n\n/**\n * @param {Dictionary} dict dictionary type\n * @param {Definitions} defs\n * @return {boolean}\n */\nexport function dictionaryIncludesRequiredField(dict, defs) {\n  if (defs.cache.dictionaryIncludesRequiredField.has(dict)) {\n    return defs.cache.dictionaryIncludesRequiredField.get(dict);\n  }\n  // Set cached result to indeterminate to short-circuit circular definitions.\n  // The final result will be updated to true or false.\n  defs.cache.dictionaryIncludesRequiredField.set(dict, undefined);\n  let result = dict.members.some((field) => field.required);\n  if (!result && dict.inheritance) {\n    const superdict = defs.unique.get(dict.inheritance);\n    if (!superdict) {\n      // Assume required members in the supertype if it is unknown.\n      result = true;\n    } else if (dictionaryIncludesRequiredField(superdict, defs)) {\n      result = true;\n    }\n  }\n  defs.cache.dictionaryIncludesRequiredField.set(dict, result);\n  return result;\n}\n\n/**\n * For now this only checks the most frequent cases:\n * 1. direct inclusion of [EnforceRange]\n * 2. typedef of that\n *\n * More complex cases with dictionaries and records are not covered yet.\n *\n * @param {Type} idlType\n * @param {Definitions} defs\n */\nexport function idlTypeIncludesEnforceRange(idlType, defs) {\n  if (idlType.union) {\n    // TODO: This should ideally be checked too\n    return false;\n  }\n\n  if (idlType.extAttrs.some((e) => e.name === \"EnforceRange\")) {\n    return true;\n  }\n\n  const def = defs.unique.get(idlType.idlType);\n  if (def?.type !== \"typedef\") {\n    return false;\n  }\n\n  return def.idlType.extAttrs.some((e) => e.name === \"EnforceRange\");\n}\n","export class ArrayBase extends Array {\n  constructor({ source, tokens }) {\n    super();\n    Object.defineProperties(this, {\n      source: { value: source },\n      tokens: { value: tokens },\n      parent: { value: null, writable: true },\n    });\n  }\n}\n","import { Base } from \"./base.js\";\nimport { unescape } from \"./helpers.js\";\n\nexport class WrappedToken extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {string} type\n   */\n  static parser(tokeniser, type) {\n    return () => {\n      const value = tokeniser.consumeKind(type);\n      if (value) {\n        return new WrappedToken({\n          source: tokeniser.source,\n          tokens: { value },\n        });\n      }\n    };\n  }\n\n  get value() {\n    return unescape(this.tokens.value.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      w.token(this.tokens.value),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\nexport class Eof extends WrappedToken {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const value = tokeniser.consumeKind(\"eof\");\n    if (value) {\n      return new Eof({ source: tokeniser.source, tokens: { value } });\n    }\n  }\n\n  get type() {\n    return \"eof\";\n  }\n}\n","import { Base } from \"./base.js\";\nimport { ArrayBase } from \"./array-base.js\";\nimport { WrappedToken } from \"./token.js\";\nimport { list, argument_list, autoParenter, unescape } from \"./helpers.js\";\nimport { validationError } from \"../error.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} tokenName\n */\nfunction tokens(tokeniser, tokenName) {\n  return list(tokeniser, {\n    parser: WrappedToken.parser(tokeniser, tokenName),\n    listName: tokenName + \" list\",\n  });\n}\n\nconst extAttrValueSyntax = [\"identifier\", \"decimal\", \"integer\", \"string\"];\n\nconst shouldBeLegacyPrefixed = [\n  \"NoInterfaceObject\",\n  \"LenientSetter\",\n  \"LenientThis\",\n  \"TreatNonObjectAsNull\",\n  \"Unforgeable\",\n];\n\nconst renamedLegacies = new Map([\n  .../** @type {[string, string][]} */ (\n    shouldBeLegacyPrefixed.map((name) => [name, `Legacy${name}`])\n  ),\n  [\"NamedConstructor\", \"LegacyFactoryFunction\"],\n  [\"OverrideBuiltins\", \"LegacyOverrideBuiltIns\"],\n  [\"TreatNullAs\", \"LegacyNullToEmptyString\"],\n]);\n\n/**\n * This will allow a set of extended attribute values to be parsed.\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction extAttrListItems(tokeniser) {\n  for (const syntax of extAttrValueSyntax) {\n    const toks = tokens(tokeniser, syntax);\n    if (toks.length) {\n      return toks;\n    }\n  }\n  tokeniser.error(\n    `Expected identifiers, strings, decimals, or integers but none found`\n  );\n}\n\nexport class ExtendedAttributeParameters extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const tokens = { assign: tokeniser.consume(\"=\") };\n    const ret = autoParenter(\n      new ExtendedAttributeParameters({ source: tokeniser.source, tokens })\n    );\n    ret.list = [];\n    if (tokens.assign) {\n      tokens.asterisk = tokeniser.consume(\"*\");\n      if (tokens.asterisk) {\n        return ret.this;\n      }\n      tokens.secondaryName = tokeniser.consumeKind(...extAttrValueSyntax);\n    }\n    tokens.open = tokeniser.consume(\"(\");\n    if (tokens.open) {\n      ret.list = ret.rhsIsList\n        ? // [Exposed=(Window,Worker)]\n          extAttrListItems(tokeniser)\n        : // [LegacyFactoryFunction=Audio(DOMString src)] or [Constructor(DOMString str)]\n          argument_list(tokeniser);\n      tokens.close =\n        tokeniser.consume(\")\") ||\n        tokeniser.error(\"Unexpected token in extended attribute argument list\");\n    } else if (tokens.assign && !tokens.secondaryName) {\n      tokeniser.error(\"No right hand side to extended attribute assignment\");\n    }\n    return ret.this;\n  }\n\n  get rhsIsList() {\n    return (\n      this.tokens.assign && !this.tokens.asterisk && !this.tokens.secondaryName\n    );\n  }\n\n  get rhsType() {\n    if (this.rhsIsList) {\n      return this.list[0].tokens.value.type + \"-list\";\n    }\n    if (this.tokens.asterisk) {\n      return \"*\";\n    }\n    if (this.tokens.secondaryName) {\n      return this.tokens.secondaryName.type;\n    }\n    return null;\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { rhsType } = this;\n    return w.ts.wrap([\n      w.token(this.tokens.assign),\n      w.token(this.tokens.asterisk),\n      w.reference_token(this.tokens.secondaryName, this.parent),\n      w.token(this.tokens.open),\n      ...this.list.map((p) => {\n        return rhsType === \"identifier-list\"\n          ? w.identifier(p, this.parent)\n          : p.write(w);\n      }),\n      w.token(this.tokens.close),\n    ]);\n  }\n}\n\nexport class SimpleExtendedAttribute extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const name = tokeniser.consumeKind(\"identifier\");\n    if (name) {\n      return new SimpleExtendedAttribute({\n        source: tokeniser.source,\n        tokens: { name },\n        params: ExtendedAttributeParameters.parse(tokeniser),\n      });\n    }\n  }\n\n  constructor({ source, tokens, params }) {\n    super({ source, tokens });\n    params.parent = this;\n    Object.defineProperty(this, \"params\", { value: params });\n  }\n\n  get type() {\n    return \"extended-attribute\";\n  }\n  get name() {\n    return this.tokens.name.value;\n  }\n  get rhs() {\n    const { rhsType: type, tokens, list } = this.params;\n    if (!type) {\n      return null;\n    }\n    const value = this.params.rhsIsList\n      ? list\n      : this.params.tokens.secondaryName\n      ? unescape(tokens.secondaryName.value)\n      : null;\n    return { type, value };\n  }\n  get arguments() {\n    const { rhsIsList, list } = this.params;\n    if (!list || rhsIsList) {\n      return [];\n    }\n    return list;\n  }\n\n  *validate(defs) {\n    const { name } = this;\n    if (name === \"LegacyNoInterfaceObject\") {\n      const message = `\\`[LegacyNoInterfaceObject]\\` extended attribute is an \\\nundesirable feature that may be removed from Web IDL in the future. Refer to the \\\n[relevant upstream PR](https://github.com/whatwg/webidl/pull/609) for more \\\ninformation.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"no-nointerfaceobject\",\n        message,\n        { level: \"warning\" }\n      );\n    } else if (renamedLegacies.has(name)) {\n      const message = `\\`[${name}]\\` extended attribute is a legacy feature \\\nthat is now renamed to \\`[${renamedLegacies.get(name)}]\\`. Refer to the \\\n[relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more \\\ninformation.`;\n      yield validationError(this.tokens.name, this, \"renamed-legacy\", message, {\n        level: \"warning\",\n        autofix: renameLegacyExtendedAttribute(this),\n      });\n    }\n    for (const arg of this.arguments) {\n      yield* arg.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      w.ts.trivia(this.tokens.name.trivia),\n      w.ts.extendedAttribute(\n        w.ts.wrap([\n          w.ts.extendedAttributeReference(this.name),\n          this.params.write(w),\n        ])\n      ),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\n/**\n * @param {SimpleExtendedAttribute} extAttr\n */\nfunction renameLegacyExtendedAttribute(extAttr) {\n  return () => {\n    const { name } = extAttr;\n    extAttr.tokens.name.value = renamedLegacies.get(name);\n    if (name === \"TreatNullAs\") {\n      extAttr.params.tokens = {};\n    }\n  };\n}\n\n// Note: we parse something simpler than the official syntax. It's all that ever\n// seems to be used\nexport class ExtendedAttributes extends ArrayBase {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const tokens = {};\n    tokens.open = tokeniser.consume(\"[\");\n    const ret = new ExtendedAttributes({ source: tokeniser.source, tokens });\n    if (!tokens.open) return ret;\n    ret.push(\n      ...list(tokeniser, {\n        parser: SimpleExtendedAttribute.parse,\n        listName: \"extended attribute\",\n      })\n    );\n    tokens.close =\n      tokeniser.consume(\"]\") ||\n      tokeniser.error(\n        \"Expected a closing token for the extended attribute list\"\n      );\n    if (!ret.length) {\n      tokeniser.unconsume(tokens.close.index);\n      tokeniser.error(\"An extended attribute list must not be empty\");\n    }\n    if (tokeniser.probe(\"[\")) {\n      tokeniser.error(\n        \"Illegal double extended attribute lists, consider merging them\"\n      );\n    }\n    return ret;\n  }\n\n  *validate(defs) {\n    for (const extAttr of this) {\n      yield* extAttr.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    if (!this.length) return \"\";\n    return w.ts.wrap([\n      w.token(this.tokens.open),\n      ...this.map((ea) => ea.write(w)),\n      w.token(this.tokens.close),\n    ]);\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  unescape,\n  type_with_extended_attributes,\n  return_type,\n  primitive_type,\n  autoParenter,\n} from \"./helpers.js\";\nimport { stringTypes, typeNameKeywords } from \"../tokeniser.js\";\nimport { validationError } from \"../error.js\";\nimport { idlTypeIncludesDictionary } from \"../validators/helpers.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} typeName\n */\nfunction generic_type(tokeniser, typeName) {\n  const base = tokeniser.consume(\n    \"FrozenArray\",\n    \"ObservableArray\",\n    \"Promise\",\n    \"sequence\",\n    \"record\"\n  );\n  if (!base) {\n    return;\n  }\n  const ret = autoParenter(\n    new Type({ source: tokeniser.source, tokens: { base } })\n  );\n  ret.tokens.open =\n    tokeniser.consume(\"<\") ||\n    tokeniser.error(`No opening bracket after ${base.value}`);\n  switch (base.value) {\n    case \"Promise\": {\n      if (tokeniser.probe(\"[\"))\n        tokeniser.error(\"Promise type cannot have extended attribute\");\n      const subtype =\n        return_type(tokeniser, typeName) ||\n        tokeniser.error(\"Missing Promise subtype\");\n      ret.subtype.push(subtype);\n      break;\n    }\n    case \"sequence\":\n    case \"FrozenArray\":\n    case \"ObservableArray\": {\n      const subtype =\n        type_with_extended_attributes(tokeniser, typeName) ||\n        tokeniser.error(`Missing ${base.value} subtype`);\n      ret.subtype.push(subtype);\n      break;\n    }\n    case \"record\": {\n      if (tokeniser.probe(\"[\"))\n        tokeniser.error(\"Record key cannot have extended attribute\");\n      const keyType =\n        tokeniser.consume(...stringTypes) ||\n        tokeniser.error(`Record key must be one of: ${stringTypes.join(\", \")}`);\n      const keyIdlType = new Type({\n        source: tokeniser.source,\n        tokens: { base: keyType },\n      });\n      keyIdlType.tokens.separator =\n        tokeniser.consume(\",\") ||\n        tokeniser.error(\"Missing comma after record key type\");\n      keyIdlType.type = typeName;\n      const valueType =\n        type_with_extended_attributes(tokeniser, typeName) ||\n        tokeniser.error(\"Error parsing generic type record\");\n      ret.subtype.push(keyIdlType, valueType);\n      break;\n    }\n  }\n  if (!ret.idlType) tokeniser.error(`Error parsing generic type ${base.value}`);\n  ret.tokens.close =\n    tokeniser.consume(\">\") ||\n    tokeniser.error(`Missing closing bracket after ${base.value}`);\n  return ret.this;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction type_suffix(tokeniser, obj) {\n  const nullable = tokeniser.consume(\"?\");\n  if (nullable) {\n    obj.tokens.nullable = nullable;\n  }\n  if (tokeniser.probe(\"?\")) tokeniser.error(\"Can't nullable more than once\");\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} typeName\n */\nfunction single_type(tokeniser, typeName) {\n  let ret = generic_type(tokeniser, typeName) || primitive_type(tokeniser);\n  if (!ret) {\n    const base =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.consume(...stringTypes, ...typeNameKeywords);\n    if (!base) {\n      return;\n    }\n    ret = new Type({ source: tokeniser.source, tokens: { base } });\n    if (tokeniser.probe(\"<\"))\n      tokeniser.error(`Unsupported generic type ${base.value}`);\n  }\n  if (ret.generic === \"Promise\" && tokeniser.probe(\"?\")) {\n    tokeniser.error(\"Promise type cannot be nullable\");\n  }\n  ret.type = typeName || null;\n  type_suffix(tokeniser, ret);\n  if (ret.nullable && ret.idlType === \"any\")\n    tokeniser.error(\"Type `any` cannot be made nullable\");\n  return ret;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} type\n */\nfunction union_type(tokeniser, type) {\n  const tokens = {};\n  tokens.open = tokeniser.consume(\"(\");\n  if (!tokens.open) return;\n  const ret = autoParenter(new Type({ source: tokeniser.source, tokens }));\n  ret.type = type || null;\n  while (true) {\n    const typ =\n      type_with_extended_attributes(tokeniser, type) ||\n      tokeniser.error(\"No type after open parenthesis or 'or' in union type\");\n    if (typ.idlType === \"any\")\n      tokeniser.error(\"Type `any` cannot be included in a union type\");\n    if (typ.generic === \"Promise\")\n      tokeniser.error(\"Type `Promise` cannot be included in a union type\");\n    ret.subtype.push(typ);\n    const or = tokeniser.consume(\"or\");\n    if (or) {\n      typ.tokens.separator = or;\n    } else break;\n  }\n  if (ret.idlType.length < 2) {\n    tokeniser.error(\n      \"At least two types are expected in a union type but found less\"\n    );\n  }\n  tokens.close =\n    tokeniser.consume(\")\") || tokeniser.error(\"Unterminated union type\");\n  type_suffix(tokeniser, ret);\n  return ret.this;\n}\n\nexport class Type extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {string} typeName\n   */\n  static parse(tokeniser, typeName) {\n    return single_type(tokeniser, typeName) || union_type(tokeniser, typeName);\n  }\n\n  constructor({ source, tokens }) {\n    super({ source, tokens });\n    Object.defineProperty(this, \"subtype\", { value: [], writable: true });\n    this.extAttrs = new ExtendedAttributes({ source, tokens: {} });\n  }\n\n  get generic() {\n    if (this.subtype.length && this.tokens.base) {\n      return this.tokens.base.value;\n    }\n    return \"\";\n  }\n  get nullable() {\n    return Boolean(this.tokens.nullable);\n  }\n  get union() {\n    return Boolean(this.subtype.length) && !this.tokens.base;\n  }\n  get idlType() {\n    if (this.subtype.length) {\n      return this.subtype;\n    }\n    // Adding prefixes/postfixes for \"unrestricted float\", etc.\n    const name = [this.tokens.prefix, this.tokens.base, this.tokens.postfix]\n      .filter((t) => t)\n      .map((t) => t.value)\n      .join(\" \");\n    return unescape(name);\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n\n    if (this.idlType === \"BufferSource\") {\n      // XXX: For now this is a hack. Consider moving parents' extAttrs into types as the spec says:\n      // https://webidl.spec.whatwg.org/#idl-annotated-types\n      for (const extAttrs of [this.extAttrs, this.parent?.extAttrs]) {\n        for (const extAttr of extAttrs) {\n          if (extAttr.name !== \"AllowShared\") {\n            continue;\n          }\n          const message = `\\`[AllowShared] BufferSource\\` is now replaced with AllowSharedBufferSource.`;\n          yield validationError(\n            this.tokens.base,\n            this,\n            \"migrate-allowshared\",\n            message,\n            { autofix: replaceAllowShared(this, extAttr, extAttrs) }\n          );\n        }\n      }\n    }\n\n    if (this.idlType === \"void\") {\n      const message = `\\`void\\` is now replaced by \\`undefined\\`. Refer to the \\\n[relevant GitHub issue](https://github.com/whatwg/webidl/issues/60) \\\nfor more information.`;\n      yield validationError(this.tokens.base, this, \"replace-void\", message, {\n        autofix: replaceVoid(this),\n      });\n    }\n\n    /*\n     * If a union is nullable, its subunions cannot include a dictionary\n     * If not, subunions may include dictionaries if each union is not nullable\n     */\n    const typedef = !this.union && defs.unique.get(this.idlType);\n    const target = this.union\n      ? this\n      : typedef && typedef.type === \"typedef\"\n      ? typedef.idlType\n      : undefined;\n    if (target && this.nullable) {\n      // do not allow any dictionary\n      const { reference } = idlTypeIncludesDictionary(target, defs) || {};\n      if (reference) {\n        const targetToken = (this.union ? reference : this).tokens.base;\n        const message = \"Nullable union cannot include a dictionary type.\";\n        yield validationError(\n          targetToken,\n          this,\n          \"no-nullable-union-dict\",\n          message\n        );\n      }\n    } else {\n      // allow some dictionary\n      for (const subtype of this.subtype) {\n        yield* subtype.validate(defs);\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const type_body = () => {\n      if (this.union || this.generic) {\n        return w.ts.wrap([\n          w.token(this.tokens.base, w.ts.generic),\n          w.token(this.tokens.open),\n          ...this.subtype.map((t) => t.write(w)),\n          w.token(this.tokens.close),\n        ]);\n      }\n      const firstToken = this.tokens.prefix || this.tokens.base;\n      const prefix = this.tokens.prefix\n        ? [this.tokens.prefix.value, w.ts.trivia(this.tokens.base.trivia)]\n        : [];\n      const ref = w.reference(\n        w.ts.wrap([\n          ...prefix,\n          this.tokens.base.value,\n          w.token(this.tokens.postfix),\n        ]),\n        {\n          unescaped: /** @type {string} (because it's not union) */ (\n            this.idlType\n          ),\n          context: this,\n        }\n      );\n      return w.ts.wrap([w.ts.trivia(firstToken.trivia), ref]);\n    };\n    return w.ts.wrap([\n      this.extAttrs.write(w),\n      type_body(),\n      w.token(this.tokens.nullable),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\n/**\n * @param {Type} type\n * @param {import(\"./extended-attributes.js\").SimpleExtendedAttribute} extAttr\n * @param {ExtendedAttributes} extAttrs\n */\nfunction replaceAllowShared(type, extAttr, extAttrs) {\n  return () => {\n    const index = extAttrs.indexOf(extAttr);\n    extAttrs.splice(index, 1);\n    if (!extAttrs.length && type.tokens.base.trivia.match(/^\\s$/)) {\n      type.tokens.base.trivia = \"\"; // (let's not remove comments)\n    }\n\n    type.tokens.base.value = \"AllowSharedBufferSource\";\n  };\n}\n\n/**\n * @param {Type} type\n */\nfunction replaceVoid(type) {\n  return () => {\n    type.tokens.base.value = \"undefined\";\n  };\n}\n","import { Base } from \"./base.js\";\nimport { const_data, const_value } from \"./helpers.js\";\n\nexport class Default extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const assign = tokeniser.consume(\"=\");\n    if (!assign) {\n      return null;\n    }\n    const def =\n      const_value(tokeniser) ||\n      tokeniser.consumeKind(\"string\") ||\n      tokeniser.consume(\"null\", \"[\", \"{\") ||\n      tokeniser.error(\"No value for default\");\n    const expression = [def];\n    if (def.value === \"[\") {\n      const close =\n        tokeniser.consume(\"]\") ||\n        tokeniser.error(\"Default sequence value must be empty\");\n      expression.push(close);\n    } else if (def.value === \"{\") {\n      const close =\n        tokeniser.consume(\"}\") ||\n        tokeniser.error(\"Default dictionary value must be empty\");\n      expression.push(close);\n    }\n    return new Default({\n      source: tokeniser.source,\n      tokens: { assign },\n      expression,\n    });\n  }\n\n  constructor({ source, tokens, expression }) {\n    super({ source, tokens });\n    expression.parent = this;\n    Object.defineProperty(this, \"expression\", { value: expression });\n  }\n\n  get type() {\n    return const_data(this.expression[0]).type;\n  }\n  get value() {\n    return const_data(this.expression[0]).value;\n  }\n  get negative() {\n    return const_data(this.expression[0]).negative;\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      w.token(this.tokens.assign),\n      ...this.expression.map((t) => w.token(t)),\n    ]);\n  }\n}\n","import { Base } from \"./base.js\";\nimport { Default } from \"./default.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\nimport {\n  unescape,\n  type_with_extended_attributes,\n  autoParenter,\n  getFirstToken,\n} from \"./helpers.js\";\nimport { argumentNameKeywords, Tokeniser } from \"../tokeniser.js\";\nimport { validationError } from \"../error.js\";\nimport {\n  idlTypeIncludesDictionary,\n  dictionaryIncludesRequiredField,\n} from \"../validators/helpers.js\";\n\nexport class Argument extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const start_position = tokeniser.position;\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    const ret = autoParenter(\n      new Argument({ source: tokeniser.source, tokens })\n    );\n    ret.extAttrs = ExtendedAttributes.parse(tokeniser);\n    tokens.optional = tokeniser.consume(\"optional\");\n    ret.idlType = type_with_extended_attributes(tokeniser, \"argument-type\");\n    if (!ret.idlType) {\n      return tokeniser.unconsume(start_position);\n    }\n    if (!tokens.optional) {\n      tokens.variadic = tokeniser.consume(\"...\");\n    }\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.consume(...argumentNameKeywords);\n    if (!tokens.name) {\n      return tokeniser.unconsume(start_position);\n    }\n    ret.default = tokens.optional ? Default.parse(tokeniser) : null;\n    return ret.this;\n  }\n\n  get type() {\n    return \"argument\";\n  }\n  get optional() {\n    return !!this.tokens.optional;\n  }\n  get variadic() {\n    return !!this.tokens.variadic;\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  /**\n   * @param {import(\"../validator.js\").Definitions} defs\n   */\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    yield* this.idlType.validate(defs);\n    const result = idlTypeIncludesDictionary(this.idlType, defs, {\n      useNullableInner: true,\n    });\n    if (result) {\n      if (this.idlType.nullable) {\n        const message = `Dictionary arguments cannot be nullable.`;\n        yield validationError(\n          this.tokens.name,\n          this,\n          \"no-nullable-dict-arg\",\n          message\n        );\n      } else if (!this.optional) {\n        if (\n          this.parent &&\n          !dictionaryIncludesRequiredField(result.dictionary, defs) &&\n          isLastRequiredArgument(this)\n        ) {\n          const message = `Dictionary argument must be optional if it has no required fields`;\n          yield validationError(\n            this.tokens.name,\n            this,\n            \"dict-arg-optional\",\n            message,\n            {\n              autofix: autofixDictionaryArgumentOptionality(this),\n            }\n          );\n        }\n      } else if (!this.default) {\n        const message = `Optional dictionary arguments must have a default value of \\`{}\\`.`;\n        yield validationError(\n          this.tokens.name,\n          this,\n          \"dict-arg-default\",\n          message,\n          {\n            autofix: autofixOptionalDictionaryDefaultValue(this),\n          }\n        );\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      this.extAttrs.write(w),\n      w.token(this.tokens.optional),\n      w.ts.type(this.idlType.write(w)),\n      w.token(this.tokens.variadic),\n      w.name_token(this.tokens.name, { data: this }),\n      this.default ? this.default.write(w) : \"\",\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\n/**\n * @param {Argument} arg\n */\nfunction isLastRequiredArgument(arg) {\n  const list = arg.parent.arguments || arg.parent.list;\n  const index = list.indexOf(arg);\n  const requiredExists = list.slice(index + 1).some((a) => !a.optional);\n  return !requiredExists;\n}\n\n/**\n * @param {Argument} arg\n */\nfunction autofixDictionaryArgumentOptionality(arg) {\n  return () => {\n    const firstToken = getFirstToken(arg.idlType);\n    arg.tokens.optional = {\n      ...firstToken,\n      type: \"optional\",\n      value: \"optional\",\n    };\n    firstToken.trivia = \" \";\n    autofixOptionalDictionaryDefaultValue(arg)();\n  };\n}\n\n/**\n * @param {Argument} arg\n */\nfunction autofixOptionalDictionaryDefaultValue(arg) {\n  return () => {\n    arg.default = Default.parse(new Tokeniser(\" = {}\"));\n  };\n}\n","import { Base } from \"./base.js\";\nimport {\n  return_type,\n  argument_list,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\nimport { validationError } from \"../error.js\";\n\nexport class Operation extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"../tokeniser.js\").Token} [options.special]\n   * @param {import(\"../tokeniser.js\").Token} [options.regular]\n   */\n  static parse(tokeniser, { special, regular } = {}) {\n    const tokens = { special };\n    const ret = autoParenter(\n      new Operation({ source: tokeniser.source, tokens })\n    );\n    if (special && special.value === \"stringifier\") {\n      tokens.termination = tokeniser.consume(\";\");\n      if (tokens.termination) {\n        ret.arguments = [];\n        return ret;\n      }\n    }\n    if (!special && !regular) {\n      tokens.special = tokeniser.consume(\"getter\", \"setter\", \"deleter\");\n    }\n    ret.idlType =\n      return_type(tokeniser) || tokeniser.error(\"Missing return type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") || tokeniser.consume(\"includes\");\n    tokens.open =\n      tokeniser.consume(\"(\") || tokeniser.error(\"Invalid operation\");\n    ret.arguments = argument_list(tokeniser);\n    tokens.close =\n      tokeniser.consume(\")\") || tokeniser.error(\"Unterminated operation\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated operation, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"operation\";\n  }\n  get name() {\n    const { name } = this.tokens;\n    if (!name) {\n      return \"\";\n    }\n    return unescape(name.value);\n  }\n  get special() {\n    if (!this.tokens.special) {\n      return \"\";\n    }\n    return this.tokens.special.value;\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    if (!this.name && [\"\", \"static\"].includes(this.special)) {\n      const message = `Regular or static operations must have both a return type and an identifier.`;\n      yield validationError(this.tokens.open, this, \"incomplete-op\", message);\n    }\n    if (this.idlType) {\n      yield* this.idlType.validate(defs);\n    }\n    for (const argument of this.arguments) {\n      yield* argument.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    const body = this.idlType\n      ? [\n          w.ts.type(this.idlType.write(w)),\n          w.name_token(this.tokens.name, { data: this, parent }),\n          w.token(this.tokens.open),\n          w.ts.wrap(this.arguments.map((arg) => arg.write(w))),\n          w.token(this.tokens.close),\n        ]\n      : [];\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        this.tokens.name\n          ? w.token(this.tokens.special)\n          : w.token(this.tokens.special, w.ts.nameless, { data: this, parent }),\n        ...body,\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { validationError } from \"../error.js\";\nimport {\n  idlTypeIncludesDictionary,\n  idlTypeIncludesEnforceRange,\n} from \"../validators/helpers.js\";\nimport { Base } from \"./base.js\";\nimport {\n  type_with_extended_attributes,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\n\nexport class Attribute extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"../tokeniser.js\").Token} [options.special]\n   * @param {boolean} [options.noInherit]\n   * @param {boolean} [options.readonly]\n   */\n  static parse(\n    tokeniser,\n    { special, noInherit = false, readonly = false } = {}\n  ) {\n    const start_position = tokeniser.position;\n    const tokens = { special };\n    const ret = autoParenter(\n      new Attribute({ source: tokeniser.source, tokens })\n    );\n    if (!special && !noInherit) {\n      tokens.special = tokeniser.consume(\"inherit\");\n    }\n    if (ret.special === \"inherit\" && tokeniser.probe(\"readonly\")) {\n      tokeniser.error(\"Inherited attributes cannot be read-only\");\n    }\n    tokens.readonly = tokeniser.consume(\"readonly\");\n    if (readonly && !tokens.readonly && tokeniser.probe(\"attribute\")) {\n      tokeniser.error(\"Attributes must be readonly in this context\");\n    }\n    tokens.base = tokeniser.consume(\"attribute\");\n    if (!tokens.base) {\n      tokeniser.unconsume(start_position);\n      return;\n    }\n    ret.idlType =\n      type_with_extended_attributes(tokeniser, \"attribute-type\") ||\n      tokeniser.error(\"Attribute lacks a type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.consume(\"async\", \"required\") ||\n      tokeniser.error(\"Attribute lacks a name\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated attribute, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"attribute\";\n  }\n  get special() {\n    if (!this.tokens.special) {\n      return \"\";\n    }\n    return this.tokens.special.value;\n  }\n  get readonly() {\n    return !!this.tokens.readonly;\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    yield* this.idlType.validate(defs);\n\n    if ([\"sequence\", \"record\"].includes(this.idlType.generic)) {\n      const message = `Attributes cannot accept ${this.idlType.generic} types.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"attr-invalid-type\",\n        message\n      );\n    }\n\n    {\n      const { reference } = idlTypeIncludesDictionary(this.idlType, defs) || {};\n      if (reference) {\n        const targetToken = (this.idlType.union ? reference : this.idlType)\n          .tokens.base;\n        const message = \"Attributes cannot accept dictionary types.\";\n        yield validationError(targetToken, this, \"attr-invalid-type\", message);\n      }\n    }\n\n    if (this.readonly) {\n      if (idlTypeIncludesEnforceRange(this.idlType, defs)) {\n        const targetToken = this.idlType.tokens.base;\n        const message =\n          \"Readonly attributes cannot accept [EnforceRange] extended attribute.\";\n        yield validationError(targetToken, this, \"attr-invalid-type\", message);\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.special),\n        w.token(this.tokens.readonly),\n        w.token(this.tokens.base),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this, parent }),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Type } from \"./type.js\";\nimport { Argument } from \"./argument.js\";\nimport {\n  ExtendedAttributes,\n  SimpleExtendedAttribute,\n} from \"./extended-attributes.js\";\nimport { Operation } from \"./operation.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Tokeniser } from \"../tokeniser.js\";\n\n/**\n * @param {string} identifier\n */\nexport function unescape(identifier) {\n  return identifier.startsWith(\"_\") ? identifier.slice(1) : identifier;\n}\n\n/**\n * Parses comma-separated list\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {object} args\n * @param {Function} args.parser parser function for each item\n * @param {boolean} [args.allowDangler] whether to allow dangling comma\n * @param {string} [args.listName] the name to be shown on error messages\n */\nexport function list(tokeniser, { parser, allowDangler, listName = \"list\" }) {\n  const first = parser(tokeniser);\n  if (!first) {\n    return [];\n  }\n  first.tokens.separator = tokeniser.consume(\",\");\n  const items = [first];\n  while (first.tokens.separator) {\n    const item = parser(tokeniser);\n    if (!item) {\n      if (!allowDangler) {\n        tokeniser.error(`Trailing comma in ${listName}`);\n      }\n      break;\n    }\n    item.tokens.separator = tokeniser.consume(\",\");\n    items.push(item);\n    if (!item.tokens.separator) break;\n  }\n  return items;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function const_value(tokeniser) {\n  return (\n    tokeniser.consumeKind(\"decimal\", \"integer\") ||\n    tokeniser.consume(\"true\", \"false\", \"Infinity\", \"-Infinity\", \"NaN\")\n  );\n}\n\n/**\n * @param {object} token\n * @param {string} token.type\n * @param {string} token.value\n */\nexport function const_data({ type, value }) {\n  switch (type) {\n    case \"decimal\":\n    case \"integer\":\n      return { type: \"number\", value };\n    case \"string\":\n      return { type: \"string\", value: value.slice(1, -1) };\n  }\n\n  switch (value) {\n    case \"true\":\n    case \"false\":\n      return { type: \"boolean\", value: value === \"true\" };\n    case \"Infinity\":\n    case \"-Infinity\":\n      return { type: \"Infinity\", negative: value.startsWith(\"-\") };\n    case \"[\":\n      return { type: \"sequence\", value: [] };\n    case \"{\":\n      return { type: \"dictionary\" };\n    default:\n      return { type: value };\n  }\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function primitive_type(tokeniser) {\n  function integer_type() {\n    const prefix = tokeniser.consume(\"unsigned\");\n    const base = tokeniser.consume(\"short\", \"long\");\n    if (base) {\n      const postfix = tokeniser.consume(\"long\");\n      return new Type({ source, tokens: { prefix, base, postfix } });\n    }\n    if (prefix) tokeniser.error(\"Failed to parse integer type\");\n  }\n\n  function decimal_type() {\n    const prefix = tokeniser.consume(\"unrestricted\");\n    const base = tokeniser.consume(\"float\", \"double\");\n    if (base) {\n      return new Type({ source, tokens: { prefix, base } });\n    }\n    if (prefix) tokeniser.error(\"Failed to parse float type\");\n  }\n\n  const { source } = tokeniser;\n  const num_type = integer_type() || decimal_type();\n  if (num_type) return num_type;\n  const base = tokeniser.consume(\n    \"bigint\",\n    \"boolean\",\n    \"byte\",\n    \"octet\",\n    \"undefined\"\n  );\n  if (base) {\n    return new Type({ source, tokens: { base } });\n  }\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function argument_list(tokeniser) {\n  return list(tokeniser, {\n    parser: Argument.parse,\n    listName: \"arguments list\",\n  });\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string=} typeName (TODO: See Type.type for more details)\n */\nexport function type_with_extended_attributes(tokeniser, typeName) {\n  const extAttrs = ExtendedAttributes.parse(tokeniser);\n  const ret = Type.parse(tokeniser, typeName);\n  if (ret) autoParenter(ret).extAttrs = extAttrs;\n  return ret;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string=} typeName (TODO: See Type.type for more details)\n */\nexport function return_type(tokeniser, typeName) {\n  const typ = Type.parse(tokeniser, typeName || \"return-type\");\n  if (typ) {\n    return typ;\n  }\n  const voidToken = tokeniser.consume(\"void\");\n  if (voidToken) {\n    const ret = new Type({\n      source: tokeniser.source,\n      tokens: { base: voidToken },\n    });\n    ret.type = \"return-type\";\n    return ret;\n  }\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function stringifier(tokeniser) {\n  const special = tokeniser.consume(\"stringifier\");\n  if (!special) return;\n  const member =\n    Attribute.parse(tokeniser, { special }) ||\n    Operation.parse(tokeniser, { special }) ||\n    tokeniser.error(\"Unterminated stringifier\");\n  return member;\n}\n\n/**\n * @param {string} str\n */\nexport function getLastIndentation(str) {\n  const lines = str.split(\"\\n\");\n  // the first line visually binds to the preceding token\n  if (lines.length) {\n    const match = lines[lines.length - 1].match(/^\\s+/);\n    if (match) {\n      return match[0];\n    }\n  }\n  return \"\";\n}\n\n/**\n * @param {string} parentTrivia\n */\nexport function getMemberIndentation(parentTrivia) {\n  const indentation = getLastIndentation(parentTrivia);\n  const indentCh = indentation.includes(\"\\t\") ? \"\\t\" : \"  \";\n  return indentation + indentCh;\n}\n\n/**\n * @param {import(\"./interface.js\").Interface} def\n */\nexport function autofixAddExposedWindow(def) {\n  return () => {\n    if (def.extAttrs.length) {\n      const tokeniser = new Tokeniser(\"Exposed=Window,\");\n      const exposed = SimpleExtendedAttribute.parse(tokeniser);\n      exposed.tokens.separator = tokeniser.consume(\",\");\n      const existing = def.extAttrs[0];\n      if (!/^\\s/.test(existing.tokens.name.trivia)) {\n        existing.tokens.name.trivia = ` ${existing.tokens.name.trivia}`;\n      }\n      def.extAttrs.unshift(exposed);\n    } else {\n      autoParenter(def).extAttrs = ExtendedAttributes.parse(\n        new Tokeniser(\"[Exposed=Window]\")\n      );\n      const trivia = def.tokens.base.trivia;\n      def.extAttrs.tokens.open.trivia = trivia;\n      def.tokens.base.trivia = `\\n${getLastIndentation(trivia)}`;\n    }\n  };\n}\n\n/**\n * Get the first syntax token for the given IDL object.\n * @param {*} data\n */\nexport function getFirstToken(data) {\n  if (data.extAttrs.length) {\n    return data.extAttrs.tokens.open;\n  }\n  if (data.type === \"operation\" && !data.special) {\n    return getFirstToken(data.idlType);\n  }\n  const tokens = Object.values(data.tokens).sort((x, y) => x.index - y.index);\n  return tokens[0];\n}\n\n/**\n * @template T\n * @param {T[]} array\n * @param {(item: T) => boolean} predicate\n */\nexport function findLastIndex(array, predicate) {\n  const index = array.slice().reverse().findIndex(predicate);\n  if (index === -1) {\n    return index;\n  }\n  return array.length - index - 1;\n}\n\n/**\n * Returns a proxy that auto-assign `parent` field.\n * @template {Record<string | symbol, any>} T\n * @param {T} data\n * @param {*} [parent] The object that will be assigned to `parent`.\n *                     If absent, it will be `data` by default.\n * @return {T}\n */\nexport function autoParenter(data, parent) {\n  if (!parent) {\n    // Defaults to `data` unless specified otherwise.\n    parent = data;\n  }\n  if (!data) {\n    // This allows `autoParenter(undefined)` which again allows\n    // `autoParenter(parse())` where the function may return nothing.\n    return data;\n  }\n  const proxy = new Proxy(data, {\n    get(target, p) {\n      const value = target[p];\n      if (Array.isArray(value) && p !== \"source\") {\n        // Wraps the array so that any added items will also automatically\n        // get their `parent` values.\n        return autoParenter(value, target);\n      }\n      return value;\n    },\n    set(target, p, value) {\n      // @ts-ignore https://github.com/microsoft/TypeScript/issues/47357\n      target[p] = value;\n      if (!value) {\n        return true;\n      } else if (Array.isArray(value)) {\n        // Assigning an array will add `parent` to its items.\n        for (const item of value) {\n          if (typeof item.parent !== \"undefined\") {\n            item.parent = parent;\n          }\n        }\n      } else if (typeof value.parent !== \"undefined\") {\n        value.parent = parent;\n      }\n      return true;\n    },\n  });\n  return proxy;\n}\n","import { syntaxError } from \"./error.js\";\nimport { unescape } from \"./productions/helpers.js\";\n\n// These regular expressions use the sticky flag so they will only match at\n// the current location (ie. the offset of lastIndex).\nconst tokenRe = {\n  // This expression uses a lookahead assertion to catch false matches\n  // against integers early.\n  decimal:\n    /-?(?=[0-9]*\\.|[0-9]+[eE])(([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,\n  integer: /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,\n  identifier: /[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,\n  string: /\"[^\"]*\"/y,\n  whitespace: /[\\t\\n\\r ]+/y,\n  comment: /\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\//y,\n  other: /[^\\t\\n\\r 0-9A-Za-z]/y,\n};\n\nexport const typeNameKeywords = [\n  \"ArrayBuffer\",\n  \"SharedArrayBuffer\",\n  \"DataView\",\n  \"Int8Array\",\n  \"Int16Array\",\n  \"Int32Array\",\n  \"Uint8Array\",\n  \"Uint16Array\",\n  \"Uint32Array\",\n  \"Uint8ClampedArray\",\n  \"BigInt64Array\",\n  \"BigUint64Array\",\n  \"Float32Array\",\n  \"Float64Array\",\n  \"any\",\n  \"object\",\n  \"symbol\",\n];\n\nexport const stringTypes = [\"ByteString\", \"DOMString\", \"USVString\"];\n\nexport const argumentNameKeywords = [\n  \"async\",\n  \"attribute\",\n  \"callback\",\n  \"const\",\n  \"constructor\",\n  \"deleter\",\n  \"dictionary\",\n  \"enum\",\n  \"getter\",\n  \"includes\",\n  \"inherit\",\n  \"interface\",\n  \"iterable\",\n  \"maplike\",\n  \"namespace\",\n  \"partial\",\n  \"required\",\n  \"setlike\",\n  \"setter\",\n  \"static\",\n  \"stringifier\",\n  \"typedef\",\n  \"unrestricted\",\n];\n\nconst nonRegexTerminals = [\n  \"-Infinity\",\n  \"FrozenArray\",\n  \"Infinity\",\n  \"NaN\",\n  \"ObservableArray\",\n  \"Promise\",\n  \"bigint\",\n  \"boolean\",\n  \"byte\",\n  \"double\",\n  \"false\",\n  \"float\",\n  \"long\",\n  \"mixin\",\n  \"null\",\n  \"octet\",\n  \"optional\",\n  \"or\",\n  \"readonly\",\n  \"record\",\n  \"sequence\",\n  \"short\",\n  \"true\",\n  \"undefined\",\n  \"unsigned\",\n  \"void\",\n].concat(argumentNameKeywords, stringTypes, typeNameKeywords);\n\nconst punctuations = [\n  \"(\",\n  \")\",\n  \",\",\n  \"...\",\n  \":\",\n  \";\",\n  \"<\",\n  \"=\",\n  \">\",\n  \"?\",\n  \"*\",\n  \"[\",\n  \"]\",\n  \"{\",\n  \"}\",\n];\n\nconst reserved = [\n  // \"constructor\" is now a keyword\n  \"_constructor\",\n  \"toString\",\n  \"_toString\",\n];\n\n/**\n * @typedef {ArrayItemType<ReturnType<typeof tokenise>>} Token\n * @param {string} str\n */\nfunction tokenise(str) {\n  const tokens = [];\n  let lastCharIndex = 0;\n  let trivia = \"\";\n  let line = 1;\n  let index = 0;\n  while (lastCharIndex < str.length) {\n    const nextChar = str.charAt(lastCharIndex);\n    let result = -1;\n\n    if (/[\\t\\n\\r ]/.test(nextChar)) {\n      result = attemptTokenMatch(\"whitespace\", { noFlushTrivia: true });\n    } else if (nextChar === \"/\") {\n      result = attemptTokenMatch(\"comment\", { noFlushTrivia: true });\n    }\n\n    if (result !== -1) {\n      const currentTrivia = tokens.pop().value;\n      line += (currentTrivia.match(/\\n/g) || []).length;\n      trivia += currentTrivia;\n      index -= 1;\n    } else if (/[-0-9.A-Z_a-z]/.test(nextChar)) {\n      result = attemptTokenMatch(\"decimal\");\n      if (result === -1) {\n        result = attemptTokenMatch(\"integer\");\n      }\n      if (result === -1) {\n        result = attemptTokenMatch(\"identifier\");\n        const lastIndex = tokens.length - 1;\n        const token = tokens[lastIndex];\n        if (result !== -1) {\n          if (reserved.includes(token.value)) {\n            const message = `${unescape(\n              token.value\n            )} is a reserved identifier and must not be used.`;\n            throw new WebIDLParseError(\n              syntaxError(tokens, lastIndex, null, message)\n            );\n          } else if (nonRegexTerminals.includes(token.value)) {\n            token.type = \"inline\";\n          }\n        }\n      }\n    } else if (nextChar === '\"') {\n      result = attemptTokenMatch(\"string\");\n    }\n\n    for (const punctuation of punctuations) {\n      if (str.startsWith(punctuation, lastCharIndex)) {\n        tokens.push({\n          type: \"inline\",\n          value: punctuation,\n          trivia,\n          line,\n          index,\n        });\n        trivia = \"\";\n        lastCharIndex += punctuation.length;\n        result = lastCharIndex;\n        break;\n      }\n    }\n\n    // other as the last try\n    if (result === -1) {\n      result = attemptTokenMatch(\"other\");\n    }\n    if (result === -1) {\n      throw new Error(\"Token stream not progressing\");\n    }\n    lastCharIndex = result;\n    index += 1;\n  }\n\n  // remaining trivia as eof\n  tokens.push({\n    type: \"eof\",\n    value: \"\",\n    trivia,\n    line,\n    index,\n  });\n\n  return tokens;\n\n  /**\n   * @param {keyof typeof tokenRe} type\n   * @param {object} options\n   * @param {boolean} [options.noFlushTrivia]\n   */\n  function attemptTokenMatch(type, { noFlushTrivia } = {}) {\n    const re = tokenRe[type];\n    re.lastIndex = lastCharIndex;\n    const result = re.exec(str);\n    if (result) {\n      tokens.push({ type, value: result[0], trivia, line, index });\n      if (!noFlushTrivia) {\n        trivia = \"\";\n      }\n      return re.lastIndex;\n    }\n    return -1;\n  }\n}\n\nexport class Tokeniser {\n  /**\n   * @param {string} idl\n   */\n  constructor(idl) {\n    this.source = tokenise(idl);\n    this.position = 0;\n  }\n\n  /**\n   * @param {string} message\n   * @return {never}\n   */\n  error(message) {\n    throw new WebIDLParseError(\n      syntaxError(this.source, this.position, this.current, message)\n    );\n  }\n\n  /**\n   * @param {string} type\n   */\n  probeKind(type) {\n    return (\n      this.source.length > this.position &&\n      this.source[this.position].type === type\n    );\n  }\n\n  /**\n   * @param {string} value\n   */\n  probe(value) {\n    return (\n      this.probeKind(\"inline\") && this.source[this.position].value === value\n    );\n  }\n\n  /**\n   * @param {...string} candidates\n   */\n  consumeKind(...candidates) {\n    for (const type of candidates) {\n      if (!this.probeKind(type)) continue;\n      const token = this.source[this.position];\n      this.position++;\n      return token;\n    }\n  }\n\n  /**\n   * @param {...string} candidates\n   */\n  consume(...candidates) {\n    if (!this.probeKind(\"inline\")) return;\n    const token = this.source[this.position];\n    for (const value of candidates) {\n      if (token.value !== value) continue;\n      this.position++;\n      return token;\n    }\n  }\n\n  /**\n   * @param {string} value\n   */\n  consumeIdentifier(value) {\n    if (!this.probeKind(\"identifier\")) {\n      return;\n    }\n    if (this.source[this.position].value !== value) {\n      return;\n    }\n    return this.consumeKind(\"identifier\");\n  }\n\n  /**\n   * @param {number} position\n   */\n  unconsume(position) {\n    this.position = position;\n  }\n}\n\nexport class WebIDLParseError extends Error {\n  /**\n   * @param {object} options\n   * @param {string} options.message\n   * @param {string} options.bareMessage\n   * @param {string} options.context\n   * @param {number} options.line\n   * @param {*} options.sourceName\n   * @param {string} options.input\n   * @param {*[]} options.tokens\n   */\n  constructor({\n    message,\n    bareMessage,\n    context,\n    line,\n    sourceName,\n    input,\n    tokens,\n  }) {\n    super(message);\n\n    this.name = \"WebIDLParseError\"; // not to be mangled\n    this.bareMessage = bareMessage;\n    this.context = context;\n    this.line = line;\n    this.sourceName = sourceName;\n    this.input = input;\n    this.tokens = tokens;\n  }\n}\n","import { list, unescape, autoParenter } from \"./helpers.js\";\nimport { WrappedToken } from \"./token.js\";\nimport { Base } from \"./base.js\";\n\nexport class EnumValue extends WrappedToken {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const value = tokeniser.consumeKind(\"string\");\n    if (value) {\n      return new EnumValue({ source: tokeniser.source, tokens: { value } });\n    }\n  }\n\n  get type() {\n    return \"enum-value\";\n  }\n  get value() {\n    return super.value.slice(1, -1);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.wrap([\n      w.ts.trivia(this.tokens.value.trivia),\n      w.ts.definition(\n        w.ts.wrap(['\"', w.ts.name(this.value, { data: this, parent }), '\"']),\n        { data: this, parent }\n      ),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\nexport class Enum extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    tokens.base = tokeniser.consume(\"enum\");\n    if (!tokens.base) {\n      return;\n    }\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"No name for enum\");\n    const ret = autoParenter(new Enum({ source: tokeniser.source, tokens }));\n    tokeniser.current = ret.this;\n    tokens.open = tokeniser.consume(\"{\") || tokeniser.error(\"Bodyless enum\");\n    ret.values = list(tokeniser, {\n      parser: EnumValue.parse,\n      allowDangler: true,\n      listName: \"enumeration\",\n    });\n    if (tokeniser.probeKind(\"string\")) {\n      tokeniser.error(\"No comma between enum values\");\n    }\n    tokens.close =\n      tokeniser.consume(\"}\") || tokeniser.error(\"Unexpected value in enum\");\n    if (!ret.values.length) {\n      tokeniser.error(\"No value in enum\");\n    }\n    tokens.termination =\n      tokeniser.consume(\";\") || tokeniser.error(\"No semicolon after enum\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"enum\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.name_token(this.tokens.name, { data: this }),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.values.map((v) => v.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { unescape } from \"./helpers.js\";\n\nexport class Includes extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const target = tokeniser.consumeKind(\"identifier\");\n    if (!target) {\n      return;\n    }\n    const tokens = { target };\n    tokens.includes = tokeniser.consume(\"includes\");\n    if (!tokens.includes) {\n      tokeniser.unconsume(target.index);\n      return;\n    }\n    tokens.mixin =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Incomplete includes statement\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"No terminating ; for includes statement\");\n    return new Includes({ source: tokeniser.source, tokens });\n  }\n\n  get type() {\n    return \"includes\";\n  }\n  get target() {\n    return unescape(this.tokens.target.value);\n  }\n  get includes() {\n    return unescape(this.tokens.mixin.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.reference_token(this.tokens.target, this),\n        w.token(this.tokens.includes),\n        w.reference_token(this.tokens.mixin, this),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  type_with_extended_attributes,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\n\nexport class Typedef extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    const ret = autoParenter(new Typedef({ source: tokeniser.source, tokens }));\n    tokens.base = tokeniser.consume(\"typedef\");\n    if (!tokens.base) {\n      return;\n    }\n    ret.idlType =\n      type_with_extended_attributes(tokeniser, \"typedef-type\") ||\n      tokeniser.error(\"Typedef lacks a type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Typedef lacks a name\");\n    tokeniser.current = ret.this;\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated typedef, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"typedef\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  *validate(defs) {\n    yield* this.idlType.validate(defs);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this }),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  return_type,\n  argument_list,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\n\nexport class CallbackFunction extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser, base) {\n    const tokens = { base };\n    const ret = autoParenter(\n      new CallbackFunction({ source: tokeniser.source, tokens })\n    );\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Callback lacks a name\");\n    tokeniser.current = ret.this;\n    tokens.assign =\n      tokeniser.consume(\"=\") || tokeniser.error(\"Callback lacks an assignment\");\n    ret.idlType =\n      return_type(tokeniser) || tokeniser.error(\"Callback lacks a return type\");\n    tokens.open =\n      tokeniser.consume(\"(\") ||\n      tokeniser.error(\"Callback lacks parentheses for arguments\");\n    ret.arguments = argument_list(tokeniser);\n    tokens.close =\n      tokeniser.consume(\")\") || tokeniser.error(\"Unterminated callback\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated callback, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"callback\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    yield* this.idlType.validate(defs);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.name_token(this.tokens.name, { data: this }),\n        w.token(this.tokens.assign),\n        w.ts.type(this.idlType.write(w)),\n        w.token(this.tokens.open),\n        ...this.arguments.map((arg) => arg.write(w)),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\nimport { unescape, autoParenter } from \"./helpers.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction inheritance(tokeniser) {\n  const colon = tokeniser.consume(\":\");\n  if (!colon) {\n    return {};\n  }\n  const inheritance =\n    tokeniser.consumeKind(\"identifier\") ||\n    tokeniser.error(\"Inheritance lacks a type\");\n  return { colon, inheritance };\n}\n\n/**\n * Parser callback.\n * @callback ParserCallback\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {...*} args\n */\n\n/**\n * A parser callback and optional option object.\n * @typedef AllowedMember\n * @type {[ParserCallback, object?]}\n */\n\nexport class Container extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {*} instance TODO: This should be {T extends Container}, but see https://github.com/microsoft/TypeScript/issues/4628\n   * @param {*} args\n   */\n  static parse(tokeniser, instance, { inheritable, allowedMembers }) {\n    const { tokens, type } = instance;\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(`Missing name in ${type}`);\n    tokeniser.current = instance;\n    instance = autoParenter(instance);\n    if (inheritable) {\n      Object.assign(tokens, inheritance(tokeniser));\n    }\n    tokens.open = tokeniser.consume(\"{\") || tokeniser.error(`Bodyless ${type}`);\n    instance.members = [];\n    while (true) {\n      tokens.close = tokeniser.consume(\"}\");\n      if (tokens.close) {\n        tokens.termination =\n          tokeniser.consume(\";\") ||\n          tokeniser.error(`Missing semicolon after ${type}`);\n        return instance.this;\n      }\n      const ea = ExtendedAttributes.parse(tokeniser);\n      let mem;\n      for (const [parser, ...args] of allowedMembers) {\n        mem = autoParenter(parser(tokeniser, ...args));\n        if (mem) {\n          break;\n        }\n      }\n      if (!mem) {\n        tokeniser.error(\"Unknown member\");\n      }\n      mem.extAttrs = ea;\n      instance.members.push(mem.this);\n    }\n  }\n\n  get partial() {\n    return !!this.tokens.partial;\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n  get inheritance() {\n    if (!this.tokens.inheritance) {\n      return null;\n    }\n    return unescape(this.tokens.inheritance.value);\n  }\n\n  *validate(defs) {\n    for (const member of this.members) {\n      if (member.validate) {\n        yield* member.validate(defs);\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const inheritance = () => {\n      if (!this.tokens.inheritance) {\n        return \"\";\n      }\n      return w.ts.wrap([\n        w.token(this.tokens.colon),\n        w.ts.trivia(this.tokens.inheritance.trivia),\n        w.ts.inheritance(\n          w.reference(this.tokens.inheritance.value, { context: this })\n        ),\n      ]);\n    };\n\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.callback),\n        w.token(this.tokens.partial),\n        w.token(this.tokens.base),\n        w.token(this.tokens.mixin),\n        w.name_token(this.tokens.name, { data: this }),\n        inheritance(),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.members.map((m) => m.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { Type } from \"./type.js\";\nimport {\n  const_data,\n  const_value,\n  primitive_type,\n  autoParenter,\n  unescape,\n} from \"./helpers.js\";\n\nexport class Constant extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    tokens.base = tokeniser.consume(\"const\");\n    if (!tokens.base) {\n      return;\n    }\n    let idlType = primitive_type(tokeniser);\n    if (!idlType) {\n      const base =\n        tokeniser.consumeKind(\"identifier\") ||\n        tokeniser.error(\"Const lacks a type\");\n      idlType = new Type({ source: tokeniser.source, tokens: { base } });\n    }\n    if (tokeniser.probe(\"?\")) {\n      tokeniser.error(\"Unexpected nullable constant type\");\n    }\n    idlType.type = \"const-type\";\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Const lacks a name\");\n    tokens.assign =\n      tokeniser.consume(\"=\") || tokeniser.error(\"Const lacks value assignment\");\n    tokens.value =\n      const_value(tokeniser) || tokeniser.error(\"Const lacks a value\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated const, expected `;`\");\n    const ret = new Constant({ source: tokeniser.source, tokens });\n    autoParenter(ret).idlType = idlType;\n    return ret;\n  }\n\n  get type() {\n    return \"const\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n  get value() {\n    return const_data(this.tokens.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this, parent }),\n        w.token(this.tokens.assign),\n        w.token(this.tokens.value),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  type_with_extended_attributes,\n  autoParenter,\n  argument_list,\n} from \"./helpers.js\";\n\nexport class IterableLike extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const start_position = tokeniser.position;\n    const ret = autoParenter(\n      new IterableLike({ source: tokeniser.source, tokens: {} })\n    );\n    const { tokens } = ret;\n    tokens.readonly = tokeniser.consume(\"readonly\");\n    if (!tokens.readonly) {\n      tokens.async = tokeniser.consume(\"async\");\n    }\n    tokens.base = tokens.readonly\n      ? tokeniser.consume(\"maplike\", \"setlike\")\n      : tokens.async\n      ? tokeniser.consume(\"iterable\")\n      : tokeniser.consume(\"iterable\", \"maplike\", \"setlike\");\n    if (!tokens.base) {\n      tokeniser.unconsume(start_position);\n      return;\n    }\n\n    const { type } = ret;\n    const secondTypeRequired = type === \"maplike\";\n    const secondTypeAllowed = secondTypeRequired || type === \"iterable\";\n    const argumentAllowed = ret.async && type === \"iterable\";\n\n    tokens.open =\n      tokeniser.consume(\"<\") ||\n      tokeniser.error(`Missing less-than sign \\`<\\` in ${type} declaration`);\n    const first =\n      type_with_extended_attributes(tokeniser) ||\n      tokeniser.error(`Missing a type argument in ${type} declaration`);\n    ret.idlType = [first];\n    ret.arguments = [];\n\n    if (secondTypeAllowed) {\n      first.tokens.separator = tokeniser.consume(\",\");\n      if (first.tokens.separator) {\n        ret.idlType.push(type_with_extended_attributes(tokeniser));\n      } else if (secondTypeRequired) {\n        tokeniser.error(`Missing second type argument in ${type} declaration`);\n      }\n    }\n\n    tokens.close =\n      tokeniser.consume(\">\") ||\n      tokeniser.error(`Missing greater-than sign \\`>\\` in ${type} declaration`);\n\n    if (tokeniser.probe(\"(\")) {\n      if (argumentAllowed) {\n        tokens.argsOpen = tokeniser.consume(\"(\");\n        ret.arguments.push(...argument_list(tokeniser));\n        tokens.argsClose =\n          tokeniser.consume(\")\") ||\n          tokeniser.error(\"Unterminated async iterable argument list\");\n      } else {\n        tokeniser.error(`Arguments are only allowed for \\`async iterable\\``);\n      }\n    }\n\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(`Missing semicolon after ${type} declaration`);\n\n    return ret.this;\n  }\n\n  get type() {\n    return this.tokens.base.value;\n  }\n  get readonly() {\n    return !!this.tokens.readonly;\n  }\n  get async() {\n    return !!this.tokens.async;\n  }\n\n  *validate(defs) {\n    for (const type of this.idlType) {\n      yield* type.validate(defs);\n    }\n    for (const argument of this.arguments) {\n      yield* argument.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.readonly),\n        w.token(this.tokens.async),\n        w.token(this.tokens.base, w.ts.generic),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.idlType.map((t) => t.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.argsOpen),\n        w.ts.wrap(this.arguments.map((arg) => arg.write(w))),\n        w.token(this.tokens.argsClose),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent: this.parent }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { argument_list, autoParenter } from \"./helpers.js\";\n\nexport class Constructor extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const base = tokeniser.consume(\"constructor\");\n    if (!base) {\n      return;\n    }\n    /** @type {Base[\"tokens\"]} */\n    const tokens = { base };\n    tokens.open =\n      tokeniser.consume(\"(\") ||\n      tokeniser.error(\"No argument list in constructor\");\n    const args = argument_list(tokeniser);\n    tokens.close =\n      tokeniser.consume(\")\") || tokeniser.error(\"Unterminated constructor\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"No semicolon after constructor\");\n    const ret = new Constructor({ source: tokeniser.source, tokens });\n    autoParenter(ret).arguments = args;\n    return ret;\n  }\n\n  get type() {\n    return \"constructor\";\n  }\n\n  *validate(defs) {\n    for (const argument of this.arguments) {\n      yield* argument.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base, w.ts.nameless, { data: this, parent }),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.arguments.map((arg) => arg.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Operation } from \"./operation.js\";\nimport { Constant } from \"./constant.js\";\nimport { IterableLike } from \"./iterable.js\";\nimport {\n  stringifier,\n  autofixAddExposedWindow,\n  getMemberIndentation,\n  getLastIndentation,\n  getFirstToken,\n  findLastIndex,\n  autoParenter,\n} from \"./helpers.js\";\nimport { validationError } from \"../error.js\";\nimport { checkInterfaceMemberDuplication } from \"../validators/interface.js\";\nimport { Constructor } from \"./constructor.js\";\nimport { Tokeniser } from \"../tokeniser.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction static_member(tokeniser) {\n  const special = tokeniser.consume(\"static\");\n  if (!special) return;\n  const member =\n    Attribute.parse(tokeniser, { special }) ||\n    Operation.parse(tokeniser, { special }) ||\n    tokeniser.error(\"No body in static member\");\n  return member;\n}\n\nexport class Interface extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {import(\"../tokeniser.js\").Token} base\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token|null} [options.partial]\n   */\n  static parse(tokeniser, base, { extMembers = [], partial = null } = {}) {\n    const tokens = { partial, base };\n    return Container.parse(\n      tokeniser,\n      new Interface({ source: tokeniser.source, tokens }),\n      {\n        inheritable: !partial,\n        allowedMembers: [\n          ...extMembers,\n          [Constant.parse],\n          [Constructor.parse],\n          [static_member],\n          [stringifier],\n          [IterableLike.parse],\n          [Attribute.parse],\n          [Operation.parse],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"interface\";\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    if (\n      !this.partial &&\n      this.extAttrs.every((extAttr) => extAttr.name !== \"Exposed\")\n    ) {\n      const message = `Interfaces must have \\`[Exposed]\\` extended attribute. \\\nTo fix, add, for example, \\`[Exposed=Window]\\`. Please also consider carefully \\\nif your interface should also be exposed in a Worker scope. Refer to the \\\n[WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) \\\nfor more information.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"require-exposed\",\n        message,\n        {\n          autofix: autofixAddExposedWindow(this),\n        }\n      );\n    }\n    const oldConstructors = this.extAttrs.filter(\n      (extAttr) => extAttr.name === \"Constructor\"\n    );\n    for (const constructor of oldConstructors) {\n      const message = `Constructors should now be represented as a \\`constructor()\\` operation on the interface \\\ninstead of \\`[Constructor]\\` extended attribute. Refer to the \\\n[WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) \\\nfor more information.`;\n      yield validationError(\n        constructor.tokens.name,\n        this,\n        \"constructor-member\",\n        message,\n        {\n          autofix: autofixConstructor(this, constructor),\n        }\n      );\n    }\n\n    const isGlobal = this.extAttrs.some((extAttr) => extAttr.name === \"Global\");\n    if (isGlobal) {\n      const factoryFunctions = this.extAttrs.filter(\n        (extAttr) => extAttr.name === \"LegacyFactoryFunction\"\n      );\n      for (const named of factoryFunctions) {\n        const message = `Interfaces marked as \\`[Global]\\` cannot have factory functions.`;\n        yield validationError(\n          named.tokens.name,\n          this,\n          \"no-constructible-global\",\n          message\n        );\n      }\n\n      const constructors = this.members.filter(\n        (member) => member.type === \"constructor\"\n      );\n      for (const named of constructors) {\n        const message = `Interfaces marked as \\`[Global]\\` cannot have constructors.`;\n        yield validationError(\n          named.tokens.base,\n          this,\n          \"no-constructible-global\",\n          message\n        );\n      }\n    }\n\n    yield* super.validate(defs);\n    if (!this.partial) {\n      yield* checkInterfaceMemberDuplication(defs, this);\n    }\n  }\n}\n\nfunction autofixConstructor(interfaceDef, constructorExtAttr) {\n  interfaceDef = autoParenter(interfaceDef);\n  return () => {\n    const indentation = getLastIndentation(\n      interfaceDef.extAttrs.tokens.open.trivia\n    );\n    const memberIndent = interfaceDef.members.length\n      ? getLastIndentation(getFirstToken(interfaceDef.members[0]).trivia)\n      : getMemberIndentation(indentation);\n    const constructorOp = Constructor.parse(\n      new Tokeniser(`\\n${memberIndent}constructor();`)\n    );\n    constructorOp.extAttrs = new ExtendedAttributes({\n      source: interfaceDef.source,\n      tokens: {},\n    });\n    autoParenter(constructorOp).arguments = constructorExtAttr.arguments;\n\n    const existingIndex = findLastIndex(\n      interfaceDef.members,\n      (m) => m.type === \"constructor\"\n    );\n    interfaceDef.members.splice(existingIndex + 1, 0, constructorOp);\n\n    const { close } = interfaceDef.tokens;\n    if (!close.trivia.includes(\"\\n\")) {\n      close.trivia += `\\n${indentation}`;\n    }\n\n    const { extAttrs } = interfaceDef;\n    const index = extAttrs.indexOf(constructorExtAttr);\n    const removed = extAttrs.splice(index, 1);\n    if (!extAttrs.length) {\n      extAttrs.tokens.open = extAttrs.tokens.close = undefined;\n    } else if (extAttrs.length === index) {\n      extAttrs[index - 1].tokens.separator = undefined;\n    } else if (!extAttrs[index].tokens.name.trivia.trim()) {\n      extAttrs[index].tokens.name.trivia = removed[0].tokens.name.trivia;\n    }\n  };\n}\n","import { validationError } from \"../error.js\";\n\n/**\n * @param {import(\"../validator.js\").Definitions} defs\n * @param {import(\"../productions/container.js\").Container} i\n */\nexport function* checkInterfaceMemberDuplication(defs, i) {\n  const opNames = groupOperationNames(i);\n  const partials = defs.partials.get(i.name) || [];\n  const mixins = defs.mixinMap.get(i.name) || [];\n  for (const ext of [...partials, ...mixins]) {\n    const additions = getOperations(ext);\n    const statics = additions.filter((a) => a.special === \"static\");\n    const nonstatics = additions.filter((a) => a.special !== \"static\");\n    yield* checkAdditions(statics, opNames.statics, ext, i);\n    yield* checkAdditions(nonstatics, opNames.nonstatics, ext, i);\n    statics.forEach((op) => opNames.statics.add(op.name));\n    nonstatics.forEach((op) => opNames.nonstatics.add(op.name));\n  }\n\n  /**\n   * @param {import(\"../productions/operation.js\").Operation[]} additions\n   * @param {Set<string>} existings\n   * @param {import(\"../productions/container.js\").Container} ext\n   * @param {import(\"../productions/container.js\").Container} base\n   */\n  function* checkAdditions(additions, existings, ext, base) {\n    for (const addition of additions) {\n      const { name } = addition;\n      if (name && existings.has(name)) {\n        const isStatic = addition.special === \"static\" ? \"static \" : \"\";\n        const message = `The ${isStatic}operation \"${name}\" has already been defined for the base interface \"${base.name}\" either in itself or in a mixin`;\n        yield validationError(\n          addition.tokens.name,\n          ext,\n          \"no-cross-overload\",\n          message\n        );\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../productions/container.js\").Container} i\n   * @returns {import(\"../productions/operation.js\").Operation[]}\n   */\n  function getOperations(i) {\n    return i.members.filter(({ type }) => type === \"operation\");\n  }\n\n  /**\n   * @param {import(\"../productions/container.js\").Container} i\n   */\n  function groupOperationNames(i) {\n    const ops = getOperations(i);\n    return {\n      statics: new Set(\n        ops.filter((op) => op.special === \"static\").map((op) => op.name)\n      ),\n      nonstatics: new Set(\n        ops.filter((op) => op.special !== \"static\").map((op) => op.name)\n      ),\n    };\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Constant } from \"./constant.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Operation } from \"./operation.js\";\nimport { stringifier } from \"./helpers.js\";\n\nexport class Mixin extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {import(\"../tokeniser.js\").Token} base\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token} [options.partial]\n   */\n  static parse(tokeniser, base, { extMembers = [], partial } = {}) {\n    const tokens = { partial, base };\n    tokens.mixin = tokeniser.consume(\"mixin\");\n    if (!tokens.mixin) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new Mixin({ source: tokeniser.source, tokens }),\n      {\n        allowedMembers: [\n          ...extMembers,\n          [Constant.parse],\n          [stringifier],\n          [Attribute.parse, { noInherit: true }],\n          [Operation.parse, { regular: true }],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"interface mixin\";\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  unescape,\n  type_with_extended_attributes,\n  autoParenter,\n} from \"./helpers.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\nimport { Default } from \"./default.js\";\n\nexport class Field extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    const ret = autoParenter(new Field({ source: tokeniser.source, tokens }));\n    ret.extAttrs = ExtendedAttributes.parse(tokeniser);\n    tokens.required = tokeniser.consume(\"required\");\n    ret.idlType =\n      type_with_extended_attributes(tokeniser, \"dictionary-type\") ||\n      tokeniser.error(\"Dictionary member lacks a type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Dictionary member lacks a name\");\n    ret.default = Default.parse(tokeniser);\n    if (tokens.required && ret.default)\n      tokeniser.error(\"Required member must not have a default\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated dictionary member, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"field\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n  get required() {\n    return !!this.tokens.required;\n  }\n\n  *validate(defs) {\n    yield* this.idlType.validate(defs);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.required),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this, parent }),\n        this.default ? this.default.write(w) : \"\",\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Field } from \"./field.js\";\n\nexport class Dictionary extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token} [options.partial]\n   */\n  static parse(tokeniser, { extMembers = [], partial } = {}) {\n    const tokens = { partial };\n    tokens.base = tokeniser.consume(\"dictionary\");\n    if (!tokens.base) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new Dictionary({ source: tokeniser.source, tokens }),\n      {\n        inheritable: !partial,\n        allowedMembers: [...extMembers, [Field.parse]],\n      }\n    );\n  }\n\n  get type() {\n    return \"dictionary\";\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Operation } from \"./operation.js\";\nimport { validationError } from \"../error.js\";\nimport { autofixAddExposedWindow } from \"./helpers.js\";\nimport { Constant } from \"./constant.js\";\n\nexport class Namespace extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token} [options.partial]\n   */\n  static parse(tokeniser, { extMembers = [], partial } = {}) {\n    const tokens = { partial };\n    tokens.base = tokeniser.consume(\"namespace\");\n    if (!tokens.base) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new Namespace({ source: tokeniser.source, tokens }),\n      {\n        allowedMembers: [\n          ...extMembers,\n          [Attribute.parse, { noInherit: true, readonly: true }],\n          [Constant.parse],\n          [Operation.parse, { regular: true }],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"namespace\";\n  }\n\n  *validate(defs) {\n    if (\n      !this.partial &&\n      this.extAttrs.every((extAttr) => extAttr.name !== \"Exposed\")\n    ) {\n      const message = `Namespaces must have [Exposed] extended attribute. \\\nTo fix, add, for example, [Exposed=Window]. Please also consider carefully \\\nif your namespace should also be exposed in a Worker scope. Refer to the \\\n[WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) \\\nfor more information.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"require-exposed\",\n        message,\n        {\n          autofix: autofixAddExposedWindow(this),\n        }\n      );\n    }\n    yield* super.validate(defs);\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Operation } from \"./operation.js\";\nimport { Constant } from \"./constant.js\";\n\nexport class CallbackInterface extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {*} callback\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   */\n  static parse(tokeniser, callback, { extMembers = [] } = {}) {\n    const tokens = { callback };\n    tokens.base = tokeniser.consume(\"interface\");\n    if (!tokens.base) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new CallbackInterface({ source: tokeniser.source, tokens }),\n      {\n        allowedMembers: [\n          ...extMembers,\n          [Constant.parse],\n          [Operation.parse, { regular: true }],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"callback interface\";\n  }\n}\n","import { Tokeniser } from \"./tokeniser.js\";\nimport { Enum } from \"./productions/enum.js\";\nimport { Includes } from \"./productions/includes.js\";\nimport { ExtendedAttributes } from \"./productions/extended-attributes.js\";\nimport { Typedef } from \"./productions/typedef.js\";\nimport { CallbackFunction } from \"./productions/callback.js\";\nimport { Interface } from \"./productions/interface.js\";\nimport { Mixin } from \"./productions/mixin.js\";\nimport { Dictionary } from \"./productions/dictionary.js\";\nimport { Namespace } from \"./productions/namespace.js\";\nimport { CallbackInterface } from \"./productions/callback-interface.js\";\nimport { autoParenter } from \"./productions/helpers.js\";\nimport { Eof } from \"./productions/token.js\";\n\n/** @typedef {'callbackInterface'|'dictionary'|'interface'|'mixin'|'namespace'} ExtendableInterfaces */\n/** @typedef {{ extMembers?: import(\"./productions/container.js\").AllowedMember[]}} Extension */\n/** @typedef {Partial<Record<ExtendableInterfaces, Extension>>} Extensions */\n\n/**\n * Parser options.\n * @typedef {Object} ParserOptions\n * @property {string} [sourceName]\n * @property {boolean} [concrete]\n * @property {Function[]} [productions]\n * @property {Extensions} [extensions]\n */\n\n/**\n * @param {Tokeniser} tokeniser\n * @param {ParserOptions} options\n */\nfunction parseByTokens(tokeniser, options) {\n  const source = tokeniser.source;\n\n  function error(str) {\n    tokeniser.error(str);\n  }\n\n  function consume(...candidates) {\n    return tokeniser.consume(...candidates);\n  }\n\n  function callback() {\n    const callback = consume(\"callback\");\n    if (!callback) return;\n    if (tokeniser.probe(\"interface\")) {\n      return CallbackInterface.parse(tokeniser, callback, {\n        ...options?.extensions?.callbackInterface,\n      });\n    }\n    return CallbackFunction.parse(tokeniser, callback);\n  }\n\n  function interface_(opts) {\n    const base = consume(\"interface\");\n    if (!base) return;\n    return (\n      Mixin.parse(tokeniser, base, {\n        ...opts,\n        ...options?.extensions?.mixin,\n      }) ||\n      Interface.parse(tokeniser, base, {\n        ...opts,\n        ...options?.extensions?.interface,\n      }) ||\n      error(\"Interface has no proper body\")\n    );\n  }\n\n  function partial() {\n    const partial = consume(\"partial\");\n    if (!partial) return;\n    return (\n      Dictionary.parse(tokeniser, {\n        partial,\n        ...options?.extensions?.dictionary,\n      }) ||\n      interface_({ partial }) ||\n      Namespace.parse(tokeniser, {\n        partial,\n        ...options?.extensions?.namespace,\n      }) ||\n      error(\"Partial doesn't apply to anything\")\n    );\n  }\n\n  function definition() {\n    if (options.productions) {\n      for (const production of options.productions) {\n        const result = production(tokeniser);\n        if (result) {\n          return result;\n        }\n      }\n    }\n\n    return (\n      callback() ||\n      interface_() ||\n      partial() ||\n      Dictionary.parse(tokeniser, options?.extensions?.dictionary) ||\n      Enum.parse(tokeniser) ||\n      Typedef.parse(tokeniser) ||\n      Includes.parse(tokeniser) ||\n      Namespace.parse(tokeniser, options?.extensions?.namespace)\n    );\n  }\n\n  function definitions() {\n    if (!source.length) return [];\n    const defs = [];\n    while (true) {\n      const ea = ExtendedAttributes.parse(tokeniser);\n      const def = definition();\n      if (!def) {\n        if (ea.length) error(\"Stray extended attributes\");\n        break;\n      }\n      autoParenter(def).extAttrs = ea;\n      defs.push(def);\n    }\n    const eof = Eof.parse(tokeniser);\n    if (options.concrete) {\n      defs.push(eof);\n    }\n    return defs;\n  }\n\n  const res = definitions();\n  if (tokeniser.position < source.length) error(\"Unrecognised tokens\");\n  return res;\n}\n\n/**\n * @param {string} str\n * @param {ParserOptions} [options]\n */\nexport function parse(str, options = {}) {\n  const tokeniser = new Tokeniser(str);\n  if (typeof options.sourceName !== \"undefined\") {\n    // @ts-ignore (See Tokeniser.source in supplement.d.ts)\n    tokeniser.source.name = options.sourceName;\n  }\n  return parseByTokens(tokeniser, options);\n}\n","function noop(arg) {\n  return arg;\n}\n\nconst templates = {\n  wrap: (items) => items.join(\"\"),\n  trivia: noop,\n  name: noop,\n  reference: noop,\n  type: noop,\n  generic: noop,\n  nameless: noop,\n  inheritance: noop,\n  definition: noop,\n  extendedAttribute: noop,\n  extendedAttributeReference: noop,\n};\n\nexport class Writer {\n  constructor(ts) {\n    this.ts = Object.assign({}, templates, ts);\n  }\n\n  /**\n   * @param {string} raw\n   * @param {object} options\n   * @param {string} [options.unescaped]\n   * @param {import(\"./productions/base.js\").Base} [options.context]\n   * @returns\n   */\n  reference(raw, { unescaped, context }) {\n    if (!unescaped) {\n      unescaped = raw.startsWith(\"_\") ? raw.slice(1) : raw;\n    }\n    return this.ts.reference(raw, unescaped, context);\n  }\n\n  /**\n   * @param {import(\"./tokeniser.js\").Token} t\n   * @param {Function} wrapper\n   * @param {...any} args\n   * @returns\n   */\n  token(t, wrapper = noop, ...args) {\n    if (!t) {\n      return \"\";\n    }\n    const value = wrapper(t.value, ...args);\n    return this.ts.wrap([this.ts.trivia(t.trivia), value]);\n  }\n\n  reference_token(t, context) {\n    return this.token(t, this.reference.bind(this), { context });\n  }\n\n  name_token(t, arg) {\n    return this.token(t, this.ts.name, arg);\n  }\n\n  identifier(id, context) {\n    return this.ts.wrap([\n      this.reference_token(id.tokens.value, context),\n      this.token(id.tokens.separator),\n    ]);\n  }\n}\n\nexport function write(ast, { templates: ts = templates } = {}) {\n  ts = Object.assign({}, templates, ts);\n\n  const w = new Writer(ts);\n\n  return ts.wrap(ast.map((it) => it.write(w)));\n}\n","import { validationError as error } from \"./error.js\";\n\nfunction getMixinMap(all, unique) {\n  const map = new Map();\n  const includes = all.filter((def) => def.type === \"includes\");\n  for (const include of includes) {\n    const mixin = unique.get(include.includes);\n    if (!mixin) {\n      continue;\n    }\n    const array = map.get(include.target);\n    if (array) {\n      array.push(mixin);\n    } else {\n      map.set(include.target, [mixin]);\n    }\n  }\n  return map;\n}\n\n/**\n * @typedef {ReturnType<typeof groupDefinitions>} Definitions\n */\nfunction groupDefinitions(all) {\n  const unique = new Map();\n  const duplicates = new Set();\n  const partials = new Map();\n  for (const def of all) {\n    if (def.partial) {\n      const array = partials.get(def.name);\n      if (array) {\n        array.push(def);\n      } else {\n        partials.set(def.name, [def]);\n      }\n      continue;\n    }\n    if (!def.name) {\n      continue;\n    }\n    if (!unique.has(def.name)) {\n      unique.set(def.name, def);\n    } else {\n      duplicates.add(def);\n    }\n  }\n  return {\n    all,\n    unique,\n    partials,\n    duplicates,\n    mixinMap: getMixinMap(all, unique),\n    cache: {\n      typedefIncludesDictionary: new WeakMap(),\n      dictionaryIncludesRequiredField: new WeakMap(),\n    },\n  };\n}\n\nfunction* checkDuplicatedNames({ unique, duplicates }) {\n  for (const dup of duplicates) {\n    const { name } = dup;\n    const message = `The name \"${name}\" of type \"${\n      unique.get(name).type\n    }\" was already seen`;\n    yield error(dup.tokens.name, dup, \"no-duplicate\", message);\n  }\n}\n\nfunction* validateIterable(ast) {\n  const defs = groupDefinitions(ast);\n  for (const def of defs.all) {\n    if (def.validate) {\n      yield* def.validate(defs);\n    }\n  }\n  yield* checkDuplicatedNames(defs);\n}\n\n// Remove this once all of our support targets expose `.flat()` by default\nfunction flatten(array) {\n  if (array.flat) {\n    return array.flat();\n  }\n  return [].concat(...array);\n}\n\n/**\n * @param {import(\"./productions/base.js\").Base[]} ast\n * @return {import(\"./error.js\").WebIDLErrorData[]} validation errors\n */\nexport function validate(ast) {\n  return [...validateIterable(flatten(ast))];\n}\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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/w3c/group.js\"),\n  import(\"../src/w3c/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/w3c/style.js\"),\n  import(\"../src/core/github.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/title.js\"),\n  import(\"../src/w3c/level.js\"),\n  import(\"../src/w3c/headers.js\"),\n  import(\"../src/w3c/abstract.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/data-abbr.js\"),\n  import(\"../src/core/inlines.js\"),\n  import(\"../src/w3c/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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/tables.js\"),\n  import(\"../src/core/webidl.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/core/contrib.js\"),\n  import(\"../src/core/sections.js\"),\n  import(\"../src/core/fix-headers.js\"),\n  import(\"../src/core/webidl-index.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/w3c/seo.js\"),\n  import(\"../src/core/highlight.js\"),\n  import(\"../src/core/webidl-clipboard.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/data-type.js\"),\n  import(\"../src/core/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/custom-elements/index.js\"),\n  import(\"../src/core/web-monetization.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  import(\"../src/core/before-save.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-captionless-tables.js\"),\n  import(\"../src/core/linter-rules/no-unused-dfns.js\"),\n  import(\"../src/core/linter-rules/no-headingless-sections.js\"),\n  import(\"../src/core/linter-rules/no-unused-vars.js\"),\n  import(\"../src/w3c/linter-rules/required-sections.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  import(\"../src/core/linter-rules/informative-dfn.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 * @module w3c/group\n * The purpose of this module is to fetch and set the working group configuration details.\n */\nimport { docLink, fetchAndCache, showError } from \"../core/utils.js\";\n\nexport const name = \"w3c/group\";\n\nconst W3C_GROUPS_API = \"https://respec.org/w3c/groups/\";\n\n/**\n * Fetches the group configuration details and adds them to the document's configuration.\n * @param {Conf} conf The document configuration object.\n * @return {Promise<void>} Resolves after setting the group configuration details.\n */\nexport async function run(conf) {\n  if (!conf.group) {\n    return;\n  }\n\n  const { group } = conf;\n  const groupDetails = Array.isArray(group)\n    ? await getMultipleGroupDetails(group)\n    : await getGroupDetails(group);\n  Object.assign(conf, groupDetails);\n}\n\n/**\n * Fetches configuration details for multiple groups concurrently.\n * @param {string[]} groups An array of group identifiers.\n * @return {Promise<object>} Resolves to an object containing the configuration details for each group.\n */\nasync function getMultipleGroupDetails(groups) {\n  const details = await Promise.all(groups.map(getGroupDetails));\n  /** @type {{ [key in keyof GroupDetails]: GroupDetails[key][] }} */\n  const result = {\n    wg: [],\n    wgId: [],\n    wgURI: [],\n    wgPatentURI: [],\n    wgPatentPolicy: [],\n    groupType: [],\n  };\n  for (const groupDetails of details.filter(Boolean)) {\n    for (const key of Object.keys(result)) {\n      result[key].push(groupDetails[key]);\n    }\n  }\n  return result;\n}\n\n/**\n * Fetches configuration details for a single group.\n * @param {string} group A group identifier.\n * @return {Promise<GroupDetails|undefined>} Resolves to an object containing the group's configuration details, or undefined if the group could not be fetched.\n */\nasync function getGroupDetails(group) {\n  let type = \"\";\n  let shortname = group;\n  if (group.includes(\"/\")) {\n    [type, shortname] = group.split(\"/\", 2);\n  }\n  const url = new URL(`${shortname}/${type}`, W3C_GROUPS_API);\n  const res = await fetchAndCache(url.href);\n  if (res.ok) {\n    const json = await res.json();\n    const {\n      id: wgId,\n      name: wg,\n      patentURI: wgPatentURI,\n      patentPolicy: wgPatentPolicy,\n      type: groupType,\n      wgURI,\n    } = json;\n    return { wg, wgId, wgURI, wgPatentURI, wgPatentPolicy, groupType };\n  }\n\n  const text = await res.text();\n  let message = `Failed to fetch group details (HTTP: ${res.status}).`;\n  let hint;\n  if (res.status === 409) {\n    [message, hint] = text.split(\"\\n\", 2);\n  } else if (res.status === 404) {\n    hint = docLink`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${\"[group]\"} configuration option.`;\n  }\n  showError(message, name, { hint });\n}\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { showWarning } from \"../../core/utils.js\";\n\nconst name = \"core/templates/show-link\";\n\n/**\n * @param {object} link\n * @param {string} link.key\n * @param {string} [link.class]\n * @param {LinkData[]} [link.data]\n */\nexport default function 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    console.warn(msg, link);\n    return;\n  }\n  return html`\n    <dt class=\"${link.class ? link.class : null}\">${link.key}</dt>\n    ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n  `;\n}\n\n/**\n * @typedef {object} LinkData\n * @property {string} [LinkData.class]\n * @property {string} [LinkData.href]\n * @property {string} [LinkData.value]\n * @param {LinkData} data\n */\nfunction showLinkData(data) {\n  return html`<dd class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </dd>`;\n}\n","// @ts-check\nimport { docLink, showError } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst name = \"core/templates/show-logo\";\n\n/**\n * Logo mapper. Takes a logo structure and converts it to HTML.\n *\n * @param {object} logo\n * @param {string} logo.src\n * @param {string} logo.url\n * @param {string} logo.alt\n * @param {string} [logo.id]\n * @param {number} [logo.width]\n * @param {number} [logo.height]\n * @param {number} index\n */\nexport default function showLogo(logo, index) {\n  /** @type {HTMLAnchorElement} */\n  const a = html`<a href=\"${logo.url || null}\" class=\"logo\"\n    ><img\n      alt=\"${logo.alt || null}\"\n      crossorigin\n      height=\"${logo.height || null}\"\n      id=\"${logo.id || null}\"\n      src=\"${logo.src || null}\"\n      width=\"${logo.width || null}\"\n    />\n  </a>`;\n  if (!logo.alt) {\n    const src = logo.src ? `, with \\`src\\` ${logo.src}, ` : \"\";\n    const msg = `Logo at index ${index}${src} is missing required \"\\`alt\\`\" property.`;\n    const hint = docLink`Add the missing \"\\`alt\\`\" property describing the logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  if (!logo.src) {\n    const msg = `Logo at index ${index} is missing \"\\`src\\`\" property.`;\n    const hint = docLink`The \\`src\\` property is required on every logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  return a;\n}\n","// @ts-check\n\nconst name = \"core/templates/show-people\";\n\nimport {\n  W3CDate,\n  getIntlData,\n  isValidConfDate,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    until(date) {\n      return html` Until ${date} `;\n    },\n  },\n  es: {\n    until(date) {\n      return html` Hasta ${date} `;\n    },\n  },\n  ko: {\n    until(date) {\n      return html` ${date} 이전 `;\n    },\n  },\n  ja: {\n    until(date) {\n      return html` ${date} 以前 `;\n    },\n  },\n  de: {\n    until(date) {\n      return html` bis ${date} `;\n    },\n  },\n  zh: {\n    until(date) {\n      return html` 直到 ${date} `;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst orcidIcon = () =>\n  html`<svg\n    width=\"16\"\n    height=\"16\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 256 256\"\n  >\n    <style>\n      .st1 {\n        fill: #fff;\n      }\n    </style>\n    <path\n      d=\"M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z\"\n      fill=\"#a6ce39\"\n    />\n    <path\n      class=\"st1\"\n      d=\"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z\"\n    />\n  </svg>`;\n\n/**\n * @param {Conf} conf\n * @param {\"editors\" | \"authors\" | \"formerEditors\"} propName - the name of the property of the people to render.\n */\nexport default function showPeople(conf, propName) {\n  const people = conf[propName];\n  if (!Array.isArray(people) || !people.length) return; // nothing to show...\n\n  const validatePerson = personValidator(propName);\n  return people.filter(validatePerson).map(personToHTML);\n}\n\n/**\n * @param {Person} person\n */\nfunction personToHTML(person) {\n  // The following are treated as opt-in HTML by hyperHTML\n  // we need to deprecate this!\n  const personName = [person.name];\n  const company = [person.company];\n  const editorId = person.w3cid || null;\n  const contents = [];\n  if (person.mailto) {\n    person.url = `mailto:${person.mailto}`;\n  }\n  if (person.url) {\n    const url = new URL(person.url, document.location.href);\n    const classList =\n      url.protocol === \"mailto:\"\n        ? \"ed_mailto u-email email p-name\"\n        : \"u-url url p-name fn\";\n    contents.push(\n      html`<a class=\"${classList}\" href=\"${person.url}\">${personName}</a>`\n    );\n  } else {\n    contents.push(html`<span class=\"p-name fn\">${personName}</span>`);\n  }\n  if (person.orcid) {\n    contents.push(\n      html`<a class=\"p-name orcid\" href=\"${person.orcid}\">${orcidIcon()}</a>`\n    );\n  }\n  if (person.company) {\n    const hCard = \"p-org org h-org\";\n    const companyElem = person.companyURL\n      ? html`<a class=\"${hCard}\" href=\"${person.companyURL}\">${company}</a>`\n      : html`<span class=\"${hCard}\">${company}</span>`;\n    contents.push(html` (${companyElem})`);\n  }\n  if (person.note) {\n    contents.push(document.createTextNode(` (${person.note})`));\n  }\n  if (person.extras) {\n    contents.push(...person.extras.map(extra => html`, ${renderExtra(extra)}`));\n  }\n  const { retiredDate } = person;\n  if (person.retiredDate) {\n    const time = html`<time datetime=\"${retiredDate}\"\n      >${W3CDate.format(new Date(retiredDate))}</time\n    >`;\n    contents.push(html` - ${l10n.until(time)} `);\n  }\n  const dd = html`<dd\n    class=\"editor p-author h-card vcard\"\n    data-editor-id=\"${editorId}\"\n  >\n    ${contents}\n  </dd>`;\n  return dd;\n}\n\nfunction renderExtra(extra) {\n  const classVal = extra.class || null;\n  const { name, href } = extra;\n  return href\n    ? html`<a href=\"${href}\" class=\"${classVal}\">${name}</a>`\n    : html`<span class=\"${classVal}\">${name}</span>`;\n}\n\n/**\n *\n * @param {string} prop\n */\nfunction personValidator(prop) {\n  /**\n   * @param {Person} person\n   * @param {Number} index\n   */\n  return function validatePerson(person, index) {\n    const docsUrl = \"https://respec.org/docs/\";\n    const seePersonHint = `See [person](${docsUrl}#person) configuration for available options.`;\n    const preamble =\n      `Error processing the [person object](${docsUrl}#person) ` +\n      `at index ${index} of the \"[\\`${prop}\\`](${docsUrl}#${prop})\" configuration option.`;\n\n    if (!person.name) {\n      const msg = `${preamble} Missing required property \\`\"name\"\\`.`;\n      showError(msg, name, { hint: seePersonHint });\n      return false;\n    }\n\n    if (person.orcid) {\n      const { orcid } = person;\n      const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n\n      if (orcidUrl.origin !== \"https://orcid.org\") {\n        const msg = `${preamble} ORCID \"${person.orcid}\" at index ${index} is invalid.`;\n        const hint = `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // trailing slash would mess up checksum\n      const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n      if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n        const msg = `${preamble} ORCID \"${orcidId}\" has wrong format.`;\n        const hint = `ORCIDs have the format \"1234-1234-1234-1234.\"`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      if (!checkOrcidChecksum(orcid)) {\n        const msg = `${preamble} ORCID \"${orcid}\" failed checksum check.`;\n        const hint = \"Please check that the ORCID is valid.\";\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // canonical form\n      person.orcid = orcidUrl.href;\n    }\n\n    if (person.retiredDate && !isValidConfDate(person.retiredDate)) {\n      const msg = `${preamble} The property \"\\`retiredDate\\`\" is not a valid date.`;\n      showError(msg, name, {\n        hint: `The expected format is YYYY-MM-DD. ${seePersonHint}`,\n      });\n      return false;\n    }\n\n    if (\n      person.hasOwnProperty(\"extras\") &&\n      !validateExtras(person.extras, seePersonHint, preamble)\n    ) {\n      return false;\n    }\n\n    if (person.url && person.mailto) {\n      const msg = `${preamble} Has both \"url\" and \"mailto\" property.`;\n      showWarning(msg, name, {\n        hint: `Please choose either \"url\" or \"mailto\" (\"url\" is preferred). ${seePersonHint}`,\n      });\n    }\n\n    if (person.companyURL && !person.company) {\n      const msg = `${preamble} Has a \"\\`companyURL\\`\" property but no \"\\`company\\`\" property.`;\n      showWarning(msg, name, {\n        hint: `Please add a \"\\`company\\`\" property. ${seePersonHint}.`,\n      });\n    }\n    return true;\n  };\n}\n\n/**\n *\n * @param {PersonExtras[]} extras\n * @param {string} hint\n * @param {string} preamble\n */\nfunction validateExtras(extras, hint, preamble) {\n  if (!Array.isArray(extras)) {\n    showError(\n      `${preamble}. A person's \"extras\" member must be an array.`,\n      name,\n      { hint }\n    );\n    return false;\n  }\n  return extras.every((extra, index) => {\n    switch (true) {\n      case typeof extra !== \"object\":\n        showError(\n          `${preamble}. Member \"extra\" at index ${index} is not an object.`,\n          name,\n          {\n            hint,\n          }\n        );\n        return false;\n      case !extra.hasOwnProperty(\"name\"):\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} is missing required \"name\" member.`,\n          name,\n          { hint }\n        );\n        return false;\n      case typeof extra.name === \"string\" && extra.name.trim() === \"\":\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} \"name\" can't be empty.`,\n          name,\n          { hint }\n        );\n        return false;\n    }\n    return true;\n  });\n}\n\n/**\n * @param {string} orcid\n * @returns {boolean}\n */\nfunction checkOrcidChecksum(orcid) {\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcid[orcid.length - 1];\n  const remainder = orcid\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  return lastDigit === lastDigitShould;\n}\n","// @ts-check\nimport { ISODate, W3CDate, getIntlData } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\nimport { sub } from \"../../core/pubsubhub.js\";\n\nconst localizationStrings = {\n  en: {\n    archives: \"archives\",\n    author: \"Author:\",\n    authors: \"Authors:\",\n    commit_history: \"Commit history\",\n    edited_in_place: \"edited in place\",\n    editor: \"Editor:\",\n    editors: \"Editors:\",\n    feedback: \"Feedback:\",\n    former_editor: \"Former editor:\",\n    former_editors: \"Former editors:\",\n    history: \"History:\",\n    implementation_report: \"Implementation report:\",\n    latest_editors_draft: \"Latest editor's draft:\",\n    latest_published_version: \"Latest published version:\",\n    latest_recommendation: \"Latest Recommendation:\",\n    message_topic: \"… message topic …\",\n    more_details_about_this_doc: \"More details about this document\",\n    multiple_alternates(plural) {\n      return `This document is also available in ${\n        plural ? \"these non-normative formats\" : \"this non-normative format\"\n      }:`;\n    },\n    prev_editor_draft: \"Previous editor's draft:\",\n    prev_recommendation: \"Previous Recommendation:\",\n    prev_version: \"Previous version:\",\n    publication_history: \"Publication history\",\n    test_suite: \"Test suite:\",\n    this_version: \"This version:\",\n    with_subject_line: \"with subject line\",\n    your_topic_here: \"YOUR TOPIC HERE\",\n  },\n  ko: {\n    author: \"저자:\",\n    authors: \"저자:\",\n    editor: \"편집자:\",\n    editors: \"편집자:\",\n    former_editor: \"이전 편집자:\",\n    former_editors: \"이전 편집자:\",\n    latest_editors_draft: \"최신 편집 초안:\",\n    latest_published_version: \"최신 버전:\",\n    this_version: \"현재 버전:\",\n  },\n  zh: {\n    author: \"作者:\",\n    authors: \"作者:\",\n    commit_history: \"Git提交历史\",\n    editor: \"编辑:\",\n    editors: \"编辑:\",\n    feedback: \"反馈:\",\n    former_editor: \"原编辑:\",\n    former_editors: \"原编辑:\",\n    history: \"历史:\",\n    implementation_report: \"实现报告:\",\n    latest_editors_draft: \"最新编辑草稿:\",\n    latest_published_version: \"最新发布版本:\",\n    latest_recommendation: \"最新发布的正式推荐标准:\",\n    message_topic: \"… 邮件主题 …\",\n    prev_editor_draft: \"上一版编辑草稿:\",\n    prev_recommendation: \"上一版正式推荐标准:\",\n    prev_version: \"上一版:\",\n    test_suite: \"测试套件:\",\n    this_version: \"本版本:\",\n  },\n  ja: {\n    archives: \"アーカイブ\",\n    author: \"著者:\",\n    authors: \"著者:\",\n    commit_history: \"更新履歴\",\n    edited_in_place: \"改版なく更新\",\n    editor: \"編者:\",\n    editors: \"編者:\",\n    feedback: \"フィードバック:\",\n    former_editor: \"以前の版の編者:\",\n    former_editors: \"以前の版の編者:\",\n    history: \"履歴:\",\n    implementation_report: \"実装レポート:\",\n    latest_editors_draft: \"最新の編集用草案:\",\n    latest_published_version: \"最新バージョン:\",\n    latest_recommendation: \"最新の勧告版:\",\n    message_topic: \"… メール件名 …\",\n    more_details_about_this_doc: \"この文書についてのより詳細\",\n    prev_editor_draft: \"前回の編集用草案:\",\n    prev_recommendation: \"前回の勧告版:\",\n    prev_version: \"前回のバージョン:\",\n    publication_history: \"公表履歴\",\n    test_suite: \"テストスイート:\",\n    this_version: \"このバージョン:\",\n    with_subject_line: \"次の件名で\",\n  },\n  nl: {\n    author: \"Auteur:\",\n    authors: \"Auteurs:\",\n    editor: \"Redacteur:\",\n    editors: \"Redacteurs:\",\n    latest_editors_draft: \"Laatste werkversie:\",\n    latest_published_version: \"Laatst gepubliceerde versie:\",\n    this_version: \"Deze versie:\",\n  },\n  es: {\n    archives: \"archivos\",\n    author: \"Autor:\",\n    authors: \"Autores:\",\n    commit_history: \"Historial de cambios\",\n    edited_in_place: \"editado en lugar\",\n    editor: \"Editor:\",\n    editors: \"Editores:\",\n    feedback: \"Comentarios:\",\n    former_editor: \"Antiguo editor:\",\n    former_editors: \"Antiguos editores:\",\n    history: \"Historia:\",\n    implementation_report: \"Informe de implementación:\",\n    latest_editors_draft: \"Última versión del editor:\",\n    latest_published_version: \"Última versión publicada:\",\n    latest_recommendation: \"Recomendación más reciente:\",\n    message_topic: \"… detalles de mensaje …\",\n    more_details_about_this_doc: \"Más detalles sobre este documento:\",\n    publication_history: \"Historial de publicación\",\n    prev_editor_draft: \"Última versión del editor:\",\n    prev_recommendation: \"Última Recomendación:\",\n    prev_version: \"Última versión:\",\n    test_suite: \"Suite de pruebas:\",\n    this_version: \"Esta versión:\",\n    with_subject_line: \"con línea de asunto\",\n    your_topic_here: \"TU SUJETO AQUÍ\",\n  },\n  de: {\n    archives: \"Archiv\",\n    author: \"Autor/in:\",\n    authors: \"Autor/innen:\",\n    commit_history: \"Commit-Historie\",\n    edited_in_place: \"zuletzt geändert am\",\n    editor: \"Redaktion:\",\n    editors: \"Redaktion:\",\n    feedback: \"Feedback:\",\n    former_editor: \"Frühere Mitwirkende:\",\n    former_editors: \"Frühere Mitwirkende:\",\n    history: \"Verlauf:\",\n    implementation_report: \"Umsetzungsbericht:\",\n    latest_editors_draft: \"Letzter Entwurf:\",\n    latest_published_version: \"Letzte publizierte Fassung:\",\n    latest_recommendation: \"Aktuellste Empfehlung:\",\n    more_details_about_this_doc: \"Mehr Informationen über dieses Dokument\",\n    multiple_alternates(plural) {\n      return `Dieses Dokument ist ebenfalls in ${\n        plural\n          ? \"diesen nicht-normativen Formaten verfügbar\"\n          : \"diesem nicht-normativen Format verfügbar\"\n      }:`;\n    },\n    prev_editor_draft: \"Vorheriger Entwurf:\",\n    prev_recommendation: \"Vorherige Empfehlung:\",\n    prev_version: \"Vorherige Version:\",\n    publication_history: \"Veröffentlichungsverlauf\",\n    test_suite: \"Testumgebung:\",\n    this_version: \"Diese Fassung:\",\n  },\n};\nexport const l10n = getIntlData(localizationStrings);\n\nexport function getSpecSubTitleElem(conf) {\n  let specSubTitleElem = document.querySelector(\"h2#subtitle\");\n\n  if (specSubTitleElem && specSubTitleElem.parentElement) {\n    specSubTitleElem.remove();\n    conf.subtitle = specSubTitleElem.textContent.trim();\n  } else if (conf.subtitle) {\n    specSubTitleElem = document.createElement(\"h2\");\n    specSubTitleElem.textContent = conf.subtitle;\n    specSubTitleElem.id = \"subtitle\";\n  }\n  if (specSubTitleElem) {\n    specSubTitleElem.classList.add(\"subtitle\");\n  }\n  return specSubTitleElem;\n}\n\nexport default (conf, options) => {\n  /**\n   * After export, we let fixup.js handle the <details>.\n   */\n  sub(\"beforesave\", doc => {\n    const details = doc.querySelector(\".head details\");\n    if (details) details.open = true;\n  });\n  return html`<div class=\"head\">\n    ${conf.logos.length\n      ? html`<p class=\"logos\">${conf.logos.map(showLogo)}</p>`\n      : \"\"}\n    ${document.querySelector(\"h1#title\")} ${getSpecSubTitleElem(conf)}\n    <p id=\"w3c-state\">${renderSpecTitle(conf)}</p>\n    <details open=\"${localStorage.getItem(\"tr-metadata\") || \"true\"}\">\n      <summary>${l10n.more_details_about_this_doc}</summary>\n      <dl>\n        ${conf.thisVersion\n          ? html`<dt>${l10n.this_version}</dt>\n              <dd>\n                <a class=\"u-url\" href=\"${conf.thisVersion}\"\n                  >${conf.thisVersion}</a\n                >\n              </dd>`\n          : \"\"}\n        ${\"latestVersion\" in conf // latestVersion can be falsy\n          ? html`<dt>${l10n.latest_published_version}</dt>\n              <dd>\n                ${conf.latestVersion\n                  ? html`<a href=\"${conf.latestVersion}\"\n                      >${conf.latestVersion}</a\n                    >`\n                  : \"none\"}\n              </dd>`\n          : \"\"}\n        ${conf.edDraftURI\n          ? html`\n              <dt>${l10n.latest_editors_draft}</dt>\n              <dd><a href=\"${conf.edDraftURI}\">${conf.edDraftURI}</a></dd>\n            `\n          : \"\"}\n        ${conf.historyURI || conf.github\n          ? html`<dt>${l10n.history}</dt>\n              ${conf.historyURI\n                ? html`<dd>\n                    <a href=\"${conf.historyURI}\">${conf.historyURI}</a>\n                  </dd>`\n                : \"\"}\n              ${conf.github\n                ? html`<dd>\n                    <a href=\"${conf.github.commitHistoryURL}\"\n                      >${l10n.commit_history}</a\n                    >\n                  </dd>`\n                : \"\"}`\n          : \"\"}\n        ${conf.testSuiteURI\n          ? html`\n              <dt>${l10n.test_suite}</dt>\n              <dd><a href=\"${conf.testSuiteURI}\">${conf.testSuiteURI}</a></dd>\n            `\n          : \"\"}\n        ${conf.implementationReportURI\n          ? html`\n              <dt>${l10n.implementation_report}</dt>\n              <dd>\n                <a href=\"${conf.implementationReportURI}\"\n                  >${conf.implementationReportURI}</a\n                >\n              </dd>\n            `\n          : \"\"}\n        ${conf.prevED\n          ? html`\n              <dt>${l10n.prev_editor_draft}</dt>\n              <dd><a href=\"${conf.prevED}\">${conf.prevED}</a></dd>\n            `\n          : \"\"}\n        ${conf.showPreviousVersion\n          ? html`\n              <dt>${l10n.prev_version}</dt>\n              <dd><a href=\"${conf.prevVersion}\">${conf.prevVersion}</a></dd>\n            `\n          : \"\"}\n        ${!conf.prevRecURI\n          ? \"\"\n          : conf.isRec\n            ? html`\n                <dt>${l10n.prev_recommendation}</dt>\n                <dd><a href=\"${conf.prevRecURI}\">${conf.prevRecURI}</a></dd>\n              `\n            : html`\n                <dt>${l10n.latest_recommendation}</dt>\n                <dd><a href=\"${conf.prevRecURI}\">${conf.prevRecURI}</a></dd>\n              `}\n        ${conf.editors.length\n          ? html`\n              <dt>${conf.editors.length > 1 ? l10n.editors : l10n.editor}</dt>\n              ${showPeople(conf, \"editors\")}\n            `\n          : \"\"}\n        ${conf.formerEditors.length\n          ? html`\n              <dt>\n                ${conf.formerEditors.length > 1\n                  ? l10n.former_editors\n                  : l10n.former_editor}\n              </dt>\n              ${showPeople(conf, \"formerEditors\")}\n            `\n          : \"\"}\n        ${conf.authors.length\n          ? html`\n              <dt>${conf.authors.length > 1 ? l10n.authors : l10n.author}</dt>\n              ${showPeople(conf, \"authors\")}\n            `\n          : \"\"}\n        ${conf.github || conf.wgPublicList\n          ? html`<dt>${l10n.feedback}</dt>\n              ${renderFeedback(conf)}`\n          : \"\"}\n        ${conf.errata\n          ? html`<dt>Errata:</dt>\n              <dd><a href=\"${conf.errata}\">Errata exists</a>.</dd>`\n          : \"\"}\n        ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n      </dl>\n    </details>\n    ${conf.isRec\n      ? html`<p>\n          See also\n          <a\n            href=\"${`https://www.w3.org/Translations/?technology=${conf.shortName}`}\"\n          >\n            <strong>translations</strong></a\n          >.\n        </p>`\n      : \"\"}\n    ${conf.alternateFormats\n      ? html`<p>\n          ${l10n.multiple_alternates(options.multipleAlternates)}\n          ${options.alternatesHTML}\n        </p>`\n      : \"\"}\n    ${renderCopyright(conf)}\n    <hr title=\"Separator for header\" />\n  </div>`;\n};\n\nexport function renderFeedback(conf) {\n  const definitions = [];\n  // Github feedback...\n  if (conf.github) {\n    const { repoURL, issuesURL, newIssuesURL, pullsURL, fullName } =\n      conf.github;\n    definitions.push(\n      html`<dd>\n        <a href=\"${repoURL}\">GitHub ${fullName}</a>\n        (<a href=\"${pullsURL}\">pull requests</a>,\n        <a href=\"${newIssuesURL}\">new issue</a>,\n        <a href=\"${issuesURL}\">open issues</a>)\n      </dd>`\n    );\n  }\n\n  // The <a href=\"mailto:list?subject\"> link for the public list\n  if (conf.wgPublicList) {\n    const mailToURL = new URL(`mailto:${conf.wgPublicList}@w3.org`);\n    const subject =\n      conf.subjectPrefix ?? `[${conf.shortName}] ${l10n.your_topic_here}`;\n    const mailingListLink = html`<a\n      href=\"${mailToURL.href}?subject=${encodeURIComponent(subject)}\"\n      >${mailToURL.pathname}</a\n    >`;\n\n    // The subject line...\n    const subjectLine =\n      conf.subjectPrefix ||\n      html`[${conf.shortName}] <em>${l10n.message_topic}</em>`;\n    const emailSubject = html`${l10n.with_subject_line}${\" \"}\n      <kbd>${subjectLine}</kbd>`;\n\n    // Archives link\n    const archiveURL = new URL(\n      conf.wgPublicList,\n      \"https://lists.w3.org/Archives/Public/\"\n    );\n    const archiveLink = html`(<a href=\"${archiveURL}\" rel=\"discussion\"\n        >${l10n.archives}</a\n      >)`;\n\n    definitions.push(\n      html`<dd>${mailingListLink} ${emailSubject} ${archiveLink}</dd>`\n    );\n  }\n  return definitions;\n}\n\nfunction renderSpecTitle(conf) {\n  const specType = conf.isCR || conf.isCRY ? conf.longStatus : conf.textStatus;\n  const preamble = conf.prependW3C\n    ? html`<a href=\"https://www.w3.org/standards/types#${conf.specStatus}\"\n        >W3C ${specType}</a\n      >`\n    : html`${specType}`;\n  return html`${preamble}${\" \"}\n    <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n      >${W3CDate.format(conf.publishDate)}</time\n    >${conf.modificationDate\n      ? html`, ${l10n.edited_in_place}${\" \"}\n          <time\n            class=\"dt-modified\"\n            datetime=\"${ISODate.format(conf.modificationDate)}\"\n            >${W3CDate.format(conf.modificationDate)}</time\n          >`\n      : \"\"}`;\n}\n\n/**\n * @param { LicenseInfo } licenseInfo license information\n */\nfunction linkLicense(licenseInfo) {\n  const { url, short, name } = licenseInfo;\n  if (name === \"unlicensed\") {\n    return html`. <span class=\"issue\">THIS DOCUMENT IS UNLICENSED</span>.`;\n  }\n  return html` and\n    <a rel=\"license\" href=\"${url}\" title=\"${name}\">${short}</a> rules apply.`;\n}\n\nfunction renderCopyright(conf) {\n  // If there is already a copyright, let's relocate it.\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n    return existingCopyright;\n  }\n  if (conf.isUnofficial && conf.licenseInfo) {\n    return html`<p class=\"copyright\">\n      Copyright ©\n      ${conf.copyrightStart ? `${conf.copyrightStart}-` : \"\"}${conf.publishYear}\n      the document editors/authors.\n      ${conf.licenseInfo.name !== \"unlicensed\"\n        ? html`Text is available under the\n            <a rel=\"license\" href=\"${conf.licenseInfo.url}\"\n              >${conf.licenseInfo.name}</a\n            >; additional terms may apply.`\n        : \"\"}\n    </p>`;\n  }\n  return renderOfficialCopyright(conf);\n}\n\nfunction renderOfficialCopyright(conf) {\n  return html`<p class=\"copyright\">\n    <a href=\"https://www.w3.org/policies/#copyright\">Copyright</a>\n    ©\n    ${conf.copyrightStart ? `${conf.copyrightStart}-` : \"\"}${conf.publishYear}\n    ${conf.additionalCopyrightHolders\n      ? html` ${[conf.additionalCopyrightHolders]} & `\n      : \"\"}\n    <a href=\"https://www.w3.org/\">World Wide Web Consortium</a>.\n    <abbr title=\"World Wide Web Consortium\">W3C</abbr><sup>®</sup>\n    <a href=\"https://www.w3.org/policies/#Legal_Disclaimer\">liability</a>,\n    <a href=\"https://www.w3.org/policies/#W3C_Trademarks\">trademark</a\n    >${linkLicense(conf.licenseInfo)}\n  </p>`;\n}\n","// @ts-check\nimport { getSpecSubTitleElem, l10n, renderFeedback } from \"./headers.js\";\nimport { W3CDate } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\n\nexport default (conf, options) => {\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n  }\n\n  const specTitleElem = document.querySelector(\"h1#title\");\n  const specTitleElemClone = specTitleElem.cloneNode(true);\n\n  return html`<div class=\"head\">\n    ${conf.logos.length\n      ? html`<p class=\"logos\">${conf.logos.map(showLogo)}</p>`\n      : \"\"}\n    ${specTitleElem} ${getSpecSubTitleElem(conf)}\n    <p id=\"w3c-state\">\n      <a href=\"https://www.w3.org/standards/types#reports\"\n        >${conf.longStatus}</a\n      >\n      <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n        >${W3CDate.format(conf.publishDate)}</time\n      >\n    </p>\n    <dl>\n      ${conf.thisVersion\n        ? html`<dt>${l10n.this_version}</dt>\n            <dd>\n              <a class=\"u-url\" href=\"${conf.thisVersion}\"\n                >${conf.thisVersion}</a\n              >\n            </dd>`\n        : \"\"}\n      ${\"latestVersion\" in conf // latestVersion can be falsy\n        ? html`<dt>${l10n.latest_published_version}</dt>\n            <dd>\n              ${conf.latestVersion\n                ? html`<a href=\"${conf.latestVersion}\"\n                    >${conf.latestVersion}</a\n                  >`\n                : \"none\"}\n            </dd>`\n        : \"\"}\n      ${conf.edDraftURI\n        ? html`\n            <dt>${l10n.latest_editors_draft}</dt>\n            <dd><a href=\"${conf.edDraftURI}\">${conf.edDraftURI}</a></dd>\n          `\n        : \"\"}\n      ${conf.testSuiteURI\n        ? html`\n            <dt>Test suite:</dt>\n            <dd><a href=\"${conf.testSuiteURI}\">${conf.testSuiteURI}</a></dd>\n          `\n        : \"\"}\n      ${conf.implementationReportURI\n        ? html`\n            <dt>Implementation report:</dt>\n            <dd>\n              <a href=\"${conf.implementationReportURI}\"\n                >${conf.implementationReportURI}</a\n              >\n            </dd>\n          `\n        : \"\"}\n      ${conf.prevVersion\n        ? html`\n            <dt>Previous version:</dt>\n            <dd><a href=\"${conf.prevVersion}\">${conf.prevVersion}</a></dd>\n          `\n        : \"\"}\n      ${!conf.isCGFinal\n        ? html`\n            ${conf.prevED\n              ? html`\n                  <dt>Previous editor's draft:</dt>\n                  <dd><a href=\"${conf.prevED}\">${conf.prevED}</a></dd>\n                `\n              : \"\"}\n          `\n        : \"\"}\n      ${conf.editors.length\n        ? html`\n            <dt>${conf.editors.length > 1 ? l10n.editors : l10n.editor}</dt>\n            ${showPeople(conf, \"editors\")}\n          `\n        : \"\"}\n      ${conf.formerEditors.length\n        ? html`\n            <dt>\n              ${conf.formerEditors.length > 1\n                ? l10n.former_editors\n                : l10n.former_editor}\n            </dt>\n            ${showPeople(conf, \"formerEditors\")}\n          `\n        : \"\"}\n      ${conf.authors.length\n        ? html`\n            <dt>${conf.authors.length > 1 ? l10n.authors : l10n.author}</dt>\n            ${showPeople(conf, \"authors\")}\n          `\n        : \"\"}\n      ${conf.github || conf.wgPublicList\n        ? html`<dt>${l10n.feedback}</dt>\n            ${renderFeedback(conf)}`\n        : \"\"}\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </dl>\n    ${conf.alternateFormats\n      ? html`<p>\n          ${options.multipleAlternates\n            ? \"This document is also available in these non-normative formats:\"\n            : \"This document is also available in this non-normative format:\"}\n          ${options.alternatesHTML}\n        </p>`\n      : \"\"}\n    ${existingCopyright\n      ? existingCopyright\n      : html`<p class=\"copyright\">\n          <a href=\"https://www.w3.org/policies/#copyright\">Copyright</a>\n          ©\n          ${conf.copyrightStart\n            ? `${conf.copyrightStart}-`\n            : \"\"}${conf.publishYear}\n          ${conf.additionalCopyrightHolders\n            ? html` ${[conf.additionalCopyrightHolders]} & `\n            : \"\"}\n          the Contributors to the ${specTitleElemClone.childNodes}\n          Specification, published by the\n          <a href=\"${conf.wgURI}\">${conf.wg}</a> under the\n          ${conf.isCGFinal\n            ? html`\n                <a href=\"https://www.w3.org/community/about/agreements/fsa/\"\n                  >W3C Community Final Specification Agreement (FSA)</a\n                >. A human-readable\n                <a\n                  href=\"https://www.w3.org/community/about/agreements/fsa-deed/\"\n                  >summary</a\n                >\n                is available.\n              `\n            : html`\n                <a href=\"https://www.w3.org/community/about/agreements/cla/\"\n                  >W3C Community Contributor License Agreement (CLA)</a\n                >. A human-readable\n                <a\n                  href=\"https://www.w3.org/community/about/agreements/cla-deed/\"\n                  >summary</a\n                >\n                is available.\n              `}\n        </p>`}\n    <hr title=\"Separator for header\" />\n  </div>`;\n};\n","// @ts-check\nimport { W3CDate, getIntlData, htmlJoinAnd } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { status2track } from \"../headers.js\";\nconst localizationStrings = {\n  en: {\n    sotd: \"Status of This Document\",\n    status_at_publication: html`This section describes the status of this\n      document at the time of its publication. A list of current W3C\n      publications and the latest revision of this technical report can be found\n      in the <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> at\n      https://www.w3.org/TR/.`,\n  },\n  ko: {\n    sotd: \"현재 문서의 상태\",\n    status_at_publication: html`이 부분은 현재 문서의 발행 당시 상태에 대해\n      기술합니다. W3C 발행 문서의 최신 목록 및 테크니컬 리포트 최신판을\n      https://www.w3.org/TR/ 의\n      <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> 에서\n      열람할 수 있습니다.`,\n  },\n  zh: {\n    sotd: \"关于本文档\",\n    // eslint-disable-next-line prettier/prettier\n    status_at_publication: html`本章节描述了本文档的发布状态。W3C的文档列表和最新版本可通过<a\n        href=\"https://www.w3.org/TR/\"\n        >W3C技术报告</a\n      >索引访问。`,\n  },\n  ja: {\n    sotd: \"この文書の位置付け\",\n    status_at_publication: html`この節には、公開時点でのこの文書の位置づけが記されている。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。\n      <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a>\n      (https://www.w3.org/TR/)`,\n  },\n  nl: {\n    sotd: \"Status van dit document\",\n  },\n  es: {\n    sotd: \"Estado de este Document\",\n    status_at_publication: html`Esta sección describe el estado del presente\n      documento al momento de su publicación. Una lista de las publicaciones\n      actuales del W3C y la última revisión del presente informe técnico puede\n      hallarse en http://www.w3.org/TR/\n      <a href=\"https://www.w3.org/TR/\">el índice de informes técnicos</a> del\n      W3C.`,\n  },\n  de: {\n    sotd: \"Status dieses Dokuments\",\n    status_at_publication: html`Dieser Abschnitt beschreibt den Status des\n      Dokuments zum Zeitpunkt der Publikation. Eine Liste der aktuellen\n      Publikatinen des W3C und die aktuellste Fassung dieser Spezifikation kann\n      im <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> unter\n      https://www.w3.org/TR/ abgerufen werden.`,\n  },\n};\n\nexport const l10n = getIntlData(localizationStrings);\n\nconst processLink = \"https://www.w3.org/policies/process/20231103/\";\n\nfunction prefix(word) {\n  return /^[aeiou]/i.test(word) ? `an ${word}` : `a ${word}`;\n}\n\nexport default (conf, opts) => {\n  return html`\n    <h2>${l10n.sotd}</h2>\n    ${conf.isPreview ? renderPreview(conf) : \"\"}\n    ${conf.isUnofficial\n      ? renderIsUnofficial(opts)\n      : conf.isTagFinding\n        ? opts.additionalContent\n        : conf.isNoTrack\n          ? renderIsNoTrack(conf, opts)\n          : html`\n              <p><em>${l10n.status_at_publication}</em></p>\n              ${conf.isMemberSubmission\n                ? noteForSubmission(conf, opts)\n                : html`\n                    ${!conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n                    ${!conf.overrideStatus\n                      ? html` ${linkToWorkingGroup(conf)} `\n                      : \"\"}\n                    ${conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n                    ${conf.isRec ? renderIsRec(conf) : renderNotRec(conf)}\n                    ${renderDeliverer(conf)}\n                    <p>\n                      This document is governed by the\n                      <a id=\"w3c_process_revision\" href=\"${processLink}\"\n                        >03 November 2023 W3C Process Document</a\n                      >.\n                    </p>\n                  `}\n            `}\n    ${opts.additionalSections}\n  `;\n};\n\nexport function renderPreview(conf) {\n  const { prUrl, prNumber, edDraftURI } = conf;\n  return html`<details class=\"annoying-warning\" open=\"\">\n    <summary>\n      This is a\n      preview${prUrl && prNumber\n        ? html`\n            of pull request\n            <a href=\"${prUrl}\">#${prNumber}</a>\n          `\n        : \"\"}\n    </summary>\n    <p>\n      Do not attempt to implement this version of the specification. Do not\n      reference this version as authoritative in any way.\n      ${edDraftURI\n        ? html`\n            Instead, see\n            <a href=\"${edDraftURI}\">${edDraftURI}</a> for the Editor's draft.\n          `\n        : \"\"}\n    </p>\n  </details>`;\n}\n\nfunction renderIsUnofficial(opts) {\n  const { additionalContent } = opts;\n  return html`\n    <p>\n      This document is a draft of a potential specification. It has no official\n      standing of any kind and does not represent the support or consensus of\n      any standards organization.\n    </p>\n    ${additionalContent}\n  `;\n}\n\nfunction renderIsNoTrack(conf, opts) {\n  const { isMO } = conf;\n  const { additionalContent } = opts;\n  return html`\n    <p>\n      This document is merely a W3C-internal\n      ${isMO ? \"member-confidential\" : \"\"} document. It has no official standing\n      of any kind and does not represent consensus of the W3C Membership.\n    </p>\n    ${additionalContent}\n  `;\n}\n\nfunction renderNotRec(conf) {\n  const updatableRec = document.querySelector(\"#sotd.updateable-rec\");\n  let statusExplanation = null;\n  let reviewPolicy = null;\n  let endorsement = html`Publication as ${prefix(conf.textStatus)} does not\n  imply endorsement by W3C and its Members.`;\n  let updatePolicy = html`<p>\n    This is a draft document and may be updated, replaced or obsoleted by other\n    documents at any time. It is inappropriate to cite this document as other\n    than work in progress.\n    ${updatableRec\n      ? html`Future updates to this specification may incorporate\n          <a href=\"${processLink}#allow-new-features\">new features</a>.`\n      : \"\"}\n  </p>`;\n  if (conf.specStatus === \"DISC\") {\n    updatePolicy = html`<p>\n      Publication as a Discontinued Draft implies that this document is no\n      longer intended to advance or to be maintained. It is inappropriate to\n      cite this document as other than abandoned work.\n    </p>`;\n  }\n  const lsUpdatePolicy = html`<p>\n    This document is maintained and updated at any time. Some parts of this\n    document are work in progress.\n  </p>`;\n  switch (conf.specStatus) {\n    case \"STMT\":\n      endorsement = html`<p>\n        A W3C Statement is a specification that, after extensive\n        consensus-building, has received the endorsement of the\n        <abbr title=\"World Wide Web Consortium\">W3C</abbr> and its Members.\n      </p>`;\n      break;\n    case \"RY\":\n      endorsement = html`<p>W3C recommends the wide usage of this registry.</p>\n        <p>\n          A W3C Registry is a specification that, after extensive\n          consensus-building, has received the endorsement of the\n          <abbr title=\"World Wide Web Consortium\">W3C</abbr> and its Members.\n        </p>`;\n      break;\n    case \"CRD\":\n      statusExplanation = html`A Candidate Recommendation Draft integrates\n      changes from the previous Candidate Recommendation that the Working Group\n      intends to include in a subsequent Candidate Recommendation Snapshot.`;\n      if (conf.pubMode === \"LS\") {\n        updatePolicy = lsUpdatePolicy;\n      }\n      break;\n    case \"CRYD\":\n      statusExplanation = html`A Candidate Registry Draft integrates changes\n      from the previous Candidate Registry Snapshot that the Working Group\n      intends to include in a subsequent Candidate Registry Snapshot.`;\n      if (conf.pubMode === \"LS\") {\n        updatePolicy = lsUpdatePolicy;\n      }\n      break;\n    case \"CRY\":\n      statusExplanation = html`A Candidate Registry Snapshot has received\n        <a href=\"${processLink}#dfn-wide-review\">wide review</a>.`;\n      reviewPolicy = html`<p>\n        The W3C Membership and other interested parties are invited to review\n        the document and send comments through ${conf.humanPREnd}. Advisory\n        Committee Representatives should consult their\n        <a href=\"https://www.w3.org/2002/09/wbs/myQuestionnaires\"\n          >WBS questionnaires</a\n        >. Note that substantive technical comments were expected during the\n        Candidate Recommendation review period that ended ${conf.humanCREnd}.\n      </p>`;\n      break;\n    case \"CR\":\n      statusExplanation = html`A Candidate Recommendation Snapshot has received\n        <a href=\"${processLink}#dfn-wide-review\">wide review</a>, is intended to\n        gather\n        <a href=\"${conf.implementationReportURI}\">implementation experience</a>,\n        and has commitments from Working Group members to\n        <a href=\"https://www.w3.org/policies/patent-policy/#sec-Requirements\"\n          >royalty-free licensing</a\n        >\n        for implementations.`;\n      updatePolicy = html`${updatableRec\n        ? html`Future updates to this specification may incorporate\n            <a href=\"${processLink}#allow-new-features\">new features</a>.`\n        : \"\"}`;\n      if (conf.pubMode === \"LS\") {\n        reviewPolicy = html`<p>\n          Comments are welcome at any time but most especially before\n          ${W3CDate.format(conf.crEnd)}.\n        </p>`;\n      } else {\n        reviewPolicy = html`<p>\n          This Candidate Recommendation is not expected to advance to Proposed\n          Recommendation any earlier than ${W3CDate.format(conf.crEnd)}.\n        </p>`;\n      }\n      break;\n    case \"PR\":\n      reviewPolicy = html`<p>\n        The W3C Membership and other interested parties are invited to review\n        the document and send comments through ${W3CDate.format(conf.prEnd)}.\n        Advisory Committee Representatives should consult their\n        <a href=\"https://www.w3.org/2002/09/wbs/myQuestionnaires\"\n          >WBS questionnaires</a\n        >. Note that substantive technical comments were expected during the\n        Candidate Recommendation review period that ended\n        ${W3CDate.format(conf.crEnd)}.\n      </p>`;\n      break;\n    case \"DNOTE\":\n      endorsement = html`${conf.textStatus}s are not endorsed by\n        <abbr title=\"World Wide Web Consortium\">W3C</abbr> nor its Members.`;\n      break;\n    case \"NOTE\":\n      endorsement = html`This ${conf.textStatus} is endorsed by\n        ${getWgHTML(conf)}, but is not endorsed by\n        <abbr title=\"World Wide Web Consortium\">W3C</abbr> itself nor its\n        Members.`;\n      break;\n  }\n  return html`<p>${endorsement} ${statusExplanation}</p>\n    ${updatePolicy} ${reviewPolicy}`;\n}\n\nfunction renderIsRec(conf) {\n  const { revisedRecEnd } = conf;\n  const updatableRec = document.querySelector(\"#sotd.updateable-rec\");\n  let reviewTarget = \"\";\n  if (document.querySelector(\".proposed-addition\")) {\n    reviewTarget = \"additions\";\n  } else if (document.querySelector(\".proposed-correction\")) {\n    reviewTarget = \"corrections\";\n  }\n  return html`\n    <p>\n      W3C recommends the wide deployment of this specification as a standard for\n      the Web.\n    </p>\n\n    <p>\n      A W3C Recommendation is a specification that, after extensive\n      consensus-building, is endorsed by\n      <abbr title=\"World Wide Web Consortium\">W3C</abbr> and its Members, and\n      has commitments from Working Group members to\n      <a href=\"https://www.w3.org/policies/patent-policy/#sec-Requirements\"\n        >royalty-free licensing</a\n      >\n      for implementations.\n      ${updatableRec\n        ? html`Future updates to this Recommendation may incorporate\n            <a href=\"${processLink}#allow-new-features\">new features</a>.`\n        : \"\"}\n    </p>\n    ${document.querySelector(\".addition\")\n      ? html`<p class=\"addition\">\n          Candidate additions are marked in the document.\n        </p>`\n      : \"\"}\n    ${document.querySelector(\".correction\")\n      ? html`<p class=\"correction\">\n          Candidate corrections are marked in the document.\n        </p>`\n      : \"\"}\n    ${document.querySelector(\".proposed-addition\")\n      ? html`<p class=\"addition proposed\">\n          Proposed additions are marked in the document.\n        </p>`\n      : \"\"}\n    ${document.querySelector(\".proposed-correction\")\n      ? html`<p class=\"correction proposed\">\n          Proposed corrections are marked in the document.\n        </p>`\n      : \"\"}\n    ${reviewTarget\n      ? html`<p>\n          The W3C Membership and other interested parties are invited to review\n          the proposed ${reviewTarget} and send comments through\n          ${W3CDate.format(revisedRecEnd)}. Advisory Committee Representatives\n          should consult their\n          <a href=\"https://www.w3.org/2002/09/wbs/myQuestionnaires\"\n            >WBS questionnaires</a\n          >.\n        </p>`\n      : \"\"}\n  `;\n}\n\nfunction renderDeliverer(conf) {\n  const {\n    isNote,\n    isRegistry,\n    wgId,\n    multipleWGs,\n    wgPatentHTML,\n    wgPatentURI,\n    wgPatentPolicy,\n  } = conf;\n\n  const patentPolicyURL =\n    wgPatentPolicy === \"PP2017\"\n      ? \"https://www.w3.org/Consortium/Patent-Policy-20170801/\"\n      : \"https://www.w3.org/policies/patent-policy/\";\n\n  const producers = !(isNote || isRegistry)\n    ? html`\n        This document was produced by ${multipleWGs ? \"groups\" : \"a group\"}\n        operating under the\n        <a href=\"${patentPolicyURL}\"\n          >${wgPatentPolicy === \"PP2017\" ? \"1 August 2017 \" : \"\"}W3C Patent\n          Policy</a\n        >.\n      `\n    : html`\n        The\n        <a href=\"${patentPolicyURL}\"\n          >${wgPatentPolicy === \"PP2017\" ? \"1 August 2017 \" : \"\"}W3C Patent\n          Policy</a\n        >\n        does not carry any licensing requirements or commitments on this\n        document.\n      `;\n  return html`<p data-deliverer=\"${isNote || isRegistry ? wgId : null}\">\n    ${producers}\n    ${!(isNote || isRegistry)\n      ? html`\n          ${multipleWGs\n            ? html` W3C maintains ${wgPatentHTML} `\n            : html`\n                W3C maintains a\n                <a href=\"${[wgPatentURI]}\" rel=\"disclosure\"\n                  >public list of any patent disclosures</a\n                >\n              `}\n          made in connection with the deliverables of\n          ${multipleWGs\n            ? \"each group; these pages also include\"\n            : \"the group; that page also includes\"}\n          instructions for disclosing a patent. An individual who has actual\n          knowledge of a patent which the individual believes contains\n          <a href=\"${patentPolicyURL}#def-essential\">Essential Claim(s)</a>\n          must disclose the information in accordance with\n          <a href=\"${patentPolicyURL}#sec-Disclosure\"\n            >section 6 of the W3C Patent Policy</a\n          >.\n        `\n      : \"\"}\n  </p>`;\n}\n\nfunction noteForSubmission(conf, opts) {\n  return html`\n    ${opts.additionalContent}\n    ${conf.isMemberSubmission ? noteForMemberSubmission(conf) : \"\"}\n  `;\n}\n\nfunction noteForMemberSubmission(conf) {\n  const teamComment = `https://www.w3.org/Submission/${conf.publishDate.getUTCFullYear()}/${\n    conf.submissionCommentNumber\n  }/Comment/`;\n\n  const patentPolicyURL =\n    conf.wgPatentPolicy === \"PP2017\"\n      ? \"https://www.w3.org/Consortium/Patent-Policy-20170801/\"\n      : \"https://www.w3.org/policies/patent-policy/\";\n\n  return html`<p>\n    By publishing this document, W3C acknowledges that the\n    <a href=\"${conf.thisVersion}\">Submitting Members</a> have made a formal\n    Submission request to W3C for discussion. Publication of this document by\n    W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or\n    will be allocating any resources to the issues addressed by it. This\n    document is not the product of a chartered W3C group, but is published as\n    potential input to the\n    <a href=\"https://www.w3.org/policies/process/\">W3C Process</a>. A\n    <a href=\"${teamComment}\">W3C Team Comment</a> has been published in\n    conjunction with this Member Submission. Publication of acknowledged Member\n    Submissions at the W3C site is one of the benefits of\n    <a href=\"https://www.w3.org/Consortium/Prospectus/Joining\">\n      W3C Membership</a\n    >. Please consult the requirements associated with Member Submissions of\n    <a href=\"${patentPolicyURL}#sec-submissions\"\n      >section 3.3 of the W3C Patent Policy</a\n    >. Please consult the complete\n    <a href=\"https://www.w3.org/Submission\"\n      >list of acknowledged W3C Member Submissions</a\n    >.\n  </p>`;\n}\n\nexport function renderPublicList(conf, opts) {\n  const { mailToWGPublicListWithSubject, mailToWGPublicListSubscription } =\n    opts;\n  const { wgPublicList, subjectPrefix } = conf;\n  const archivesURL = `https://lists.w3.org/Archives/Public/${wgPublicList}/`;\n  return html`<p>\n    If you wish to make comments regarding this document, please send them to\n    <a href=\"${mailToWGPublicListWithSubject}\">${wgPublicList}@w3.org</a>\n    (<a href=\"${mailToWGPublicListSubscription}\">subscribe</a>,\n    <a href=\"${archivesURL}\">archives</a>)${subjectPrefix\n      ? html` with <code>${subjectPrefix}</code> at the start of your email's\n          subject`\n      : \"\"}.\n  </p>`;\n}\n\nfunction linkToWorkingGroup(conf) {\n  if (!conf.wg) {\n    return;\n  }\n  let changes = null;\n  const proposedAdditions = document.querySelector(\".proposed-addition\");\n  const proposedCorrections = document.querySelector(\".proposed-correction\");\n  const additions = document.querySelector(\".addition\");\n  const corrections = document.querySelector(\".correction\");\n  const hasRevisions =\n    proposedAdditions || proposedCorrections || additions || corrections;\n  if (conf.isRec && hasRevisions) {\n    if (\n      (proposedAdditions && proposedCorrections) ||\n      (additions && corrections)\n    ) {\n      changes = html`It includes\n      ${proposedAdditions\n        ? html`<a href=\"${processLink}#proposed-amendments\">\n            proposed amendments</a\n          >`\n        : html`<a href=\"${processLink}#candidate-amendments\">\n            candidate amendments</a\n          >`},\n      introducing substantive changes and new features since the previous\n      Recommendation.`;\n    } else if (proposedAdditions || additions) {\n      changes = html`It includes\n      ${proposedAdditions\n        ? html`<a href=\"${processLink}#proposed-addition\">\n            proposed additions</a\n          >`\n        : html`<a href=\"${processLink}#candidate-addition\">\n            candidate additions</a\n          >`},\n      introducing new features since the previous Recommendation.`;\n    } else if (proposedCorrections || corrections) {\n      changes = html`It includes\n      ${proposedCorrections\n        ? html`<a href=\"${processLink}#proposed-correction\">\n            proposed corrections</a\n          >`\n        : html`<a href=\"${processLink}#candidate-correction\">\n            candidate corrections</a\n          >`}.`;\n    }\n  }\n  const track = status2track[conf.specStatus]\n    ? html` using the\n        <a href=\"${processLink}#recs-and-notes\"\n          >${status2track[conf.specStatus]} track</a\n        >`\n    : \"\";\n  return html`<p>\n    This document was published by ${getWgHTML(conf)} as\n    ${prefix(conf.longStatus)}${track}. ${changes}\n  </p>`;\n}\n\nfunction getWgHTML(conf) {\n  if (Array.isArray(conf.wg)) {\n    return htmlJoinAnd(conf.wg, (wg, idx) => {\n      return html`the <a href=\"${conf.wgURI[idx]}\">${wg}</a>`;\n    });\n  } else if (conf.wg) {\n    return html`the <a href=\"${conf.wgURI}\">${conf.wg}</a>`;\n  }\n}\n\nexport function linkToCommunity(conf, opts) {\n  if (!conf.github && !conf.wgPublicList) {\n    return;\n  }\n  return html`<p>\n    ${conf.github\n      ? html`\n          <a href=\"${conf.issueBase}\">GitHub Issues</a> are preferred for\n          discussion of this specification.\n        `\n      : \"\"}\n    ${conf.wgPublicList\n      ? html`\n          ${conf.github && conf.wgPublicList\n            ? \"Alternatively, you can send comments to our mailing list.\"\n            : \"Comments regarding this document are welcome.\"}\n          Please send them to\n          <a href=\"${opts.mailToWGPublicListWithSubject}\"\n            >${conf.wgPublicList}@w3.org</a\n          >\n          (<a href=\"${opts.mailToWGPublicListSubscription}\">subscribe</a>,\n          <a\n            href=\"${`https://lists.w3.org/Archives/Public/${conf.wgPublicList}/`}\"\n            >archives</a\n          >)${conf.subjectPrefix\n            ? html` with <code>${conf.subjectPrefix}</code> at the start of your\n                email's subject`\n            : \"\"}.\n        `\n      : \"\"}\n  </p>`;\n}\n","// @ts-check\nimport {\n  l10n,\n  linkToCommunity,\n  renderPreview,\n  renderPublicList,\n} from \"./sotd.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nexport default (conf, opts) => {\n  return html`\n    <h2>${l10n.sotd}</h2>\n    ${conf.isPreview ? renderPreview(conf) : \"\"}\n    <p>\n      This specification was published by the\n      <a href=\"${conf.wgURI}\">${conf.wg}</a>. It is not a W3C Standard nor is it\n      on the W3C Standards Track.\n      ${conf.isCGFinal\n        ? html`\n            Please note that under the\n            <a href=\"https://www.w3.org/community/about/agreements/final/\"\n              >W3C Community Final Specification Agreement (FSA)</a\n            >\n            other conditions apply.\n          `\n        : html`\n            Please note that under the\n            <a href=\"https://www.w3.org/community/about/agreements/cla/\"\n              >W3C Community Contributor License Agreement (CLA)</a\n            >\n            there is a limited opt-out and other conditions apply.\n          `}\n      Learn more about\n      <a href=\"https://www.w3.org/community/\"\n        >W3C Community and Business Groups</a\n      >.\n    </p>\n    ${!conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n    ${!conf.github && conf.wgPublicList ? renderPublicList(conf, opts) : \"\"}\n    ${conf.github ? linkToCommunity(conf, opts) : \"\"}\n    ${conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n    ${opts.additionalSections}\n  `;\n};\n","// @ts-check\n// Module w3c/headers\n// Generate the headers material based on the provided configuration.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n//  - shortName: the small name that is used after /TR/ in published reports (required)\n//  - editors: an array of people editing the document (at least one is required). People\n//      are defined using:\n//          - name: the person's name (required)\n//          - url: URI for the person's home page\n//          - company: the person's company\n//          - companyURL: the URI for the person's company\n//          - mailto: the person's email\n//          - note: a note on the person (e.g. former editor)\n//  - authors: an array of people who are contributing authors of the document.\n//  - formerEditors: an array of people that had earlier edited the document but no longer edit.\n//  - subtitle: a subtitle for the specification\n//  - publishDate: the date to use for the publication, default to document.lastModified, and\n//      failing that to now. The format is YYYY-MM-DD or a Date object.\n//  - previousPublishDate: the date on which the previous version was published.\n//  - previousMaturity: the specStatus of the previous version\n//  - errata: the URI of the errata document, if any\n//  - alternateFormats: a list of alternate formats for the document, each of which being\n//      defined by:\n//          - uri: the URI to the alternate\n//          - label: a label for the alternate\n//          - lang: optional language\n//          - type: optional MIME type\n//  - logos: a list of logos to use instead of the W3C logo, each of which being defined by:\n//          - src: the URI to the logo (target of <img src=>)\n//          - alt: alternate text for the image (<img alt=>), defaults to \"Logo\" or \"Logo 1\", \"Logo 2\", ...\n//            if src is not specified, this is the text of the \"logo\"\n//          - height: optional height of the logo (<img height=>)\n//          - width: optional width of the logo (<img width=>)\n//          - url: the URI to the organization represented by the logo (target of <a href=>)\n//          - id: optional id for the logo, permits custom CSS (wraps logo in <span id=>)\n//          - each logo element must specify either src or alt\n//  - testSuiteURI: the URI to the test suite, if any\n//  - implementationReportURI: the URI to the implementation report, if any\n//  - noRecTrack: set to true if this document is not intended to be on the Recommendation track\n//  - edDraftURI: the URI of the Editor's Draft for this document, if any. Required if\n//      specStatus is set to \"ED\".\n//  - additionalCopyrightHolders: a copyright owner in addition to W3C (or the only one if specStatus\n//      is unofficial)\n//  - copyrightStart: the year from which the copyright starts running\n//  - prevED: the URI of the previous Editor's Draft if it has moved\n//  - prevRecShortname: the short name of the previous Recommendation, if the name has changed\n//  - prevRecURI: the URI of the previous Recommendation if not directly generated from\n//    prevRecShortname.\n//  - wg: the name of the WG in charge of the document. This may be an array in which case wgURI\n//      and wgPatentURI need to be arrays as well, of the same length and in the same order\n//  - wgURI: the URI to the group's page, or an array of such\n//  - wgPatentURI: the URI to the group's patent information page, or an array of such. NOTE: this\n//      is VERY IMPORTANT information to provide and get right, do not just paste this without checking\n//      that you're doing it right\n//  - wgPublicList: the name of the mailing list where discussion takes place. Note that this cannot\n//      be an array as it is assumed that there is a single list to discuss the document, even if it\n//      is handled by multiple groups\n//  - charterDisclosureURI: used for IGs (when publishing IG-NOTEs) to provide a link to the IPR commitment\n//      defined in their charter.\n//  - thisVersion: the URI to the dated current version of the specification. ONLY ever use this for CG/BG\n//      documents, for all others it is autogenerated.\n//  - latestVersion: the URI to the latest version of the specification.\n//  - prevVersion: the URI to the previous (dated) version of the specification. ONLY ever use this for CG/BG\n//      documents, for all others it is autogenerated.\n//  - subjectPrefix: the string that is expected to be used as a subject prefix when posting to the mailing\n//      list of the group.\n//  - otherLinks: an array of other links that you might want in the header (e.g., link github, twitter, etc).\n//         Example of usage: [{key: \"foo\", href:\"https://b\"}, {key: \"bar\", href:\"https://\"}].\n//         Allowed values are:\n//          - key: the key for the <dt> (e.g., \"Bug Tracker\"). Required.\n//          - value: The value that will appear in the <dd> (e.g., \"GitHub\"). Optional.\n//          - href: a URL for the value (e.g., \"https://foo.com/issues\"). Optional.\n//          - class: a string representing CSS classes. Optional.\n//  - license: can be one of the following\n//      - \"cc-by\", which is experimentally available in some groups (but likely to be phased out).\n//          Note that this is a dual licensing regime.\n//      - \"document\", which is the old, but still available, document license.\n//      - \"dual\", dual license.\n//      - \"cc0\", an extremely permissive license. It is only recommended if you are working on a document that is\n//          intended to be pushed to the WHATWG.\n//      - \"w3c-software\", a permissive and attributions license (but GPL-compatible).\n//      - \"w3c-software-doc\", (default) the W3C Software and Document License\n//            https://www.w3.org/copyright/software-license-2023/\nimport {\n  ISODate,\n  codedJoinAnd,\n  codedJoinOr,\n  concatDate,\n  docLink,\n  htmlJoinAnd,\n  norm,\n  showError,\n  showWarning,\n} from \"../core/utils.js\";\nimport cgbgHeadersTmpl from \"./templates/cgbg-headers.js\";\nimport cgbgSotdTmpl from \"./templates/cgbg-sotd.js\";\nimport headersTmpl from \"./templates/headers.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { pub } from \"../core/pubsubhub.js\";\nimport sotdTmpl from \"./templates/sotd.js\";\n\nexport const name = \"w3c/headers\";\n\n/**\n * Resolves against https://www.w3.org.\n * @param {string} href\n */\nfunction w3Url(href) {\n  return new URL(href, \"https://www.w3.org/\").href;\n}\n\nconst status2maturity = {\n  LS: \"WD\",\n  LD: \"WD\",\n  FPWD: \"WD\",\n  \"Member-SUBM\": \"SUBM\",\n};\n\nexport const status2text = {\n  DNOTE: \"Group Draft Note\",\n  NOTE: \"Group Note\",\n  STMT: \"Statement\",\n  \"Member-SUBM\": \"Member Submission\",\n  MO: \"Member-Only Document\",\n  ED: \"Editor's Draft\",\n  LS: \"Living Standard\",\n  LD: \"Living Document\",\n  FPWD: \"First Public Working Draft\",\n  WD: \"Working Draft\",\n  CR: \"Candidate Recommendation\",\n  CRD: \"Candidate Recommendation\",\n  PR: \"Proposed Recommendation\",\n  REC: \"Recommendation\",\n  DISC: \"Discontinued Draft\",\n  RSCND: \"Rescinded Recommendation\",\n  DRY: \"Draft Registry\",\n  CRYD: \"Candidate Registry\",\n  CRY: \"Candidate Registry\",\n  RY: \"Registry\",\n  unofficial: \"Unofficial Draft\",\n  UD: \"Unofficial Draft\",\n  base: \"\",\n  finding: \"TAG Finding\",\n  \"draft-finding\": \"Draft TAG Finding\",\n  \"editor-draft-finding\": \"Draft TAG Finding\",\n  \"CG-DRAFT\": \"Draft Community Group Report\",\n  \"CG-FINAL\": \"Final Community Group Report\",\n  \"BG-DRAFT\": \"Draft Business Group Report\",\n  \"BG-FINAL\": \"Final Business Group Report\",\n};\nconst status2long = {\n  ...status2text,\n  CR: \"Candidate Recommendation Snapshot\",\n  CRD: \"Candidate Recommendation Draft\",\n  CRY: \"Candidate Registry Snapshot\",\n  CRYD: \"Candidate Registry Draft\",\n};\nexport const status2track = {\n  DNOTE: \"Note\",\n  NOTE: \"Note\",\n  STMT: \"Note\",\n  \"WG-NOTE\": \"Note\",\n  \"IG-NOTE\": \"Note\",\n  FPWD: \"Recommendation\",\n  WD: \"Recommendation\",\n  CR: \"Recommendation\",\n  CRD: \"Recommendation\",\n  PR: \"Recommendation\",\n  REC: \"Recommendation\",\n  DISC: \"Recommendation\",\n  RSCND: \"Recommendation\",\n  DRY: \"Registry\",\n  CRYD: \"Registry\",\n  CRY: \"Registry\",\n  RY: \"Registry\",\n};\nexport const W3CNotes = [\"DNOTE\", \"NOTE\", \"STMT\"];\nexport const recTrackStatus = [\n  \"CR\",\n  \"CRD\",\n  \"DISC\",\n  \"FPWD\",\n  \"PR\",\n  \"REC\",\n  \"RSCND\",\n  \"WD\",\n];\nexport const registryTrackStatus = [\"DRY\", \"CRY\", \"CRYD\", \"RY\"];\nexport const tagStatus = [\"draft-finding\", \"finding\", \"editor-draft-finding\"];\nexport const cgStatus = [\"CG-DRAFT\", \"CG-FINAL\"];\nexport const bgStatus = [\"BG-DRAFT\", \"BG-FINAL\"];\nexport const cgbgStatus = [...cgStatus, ...bgStatus];\nexport const trStatus = [\n  ...W3CNotes,\n  ...recTrackStatus,\n  ...registryTrackStatus,\n];\nexport const noTrackStatus = [\n  \"base\",\n  ...cgStatus,\n  ...bgStatus,\n  \"editor-draft-finding\",\n  \"draft-finding\",\n  \"finding\",\n  \"MO\",\n  \"unofficial\",\n];\n/** @type {Map<string, LicenseInfo>} */\nexport const licenses = new Map([\n  [\n    \"cc0\",\n    {\n      name: \"Creative Commons 0 Public Domain Dedication\",\n      short: \"CC0\",\n      url: \"https://creativecommons.org/publicdomain/zero/1.0/\",\n    },\n  ],\n  [\n    \"w3c-software\",\n    {\n      name: \"W3C Software Notice and License\",\n      short: \"W3C Software\",\n      url: \"https://www.w3.org/copyright/software-license-2002/\",\n    },\n  ],\n  [\n    \"w3c-software-doc\",\n    {\n      name: \"W3C Software and Document Notice and License\",\n      short: \"permissive document license\",\n      url: \"https://www.w3.org/copyright/software-license-2023/\",\n    },\n  ],\n  [\n    \"cc-by\",\n    {\n      name: \"Creative Commons Attribution 4.0 International Public License\",\n      short: \"CC-BY\",\n      url: \"https://creativecommons.org/licenses/by/4.0/legalcode\",\n    },\n  ],\n  [\n    \"document\",\n    {\n      name: \"W3C Document License\",\n      short: \"document use\",\n      url: \"https://www.w3.org/copyright/document-license/\",\n    },\n  ],\n  [\n    \"dual\",\n    {\n      name: \"W3C Dual License\",\n      short: \"dual license\",\n      url: \"https://www.w3.org/Consortium/Legal/2013/copyright-documents-dual.html\",\n    },\n  ],\n  [\n    undefined,\n    {\n      name: \"unlicensed\",\n      url: null,\n      short: \"UNLICENSED\",\n    },\n  ],\n]);\n\nconst patentPolicies = [\"PP2017\", \"PP2020\"];\n\n/**\n * @param {*} conf\n * @param {string} prop\n * @param {string | number | Date} fallbackDate\n */\nfunction validateDateAndRecover(conf, prop, fallbackDate = new Date()) {\n  const date = conf[prop] ? new Date(conf[prop]) : new Date(fallbackDate);\n  // if date is valid\n  if (Number.isFinite(date.valueOf())) {\n    const formattedDate = ISODate.format(date);\n    return new Date(formattedDate);\n  }\n  const msg = docLink`${prop} is not a valid date: \"${conf[prop]}\". Expected format 'YYYY-MM-DD'.`;\n  showError(msg, name);\n  return new Date(ISODate.format(new Date()));\n}\n\nfunction deriveLicenseInfo(conf) {\n  let license = undefined;\n  if (typeof conf.license === \"string\") {\n    const lCaseLicense = conf.license.toLowerCase();\n    if (!licenses.has(lCaseLicense)) {\n      const msg = `The license \"\\`${conf.license}\\`\" is not supported.`;\n      const choices = codedJoinOr(\n        [...licenses.keys()].filter(k => k),\n        {\n          quotes: true,\n        }\n      );\n      const hint = docLink`Please set\n        ${\"[license]\"} to one of: ${choices}. If in doubt, remove \\`license\\` and let ReSpec pick one for you.`;\n      showError(msg, name, { hint });\n    } else {\n      license = lCaseLicense;\n    }\n  }\n\n  if (conf.isUnofficial && !license) {\n    license = \"cc-by\";\n  }\n\n  // W3C docs can't be CC-BY or CC0\n  if (!conf.isUnofficial && [\"cc-by\", \"cc0\"].includes(license)) {\n    const msg = docLink`License \"\\`${conf.license}\\`\" is not allowed for W3C Specifications.`;\n    const hint = docLink`Please set ${\"[license]\"} to \\`\"w3c-software-doc\"\\` instead.`;\n    showError(msg, name, { hint });\n  }\n  const licenseInfo = licenses.get(license);\n  return licenseInfo;\n}\n\nexport async function run(conf) {\n  conf.isBasic = conf.specStatus === \"base\";\n  conf.isCGBG = cgbgStatus.includes(conf.specStatus);\n  conf.isCGFinal = conf.isCGBG && conf.specStatus.endsWith(\"G-FINAL\");\n  conf.isCR = conf.specStatus === \"CR\" || conf.specStatus === \"CRD\";\n  conf.isCRDraft = conf.specStatus === \"CRD\";\n  conf.isCRY = conf.specStatus === \"CRY\" || conf.specStatus === \"CRYD\";\n  conf.isEd = conf.specStatus === \"ED\";\n  conf.isMemberSubmission = conf.specStatus === \"Member-SUBM\";\n  conf.isMO = conf.specStatus === \"MO\";\n  conf.isNote = W3CNotes.includes(conf.specStatus);\n  conf.isNoTrack = noTrackStatus.includes(conf.specStatus);\n  conf.isPR = conf.specStatus === \"PR\";\n  conf.isRecTrack = recTrackStatus.includes(conf.specStatus);\n  conf.isRec = conf.isRecTrack && conf.specStatus === \"REC\";\n  conf.isRegistry = registryTrackStatus.includes(conf.specStatus);\n  conf.isRegular = !conf.isCGBG && !conf.isBasic;\n  conf.isTagEditorFinding = conf.specStatus === \"editor-draft-finding\";\n  conf.isTagFinding = tagStatus.includes(conf.specStatus);\n  conf.isUnofficial = conf.specStatus === \"unofficial\";\n  conf.licenseInfo = deriveLicenseInfo(conf);\n  conf.prependW3C = !conf.isBasic && !conf.isUnofficial;\n  conf.longStatus = status2long[conf.specStatus];\n  conf.textStatus = status2text[conf.specStatus];\n  conf.showPreviousVersion = false;\n\n  if (conf.isRegular && !conf.shortName) {\n    const msg = docLink`The ${\"[shortName]\"} configuration option is required for this kind of document.`;\n    const hint = docLink`Please set ${\"[shortName]\"} to a short name for the specification.`;\n    showError(msg, name, { hint });\n  }\n\n  conf.publishDate = validateDateAndRecover(\n    conf,\n    \"publishDate\",\n    document.lastModified\n  );\n  conf.publishYear = conf.publishDate.getUTCFullYear();\n  if (conf.modificationDate) {\n    conf.modificationDate = validateDateAndRecover(\n      conf,\n      \"modificationDate\",\n      document.lastModified\n    );\n  }\n\n  if (conf.isRecTrack && !conf.github && !conf.wgPublicList) {\n    const msg =\n      \"W3C Process requires a either a link to a public repository or mailing list.\";\n    const hint = docLink`Use the ${\"[github]\"} configuration option to add a link to a repository. Alternatively use ${\"[wgPublicList]\"} to link to a mailing list.`;\n    showError(msg, name, {\n      hint,\n    });\n  }\n\n  if (conf.isEd && !conf.edDraftURI) {\n    const msg = docLink`Editor's Drafts should set ${\"[edDraftURI]\"} configuration option.`;\n    const hint = docLink`Please set ${\"[edDraftURI]\"} to the URL of the Editor's Draft. Alternatively, use the set ${\"[github]\"} option, which automatically sets it for you.`;\n    showWarning(msg, name, { hint });\n  }\n\n  const pubSpace = derivePubSpace(conf);\n  if (pubSpace && !conf.thisVersion) {\n    const maturity = status2maturity[conf.specStatus] || conf.specStatus;\n    const { shortName, publishDate } = conf;\n    const date = concatDate(publishDate);\n    const docVersion = `${maturity}-${shortName}-${date}`;\n    const year = [...trStatus, \"Member-SUBM\"].includes(conf.specStatus)\n      ? `${publishDate.getUTCFullYear()}/`\n      : \"\";\n    conf.thisVersion = w3Url(`${pubSpace}/${year}${docVersion}/`);\n  }\n\n  if (conf.isEd) conf.thisVersion = conf.edDraftURI;\n  if (conf.isCGBG) validateCGBG(conf);\n  if (conf.latestVersion !== null) {\n    conf.latestVersion = conf.latestVersion\n      ? w3Url(conf.latestVersion)\n      : w3Url(`${pubSpace}/${conf.shortName}/`);\n  }\n\n  if (conf.latestVersion) validateIfAllowedOnTR(conf);\n\n  const latestPath = `${pubSpace}/${conf.shortName}`;\n  if (conf.previousPublishDate) {\n    if (!conf.previousMaturity && !conf.isTagFinding) {\n      const msg = docLink`${\"[`previousPublishDate`]\"} is set, but missing ${\"[`previousMaturity`]\"}.`;\n      showError(msg, name);\n    }\n\n    conf.previousPublishDate = validateDateAndRecover(\n      conf,\n      \"previousPublishDate\"\n    );\n\n    const prevMaturity =\n      status2maturity[conf.previousMaturity] ?? conf.previousMaturity;\n    if (conf.isTagFinding && conf.latestVersion) {\n      const pubDate = ISODate.format(conf.publishDate);\n      conf.thisVersion = w3Url(`${latestPath}-${pubDate}`);\n      const prevPubDate = ISODate.format(conf.previousPublishDate);\n      conf.prevVersion = w3Url(`${latestPath}-${prevPubDate}}`);\n    } else if (conf.isCGBG || conf.isBasic) {\n      conf.prevVersion = conf.prevVersion || \"\";\n    } else {\n      const year = conf.previousPublishDate.getUTCFullYear();\n      const { shortName } = conf;\n      const date = concatDate(conf.previousPublishDate);\n      conf.prevVersion = w3Url(\n        `${pubSpace}/${year}/${prevMaturity}-${shortName}-${date}/`\n      );\n    }\n  }\n  if (conf.prevRecShortname && !conf.prevRecURI)\n    conf.prevRecURI = w3Url(`${pubSpace}/${conf.prevRecShortname}`);\n\n  // Move any editors with retiredDate to formerEditors.\n  for (let i = 0; i < conf.editors.length; i++) {\n    const editor = conf.editors[i];\n    if (\"retiredDate\" in editor) {\n      conf.formerEditors.push(editor);\n      conf.editors.splice(i--, 1);\n    }\n  }\n\n  if (conf.editors.length === 0) {\n    const msg = \"At least one editor is required.\";\n    const hint = docLink`Add one or more editors using the ${\"[editors]\"} configuration option.`;\n    showError(msg, name, { hint });\n  } else if (conf.editors.length && conf.isRecTrack) {\n    // check that every editor has w3cid\n    conf.editors.forEach((editor, i) => {\n      if (editor.w3cid) return;\n      const msg = docLink`Editor ${\n        editor.name ? `\"${editor.name}\"` : `number ${i + 1}`\n      } is missing their ${\"[w3cid]\"}.`;\n      const hint = docLink`See ${\"[w3cid]\"} for instructions for how to retrieve it and add it.`;\n      showError(msg, name, { hint });\n    });\n  }\n\n  if (conf.alternateFormats?.some(({ uri, label }) => !uri || !label)) {\n    const msg = docLink`Every ${\"[`alternateFormats`]\"} entry must have a \\`uri\\` and a \\`label\\`.`;\n    showError(msg, name);\n  }\n  if (conf.copyrightStart == conf.publishYear) conf.copyrightStart = \"\";\n  conf.dashDate = ISODate.format(conf.publishDate);\n  conf.publishISODate = conf.publishDate.toISOString();\n  conf.shortISODate = ISODate.format(conf.publishDate);\n  validatePatentPolicies(conf);\n  await deriveHistoryURI(conf);\n  if (conf.isTagEditorFinding) {\n    delete conf.thisVersion;\n    delete conf.latestVersion;\n  }\n  if (conf.isTagFinding) {\n    conf.showPreviousVersion = conf.previousPublishDate ? true : false;\n  }\n  // configuration done - yay!\n\n  const options = {\n    get multipleAlternates() {\n      return conf.alternateFormats && conf.alternateFormats.length > 1;\n    },\n    get alternatesHTML() {\n      return (\n        conf.alternateFormats &&\n        htmlJoinAnd(\n          // We need to pass a string here...\n          conf.alternateFormats.map(({ label }) => label),\n          (_, i) => {\n            const alt = conf.alternateFormats[i];\n            return html`<a\n              rel=\"alternate\"\n              href=\"${alt.uri}\"\n              hreflang=\"${alt?.lang ?? null}\"\n              type=\"${alt?.type ?? null}\"\n              >${alt.label}</a\n            >`;\n          }\n        )\n      );\n    },\n  };\n\n  // insert into document\n  const header = (conf.isCGBG ? cgbgHeadersTmpl : headersTmpl)(conf, options);\n  document.body.prepend(header);\n  document.body.classList.add(\"h-entry\");\n\n  // handle SotD\n  const sotd =\n    document.getElementById(\"sotd\") || document.createElement(\"section\");\n  if ((conf.isCGBG || !conf.isNoTrack || conf.isTagFinding) && !sotd.id) {\n    const msg =\n      \"A Status of This Document must include at least on custom paragraph.\";\n    const hint =\n      \"Add a `<p>` in the 'sotd' section that reflects the status of this specification.\";\n    showError(msg, name, { elements: [sotd], hint });\n  }\n  sotd.id = sotd.id || \"sotd\";\n  sotd.classList.add(\"introductory\");\n  // NOTE:\n  //  When arrays, wg and wgURI have to be the same length (and in the same order).\n  //  Technically wgURI could be longer but the rest is ignored.\n  //  However wgPatentURI can be shorter. This covers the case where multiple groups\n  //  publish together but some aren't used for patent policy purposes (typically this\n  //  happens when one is foolish enough to do joint work with the TAG). In such cases,\n  //  the groups whose patent policy applies need to be listed first, and wgPatentURI\n  //  can be shorter — but it still needs to be an array.\n  const wgPotentialArray = [conf.wg, conf.wgURI, conf.wgPatentURI];\n  if (\n    wgPotentialArray.some(item => Array.isArray(item)) &&\n    !wgPotentialArray.every(item => Array.isArray(item))\n  ) {\n    const msg = docLink`If one of ${\"[wg]\"}, ${\"[wgURI]\"}, or ${\"[wgPatentURI]\"} is an array, they all have to be.`;\n    const hint = docLink`Use the ${\"[group]\"} option with an array instead.`;\n    showError(msg, name, { hint });\n  }\n  if (Array.isArray(conf.wg)) {\n    conf.multipleWGs = conf.wg.length > 1;\n    conf.wgPatentHTML = htmlJoinAnd(conf.wg, (wg, i) => {\n      return html`a\n        <a href=\"${conf.wgPatentURI[i]}\" rel=\"disclosure\"\n          >public list of any patent disclosures (${wg})</a\n        >`;\n    });\n  } else {\n    conf.multipleWGs = false;\n  }\n  if (conf.isPR && !conf.crEnd) {\n    const msg = docLink`${\"[specStatus]\"} is \"PR\" but no ${\"[crEnd]\"} is specified in the ${\"[respecConfig]\"} (needed to indicate end of previous CR).`;\n    showError(msg, name);\n  }\n\n  if (conf.isCR && !conf.crEnd) {\n    const msg = docLink`${\"[specStatus]\"} is \"CR\", but no ${\"[crEnd]\"} is specified in the ${\"[respecConfig]\"}.`;\n    showError(msg, name);\n  }\n  conf.crEnd = validateDateAndRecover(conf, \"crEnd\");\n\n  if (conf.isPr && !conf.prEnd) {\n    const msg = docLink`${\"[specStatus]\"} is \"PR\" but no ${\"[prEnd]\"} is specified in the ${\"[respecConfig]\"}.`;\n    showError(msg, name);\n  }\n  conf.prEnd = validateDateAndRecover(conf, \"prEnd\");\n\n  const isUpdatableRec = sotd.classList.contains(\"updateable-rec\");\n  const hasCorrections = document.querySelector(\".correction\") !== null;\n  const hasProposedCorrections =\n    document.querySelector(\".proposed-correction\") !== null;\n  const hasAdditions = document.querySelector(\".addition\") !== null;\n  const hasProposedAdditions =\n    document.querySelector(\".proposed-addition\") !== null;\n  const hasRevisions =\n    hasCorrections ||\n    hasAdditions ||\n    hasProposedAdditions ||\n    hasProposedCorrections;\n\n  if (conf.isRec && !conf.errata && !hasRevisions) {\n    const msg = \"Recommendations must have an errata link.\";\n    const hint = docLink`Add an ${\"[errata]\"} URL to your ${\"[respecConfig]\"}.`;\n    showError(msg, name, { hint });\n  }\n\n  if (!isUpdatableRec && (hasAdditions || hasCorrections)) {\n    const msg = docLink`${\"[specStatus]\"} is \"REC\" with proposed additions but the Recommendation is not marked as allowing new features.`;\n    showError(msg, name);\n  }\n\n  if (\n    conf.isRec &&\n    isUpdatableRec &&\n    (hasProposedAdditions || hasProposedCorrections) &&\n    !conf.revisedRecEnd\n  ) {\n    const msg = docLink`${\"[specStatus]\"} is \"REC\" with proposed corrections or additions but no ${\"[revisedRecEnd]\"} is specified in the ${\"[respecConfig]\"}.`;\n    showError(msg, name);\n  }\n  conf.revisedRecEnd = validateDateAndRecover(conf, \"revisedRecEnd\");\n\n  if (conf.noRecTrack && recTrackStatus.includes(conf.specStatus)) {\n    const msg = docLink`Document configured as ${\"[noRecTrack]\"}, but its status (\"${conf.specStatus}\") puts it on the W3C Rec Track.`;\n    const notAllowed = codedJoinOr(recTrackStatus, { quotes: true });\n    const hint = `Status **can't** be any of: ${notAllowed}.`;\n    showError(msg, name, { hint });\n  }\n  if (!sotd.classList.contains(\"override\")) {\n    html.bind(sotd)`${populateSoTD(conf, sotd)}`;\n  }\n\n  if (!conf.implementationReportURI && conf.isCR) {\n    const msg = docLink`Missing ${\"[implementationReportURI]\"} configuration option in ${\"[respecConfig]\"}.`;\n    const hint = docLink`CR documents must have an ${\"[implementationReportURI]\"} that describes the [implementation experience](https://www.w3.org/policies/process/#implementation-experience).`;\n    showError(msg, name, { hint });\n  }\n  if (!conf.implementationReportURI && conf.isPR) {\n    const msg = docLink`PR documents should include an ${\"[implementationReportURI]\"}, which needs to link to a document that describes the [implementation experience](https://www.w3.org/policies/process-20190301/#implementation-experience).`;\n    showWarning(msg, name);\n  }\n\n  // Requested by https://github.com/speced/respec/issues/504\n  // Makes a record of a few auto-generated things.\n  pub(\"amend-user-config\", {\n    publishISODate: conf.publishISODate,\n    generatedSubtitle: norm(\n      document.getElementById(\"w3c-state\")?.textContent ?? \"\"\n    ),\n  });\n}\n\nfunction validateIfAllowedOnTR(conf) {\n  const latestVersionURL = new URL(conf.latestVersion);\n  const isW3C =\n    latestVersionURL.origin === \"https://www.w3.org\" ||\n    latestVersionURL.origin === \"https://w3.org/\";\n  if (\n    isW3C &&\n    latestVersionURL.pathname.startsWith(\"/TR/\") &&\n    [\"ED\", ...trStatus].includes(conf.specStatus) === false\n  ) {\n    const msg = docLink`Documents with a status of \\`\"${conf.specStatus}\"\\` can't be published on the W3C's /TR/ (Technical Report) space.`;\n    const hint = docLink`Ask a W3C Team Member for a W3C URL where the report can be published and change ${\"[latestVersion]\"} to something else.`;\n    showError(msg, name, { hint });\n    return;\n  }\n}\n\nfunction derivePubSpace(conf) {\n  const { specStatus, group } = conf;\n  if (trStatus.includes(specStatus) || conf.groupType === \"wg\") {\n    return `/TR`;\n  }\n\n  switch (specStatus) {\n    case \"CG-FINAL\":\n    case \"BG-FINAL\":\n      return `/community/reports/${group}`;\n    case \"finding\":\n    case \"draft-finding\":\n      return \"/2001/tag/doc\";\n    case \"Member-SUBM\":\n      return `/Submission`;\n  }\n\n  return \"\";\n}\n\nfunction validateCGBG(conf) {\n  const reportType = status2text[conf.specStatus];\n  const latestVersionURL = conf.latestVersion\n    ? new URL(w3Url(conf.latestVersion))\n    : null;\n\n  if (!conf.wg) {\n    const msg = docLink`The ${\"[group]\"} configuration option is required for this kind of document (${reportType}).`;\n    showError(msg, name);\n    return;\n  }\n\n  // Deal with final reports\n  if (conf.isCGFinal) {\n    // Final report require a w3.org URL.\n    const isW3C =\n      latestVersionURL?.origin === \"https://www.w3.org\" ||\n      latestVersionURL?.origin === \"https://w3.org/\";\n    if (isW3C === false) {\n      const msg = docLink`For ${reportType}, the ${\"[latestVersion]\"} URL must point to somewhere at https://www.w3.org/.`;\n      const hint = `Ask a W3C Team Member for a W3C URL where the report can be published.`;\n      showError(msg, name, { hint });\n      return;\n    }\n  }\n}\n\nasync function deriveHistoryURI(conf) {\n  if (!conf.shortName || conf.historyURI === null || !conf.latestVersion) {\n    return; // Nothing to do\n  }\n\n  const canShowHistory = conf.isEd || trStatus.includes(conf.specStatus);\n\n  if (conf.historyURI && !canShowHistory) {\n    const msg = docLink`The ${\"[historyURI]\"} can't be used with non /TR/ documents.`;\n    const hint = docLink`Please remove ${\"[historyURI]\"}.`;\n    showError(msg, name, { hint });\n    conf.historyURI = null;\n    return;\n  }\n\n  const historyURL = new URL(\n    conf.historyURI ?? `${conf.shortName}/`,\n    \"https://www.w3.org/standards/history/\"\n  );\n\n  // If it's on the Rec Track or it's TR worthy, then allow history override.\n  // Also make a an exception for FPWD, DNOTE, NOTE and DRY.\n  if (\n    (conf.historyURI && canShowHistory) ||\n    [\"FPWD\", \"DNOTE\", \"NOTE\", \"DRY\"].includes(conf.specStatus)\n  ) {\n    conf.historyURI = historyURL.href;\n    return;\n  }\n\n  // Let's get the history from the W3C.\n  // Do a fetch HEAD request to see if the history exists...\n  // We don't discriminate... if it's on the W3C website with a history,\n  // we show it.\n  try {\n    const response = await fetch(historyURL, { method: \"HEAD\" });\n    if (response.ok) {\n      conf.historyURI = response.url;\n    }\n  } catch {\n    // Ignore fetch errors\n  }\n}\n\nfunction validatePatentPolicies(conf) {\n  if (!conf.wgPatentPolicy) return;\n  const policies = new Set([].concat(conf.wgPatentPolicy));\n  if (\n    policies.size &&\n    ![...policies].every(policy => patentPolicies.includes(policy))\n  ) {\n    const invalidPolicies = [...policies].filter(\n      policy => !patentPolicies.includes(policy)\n    );\n    const msg = docLink`Invalid ${\"[wgPatentPolicy]\"} value(s): ${codedJoinAnd(\n      invalidPolicies\n    )}.`;\n    const hint = `Please use one of: ${codedJoinOr(patentPolicies)}.`;\n    showError(msg, name, { hint });\n  }\n  if (policies.size !== 1) {\n    const msg =\n      \"When collaborating across multiple groups, they must use the same patent policy.\";\n    const hint = docLink`For ${\"[wgPatentPolicy]\"}, please check the patent policies of each group. The patent policies were: ${[\n      ...policies,\n    ].join(\", \")}.`;\n    showError(msg, name, { hint });\n  }\n  // We take the first policy\n  conf.wgPatentPolicy = [...policies][0];\n}\n\n/**\n * @param {*} conf\n * @param {HTMLElement} sotd\n */\nfunction populateSoTD(conf, sotd) {\n  const options = {\n    ...collectSotdContent(sotd, conf),\n\n    get mailToWGPublicList() {\n      return `mailto:${conf.wgPublicList}@w3.org`;\n    },\n    get mailToWGPublicListWithSubject() {\n      const fragment = conf.subjectPrefix\n        ? `?subject=${encodeURIComponent(conf.subjectPrefix)}`\n        : \"\";\n      return this.mailToWGPublicList + fragment;\n    },\n    get mailToWGPublicListSubscription() {\n      return `mailto:${conf.wgPublicList}-request@w3.org?subject=subscribe`;\n    },\n  };\n  const template = conf.isCGBG ? cgbgSotdTmpl : sotdTmpl;\n  return template(conf, options);\n}\n\n/**\n * @param {HTMLElement} sotd\n */\nfunction collectSotdContent(sotd, { isTagFinding = false }) {\n  const sotdClone = sotd.cloneNode(true);\n  const additionalContent = document.createDocumentFragment();\n  // we collect everything until we hit a section,\n  // that becomes the custom content.\n  while (sotdClone.hasChildNodes()) {\n    if (\n      sotdClone.nodeType === Node.ELEMENT_NODE &&\n      // @ts-ignore\n      sotdClone.firstChild.localName === \"section\"\n    ) {\n      break;\n    }\n    additionalContent.appendChild(sotdClone.firstChild);\n  }\n  if (isTagFinding && !additionalContent.hasChildNodes()) {\n    const msg = docLink`ReSpec does not support automated SotD generation for TAG findings.`;\n    const hint = `Please add the prerequisite content in the 'sotd' section.`;\n    showWarning(msg, name, { hint });\n  }\n  return {\n    additionalContent,\n    // Whatever sections are left, we throw at the end.\n    additionalSections: sotdClone.childNodes,\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 W3C specs\n */\nexport const name = \"w3c/defaults\";\nimport {\n  W3CNotes,\n  bgStatus,\n  cgStatus,\n  recTrackStatus,\n  registryTrackStatus,\n  status2text,\n  tagStatus,\n  trStatus,\n} from \"./headers.js\";\nimport { codedJoinOr, docLink, showError } from \"../core/utils.js\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst w3cLogo = {\n  src: \"https://www.w3.org/StyleSheets/TR/2021/logos/W3C\",\n  alt: \"W3C\",\n  height: 48,\n  width: 72,\n  url: \"https://www.w3.org/\",\n};\n\nconst memSubmissionLogo = {\n  alt: \"W3C Member Submission\",\n  href: \"https://www.w3.org/Submission/\",\n  src: \"https://www.w3.org/Icons/member_subm-v.svg\",\n  width: \"211\",\n  height: \"48\",\n};\n\nconst w3cDefaults = {\n  lint: {\n    \"privsec-section\": false,\n    \"required-sections\": true,\n    \"wpt-tests-exist\": false,\n    \"informative-dfn\": \"warn\",\n    \"no-unused-dfns\": \"warn\",\n    a11y: false,\n  },\n  doJsonLd: false,\n  logos: [],\n  xref: true,\n  wgId: \"\",\n  otherLinks: [],\n  excludeGithubLinks: true,\n  subtitle: \"\",\n  prevVersion: \"\",\n  formerEditors: [],\n  editors: [],\n  authors: [],\n};\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...w3cDefaults.lint,\n          ...conf.lint,\n        };\n\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...w3cDefaults,\n    ...conf,\n    lint,\n  });\n\n  if (conf.specStatus !== \"unofficial\" && !conf.hasOwnProperty(\"license\")) {\n    conf.license = \"w3c-software-doc\";\n  }\n\n  validateStatusForGroup(conf);\n  processLogos(conf);\n}\n\nfunction processLogos(conf) {\n  // Primarily include the W3C logo and license for W3C Recommendation track\n  // that have an actual working group.\n  const { specStatus, wg } = conf;\n  const isWgStatus = [\n    ...recTrackStatus,\n    ...registryTrackStatus,\n    ...W3CNotes,\n    ...tagStatus,\n    \"ED\",\n  ].includes(specStatus);\n  const inWorkingGroup = wg && wg.length && isWgStatus;\n  // Member submissions don't need to be in a Working Group.\n  const doesNotNeedWG = [\"Member-SUBM\"].includes(specStatus);\n  const canShowW3CLogo = inWorkingGroup || doesNotNeedWG;\n  if (canShowW3CLogo) {\n    conf.logos.unshift(w3cLogo);\n    if (specStatus === \"Member-SUBM\") {\n      conf.logos.push(memSubmissionLogo);\n    }\n  }\n}\n\nfunction validateStatusForGroup(conf) {\n  const { specStatus, groupType, group } = conf;\n\n  if (!specStatus) {\n    const msg = docLink`The ${\"[specStatus]\"} configuration option is required.`;\n    const hint = docLink`Select an appropriate status from ${\"[specStatus]\"} based on your W3C group. If in doubt, use \\`\"unofficial\"\\`.`;\n    showError(msg, name, { hint });\n    conf.specStatus = \"base\";\n    return;\n  }\n\n  if (status2text[specStatus] === undefined) {\n    const msg = docLink`The ${\"[specStatus]\"} \"\\`${specStatus}\\`\" is not supported at for this type of document.`;\n    const choices = codedJoinOr(Object.keys(status2text), { quotes: true });\n    const hint = docLink`set ${\"[specStatus]\"} to one of: ${choices}.`;\n    showError(msg, name, { hint });\n    conf.specStatus = \"base\";\n    return;\n  }\n\n  switch (groupType) {\n    case \"cg\": {\n      if (![...cgStatus, \"unofficial\", \"UD\"].includes(specStatus)) {\n        const msg = docLink`W3C Community Group documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const supportedStatus = codedJoinOr(cgStatus, { quotes: true });\n        const hint = `Please use one of: ${supportedStatus}. Automatically falling back to \\`\"CG-DRAFT\"\\`.`;\n        showError(msg, name, { hint });\n        conf.specStatus = \"CG-DRAFT\";\n      }\n      break;\n    }\n    case \"bg\": {\n      if (![...bgStatus, \"unofficial\", \"UD\"].includes(specStatus)) {\n        const msg = docLink`W3C Business Group documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const supportedStatus = codedJoinOr(bgStatus, { quotes: true });\n        const hint = `Please use one of: ${supportedStatus}. Automatically falling back to \\`\"BG-DRAFT\"\\`.`;\n        showError(msg, name, { hint });\n        conf.specStatus = \"BG-DRAFT\";\n      }\n      break;\n    }\n    case \"wg\": {\n      if (![...trStatus, \"unofficial\", \"UD\", \"ED\"].includes(specStatus)) {\n        const msg = docLink`W3C Working Group documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const hint = docLink`Pleas see ${\"[specStatus]\"} for appropriate status for W3C Working Group documents.`;\n        showError(msg, name, { hint });\n      }\n      break;\n    }\n    case \"other\":\n      if (\n        group === \"tag\" &&\n        ![\"ED\", ...trStatus, ...tagStatus].includes(specStatus)\n      ) {\n        const msg = docLink`The W3C Technical Architecture Group's documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const supportedStatus = codedJoinOr([\"ED\", ...trStatus, ...tagStatus], {\n          quotes: true,\n        });\n        const hint = `Please use one of: ${supportedStatus}. Automatically falling back to \\`\"unofficial\"\\`.`;\n        showError(msg, name, { hint });\n        conf.specStatus = \"unofficial\";\n      }\n      break;\n    default:\n      if (\n        !conf.wgId &&\n        ![\"unofficial\", \"base\", \"UD\", \"Member-SUBM\"].includes(conf.specStatus)\n      ) {\n        const msg =\n          \"Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.\";\n        const hint = docLink`Use the ${\"[group]\"} configuration option to associated this document with a W3C group.`;\n        conf.specStatus = \"base\";\n        showError(msg, name, { hint });\n      }\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","// @ts-check\n/**\n * Module w3c/style\n * Inserts a link to the appropriate W3C style for the specification's maturity level.\n * */\n\nimport { W3CNotes, recTrackStatus, registryTrackStatus } from \"./headers.js\";\nimport { createResourceHint } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { sub } from \"../core/pubsubhub.js\";\n\nexport const name = \"w3c/style\";\n\nfunction attachFixupScript() {\n  const script = document.createElement(\"script\");\n  script.src = \"https://www.w3.org/scripts/TR/2021/fixup.js\";\n  if (location.hash) {\n    script.addEventListener(\n      \"load\",\n      () => {\n        window.location.href = location.hash;\n      },\n      { once: true }\n    );\n  }\n  document.body.appendChild(script);\n}\n\n// Creates a collection of resource hints to improve the loading performance\n// of the W3C resources.\nfunction createResourceHints() {\n  /** @type {ResourceHintOption[]}  */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C styles and scripts.\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2021/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preload\", // all specs include on base.css.\n      href: getStyleUrl(\"base.css\").href,\n      as: \"style\",\n    },\n    {\n      hint: \"preload\",\n      href: getStyleUrl(\"dark.css\").href,\n      as: \"style\",\n    },\n    {\n      hint: \"preload\", // all specs show the logo.\n      href: \"https://www.w3.org/StyleSheets/TR/2021/logos/W3C\",\n      as: \"image\",\n      corsMode: \"anonymous\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// Opportunistically apply base style\nelements.appendChild(\n  html`<link\n    rel=\"stylesheet\"\n    href=\"https://www.w3.org/StyleSheets/TR/2021/base.css\"\n    class=\"removeOnSave\"\n  />`\n);\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(\n    html`<meta\n      name=\"viewport\"\n      content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"\n    />`\n  );\n}\n\ndocument.head.prepend(elements);\n\n/**\n * @param {URL|string} linkURL\n * @returns {(exportDoc: Document) => void}\n */\nfunction styleMover(linkURL) {\n  return exportDoc => {\n    const w3cStyle = exportDoc.querySelector(`head link[href=\"${linkURL}\"]`);\n    exportDoc.querySelector(\"head\").append(w3cStyle);\n  };\n}\n\n/**\n * @param {Conf} conf\n */\nexport function run(conf) {\n  // Attach W3C fixup script after we are done.\n  if (!conf.noToc) {\n    sub(\"end-all\", attachFixupScript, { once: true });\n  }\n\n  const finalStyleURL = getStyleUrl(getStyleFile(conf));\n  document.head.appendChild(\n    html`<link rel=\"stylesheet\" href=\"${finalStyleURL.href}\" />`\n  );\n  // Make sure the W3C stylesheet is the last stylesheet, as required by W3C Pub Rules.\n  sub(\"beforesave\", styleMover(finalStyleURL));\n\n  // Add color scheme meta tag and style\n  /** @type HTMLMetaElement */\n  let colorScheme = document.querySelector(\"head meta[name=color-scheme]\");\n  if (!colorScheme) {\n    // Default to light mode during transitional period.\n    colorScheme = html`<meta name=\"color-scheme\" content=\"light\" />`;\n    document.head.appendChild(colorScheme);\n  }\n  if (colorScheme.content.includes(\"dark\")) {\n    const darkModeStyleUrl = getStyleUrl(\"dark.css\");\n    document.head.appendChild(\n      html`<link\n        rel=\"stylesheet\"\n        href=\"${darkModeStyleUrl.href}\"\n        media=\"(prefers-color-scheme: dark)\"\n      />`\n    );\n    // As required by W3C Pub Rules.\n    sub(\"beforesave\", styleMover(darkModeStyleUrl));\n  }\n}\n\n/** @param {Conf} conf */\nfunction getStyleFile(conf) {\n  const canonicalStatus = conf.specStatus?.toUpperCase() ?? \"\";\n  let styleFile = \"\";\n  const canUseW3CStyle =\n    [\n      ...recTrackStatus,\n      ...registryTrackStatus,\n      ...W3CNotes,\n      \"ED\",\n      \"MEMBER-SUBM\",\n    ].includes(canonicalStatus) && conf.wgId;\n\n  // Figure out which style file to use.\n  switch (canonicalStatus) {\n    case \"WD\":\n    case \"FPWD\":\n      styleFile = canUseW3CStyle ? \"W3C-WD\" : \"base.css\";\n      break;\n    case \"CG-DRAFT\":\n    case \"CG-FINAL\":\n    case \"BG-DRAFT\":\n    case \"BG-FINAL\":\n      styleFile = canonicalStatus.toLowerCase();\n      break;\n    case \"UD\":\n    case \"UNOFFICIAL\":\n      styleFile = \"W3C-UD\";\n      break;\n    case \"FINDING\":\n    case \"DRAFT-FINDING\":\n    case \"EDITOR-DRAFT-FINDING\":\n    case \"BASE\":\n      styleFile = \"base.css\";\n      break;\n    case \"MEMBER-SUBM\":\n      styleFile = \"W3C-Member-SUBM\";\n      break;\n    default:\n      styleFile = canUseW3CStyle ? `W3C-${conf.specStatus}` : \"base.css\";\n  }\n\n  return styleFile;\n}\n\nfunction getStyleUrl(styleFile = \"base.css\") {\n  return new URL(`/StyleSheets/TR/2021/${styleFile}`, \"https://www.w3.org/\");\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","/**\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","// @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","/**\n * This module handles the creation of the h1#title of a spec and\n * makes sure the <title> always matches the h1.\n *\n * If no h1#title is included, then the <title> becomes the h1#title.\n *\n * When a h1#title is included, it always takes precedence over the\n * <title> of a spec. An error will be displayed in case of\n * any mismatch.\n *\n */\n\nimport { getIntlData, norm, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/title\";\n\nconst localizationStrings = {\n  en: {\n    default_title: \"No Title\",\n  },\n  de: {\n    default_title: \"Kein Titel\",\n  },\n  zh: {\n    default_title: \"无标题\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {HTMLElement} */\n  const h1Elem =\n    document.querySelector(\"h1#title\") || html`<h1 id=\"title\"></h1>`;\n\n  // check existing element is ok to use\n  if (h1Elem.isConnected && h1Elem.textContent.trim() === \"\") {\n    const msg =\n      \"The document is missing a title, so using a default title. \" +\n      \"To fix this, please give your document a `<title>`. \" +\n      \"If you need special markup in the document's title, \" +\n      'please use a `<h1 id=\"title\">`.';\n    const title = \"Document is missing a title\";\n    showError(msg, name, { title, elements: [h1Elem] });\n  }\n\n  // Decorate the spec title\n  if (!h1Elem.id) h1Elem.id = \"title\";\n  h1Elem.classList.add(\"title\");\n\n  setDocumentTitle(conf, h1Elem);\n\n  // This will get relocated by a template later.\n  document.body.prepend(h1Elem);\n}\n\nfunction setDocumentTitle(conf, h1Elem) {\n  // If the h1 is newly created, it won't be connected. In this case\n  // we use the <title> or a localized fallback.\n  if (!h1Elem.isConnected) {\n    h1Elem.textContent = document.title || `${l10n.default_title}`;\n  }\n  // We replace \":<br>\" with \":\", and \"<br>\" with \"-\", as appropriate.\n  const tempElem = document.createElement(\"h1\");\n  tempElem.innerHTML = h1Elem.innerHTML\n    .replace(/:<br>/g, \": \")\n    .replace(/<br>/g, \" - \");\n  let documentTitle = norm(tempElem.textContent);\n\n  if (conf.isPreview && conf.prNumber) {\n    const prUrl = conf.prUrl || `${conf.github.repoURL}pull/${conf.prNumber}`;\n    const { childNodes } = html`\n      Preview of PR <a href=\"${prUrl}\">#${conf.prNumber}</a>:\n    `;\n    h1Elem.prepend(...childNodes);\n    documentTitle = `Preview of PR #${conf.prNumber}: ${documentTitle}`;\n  }\n\n  document.title = documentTitle;\n\n  // conf.title is deperecated - we are keeping this here just to\n  // retain backwards compat as we think the ePub generator\n  // relies on it.\n  conf.title = documentTitle;\n}\n","/**\n * This module updates the title and shortName\n * of a spec when there is a valid level configuration.\n *\n * Levels should be integers >= 0.\n *\n * @module w3c/level\n */\n\nimport { getIntlData, showError } from \"../core/utils.js\";\nexport const name = \"w3c/level\";\n/** @type {LocalizationStrings} */\nconst localizationStrings = {\n  en: {\n    level: \"Level\",\n  },\n  ja: {\n    level: \"レベル\",\n  },\n  nl: {\n    level: \"Niveau\",\n  },\n  de: {\n    level: \"Stufe\",\n  },\n  zh: {\n    level: \"级别\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Updates the title and shortName of a spec based on the level configuration.\n *\n * @param {Conf} conf - The configuration object.\n */\nexport function run(conf) {\n  if (!conf.hasOwnProperty(\"level\")) return;\n\n  const h1Elem = document.querySelector(\"h1#title\");\n\n  const level = parseInt(conf.level);\n  if (!Number.isInteger(level) || level < 0) {\n    const msg = `The \\`level\\` configuration option must be a number greater or equal to 0. It is currently set to \\`${level}\\``;\n    const title = \"Invalid level config.\";\n    showError(msg, name, { title, elements: [h1Elem] });\n    return;\n  }\n\n  h1Elem.append(` ${l10n.level} ${level}`);\n  document.title = `${document.title} ${l10n.level} ${level}`;\n  conf.shortName = `${conf.shortName}-${level}`;\n  conf.level = level;\n}\n","/**\n * Module w3c/abstract\n *\n * This module handles the abstract section properly by adding necessary elements and\n * performing validations.\n *\n * @module w3c/abstract\n */\n\nimport { getIntlData, norm, renameElement, showError } from \"../core/utils.js\";\nimport { lang as docLang } from \"../core/l10n.js\";\nimport { html } from \"../core/import-maps.js\";\n\nexport const name = \"w3c/abstract\";\n\n/** @type {LocalizationStrings} */\nconst localizationStrings = {\n  en: { abstract: \"Abstract\" },\n  ko: { abstract: \"요약\" },\n  zh: { abstract: \"摘要\" },\n  ja: { abstract: \"要約\" },\n  nl: { abstract: \"Samenvatting\" },\n  es: { abstract: \"Resumen\" },\n  de: { abstract: \"Zusammenfassung\" },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Handles the abstract section of the document.\n */\nexport async function run() {\n  const abstract = findAbstract();\n  if (!abstract) {\n    showError('Document must have one `<section id=\"abstract\">`.', name);\n    return;\n  }\n\n  abstract.classList.add(\"introductory\");\n  abstract.id = \"abstract\";\n  if (!abstract.querySelector(\"h2\")) {\n    abstract.prepend(html`<h2>${l10n.abstract}</h2>`);\n  }\n}\n\n/**\n * Finds the abstract section in the document.\n *\n * @returns {HTMLElement | null} The abstract section element.\n */\nfunction findAbstract() {\n  const abstract = document.getElementById(\"abstract\");\n  if (abstract) {\n    switch (abstract.localName) {\n      case \"section\":\n        return abstract;\n      case \"div\":\n        return renameElement(abstract, \"section\");\n      default:\n        showError(\"The abstract should be a `<section>` element.\", name, {\n          elements: [abstract],\n        });\n        return abstract;\n    }\n  }\n\n  const searchString = l10n.abstract.toLocaleLowerCase(docLang);\n  for (const header of document.querySelectorAll(\"h2, h3, h4, h5, h6\")) {\n    if (norm(header.textContent).toLocaleLowerCase(docLang) === searchString) {\n      return header.closest(\"section\");\n    }\n  }\n\n  return abstract;\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// 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 w3c/conformance\n// Handle the conformance section properly.\nimport { getIntlData, htmlJoinAnd, 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\";\nexport const name = \"w3c/conformance\";\n\nconst localizationStrings = {\n  en: {\n    conformance: \"Conformance\",\n    normativity:\n      \"As well as sections marked as non-normative, all authoring guidelines, \" +\n      \"diagrams, examples, and notes in this specification are non-normative. \" +\n      \"Everything else in this specification is normative.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        The key word${plural ? \"s\" : \"\"} ${keywords} in this document\n        ${plural ? \"are\" : \"is\"} to be interpreted as described in\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        when, and only when, they appear in all capitals, as shown here.\n      </p>`;\n    },\n  },\n  de: {\n    conformance: \"Anforderungen\",\n    normativity:\n      \"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten \" +\n      \"sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument \" +\n      \"nicht normativ. Alle anderen Angaben sind normativ.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        ${plural ? \"Die Schlüsselwörter\" : \"Das Schlüsselwort\"} ${keywords} in\n        diesem Dokument ${plural ? \"sind\" : \"ist\"} gemäß\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        und unter Berücksichtigung von\n        <a href=\"https://github.com/adfinis-sygroup/2119/blob/master/2119de.rst\"\n          >2119de</a\n        >\n        zu interpretieren, wenn und nur wenn ${plural ? \"sie\" : \"es\"} wie hier\n        gezeigt durchgehend groß geschrieben wurde${plural ? \"n\" : \"\"}.\n      </p>`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  const terms = [...Object.keys(rfc2119Usage)];\n  // Add RFC2119 to bibliography\n  if (terms.length) {\n    conf.normativeReferences.add(\"RFC2119\");\n    conf.normativeReferences.add(\"RFC8174\");\n  }\n  // Put in the 2119 clause and reference\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n  const content = html`\n    <h1>${l10n.conformance}</h1>\n    <p>${l10n.normativity}</p>\n    ${terms.length ? l10n.keywordInterpretation(keywords, plural) : null}\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run(conf) {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance && !conformance.classList.contains(\"override\")) {\n    processConformance(conformance, conf);\n  }\n  // Warn when there are RFC2119/RFC8174 keywords, but not conformance section\n  if (!conformance && Object.keys(rfc2119Usage).length) {\n    const msg = `Document uses RFC2119 keywords but lacks a conformance section.`;\n    const hint = 'Please add a `<section id=\"conformance\">`.';\n    showWarning(msg, name, { hint });\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\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// Module core/tables\n// Handles tables in the document.\n// Generates a List of Tables wherever there is a #list-of-tables element.\n\nimport {\n  addId,\n  getIntlData,\n  getPreviousSections,\n  renameElement,\n  wrapInner,\n} from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/tables\";\n\nconst localizationStrings = {\n  en: {\n    list_of_tables: \"List of Tables\",\n    table: \"Table \",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run() {\n  const listOfTables = collectTables();\n  const listOfTablesElement = document.querySelector(\"section#list-of-tables\");\n  if (listOfTables.length && listOfTablesElement) {\n    decorateListOfTables(listOfTablesElement);\n    listOfTablesElement.append(\n      html`<h1>${l10n.list_of_tables}</h1>`,\n      html`<ul class=\"list-of-tables\">\n        ${listOfTables}\n      </ul>`\n    );\n  }\n}\n\n/**\n * process all tables\n */\nfunction collectTables() {\n  /** @type {HTMLLIElement[]} */\n  const listOfTables = [];\n  /** @type {NodeListOf<HTMLTableElement>} */\n  const tables = document.querySelectorAll(\"table.numbered\");\n  [...tables]\n    // there is a separate linter rule to catch numbered tables without captions\n    .filter(table => !!table.querySelector(\"caption\"))\n    .forEach((table, i) => {\n      const caption = table.querySelector(\"caption\");\n      decorateTable(table, caption, i);\n      listOfTables.push(getListOfTablesListItem(table.id, caption));\n    });\n  return listOfTables;\n}\n\n/**\n * @param {HTMLTableElement} table\n * @param {HTMLTableCaptionElement} caption\n * @param {number} i\n */\nfunction decorateTable(table, caption, i) {\n  const title = caption.textContent;\n  addId(table, \"table\", title);\n  // set proper caption title\n  wrapInner(caption, html`<span class=\"table-title\"></span>`);\n  caption.prepend(\n    html`<a class=\"self-link\" href=\"#${table.id}\"\n      >${l10n.table}<bdi class=\"tableno\">${i + 1}</bdi></a\n    >`,\n    \" \"\n  );\n}\n\n/**\n * @param {string} tableId\n * @param {HTMLTableCaptionElement} caption\n * @return {HTMLLIElement}\n */\nfunction getListOfTablesListItem(tableId, caption) {\n  const listOfTablesCaption = caption.cloneNode(true);\n  for (const anchor of listOfTablesCaption.querySelectorAll(\"a\")) {\n    renameElement(anchor, \"span\", { copyAttributes: false });\n  }\n  return html`<li>\n    <a class=\"tocxref\" href=\"${`#${tableId}`}\"\n      >${listOfTablesCaption.childNodes}</a\n    >\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} listOfTablesElement\n */\nfunction decorateListOfTables(listOfTablesElement) {\n  if (\n    listOfTablesElement.matches(\".appendix, .introductory\") ||\n    listOfTablesElement.closest(\"section\")\n  ) {\n    return;\n  }\n\n  const previousSections = getPreviousSections(listOfTablesElement);\n  if (previousSections.every(sec => sec.classList.contains(\"introductory\"))) {\n    listOfTablesElement.classList.add(\"introductory\");\n  } else if (previousSections.some(sec => sec.classList.contains(\"appendix\"))) {\n    listOfTablesElement.classList.add(\"appendix\");\n  }\n}\n","// @ts-check\nimport { definitionMap, registerDefinition } from \"./dfn-map.js\";\nimport { showError, wrapInner } from \"./utils.js\";\n\nconst topLevelEntities = new Set([\n  \"callback interface\",\n  \"callback\",\n  \"dictionary\",\n  \"enum\",\n  \"interface mixin\",\n  \"interface\",\n  \"typedef\",\n]);\n\n/**\n * This function looks for a <dfn> element whose title is 'name' and\n * that is \"for\" 'parent', which is the empty string when 'name'\n * refers to a top-level entity. For top-level entities, <dfn>\n * elements that inherit a non-empty [dfn-for] attribute are also\n * counted as matching.\n *\n * When a matching <dfn> is found, it's given <code> formatting,\n * marked as an IDL definition, and returned. If no <dfn> is found,\n * the function returns 'undefined'.\n * @param {*} defn\n * @param {string} name\n */\nexport function findDfn(defn, name, { parent = \"\" } = {}) {\n  switch (defn.type) {\n    case \"constructor\":\n    case \"operation\":\n      return findOperationDfn(defn, parent, name);\n    default:\n      return findNormalDfn(defn, parent, name);\n  }\n}\n\n/**\n * @param {{ type: string, arguments: any[] }} idlAst\n * @param {string} parent\n * @param {string} name\n */\nfunction getAlternativeNames(idlAst, parent, name) {\n  const { type } = idlAst;\n  const asQualifiedName = `${parent}.${name}`;\n  switch (type) {\n    case \"constructor\":\n    case \"operation\": {\n      // Allow linking to \"method()\", method(arg) and \"method\" name.\n      const asMethodName = `${name}()`;\n      const asFullyQualifiedName = `${asQualifiedName}()`;\n      const asMethodWithArgs = generateMethodNamesWithArgs(\n        name,\n        idlAst.arguments\n      );\n      return {\n        local: [asQualifiedName, asFullyQualifiedName, name],\n        exportable: [asMethodName, ...asMethodWithArgs],\n      };\n    }\n    case \"attribute\":\n      return {\n        local: [asQualifiedName],\n        exportable: [name],\n      };\n  }\n}\n\n/**\n * Generates all possible permutations of a method name based\n * on what arguments they method accepts.\n\n * Required arguments are always present, and optional ones\n * are stacked one by one.\n *\n * For examples: foo(req1, req2), foo(req1, req2, opt1) and so on.\n *\n * @param {String} operationName\n * @param {*} argsAst\n */\nfunction generateMethodNamesWithArgs(operationName, argsAst) {\n  const operationNames = [];\n  if (argsAst.length === 0) {\n    return operationNames;\n  }\n  const required = []; // required arguments\n  const optional = []; // optional arguments, including variadic ones\n  for (const { name, optional: isOptional, variadic } of argsAst) {\n    if (isOptional || variadic) {\n      optional.push(name);\n    } else {\n      required.push(name);\n    }\n  }\n  const requiredArgs = required.join(\", \");\n  const requiredOperation = `${operationName}(${requiredArgs})`;\n  operationNames.push(requiredOperation);\n  const optionalOps = optional.map((_, index) => {\n    const args = [...required, ...optional.slice(0, index + 1)].join(\", \");\n    const result = `${operationName}(${args})`;\n    return result;\n  });\n  operationNames.push(...optionalOps);\n  return operationNames;\n}\n\n/**\n * @param {*} defn\n * @param {string} parent\n * @param {string} name\n */\nfunction findOperationDfn(defn, parent, name) {\n  // Overloads all have unique names\n  if (name.includes(\"!overload\")) {\n    return findNormalDfn(defn, parent, name);\n  }\n  const asMethodName = `${name}()`;\n  return findNormalDfn(defn, parent, asMethodName, name);\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {Record<\"local\" | \"exportable\", string[]>} names\n */\nfunction addAlternativeNames(dfn, names) {\n  const { local, exportable } = names;\n  const lt = dfn.dataset.lt ? new Set(dfn.dataset.lt.split(\"|\")) : new Set();\n  for (const item of exportable) {\n    lt.add(item);\n  }\n  // Fix any ill-placed ones - local ones don't belong here\n  local.filter(item => lt.has(item)).forEach(item => lt.delete(item));\n  dfn.dataset.lt = [...lt].join(\"|\");\n  dfn.dataset.localLt = local.join(\"|\");\n  registerDefinition(dfn, [...local, ...exportable]);\n}\n\n/**\n * @param {*} defn\n * @param {string} parent\n * @param {...string} names\n */\nfunction findNormalDfn(defn, parent, ...names) {\n  const { type } = defn;\n  for (const name of names) {\n    let resolvedName =\n      type === \"enum-value\" && name === \"\" ? \"the-empty-string\" : name;\n    let dfns = getDfns(resolvedName, parent, name, type);\n    // If we haven't found any definitions with explicit [for]\n    // and [title], look for a dotted definition, \"parent.name\".\n    if (dfns.length === 0 && parent !== \"\") {\n      resolvedName = `${parent}.${resolvedName}`;\n      const alternativeDfns = definitionMap.get(resolvedName);\n      if (alternativeDfns && alternativeDfns.size === 1) {\n        dfns = [...alternativeDfns];\n        registerDefinition(dfns[0], [resolvedName]);\n      }\n    } else {\n      resolvedName = name;\n    }\n    if (dfns.length > 1) {\n      const msg = `WebIDL identifier \\`${name}\\` ${\n        parent ? `for \\`${parent}\\`` : \"\"\n      } is defined multiple times`;\n      const title = \"Duplicate definition.\";\n      showError(msg, name, { title, elements: dfns });\n    }\n    if (dfns.length) {\n      return dfns[0];\n    }\n  }\n}\n\n/**\n * @param {HTMLElement} dfnElem\n * @param {*} idlAst\n * @param {string} parent\n * @param {string} name\n */\nexport function decorateDfn(dfnElem, idlAst, parent, name) {\n  if (!dfnElem.id) {\n    const lCaseParent = parent.toLowerCase();\n    const middle = lCaseParent ? `${lCaseParent}-` : \"\";\n    let last = name.toLowerCase().replace(/[()]/g, \"\").replace(/\\s/g, \"-\");\n    if (last === \"\") {\n      last = \"the-empty-string\";\n      dfnElem.setAttribute(\"aria-label\", \"the empty string\");\n    }\n    dfnElem.id = `dom-${middle}${last}`;\n  }\n  dfnElem.dataset.idl = idlAst.type;\n  dfnElem.dataset.title = dfnElem.textContent;\n  dfnElem.dataset.dfnFor = parent;\n  // Derive the data-type for dictionary members, interface attributes,\n  // and methods\n  switch (idlAst.type) {\n    case \"operation\":\n    case \"attribute\":\n    case \"field\":\n      dfnElem.dataset.type = getDataType(idlAst);\n      break;\n  }\n\n  // Mark the definition as code.\n  if (\n    !dfnElem.querySelector(\"code\") &&\n    !dfnElem.closest(\"code\") &&\n    dfnElem.children\n  ) {\n    wrapInner(dfnElem, dfnElem.ownerDocument.createElement(\"code\"));\n  }\n\n  // Add data-lt and data-local-lt values and register them\n  switch (idlAst.type) {\n    case \"attribute\":\n    case \"constructor\":\n    case \"operation\":\n      addAlternativeNames(dfnElem, getAlternativeNames(idlAst, parent, name));\n      break;\n  }\n\n  return dfnElem;\n}\n\n/**\n * @param {string} name\n * @param {string} parent data-dfn-for\n * @param {string} originalName\n * @param {string} type\n */\nfunction getDfns(name, parent, originalName, type) {\n  const foundDfns = definitionMap.get(name);\n  if (!foundDfns || foundDfns.size === 0) {\n    return [];\n  }\n  const dfnForArray = [...foundDfns];\n  // Definitions that have a name and [data-dfn-for] that exactly match the\n  // IDL entity:\n  const dfns = dfnForArray.filter(dfn => {\n    // This is explicitly marked as a concept, so we can't use it\n    if (dfn.dataset.dfnType === \"dfn\") return false;\n\n    /** @type {HTMLElement} */\n    const closestDfnFor = dfn.closest(`[data-dfn-for]`);\n    return closestDfnFor && closestDfnFor.dataset.dfnFor === parent;\n  });\n\n  if (dfns.length === 0 && parent === \"\" && dfnForArray.length === 1) {\n    // Make sure the name exactly matches\n    return dfnForArray[0].textContent === originalName ? dfnForArray : [];\n  } else if (topLevelEntities.has(type) && dfnForArray.length) {\n    const dfn = dfnForArray.find(\n      dfn => dfn.textContent.trim() === originalName\n    );\n    if (dfn) return [dfn];\n  }\n  return dfns;\n}\n\n/**\n * @return {string}\n */\nfunction getDataType(idlStruct = {}) {\n  const { idlType, generic, union } = idlStruct;\n  if (idlType === undefined) return \"\";\n  if (typeof idlType === \"string\") return idlType;\n  if (generic) return generic;\n  // join on \"|\" handles for \"unsigned short\" etc.\n  if (union) return idlType.map(getDataType).join(\"|\");\n  return getDataType(idlType);\n}\n","// @ts-check\n/**\n * Module core/webidl-clipboard\n *\n * This module adds a button to each IDL pre making it possible to copy\n * well-formatted IDL to the clipboard.\n *\n */\nexport const name = \"core/webidl-clipboard\";\n\nfunction createButton() {\n  const copyButton = document.createElement(\"button\");\n  copyButton.innerHTML =\n    '<svg height=\"16\" viewBox=\"0 0 14 16\" width=\"14\"><path fill-rule=\"evenodd\" d=\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"/></svg>';\n  copyButton.title = \"Copy IDL to clipboard\";\n  copyButton.classList.add(\"respec-button-copy-paste\", \"removeOnSave\");\n  return copyButton;\n}\n\nconst copyButton = createButton();\n\n/**\n * Adds a HTML button that copies WebIDL to the clipboard.\n *\n * @param {HTMLSpanElement} idlHeader\n */\nexport function addCopyIDLButton(idlHeader) {\n  // There may be multiple <span>s of IDL, so we take everything\n  // apart from the idl header.\n  const pre = idlHeader.closest(\"pre.idl\");\n  const idl = pre.cloneNode(true);\n  idl.querySelector(\".idlHeader\").remove();\n  const { textContent: idlText } = idl;\n  const button = copyButton.cloneNode(true);\n  button.addEventListener(\"click\", () => {\n    navigator.clipboard.writeText(idlText);\n  });\n  idlHeader.append(button);\n}\n","/* --- WEB IDL --- */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\npre.idl {\n  padding: 1em;\n  position: relative;\n}\n\npre.idl > code {\n  color: black;\n  color: var(--text, black);\n}\n\n@media print {\n  pre.idl {\n    white-space: pre-wrap;\n  }\n}\n\n.idlHeader {\n  display: block;\n  width: 150px;\n  background: #8ccbf2;\n  background: var(--def-border, #8ccbf2);\n  color: #fff;\n  /* TODO: need a better color here */\n  color: var(--defrow-border, #fff);\n  font-family: sans-serif;\n  font-weight: bold;\n  margin: -1em 0 1em -1em;\n  height: 28px;\n  line-height: 28px;\n}\n\n.idlHeader a.self-link {\n  margin-left: 0.3cm;\n  text-decoration: none;\n  border-bottom: none;\n  color: inherit;\n}\n\n.idlID {\n  font-weight: bold;\n  color: #005a9c;\n}\n\n.idlType {\n  color: #005a9c;\n}\n\n.idlName {\n  color: #ff4500;\n}\n\n.idlName a {\n  color: #ff4500;\n  border-bottom: 1px dotted #ff4500;\n  text-decoration: none;\n}\n\na.idlEnumItem {\n  color: #000;\n  border-bottom: 1px dotted #ccc;\n  text-decoration: none;\n}\n\n.idlSuperclass {\n  font-style: italic;\n  color: #005a9c;\n}\n\n/*.idlParam*/\n\n.idlParamName,\n.idlDefaultValue {\n  font-style: italic;\n}\n\n.extAttr {\n  color: #666;\n}\n\n/*.idlSectionComment*/\n\n.idlSectionComment {\n  color: gray;\n}\n\n.idlIncludes a {\n  font-weight: bold;\n}\n\n.respec-button-copy-paste:focus {\n  text-decoration: none;\n  border-color: #51a7e8;\n  outline: none;\n  box-shadow: 0 0 5px rgba(81, 167, 232, 0.5);\n}\n\n.respec-button-copy-paste:is(:focus:hover,.selected:focus) {\n  border-color: #51a7e8;\n}\n\n.respec-button-copy-paste:is(:hover,:active,.zeroclipboard-is-hover,.zeroclipboard-is-active) {\n  text-decoration: none;\n  background-color: #ddd;\n  background-image: linear-gradient(#eee, #ddd);\n  border-color: #ccc;\n}\n\n.respec-button-copy-paste:is(:active,.selected,.zeroclipboard-is-active) {\n  background-color: #dcdcdc;\n  background-image: none;\n  border-color: #b5b5b5;\n  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);\n}\n\n.respec-button-copy-paste.selected:hover {\n  background-color: #cfcfcf;\n}\n\n.respec-button-copy-paste:is(:disabled,:disabled:hover,.disabled,.disabled:hover) {\n  color: rgba(102, 102, 102, 0.5);\n  cursor: default;\n  background-color: rgba(229, 229, 229, 0.5);\n  background-image: none;\n  border-color: rgba(197, 197, 197, 0.5);\n  box-shadow: none;\n}\n\n@media print {\n  .respec-button-copy-paste {\n    visibility: hidden;\n  }\n}\n`;\n","// Module core/webidl\n//  Highlights and links WebIDL marked up inside <pre class=\"idl\">.\n\n// TODO:\n//  - It could be useful to report parsed IDL items as events\n//  - don't use generated content in the CSS!\nimport {\n  addHashId,\n  docLink,\n  showError,\n  showWarning,\n  wrapInner,\n  xmlEscape,\n} from \"./utils.js\";\nimport { decorateDfn, findDfn } from \"./dfn-finder.js\";\nimport { html, webidl2 } from \"./import-maps.js\";\nimport { addCopyIDLButton } from \"./webidl-clipboard.js\";\nimport css from \"../styles/webidl.css.js\";\nimport { registerDefinition } from \"./dfn-map.js\";\n\nexport const name = \"core/webidl\";\nconst pluginName = name;\n\nconst operationNames = {};\nconst idlPartials = {};\n\nconst templates = {\n  wrap(items) {\n    return items\n      .flat()\n      .filter(x => x !== \"\")\n      .map(x => (typeof x === \"string\" ? new Text(x) : x));\n  },\n  trivia(t) {\n    if (!t.trim()) {\n      return t;\n    }\n    return html`<span class=\"idlSectionComment\">${t}</span>`;\n  },\n  generic(keyword) {\n    // Shepherd classifies \"interfaces\" as starting with capital letters,\n    // like Promise, FrozenArray, etc.\n    return /^[A-Z]/.test(keyword)\n      ? html`<a data-xref-type=\"interface\" data-cite=\"WEBIDL\">${keyword}</a>`\n      : // Other keywords like sequence, maplike, etc...\n        html`<a data-xref-type=\"dfn\" data-cite=\"WEBIDL\">${keyword}</a>`;\n  },\n  reference(wrapped, unescaped, context) {\n    if (context.type === \"extended-attribute\") {\n      return wrapped;\n    }\n    let type = \"_IDL_\";\n    let cite = null;\n    let lt;\n    switch (unescaped) {\n      case \"object\":\n        type = \"interface\";\n        cite = \"WEBIDL\";\n        break;\n    }\n    return html`<a\n      data-link-type=\"${type === \"_IDL_\" ? \"idl\" : type}\"\n      data-xref-type=\"${type}\"\n      data-cite=\"${cite}\"\n      data-lt=\"${lt}\"\n      >${wrapped}</a\n    >`;\n  },\n  name(escaped, { data, parent }) {\n    if (data.idlType && data.idlType.type === \"argument-type\") {\n      return html`<span class=\"idlParamName\">${escaped}</span>`;\n    }\n    const idlLink = defineIdlName(escaped, data, parent);\n    if (data.type !== \"enum-value\") {\n      const className = parent ? \"idlName\" : \"idlID\";\n      idlLink.classList.add(className);\n    }\n    return idlLink;\n  },\n  nameless(escaped, { data, parent }) {\n    switch (data.type) {\n      case \"operation\":\n      case \"constructor\":\n        return defineIdlName(escaped, data, parent);\n      default:\n        return escaped;\n    }\n  },\n  type(contents) {\n    return html`<span class=\"idlType\">${contents}</span>`;\n  },\n  inheritance(contents) {\n    return html`<span class=\"idlSuperclass\">${contents}</span>`;\n  },\n  definition(contents, { data, parent }) {\n    const className = getIdlDefinitionClassName(data);\n    switch (data.type) {\n      case \"includes\":\n      case \"enum-value\":\n        return html`<span class=\"${className}\">${contents}</span>`;\n    }\n    const parentName = parent ? parent.name : \"\";\n    const { name, idlId } = getNameAndId(data, parentName);\n    return html`<span\n      class=\"${className}\"\n      id=\"${idlId}\"\n      data-idl\n      data-title=\"${name}\"\n      >${contents}</span\n    >`;\n  },\n  extendedAttribute(contents) {\n    const result = html`<span class=\"extAttr\">${contents}</span>`;\n    return result;\n  },\n  extendedAttributeReference(name) {\n    return html`<a data-xref-type=\"extended-attribute\">${name}</a>`;\n  },\n};\n\n/**\n * Returns a link to existing <dfn> or creates one if doesn’t exists.\n */\nfunction defineIdlName(escaped, data, parent) {\n  const parentName = parent ? parent.name : \"\";\n  const { name } = getNameAndId(data, parentName);\n  const dfn = findDfn(data, name, {\n    parent: parentName,\n  });\n  const linkType = getDfnType(data.type);\n  if (dfn) {\n    if (!data.partial) {\n      if (!dfn.matches(\"[data-noexport]\")) dfn.dataset.export = \"\";\n      dfn.dataset.dfnType = linkType;\n    }\n    decorateDfn(dfn, data, parentName, name);\n    const href = `#${dfn.id}`;\n    return html`<a\n      data-link-for=\"${parentName}\"\n      data-link-type=\"${linkType}\"\n      href=\"${href}\"\n      class=\"internalDFN\"\n      ><code>${escaped}</code></a\n    >`;\n  }\n\n  const isDefaultJSON =\n    data.type === \"operation\" &&\n    data.name === \"toJSON\" &&\n    data.extAttrs.some(({ name }) => name === \"Default\");\n  if (isDefaultJSON) {\n    return html`<a data-link-type=\"dfn\" data-lt=\"default toJSON steps\"\n      >${escaped}</a\n    >`;\n  }\n  if (!data.partial) {\n    const dfn = html`<dfn data-export data-dfn-type=\"${linkType}\"\n      >${escaped}</dfn\n    >`;\n    registerDefinition(dfn, [name]);\n    decorateDfn(dfn, data, parentName, name);\n    return dfn;\n  }\n\n  const unlinkedAnchor = html`<a\n    data-idl=\"${data.partial ? \"partial\" : null}\"\n    data-link-type=\"${linkType}\"\n    data-title=\"${data.name}\"\n    data-xref-type=\"${linkType}\"\n    >${escaped}</a\n  >`;\n\n  const showWarnings =\n    name && data.type !== \"typedef\" && !(data.partial && !dfn);\n  if (showWarnings) {\n    const styledName = data.type === \"operation\" ? `${name}()` : name;\n    const ofParent = parentName ? ` \\`${parentName}\\`'s` : \"\";\n    const msg = `Missing \\`<dfn>\\` for${ofParent} \\`${styledName}\\` ${data.type}.`;\n    const hint = docLink`See ${\"using `data-dfn-for`|#data-dfn-for\"} in ReSpec's documentation.`;\n    showWarning(msg, pluginName, { elements: [unlinkedAnchor], hint });\n  }\n  return unlinkedAnchor;\n}\n\n/**\n * Map to Shepherd types, for export.\n * @see https://tabatkins.github.io/bikeshed/#dfn-types\n */\nfunction getDfnType(idlType) {\n  switch (idlType) {\n    case \"operation\":\n      return \"method\";\n    case \"field\":\n      return \"dict-member\";\n    case \"callback interface\":\n    case \"interface mixin\":\n      return \"interface\";\n    default:\n      return idlType;\n  }\n}\n\nfunction getIdlDefinitionClassName(defn) {\n  switch (defn.type) {\n    case \"callback interface\":\n      return \"idlInterface\";\n    case \"operation\":\n      return \"idlMethod\";\n    case \"field\":\n      return \"idlMember\";\n    case \"enum-value\":\n      return \"idlEnumItem\";\n    case \"callback function\":\n      return \"idlCallback\";\n  }\n  return `idl${defn.type[0].toUpperCase()}${defn.type.slice(1)}`;\n}\n\nconst nameResolverMap = new WeakMap();\nfunction getNameAndId(defn, parent = \"\") {\n  if (nameResolverMap.has(defn)) {\n    return nameResolverMap.get(defn);\n  }\n  const result = resolveNameAndId(defn, parent);\n  nameResolverMap.set(defn, result);\n  return result;\n}\n\nfunction resolveNameAndId(defn, parent) {\n  let name = getDefnName(defn);\n  // For getters, setters, etc. \"anonymous-getter\",\n  const prefix = defn.special && defn.name === \"\" ? \"anonymous-\" : \"\";\n  let idlId = getIdlId(prefix + name, parent);\n  switch (defn.type) {\n    // Top-level entities with linkable members.\n    case \"callback interface\":\n    case \"dictionary\":\n    case \"interface\":\n    case \"interface mixin\": {\n      idlId += resolvePartial(defn);\n      break;\n    }\n    case \"constructor\":\n    case \"operation\": {\n      const overload = resolveOverload(name, parent);\n      if (overload) {\n        name += overload;\n        idlId += overload;\n      } else if (defn.arguments.length) {\n        idlId += defn.arguments\n          .map(arg => `-${arg.name.toLowerCase()}`)\n          .join(\"\");\n      }\n      break;\n    }\n  }\n  return { name, idlId };\n}\n\nfunction resolvePartial(defn) {\n  if (!defn.partial) {\n    return \"\";\n  }\n  if (!idlPartials[defn.name]) {\n    idlPartials[defn.name] = 0;\n  }\n  idlPartials[defn.name] += 1;\n  return `-partial-${idlPartials[defn.name]}`;\n}\n\nfunction resolveOverload(name, parentName) {\n  const qualifiedName = `${parentName}.${name}`;\n  const fullyQualifiedName = `${qualifiedName}()`;\n  let overload;\n  if (!operationNames[fullyQualifiedName]) {\n    operationNames[fullyQualifiedName] = 0;\n  }\n  if (!operationNames[qualifiedName]) {\n    operationNames[qualifiedName] = 0;\n  } else {\n    overload = `!overload-${operationNames[qualifiedName]}`;\n  }\n  operationNames[fullyQualifiedName] += 1;\n  operationNames[qualifiedName] += 1;\n  return overload || \"\";\n}\n\nfunction getIdlId(name, parentName) {\n  if (!parentName) {\n    return `idl-def-${name.toLowerCase()}`;\n  }\n  return `idl-def-${parentName.toLowerCase()}-${name.toLowerCase()}`;\n}\n\nfunction getDefnName(defn) {\n  switch (defn.type) {\n    case \"enum-value\":\n      return defn.value;\n    case \"operation\":\n      return defn.name || defn.special;\n    default:\n      return defn.name || defn.type;\n  }\n}\n\n// IDL types that never need a data-dfn-for\nconst topLevelIdlTypes = [\n  \"interface\",\n  \"interface mixin\",\n  \"dictionary\",\n  \"namespace\",\n  \"enum\",\n  \"typedef\",\n  \"callback\",\n];\n\n/**\n * @param {Element} idlElement\n * @param {number} index\n */\nfunction renderWebIDL(idlElement, index) {\n  let parse;\n  try {\n    parse = webidl2.parse(idlElement.textContent, {\n      sourceName: String(index),\n    });\n  } catch (e) {\n    const msg = `Failed to parse WebIDL: ${e.bareMessage}.`;\n    showError(msg, pluginName, {\n      title: e.bareMessage,\n      details: `<pre>${e.context}</pre>`,\n      elements: [idlElement],\n    });\n    // Skip this <pre> and move on to the next one.\n    return [];\n  }\n  // we add \"idl\" as the canonical match, so both \"webidl\" and \"idl\" work\n  idlElement.classList.add(\"def\", \"idl\");\n  const highlights = webidl2.write(parse, { templates });\n  html.bind(idlElement)`${highlights}`;\n  wrapInner(idlElement, document.createElement(\"code\"));\n  idlElement.querySelectorAll(\"[data-idl]\").forEach(elem => {\n    if (elem.dataset.dfnFor) {\n      return;\n    }\n    const title = elem.dataset.title;\n    // Select the nearest ancestor element that can contain members.\n    const idlType = elem.dataset.dfnType;\n\n    const parent = elem.parentElement.closest(\"[data-idl][data-title]\");\n    if (parent && !topLevelIdlTypes.includes(idlType)) {\n      elem.dataset.dfnFor = parent.dataset.title;\n    }\n    if (elem.localName === \"dfn\") {\n      registerDefinition(elem, [title]);\n    }\n  });\n  // cross reference\n  const closestCite = idlElement.closest(\"[data-cite], body\");\n  const { dataset } = closestCite;\n  if (!dataset.cite) dataset.cite = \"WEBIDL\";\n  // includes webidl in some form\n  if (!/\\bwebidl\\b/i.test(dataset.cite)) {\n    const cites = dataset.cite.trim().split(/\\s+/);\n    dataset.cite = [\"WEBIDL\", ...cites].join(\" \");\n  }\n  addIDLHeader(idlElement);\n  return parse;\n}\n/**\n * Adds a \"WebIDL\" decorative header/permalink to a block of WebIDL.\n * @param {HTMLPreElement} pre\n */\nexport function addIDLHeader(pre) {\n  addHashId(pre, \"webidl\");\n  const header = html`<span class=\"idlHeader\"\n    ><a class=\"self-link\" href=\"${`#${pre.id}`}\">WebIDL</a></span\n  >`;\n  pre.prepend(header);\n  addCopyIDLButton(header);\n}\n\nexport async function run() {\n  const idls = document.querySelectorAll(\"pre.idl, pre.webidl\");\n  if (!idls.length) {\n    return;\n  }\n  const style = document.createElement(\"style\");\n  style.textContent = css;\n  document.querySelector(\"head link, head > *:last-child\").before(style);\n\n  const astArray = [...idls].map(renderWebIDL);\n\n  const validations = webidl2.validate(astArray);\n  for (const validation of validations) {\n    let details = `<pre>${xmlEscape(validation.context)}</pre>`;\n    if (validation.autofix) {\n      validation.autofix();\n      const idlToFix = webidl2.write(astArray[validation.sourceName]);\n      const escaped = xmlEscape(idlToFix);\n      details += `Try fixing as:\n      <pre>${escaped}</pre>`;\n    }\n    const msg = `WebIDL validation error: ${validation.bareMessage}`;\n    showError(msg, pluginName, {\n      details,\n      elements: [idls[validation.sourceName]],\n      title: validation.bareMessage,\n    });\n  }\n  document.normalize();\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// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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/**\n * Module: core/webidl-index\n * constructs a summary of WebIDL in the document by\n * cloning all the generated WebIDL nodes and\n * appending them to pre element.\n *\n * Usage\n * Add a <section id=\"idl-index\"> to the document.\n * It also supports title elements to generate a header.\n * Or if a header element is an immediate child, then\n * that is preferred.\n */\nexport const name = \"core/webidl-index\";\nimport { nonNormativeSelector, wrapInner } from \"./utils.js\";\nimport { addIDLHeader } from \"./webidl.js\";\n\nexport function run() {\n  /** @type {HTMLElement | null} */\n  const idlIndexSec = document.querySelector(\"section#idl-index\");\n  if (!idlIndexSec) {\n    return;\n  }\n  // Query for decedents headings, e.g., \"h2:first-child, etc..\"\n  const query = [2, 3, 4, 5, 6].map(level => `h${level}:first-child`).join(\",\");\n  if (!idlIndexSec.querySelector(query)) {\n    const header = document.createElement(\"h2\");\n    if (idlIndexSec.title) {\n      header.textContent = idlIndexSec.title;\n      idlIndexSec.removeAttribute(\"title\");\n    } else {\n      header.textContent = \"IDL Index\";\n    }\n    idlIndexSec.prepend(header);\n  }\n\n  // filter out the IDL marked with class=\"exclude\" and the IDL in non-normative sections\n  const idlIndex = Array.from(\n    document.querySelectorAll(\"pre.idl:not(.exclude) > code\")\n  ).filter(idl => !idl.closest(nonNormativeSelector));\n\n  if (idlIndex.length === 0) {\n    const text = \"This specification doesn't normatively declare any Web IDL.\";\n    idlIndexSec.append(text);\n    return;\n  }\n\n  const pre = document.createElement(\"pre\");\n  pre.classList.add(\"idl\", \"def\");\n  pre.id = \"actual-idl-index\";\n  idlIndex\n    .map(elem => {\n      const fragment = document.createDocumentFragment();\n      for (const child of elem.children) {\n        fragment.appendChild(child.cloneNode(true));\n      }\n      return fragment;\n    })\n    .forEach(elem => {\n      if (pre.lastChild) {\n        pre.append(\"\\n\\n\");\n      }\n      pre.appendChild(elem);\n    });\n  // Remove duplicate IDs\n  pre.querySelectorAll(\"*[id]\").forEach(elem => elem.removeAttribute(\"id\"));\n\n  // Add our own IDL header\n  idlIndexSec.appendChild(pre);\n  wrapInner(pre, document.createElement(\"code\"));\n  addIDLHeader(pre);\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\">↑</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> </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// 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 { 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\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\n// Module w3c/seo\n// Manages SEO information for documents\n// e.g. set the canonical URL for the document if configured\nimport { W3CNotes, recTrackStatus, registryTrackStatus } from \"./headers.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { resolveRef } from \"../core/biblio.js\";\nimport { showWarning } from \"../core/utils.js\";\nexport const name = \"w3c/seo\";\n\nconst status2rdf = {\n  NOTE: \"w3p:NOTE\",\n  WD: \"w3p:WD\",\n  LC: \"w3p:LastCall\",\n  CR: \"w3p:CR\",\n  CRD: \"w3p:CRD\",\n  PR: \"w3p:PR\",\n  REC: \"w3p:REC\",\n  RSCND: \"w3p:RSCND\",\n};\n\nexport const requiresCanonicalLink = new Set([\n  ...W3CNotes,\n  ...recTrackStatus,\n  ...registryTrackStatus,\n  \"BG-FINAL\",\n  \"CG-FINAL\",\n  \"CRY\",\n  \"DRY\",\n  \"draft-finding\",\n  \"finding\",\n]);\n\nexport async function run(conf) {\n  // Don't include a canonical URL for documents that haven't been published.\n  if (\n    (!conf.canonicalURI && !requiresCanonicalLink.has(conf.specStatus)) ||\n    !conf.shortName\n  ) {\n    return;\n  }\n  switch (conf.canonicalURI) {\n    case \"edDraft\":\n      if (conf.edDraftURI) {\n        conf.canonicalURI = new URL(\n          conf.edDraftURI,\n          document.location.href\n        ).href;\n      } else {\n        const msg = `Canonical URI set to edDraft, but no edDraftURI is set in configuration`;\n        showWarning(msg, name);\n        conf.canonicalURI = null;\n      }\n      break;\n    case \"TR\":\n      if (conf.latestVersion) {\n        conf.canonicalURI = conf.latestVersion;\n      } else {\n        const msg = `Canonical URI set to TR, but no shortName is set in configuration`;\n        showWarning(msg, name);\n        conf.canonicalURI = null;\n      }\n      break;\n    default:\n      if (conf.latestVersion && !conf.canonicalURI) {\n        conf.canonicalURI = conf.latestVersion;\n      }\n  }\n  if (conf.canonicalURI) {\n    const linkElem = html`<link rel=\"canonical\" href=\"${conf.canonicalURI}\" />`;\n    document.head.appendChild(linkElem);\n  }\n\n  if (conf.doJsonLd) {\n    await addJSONLDInfo(conf, document);\n  }\n}\n\nasync function addJSONLDInfo(conf, doc) {\n  const rdfStatus = status2rdf[conf.specStatus];\n  // Content for JSON\n  const type = [\"TechArticle\"];\n  if (rdfStatus) type.push(rdfStatus);\n\n  const jsonld = {\n    \"@context\": [\n      \"http://schema.org\",\n      {\n        \"@vocab\": \"http://schema.org/\",\n        \"@language\": doc.documentElement.lang || \"en\",\n        w3p: \"http://www.w3.org/2001/02pd/rec54#\",\n        foaf: \"http://xmlns.com/foaf/0.1/\",\n        datePublished: { \"@type\": \"http://www.w3.org/2001/XMLSchema#date\" },\n        inLanguage: { \"@language\": null },\n        isBasedOn: { \"@type\": \"@id\" },\n        license: { \"@type\": \"@id\" },\n      },\n    ],\n    id: conf.canonicalURI || conf.thisVersion,\n    type,\n    name: document.title,\n    inLanguage: doc.documentElement.lang || \"en\",\n    license: conf.licenseInfo?.url,\n    datePublished: conf.dashDate,\n    /** @type {{ name: string, url?: string } | { name: string, url?: string }[]} */\n    copyrightHolder: {\n      name: \"World Wide Web Consortium\",\n      url: \"https://www.w3.org/\",\n    },\n    discussionUrl: conf.issueBase,\n    alternativeHeadline: conf.subtitle,\n    isBasedOn: conf.prevVersion,\n  };\n\n  // add any additional copyright holders\n  if (conf.additionalCopyrightHolders) {\n    const addl = Array.isArray(conf.additionalCopyrightHolders)\n      ? conf.additionalCopyrightHolders\n      : [conf.additionalCopyrightHolders];\n    jsonld.copyrightHolder = [\n      jsonld.copyrightHolder,\n      ...addl.map(h => ({ name: h })),\n    ];\n  }\n\n  // description from meta description\n  const description = doc.head.querySelector(\"meta[name=description]\");\n  if (description) {\n    jsonld.description = description.content;\n  }\n\n  // Editors\n  if (conf.editors) {\n    jsonld.editor = conf.editors.map(addPerson);\n  }\n  if (conf.authors) {\n    jsonld.contributor = conf.authors.map(addPerson);\n  }\n\n  // normative and informative references\n  const citationIds = [\n    ...conf.normativeReferences,\n    ...conf.informativeReferences,\n  ];\n  const citationContents = await Promise.all(\n    citationIds.map(ref => resolveRef(ref))\n  );\n  jsonld.citation = citationContents\n    .filter(ref => typeof ref === \"object\")\n    .map(addRef);\n\n  const script = doc.createElement(\"script\");\n  script.type = \"application/ld+json\";\n  script.textContent = JSON.stringify(jsonld, null, 2);\n  doc.head.appendChild(script);\n}\n\n/**\n * Turn editors and authors into a list of JSON-LD relationships\n */\nfunction addPerson({ name, url, mailto, company, companyURL }) {\n  const ed = {\n    type: \"Person\",\n    name,\n    url,\n    \"foaf:mbox\": mailto,\n  };\n  if (company || companyURL) {\n    ed.worksFor = {\n      name: company,\n      url: companyURL,\n    };\n  }\n  return ed;\n}\n\n/**\n * Create a reference URL from the ref\n */\nfunction addRef(ref) {\n  const { href: id, title: name, href: url } = ref;\n  const jsonld = {\n    id,\n    type: \"TechArticle\",\n    name,\n    url,\n  };\n  if (ref.authors) {\n    jsonld.creator = ref.authors.map(a => ({ name: a }));\n  }\n  if (ref.rawDate) {\n    jsonld.publishedDate = ref.rawDate;\n  }\n  if (ref.isbn) {\n    jsonld.identifier = ref.isbn;\n  }\n  if (ref.publisher) {\n    jsonld.publisher = { name: ref.publisher };\n  }\n  return jsonld;\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","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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","// @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\n/**\n * This module adds a \"monetization\" meta-tag to enable web-monetization.\n *\n * The meta-tag is added only to \"live\" documents, and is removed from generated\n * static documents.\n */\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/web-monetization\";\n\nexport function run(conf) {\n  if (conf.monetization === false) {\n    return;\n  }\n  const { monetization } = conf;\n\n  const { removeOnSave, paymentPointer } = canonicalizeConfig(monetization);\n\n  const cssClass = removeOnSave ? \"removeOnSave\" : null;\n  document.head.append(\n    html`<meta\n      name=\"monetization\"\n      content=\"${paymentPointer}\"\n      class=\"${cssClass}\"\n    />`\n  );\n}\n\n/**\n * @param {object|string} rawConfig\n * - {string} paymentPointer - The payment pointer to use.\n * - {boolean} removeOnSave - Whether to remove the meta tag when the document is saved.\n */\nfunction canonicalizeConfig(rawConfig) {\n  const config = {\n    paymentPointer: \"$respec.org\",\n    removeOnSave: true,\n  };\n  switch (typeof rawConfig) {\n    case \"string\":\n      config.paymentPointer = rawConfig;\n      break;\n    case \"object\":\n      if (rawConfig.paymentPointer) {\n        config.paymentPointer = String(rawConfig.paymentPointer);\n      }\n      if (rawConfig.removeOnSave === false) {\n        config.removeOnSave = false;\n      }\n      break;\n  }\n  return config;\n}\n","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\n}\n","import { docLink, showError } from \"./utils.js\";\nimport { sub } from \"./pubsubhub.js\";\n\nexport const name = \"core/before-save\";\n\nexport function run(conf) {\n  if (!conf.beforeSave) return;\n\n  if (\n    !Array.isArray(conf.beforeSave) ||\n    conf.beforeSave.some(\n      el => typeof el !== \"function\" || el.constructor.name === \"AsyncFunction\"\n    )\n  ) {\n    const msg = docLink`${\"[beforeSave]\"} configuration option must be an array of synchronous JS functions.`;\n    showError(msg, name);\n    return;\n  }\n\n  sub(\n    \"beforesave\",\n    documentElement => {\n      performTransformations(conf.beforeSave, documentElement.ownerDocument);\n    },\n    { once: true }\n  );\n}\n/**\n * @param {Array<Function>} transforms\n * @param {Document}\n */\nfunction performTransformations(transforms, doc) {\n  let pos = 0;\n  for (const fn of transforms) {\n    try {\n      fn(doc);\n    } catch (err) {\n      const nameOrPosition = `\\`${fn.name}\\`` || `at position ${pos}`;\n      const msg = docLink`Function ${nameOrPosition}\\` threw an error during processing of ${\"[beforeSave]\"}.`;\n      const hint = \"See developer console.\";\n      showError(msg, name, { hint });\n      console.error(err);\n    } finally {\n      pos++;\n    }\n  }\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-captionless-tables\".\n *\n * Checks that there are no tables in the document which don't start\n * with a caption element.\n *\n * As some tables may not contain tabular data, this only applies to\n * tables marked with class=\"numbered\".\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"no-captionless-tables\";\nexport const name = \"core/linter-rules/no-captionless-tables\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"All tables marked with class='numbered' must start with a caption element.\",\n    hint: \"Add a `caption` to the offending table.\",\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 tables = document.querySelectorAll(\"table.numbered\");\n  const offendingElements = [...tables].filter(\n    table => !(table.firstElementChild instanceof HTMLTableCaptionElement)\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-dfns\".\n *\n * Complains if an internal/un-exported definitions is not linked to.\n */\nimport {\n  docLink,\n  getIntlData,\n  norm,\n  showError,\n  showWarning,\n} from \"../utils.js\";\n\nconst ruleName = \"no-unused-dfns\";\nexport const name = \"core/linter-rules/no-unused-dfns\";\n\nconst localizationStrings = {\n  en: {\n    msg(text) {\n      return `Found definition for \"${text}\", but nothing links to it. This is usually a spec bug!`;\n    },\n    get hint() {\n      return docLink`\n        You can do one of the following...\n\n          * Add a \\`class=\"lint-ignore\"\\` attribute the definition.\n          * Either remove the definition or change \\`<dfn>\\` to another type of HTML element.\n          * If you meant to ${\"[export|#data-export]\"} the definition, add \\`class=\"export\"\\` to the definition.\n\n        To silence this warning entirely, set \\`lint: { \"no-unused-dfns\": false }\\` in your \\`respecConfig\\`.`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) return;\n  const logger = conf.lint[ruleName] === \"error\" ? showError : showWarning;\n  /** @type NodeListOf<HTMLElement> */\n  const definitions = document.querySelectorAll(\n    \"dfn:not(.lint-ignore, [data-export], [data-cite])\"\n  );\n\n  const elements = [...definitions].filter(isDfnUnused);\n\n  // These are usually bad spec bugs, so best shown individually.\n  elements.forEach(element => {\n    const elements = [element];\n    const text = norm(element.textContent);\n    logger(l10n.msg(text), name, { elements, hint: l10n.hint });\n  });\n}\n\nfunction isDfnUnused(dfn) {\n  // Not in the index\n  // and not the \"self-link\" box\n  return !document.querySelector(\n    `a[href=\"#${dfn.id}\"]:not(.index-term, .self-link)`\n  );\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 * The W3C Process requires separate Privacy Considerations and Security\n * Considerations sections. This linter checks for the presence of these\n * sections, and reports an error if they are not present.\n */\n\nimport {\n  InsensitiveStringSet,\n  docLink,\n  getIntlData,\n  getIntlDataForKey,\n  norm,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { W3CNotes, recTrackStatus } from \"../headers.js\";\n\nconst ruleName = \"required-sections\";\nexport const name = \"w3c/linter-rules/required-sections\";\n\nconst localizationStrings = {\n  en: {\n    msg(sectionTitle) {\n      return `W3C Recommendation track documents require a separate \"${sectionTitle}\" section.`;\n    },\n    hint(sectionTitle) {\n      return docLink`Add a \\`<section>\\` with a \"${sectionTitle}\" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).\n        If the document is not intended for the W3C Recommendation track, set ${\"[noRecTrack]\"} to \\`true\\`\n        or turn off the ${`[${ruleName}]`} linter rule.`;\n    },\n    privacy_considerations: \"Privacy Considerations\",\n    security_considerations: \"Security Considerations\",\n  },\n  es: {\n    msg(sectionTitle) {\n      return `Documentos que van a ser \"W3C Recommendation\" requieren una sección \"${sectionTitle}\" separada.`;\n    },\n    hint(sectionTitle) {\n      return docLink`Agrega una \\`<section>\\` con título \"${sectionTitle}\". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).\n        Si el documento no está destinado a ser un W3C Recommendation, puedes poner ${\"[noRecTrack]\"} a \\`true\\`\n        o apaga la regla de linter ${`[${ruleName}]`}.`;\n    },\n    privacy_considerations: \"Consideraciones de privacidad\",\n    security_considerations: \"Consideraciones de Seguridad\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport const requiresSomeSectionStatus = new Set([...recTrackStatus]);\nrequiresSomeSectionStatus.delete(\"DISC\"); // \"Discontinued Draft\"\n// W3C notes do not require privacy or security considerations sections.\nW3CNotes.forEach(note => requiresSomeSectionStatus.delete(note));\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  // We can't check for headers unless we also have a translation\n  if (!getIntlDataForKey(localizationStrings, \"privacy_considerations\")) {\n    // We can't check for headers unless we also have a translation\n    const msg = `Cannot check for required sections as translations are not available.`;\n    const hint = `File an issue to add translations or use a supported language.`;\n    showWarning(msg, name, { hint });\n    return;\n  }\n\n  if (conf.noRecTrack || !requiresSomeSectionStatus.has(conf.specStatus)) {\n    return;\n  }\n\n  const logger = conf.lint[ruleName] === \"error\" ? showError : showWarning;\n\n  const missingRequiredSections = new InsensitiveStringSet([\n    l10n.privacy_considerations,\n    l10n.security_considerations,\n  ]);\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const headers = document.querySelectorAll(\"h2, h3, h4, h5, h6\");\n  for (const header of headers) {\n    const clone = header.cloneNode(true);\n    // section number and self-link anchor\n    clone.querySelectorAll(\"bdi\")?.forEach(elem => elem.remove());\n    const text = norm(clone.textContent);\n    if (missingRequiredSections.has(text)) {\n      missingRequiredSections.delete(text);\n      // Check if we find them all...\n      if (missingRequiredSections.size === 0) {\n        return; // All present, early return!\n      }\n    }\n  }\n\n  // Show the ones we didn't find individually\n  for (const title of missingRequiredSections) {\n    logger(l10n.msg(title), name, {\n      hint: l10n.hint(title),\n    });\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","// @ts-check\n/**\n * Linter rule \"informative-dfn\".\n *\n * Complains if an informative definition is referenced from a normative section.\n */\nimport { docLink, getIntlData, showError, showWarning } from \"../utils.js\";\n\nimport { informativeRefsInNormative } from \"../xref.js\";\n\nconst ruleName = \"informative-dfn\";\nexport const name = \"core/linter-rules/informative-dfn\";\n\nconst localizationStrings = {\n  en: {\n    msg(term, cite) {\n      return `Normative reference to \"${term}\" found but term is defined \"informatively\" in \"${cite}\".`;\n    },\n    get hint() {\n      return docLink`\n        You can do one of the following...\n\n          * Get the source definition to be made normative\n          * Add a \\`class=\"lint-ignore\"\\` attribute to the link.\n          * Use a local normative proxy for the definition à la \\`<dfn data-cite=\"spec\">term</dfn>\\`\n\n        To silence this warning entirely, set \\`lint: { \"${ruleName}\": false }\\` in your \\`respecConfig\\`.`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) return;\n  const logger = conf.lint[ruleName] === \"error\" ? showError : showWarning;\n\n  informativeRefsInNormative.forEach(({ term, spec, element }) => {\n    if (element.classList.contains(\"lint-ignore\")) return;\n    logger(l10n.msg(term, spec), name, {\n      title: \"Normative reference to non-normative term.\",\n      elements: [element],\n      hint: l10n.hint,\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","source","position","current","message","kind","level","autofix","ruleName","sliceTokens","count","slice","Math","max","tokensToText","inputs","precedes","text","t","trivia","join","nextToken","type","length","line","precedingLastLine","splitted","split","lastLine","subsequentTokens","subsequentText","sourceContext","repeat","contextType","context","partial","node","hierarchy","unshift","n","base","appendIfExist","contextAsText","bareMessage","sourceName","input","tokens","syntaxError","validationError","token","Base","constructor","Object","defineProperties","writable","toJSON","json","inheritance","proto","descMap","getOwnPropertyDescriptors","key","entries","enumerable","getPrototypeOf","idlTypeIncludesDictionary","idlType","defs","useNullableInner","union","def","unique","typedefIncludesDictionary","cache","reference","dictionary","nullable","subtype","dictionaryIncludesRequiredField","dict","members","field","required","superdict","ArrayBase","Array","super","WrappedToken","parser","tokeniser","consumeKind","unescape","write","w","ts","separator","Eof","parse","tokenName","list","listName","extAttrValueSyntax","renamedLegacies","extAttrListItems","syntax","toks","ExtendedAttributeParameters","assign","consume","ret","autoParenter","asterisk","secondaryName","rhsIsList","argument_list","close","rhsType","reference_token","p","identifier","SimpleExtendedAttribute","params","defineProperty","rhs","arguments","validate","extAttr","arg","extendedAttribute","extendedAttributeReference","ExtendedAttributes","push","unconsume","probe","ea","type_suffix","obj","single_type","typeName","Type","return_type","type_with_extended_attributes","keyType","stringTypes","keyIdlType","valueType","generic_type","primitive_type","typeNameKeywords","generic","typ","or","union_type","extAttrs","Boolean","prefix","postfix","filter","replaceAllowShared","typedef","targetToken","firstToken","ref","unescaped","type_body","indexOf","splice","match","Default","const_value","expression","const_data","negative","Argument","start_position","optional","variadic","argumentNameKeywords","default","autofixOptionalDictionaryDefaultValue","requiredExists","a","isLastRequiredArgument","getFirstToken","name_token","data","Tokeniser","Operation","special","regular","termination","argument","body","definition","nameless","Attribute","noInherit","readonly","idlTypeIncludesEnforceRange","startsWith","allowDangler","first","items","item","num_type","integer_type","decimal_type","voidToken","stringifier","getLastIndentation","str","lines","autofixAddExposedWindow","exposed","existing","test","values","sort","x","y","isArray","tokenRe","decimal","integer","string","whitespace","comment","other","nonRegexTerminals","concat","punctuations","reserved","idl","lastCharIndex","nextChar","charAt","attemptTokenMatch","noFlushTrivia","currentTrivia","pop","lastIndex","WebIDLParseError","punctuation","re","exec","tokenise","probeKind","candidates","consumeIdentifier","EnumValue","Enum","v","Includes","mixin","Typedef","CallbackFunction","Container","instance","inheritable","allowedMembers","colon","mem","member","m","Constant","IterableLike","secondTypeRequired","secondTypeAllowed","argumentAllowed","argsOpen","argsClose","Constructor","static_member","Interface","extMembers","every","oldConstructors","autofixConstructor","factoryFunctions","named","i","opNames","ops","getOperations","statics","Set","op","nonstatics","groupOperationNames","partials","mixins","mixinMap","ext","additions","checkAdditions","forEach","add","existings","addition","checkInterfaceMemberDuplication","interfaceDef","constructorExtAttr","indentation","memberIndent","parentTrivia","indentCh","getMemberIndentation","constructorOp","existingIndex","array","predicate","reverse","findIndex","findLastIndex","removed","trim","Mixin","Field","Dictionary","Namespace","CallbackInterface","parseByTokens","interface_","opts","extensions","interface","productions","production","callbackInterface","namespace","res","eof","concrete","definitions","noop","templates","Writer","raw","wrapper","bind","id","getMixinMap","include","validateIterable","ast","duplicates","groupDefinitions","dup","checkDuplicatedNames","flat","it","HTTPTokenCodePoints","HTTPWhiteSpace","HTTPQuotedString","storeParam","paramName","paramValue","toLowerCase","_getDefaults","breaks","gfm","hooks","pedantic","renderer","silent","tokenizer","walkTokens","_defaults","changeDefaults","newDefaults","escapeTest","escapeReplace","RegExp","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","ch","escape$1","encode","unescapeTest","_","fromCharCode","parseInt","substring","caret","edit","regex","opt","val","valSource","getRegex","cleanUrl","href","encodeURI","noopTest","splitCells","tableRow","cells","offset","escaped","curr","rtrim","invert","l","suffLen","currChar","outputLink","cap","link","lexer","title","state","inLink","inlineTokens","_Tokenizer","rules","space","src","block","newline","code","codeBlockStyle","fences","matchIndentToCode","indentToCode","matchIndentInNode","indentInNode","indentCodeCompensation","inline","anyPunctuation","heading","trimmed","depth","hr","blockquote","top","blockTokens","bull","isordered","ordered","start","loose","itemRegex","itemContents","endsWithBlankLine","endEarly","nextLine","indent","trimStart","search","blankLine","nextBulletRegex","min","hrRegex","fencesBeginRegex","headingBeginRegex","rawLine","ischecked","istask","task","checked","trimEnd","spacers","hasMultipleLineBreaks","pre","tag","table","headers","aligns","rows","header","align","row","cell","lheading","paragraph","escape","inRawBlock","trimmedUrl","rtrimSlash","lastParenIndex","b","findClosingBracket","linkLen","reflink","links","nolink","emStrong","maskedSrc","prevChar","emStrongLDelim","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","emStrongRDelimAst","emStrongRDelimUnd","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","create","lex","lexInline","next","lastToken","cutSrc","lastParagraphClipped","leading","tabs","extTokenizer","call","startBlock","startIndex","Infinity","tempSrc","tempStart","getStartIndex","errMsg","charCodeAt","console","keepPrevChar","keys","lastIndexOf","startInline","_Renderer","infostring","quote","listitem","checkbox","tablerow","content","tablecell","flags","strong","em","cleanHref","out","image","_TextRenderer","_Parser","textRenderer","parseInline","renderers","genericToken","headingToken","codeToken","tableToken","j","k","blockquoteToken","listToken","itemBody","htmlToken","paragraphToken","textToken","escapeToken","tagToken","linkToken","imageToken","strongToken","emToken","codespanToken","delToken","_Hooks","static","preprocess","markdown","postprocess","processAllTokens","markedInstance","defaults","setOptions","parseMarkdown","Parser","Renderer","TextRenderer","Lexer","Tokenizer","Hooks","use","childTokens","pack","prevRenderer","extLevel","rendererProp","rendererFunc","tokenizerProp","tokenizerFunc","prevTokenizer","hooksProp","hooksFunc","prevHook","passThroughHooks","packWalktokens","origOpt","warn","throwError","onError","toString","msg","marked","getDefaults","globalThis","global","getDefaultExportFromCjs","__esModule","hasOwnProperty","module","pluralize$1","exports","root","pluralize","commonjsGlobal","pluralRules","singularRules","uncountables","irregularPlurals","irregularSingles","sanitizeRule","rule","restoreCase","word","toUpperCase","substr","sanitizeWord","len","replaceWord","replaceMap","keepMap","checkWord","bool","inclusive","singular","plural","isPlural","isSingular","addPluralRule","replacement","addSingularRule","addUncountableRule","addIrregularRule","single","hyperHTML","N","r","configurable","o","random","s","WeakSet","u","insertBefore","selected","selectedIndex","f","querySelectorAll","nextSibling","E","remove","parentNode","removeChild","compare","before","h","d","g","newi","oldi","prev","C","createEvent","initCustomEvent","bubbles","cancelable","_wire$","ELEMENT_NODE","nodeType","A","S","O","T","M","L","P","D","W","attributes","define","invoke","$","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","ie","ae","oe","ue","ce","le","se","fe","he","de","ve","pe","ge","me","ye","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","at","ut","ot","ct","lt","template","tagger","st","ft","ht","dt","vt","pt","gt","wire","Component","diff","hyper","for","handleEvent","currentTarget","svg","defaultState","dispatch","component","setState","idb","_idb","_marked","MIMEType","TypeError","parserMode","inputArray","from","char","fromEntries","parseMimeType","parameters","essence","mimeType","size","paramStr","serialize","_pluralize","webidl2","_webidl2","dashes","ISODate","Intl","DateTimeFormat","timeZone","year","month","day","dateLang","docLang","W3CDate","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","getIntlDataForKey","concatDate","date","sep","format","runTransforms","flist","funcArgs","methods","meth","showWarning","fetchAndCache","maxAge","Request","cachedResponse","caches","Date","err","response","fetch","ok","clonedResponse","clone","customHeaders","Headers","expiryDate","now","toISOString","cacheResponse","Response","blob","put","htmlJoinComma","joined","htmlJoinAnd","addHashId","hash","imul","hashString","addId","pfx","txt","noLC","normalize","getElementById","nextId","getDfnTitles","titleSet","normText","dataset","child","getElementsByTagName","localLt","renameElement","newName","copyAttributes","localName","newElement","append","replaceWith","refTypeFromContext","element","closestInformative","closest","isInformative","querySelector","illegal","wrapInner","outer","getPreviousSections","sections","previous","previousElementSibling","iteratePreviousElements","parents","selector","parentElement","getElementIndentation","previousSibling","Node","TEXT_NODE","InsensitiveStringSet","getCanonicalKey","existingKey","find","makeSafeCopy","dfn","removeCommentNodes","walker","createTreeWalker","NodeFilter","SHOW_COMMENT","walkTree","nextNode","CaseInsensitiveMap","RespecError","plugin","isWarning","elements","markAsOffending","details","showError","pluginName","makePluginUtils","toMDCode","codedJoinOr","quotes","addQuotes","codedJoinAnd","docLink","strings","reindent","endsWith","linkingText","indents","leastIndent","mimeTypes","rsDocToDataURL","validTypes","encodeURIComponent","cloneDoc","head","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","runnables","isRunnableModule","plug","run","Plugin","prepare","executePreparePass","timerId","measure","executeRunPass","postProcess","afterEnd","css$p","gtEntity","ampEntity","infoString","isEscaped","language","metaData","parseInfoString","example","illegalExample","className","firstSpace","metaDataStr","headingWithIdRegex","markdownToHtml","potentialMarkdown","convertElement","processMDSections","conf","hasMDSections","isMDFormat","rsUI","newBody","firstTwo","lastTwo","workaroundBlockLevelMarkdown","substituteWithTextNodes","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$D","group","style$1","github$1","dataInclude","abstract","dataTransform","dataAbbr","inlines","conformance","examples","issuesNotes","bestPractices","figures","tables","webidl","biblio$1","linkToDfn","xref","dataCite","renderBiblio","dfnIndex","contrib","fixHeaders","webidlIndex","structure","informative","idHeaders","caniuse","mdnAnnotation","saveHtml","searchSpecref","searchXref","aboutRespec","seo$1","seo","highlight","webidlClipboard","dataTests","listSorter","highlightVars$1","dataType","algorithms","anchorExpander","dfnPanel","webMonetization","dfnContract","beforeSave","checkCharset","checkPunctuation","checkInternalSlots","localRefsExist","noCaptionlessTables","noUnusedDfns","noHeadinglessSections","noUnusedVars","requiredSections","wptTestsExist","noHttpProps","a11y","informativeDfn","ReSpec.run","newHash","isLegacyFrag","W3C_GROUPS_API","getGroupDetails","shortname","wgId","wg","patentURI","wgPatentURI","patentPolicy","wgPatentPolicy","groupType","wgURI","status","groupDetails","groups","getMultipleGroupDetails","showLink","class","showLinkData","showLogo","logo","alt","height","width","until","es","ko","ja","zh","orcidIcon","showPeople","propName","people","validatePerson","person","docsUrl","seePersonHint","preamble","orcid","orcidUrl","orcidId","pathname","lastDigit","remainder","Number","reduce","acc","lastDigitInt","lastDigitShould","checkOrcidChecksum","retiredDate","rawDate","extras","extra","validateExtras","mailto","companyURL","company","personToHTML","personName","editorId","w3cid","contents","protocol","hCard","companyElem","note","classVal","renderExtra","time","archives","author","authors","commit_history","edited_in_place","editor","editors","feedback","former_editor","former_editors","history","implementation_report","latest_editors_draft","latest_published_version","latest_recommendation","message_topic","more_details_about_this_doc","multiple_alternates","prev_editor_draft","prev_recommendation","prev_version","publication_history","test_suite","this_version","with_subject_line","your_topic_here","nl","getSpecSubTitleElem","specSubTitleElem","subtitle","headersTmpl","logos","specType","isCR","isCRY","longStatus","textStatus","prependW3C","specStatus","dashDate","publishDate","modificationDate","renderSpecTitle","localStorage","getItem","thisVersion","latestVersion","edDraftURI","historyURI","github","commitHistoryURL","testSuiteURI","implementationReportURI","prevED","showPreviousVersion","prevVersion","prevRecURI","isRec","formerEditors","wgPublicList","renderFeedback","errata","otherLinks","shortName","alternateFormats","multipleAlternates","alternatesHTML","existingCopyright","isUnofficial","licenseInfo","copyrightStart","publishYear","additionalCopyrightHolders","short","linkLicense","renderOfficialCopyright","renderCopyright","repoURL","issuesURL","newIssuesURL","pullsURL","fullName","mailToURL","subject","subjectPrefix","mailingListLink","subjectLine","emailSubject","archiveURL","archiveLink","cgbgHeadersTmpl","specTitleElem","specTitleElemClone","isCGFinal","sotd","status_at_publication","processLink","sotdTmpl","isPreview","renderPreview","additionalContent","renderIsUnofficial","isTagFinding","isNoTrack","isMO","renderIsNoTrack","isMemberSubmission","teamComment","getUTCFullYear","submissionCommentNumber","patentPolicyURL","noteForMemberSubmission","noteForSubmission","sotdAfterWGinfo","overrideStatus","changes","proposedAdditions","proposedCorrections","corrections","hasRevisions","track","status2track","getWgHTML","linkToWorkingGroup","revisedRecEnd","updatableRec","reviewTarget","renderIsRec","statusExplanation","reviewPolicy","endorsement","updatePolicy","lsUpdatePolicy","pubMode","humanPREnd","humanCREnd","crEnd","prEnd","renderNotRec","isNote","isRegistry","multipleWGs","wgPatentHTML","producers","renderDeliverer","additionalSections","prUrl","prNumber","idx","cgbgSotdTmpl","mailToWGPublicListWithSubject","mailToWGPublicListSubscription","renderPublicList","issueBase","linkToCommunity","w3Url","status2maturity","LS","LD","FPWD","status2text","DNOTE","NOTE","STMT","MO","ED","WD","CR","CRD","PR","REC","DISC","RSCND","DRY","CRYD","CRY","RY","unofficial","UD","finding","status2long","W3CNotes","recTrackStatus","registryTrackStatus","tagStatus","cgStatus","bgStatus","cgbgStatus","trStatus","noTrackStatus","licenses","patentPolicies","validateDateAndRecover","fallbackDate","isFinite","formattedDate","collectSotdContent","sotdClone","hasChildNodes","isBasic","isCGBG","isCRDraft","isEd","isPR","isRecTrack","isRegular","isTagEditorFinding","license","lCaseLicense","deriveLicenseInfo","lastModified","pubSpace","derivePubSpace","maturity","docVersion","reportType","latestVersionURL","validateCGBG","validateIfAllowedOnTR","latestPath","previousPublishDate","previousMaturity","prevMaturity","pubDate","prevPubDate","prevRecShortname","uri","publishISODate","shortISODate","policies","policy","validatePatentPolicies","canShowHistory","historyURL","deriveHistoryURI","wgPotentialArray","isPr","isUpdatableRec","contains","hasCorrections","hasProposedCorrections","hasAdditions","hasProposedAdditions","noRecTrack","notAllowed","mailToWGPublicList","populateSoTD","generatedSubtitle","coreDefaults","lint","highlightVars","addSectionLinks","w3cLogo","memSubmissionLogo","w3cDefaults","doJsonLd","excludeGithubLinks","supportedStatus","validateStatusForGroup","isWgStatus","inWorkingGroup","doesNotNeedWG","processLogos","css$n","noReSpecCSS","attachFixupScript","getStyleUrl","resourceHints","createResourceHints","styleMover","linkURL","exportDoc","w3cStyle","styleFile","noToc","finalStyleURL","canonicalStatus","canUseW3CStyle","getStyleFile","colorScheme","darkModeStyleUrl","resolveGithubPromise","rejectGithubPromise","file_a_bug","participate","ghURL","tempURL","org","repo","branch","newProps","githubToken","githubUser","atRiskBase","pullBase","githubAPI","hostname","otherLink","normalizedGHObj","apiBase","normalizedConfig","DOMBuilder","findPosition","tagName","findParent","findHeader","addHeader","section","addSection","addElement","builder","restructure","structuredInternals","processResponse","rawData","oninclude","includeReplace","includeFormat","fill","fillWithText","attr","removeIncludeAttributes","runIncludes","currentDepth","includables","promisesToInclude","includeId","default_title","h1Elem","isConnected","tempElem","documentTitle","setDocumentTitle","isInteger","searchString","toLocaleLowerCase","findAbstract","processDfnElement","abbr","fullForm","insertAdjacentHTML","idlPrimitiveRegex","exceptionRegex","methodRegex","slotRegex","attributeRegex","baseRegex","enumRegex","methodSplitRegex","slotSplitRegex","isProbablySlotRegex","renderBase","renderParent","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","parseInlineIDL","output","ALLOWED_TYPES","readyPromise","openDB","deleteObjectStore","createObjectStore","keyPath","createIndex","range","IDBKeyRange","lowerBound","entry","expires","openIdb","biblioDB","isAlias","resolveAlias","only","aliasOf","addAll","aliasesAndRefs","alias","promisesToAdd","flatMap","isInDB","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","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","localeCompare","sec","showRef","aliases","getAliases","refUrl","selectors","elems","linkType","decorateInlineReference","warnBadRefs","circular","renderInlineCitation","linkText","refId","stringifyReference","etAl","publisher","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","normativity","keywordInterpretation","terms","processConformance","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$l","makeTitle","num","report","number","div","inAside","exampleTitle","css$j","editors_note","feature_at_risk","issue","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","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","issueNumbers","issues","fetchAndStoreGithubIssues","headElem","ednote","best_practice","defaultLang","bps","bpSummary","summaryItems","bp","localizedBpName","container","list_of_figures","fig","tof","caption","figure","decorateFigure","figureId","tofCaption","anchor","getTableOfFiguresListItem","collectFigures","tofElement","previousSections","decorateTableOfFigures","list_of_tables","listOfTables","decorateTable","tableId","listOfTablesCaption","getListOfTablesListItem","collectTables","listOfTablesElement","decorateListOfTables","topLevelEntities","findDfn","defn","findNormalDfn","asMethodName","findOperationDfn","resolvedName","getDfns","alternativeDfns","decorateDfn","dfnElem","idlAst","lCaseParent","middle","last","getDataType","local","exportable","addAlternativeNames","asQualifiedName","asFullyQualifiedName","asMethodWithArgs","operationName","argsAst","operationNames","isOptional","requiredArgs","requiredOperation","optionalOps","generateMethodNamesWithArgs","getAlternativeNames","originalName","foundDfns","dfnForArray","closestDfnFor","idlStruct","copyButton","createButton","addCopyIDLButton","idlHeader","idlText","clipboard","writeText","css$h","idlPartials","Text","keyword","wrapped","idlLink","defineIdlName","getIdlDefinitionClassName","parentName","idlId","getNameAndId","getDfnType","isDefaultJSON","unlinkedAnchor","nameResolverMap","getDefnName","getIdlId","resolvePartial","overload","qualifiedName","fullyQualifiedName","resolveOverload","resolveNameAndId","topLevelIdlTypes","renderWebIDL","idlElement","highlights","closestCite","cites","addIDLHeader","idls","astArray","validations","validation","THIS_SPEC","getLinkProps","citeDetails","frag","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","dfnFors","oldDfn","oldIsDfn","newIsDfn","isSameDfnType","isSameDfnFor","findMatchingDfn","titleToDfns","linkTargets","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","isCode","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","STORE_NAME","VERSION_CHECK_WAIT","getIdbCache","resolveXrefCache","queries","cachedData","lastChecked","setItem","API_URL","lastUpdated","shouldBustCache","clearXrefData","requiredKeySet","query","profiles","informativeRefsInNormative","getRequestEntry","getTermFromElement","specs","dataciteElem","closestSection","inlineRefs","uniqueSpecContext","higherPriority","uniqueSpecs","dedupeSpecContext","getSpecContext","types","getTypeContext","dataXrefForElem","getForContext","addDataCite","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","suffix","getLocalTermText","renderLocalTerm","createLocalTermIndex","externalTermIndex","dataSortedBySpec","specA","specB","createExternalTermIndex","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","showContributors","getParents","idlIndexSec","idlIndex","lowerHeaderTags","toc","scanSections","maxTocLevel","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","css$d","BROWSERS","statToText","defaultBrowsers","DEFAULTS","removeOnSave","browsers","feature","normalizeCaniuseConf","invalidBrowsers","browser","validateBrowsers","featureURL","headDlElem","contentPromise","statusText","fetchStats","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","summary","support","engines","mdnSubPath","engineSupport","getEngineSupportIcons","getEngineSupport","createRow","yesNoUnknown","displayStatus","createRowFromBrowserData","versionData","version_removed","versionAdded","version_added","buildBrowserSupportTable","mdnKey","mdn","getMdnKey","mdnSpecJson","mdnConf","baseJsonPath","getMdnData","findElements","mdnSpecArray","save_snapshot","downloadLinks","epubURL","saveDialog","filename","toDownloadLink","supportsDownload","HTMLAnchorElement","search_specref","specrefSearchUI","xrefSearchUI","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","status2rdf","LC","requiresCanonicalLink","addPerson","ed","worksFor","addRef","jsonld","creator","publishedDate","isbn","canonicalURI","rdfStatus","w3p","foaf","datePublished","inLanguage","isBasedOn","copyrightHolder","discussionUrl","alternativeHeadline","addl","description","contributor","citationIds","citationContents","citation","addJSONLDInfo","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","missing_test_suite_uri","tests","toListItem","emojiList","testFile","testParts","testFileName","requiresConnectionEmoji","manualPerformEmoji","toTestURLs","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","varMap","variables","currentSection","css$3","textNode","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","props","to","connectedCallback","fetchCommits","commits","commit","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","monetization","paymentPointer","rawConfig","canonicalizeConfig","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","transforms","pos","performTransformations","metas","meta","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLTableCaptionElement","isDfnUnused","logger","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","sectionTitle","privacy_considerations","security_considerations","requiresSomeSectionStatus","missingRequiredSections","filesInWPT","githubAPIBase","wptDirectory","testSuiteURL","files","getFilesInWPT","missingTest","offendingMembers","getOwnPropertyNames","DISABLED_RULES","formatHintsAsMarkdown","violations","otherOptions","enabled","elementRef","resultTypes","reporter","axe","onload","onerror","importAxe","getViolations","violation","groupedBySummary","nodes","failureSummary","help","helpUrl","hints"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IACHC,OAAOC,QAAQG,QAAQS,GAAQC,EAEnC,CCtBO,MAIDC,EAAgB,IAAIC,YAOnB,SAASC,EAAIC,EAAOC,GAEzB,GADAJ,EAAcK,cAAc,IAAIC,YAAYH,EAAO,CAAEC,YACjDnB,OAAOsB,SAAWtB,OAAOuB,KAC3B,OAGF,MAAMC,EAAOC,OAAOC,KAAKC,UAAUR,GAAQS,OAAST,IACpDnB,OAAOsB,OAAOO,YAAY,CAAEX,QAAOM,QAAQxB,OAAOsB,OAAOQ,SAASC,OACpE,CAWO,SAASC,EAAId,EAAOe,EAAIC,EAAU,CAAEC,MAAM,IAE/CpB,EA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AQ+M,GACV,MAAMtM,EAAQT,EAAO+M,GACrB,OAAIjC,MAAMuI,QAAQ5S,IAAgB,WAANsM,EAGnBR,GAAa9L,EAAOT,GAEtBS,CACR,EACD,GAAAD,CAAIR,EAAQ+M,EAAGtM,GAGb,GADAT,EAAO+M,GAAKtM,GACPA,EACH,OAAO,EACF,GAAIqK,MAAMuI,QAAQ5S,GAEvB,IAAK,MAAM2R,KAAQ3R,OACU,IAAhB2R,EAAK1U,SACd0U,EAAK1U,OAASA,aAGe,IAAjB+C,EAAM/C,SACtB+C,EAAM/C,OAASA,GAEjB,OAAO,CACR,GAGL,CC1SA,MAAM4V,GAAU,CAGdC,QACE,sGACFC,QAAS,8CACTxG,WAAY,+BACZyG,OAAQ,WACRC,WAAY,cACZC,QAAS,2BACTC,MAAO,wBAGI/E,GAAmB,CAC9B,cACA,oBACA,WACA,YACA,aACA,aACA,aACA,cACA,cACA,oBACA,gBACA,iBACA,eACA,eACA,MACA,SACA,UAGWL,GAAc,CAAC,aAAc,YAAa,aAE1CkC,GAAuB,CAClC,QACA,YACA,WACA,QACA,cACA,UACA,aACA,OACA,SACA,WACA,UACA,YACA,WACA,UACA,YACA,UACA,WACA,UACA,SACA,SACA,cACA,UACA,gBAGImD,GAAoB,CACxB,YACA,cACA,WACA,MACA,kBACA,UACA,SACA,UACA,OACA,SACA,QACA,QACA,OACA,QACA,OACA,QACA,WACA,KACA,WACA,SACA,WACA,QACA,OACA,YACA,WACA,QACAC,OAAOpD,GAAsBlC,GAAaK,IAEtCkF,GAAe,CACnB,IACA,IACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGIC,GAAW,CAEf,eACA,WACA,aAgHK,MAAM7C,GAIX,WAAAvI,CAAYqL,GACV3S,KAAKoE,OA9GT,SAAkBiN,GAChB,MAAMpK,EAAS,GACf,IAAI2L,EAAgB,EAChBtN,EAAS,GACTK,EAAO,EACPtD,EAAQ,EACZ,KAAOuQ,EAAgBvB,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BAAqB,UACtB,CAAC,eAAgB,MACjB,CAAC,YAAa,MACd,CAAC,QAAS,QACVpW,SAAQ,SAAUoW,GAClB,OAAOR,EAAU2B,gBAAgBnB,EAAK,GAAIA,EAAK,GACpD,IAKG,CAEE,YACA,SACA,SACA,MACA,WACA,UACA,OACA,YACA,QACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,OACA,OACA,UACA,QACA,WACA,MACA,WACA,cACA,QACA,SACA,WACA,YACA,MACA,SACA,YACA,YACA,YACA,WACA,WACA,MACA,UACA,UACA,WACA,WACA,eACA,SACA,SACA,YACA,WACA,YACA,cACA,QACA,UACA,QACA,SACA,aACA,YACA,WACA,OACA,QACA,OACA,QACA,QACA,MACA,QACA,OACA,OACA,YACA,OACA,WACA,SACA,SACA,YACA,WACA,OACA,WACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,iBACA,QACA,OACA,SACA,UACA,UACA,aACA,WACA,MACA,eAEA,gBACA,SACA,SACA,YACA,WACA,QACA,WACApW,QAAQ4V,EAAU4B,oBAEb5B,CACV,IAGA,IACIA,GAAyBP,GADNI,GAAYC,SCjgBGiC,GAAU,SAASC,GAAgB,IAAIjpB,EAAE,CAAE,EAAC,IAAIA,EAAEhH,QAAQA,OAAO,CAAC,MAAMlB,GAAGkI,EAAEhH,QAAQ,SAASgH,EAAElI,GAAG,IAAIuJ,EAAEvJ,EAAE0O,eAAe0iB,EAAEpxB,EAAE8uB,eAAetW,EAAEnG,EAAE/P,UAAU,OAAOkW,EAAEzS,OAAO,SAAS/F,GAAG,OAAO6C,KAAKZ,IAAIjC,WAAWA,EAAE6C,KAAKgc,EAAE,EAAErG,EAAElX,IAAI,SAAStB,GAAG,OAAO6C,KAAKZ,IAAIjC,GAAGA,EAAE6C,KAAKgc,QAAG,CAAM,EAAErG,EAAEvW,IAAI,SAASjC,GAAG,OAAOoxB,EAAEtI,KAAK9oB,EAAE6C,KAAKgc,EAAE,EAAErG,EAA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,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,39]}
      \ No newline at end of file
      +{"version":3,"file":"respec-w3c.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/webidl2/lib/error.js","../node_modules/webidl2/lib/productions/base.js","../node_modules/webidl2/lib/validators/helpers.js","../node_modules/webidl2/lib/productions/array-base.js","../node_modules/webidl2/lib/productions/token.js","../node_modules/webidl2/lib/productions/extended-attributes.js","../node_modules/webidl2/lib/productions/type.js","../node_modules/webidl2/lib/productions/default.js","../node_modules/webidl2/lib/productions/argument.js","../node_modules/webidl2/lib/productions/operation.js","../node_modules/webidl2/lib/productions/attribute.js","../node_modules/webidl2/lib/productions/helpers.js","../node_modules/webidl2/lib/tokeniser.js","../node_modules/webidl2/lib/productions/enum.js","../node_modules/webidl2/lib/productions/includes.js","../node_modules/webidl2/lib/productions/typedef.js","../node_modules/webidl2/lib/productions/callback.js","../node_modules/webidl2/lib/productions/container.js","../node_modules/webidl2/lib/productions/constant.js","../node_modules/webidl2/lib/productions/iterable.js","../node_modules/webidl2/lib/productions/constructor.js","../node_modules/webidl2/lib/productions/interface.js","../node_modules/webidl2/lib/validators/interface.js","../node_modules/webidl2/lib/productions/mixin.js","../node_modules/webidl2/lib/productions/field.js","../node_modules/webidl2/lib/productions/dictionary.js","../node_modules/webidl2/lib/productions/namespace.js","../node_modules/webidl2/lib/productions/callback-interface.js","../node_modules/webidl2/lib/webidl2.js","../node_modules/webidl2/lib/writer.js","../node_modules/webidl2/lib/validator.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/w3c.js","../src/core/location-hash.js","../src/w3c/group.js","../src/core/templates/show-link.js","../src/core/templates/show-logo.js","../src/core/templates/show-people.js","../src/w3c/templates/headers.js","../src/w3c/templates/cgbg-headers.js","../src/w3c/templates/sotd.js","../src/w3c/templates/cgbg-sotd.js","../src/w3c/headers.js","../src/core/defaults.js","../src/w3c/defaults.js","../src/styles/respec.css.js","../src/core/style.js","../src/w3c/style.js","../src/core/github.js","../src/core/sections.js","../src/core/data-include.js","../src/core/reindent.js","../src/core/title.js","../src/w3c/level.js","../src/w3c/abstract.js","../src/core/data-transform.js","../src/core/data-abbr.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/w3c/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/core/best-practices.js","../src/core/figures.js","../src/core/tables.js","../src/core/dfn-finder.js","../src/core/webidl-clipboard.js","../src/styles/webidl.css.js","../src/core/webidl.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/core/contrib.js","../src/core/fix-headers.js","../src/core/webidl-index.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/ui/save-html.js","../src/ui/search-specref.js","../src/ui/search-xref.js","../src/ui/about-respec.js","../src/core/seo.js","../src/w3c/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/datatype.css.js","../src/core/data-type.js","../src/styles/algorithms.css.js","../src/core/algorithms.js","../src/core/anchor-expander.js","../src/styles/dfn-panel.css.js","../src/core/dfn-panel.js","../src/core/custom-elements/rs-changelog.js","../src/core/custom-elements/index.js","../src/core/web-monetization.js","../src/core/dfn-contract.js","../src/core/before-save.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-captionless-tables.js","../src/core/linter-rules/no-unused-dfns.js","../src/core/linter-rules/no-headingless-sections.js","../src/core/linter-rules/no-unused-vars.js","../src/w3c/linter-rules/required-sections.js","../src/core/linter-rules/wpt-tests-exist.js","../src/core/linter-rules/no-http-props.js","../src/core/linter-rules/a11y.js","../src/core/linter-rules/informative-dfn.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 * @param {string} text\n */\nfunction lastLine(text) {\n  const splitted = text.split(\"\\n\");\n  return splitted[splitted.length - 1];\n}\n\nfunction appendIfExist(base, target) {\n  let result = base;\n  if (target) {\n    result += ` ${target}`;\n  }\n  return result;\n}\n\nfunction contextAsText(node) {\n  const hierarchy = [node];\n  while (node && node.parent) {\n    const { parent } = node;\n    hierarchy.unshift(parent);\n    node = parent;\n  }\n  return hierarchy.map((n) => appendIfExist(n.type, n.name)).join(\" -> \");\n}\n\n/**\n * @typedef {object} WebIDL2ErrorOptions\n * @property {\"error\" | \"warning\"} [level]\n * @property {Function} [autofix]\n * @property {string} [ruleName]\n *\n * @typedef {ReturnType<typeof error>} WebIDLErrorData\n *\n * @param {string} message error message\n * @param {*} position\n * @param {*} current\n * @param {*} message\n * @param {\"Syntax\" | \"Validation\"} kind error type\n * @param {WebIDL2ErrorOptions=} options\n */\nfunction error(\n  source,\n  position,\n  current,\n  message,\n  kind,\n  { level = \"error\", autofix, ruleName } = {}\n) {\n  /**\n   * @param {number} count\n   */\n  function sliceTokens(count) {\n    return count > 0\n      ? source.slice(position, position + count)\n      : source.slice(Math.max(position + count, 0), position);\n  }\n\n  /**\n   * @param {import(\"./tokeniser.js\").Token[]} inputs\n   * @param {object} [options]\n   * @param {boolean} [options.precedes]\n   * @returns\n   */\n  function tokensToText(inputs, { precedes } = {}) {\n    const text = inputs.map((t) => t.trivia + t.value).join(\"\");\n    const nextToken = source[position];\n    if (nextToken.type === \"eof\") {\n      return text;\n    }\n    if (precedes) {\n      return text + nextToken.trivia;\n    }\n    return text.slice(nextToken.trivia.length);\n  }\n\n  const maxTokens = 5; // arbitrary but works well enough\n  const line =\n    source[position].type !== \"eof\"\n      ? source[position].line\n      : source.length > 1\n      ? source[position - 1].line\n      : 1;\n\n  const precedingLastLine = lastLine(\n    tokensToText(sliceTokens(-maxTokens), { precedes: true })\n  );\n\n  const subsequentTokens = sliceTokens(maxTokens);\n  const subsequentText = tokensToText(subsequentTokens);\n  const subsequentFirstLine = subsequentText.split(\"\\n\")[0];\n\n  const spaced = \" \".repeat(precedingLastLine.length) + \"^\";\n  const sourceContext = precedingLastLine + subsequentFirstLine + \"\\n\" + spaced;\n\n  const contextType = kind === \"Syntax\" ? \"since\" : \"inside\";\n  const inSourceName = source.name ? ` in ${source.name}` : \"\";\n  const grammaticalContext =\n    current && current.name\n      ? `, ${contextType} \\`${current.partial ? \"partial \" : \"\"}${contextAsText(\n          current\n        )}\\``\n      : \"\";\n  const context = `${kind} error at line ${line}${inSourceName}${grammaticalContext}:\\n${sourceContext}`;\n  return {\n    message: `${context} ${message}`,\n    bareMessage: message,\n    context,\n    line,\n    sourceName: source.name,\n    level,\n    ruleName,\n    autofix,\n    input: subsequentText,\n    tokens: subsequentTokens,\n  };\n}\n\n/**\n * @param {string} message error message\n */\nexport function syntaxError(source, position, current, message) {\n  return error(source, position, current, message, \"Syntax\");\n}\n\n/**\n * @param {string} message error message\n * @param {WebIDL2ErrorOptions} [options]\n */\nexport function validationError(\n  token,\n  current,\n  ruleName,\n  message,\n  options = {}\n) {\n  options.ruleName = ruleName;\n  return error(\n    current.source,\n    token.index,\n    current,\n    message,\n    \"Validation\",\n    options\n  );\n}\n","export class Base {\n  /**\n   * @param {object} initializer\n   * @param {Base[\"source\"]} initializer.source\n   * @param {Base[\"tokens\"]} initializer.tokens\n   */\n  constructor({ source, tokens }) {\n    Object.defineProperties(this, {\n      source: { value: source },\n      tokens: { value: tokens, writable: true },\n      parent: { value: null, writable: true },\n      this: { value: this }, // useful when escaping from proxy\n    });\n  }\n\n  toJSON() {\n    const json = { type: undefined, name: undefined, inheritance: undefined };\n    let proto = this;\n    while (proto !== Object.prototype) {\n      const descMap = Object.getOwnPropertyDescriptors(proto);\n      for (const [key, value] of Object.entries(descMap)) {\n        if (value.enumerable || value.get) {\n          // @ts-ignore - allow indexing here\n          json[key] = this[key];\n        }\n      }\n      proto = Object.getPrototypeOf(proto);\n    }\n    return json;\n  }\n}\n","/**\n * @typedef {import(\"../validator.js\").Definitions} Definitions\n * @typedef {import(\"../productions/dictionary.js\").Dictionary} Dictionary\n * @typedef {import(\"../../lib/productions/type\").Type} Type\n *\n * @param {Type} idlType\n * @param {Definitions} defs\n * @param {object} [options]\n * @param {boolean} [options.useNullableInner] use when the input idlType is nullable and you want to use its inner type\n * @return {{ reference: *, dictionary: Dictionary }} the type reference that ultimately includes dictionary.\n */\nexport function idlTypeIncludesDictionary(\n  idlType,\n  defs,\n  { useNullableInner } = {}\n) {\n  if (!idlType.union) {\n    const def = defs.unique.get(idlType.idlType);\n    if (!def) {\n      return;\n    }\n    if (def.type === \"typedef\") {\n      const { typedefIncludesDictionary } = defs.cache;\n      if (typedefIncludesDictionary.has(def)) {\n        // Note that this also halts when it met indeterminate state\n        // to prevent infinite recursion\n        return typedefIncludesDictionary.get(def);\n      }\n      defs.cache.typedefIncludesDictionary.set(def, undefined); // indeterminate state\n      const result = idlTypeIncludesDictionary(def.idlType, defs);\n      defs.cache.typedefIncludesDictionary.set(def, result);\n      if (result) {\n        return {\n          reference: idlType,\n          dictionary: result.dictionary,\n        };\n      }\n    }\n    if (def.type === \"dictionary\" && (useNullableInner || !idlType.nullable)) {\n      return {\n        reference: idlType,\n        dictionary: def,\n      };\n    }\n  }\n  for (const subtype of idlType.subtype) {\n    const result = idlTypeIncludesDictionary(subtype, defs);\n    if (result) {\n      if (subtype.union) {\n        return result;\n      }\n      return {\n        reference: subtype,\n        dictionary: result.dictionary,\n      };\n    }\n  }\n}\n\n/**\n * @param {Dictionary} dict dictionary type\n * @param {Definitions} defs\n * @return {boolean}\n */\nexport function dictionaryIncludesRequiredField(dict, defs) {\n  if (defs.cache.dictionaryIncludesRequiredField.has(dict)) {\n    return defs.cache.dictionaryIncludesRequiredField.get(dict);\n  }\n  // Set cached result to indeterminate to short-circuit circular definitions.\n  // The final result will be updated to true or false.\n  defs.cache.dictionaryIncludesRequiredField.set(dict, undefined);\n  let result = dict.members.some((field) => field.required);\n  if (!result && dict.inheritance) {\n    const superdict = defs.unique.get(dict.inheritance);\n    if (!superdict) {\n      // Assume required members in the supertype if it is unknown.\n      result = true;\n    } else if (dictionaryIncludesRequiredField(superdict, defs)) {\n      result = true;\n    }\n  }\n  defs.cache.dictionaryIncludesRequiredField.set(dict, result);\n  return result;\n}\n\n/**\n * For now this only checks the most frequent cases:\n * 1. direct inclusion of [EnforceRange]\n * 2. typedef of that\n *\n * More complex cases with dictionaries and records are not covered yet.\n *\n * @param {Type} idlType\n * @param {Definitions} defs\n */\nexport function idlTypeIncludesEnforceRange(idlType, defs) {\n  if (idlType.union) {\n    // TODO: This should ideally be checked too\n    return false;\n  }\n\n  if (idlType.extAttrs.some((e) => e.name === \"EnforceRange\")) {\n    return true;\n  }\n\n  const def = defs.unique.get(idlType.idlType);\n  if (def?.type !== \"typedef\") {\n    return false;\n  }\n\n  return def.idlType.extAttrs.some((e) => e.name === \"EnforceRange\");\n}\n","export class ArrayBase extends Array {\n  constructor({ source, tokens }) {\n    super();\n    Object.defineProperties(this, {\n      source: { value: source },\n      tokens: { value: tokens },\n      parent: { value: null, writable: true },\n    });\n  }\n}\n","import { Base } from \"./base.js\";\nimport { unescape } from \"./helpers.js\";\n\nexport class WrappedToken extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {string} type\n   */\n  static parser(tokeniser, type) {\n    return () => {\n      const value = tokeniser.consumeKind(type);\n      if (value) {\n        return new WrappedToken({\n          source: tokeniser.source,\n          tokens: { value },\n        });\n      }\n    };\n  }\n\n  get value() {\n    return unescape(this.tokens.value.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      w.token(this.tokens.value),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\nexport class Eof extends WrappedToken {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const value = tokeniser.consumeKind(\"eof\");\n    if (value) {\n      return new Eof({ source: tokeniser.source, tokens: { value } });\n    }\n  }\n\n  get type() {\n    return \"eof\";\n  }\n}\n","import { Base } from \"./base.js\";\nimport { ArrayBase } from \"./array-base.js\";\nimport { WrappedToken } from \"./token.js\";\nimport { list, argument_list, autoParenter, unescape } from \"./helpers.js\";\nimport { validationError } from \"../error.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} tokenName\n */\nfunction tokens(tokeniser, tokenName) {\n  return list(tokeniser, {\n    parser: WrappedToken.parser(tokeniser, tokenName),\n    listName: tokenName + \" list\",\n  });\n}\n\nconst extAttrValueSyntax = [\"identifier\", \"decimal\", \"integer\", \"string\"];\n\nconst shouldBeLegacyPrefixed = [\n  \"NoInterfaceObject\",\n  \"LenientSetter\",\n  \"LenientThis\",\n  \"TreatNonObjectAsNull\",\n  \"Unforgeable\",\n];\n\nconst renamedLegacies = new Map([\n  .../** @type {[string, string][]} */ (\n    shouldBeLegacyPrefixed.map((name) => [name, `Legacy${name}`])\n  ),\n  [\"NamedConstructor\", \"LegacyFactoryFunction\"],\n  [\"OverrideBuiltins\", \"LegacyOverrideBuiltIns\"],\n  [\"TreatNullAs\", \"LegacyNullToEmptyString\"],\n]);\n\n/**\n * This will allow a set of extended attribute values to be parsed.\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction extAttrListItems(tokeniser) {\n  for (const syntax of extAttrValueSyntax) {\n    const toks = tokens(tokeniser, syntax);\n    if (toks.length) {\n      return toks;\n    }\n  }\n  tokeniser.error(\n    `Expected identifiers, strings, decimals, or integers but none found`\n  );\n}\n\nexport class ExtendedAttributeParameters extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const tokens = { assign: tokeniser.consume(\"=\") };\n    const ret = autoParenter(\n      new ExtendedAttributeParameters({ source: tokeniser.source, tokens })\n    );\n    ret.list = [];\n    if (tokens.assign) {\n      tokens.asterisk = tokeniser.consume(\"*\");\n      if (tokens.asterisk) {\n        return ret.this;\n      }\n      tokens.secondaryName = tokeniser.consumeKind(...extAttrValueSyntax);\n    }\n    tokens.open = tokeniser.consume(\"(\");\n    if (tokens.open) {\n      ret.list = ret.rhsIsList\n        ? // [Exposed=(Window,Worker)]\n          extAttrListItems(tokeniser)\n        : // [LegacyFactoryFunction=Audio(DOMString src)] or [Constructor(DOMString str)]\n          argument_list(tokeniser);\n      tokens.close =\n        tokeniser.consume(\")\") ||\n        tokeniser.error(\"Unexpected token in extended attribute argument list\");\n    } else if (tokens.assign && !tokens.secondaryName) {\n      tokeniser.error(\"No right hand side to extended attribute assignment\");\n    }\n    return ret.this;\n  }\n\n  get rhsIsList() {\n    return (\n      this.tokens.assign && !this.tokens.asterisk && !this.tokens.secondaryName\n    );\n  }\n\n  get rhsType() {\n    if (this.rhsIsList) {\n      return this.list[0].tokens.value.type + \"-list\";\n    }\n    if (this.tokens.asterisk) {\n      return \"*\";\n    }\n    if (this.tokens.secondaryName) {\n      return this.tokens.secondaryName.type;\n    }\n    return null;\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { rhsType } = this;\n    return w.ts.wrap([\n      w.token(this.tokens.assign),\n      w.token(this.tokens.asterisk),\n      w.reference_token(this.tokens.secondaryName, this.parent),\n      w.token(this.tokens.open),\n      ...this.list.map((p) => {\n        return rhsType === \"identifier-list\"\n          ? w.identifier(p, this.parent)\n          : p.write(w);\n      }),\n      w.token(this.tokens.close),\n    ]);\n  }\n}\n\nexport class SimpleExtendedAttribute extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const name = tokeniser.consumeKind(\"identifier\");\n    if (name) {\n      return new SimpleExtendedAttribute({\n        source: tokeniser.source,\n        tokens: { name },\n        params: ExtendedAttributeParameters.parse(tokeniser),\n      });\n    }\n  }\n\n  constructor({ source, tokens, params }) {\n    super({ source, tokens });\n    params.parent = this;\n    Object.defineProperty(this, \"params\", { value: params });\n  }\n\n  get type() {\n    return \"extended-attribute\";\n  }\n  get name() {\n    return this.tokens.name.value;\n  }\n  get rhs() {\n    const { rhsType: type, tokens, list } = this.params;\n    if (!type) {\n      return null;\n    }\n    const value = this.params.rhsIsList\n      ? list\n      : this.params.tokens.secondaryName\n      ? unescape(tokens.secondaryName.value)\n      : null;\n    return { type, value };\n  }\n  get arguments() {\n    const { rhsIsList, list } = this.params;\n    if (!list || rhsIsList) {\n      return [];\n    }\n    return list;\n  }\n\n  *validate(defs) {\n    const { name } = this;\n    if (name === \"LegacyNoInterfaceObject\") {\n      const message = `\\`[LegacyNoInterfaceObject]\\` extended attribute is an \\\nundesirable feature that may be removed from Web IDL in the future. Refer to the \\\n[relevant upstream PR](https://github.com/whatwg/webidl/pull/609) for more \\\ninformation.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"no-nointerfaceobject\",\n        message,\n        { level: \"warning\" }\n      );\n    } else if (renamedLegacies.has(name)) {\n      const message = `\\`[${name}]\\` extended attribute is a legacy feature \\\nthat is now renamed to \\`[${renamedLegacies.get(name)}]\\`. Refer to the \\\n[relevant upstream PR](https://github.com/whatwg/webidl/pull/870) for more \\\ninformation.`;\n      yield validationError(this.tokens.name, this, \"renamed-legacy\", message, {\n        level: \"warning\",\n        autofix: renameLegacyExtendedAttribute(this),\n      });\n    }\n    for (const arg of this.arguments) {\n      yield* arg.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      w.ts.trivia(this.tokens.name.trivia),\n      w.ts.extendedAttribute(\n        w.ts.wrap([\n          w.ts.extendedAttributeReference(this.name),\n          this.params.write(w),\n        ])\n      ),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\n/**\n * @param {SimpleExtendedAttribute} extAttr\n */\nfunction renameLegacyExtendedAttribute(extAttr) {\n  return () => {\n    const { name } = extAttr;\n    extAttr.tokens.name.value = renamedLegacies.get(name);\n    if (name === \"TreatNullAs\") {\n      extAttr.params.tokens = {};\n    }\n  };\n}\n\n// Note: we parse something simpler than the official syntax. It's all that ever\n// seems to be used\nexport class ExtendedAttributes extends ArrayBase {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const tokens = {};\n    tokens.open = tokeniser.consume(\"[\");\n    const ret = new ExtendedAttributes({ source: tokeniser.source, tokens });\n    if (!tokens.open) return ret;\n    ret.push(\n      ...list(tokeniser, {\n        parser: SimpleExtendedAttribute.parse,\n        listName: \"extended attribute\",\n      })\n    );\n    tokens.close =\n      tokeniser.consume(\"]\") ||\n      tokeniser.error(\n        \"Expected a closing token for the extended attribute list\"\n      );\n    if (!ret.length) {\n      tokeniser.unconsume(tokens.close.index);\n      tokeniser.error(\"An extended attribute list must not be empty\");\n    }\n    if (tokeniser.probe(\"[\")) {\n      tokeniser.error(\n        \"Illegal double extended attribute lists, consider merging them\"\n      );\n    }\n    return ret;\n  }\n\n  *validate(defs) {\n    for (const extAttr of this) {\n      yield* extAttr.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    if (!this.length) return \"\";\n    return w.ts.wrap([\n      w.token(this.tokens.open),\n      ...this.map((ea) => ea.write(w)),\n      w.token(this.tokens.close),\n    ]);\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  unescape,\n  type_with_extended_attributes,\n  return_type,\n  primitive_type,\n  autoParenter,\n} from \"./helpers.js\";\nimport { stringTypes, typeNameKeywords } from \"../tokeniser.js\";\nimport { validationError } from \"../error.js\";\nimport { idlTypeIncludesDictionary } from \"../validators/helpers.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} typeName\n */\nfunction generic_type(tokeniser, typeName) {\n  const base = tokeniser.consume(\n    \"FrozenArray\",\n    \"ObservableArray\",\n    \"Promise\",\n    \"sequence\",\n    \"record\"\n  );\n  if (!base) {\n    return;\n  }\n  const ret = autoParenter(\n    new Type({ source: tokeniser.source, tokens: { base } })\n  );\n  ret.tokens.open =\n    tokeniser.consume(\"<\") ||\n    tokeniser.error(`No opening bracket after ${base.value}`);\n  switch (base.value) {\n    case \"Promise\": {\n      if (tokeniser.probe(\"[\"))\n        tokeniser.error(\"Promise type cannot have extended attribute\");\n      const subtype =\n        return_type(tokeniser, typeName) ||\n        tokeniser.error(\"Missing Promise subtype\");\n      ret.subtype.push(subtype);\n      break;\n    }\n    case \"sequence\":\n    case \"FrozenArray\":\n    case \"ObservableArray\": {\n      const subtype =\n        type_with_extended_attributes(tokeniser, typeName) ||\n        tokeniser.error(`Missing ${base.value} subtype`);\n      ret.subtype.push(subtype);\n      break;\n    }\n    case \"record\": {\n      if (tokeniser.probe(\"[\"))\n        tokeniser.error(\"Record key cannot have extended attribute\");\n      const keyType =\n        tokeniser.consume(...stringTypes) ||\n        tokeniser.error(`Record key must be one of: ${stringTypes.join(\", \")}`);\n      const keyIdlType = new Type({\n        source: tokeniser.source,\n        tokens: { base: keyType },\n      });\n      keyIdlType.tokens.separator =\n        tokeniser.consume(\",\") ||\n        tokeniser.error(\"Missing comma after record key type\");\n      keyIdlType.type = typeName;\n      const valueType =\n        type_with_extended_attributes(tokeniser, typeName) ||\n        tokeniser.error(\"Error parsing generic type record\");\n      ret.subtype.push(keyIdlType, valueType);\n      break;\n    }\n  }\n  if (!ret.idlType) tokeniser.error(`Error parsing generic type ${base.value}`);\n  ret.tokens.close =\n    tokeniser.consume(\">\") ||\n    tokeniser.error(`Missing closing bracket after ${base.value}`);\n  return ret.this;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction type_suffix(tokeniser, obj) {\n  const nullable = tokeniser.consume(\"?\");\n  if (nullable) {\n    obj.tokens.nullable = nullable;\n  }\n  if (tokeniser.probe(\"?\")) tokeniser.error(\"Can't nullable more than once\");\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} typeName\n */\nfunction single_type(tokeniser, typeName) {\n  let ret = generic_type(tokeniser, typeName) || primitive_type(tokeniser);\n  if (!ret) {\n    const base =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.consume(...stringTypes, ...typeNameKeywords);\n    if (!base) {\n      return;\n    }\n    ret = new Type({ source: tokeniser.source, tokens: { base } });\n    if (tokeniser.probe(\"<\"))\n      tokeniser.error(`Unsupported generic type ${base.value}`);\n  }\n  if (ret.generic === \"Promise\" && tokeniser.probe(\"?\")) {\n    tokeniser.error(\"Promise type cannot be nullable\");\n  }\n  ret.type = typeName || null;\n  type_suffix(tokeniser, ret);\n  if (ret.nullable && ret.idlType === \"any\")\n    tokeniser.error(\"Type `any` cannot be made nullable\");\n  return ret;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string} type\n */\nfunction union_type(tokeniser, type) {\n  const tokens = {};\n  tokens.open = tokeniser.consume(\"(\");\n  if (!tokens.open) return;\n  const ret = autoParenter(new Type({ source: tokeniser.source, tokens }));\n  ret.type = type || null;\n  while (true) {\n    const typ =\n      type_with_extended_attributes(tokeniser, type) ||\n      tokeniser.error(\"No type after open parenthesis or 'or' in union type\");\n    if (typ.idlType === \"any\")\n      tokeniser.error(\"Type `any` cannot be included in a union type\");\n    if (typ.generic === \"Promise\")\n      tokeniser.error(\"Type `Promise` cannot be included in a union type\");\n    ret.subtype.push(typ);\n    const or = tokeniser.consume(\"or\");\n    if (or) {\n      typ.tokens.separator = or;\n    } else break;\n  }\n  if (ret.idlType.length < 2) {\n    tokeniser.error(\n      \"At least two types are expected in a union type but found less\"\n    );\n  }\n  tokens.close =\n    tokeniser.consume(\")\") || tokeniser.error(\"Unterminated union type\");\n  type_suffix(tokeniser, ret);\n  return ret.this;\n}\n\nexport class Type extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {string} typeName\n   */\n  static parse(tokeniser, typeName) {\n    return single_type(tokeniser, typeName) || union_type(tokeniser, typeName);\n  }\n\n  constructor({ source, tokens }) {\n    super({ source, tokens });\n    Object.defineProperty(this, \"subtype\", { value: [], writable: true });\n    this.extAttrs = new ExtendedAttributes({ source, tokens: {} });\n  }\n\n  get generic() {\n    if (this.subtype.length && this.tokens.base) {\n      return this.tokens.base.value;\n    }\n    return \"\";\n  }\n  get nullable() {\n    return Boolean(this.tokens.nullable);\n  }\n  get union() {\n    return Boolean(this.subtype.length) && !this.tokens.base;\n  }\n  get idlType() {\n    if (this.subtype.length) {\n      return this.subtype;\n    }\n    // Adding prefixes/postfixes for \"unrestricted float\", etc.\n    const name = [this.tokens.prefix, this.tokens.base, this.tokens.postfix]\n      .filter((t) => t)\n      .map((t) => t.value)\n      .join(\" \");\n    return unescape(name);\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n\n    if (this.idlType === \"BufferSource\") {\n      // XXX: For now this is a hack. Consider moving parents' extAttrs into types as the spec says:\n      // https://webidl.spec.whatwg.org/#idl-annotated-types\n      for (const extAttrs of [this.extAttrs, this.parent?.extAttrs]) {\n        for (const extAttr of extAttrs) {\n          if (extAttr.name !== \"AllowShared\") {\n            continue;\n          }\n          const message = `\\`[AllowShared] BufferSource\\` is now replaced with AllowSharedBufferSource.`;\n          yield validationError(\n            this.tokens.base,\n            this,\n            \"migrate-allowshared\",\n            message,\n            { autofix: replaceAllowShared(this, extAttr, extAttrs) }\n          );\n        }\n      }\n    }\n\n    if (this.idlType === \"void\") {\n      const message = `\\`void\\` is now replaced by \\`undefined\\`. Refer to the \\\n[relevant GitHub issue](https://github.com/whatwg/webidl/issues/60) \\\nfor more information.`;\n      yield validationError(this.tokens.base, this, \"replace-void\", message, {\n        autofix: replaceVoid(this),\n      });\n    }\n\n    /*\n     * If a union is nullable, its subunions cannot include a dictionary\n     * If not, subunions may include dictionaries if each union is not nullable\n     */\n    const typedef = !this.union && defs.unique.get(this.idlType);\n    const target = this.union\n      ? this\n      : typedef && typedef.type === \"typedef\"\n      ? typedef.idlType\n      : undefined;\n    if (target && this.nullable) {\n      // do not allow any dictionary\n      const { reference } = idlTypeIncludesDictionary(target, defs) || {};\n      if (reference) {\n        const targetToken = (this.union ? reference : this).tokens.base;\n        const message = \"Nullable union cannot include a dictionary type.\";\n        yield validationError(\n          targetToken,\n          this,\n          \"no-nullable-union-dict\",\n          message\n        );\n      }\n    } else {\n      // allow some dictionary\n      for (const subtype of this.subtype) {\n        yield* subtype.validate(defs);\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const type_body = () => {\n      if (this.union || this.generic) {\n        return w.ts.wrap([\n          w.token(this.tokens.base, w.ts.generic),\n          w.token(this.tokens.open),\n          ...this.subtype.map((t) => t.write(w)),\n          w.token(this.tokens.close),\n        ]);\n      }\n      const firstToken = this.tokens.prefix || this.tokens.base;\n      const prefix = this.tokens.prefix\n        ? [this.tokens.prefix.value, w.ts.trivia(this.tokens.base.trivia)]\n        : [];\n      const ref = w.reference(\n        w.ts.wrap([\n          ...prefix,\n          this.tokens.base.value,\n          w.token(this.tokens.postfix),\n        ]),\n        {\n          unescaped: /** @type {string} (because it's not union) */ (\n            this.idlType\n          ),\n          context: this,\n        }\n      );\n      return w.ts.wrap([w.ts.trivia(firstToken.trivia), ref]);\n    };\n    return w.ts.wrap([\n      this.extAttrs.write(w),\n      type_body(),\n      w.token(this.tokens.nullable),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\n/**\n * @param {Type} type\n * @param {import(\"./extended-attributes.js\").SimpleExtendedAttribute} extAttr\n * @param {ExtendedAttributes} extAttrs\n */\nfunction replaceAllowShared(type, extAttr, extAttrs) {\n  return () => {\n    const index = extAttrs.indexOf(extAttr);\n    extAttrs.splice(index, 1);\n    if (!extAttrs.length && type.tokens.base.trivia.match(/^\\s$/)) {\n      type.tokens.base.trivia = \"\"; // (let's not remove comments)\n    }\n\n    type.tokens.base.value = \"AllowSharedBufferSource\";\n  };\n}\n\n/**\n * @param {Type} type\n */\nfunction replaceVoid(type) {\n  return () => {\n    type.tokens.base.value = \"undefined\";\n  };\n}\n","import { Base } from \"./base.js\";\nimport { const_data, const_value } from \"./helpers.js\";\n\nexport class Default extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const assign = tokeniser.consume(\"=\");\n    if (!assign) {\n      return null;\n    }\n    const def =\n      const_value(tokeniser) ||\n      tokeniser.consumeKind(\"string\") ||\n      tokeniser.consume(\"null\", \"[\", \"{\") ||\n      tokeniser.error(\"No value for default\");\n    const expression = [def];\n    if (def.value === \"[\") {\n      const close =\n        tokeniser.consume(\"]\") ||\n        tokeniser.error(\"Default sequence value must be empty\");\n      expression.push(close);\n    } else if (def.value === \"{\") {\n      const close =\n        tokeniser.consume(\"}\") ||\n        tokeniser.error(\"Default dictionary value must be empty\");\n      expression.push(close);\n    }\n    return new Default({\n      source: tokeniser.source,\n      tokens: { assign },\n      expression,\n    });\n  }\n\n  constructor({ source, tokens, expression }) {\n    super({ source, tokens });\n    expression.parent = this;\n    Object.defineProperty(this, \"expression\", { value: expression });\n  }\n\n  get type() {\n    return const_data(this.expression[0]).type;\n  }\n  get value() {\n    return const_data(this.expression[0]).value;\n  }\n  get negative() {\n    return const_data(this.expression[0]).negative;\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      w.token(this.tokens.assign),\n      ...this.expression.map((t) => w.token(t)),\n    ]);\n  }\n}\n","import { Base } from \"./base.js\";\nimport { Default } from \"./default.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\nimport {\n  unescape,\n  type_with_extended_attributes,\n  autoParenter,\n  getFirstToken,\n} from \"./helpers.js\";\nimport { argumentNameKeywords, Tokeniser } from \"../tokeniser.js\";\nimport { validationError } from \"../error.js\";\nimport {\n  idlTypeIncludesDictionary,\n  dictionaryIncludesRequiredField,\n} from \"../validators/helpers.js\";\n\nexport class Argument extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const start_position = tokeniser.position;\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    const ret = autoParenter(\n      new Argument({ source: tokeniser.source, tokens })\n    );\n    ret.extAttrs = ExtendedAttributes.parse(tokeniser);\n    tokens.optional = tokeniser.consume(\"optional\");\n    ret.idlType = type_with_extended_attributes(tokeniser, \"argument-type\");\n    if (!ret.idlType) {\n      return tokeniser.unconsume(start_position);\n    }\n    if (!tokens.optional) {\n      tokens.variadic = tokeniser.consume(\"...\");\n    }\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.consume(...argumentNameKeywords);\n    if (!tokens.name) {\n      return tokeniser.unconsume(start_position);\n    }\n    ret.default = tokens.optional ? Default.parse(tokeniser) : null;\n    return ret.this;\n  }\n\n  get type() {\n    return \"argument\";\n  }\n  get optional() {\n    return !!this.tokens.optional;\n  }\n  get variadic() {\n    return !!this.tokens.variadic;\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  /**\n   * @param {import(\"../validator.js\").Definitions} defs\n   */\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    yield* this.idlType.validate(defs);\n    const result = idlTypeIncludesDictionary(this.idlType, defs, {\n      useNullableInner: true,\n    });\n    if (result) {\n      if (this.idlType.nullable) {\n        const message = `Dictionary arguments cannot be nullable.`;\n        yield validationError(\n          this.tokens.name,\n          this,\n          \"no-nullable-dict-arg\",\n          message\n        );\n      } else if (!this.optional) {\n        if (\n          this.parent &&\n          !dictionaryIncludesRequiredField(result.dictionary, defs) &&\n          isLastRequiredArgument(this)\n        ) {\n          const message = `Dictionary argument must be optional if it has no required fields`;\n          yield validationError(\n            this.tokens.name,\n            this,\n            \"dict-arg-optional\",\n            message,\n            {\n              autofix: autofixDictionaryArgumentOptionality(this),\n            }\n          );\n        }\n      } else if (!this.default) {\n        const message = `Optional dictionary arguments must have a default value of \\`{}\\`.`;\n        yield validationError(\n          this.tokens.name,\n          this,\n          \"dict-arg-default\",\n          message,\n          {\n            autofix: autofixOptionalDictionaryDefaultValue(this),\n          }\n        );\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.wrap([\n      this.extAttrs.write(w),\n      w.token(this.tokens.optional),\n      w.ts.type(this.idlType.write(w)),\n      w.token(this.tokens.variadic),\n      w.name_token(this.tokens.name, { data: this }),\n      this.default ? this.default.write(w) : \"\",\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\n/**\n * @param {Argument} arg\n */\nfunction isLastRequiredArgument(arg) {\n  const list = arg.parent.arguments || arg.parent.list;\n  const index = list.indexOf(arg);\n  const requiredExists = list.slice(index + 1).some((a) => !a.optional);\n  return !requiredExists;\n}\n\n/**\n * @param {Argument} arg\n */\nfunction autofixDictionaryArgumentOptionality(arg) {\n  return () => {\n    const firstToken = getFirstToken(arg.idlType);\n    arg.tokens.optional = {\n      ...firstToken,\n      type: \"optional\",\n      value: \"optional\",\n    };\n    firstToken.trivia = \" \";\n    autofixOptionalDictionaryDefaultValue(arg)();\n  };\n}\n\n/**\n * @param {Argument} arg\n */\nfunction autofixOptionalDictionaryDefaultValue(arg) {\n  return () => {\n    arg.default = Default.parse(new Tokeniser(\" = {}\"));\n  };\n}\n","import { Base } from \"./base.js\";\nimport {\n  return_type,\n  argument_list,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\nimport { validationError } from \"../error.js\";\n\nexport class Operation extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"../tokeniser.js\").Token} [options.special]\n   * @param {import(\"../tokeniser.js\").Token} [options.regular]\n   */\n  static parse(tokeniser, { special, regular } = {}) {\n    const tokens = { special };\n    const ret = autoParenter(\n      new Operation({ source: tokeniser.source, tokens })\n    );\n    if (special && special.value === \"stringifier\") {\n      tokens.termination = tokeniser.consume(\";\");\n      if (tokens.termination) {\n        ret.arguments = [];\n        return ret;\n      }\n    }\n    if (!special && !regular) {\n      tokens.special = tokeniser.consume(\"getter\", \"setter\", \"deleter\");\n    }\n    ret.idlType =\n      return_type(tokeniser) || tokeniser.error(\"Missing return type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") || tokeniser.consume(\"includes\");\n    tokens.open =\n      tokeniser.consume(\"(\") || tokeniser.error(\"Invalid operation\");\n    ret.arguments = argument_list(tokeniser);\n    tokens.close =\n      tokeniser.consume(\")\") || tokeniser.error(\"Unterminated operation\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated operation, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"operation\";\n  }\n  get name() {\n    const { name } = this.tokens;\n    if (!name) {\n      return \"\";\n    }\n    return unescape(name.value);\n  }\n  get special() {\n    if (!this.tokens.special) {\n      return \"\";\n    }\n    return this.tokens.special.value;\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    if (!this.name && [\"\", \"static\"].includes(this.special)) {\n      const message = `Regular or static operations must have both a return type and an identifier.`;\n      yield validationError(this.tokens.open, this, \"incomplete-op\", message);\n    }\n    if (this.idlType) {\n      yield* this.idlType.validate(defs);\n    }\n    for (const argument of this.arguments) {\n      yield* argument.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    const body = this.idlType\n      ? [\n          w.ts.type(this.idlType.write(w)),\n          w.name_token(this.tokens.name, { data: this, parent }),\n          w.token(this.tokens.open),\n          w.ts.wrap(this.arguments.map((arg) => arg.write(w))),\n          w.token(this.tokens.close),\n        ]\n      : [];\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        this.tokens.name\n          ? w.token(this.tokens.special)\n          : w.token(this.tokens.special, w.ts.nameless, { data: this, parent }),\n        ...body,\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { validationError } from \"../error.js\";\nimport {\n  idlTypeIncludesDictionary,\n  idlTypeIncludesEnforceRange,\n} from \"../validators/helpers.js\";\nimport { Base } from \"./base.js\";\nimport {\n  type_with_extended_attributes,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\n\nexport class Attribute extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"../tokeniser.js\").Token} [options.special]\n   * @param {boolean} [options.noInherit]\n   * @param {boolean} [options.readonly]\n   */\n  static parse(\n    tokeniser,\n    { special, noInherit = false, readonly = false } = {}\n  ) {\n    const start_position = tokeniser.position;\n    const tokens = { special };\n    const ret = autoParenter(\n      new Attribute({ source: tokeniser.source, tokens })\n    );\n    if (!special && !noInherit) {\n      tokens.special = tokeniser.consume(\"inherit\");\n    }\n    if (ret.special === \"inherit\" && tokeniser.probe(\"readonly\")) {\n      tokeniser.error(\"Inherited attributes cannot be read-only\");\n    }\n    tokens.readonly = tokeniser.consume(\"readonly\");\n    if (readonly && !tokens.readonly && tokeniser.probe(\"attribute\")) {\n      tokeniser.error(\"Attributes must be readonly in this context\");\n    }\n    tokens.base = tokeniser.consume(\"attribute\");\n    if (!tokens.base) {\n      tokeniser.unconsume(start_position);\n      return;\n    }\n    ret.idlType =\n      type_with_extended_attributes(tokeniser, \"attribute-type\") ||\n      tokeniser.error(\"Attribute lacks a type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.consume(\"async\", \"required\") ||\n      tokeniser.error(\"Attribute lacks a name\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated attribute, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"attribute\";\n  }\n  get special() {\n    if (!this.tokens.special) {\n      return \"\";\n    }\n    return this.tokens.special.value;\n  }\n  get readonly() {\n    return !!this.tokens.readonly;\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    yield* this.idlType.validate(defs);\n\n    if ([\"sequence\", \"record\"].includes(this.idlType.generic)) {\n      const message = `Attributes cannot accept ${this.idlType.generic} types.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"attr-invalid-type\",\n        message\n      );\n    }\n\n    {\n      const { reference } = idlTypeIncludesDictionary(this.idlType, defs) || {};\n      if (reference) {\n        const targetToken = (this.idlType.union ? reference : this.idlType)\n          .tokens.base;\n        const message = \"Attributes cannot accept dictionary types.\";\n        yield validationError(targetToken, this, \"attr-invalid-type\", message);\n      }\n    }\n\n    if (this.readonly) {\n      if (idlTypeIncludesEnforceRange(this.idlType, defs)) {\n        const targetToken = this.idlType.tokens.base;\n        const message =\n          \"Readonly attributes cannot accept [EnforceRange] extended attribute.\";\n        yield validationError(targetToken, this, \"attr-invalid-type\", message);\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.special),\n        w.token(this.tokens.readonly),\n        w.token(this.tokens.base),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this, parent }),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Type } from \"./type.js\";\nimport { Argument } from \"./argument.js\";\nimport {\n  ExtendedAttributes,\n  SimpleExtendedAttribute,\n} from \"./extended-attributes.js\";\nimport { Operation } from \"./operation.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Tokeniser } from \"../tokeniser.js\";\n\n/**\n * @param {string} identifier\n */\nexport function unescape(identifier) {\n  return identifier.startsWith(\"_\") ? identifier.slice(1) : identifier;\n}\n\n/**\n * Parses comma-separated list\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {object} args\n * @param {Function} args.parser parser function for each item\n * @param {boolean} [args.allowDangler] whether to allow dangling comma\n * @param {string} [args.listName] the name to be shown on error messages\n */\nexport function list(tokeniser, { parser, allowDangler, listName = \"list\" }) {\n  const first = parser(tokeniser);\n  if (!first) {\n    return [];\n  }\n  first.tokens.separator = tokeniser.consume(\",\");\n  const items = [first];\n  while (first.tokens.separator) {\n    const item = parser(tokeniser);\n    if (!item) {\n      if (!allowDangler) {\n        tokeniser.error(`Trailing comma in ${listName}`);\n      }\n      break;\n    }\n    item.tokens.separator = tokeniser.consume(\",\");\n    items.push(item);\n    if (!item.tokens.separator) break;\n  }\n  return items;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function const_value(tokeniser) {\n  return (\n    tokeniser.consumeKind(\"decimal\", \"integer\") ||\n    tokeniser.consume(\"true\", \"false\", \"Infinity\", \"-Infinity\", \"NaN\")\n  );\n}\n\n/**\n * @param {object} token\n * @param {string} token.type\n * @param {string} token.value\n */\nexport function const_data({ type, value }) {\n  switch (type) {\n    case \"decimal\":\n    case \"integer\":\n      return { type: \"number\", value };\n    case \"string\":\n      return { type: \"string\", value: value.slice(1, -1) };\n  }\n\n  switch (value) {\n    case \"true\":\n    case \"false\":\n      return { type: \"boolean\", value: value === \"true\" };\n    case \"Infinity\":\n    case \"-Infinity\":\n      return { type: \"Infinity\", negative: value.startsWith(\"-\") };\n    case \"[\":\n      return { type: \"sequence\", value: [] };\n    case \"{\":\n      return { type: \"dictionary\" };\n    default:\n      return { type: value };\n  }\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function primitive_type(tokeniser) {\n  function integer_type() {\n    const prefix = tokeniser.consume(\"unsigned\");\n    const base = tokeniser.consume(\"short\", \"long\");\n    if (base) {\n      const postfix = tokeniser.consume(\"long\");\n      return new Type({ source, tokens: { prefix, base, postfix } });\n    }\n    if (prefix) tokeniser.error(\"Failed to parse integer type\");\n  }\n\n  function decimal_type() {\n    const prefix = tokeniser.consume(\"unrestricted\");\n    const base = tokeniser.consume(\"float\", \"double\");\n    if (base) {\n      return new Type({ source, tokens: { prefix, base } });\n    }\n    if (prefix) tokeniser.error(\"Failed to parse float type\");\n  }\n\n  const { source } = tokeniser;\n  const num_type = integer_type() || decimal_type();\n  if (num_type) return num_type;\n  const base = tokeniser.consume(\n    \"bigint\",\n    \"boolean\",\n    \"byte\",\n    \"octet\",\n    \"undefined\"\n  );\n  if (base) {\n    return new Type({ source, tokens: { base } });\n  }\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function argument_list(tokeniser) {\n  return list(tokeniser, {\n    parser: Argument.parse,\n    listName: \"arguments list\",\n  });\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string=} typeName (TODO: See Type.type for more details)\n */\nexport function type_with_extended_attributes(tokeniser, typeName) {\n  const extAttrs = ExtendedAttributes.parse(tokeniser);\n  const ret = Type.parse(tokeniser, typeName);\n  if (ret) autoParenter(ret).extAttrs = extAttrs;\n  return ret;\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {string=} typeName (TODO: See Type.type for more details)\n */\nexport function return_type(tokeniser, typeName) {\n  const typ = Type.parse(tokeniser, typeName || \"return-type\");\n  if (typ) {\n    return typ;\n  }\n  const voidToken = tokeniser.consume(\"void\");\n  if (voidToken) {\n    const ret = new Type({\n      source: tokeniser.source,\n      tokens: { base: voidToken },\n    });\n    ret.type = \"return-type\";\n    return ret;\n  }\n}\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nexport function stringifier(tokeniser) {\n  const special = tokeniser.consume(\"stringifier\");\n  if (!special) return;\n  const member =\n    Attribute.parse(tokeniser, { special }) ||\n    Operation.parse(tokeniser, { special }) ||\n    tokeniser.error(\"Unterminated stringifier\");\n  return member;\n}\n\n/**\n * @param {string} str\n */\nexport function getLastIndentation(str) {\n  const lines = str.split(\"\\n\");\n  // the first line visually binds to the preceding token\n  if (lines.length) {\n    const match = lines[lines.length - 1].match(/^\\s+/);\n    if (match) {\n      return match[0];\n    }\n  }\n  return \"\";\n}\n\n/**\n * @param {string} parentTrivia\n */\nexport function getMemberIndentation(parentTrivia) {\n  const indentation = getLastIndentation(parentTrivia);\n  const indentCh = indentation.includes(\"\\t\") ? \"\\t\" : \"  \";\n  return indentation + indentCh;\n}\n\n/**\n * @param {import(\"./interface.js\").Interface} def\n */\nexport function autofixAddExposedWindow(def) {\n  return () => {\n    if (def.extAttrs.length) {\n      const tokeniser = new Tokeniser(\"Exposed=Window,\");\n      const exposed = SimpleExtendedAttribute.parse(tokeniser);\n      exposed.tokens.separator = tokeniser.consume(\",\");\n      const existing = def.extAttrs[0];\n      if (!/^\\s/.test(existing.tokens.name.trivia)) {\n        existing.tokens.name.trivia = ` ${existing.tokens.name.trivia}`;\n      }\n      def.extAttrs.unshift(exposed);\n    } else {\n      autoParenter(def).extAttrs = ExtendedAttributes.parse(\n        new Tokeniser(\"[Exposed=Window]\")\n      );\n      const trivia = def.tokens.base.trivia;\n      def.extAttrs.tokens.open.trivia = trivia;\n      def.tokens.base.trivia = `\\n${getLastIndentation(trivia)}`;\n    }\n  };\n}\n\n/**\n * Get the first syntax token for the given IDL object.\n * @param {*} data\n */\nexport function getFirstToken(data) {\n  if (data.extAttrs.length) {\n    return data.extAttrs.tokens.open;\n  }\n  if (data.type === \"operation\" && !data.special) {\n    return getFirstToken(data.idlType);\n  }\n  const tokens = Object.values(data.tokens).sort((x, y) => x.index - y.index);\n  return tokens[0];\n}\n\n/**\n * @template T\n * @param {T[]} array\n * @param {(item: T) => boolean} predicate\n */\nexport function findLastIndex(array, predicate) {\n  const index = array.slice().reverse().findIndex(predicate);\n  if (index === -1) {\n    return index;\n  }\n  return array.length - index - 1;\n}\n\n/**\n * Returns a proxy that auto-assign `parent` field.\n * @template {Record<string | symbol, any>} T\n * @param {T} data\n * @param {*} [parent] The object that will be assigned to `parent`.\n *                     If absent, it will be `data` by default.\n * @return {T}\n */\nexport function autoParenter(data, parent) {\n  if (!parent) {\n    // Defaults to `data` unless specified otherwise.\n    parent = data;\n  }\n  if (!data) {\n    // This allows `autoParenter(undefined)` which again allows\n    // `autoParenter(parse())` where the function may return nothing.\n    return data;\n  }\n  const proxy = new Proxy(data, {\n    get(target, p) {\n      const value = target[p];\n      if (Array.isArray(value) && p !== \"source\") {\n        // Wraps the array so that any added items will also automatically\n        // get their `parent` values.\n        return autoParenter(value, target);\n      }\n      return value;\n    },\n    set(target, p, value) {\n      // @ts-ignore https://github.com/microsoft/TypeScript/issues/47357\n      target[p] = value;\n      if (!value) {\n        return true;\n      } else if (Array.isArray(value)) {\n        // Assigning an array will add `parent` to its items.\n        for (const item of value) {\n          if (typeof item.parent !== \"undefined\") {\n            item.parent = parent;\n          }\n        }\n      } else if (typeof value.parent !== \"undefined\") {\n        value.parent = parent;\n      }\n      return true;\n    },\n  });\n  return proxy;\n}\n","import { syntaxError } from \"./error.js\";\nimport { unescape } from \"./productions/helpers.js\";\n\n// These regular expressions use the sticky flag so they will only match at\n// the current location (ie. the offset of lastIndex).\nconst tokenRe = {\n  // This expression uses a lookahead assertion to catch false matches\n  // against integers early.\n  decimal:\n    /-?(?=[0-9]*\\.|[0-9]+[eE])(([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([Ee][-+]?[0-9]+)?|[0-9]+[Ee][-+]?[0-9]+)/y,\n  integer: /-?(0([Xx][0-9A-Fa-f]+|[0-7]*)|[1-9][0-9]*)/y,\n  identifier: /[_-]?[A-Za-z][0-9A-Z_a-z-]*/y,\n  string: /\"[^\"]*\"/y,\n  whitespace: /[\\t\\n\\r ]+/y,\n  comment: /\\/\\/.*|\\/\\*[\\s\\S]*?\\*\\//y,\n  other: /[^\\t\\n\\r 0-9A-Za-z]/y,\n};\n\nexport const typeNameKeywords = [\n  \"ArrayBuffer\",\n  \"SharedArrayBuffer\",\n  \"DataView\",\n  \"Int8Array\",\n  \"Int16Array\",\n  \"Int32Array\",\n  \"Uint8Array\",\n  \"Uint16Array\",\n  \"Uint32Array\",\n  \"Uint8ClampedArray\",\n  \"BigInt64Array\",\n  \"BigUint64Array\",\n  \"Float32Array\",\n  \"Float64Array\",\n  \"any\",\n  \"object\",\n  \"symbol\",\n];\n\nexport const stringTypes = [\"ByteString\", \"DOMString\", \"USVString\"];\n\nexport const argumentNameKeywords = [\n  \"async\",\n  \"attribute\",\n  \"callback\",\n  \"const\",\n  \"constructor\",\n  \"deleter\",\n  \"dictionary\",\n  \"enum\",\n  \"getter\",\n  \"includes\",\n  \"inherit\",\n  \"interface\",\n  \"iterable\",\n  \"maplike\",\n  \"namespace\",\n  \"partial\",\n  \"required\",\n  \"setlike\",\n  \"setter\",\n  \"static\",\n  \"stringifier\",\n  \"typedef\",\n  \"unrestricted\",\n];\n\nconst nonRegexTerminals = [\n  \"-Infinity\",\n  \"FrozenArray\",\n  \"Infinity\",\n  \"NaN\",\n  \"ObservableArray\",\n  \"Promise\",\n  \"bigint\",\n  \"boolean\",\n  \"byte\",\n  \"double\",\n  \"false\",\n  \"float\",\n  \"long\",\n  \"mixin\",\n  \"null\",\n  \"octet\",\n  \"optional\",\n  \"or\",\n  \"readonly\",\n  \"record\",\n  \"sequence\",\n  \"short\",\n  \"true\",\n  \"undefined\",\n  \"unsigned\",\n  \"void\",\n].concat(argumentNameKeywords, stringTypes, typeNameKeywords);\n\nconst punctuations = [\n  \"(\",\n  \")\",\n  \",\",\n  \"...\",\n  \":\",\n  \";\",\n  \"<\",\n  \"=\",\n  \">\",\n  \"?\",\n  \"*\",\n  \"[\",\n  \"]\",\n  \"{\",\n  \"}\",\n];\n\nconst reserved = [\n  // \"constructor\" is now a keyword\n  \"_constructor\",\n  \"toString\",\n  \"_toString\",\n];\n\n/**\n * @typedef {ArrayItemType<ReturnType<typeof tokenise>>} Token\n * @param {string} str\n */\nfunction tokenise(str) {\n  const tokens = [];\n  let lastCharIndex = 0;\n  let trivia = \"\";\n  let line = 1;\n  let index = 0;\n  while (lastCharIndex < str.length) {\n    const nextChar = str.charAt(lastCharIndex);\n    let result = -1;\n\n    if (/[\\t\\n\\r ]/.test(nextChar)) {\n      result = attemptTokenMatch(\"whitespace\", { noFlushTrivia: true });\n    } else if (nextChar === \"/\") {\n      result = attemptTokenMatch(\"comment\", { noFlushTrivia: true });\n    }\n\n    if (result !== -1) {\n      const currentTrivia = tokens.pop().value;\n      line += (currentTrivia.match(/\\n/g) || []).length;\n      trivia += currentTrivia;\n      index -= 1;\n    } else if (/[-0-9.A-Z_a-z]/.test(nextChar)) {\n      result = attemptTokenMatch(\"decimal\");\n      if (result === -1) {\n        result = attemptTokenMatch(\"integer\");\n      }\n      if (result === -1) {\n        result = attemptTokenMatch(\"identifier\");\n        const lastIndex = tokens.length - 1;\n        const token = tokens[lastIndex];\n        if (result !== -1) {\n          if (reserved.includes(token.value)) {\n            const message = `${unescape(\n              token.value\n            )} is a reserved identifier and must not be used.`;\n            throw new WebIDLParseError(\n              syntaxError(tokens, lastIndex, null, message)\n            );\n          } else if (nonRegexTerminals.includes(token.value)) {\n            token.type = \"inline\";\n          }\n        }\n      }\n    } else if (nextChar === '\"') {\n      result = attemptTokenMatch(\"string\");\n    }\n\n    for (const punctuation of punctuations) {\n      if (str.startsWith(punctuation, lastCharIndex)) {\n        tokens.push({\n          type: \"inline\",\n          value: punctuation,\n          trivia,\n          line,\n          index,\n        });\n        trivia = \"\";\n        lastCharIndex += punctuation.length;\n        result = lastCharIndex;\n        break;\n      }\n    }\n\n    // other as the last try\n    if (result === -1) {\n      result = attemptTokenMatch(\"other\");\n    }\n    if (result === -1) {\n      throw new Error(\"Token stream not progressing\");\n    }\n    lastCharIndex = result;\n    index += 1;\n  }\n\n  // remaining trivia as eof\n  tokens.push({\n    type: \"eof\",\n    value: \"\",\n    trivia,\n    line,\n    index,\n  });\n\n  return tokens;\n\n  /**\n   * @param {keyof typeof tokenRe} type\n   * @param {object} options\n   * @param {boolean} [options.noFlushTrivia]\n   */\n  function attemptTokenMatch(type, { noFlushTrivia } = {}) {\n    const re = tokenRe[type];\n    re.lastIndex = lastCharIndex;\n    const result = re.exec(str);\n    if (result) {\n      tokens.push({ type, value: result[0], trivia, line, index });\n      if (!noFlushTrivia) {\n        trivia = \"\";\n      }\n      return re.lastIndex;\n    }\n    return -1;\n  }\n}\n\nexport class Tokeniser {\n  /**\n   * @param {string} idl\n   */\n  constructor(idl) {\n    this.source = tokenise(idl);\n    this.position = 0;\n  }\n\n  /**\n   * @param {string} message\n   * @return {never}\n   */\n  error(message) {\n    throw new WebIDLParseError(\n      syntaxError(this.source, this.position, this.current, message)\n    );\n  }\n\n  /**\n   * @param {string} type\n   */\n  probeKind(type) {\n    return (\n      this.source.length > this.position &&\n      this.source[this.position].type === type\n    );\n  }\n\n  /**\n   * @param {string} value\n   */\n  probe(value) {\n    return (\n      this.probeKind(\"inline\") && this.source[this.position].value === value\n    );\n  }\n\n  /**\n   * @param {...string} candidates\n   */\n  consumeKind(...candidates) {\n    for (const type of candidates) {\n      if (!this.probeKind(type)) continue;\n      const token = this.source[this.position];\n      this.position++;\n      return token;\n    }\n  }\n\n  /**\n   * @param {...string} candidates\n   */\n  consume(...candidates) {\n    if (!this.probeKind(\"inline\")) return;\n    const token = this.source[this.position];\n    for (const value of candidates) {\n      if (token.value !== value) continue;\n      this.position++;\n      return token;\n    }\n  }\n\n  /**\n   * @param {string} value\n   */\n  consumeIdentifier(value) {\n    if (!this.probeKind(\"identifier\")) {\n      return;\n    }\n    if (this.source[this.position].value !== value) {\n      return;\n    }\n    return this.consumeKind(\"identifier\");\n  }\n\n  /**\n   * @param {number} position\n   */\n  unconsume(position) {\n    this.position = position;\n  }\n}\n\nexport class WebIDLParseError extends Error {\n  /**\n   * @param {object} options\n   * @param {string} options.message\n   * @param {string} options.bareMessage\n   * @param {string} options.context\n   * @param {number} options.line\n   * @param {*} options.sourceName\n   * @param {string} options.input\n   * @param {*[]} options.tokens\n   */\n  constructor({\n    message,\n    bareMessage,\n    context,\n    line,\n    sourceName,\n    input,\n    tokens,\n  }) {\n    super(message);\n\n    this.name = \"WebIDLParseError\"; // not to be mangled\n    this.bareMessage = bareMessage;\n    this.context = context;\n    this.line = line;\n    this.sourceName = sourceName;\n    this.input = input;\n    this.tokens = tokens;\n  }\n}\n","import { list, unescape, autoParenter } from \"./helpers.js\";\nimport { WrappedToken } from \"./token.js\";\nimport { Base } from \"./base.js\";\n\nexport class EnumValue extends WrappedToken {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const value = tokeniser.consumeKind(\"string\");\n    if (value) {\n      return new EnumValue({ source: tokeniser.source, tokens: { value } });\n    }\n  }\n\n  get type() {\n    return \"enum-value\";\n  }\n  get value() {\n    return super.value.slice(1, -1);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.wrap([\n      w.ts.trivia(this.tokens.value.trivia),\n      w.ts.definition(\n        w.ts.wrap(['\"', w.ts.name(this.value, { data: this, parent }), '\"']),\n        { data: this, parent }\n      ),\n      w.token(this.tokens.separator),\n    ]);\n  }\n}\n\nexport class Enum extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    tokens.base = tokeniser.consume(\"enum\");\n    if (!tokens.base) {\n      return;\n    }\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"No name for enum\");\n    const ret = autoParenter(new Enum({ source: tokeniser.source, tokens }));\n    tokeniser.current = ret.this;\n    tokens.open = tokeniser.consume(\"{\") || tokeniser.error(\"Bodyless enum\");\n    ret.values = list(tokeniser, {\n      parser: EnumValue.parse,\n      allowDangler: true,\n      listName: \"enumeration\",\n    });\n    if (tokeniser.probeKind(\"string\")) {\n      tokeniser.error(\"No comma between enum values\");\n    }\n    tokens.close =\n      tokeniser.consume(\"}\") || tokeniser.error(\"Unexpected value in enum\");\n    if (!ret.values.length) {\n      tokeniser.error(\"No value in enum\");\n    }\n    tokens.termination =\n      tokeniser.consume(\";\") || tokeniser.error(\"No semicolon after enum\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"enum\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.name_token(this.tokens.name, { data: this }),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.values.map((v) => v.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { unescape } from \"./helpers.js\";\n\nexport class Includes extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const target = tokeniser.consumeKind(\"identifier\");\n    if (!target) {\n      return;\n    }\n    const tokens = { target };\n    tokens.includes = tokeniser.consume(\"includes\");\n    if (!tokens.includes) {\n      tokeniser.unconsume(target.index);\n      return;\n    }\n    tokens.mixin =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Incomplete includes statement\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"No terminating ; for includes statement\");\n    return new Includes({ source: tokeniser.source, tokens });\n  }\n\n  get type() {\n    return \"includes\";\n  }\n  get target() {\n    return unescape(this.tokens.target.value);\n  }\n  get includes() {\n    return unescape(this.tokens.mixin.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.reference_token(this.tokens.target, this),\n        w.token(this.tokens.includes),\n        w.reference_token(this.tokens.mixin, this),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  type_with_extended_attributes,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\n\nexport class Typedef extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    const ret = autoParenter(new Typedef({ source: tokeniser.source, tokens }));\n    tokens.base = tokeniser.consume(\"typedef\");\n    if (!tokens.base) {\n      return;\n    }\n    ret.idlType =\n      type_with_extended_attributes(tokeniser, \"typedef-type\") ||\n      tokeniser.error(\"Typedef lacks a type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Typedef lacks a name\");\n    tokeniser.current = ret.this;\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated typedef, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"typedef\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  *validate(defs) {\n    yield* this.idlType.validate(defs);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this }),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  return_type,\n  argument_list,\n  unescape,\n  autoParenter,\n} from \"./helpers.js\";\n\nexport class CallbackFunction extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser, base) {\n    const tokens = { base };\n    const ret = autoParenter(\n      new CallbackFunction({ source: tokeniser.source, tokens })\n    );\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Callback lacks a name\");\n    tokeniser.current = ret.this;\n    tokens.assign =\n      tokeniser.consume(\"=\") || tokeniser.error(\"Callback lacks an assignment\");\n    ret.idlType =\n      return_type(tokeniser) || tokeniser.error(\"Callback lacks a return type\");\n    tokens.open =\n      tokeniser.consume(\"(\") ||\n      tokeniser.error(\"Callback lacks parentheses for arguments\");\n    ret.arguments = argument_list(tokeniser);\n    tokens.close =\n      tokeniser.consume(\")\") || tokeniser.error(\"Unterminated callback\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated callback, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"callback\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    yield* this.idlType.validate(defs);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.name_token(this.tokens.name, { data: this }),\n        w.token(this.tokens.assign),\n        w.ts.type(this.idlType.write(w)),\n        w.token(this.tokens.open),\n        ...this.arguments.map((arg) => arg.write(w)),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\nimport { unescape, autoParenter } from \"./helpers.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction inheritance(tokeniser) {\n  const colon = tokeniser.consume(\":\");\n  if (!colon) {\n    return {};\n  }\n  const inheritance =\n    tokeniser.consumeKind(\"identifier\") ||\n    tokeniser.error(\"Inheritance lacks a type\");\n  return { colon, inheritance };\n}\n\n/**\n * Parser callback.\n * @callback ParserCallback\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n * @param {...*} args\n */\n\n/**\n * A parser callback and optional option object.\n * @typedef AllowedMember\n * @type {[ParserCallback, object?]}\n */\n\nexport class Container extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {*} instance TODO: This should be {T extends Container}, but see https://github.com/microsoft/TypeScript/issues/4628\n   * @param {*} args\n   */\n  static parse(tokeniser, instance, { inheritable, allowedMembers }) {\n    const { tokens, type } = instance;\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(`Missing name in ${type}`);\n    tokeniser.current = instance;\n    instance = autoParenter(instance);\n    if (inheritable) {\n      Object.assign(tokens, inheritance(tokeniser));\n    }\n    tokens.open = tokeniser.consume(\"{\") || tokeniser.error(`Bodyless ${type}`);\n    instance.members = [];\n    while (true) {\n      tokens.close = tokeniser.consume(\"}\");\n      if (tokens.close) {\n        tokens.termination =\n          tokeniser.consume(\";\") ||\n          tokeniser.error(`Missing semicolon after ${type}`);\n        return instance.this;\n      }\n      const ea = ExtendedAttributes.parse(tokeniser);\n      let mem;\n      for (const [parser, ...args] of allowedMembers) {\n        mem = autoParenter(parser(tokeniser, ...args));\n        if (mem) {\n          break;\n        }\n      }\n      if (!mem) {\n        tokeniser.error(\"Unknown member\");\n      }\n      mem.extAttrs = ea;\n      instance.members.push(mem.this);\n    }\n  }\n\n  get partial() {\n    return !!this.tokens.partial;\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n  get inheritance() {\n    if (!this.tokens.inheritance) {\n      return null;\n    }\n    return unescape(this.tokens.inheritance.value);\n  }\n\n  *validate(defs) {\n    for (const member of this.members) {\n      if (member.validate) {\n        yield* member.validate(defs);\n      }\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const inheritance = () => {\n      if (!this.tokens.inheritance) {\n        return \"\";\n      }\n      return w.ts.wrap([\n        w.token(this.tokens.colon),\n        w.ts.trivia(this.tokens.inheritance.trivia),\n        w.ts.inheritance(\n          w.reference(this.tokens.inheritance.value, { context: this })\n        ),\n      ]);\n    };\n\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.callback),\n        w.token(this.tokens.partial),\n        w.token(this.tokens.base),\n        w.token(this.tokens.mixin),\n        w.name_token(this.tokens.name, { data: this }),\n        inheritance(),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.members.map((m) => m.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { Type } from \"./type.js\";\nimport {\n  const_data,\n  const_value,\n  primitive_type,\n  autoParenter,\n  unescape,\n} from \"./helpers.js\";\n\nexport class Constant extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    tokens.base = tokeniser.consume(\"const\");\n    if (!tokens.base) {\n      return;\n    }\n    let idlType = primitive_type(tokeniser);\n    if (!idlType) {\n      const base =\n        tokeniser.consumeKind(\"identifier\") ||\n        tokeniser.error(\"Const lacks a type\");\n      idlType = new Type({ source: tokeniser.source, tokens: { base } });\n    }\n    if (tokeniser.probe(\"?\")) {\n      tokeniser.error(\"Unexpected nullable constant type\");\n    }\n    idlType.type = \"const-type\";\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Const lacks a name\");\n    tokens.assign =\n      tokeniser.consume(\"=\") || tokeniser.error(\"Const lacks value assignment\");\n    tokens.value =\n      const_value(tokeniser) || tokeniser.error(\"Const lacks a value\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated const, expected `;`\");\n    const ret = new Constant({ source: tokeniser.source, tokens });\n    autoParenter(ret).idlType = idlType;\n    return ret;\n  }\n\n  get type() {\n    return \"const\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n  get value() {\n    return const_data(this.tokens.value);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this, parent }),\n        w.token(this.tokens.assign),\n        w.token(this.tokens.value),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  type_with_extended_attributes,\n  autoParenter,\n  argument_list,\n} from \"./helpers.js\";\n\nexport class IterableLike extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const start_position = tokeniser.position;\n    const ret = autoParenter(\n      new IterableLike({ source: tokeniser.source, tokens: {} })\n    );\n    const { tokens } = ret;\n    tokens.readonly = tokeniser.consume(\"readonly\");\n    if (!tokens.readonly) {\n      tokens.async = tokeniser.consume(\"async\");\n    }\n    tokens.base = tokens.readonly\n      ? tokeniser.consume(\"maplike\", \"setlike\")\n      : tokens.async\n      ? tokeniser.consume(\"iterable\")\n      : tokeniser.consume(\"iterable\", \"maplike\", \"setlike\");\n    if (!tokens.base) {\n      tokeniser.unconsume(start_position);\n      return;\n    }\n\n    const { type } = ret;\n    const secondTypeRequired = type === \"maplike\";\n    const secondTypeAllowed = secondTypeRequired || type === \"iterable\";\n    const argumentAllowed = ret.async && type === \"iterable\";\n\n    tokens.open =\n      tokeniser.consume(\"<\") ||\n      tokeniser.error(`Missing less-than sign \\`<\\` in ${type} declaration`);\n    const first =\n      type_with_extended_attributes(tokeniser) ||\n      tokeniser.error(`Missing a type argument in ${type} declaration`);\n    ret.idlType = [first];\n    ret.arguments = [];\n\n    if (secondTypeAllowed) {\n      first.tokens.separator = tokeniser.consume(\",\");\n      if (first.tokens.separator) {\n        ret.idlType.push(type_with_extended_attributes(tokeniser));\n      } else if (secondTypeRequired) {\n        tokeniser.error(`Missing second type argument in ${type} declaration`);\n      }\n    }\n\n    tokens.close =\n      tokeniser.consume(\">\") ||\n      tokeniser.error(`Missing greater-than sign \\`>\\` in ${type} declaration`);\n\n    if (tokeniser.probe(\"(\")) {\n      if (argumentAllowed) {\n        tokens.argsOpen = tokeniser.consume(\"(\");\n        ret.arguments.push(...argument_list(tokeniser));\n        tokens.argsClose =\n          tokeniser.consume(\")\") ||\n          tokeniser.error(\"Unterminated async iterable argument list\");\n      } else {\n        tokeniser.error(`Arguments are only allowed for \\`async iterable\\``);\n      }\n    }\n\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(`Missing semicolon after ${type} declaration`);\n\n    return ret.this;\n  }\n\n  get type() {\n    return this.tokens.base.value;\n  }\n  get readonly() {\n    return !!this.tokens.readonly;\n  }\n  get async() {\n    return !!this.tokens.async;\n  }\n\n  *validate(defs) {\n    for (const type of this.idlType) {\n      yield* type.validate(defs);\n    }\n    for (const argument of this.arguments) {\n      yield* argument.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.readonly),\n        w.token(this.tokens.async),\n        w.token(this.tokens.base, w.ts.generic),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.idlType.map((t) => t.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.argsOpen),\n        w.ts.wrap(this.arguments.map((arg) => arg.write(w))),\n        w.token(this.tokens.argsClose),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent: this.parent }\n    );\n  }\n}\n","import { Base } from \"./base.js\";\nimport { argument_list, autoParenter } from \"./helpers.js\";\n\nexport class Constructor extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    const base = tokeniser.consume(\"constructor\");\n    if (!base) {\n      return;\n    }\n    /** @type {Base[\"tokens\"]} */\n    const tokens = { base };\n    tokens.open =\n      tokeniser.consume(\"(\") ||\n      tokeniser.error(\"No argument list in constructor\");\n    const args = argument_list(tokeniser);\n    tokens.close =\n      tokeniser.consume(\")\") || tokeniser.error(\"Unterminated constructor\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"No semicolon after constructor\");\n    const ret = new Constructor({ source: tokeniser.source, tokens });\n    autoParenter(ret).arguments = args;\n    return ret;\n  }\n\n  get type() {\n    return \"constructor\";\n  }\n\n  *validate(defs) {\n    for (const argument of this.arguments) {\n      yield* argument.validate(defs);\n    }\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.base, w.ts.nameless, { data: this, parent }),\n        w.token(this.tokens.open),\n        w.ts.wrap(this.arguments.map((arg) => arg.write(w))),\n        w.token(this.tokens.close),\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Operation } from \"./operation.js\";\nimport { Constant } from \"./constant.js\";\nimport { IterableLike } from \"./iterable.js\";\nimport {\n  stringifier,\n  autofixAddExposedWindow,\n  getMemberIndentation,\n  getLastIndentation,\n  getFirstToken,\n  findLastIndex,\n  autoParenter,\n} from \"./helpers.js\";\nimport { validationError } from \"../error.js\";\nimport { checkInterfaceMemberDuplication } from \"../validators/interface.js\";\nimport { Constructor } from \"./constructor.js\";\nimport { Tokeniser } from \"../tokeniser.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\n\n/**\n * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n */\nfunction static_member(tokeniser) {\n  const special = tokeniser.consume(\"static\");\n  if (!special) return;\n  const member =\n    Attribute.parse(tokeniser, { special }) ||\n    Operation.parse(tokeniser, { special }) ||\n    tokeniser.error(\"No body in static member\");\n  return member;\n}\n\nexport class Interface extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {import(\"../tokeniser.js\").Token} base\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token|null} [options.partial]\n   */\n  static parse(tokeniser, base, { extMembers = [], partial = null } = {}) {\n    const tokens = { partial, base };\n    return Container.parse(\n      tokeniser,\n      new Interface({ source: tokeniser.source, tokens }),\n      {\n        inheritable: !partial,\n        allowedMembers: [\n          ...extMembers,\n          [Constant.parse],\n          [Constructor.parse],\n          [static_member],\n          [stringifier],\n          [IterableLike.parse],\n          [Attribute.parse],\n          [Operation.parse],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"interface\";\n  }\n\n  *validate(defs) {\n    yield* this.extAttrs.validate(defs);\n    if (\n      !this.partial &&\n      this.extAttrs.every((extAttr) => extAttr.name !== \"Exposed\")\n    ) {\n      const message = `Interfaces must have \\`[Exposed]\\` extended attribute. \\\nTo fix, add, for example, \\`[Exposed=Window]\\`. Please also consider carefully \\\nif your interface should also be exposed in a Worker scope. Refer to the \\\n[WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) \\\nfor more information.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"require-exposed\",\n        message,\n        {\n          autofix: autofixAddExposedWindow(this),\n        }\n      );\n    }\n    const oldConstructors = this.extAttrs.filter(\n      (extAttr) => extAttr.name === \"Constructor\"\n    );\n    for (const constructor of oldConstructors) {\n      const message = `Constructors should now be represented as a \\`constructor()\\` operation on the interface \\\ninstead of \\`[Constructor]\\` extended attribute. Refer to the \\\n[WebIDL spec section on constructor operations](https://heycam.github.io/webidl/#idl-constructors) \\\nfor more information.`;\n      yield validationError(\n        constructor.tokens.name,\n        this,\n        \"constructor-member\",\n        message,\n        {\n          autofix: autofixConstructor(this, constructor),\n        }\n      );\n    }\n\n    const isGlobal = this.extAttrs.some((extAttr) => extAttr.name === \"Global\");\n    if (isGlobal) {\n      const factoryFunctions = this.extAttrs.filter(\n        (extAttr) => extAttr.name === \"LegacyFactoryFunction\"\n      );\n      for (const named of factoryFunctions) {\n        const message = `Interfaces marked as \\`[Global]\\` cannot have factory functions.`;\n        yield validationError(\n          named.tokens.name,\n          this,\n          \"no-constructible-global\",\n          message\n        );\n      }\n\n      const constructors = this.members.filter(\n        (member) => member.type === \"constructor\"\n      );\n      for (const named of constructors) {\n        const message = `Interfaces marked as \\`[Global]\\` cannot have constructors.`;\n        yield validationError(\n          named.tokens.base,\n          this,\n          \"no-constructible-global\",\n          message\n        );\n      }\n    }\n\n    yield* super.validate(defs);\n    if (!this.partial) {\n      yield* checkInterfaceMemberDuplication(defs, this);\n    }\n  }\n}\n\nfunction autofixConstructor(interfaceDef, constructorExtAttr) {\n  interfaceDef = autoParenter(interfaceDef);\n  return () => {\n    const indentation = getLastIndentation(\n      interfaceDef.extAttrs.tokens.open.trivia\n    );\n    const memberIndent = interfaceDef.members.length\n      ? getLastIndentation(getFirstToken(interfaceDef.members[0]).trivia)\n      : getMemberIndentation(indentation);\n    const constructorOp = Constructor.parse(\n      new Tokeniser(`\\n${memberIndent}constructor();`)\n    );\n    constructorOp.extAttrs = new ExtendedAttributes({\n      source: interfaceDef.source,\n      tokens: {},\n    });\n    autoParenter(constructorOp).arguments = constructorExtAttr.arguments;\n\n    const existingIndex = findLastIndex(\n      interfaceDef.members,\n      (m) => m.type === \"constructor\"\n    );\n    interfaceDef.members.splice(existingIndex + 1, 0, constructorOp);\n\n    const { close } = interfaceDef.tokens;\n    if (!close.trivia.includes(\"\\n\")) {\n      close.trivia += `\\n${indentation}`;\n    }\n\n    const { extAttrs } = interfaceDef;\n    const index = extAttrs.indexOf(constructorExtAttr);\n    const removed = extAttrs.splice(index, 1);\n    if (!extAttrs.length) {\n      extAttrs.tokens.open = extAttrs.tokens.close = undefined;\n    } else if (extAttrs.length === index) {\n      extAttrs[index - 1].tokens.separator = undefined;\n    } else if (!extAttrs[index].tokens.name.trivia.trim()) {\n      extAttrs[index].tokens.name.trivia = removed[0].tokens.name.trivia;\n    }\n  };\n}\n","import { validationError } from \"../error.js\";\n\n/**\n * @param {import(\"../validator.js\").Definitions} defs\n * @param {import(\"../productions/container.js\").Container} i\n */\nexport function* checkInterfaceMemberDuplication(defs, i) {\n  const opNames = groupOperationNames(i);\n  const partials = defs.partials.get(i.name) || [];\n  const mixins = defs.mixinMap.get(i.name) || [];\n  for (const ext of [...partials, ...mixins]) {\n    const additions = getOperations(ext);\n    const statics = additions.filter((a) => a.special === \"static\");\n    const nonstatics = additions.filter((a) => a.special !== \"static\");\n    yield* checkAdditions(statics, opNames.statics, ext, i);\n    yield* checkAdditions(nonstatics, opNames.nonstatics, ext, i);\n    statics.forEach((op) => opNames.statics.add(op.name));\n    nonstatics.forEach((op) => opNames.nonstatics.add(op.name));\n  }\n\n  /**\n   * @param {import(\"../productions/operation.js\").Operation[]} additions\n   * @param {Set<string>} existings\n   * @param {import(\"../productions/container.js\").Container} ext\n   * @param {import(\"../productions/container.js\").Container} base\n   */\n  function* checkAdditions(additions, existings, ext, base) {\n    for (const addition of additions) {\n      const { name } = addition;\n      if (name && existings.has(name)) {\n        const isStatic = addition.special === \"static\" ? \"static \" : \"\";\n        const message = `The ${isStatic}operation \"${name}\" has already been defined for the base interface \"${base.name}\" either in itself or in a mixin`;\n        yield validationError(\n          addition.tokens.name,\n          ext,\n          \"no-cross-overload\",\n          message\n        );\n      }\n    }\n  }\n\n  /**\n   * @param {import(\"../productions/container.js\").Container} i\n   * @returns {import(\"../productions/operation.js\").Operation[]}\n   */\n  function getOperations(i) {\n    return i.members.filter(({ type }) => type === \"operation\");\n  }\n\n  /**\n   * @param {import(\"../productions/container.js\").Container} i\n   */\n  function groupOperationNames(i) {\n    const ops = getOperations(i);\n    return {\n      statics: new Set(\n        ops.filter((op) => op.special === \"static\").map((op) => op.name)\n      ),\n      nonstatics: new Set(\n        ops.filter((op) => op.special !== \"static\").map((op) => op.name)\n      ),\n    };\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Constant } from \"./constant.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Operation } from \"./operation.js\";\nimport { stringifier } from \"./helpers.js\";\n\nexport class Mixin extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {import(\"../tokeniser.js\").Token} base\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token} [options.partial]\n   */\n  static parse(tokeniser, base, { extMembers = [], partial } = {}) {\n    const tokens = { partial, base };\n    tokens.mixin = tokeniser.consume(\"mixin\");\n    if (!tokens.mixin) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new Mixin({ source: tokeniser.source, tokens }),\n      {\n        allowedMembers: [\n          ...extMembers,\n          [Constant.parse],\n          [stringifier],\n          [Attribute.parse, { noInherit: true }],\n          [Operation.parse, { regular: true }],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"interface mixin\";\n  }\n}\n","import { Base } from \"./base.js\";\nimport {\n  unescape,\n  type_with_extended_attributes,\n  autoParenter,\n} from \"./helpers.js\";\nimport { ExtendedAttributes } from \"./extended-attributes.js\";\nimport { Default } from \"./default.js\";\n\nexport class Field extends Base {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   */\n  static parse(tokeniser) {\n    /** @type {Base[\"tokens\"]} */\n    const tokens = {};\n    const ret = autoParenter(new Field({ source: tokeniser.source, tokens }));\n    ret.extAttrs = ExtendedAttributes.parse(tokeniser);\n    tokens.required = tokeniser.consume(\"required\");\n    ret.idlType =\n      type_with_extended_attributes(tokeniser, \"dictionary-type\") ||\n      tokeniser.error(\"Dictionary member lacks a type\");\n    tokens.name =\n      tokeniser.consumeKind(\"identifier\") ||\n      tokeniser.error(\"Dictionary member lacks a name\");\n    ret.default = Default.parse(tokeniser);\n    if (tokens.required && ret.default)\n      tokeniser.error(\"Required member must not have a default\");\n    tokens.termination =\n      tokeniser.consume(\";\") ||\n      tokeniser.error(\"Unterminated dictionary member, expected `;`\");\n    return ret.this;\n  }\n\n  get type() {\n    return \"field\";\n  }\n  get name() {\n    return unescape(this.tokens.name.value);\n  }\n  get required() {\n    return !!this.tokens.required;\n  }\n\n  *validate(defs) {\n    yield* this.idlType.validate(defs);\n  }\n\n  /** @param {import(\"../writer.js\").Writer} w */\n  write(w) {\n    const { parent } = this;\n    return w.ts.definition(\n      w.ts.wrap([\n        this.extAttrs.write(w),\n        w.token(this.tokens.required),\n        w.ts.type(this.idlType.write(w)),\n        w.name_token(this.tokens.name, { data: this, parent }),\n        this.default ? this.default.write(w) : \"\",\n        w.token(this.tokens.termination),\n      ]),\n      { data: this, parent }\n    );\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Field } from \"./field.js\";\n\nexport class Dictionary extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token} [options.partial]\n   */\n  static parse(tokeniser, { extMembers = [], partial } = {}) {\n    const tokens = { partial };\n    tokens.base = tokeniser.consume(\"dictionary\");\n    if (!tokens.base) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new Dictionary({ source: tokeniser.source, tokens }),\n      {\n        inheritable: !partial,\n        allowedMembers: [...extMembers, [Field.parse]],\n      }\n    );\n  }\n\n  get type() {\n    return \"dictionary\";\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Attribute } from \"./attribute.js\";\nimport { Operation } from \"./operation.js\";\nimport { validationError } from \"../error.js\";\nimport { autofixAddExposedWindow } from \"./helpers.js\";\nimport { Constant } from \"./constant.js\";\n\nexport class Namespace extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   * @param {import(\"../tokeniser.js\").Token} [options.partial]\n   */\n  static parse(tokeniser, { extMembers = [], partial } = {}) {\n    const tokens = { partial };\n    tokens.base = tokeniser.consume(\"namespace\");\n    if (!tokens.base) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new Namespace({ source: tokeniser.source, tokens }),\n      {\n        allowedMembers: [\n          ...extMembers,\n          [Attribute.parse, { noInherit: true, readonly: true }],\n          [Constant.parse],\n          [Operation.parse, { regular: true }],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"namespace\";\n  }\n\n  *validate(defs) {\n    if (\n      !this.partial &&\n      this.extAttrs.every((extAttr) => extAttr.name !== \"Exposed\")\n    ) {\n      const message = `Namespaces must have [Exposed] extended attribute. \\\nTo fix, add, for example, [Exposed=Window]. Please also consider carefully \\\nif your namespace should also be exposed in a Worker scope. Refer to the \\\n[WebIDL spec section on Exposed](https://heycam.github.io/webidl/#Exposed) \\\nfor more information.`;\n      yield validationError(\n        this.tokens.name,\n        this,\n        \"require-exposed\",\n        message,\n        {\n          autofix: autofixAddExposedWindow(this),\n        }\n      );\n    }\n    yield* super.validate(defs);\n  }\n}\n","import { Container } from \"./container.js\";\nimport { Operation } from \"./operation.js\";\nimport { Constant } from \"./constant.js\";\n\nexport class CallbackInterface extends Container {\n  /**\n   * @param {import(\"../tokeniser.js\").Tokeniser} tokeniser\n   * @param {*} callback\n   * @param {object} [options]\n   * @param {import(\"./container.js\").AllowedMember[]} [options.extMembers]\n   */\n  static parse(tokeniser, callback, { extMembers = [] } = {}) {\n    const tokens = { callback };\n    tokens.base = tokeniser.consume(\"interface\");\n    if (!tokens.base) {\n      return;\n    }\n    return Container.parse(\n      tokeniser,\n      new CallbackInterface({ source: tokeniser.source, tokens }),\n      {\n        allowedMembers: [\n          ...extMembers,\n          [Constant.parse],\n          [Operation.parse, { regular: true }],\n        ],\n      }\n    );\n  }\n\n  get type() {\n    return \"callback interface\";\n  }\n}\n","import { Tokeniser } from \"./tokeniser.js\";\nimport { Enum } from \"./productions/enum.js\";\nimport { Includes } from \"./productions/includes.js\";\nimport { ExtendedAttributes } from \"./productions/extended-attributes.js\";\nimport { Typedef } from \"./productions/typedef.js\";\nimport { CallbackFunction } from \"./productions/callback.js\";\nimport { Interface } from \"./productions/interface.js\";\nimport { Mixin } from \"./productions/mixin.js\";\nimport { Dictionary } from \"./productions/dictionary.js\";\nimport { Namespace } from \"./productions/namespace.js\";\nimport { CallbackInterface } from \"./productions/callback-interface.js\";\nimport { autoParenter } from \"./productions/helpers.js\";\nimport { Eof } from \"./productions/token.js\";\n\n/** @typedef {'callbackInterface'|'dictionary'|'interface'|'mixin'|'namespace'} ExtendableInterfaces */\n/** @typedef {{ extMembers?: import(\"./productions/container.js\").AllowedMember[]}} Extension */\n/** @typedef {Partial<Record<ExtendableInterfaces, Extension>>} Extensions */\n\n/**\n * Parser options.\n * @typedef {Object} ParserOptions\n * @property {string} [sourceName]\n * @property {boolean} [concrete]\n * @property {Function[]} [productions]\n * @property {Extensions} [extensions]\n */\n\n/**\n * @param {Tokeniser} tokeniser\n * @param {ParserOptions} options\n */\nfunction parseByTokens(tokeniser, options) {\n  const source = tokeniser.source;\n\n  function error(str) {\n    tokeniser.error(str);\n  }\n\n  function consume(...candidates) {\n    return tokeniser.consume(...candidates);\n  }\n\n  function callback() {\n    const callback = consume(\"callback\");\n    if (!callback) return;\n    if (tokeniser.probe(\"interface\")) {\n      return CallbackInterface.parse(tokeniser, callback, {\n        ...options?.extensions?.callbackInterface,\n      });\n    }\n    return CallbackFunction.parse(tokeniser, callback);\n  }\n\n  function interface_(opts) {\n    const base = consume(\"interface\");\n    if (!base) return;\n    return (\n      Mixin.parse(tokeniser, base, {\n        ...opts,\n        ...options?.extensions?.mixin,\n      }) ||\n      Interface.parse(tokeniser, base, {\n        ...opts,\n        ...options?.extensions?.interface,\n      }) ||\n      error(\"Interface has no proper body\")\n    );\n  }\n\n  function partial() {\n    const partial = consume(\"partial\");\n    if (!partial) return;\n    return (\n      Dictionary.parse(tokeniser, {\n        partial,\n        ...options?.extensions?.dictionary,\n      }) ||\n      interface_({ partial }) ||\n      Namespace.parse(tokeniser, {\n        partial,\n        ...options?.extensions?.namespace,\n      }) ||\n      error(\"Partial doesn't apply to anything\")\n    );\n  }\n\n  function definition() {\n    if (options.productions) {\n      for (const production of options.productions) {\n        const result = production(tokeniser);\n        if (result) {\n          return result;\n        }\n      }\n    }\n\n    return (\n      callback() ||\n      interface_() ||\n      partial() ||\n      Dictionary.parse(tokeniser, options?.extensions?.dictionary) ||\n      Enum.parse(tokeniser) ||\n      Typedef.parse(tokeniser) ||\n      Includes.parse(tokeniser) ||\n      Namespace.parse(tokeniser, options?.extensions?.namespace)\n    );\n  }\n\n  function definitions() {\n    if (!source.length) return [];\n    const defs = [];\n    while (true) {\n      const ea = ExtendedAttributes.parse(tokeniser);\n      const def = definition();\n      if (!def) {\n        if (ea.length) error(\"Stray extended attributes\");\n        break;\n      }\n      autoParenter(def).extAttrs = ea;\n      defs.push(def);\n    }\n    const eof = Eof.parse(tokeniser);\n    if (options.concrete) {\n      defs.push(eof);\n    }\n    return defs;\n  }\n\n  const res = definitions();\n  if (tokeniser.position < source.length) error(\"Unrecognised tokens\");\n  return res;\n}\n\n/**\n * @param {string} str\n * @param {ParserOptions} [options]\n */\nexport function parse(str, options = {}) {\n  const tokeniser = new Tokeniser(str);\n  if (typeof options.sourceName !== \"undefined\") {\n    // @ts-ignore (See Tokeniser.source in supplement.d.ts)\n    tokeniser.source.name = options.sourceName;\n  }\n  return parseByTokens(tokeniser, options);\n}\n","function noop(arg) {\n  return arg;\n}\n\nconst templates = {\n  wrap: (items) => items.join(\"\"),\n  trivia: noop,\n  name: noop,\n  reference: noop,\n  type: noop,\n  generic: noop,\n  nameless: noop,\n  inheritance: noop,\n  definition: noop,\n  extendedAttribute: noop,\n  extendedAttributeReference: noop,\n};\n\nexport class Writer {\n  constructor(ts) {\n    this.ts = Object.assign({}, templates, ts);\n  }\n\n  /**\n   * @param {string} raw\n   * @param {object} options\n   * @param {string} [options.unescaped]\n   * @param {import(\"./productions/base.js\").Base} [options.context]\n   * @returns\n   */\n  reference(raw, { unescaped, context }) {\n    if (!unescaped) {\n      unescaped = raw.startsWith(\"_\") ? raw.slice(1) : raw;\n    }\n    return this.ts.reference(raw, unescaped, context);\n  }\n\n  /**\n   * @param {import(\"./tokeniser.js\").Token} t\n   * @param {Function} wrapper\n   * @param {...any} args\n   * @returns\n   */\n  token(t, wrapper = noop, ...args) {\n    if (!t) {\n      return \"\";\n    }\n    const value = wrapper(t.value, ...args);\n    return this.ts.wrap([this.ts.trivia(t.trivia), value]);\n  }\n\n  reference_token(t, context) {\n    return this.token(t, this.reference.bind(this), { context });\n  }\n\n  name_token(t, arg) {\n    return this.token(t, this.ts.name, arg);\n  }\n\n  identifier(id, context) {\n    return this.ts.wrap([\n      this.reference_token(id.tokens.value, context),\n      this.token(id.tokens.separator),\n    ]);\n  }\n}\n\nexport function write(ast, { templates: ts = templates } = {}) {\n  ts = Object.assign({}, templates, ts);\n\n  const w = new Writer(ts);\n\n  return ts.wrap(ast.map((it) => it.write(w)));\n}\n","import { validationError as error } from \"./error.js\";\n\nfunction getMixinMap(all, unique) {\n  const map = new Map();\n  const includes = all.filter((def) => def.type === \"includes\");\n  for (const include of includes) {\n    const mixin = unique.get(include.includes);\n    if (!mixin) {\n      continue;\n    }\n    const array = map.get(include.target);\n    if (array) {\n      array.push(mixin);\n    } else {\n      map.set(include.target, [mixin]);\n    }\n  }\n  return map;\n}\n\n/**\n * @typedef {ReturnType<typeof groupDefinitions>} Definitions\n */\nfunction groupDefinitions(all) {\n  const unique = new Map();\n  const duplicates = new Set();\n  const partials = new Map();\n  for (const def of all) {\n    if (def.partial) {\n      const array = partials.get(def.name);\n      if (array) {\n        array.push(def);\n      } else {\n        partials.set(def.name, [def]);\n      }\n      continue;\n    }\n    if (!def.name) {\n      continue;\n    }\n    if (!unique.has(def.name)) {\n      unique.set(def.name, def);\n    } else {\n      duplicates.add(def);\n    }\n  }\n  return {\n    all,\n    unique,\n    partials,\n    duplicates,\n    mixinMap: getMixinMap(all, unique),\n    cache: {\n      typedefIncludesDictionary: new WeakMap(),\n      dictionaryIncludesRequiredField: new WeakMap(),\n    },\n  };\n}\n\nfunction* checkDuplicatedNames({ unique, duplicates }) {\n  for (const dup of duplicates) {\n    const { name } = dup;\n    const message = `The name \"${name}\" of type \"${\n      unique.get(name).type\n    }\" was already seen`;\n    yield error(dup.tokens.name, dup, \"no-duplicate\", message);\n  }\n}\n\nfunction* validateIterable(ast) {\n  const defs = groupDefinitions(ast);\n  for (const def of defs.all) {\n    if (def.validate) {\n      yield* def.validate(defs);\n    }\n  }\n  yield* checkDuplicatedNames(defs);\n}\n\n// Remove this once all of our support targets expose `.flat()` by default\nfunction flatten(array) {\n  if (array.flat) {\n    return array.flat();\n  }\n  return [].concat(...array);\n}\n\n/**\n * @param {import(\"./productions/base.js\").Base[]} ast\n * @return {import(\"./error.js\").WebIDLErrorData[]} validation errors\n */\nexport function validate(ast) {\n  return [...validateIterable(flatten(ast))];\n}\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    '&': '&',\n    '<': '<',\n    '>': '>',\n    '\"': '"',\n    \"'\": '''\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","// @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, \"&\")\n    .replace(/>/g, \">\")\n    .replace(/\"/g, \""\")\n    .replace(/</g, \"<\");\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 = />/gm;\nconst ampEntity = /&/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/w3c/group.js\"),\n  import(\"../src/w3c/defaults.js\"),\n  import(\"../src/core/style.js\"),\n  import(\"../src/w3c/style.js\"),\n  import(\"../src/core/github.js\"),\n  import(\"../src/core/data-include.js\"),\n  import(\"../src/core/markdown.js\"),\n  import(\"../src/core/reindent.js\"),\n  import(\"../src/core/title.js\"),\n  import(\"../src/w3c/level.js\"),\n  import(\"../src/w3c/headers.js\"),\n  import(\"../src/w3c/abstract.js\"),\n  import(\"../src/core/data-transform.js\"),\n  import(\"../src/core/data-abbr.js\"),\n  import(\"../src/core/inlines.js\"),\n  import(\"../src/w3c/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  import(\"../src/core/best-practices.js\"),\n  import(\"../src/core/figures.js\"),\n  import(\"../src/core/tables.js\"),\n  import(\"../src/core/webidl.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/core/contrib.js\"),\n  import(\"../src/core/sections.js\"),\n  import(\"../src/core/fix-headers.js\"),\n  import(\"../src/core/webidl-index.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/w3c/seo.js\"),\n  import(\"../src/core/highlight.js\"),\n  import(\"../src/core/webidl-clipboard.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/data-type.js\"),\n  import(\"../src/core/algorithms.js\"),\n  import(\"../src/core/anchor-expander.js\"),\n  import(\"../src/core/dfn-panel.js\"),\n  import(\"../src/core/custom-elements/index.js\"),\n  import(\"../src/core/web-monetization.js\"),\n  import(\"../src/core/dfn-contract.js\"),\n  import(\"../src/core/before-save.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-captionless-tables.js\"),\n  import(\"../src/core/linter-rules/no-unused-dfns.js\"),\n  import(\"../src/core/linter-rules/no-headingless-sections.js\"),\n  import(\"../src/core/linter-rules/no-unused-vars.js\"),\n  import(\"../src/w3c/linter-rules/required-sections.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  import(\"../src/core/linter-rules/informative-dfn.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 * @module w3c/group\n * The purpose of this module is to fetch and set the working group configuration details.\n */\nimport { docLink, fetchAndCache, showError } from \"../core/utils.js\";\n\nexport const name = \"w3c/group\";\n\nconst W3C_GROUPS_API = \"https://respec.org/w3c/groups/\";\n\n/**\n * Fetches the group configuration details and adds them to the document's configuration.\n * @param {Conf} conf The document configuration object.\n * @return {Promise<void>} Resolves after setting the group configuration details.\n */\nexport async function run(conf) {\n  if (!conf.group) {\n    return;\n  }\n\n  const { group } = conf;\n  const groupDetails = Array.isArray(group)\n    ? await getMultipleGroupDetails(group)\n    : await getGroupDetails(group);\n  Object.assign(conf, groupDetails);\n}\n\n/**\n * Fetches configuration details for multiple groups concurrently.\n * @param {string[]} groups An array of group identifiers.\n * @return {Promise<object>} Resolves to an object containing the configuration details for each group.\n */\nasync function getMultipleGroupDetails(groups) {\n  const details = await Promise.all(groups.map(getGroupDetails));\n  /** @type {{ [key in keyof GroupDetails]: GroupDetails[key][] }} */\n  const result = {\n    wg: [],\n    wgId: [],\n    wgURI: [],\n    wgPatentURI: [],\n    wgPatentPolicy: [],\n    groupType: [],\n  };\n  for (const groupDetails of details.filter(Boolean)) {\n    for (const key of Object.keys(result)) {\n      result[key].push(groupDetails[key]);\n    }\n  }\n  return result;\n}\n\n/**\n * Fetches configuration details for a single group.\n * @param {string} group A group identifier.\n * @return {Promise<GroupDetails|undefined>} Resolves to an object containing the group's configuration details, or undefined if the group could not be fetched.\n */\nasync function getGroupDetails(group) {\n  let type = \"\";\n  let shortname = group;\n  if (group.includes(\"/\")) {\n    [type, shortname] = group.split(\"/\", 2);\n  }\n  const url = new URL(`${shortname}/${type}`, W3C_GROUPS_API);\n  const res = await fetchAndCache(url.href);\n  if (res.ok) {\n    const json = await res.json();\n    const {\n      id: wgId,\n      name: wg,\n      patentURI: wgPatentURI,\n      patentPolicy: wgPatentPolicy,\n      type: groupType,\n      wgURI,\n    } = json;\n    return { wg, wgId, wgURI, wgPatentURI, wgPatentPolicy, groupType };\n  }\n\n  const text = await res.text();\n  let message = `Failed to fetch group details (HTTP: ${res.status}).`;\n  let hint;\n  if (res.status === 409) {\n    [message, hint] = text.split(\"\\n\", 2);\n  } else if (res.status === 404) {\n    hint = docLink`See the list of [supported group names](https://respec.org/w3c/groups/) to use with the ${\"[group]\"} configuration option.`;\n  }\n  showError(message, name, { hint });\n}\n","// @ts-check\nimport { html } from \"../../core/import-maps.js\";\nimport { showWarning } from \"../../core/utils.js\";\n\nconst name = \"core/templates/show-link\";\n\n/**\n * @param {object} link\n * @param {string} link.key\n * @param {string} [link.class]\n * @param {LinkData[]} [link.data]\n */\nexport default function 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    console.warn(msg, link);\n    return;\n  }\n  return html`\n    <dt class=\"${link.class ? link.class : null}\">${link.key}</dt>\n    ${link.data ? link.data.map(showLinkData) : showLinkData(link)}\n  `;\n}\n\n/**\n * @typedef {object} LinkData\n * @property {string} [LinkData.class]\n * @property {string} [LinkData.href]\n * @property {string} [LinkData.value]\n * @param {LinkData} data\n */\nfunction showLinkData(data) {\n  return html`<dd class=\"${data.class ? data.class : null}\">\n    ${data.href\n      ? html`<a href=\"${data.href}\">${data.value || data.href}</a>`\n      : data.value}\n  </dd>`;\n}\n","// @ts-check\nimport { docLink, showError } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst name = \"core/templates/show-logo\";\n\n/**\n * Logo mapper. Takes a logo structure and converts it to HTML.\n *\n * @param {object} logo\n * @param {string} logo.src\n * @param {string} logo.url\n * @param {string} logo.alt\n * @param {string} [logo.id]\n * @param {number} [logo.width]\n * @param {number} [logo.height]\n * @param {number} index\n */\nexport default function showLogo(logo, index) {\n  /** @type {HTMLAnchorElement} */\n  const a = html`<a href=\"${logo.url || null}\" class=\"logo\"\n    ><img\n      alt=\"${logo.alt || null}\"\n      crossorigin\n      height=\"${logo.height || null}\"\n      id=\"${logo.id || null}\"\n      src=\"${logo.src || null}\"\n      width=\"${logo.width || null}\"\n    />\n  </a>`;\n  if (!logo.alt) {\n    const src = logo.src ? `, with \\`src\\` ${logo.src}, ` : \"\";\n    const msg = `Logo at index ${index}${src} is missing required \"\\`alt\\`\" property.`;\n    const hint = docLink`Add the missing \"\\`alt\\`\" property describing the logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  if (!logo.src) {\n    const msg = `Logo at index ${index} is missing \"\\`src\\`\" property.`;\n    const hint = docLink`The \\`src\\` property is required on every logo. See ${\"[logos]\"} for more information.`;\n    showError(msg, name, { hint, elements: [a] });\n  }\n  return a;\n}\n","// @ts-check\n\nconst name = \"core/templates/show-people\";\n\nimport {\n  W3CDate,\n  getIntlData,\n  isValidConfDate,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nconst localizationStrings = {\n  en: {\n    until(date) {\n      return html` Until ${date} `;\n    },\n  },\n  es: {\n    until(date) {\n      return html` Hasta ${date} `;\n    },\n  },\n  ko: {\n    until(date) {\n      return html` ${date} 이전 `;\n    },\n  },\n  ja: {\n    until(date) {\n      return html` ${date} 以前 `;\n    },\n  },\n  de: {\n    until(date) {\n      return html` bis ${date} `;\n    },\n  },\n  zh: {\n    until(date) {\n      return html` 直到 ${date} `;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nconst orcidIcon = () =>\n  html`<svg\n    width=\"16\"\n    height=\"16\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 256 256\"\n  >\n    <style>\n      .st1 {\n        fill: #fff;\n      }\n    </style>\n    <path\n      d=\"M256 128c0 70.7-57.3 128-128 128S0 198.7 0 128 57.3 0 128 0s128 57.3 128 128z\"\n      fill=\"#a6ce39\"\n    />\n    <path\n      class=\"st1\"\n      d=\"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h24.5c34.9 0 42.9-26.5 42.9-39.7C191.7 111.2 178 93 148 93h-23.7v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.6 10.1 10.1z\"\n    />\n  </svg>`;\n\n/**\n * @param {Conf} conf\n * @param {\"editors\" | \"authors\" | \"formerEditors\"} propName - the name of the property of the people to render.\n */\nexport default function showPeople(conf, propName) {\n  const people = conf[propName];\n  if (!Array.isArray(people) || !people.length) return; // nothing to show...\n\n  const validatePerson = personValidator(propName);\n  return people.filter(validatePerson).map(personToHTML);\n}\n\n/**\n * @param {Person} person\n */\nfunction personToHTML(person) {\n  // The following are treated as opt-in HTML by hyperHTML\n  // we need to deprecate this!\n  const personName = [person.name];\n  const company = [person.company];\n  const editorId = person.w3cid || null;\n  const contents = [];\n  if (person.mailto) {\n    person.url = `mailto:${person.mailto}`;\n  }\n  if (person.url) {\n    const url = new URL(person.url, document.location.href);\n    const classList =\n      url.protocol === \"mailto:\"\n        ? \"ed_mailto u-email email p-name\"\n        : \"u-url url p-name fn\";\n    contents.push(\n      html`<a class=\"${classList}\" href=\"${person.url}\">${personName}</a>`\n    );\n  } else {\n    contents.push(html`<span class=\"p-name fn\">${personName}</span>`);\n  }\n  if (person.orcid) {\n    contents.push(\n      html`<a class=\"p-name orcid\" href=\"${person.orcid}\">${orcidIcon()}</a>`\n    );\n  }\n  if (person.company) {\n    const hCard = \"p-org org h-org\";\n    const companyElem = person.companyURL\n      ? html`<a class=\"${hCard}\" href=\"${person.companyURL}\">${company}</a>`\n      : html`<span class=\"${hCard}\">${company}</span>`;\n    contents.push(html` (${companyElem})`);\n  }\n  if (person.note) {\n    contents.push(document.createTextNode(` (${person.note})`));\n  }\n  if (person.extras) {\n    contents.push(...person.extras.map(extra => html`, ${renderExtra(extra)}`));\n  }\n  const { retiredDate } = person;\n  if (person.retiredDate) {\n    const time = html`<time datetime=\"${retiredDate}\"\n      >${W3CDate.format(new Date(retiredDate))}</time\n    >`;\n    contents.push(html` - ${l10n.until(time)} `);\n  }\n  const dd = html`<dd\n    class=\"editor p-author h-card vcard\"\n    data-editor-id=\"${editorId}\"\n  >\n    ${contents}\n  </dd>`;\n  return dd;\n}\n\nfunction renderExtra(extra) {\n  const classVal = extra.class || null;\n  const { name, href } = extra;\n  return href\n    ? html`<a href=\"${href}\" class=\"${classVal}\">${name}</a>`\n    : html`<span class=\"${classVal}\">${name}</span>`;\n}\n\n/**\n *\n * @param {string} prop\n */\nfunction personValidator(prop) {\n  /**\n   * @param {Person} person\n   * @param {Number} index\n   */\n  return function validatePerson(person, index) {\n    const docsUrl = \"https://respec.org/docs/\";\n    const seePersonHint = `See [person](${docsUrl}#person) configuration for available options.`;\n    const preamble =\n      `Error processing the [person object](${docsUrl}#person) ` +\n      `at index ${index} of the \"[\\`${prop}\\`](${docsUrl}#${prop})\" configuration option.`;\n\n    if (!person.name) {\n      const msg = `${preamble} Missing required property \\`\"name\"\\`.`;\n      showError(msg, name, { hint: seePersonHint });\n      return false;\n    }\n\n    if (person.orcid) {\n      const { orcid } = person;\n      const orcidUrl = new URL(orcid, \"https://orcid.org/\");\n\n      if (orcidUrl.origin !== \"https://orcid.org\") {\n        const msg = `${preamble} ORCID \"${person.orcid}\" at index ${index} is invalid.`;\n        const hint = `The origin should be \"https://orcid.org\", not \"${orcidUrl.origin}\".`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // trailing slash would mess up checksum\n      const orcidId = orcidUrl.pathname.slice(1).replace(/\\/$/, \"\");\n      if (!/^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$/.test(orcidId)) {\n        const msg = `${preamble} ORCID \"${orcidId}\" has wrong format.`;\n        const hint = `ORCIDs have the format \"1234-1234-1234-1234.\"`;\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      if (!checkOrcidChecksum(orcid)) {\n        const msg = `${preamble} ORCID \"${orcid}\" failed checksum check.`;\n        const hint = \"Please check that the ORCID is valid.\";\n        showError(msg, name, { hint });\n        return false;\n      }\n\n      // canonical form\n      person.orcid = orcidUrl.href;\n    }\n\n    if (person.retiredDate && !isValidConfDate(person.retiredDate)) {\n      const msg = `${preamble} The property \"\\`retiredDate\\`\" is not a valid date.`;\n      showError(msg, name, {\n        hint: `The expected format is YYYY-MM-DD. ${seePersonHint}`,\n      });\n      return false;\n    }\n\n    if (\n      person.hasOwnProperty(\"extras\") &&\n      !validateExtras(person.extras, seePersonHint, preamble)\n    ) {\n      return false;\n    }\n\n    if (person.url && person.mailto) {\n      const msg = `${preamble} Has both \"url\" and \"mailto\" property.`;\n      showWarning(msg, name, {\n        hint: `Please choose either \"url\" or \"mailto\" (\"url\" is preferred). ${seePersonHint}`,\n      });\n    }\n\n    if (person.companyURL && !person.company) {\n      const msg = `${preamble} Has a \"\\`companyURL\\`\" property but no \"\\`company\\`\" property.`;\n      showWarning(msg, name, {\n        hint: `Please add a \"\\`company\\`\" property. ${seePersonHint}.`,\n      });\n    }\n    return true;\n  };\n}\n\n/**\n *\n * @param {PersonExtras[]} extras\n * @param {string} hint\n * @param {string} preamble\n */\nfunction validateExtras(extras, hint, preamble) {\n  if (!Array.isArray(extras)) {\n    showError(\n      `${preamble}. A person's \"extras\" member must be an array.`,\n      name,\n      { hint }\n    );\n    return false;\n  }\n  return extras.every((extra, index) => {\n    switch (true) {\n      case typeof extra !== \"object\":\n        showError(\n          `${preamble}. Member \"extra\" at index ${index} is not an object.`,\n          name,\n          {\n            hint,\n          }\n        );\n        return false;\n      case !extra.hasOwnProperty(\"name\"):\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} is missing required \"name\" member.`,\n          name,\n          { hint }\n        );\n        return false;\n      case typeof extra.name === \"string\" && extra.name.trim() === \"\":\n        showError(\n          `${preamble} \\`PersonExtra\\` object at index ${index} \"name\" can't be empty.`,\n          name,\n          { hint }\n        );\n        return false;\n    }\n    return true;\n  });\n}\n\n/**\n * @param {string} orcid\n * @returns {boolean}\n */\nfunction checkOrcidChecksum(orcid) {\n  // calculate checksum as per https://support.orcid.org/hc/en-us/articles/360006897674-Structure-of-the-ORCID-Identifier\n  const lastDigit = orcid[orcid.length - 1];\n  const remainder = orcid\n    .split(\"\")\n    .slice(0, -1)\n    .filter(c => /\\d/.test(c))\n    .map(Number)\n    .reduce((acc, c) => (acc + c) * 2, 0);\n  const lastDigitInt = (12 - (remainder % 11)) % 11;\n  const lastDigitShould = lastDigitInt === 10 ? \"X\" : String(lastDigitInt);\n  return lastDigit === lastDigitShould;\n}\n","// @ts-check\nimport { ISODate, W3CDate, getIntlData } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\nimport { sub } from \"../../core/pubsubhub.js\";\n\nconst localizationStrings = {\n  en: {\n    archives: \"archives\",\n    author: \"Author:\",\n    authors: \"Authors:\",\n    commit_history: \"Commit history\",\n    edited_in_place: \"edited in place\",\n    editor: \"Editor:\",\n    editors: \"Editors:\",\n    feedback: \"Feedback:\",\n    former_editor: \"Former editor:\",\n    former_editors: \"Former editors:\",\n    history: \"History:\",\n    implementation_report: \"Implementation report:\",\n    latest_editors_draft: \"Latest editor's draft:\",\n    latest_published_version: \"Latest published version:\",\n    latest_recommendation: \"Latest Recommendation:\",\n    message_topic: \"… message topic …\",\n    more_details_about_this_doc: \"More details about this document\",\n    multiple_alternates(plural) {\n      return `This document is also available in ${\n        plural ? \"these non-normative formats\" : \"this non-normative format\"\n      }:`;\n    },\n    prev_editor_draft: \"Previous editor's draft:\",\n    prev_recommendation: \"Previous Recommendation:\",\n    prev_version: \"Previous version:\",\n    publication_history: \"Publication history\",\n    test_suite: \"Test suite:\",\n    this_version: \"This version:\",\n    with_subject_line: \"with subject line\",\n    your_topic_here: \"YOUR TOPIC HERE\",\n  },\n  ko: {\n    author: \"저자:\",\n    authors: \"저자:\",\n    editor: \"편집자:\",\n    editors: \"편집자:\",\n    former_editor: \"이전 편집자:\",\n    former_editors: \"이전 편집자:\",\n    latest_editors_draft: \"최신 편집 초안:\",\n    latest_published_version: \"최신 버전:\",\n    this_version: \"현재 버전:\",\n  },\n  zh: {\n    author: \"作者:\",\n    authors: \"作者:\",\n    commit_history: \"Git提交历史\",\n    editor: \"编辑:\",\n    editors: \"编辑:\",\n    feedback: \"反馈:\",\n    former_editor: \"原编辑:\",\n    former_editors: \"原编辑:\",\n    history: \"历史:\",\n    implementation_report: \"实现报告:\",\n    latest_editors_draft: \"最新编辑草稿:\",\n    latest_published_version: \"最新发布版本:\",\n    latest_recommendation: \"最新发布的正式推荐标准:\",\n    message_topic: \"… 邮件主题 …\",\n    prev_editor_draft: \"上一版编辑草稿:\",\n    prev_recommendation: \"上一版正式推荐标准:\",\n    prev_version: \"上一版:\",\n    test_suite: \"测试套件:\",\n    this_version: \"本版本:\",\n  },\n  ja: {\n    archives: \"アーカイブ\",\n    author: \"著者:\",\n    authors: \"著者:\",\n    commit_history: \"更新履歴\",\n    edited_in_place: \"改版なく更新\",\n    editor: \"編者:\",\n    editors: \"編者:\",\n    feedback: \"フィードバック:\",\n    former_editor: \"以前の版の編者:\",\n    former_editors: \"以前の版の編者:\",\n    history: \"履歴:\",\n    implementation_report: \"実装レポート:\",\n    latest_editors_draft: \"最新の編集用草案:\",\n    latest_published_version: \"最新バージョン:\",\n    latest_recommendation: \"最新の勧告版:\",\n    message_topic: \"… メール件名 …\",\n    more_details_about_this_doc: \"この文書についてのより詳細\",\n    prev_editor_draft: \"前回の編集用草案:\",\n    prev_recommendation: \"前回の勧告版:\",\n    prev_version: \"前回のバージョン:\",\n    publication_history: \"公表履歴\",\n    test_suite: \"テストスイート:\",\n    this_version: \"このバージョン:\",\n    with_subject_line: \"次の件名で\",\n  },\n  nl: {\n    author: \"Auteur:\",\n    authors: \"Auteurs:\",\n    editor: \"Redacteur:\",\n    editors: \"Redacteurs:\",\n    latest_editors_draft: \"Laatste werkversie:\",\n    latest_published_version: \"Laatst gepubliceerde versie:\",\n    this_version: \"Deze versie:\",\n  },\n  es: {\n    archives: \"archivos\",\n    author: \"Autor:\",\n    authors: \"Autores:\",\n    commit_history: \"Historial de cambios\",\n    edited_in_place: \"editado en lugar\",\n    editor: \"Editor:\",\n    editors: \"Editores:\",\n    feedback: \"Comentarios:\",\n    former_editor: \"Antiguo editor:\",\n    former_editors: \"Antiguos editores:\",\n    history: \"Historia:\",\n    implementation_report: \"Informe de implementación:\",\n    latest_editors_draft: \"Última versión del editor:\",\n    latest_published_version: \"Última versión publicada:\",\n    latest_recommendation: \"Recomendación más reciente:\",\n    message_topic: \"… detalles de mensaje …\",\n    more_details_about_this_doc: \"Más detalles sobre este documento:\",\n    publication_history: \"Historial de publicación\",\n    prev_editor_draft: \"Última versión del editor:\",\n    prev_recommendation: \"Última Recomendación:\",\n    prev_version: \"Última versión:\",\n    test_suite: \"Suite de pruebas:\",\n    this_version: \"Esta versión:\",\n    with_subject_line: \"con línea de asunto\",\n    your_topic_here: \"TU SUJETO AQUÍ\",\n  },\n  de: {\n    archives: \"Archiv\",\n    author: \"Autor/in:\",\n    authors: \"Autor/innen:\",\n    commit_history: \"Commit-Historie\",\n    edited_in_place: \"zuletzt geändert am\",\n    editor: \"Redaktion:\",\n    editors: \"Redaktion:\",\n    feedback: \"Feedback:\",\n    former_editor: \"Frühere Mitwirkende:\",\n    former_editors: \"Frühere Mitwirkende:\",\n    history: \"Verlauf:\",\n    implementation_report: \"Umsetzungsbericht:\",\n    latest_editors_draft: \"Letzter Entwurf:\",\n    latest_published_version: \"Letzte publizierte Fassung:\",\n    latest_recommendation: \"Aktuellste Empfehlung:\",\n    more_details_about_this_doc: \"Mehr Informationen über dieses Dokument\",\n    multiple_alternates(plural) {\n      return `Dieses Dokument ist ebenfalls in ${\n        plural\n          ? \"diesen nicht-normativen Formaten verfügbar\"\n          : \"diesem nicht-normativen Format verfügbar\"\n      }:`;\n    },\n    prev_editor_draft: \"Vorheriger Entwurf:\",\n    prev_recommendation: \"Vorherige Empfehlung:\",\n    prev_version: \"Vorherige Version:\",\n    publication_history: \"Veröffentlichungsverlauf\",\n    test_suite: \"Testumgebung:\",\n    this_version: \"Diese Fassung:\",\n  },\n};\nexport const l10n = getIntlData(localizationStrings);\n\nexport function getSpecSubTitleElem(conf) {\n  let specSubTitleElem = document.querySelector(\"h2#subtitle\");\n\n  if (specSubTitleElem && specSubTitleElem.parentElement) {\n    specSubTitleElem.remove();\n    conf.subtitle = specSubTitleElem.textContent.trim();\n  } else if (conf.subtitle) {\n    specSubTitleElem = document.createElement(\"h2\");\n    specSubTitleElem.textContent = conf.subtitle;\n    specSubTitleElem.id = \"subtitle\";\n  }\n  if (specSubTitleElem) {\n    specSubTitleElem.classList.add(\"subtitle\");\n  }\n  return specSubTitleElem;\n}\n\nexport default (conf, options) => {\n  /**\n   * After export, we let fixup.js handle the <details>.\n   */\n  sub(\"beforesave\", doc => {\n    const details = doc.querySelector(\".head details\");\n    if (details) details.open = true;\n  });\n  return html`<div class=\"head\">\n    ${conf.logos.length\n      ? html`<p class=\"logos\">${conf.logos.map(showLogo)}</p>`\n      : \"\"}\n    ${document.querySelector(\"h1#title\")} ${getSpecSubTitleElem(conf)}\n    <p id=\"w3c-state\">${renderSpecTitle(conf)}</p>\n    <details open=\"${localStorage.getItem(\"tr-metadata\") || \"true\"}\">\n      <summary>${l10n.more_details_about_this_doc}</summary>\n      <dl>\n        ${conf.thisVersion\n          ? html`<dt>${l10n.this_version}</dt>\n              <dd>\n                <a class=\"u-url\" href=\"${conf.thisVersion}\"\n                  >${conf.thisVersion}</a\n                >\n              </dd>`\n          : \"\"}\n        ${\"latestVersion\" in conf // latestVersion can be falsy\n          ? html`<dt>${l10n.latest_published_version}</dt>\n              <dd>\n                ${conf.latestVersion\n                  ? html`<a href=\"${conf.latestVersion}\"\n                      >${conf.latestVersion}</a\n                    >`\n                  : \"none\"}\n              </dd>`\n          : \"\"}\n        ${conf.edDraftURI\n          ? html`\n              <dt>${l10n.latest_editors_draft}</dt>\n              <dd><a href=\"${conf.edDraftURI}\">${conf.edDraftURI}</a></dd>\n            `\n          : \"\"}\n        ${conf.historyURI || conf.github\n          ? html`<dt>${l10n.history}</dt>\n              ${conf.historyURI\n                ? html`<dd>\n                    <a href=\"${conf.historyURI}\">${conf.historyURI}</a>\n                  </dd>`\n                : \"\"}\n              ${conf.github\n                ? html`<dd>\n                    <a href=\"${conf.github.commitHistoryURL}\"\n                      >${l10n.commit_history}</a\n                    >\n                  </dd>`\n                : \"\"}`\n          : \"\"}\n        ${conf.testSuiteURI\n          ? html`\n              <dt>${l10n.test_suite}</dt>\n              <dd><a href=\"${conf.testSuiteURI}\">${conf.testSuiteURI}</a></dd>\n            `\n          : \"\"}\n        ${conf.implementationReportURI\n          ? html`\n              <dt>${l10n.implementation_report}</dt>\n              <dd>\n                <a href=\"${conf.implementationReportURI}\"\n                  >${conf.implementationReportURI}</a\n                >\n              </dd>\n            `\n          : \"\"}\n        ${conf.prevED\n          ? html`\n              <dt>${l10n.prev_editor_draft}</dt>\n              <dd><a href=\"${conf.prevED}\">${conf.prevED}</a></dd>\n            `\n          : \"\"}\n        ${conf.showPreviousVersion\n          ? html`\n              <dt>${l10n.prev_version}</dt>\n              <dd><a href=\"${conf.prevVersion}\">${conf.prevVersion}</a></dd>\n            `\n          : \"\"}\n        ${!conf.prevRecURI\n          ? \"\"\n          : conf.isRec\n            ? html`\n                <dt>${l10n.prev_recommendation}</dt>\n                <dd><a href=\"${conf.prevRecURI}\">${conf.prevRecURI}</a></dd>\n              `\n            : html`\n                <dt>${l10n.latest_recommendation}</dt>\n                <dd><a href=\"${conf.prevRecURI}\">${conf.prevRecURI}</a></dd>\n              `}\n        ${conf.editors.length\n          ? html`\n              <dt>${conf.editors.length > 1 ? l10n.editors : l10n.editor}</dt>\n              ${showPeople(conf, \"editors\")}\n            `\n          : \"\"}\n        ${conf.formerEditors.length\n          ? html`\n              <dt>\n                ${conf.formerEditors.length > 1\n                  ? l10n.former_editors\n                  : l10n.former_editor}\n              </dt>\n              ${showPeople(conf, \"formerEditors\")}\n            `\n          : \"\"}\n        ${conf.authors.length\n          ? html`\n              <dt>${conf.authors.length > 1 ? l10n.authors : l10n.author}</dt>\n              ${showPeople(conf, \"authors\")}\n            `\n          : \"\"}\n        ${conf.github || conf.wgPublicList\n          ? html`<dt>${l10n.feedback}</dt>\n              ${renderFeedback(conf)}`\n          : \"\"}\n        ${conf.errata\n          ? html`<dt>Errata:</dt>\n              <dd><a href=\"${conf.errata}\">Errata exists</a>.</dd>`\n          : \"\"}\n        ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n      </dl>\n    </details>\n    ${conf.isRec\n      ? html`<p>\n          See also\n          <a\n            href=\"${`https://www.w3.org/Translations/?technology=${conf.shortName}`}\"\n          >\n            <strong>translations</strong></a\n          >.\n        </p>`\n      : \"\"}\n    ${conf.alternateFormats\n      ? html`<p>\n          ${l10n.multiple_alternates(options.multipleAlternates)}\n          ${options.alternatesHTML}\n        </p>`\n      : \"\"}\n    ${renderCopyright(conf)}\n    <hr title=\"Separator for header\" />\n  </div>`;\n};\n\nexport function renderFeedback(conf) {\n  const definitions = [];\n  // Github feedback...\n  if (conf.github) {\n    const { repoURL, issuesURL, newIssuesURL, pullsURL, fullName } =\n      conf.github;\n    definitions.push(\n      html`<dd>\n        <a href=\"${repoURL}\">GitHub ${fullName}</a>\n        (<a href=\"${pullsURL}\">pull requests</a>,\n        <a href=\"${newIssuesURL}\">new issue</a>,\n        <a href=\"${issuesURL}\">open issues</a>)\n      </dd>`\n    );\n  }\n\n  // The <a href=\"mailto:list?subject\"> link for the public list\n  if (conf.wgPublicList) {\n    const mailToURL = new URL(`mailto:${conf.wgPublicList}@w3.org`);\n    const subject =\n      conf.subjectPrefix ?? `[${conf.shortName}] ${l10n.your_topic_here}`;\n    const mailingListLink = html`<a\n      href=\"${mailToURL.href}?subject=${encodeURIComponent(subject)}\"\n      >${mailToURL.pathname}</a\n    >`;\n\n    // The subject line...\n    const subjectLine =\n      conf.subjectPrefix ||\n      html`[${conf.shortName}] <em>${l10n.message_topic}</em>`;\n    const emailSubject = html`${l10n.with_subject_line}${\" \"}\n      <kbd>${subjectLine}</kbd>`;\n\n    // Archives link\n    const archiveURL = new URL(\n      conf.wgPublicList,\n      \"https://lists.w3.org/Archives/Public/\"\n    );\n    const archiveLink = html`(<a href=\"${archiveURL}\" rel=\"discussion\"\n        >${l10n.archives}</a\n      >)`;\n\n    definitions.push(\n      html`<dd>${mailingListLink} ${emailSubject} ${archiveLink}</dd>`\n    );\n  }\n  return definitions;\n}\n\nfunction renderSpecTitle(conf) {\n  const specType = conf.isCR || conf.isCRY ? conf.longStatus : conf.textStatus;\n  const preamble = conf.prependW3C\n    ? html`<a href=\"https://www.w3.org/standards/types#${conf.specStatus}\"\n        >W3C ${specType}</a\n      >`\n    : html`${specType}`;\n  return html`${preamble}${\" \"}\n    <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n      >${W3CDate.format(conf.publishDate)}</time\n    >${conf.modificationDate\n      ? html`, ${l10n.edited_in_place}${\" \"}\n          <time\n            class=\"dt-modified\"\n            datetime=\"${ISODate.format(conf.modificationDate)}\"\n            >${W3CDate.format(conf.modificationDate)}</time\n          >`\n      : \"\"}`;\n}\n\n/**\n * @param { LicenseInfo } licenseInfo license information\n */\nfunction linkLicense(licenseInfo) {\n  const { url, short, name } = licenseInfo;\n  if (name === \"unlicensed\") {\n    return html`. <span class=\"issue\">THIS DOCUMENT IS UNLICENSED</span>.`;\n  }\n  return html` and\n    <a rel=\"license\" href=\"${url}\" title=\"${name}\">${short}</a> rules apply.`;\n}\n\nfunction renderCopyright(conf) {\n  // If there is already a copyright, let's relocate it.\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n    return existingCopyright;\n  }\n  if (conf.isUnofficial && conf.licenseInfo) {\n    return html`<p class=\"copyright\">\n      Copyright ©\n      ${conf.copyrightStart ? `${conf.copyrightStart}-` : \"\"}${conf.publishYear}\n      the document editors/authors.\n      ${conf.licenseInfo.name !== \"unlicensed\"\n        ? html`Text is available under the\n            <a rel=\"license\" href=\"${conf.licenseInfo.url}\"\n              >${conf.licenseInfo.name}</a\n            >; additional terms may apply.`\n        : \"\"}\n    </p>`;\n  }\n  return renderOfficialCopyright(conf);\n}\n\nfunction renderOfficialCopyright(conf) {\n  return html`<p class=\"copyright\">\n    <a href=\"https://www.w3.org/policies/#copyright\">Copyright</a>\n    ©\n    ${conf.copyrightStart ? `${conf.copyrightStart}-` : \"\"}${conf.publishYear}\n    ${conf.additionalCopyrightHolders\n      ? html` ${[conf.additionalCopyrightHolders]} & `\n      : \"\"}\n    <a href=\"https://www.w3.org/\">World Wide Web Consortium</a>.\n    <abbr title=\"World Wide Web Consortium\">W3C</abbr><sup>®</sup>\n    <a href=\"https://www.w3.org/policies/#Legal_Disclaimer\">liability</a>,\n    <a href=\"https://www.w3.org/policies/#W3C_Trademarks\">trademark</a\n    >${linkLicense(conf.licenseInfo)}\n  </p>`;\n}\n","// @ts-check\nimport { getSpecSubTitleElem, l10n, renderFeedback } from \"./headers.js\";\nimport { W3CDate } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport showLink from \"../../core/templates/show-link.js\";\nimport showLogo from \"../../core/templates/show-logo.js\";\nimport showPeople from \"../../core/templates/show-people.js\";\n\nexport default (conf, options) => {\n  const existingCopyright = document.querySelector(\".copyright\");\n  if (existingCopyright) {\n    existingCopyright.remove();\n  }\n\n  const specTitleElem = document.querySelector(\"h1#title\");\n  const specTitleElemClone = specTitleElem.cloneNode(true);\n\n  return html`<div class=\"head\">\n    ${conf.logos.length\n      ? html`<p class=\"logos\">${conf.logos.map(showLogo)}</p>`\n      : \"\"}\n    ${specTitleElem} ${getSpecSubTitleElem(conf)}\n    <p id=\"w3c-state\">\n      <a href=\"https://www.w3.org/standards/types#reports\"\n        >${conf.longStatus}</a\n      >\n      <time class=\"dt-published\" datetime=\"${conf.dashDate}\"\n        >${W3CDate.format(conf.publishDate)}</time\n      >\n    </p>\n    <dl>\n      ${conf.thisVersion\n        ? html`<dt>${l10n.this_version}</dt>\n            <dd>\n              <a class=\"u-url\" href=\"${conf.thisVersion}\"\n                >${conf.thisVersion}</a\n              >\n            </dd>`\n        : \"\"}\n      ${\"latestVersion\" in conf // latestVersion can be falsy\n        ? html`<dt>${l10n.latest_published_version}</dt>\n            <dd>\n              ${conf.latestVersion\n                ? html`<a href=\"${conf.latestVersion}\"\n                    >${conf.latestVersion}</a\n                  >`\n                : \"none\"}\n            </dd>`\n        : \"\"}\n      ${conf.edDraftURI\n        ? html`\n            <dt>${l10n.latest_editors_draft}</dt>\n            <dd><a href=\"${conf.edDraftURI}\">${conf.edDraftURI}</a></dd>\n          `\n        : \"\"}\n      ${conf.testSuiteURI\n        ? html`\n            <dt>Test suite:</dt>\n            <dd><a href=\"${conf.testSuiteURI}\">${conf.testSuiteURI}</a></dd>\n          `\n        : \"\"}\n      ${conf.implementationReportURI\n        ? html`\n            <dt>Implementation report:</dt>\n            <dd>\n              <a href=\"${conf.implementationReportURI}\"\n                >${conf.implementationReportURI}</a\n              >\n            </dd>\n          `\n        : \"\"}\n      ${conf.prevVersion\n        ? html`\n            <dt>Previous version:</dt>\n            <dd><a href=\"${conf.prevVersion}\">${conf.prevVersion}</a></dd>\n          `\n        : \"\"}\n      ${!conf.isCGFinal\n        ? html`\n            ${conf.prevED\n              ? html`\n                  <dt>Previous editor's draft:</dt>\n                  <dd><a href=\"${conf.prevED}\">${conf.prevED}</a></dd>\n                `\n              : \"\"}\n          `\n        : \"\"}\n      ${conf.editors.length\n        ? html`\n            <dt>${conf.editors.length > 1 ? l10n.editors : l10n.editor}</dt>\n            ${showPeople(conf, \"editors\")}\n          `\n        : \"\"}\n      ${conf.formerEditors.length\n        ? html`\n            <dt>\n              ${conf.formerEditors.length > 1\n                ? l10n.former_editors\n                : l10n.former_editor}\n            </dt>\n            ${showPeople(conf, \"formerEditors\")}\n          `\n        : \"\"}\n      ${conf.authors.length\n        ? html`\n            <dt>${conf.authors.length > 1 ? l10n.authors : l10n.author}</dt>\n            ${showPeople(conf, \"authors\")}\n          `\n        : \"\"}\n      ${conf.github || conf.wgPublicList\n        ? html`<dt>${l10n.feedback}</dt>\n            ${renderFeedback(conf)}`\n        : \"\"}\n      ${conf.otherLinks ? conf.otherLinks.map(showLink) : \"\"}\n    </dl>\n    ${conf.alternateFormats\n      ? html`<p>\n          ${options.multipleAlternates\n            ? \"This document is also available in these non-normative formats:\"\n            : \"This document is also available in this non-normative format:\"}\n          ${options.alternatesHTML}\n        </p>`\n      : \"\"}\n    ${existingCopyright\n      ? existingCopyright\n      : html`<p class=\"copyright\">\n          <a href=\"https://www.w3.org/policies/#copyright\">Copyright</a>\n          ©\n          ${conf.copyrightStart\n            ? `${conf.copyrightStart}-`\n            : \"\"}${conf.publishYear}\n          ${conf.additionalCopyrightHolders\n            ? html` ${[conf.additionalCopyrightHolders]} & `\n            : \"\"}\n          the Contributors to the ${specTitleElemClone.childNodes}\n          Specification, published by the\n          <a href=\"${conf.wgURI}\">${conf.wg}</a> under the\n          ${conf.isCGFinal\n            ? html`\n                <a href=\"https://www.w3.org/community/about/agreements/fsa/\"\n                  >W3C Community Final Specification Agreement (FSA)</a\n                >. A human-readable\n                <a\n                  href=\"https://www.w3.org/community/about/agreements/fsa-deed/\"\n                  >summary</a\n                >\n                is available.\n              `\n            : html`\n                <a href=\"https://www.w3.org/community/about/agreements/cla/\"\n                  >W3C Community Contributor License Agreement (CLA)</a\n                >. A human-readable\n                <a\n                  href=\"https://www.w3.org/community/about/agreements/cla-deed/\"\n                  >summary</a\n                >\n                is available.\n              `}\n        </p>`}\n    <hr title=\"Separator for header\" />\n  </div>`;\n};\n","// @ts-check\nimport { W3CDate, getIntlData, htmlJoinAnd } from \"../../core/utils.js\";\nimport { html } from \"../../core/import-maps.js\";\nimport { status2track } from \"../headers.js\";\nconst localizationStrings = {\n  en: {\n    sotd: \"Status of This Document\",\n    status_at_publication: html`This section describes the status of this\n      document at the time of its publication. A list of current W3C\n      publications and the latest revision of this technical report can be found\n      in the <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> at\n      https://www.w3.org/TR/.`,\n  },\n  ko: {\n    sotd: \"현재 문서의 상태\",\n    status_at_publication: html`이 부분은 현재 문서의 발행 당시 상태에 대해\n      기술합니다. W3C 발행 문서의 최신 목록 및 테크니컬 리포트 최신판을\n      https://www.w3.org/TR/ 의\n      <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> 에서\n      열람할 수 있습니다.`,\n  },\n  zh: {\n    sotd: \"关于本文档\",\n    // eslint-disable-next-line prettier/prettier\n    status_at_publication: html`本章节描述了本文档的发布状态。W3C的文档列表和最新版本可通过<a\n        href=\"https://www.w3.org/TR/\"\n        >W3C技术报告</a\n      >索引访问。`,\n  },\n  ja: {\n    sotd: \"この文書の位置付け\",\n    status_at_publication: html`この節には、公開時点でのこの文書の位置づけが記されている。現時点でのW3Cの発行文書とこのテクニカルレポートの最新版は、下記から参照できる。\n      <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a>\n      (https://www.w3.org/TR/)`,\n  },\n  nl: {\n    sotd: \"Status van dit document\",\n  },\n  es: {\n    sotd: \"Estado de este Document\",\n    status_at_publication: html`Esta sección describe el estado del presente\n      documento al momento de su publicación. Una lista de las publicaciones\n      actuales del W3C y la última revisión del presente informe técnico puede\n      hallarse en http://www.w3.org/TR/\n      <a href=\"https://www.w3.org/TR/\">el índice de informes técnicos</a> del\n      W3C.`,\n  },\n  de: {\n    sotd: \"Status dieses Dokuments\",\n    status_at_publication: html`Dieser Abschnitt beschreibt den Status des\n      Dokuments zum Zeitpunkt der Publikation. Eine Liste der aktuellen\n      Publikatinen des W3C und die aktuellste Fassung dieser Spezifikation kann\n      im <a href=\"https://www.w3.org/TR/\">W3C technical reports index</a> unter\n      https://www.w3.org/TR/ abgerufen werden.`,\n  },\n};\n\nexport const l10n = getIntlData(localizationStrings);\n\nconst processLink = \"https://www.w3.org/policies/process/20231103/\";\n\nfunction prefix(word) {\n  return /^[aeiou]/i.test(word) ? `an ${word}` : `a ${word}`;\n}\n\nexport default (conf, opts) => {\n  return html`\n    <h2>${l10n.sotd}</h2>\n    ${conf.isPreview ? renderPreview(conf) : \"\"}\n    ${conf.isUnofficial\n      ? renderIsUnofficial(opts)\n      : conf.isTagFinding\n        ? opts.additionalContent\n        : conf.isNoTrack\n          ? renderIsNoTrack(conf, opts)\n          : html`\n              <p><em>${l10n.status_at_publication}</em></p>\n              ${conf.isMemberSubmission\n                ? noteForSubmission(conf, opts)\n                : html`\n                    ${!conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n                    ${!conf.overrideStatus\n                      ? html` ${linkToWorkingGroup(conf)} `\n                      : \"\"}\n                    ${conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n                    ${conf.isRec ? renderIsRec(conf) : renderNotRec(conf)}\n                    ${renderDeliverer(conf)}\n                    <p>\n                      This document is governed by the\n                      <a id=\"w3c_process_revision\" href=\"${processLink}\"\n                        >03 November 2023 W3C Process Document</a\n                      >.\n                    </p>\n                  `}\n            `}\n    ${opts.additionalSections}\n  `;\n};\n\nexport function renderPreview(conf) {\n  const { prUrl, prNumber, edDraftURI } = conf;\n  return html`<details class=\"annoying-warning\" open=\"\">\n    <summary>\n      This is a\n      preview${prUrl && prNumber\n        ? html`\n            of pull request\n            <a href=\"${prUrl}\">#${prNumber}</a>\n          `\n        : \"\"}\n    </summary>\n    <p>\n      Do not attempt to implement this version of the specification. Do not\n      reference this version as authoritative in any way.\n      ${edDraftURI\n        ? html`\n            Instead, see\n            <a href=\"${edDraftURI}\">${edDraftURI}</a> for the Editor's draft.\n          `\n        : \"\"}\n    </p>\n  </details>`;\n}\n\nfunction renderIsUnofficial(opts) {\n  const { additionalContent } = opts;\n  return html`\n    <p>\n      This document is a draft of a potential specification. It has no official\n      standing of any kind and does not represent the support or consensus of\n      any standards organization.\n    </p>\n    ${additionalContent}\n  `;\n}\n\nfunction renderIsNoTrack(conf, opts) {\n  const { isMO } = conf;\n  const { additionalContent } = opts;\n  return html`\n    <p>\n      This document is merely a W3C-internal\n      ${isMO ? \"member-confidential\" : \"\"} document. It has no official standing\n      of any kind and does not represent consensus of the W3C Membership.\n    </p>\n    ${additionalContent}\n  `;\n}\n\nfunction renderNotRec(conf) {\n  const updatableRec = document.querySelector(\"#sotd.updateable-rec\");\n  let statusExplanation = null;\n  let reviewPolicy = null;\n  let endorsement = html`Publication as ${prefix(conf.textStatus)} does not\n  imply endorsement by W3C and its Members.`;\n  let updatePolicy = html`<p>\n    This is a draft document and may be updated, replaced or obsoleted by other\n    documents at any time. It is inappropriate to cite this document as other\n    than work in progress.\n    ${updatableRec\n      ? html`Future updates to this specification may incorporate\n          <a href=\"${processLink}#allow-new-features\">new features</a>.`\n      : \"\"}\n  </p>`;\n  if (conf.specStatus === \"DISC\") {\n    updatePolicy = html`<p>\n      Publication as a Discontinued Draft implies that this document is no\n      longer intended to advance or to be maintained. It is inappropriate to\n      cite this document as other than abandoned work.\n    </p>`;\n  }\n  const lsUpdatePolicy = html`<p>\n    This document is maintained and updated at any time. Some parts of this\n    document are work in progress.\n  </p>`;\n  switch (conf.specStatus) {\n    case \"STMT\":\n      endorsement = html`<p>\n        A W3C Statement is a specification that, after extensive\n        consensus-building, has received the endorsement of the\n        <abbr title=\"World Wide Web Consortium\">W3C</abbr> and its Members.\n      </p>`;\n      break;\n    case \"RY\":\n      endorsement = html`<p>W3C recommends the wide usage of this registry.</p>\n        <p>\n          A W3C Registry is a specification that, after extensive\n          consensus-building, has received the endorsement of the\n          <abbr title=\"World Wide Web Consortium\">W3C</abbr> and its Members.\n        </p>`;\n      break;\n    case \"CRD\":\n      statusExplanation = html`A Candidate Recommendation Draft integrates\n      changes from the previous Candidate Recommendation that the Working Group\n      intends to include in a subsequent Candidate Recommendation Snapshot.`;\n      if (conf.pubMode === \"LS\") {\n        updatePolicy = lsUpdatePolicy;\n      }\n      break;\n    case \"CRYD\":\n      statusExplanation = html`A Candidate Registry Draft integrates changes\n      from the previous Candidate Registry Snapshot that the Working Group\n      intends to include in a subsequent Candidate Registry Snapshot.`;\n      if (conf.pubMode === \"LS\") {\n        updatePolicy = lsUpdatePolicy;\n      }\n      break;\n    case \"CRY\":\n      statusExplanation = html`A Candidate Registry Snapshot has received\n        <a href=\"${processLink}#dfn-wide-review\">wide review</a>.`;\n      reviewPolicy = html`<p>\n        The W3C Membership and other interested parties are invited to review\n        the document and send comments through ${conf.humanPREnd}. Advisory\n        Committee Representatives should consult their\n        <a href=\"https://www.w3.org/2002/09/wbs/myQuestionnaires\"\n          >WBS questionnaires</a\n        >. Note that substantive technical comments were expected during the\n        Candidate Recommendation review period that ended ${conf.humanCREnd}.\n      </p>`;\n      break;\n    case \"CR\":\n      statusExplanation = html`A Candidate Recommendation Snapshot has received\n        <a href=\"${processLink}#dfn-wide-review\">wide review</a>, is intended to\n        gather\n        <a href=\"${conf.implementationReportURI}\">implementation experience</a>,\n        and has commitments from Working Group members to\n        <a href=\"https://www.w3.org/policies/patent-policy/#sec-Requirements\"\n          >royalty-free licensing</a\n        >\n        for implementations.`;\n      updatePolicy = html`${updatableRec\n        ? html`Future updates to this specification may incorporate\n            <a href=\"${processLink}#allow-new-features\">new features</a>.`\n        : \"\"}`;\n      if (conf.pubMode === \"LS\") {\n        reviewPolicy = html`<p>\n          Comments are welcome at any time but most especially before\n          ${W3CDate.format(conf.crEnd)}.\n        </p>`;\n      } else {\n        reviewPolicy = html`<p>\n          This Candidate Recommendation is not expected to advance to Proposed\n          Recommendation any earlier than ${W3CDate.format(conf.crEnd)}.\n        </p>`;\n      }\n      break;\n    case \"PR\":\n      reviewPolicy = html`<p>\n        The W3C Membership and other interested parties are invited to review\n        the document and send comments through ${W3CDate.format(conf.prEnd)}.\n        Advisory Committee Representatives should consult their\n        <a href=\"https://www.w3.org/2002/09/wbs/myQuestionnaires\"\n          >WBS questionnaires</a\n        >. Note that substantive technical comments were expected during the\n        Candidate Recommendation review period that ended\n        ${W3CDate.format(conf.crEnd)}.\n      </p>`;\n      break;\n    case \"DNOTE\":\n      endorsement = html`${conf.textStatus}s are not endorsed by\n        <abbr title=\"World Wide Web Consortium\">W3C</abbr> nor its Members.`;\n      break;\n    case \"NOTE\":\n      endorsement = html`This ${conf.textStatus} is endorsed by\n        ${getWgHTML(conf)}, but is not endorsed by\n        <abbr title=\"World Wide Web Consortium\">W3C</abbr> itself nor its\n        Members.`;\n      break;\n  }\n  return html`<p>${endorsement} ${statusExplanation}</p>\n    ${updatePolicy} ${reviewPolicy}`;\n}\n\nfunction renderIsRec(conf) {\n  const { revisedRecEnd } = conf;\n  const updatableRec = document.querySelector(\"#sotd.updateable-rec\");\n  let reviewTarget = \"\";\n  if (document.querySelector(\".proposed-addition\")) {\n    reviewTarget = \"additions\";\n  } else if (document.querySelector(\".proposed-correction\")) {\n    reviewTarget = \"corrections\";\n  }\n  return html`\n    <p>\n      W3C recommends the wide deployment of this specification as a standard for\n      the Web.\n    </p>\n\n    <p>\n      A W3C Recommendation is a specification that, after extensive\n      consensus-building, is endorsed by\n      <abbr title=\"World Wide Web Consortium\">W3C</abbr> and its Members, and\n      has commitments from Working Group members to\n      <a href=\"https://www.w3.org/policies/patent-policy/#sec-Requirements\"\n        >royalty-free licensing</a\n      >\n      for implementations.\n      ${updatableRec\n        ? html`Future updates to this Recommendation may incorporate\n            <a href=\"${processLink}#allow-new-features\">new features</a>.`\n        : \"\"}\n    </p>\n    ${document.querySelector(\".addition\")\n      ? html`<p class=\"addition\">\n          Candidate additions are marked in the document.\n        </p>`\n      : \"\"}\n    ${document.querySelector(\".correction\")\n      ? html`<p class=\"correction\">\n          Candidate corrections are marked in the document.\n        </p>`\n      : \"\"}\n    ${document.querySelector(\".proposed-addition\")\n      ? html`<p class=\"addition proposed\">\n          Proposed additions are marked in the document.\n        </p>`\n      : \"\"}\n    ${document.querySelector(\".proposed-correction\")\n      ? html`<p class=\"correction proposed\">\n          Proposed corrections are marked in the document.\n        </p>`\n      : \"\"}\n    ${reviewTarget\n      ? html`<p>\n          The W3C Membership and other interested parties are invited to review\n          the proposed ${reviewTarget} and send comments through\n          ${W3CDate.format(revisedRecEnd)}. Advisory Committee Representatives\n          should consult their\n          <a href=\"https://www.w3.org/2002/09/wbs/myQuestionnaires\"\n            >WBS questionnaires</a\n          >.\n        </p>`\n      : \"\"}\n  `;\n}\n\nfunction renderDeliverer(conf) {\n  const {\n    isNote,\n    isRegistry,\n    wgId,\n    multipleWGs,\n    wgPatentHTML,\n    wgPatentURI,\n    wgPatentPolicy,\n  } = conf;\n\n  const patentPolicyURL =\n    wgPatentPolicy === \"PP2017\"\n      ? \"https://www.w3.org/Consortium/Patent-Policy-20170801/\"\n      : \"https://www.w3.org/policies/patent-policy/\";\n\n  const producers = !(isNote || isRegistry)\n    ? html`\n        This document was produced by ${multipleWGs ? \"groups\" : \"a group\"}\n        operating under the\n        <a href=\"${patentPolicyURL}\"\n          >${wgPatentPolicy === \"PP2017\" ? \"1 August 2017 \" : \"\"}W3C Patent\n          Policy</a\n        >.\n      `\n    : html`\n        The\n        <a href=\"${patentPolicyURL}\"\n          >${wgPatentPolicy === \"PP2017\" ? \"1 August 2017 \" : \"\"}W3C Patent\n          Policy</a\n        >\n        does not carry any licensing requirements or commitments on this\n        document.\n      `;\n  return html`<p data-deliverer=\"${isNote || isRegistry ? wgId : null}\">\n    ${producers}\n    ${!(isNote || isRegistry)\n      ? html`\n          ${multipleWGs\n            ? html` W3C maintains ${wgPatentHTML} `\n            : html`\n                W3C maintains a\n                <a href=\"${[wgPatentURI]}\" rel=\"disclosure\"\n                  >public list of any patent disclosures</a\n                >\n              `}\n          made in connection with the deliverables of\n          ${multipleWGs\n            ? \"each group; these pages also include\"\n            : \"the group; that page also includes\"}\n          instructions for disclosing a patent. An individual who has actual\n          knowledge of a patent which the individual believes contains\n          <a href=\"${patentPolicyURL}#def-essential\">Essential Claim(s)</a>\n          must disclose the information in accordance with\n          <a href=\"${patentPolicyURL}#sec-Disclosure\"\n            >section 6 of the W3C Patent Policy</a\n          >.\n        `\n      : \"\"}\n  </p>`;\n}\n\nfunction noteForSubmission(conf, opts) {\n  return html`\n    ${opts.additionalContent}\n    ${conf.isMemberSubmission ? noteForMemberSubmission(conf) : \"\"}\n  `;\n}\n\nfunction noteForMemberSubmission(conf) {\n  const teamComment = `https://www.w3.org/Submission/${conf.publishDate.getUTCFullYear()}/${\n    conf.submissionCommentNumber\n  }/Comment/`;\n\n  const patentPolicyURL =\n    conf.wgPatentPolicy === \"PP2017\"\n      ? \"https://www.w3.org/Consortium/Patent-Policy-20170801/\"\n      : \"https://www.w3.org/policies/patent-policy/\";\n\n  return html`<p>\n    By publishing this document, W3C acknowledges that the\n    <a href=\"${conf.thisVersion}\">Submitting Members</a> have made a formal\n    Submission request to W3C for discussion. Publication of this document by\n    W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or\n    will be allocating any resources to the issues addressed by it. This\n    document is not the product of a chartered W3C group, but is published as\n    potential input to the\n    <a href=\"https://www.w3.org/policies/process/\">W3C Process</a>. A\n    <a href=\"${teamComment}\">W3C Team Comment</a> has been published in\n    conjunction with this Member Submission. Publication of acknowledged Member\n    Submissions at the W3C site is one of the benefits of\n    <a href=\"https://www.w3.org/Consortium/Prospectus/Joining\">\n      W3C Membership</a\n    >. Please consult the requirements associated with Member Submissions of\n    <a href=\"${patentPolicyURL}#sec-submissions\"\n      >section 3.3 of the W3C Patent Policy</a\n    >. Please consult the complete\n    <a href=\"https://www.w3.org/Submission\"\n      >list of acknowledged W3C Member Submissions</a\n    >.\n  </p>`;\n}\n\nexport function renderPublicList(conf, opts) {\n  const { mailToWGPublicListWithSubject, mailToWGPublicListSubscription } =\n    opts;\n  const { wgPublicList, subjectPrefix } = conf;\n  const archivesURL = `https://lists.w3.org/Archives/Public/${wgPublicList}/`;\n  return html`<p>\n    If you wish to make comments regarding this document, please send them to\n    <a href=\"${mailToWGPublicListWithSubject}\">${wgPublicList}@w3.org</a>\n    (<a href=\"${mailToWGPublicListSubscription}\">subscribe</a>,\n    <a href=\"${archivesURL}\">archives</a>)${subjectPrefix\n      ? html` with <code>${subjectPrefix}</code> at the start of your email's\n          subject`\n      : \"\"}.\n  </p>`;\n}\n\nfunction linkToWorkingGroup(conf) {\n  if (!conf.wg) {\n    return;\n  }\n  let changes = null;\n  const proposedAdditions = document.querySelector(\".proposed-addition\");\n  const proposedCorrections = document.querySelector(\".proposed-correction\");\n  const additions = document.querySelector(\".addition\");\n  const corrections = document.querySelector(\".correction\");\n  const hasRevisions =\n    proposedAdditions || proposedCorrections || additions || corrections;\n  if (conf.isRec && hasRevisions) {\n    if (\n      (proposedAdditions && proposedCorrections) ||\n      (additions && corrections)\n    ) {\n      changes = html`It includes\n      ${proposedAdditions\n        ? html`<a href=\"${processLink}#proposed-amendments\">\n            proposed amendments</a\n          >`\n        : html`<a href=\"${processLink}#candidate-amendments\">\n            candidate amendments</a\n          >`},\n      introducing substantive changes and new features since the previous\n      Recommendation.`;\n    } else if (proposedAdditions || additions) {\n      changes = html`It includes\n      ${proposedAdditions\n        ? html`<a href=\"${processLink}#proposed-addition\">\n            proposed additions</a\n          >`\n        : html`<a href=\"${processLink}#candidate-addition\">\n            candidate additions</a\n          >`},\n      introducing new features since the previous Recommendation.`;\n    } else if (proposedCorrections || corrections) {\n      changes = html`It includes\n      ${proposedCorrections\n        ? html`<a href=\"${processLink}#proposed-correction\">\n            proposed corrections</a\n          >`\n        : html`<a href=\"${processLink}#candidate-correction\">\n            candidate corrections</a\n          >`}.`;\n    }\n  }\n  const track = status2track[conf.specStatus]\n    ? html` using the\n        <a href=\"${processLink}#recs-and-notes\"\n          >${status2track[conf.specStatus]} track</a\n        >`\n    : \"\";\n  return html`<p>\n    This document was published by ${getWgHTML(conf)} as\n    ${prefix(conf.longStatus)}${track}. ${changes}\n  </p>`;\n}\n\nfunction getWgHTML(conf) {\n  if (Array.isArray(conf.wg)) {\n    return htmlJoinAnd(conf.wg, (wg, idx) => {\n      return html`the <a href=\"${conf.wgURI[idx]}\">${wg}</a>`;\n    });\n  } else if (conf.wg) {\n    return html`the <a href=\"${conf.wgURI}\">${conf.wg}</a>`;\n  }\n}\n\nexport function linkToCommunity(conf, opts) {\n  if (!conf.github && !conf.wgPublicList) {\n    return;\n  }\n  return html`<p>\n    ${conf.github\n      ? html`\n          <a href=\"${conf.issueBase}\">GitHub Issues</a> are preferred for\n          discussion of this specification.\n        `\n      : \"\"}\n    ${conf.wgPublicList\n      ? html`\n          ${conf.github && conf.wgPublicList\n            ? \"Alternatively, you can send comments to our mailing list.\"\n            : \"Comments regarding this document are welcome.\"}\n          Please send them to\n          <a href=\"${opts.mailToWGPublicListWithSubject}\"\n            >${conf.wgPublicList}@w3.org</a\n          >\n          (<a href=\"${opts.mailToWGPublicListSubscription}\">subscribe</a>,\n          <a\n            href=\"${`https://lists.w3.org/Archives/Public/${conf.wgPublicList}/`}\"\n            >archives</a\n          >)${conf.subjectPrefix\n            ? html` with <code>${conf.subjectPrefix}</code> at the start of your\n                email's subject`\n            : \"\"}.\n        `\n      : \"\"}\n  </p>`;\n}\n","// @ts-check\nimport {\n  l10n,\n  linkToCommunity,\n  renderPreview,\n  renderPublicList,\n} from \"./sotd.js\";\nimport { html } from \"../../core/import-maps.js\";\n\nexport default (conf, opts) => {\n  return html`\n    <h2>${l10n.sotd}</h2>\n    ${conf.isPreview ? renderPreview(conf) : \"\"}\n    <p>\n      This specification was published by the\n      <a href=\"${conf.wgURI}\">${conf.wg}</a>. It is not a W3C Standard nor is it\n      on the W3C Standards Track.\n      ${conf.isCGFinal\n        ? html`\n            Please note that under the\n            <a href=\"https://www.w3.org/community/about/agreements/final/\"\n              >W3C Community Final Specification Agreement (FSA)</a\n            >\n            other conditions apply.\n          `\n        : html`\n            Please note that under the\n            <a href=\"https://www.w3.org/community/about/agreements/cla/\"\n              >W3C Community Contributor License Agreement (CLA)</a\n            >\n            there is a limited opt-out and other conditions apply.\n          `}\n      Learn more about\n      <a href=\"https://www.w3.org/community/\"\n        >W3C Community and Business Groups</a\n      >.\n    </p>\n    ${!conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n    ${!conf.github && conf.wgPublicList ? renderPublicList(conf, opts) : \"\"}\n    ${conf.github ? linkToCommunity(conf, opts) : \"\"}\n    ${conf.sotdAfterWGinfo ? opts.additionalContent : \"\"}\n    ${opts.additionalSections}\n  `;\n};\n","// @ts-check\n// Module w3c/headers\n// Generate the headers material based on the provided configuration.\n// CONFIGURATION\n//  - specStatus: the short code for the specification's maturity level or type (required)\n//  - shortName: the small name that is used after /TR/ in published reports (required)\n//  - editors: an array of people editing the document (at least one is required). People\n//      are defined using:\n//          - name: the person's name (required)\n//          - url: URI for the person's home page\n//          - company: the person's company\n//          - companyURL: the URI for the person's company\n//          - mailto: the person's email\n//          - note: a note on the person (e.g. former editor)\n//  - authors: an array of people who are contributing authors of the document.\n//  - formerEditors: an array of people that had earlier edited the document but no longer edit.\n//  - subtitle: a subtitle for the specification\n//  - publishDate: the date to use for the publication, default to document.lastModified, and\n//      failing that to now. The format is YYYY-MM-DD or a Date object.\n//  - previousPublishDate: the date on which the previous version was published.\n//  - previousMaturity: the specStatus of the previous version\n//  - errata: the URI of the errata document, if any\n//  - alternateFormats: a list of alternate formats for the document, each of which being\n//      defined by:\n//          - uri: the URI to the alternate\n//          - label: a label for the alternate\n//          - lang: optional language\n//          - type: optional MIME type\n//  - logos: a list of logos to use instead of the W3C logo, each of which being defined by:\n//          - src: the URI to the logo (target of <img src=>)\n//          - alt: alternate text for the image (<img alt=>), defaults to \"Logo\" or \"Logo 1\", \"Logo 2\", ...\n//            if src is not specified, this is the text of the \"logo\"\n//          - height: optional height of the logo (<img height=>)\n//          - width: optional width of the logo (<img width=>)\n//          - url: the URI to the organization represented by the logo (target of <a href=>)\n//          - id: optional id for the logo, permits custom CSS (wraps logo in <span id=>)\n//          - each logo element must specify either src or alt\n//  - testSuiteURI: the URI to the test suite, if any\n//  - implementationReportURI: the URI to the implementation report, if any\n//  - noRecTrack: set to true if this document is not intended to be on the Recommendation track\n//  - edDraftURI: the URI of the Editor's Draft for this document, if any. Required if\n//      specStatus is set to \"ED\".\n//  - additionalCopyrightHolders: a copyright owner in addition to W3C (or the only one if specStatus\n//      is unofficial)\n//  - copyrightStart: the year from which the copyright starts running\n//  - prevED: the URI of the previous Editor's Draft if it has moved\n//  - prevRecShortname: the short name of the previous Recommendation, if the name has changed\n//  - prevRecURI: the URI of the previous Recommendation if not directly generated from\n//    prevRecShortname.\n//  - wg: the name of the WG in charge of the document. This may be an array in which case wgURI\n//      and wgPatentURI need to be arrays as well, of the same length and in the same order\n//  - wgURI: the URI to the group's page, or an array of such\n//  - wgPatentURI: the URI to the group's patent information page, or an array of such. NOTE: this\n//      is VERY IMPORTANT information to provide and get right, do not just paste this without checking\n//      that you're doing it right\n//  - wgPublicList: the name of the mailing list where discussion takes place. Note that this cannot\n//      be an array as it is assumed that there is a single list to discuss the document, even if it\n//      is handled by multiple groups\n//  - charterDisclosureURI: used for IGs (when publishing IG-NOTEs) to provide a link to the IPR commitment\n//      defined in their charter.\n//  - thisVersion: the URI to the dated current version of the specification. ONLY ever use this for CG/BG\n//      documents, for all others it is autogenerated.\n//  - latestVersion: the URI to the latest version of the specification.\n//  - prevVersion: the URI to the previous (dated) version of the specification. ONLY ever use this for CG/BG\n//      documents, for all others it is autogenerated.\n//  - subjectPrefix: the string that is expected to be used as a subject prefix when posting to the mailing\n//      list of the group.\n//  - otherLinks: an array of other links that you might want in the header (e.g., link github, twitter, etc).\n//         Example of usage: [{key: \"foo\", href:\"https://b\"}, {key: \"bar\", href:\"https://\"}].\n//         Allowed values are:\n//          - key: the key for the <dt> (e.g., \"Bug Tracker\"). Required.\n//          - value: The value that will appear in the <dd> (e.g., \"GitHub\"). Optional.\n//          - href: a URL for the value (e.g., \"https://foo.com/issues\"). Optional.\n//          - class: a string representing CSS classes. Optional.\n//  - license: can be one of the following\n//      - \"cc-by\", which is experimentally available in some groups (but likely to be phased out).\n//          Note that this is a dual licensing regime.\n//      - \"document\", which is the old, but still available, document license.\n//      - \"dual\", dual license.\n//      - \"cc0\", an extremely permissive license. It is only recommended if you are working on a document that is\n//          intended to be pushed to the WHATWG.\n//      - \"w3c-software\", a permissive and attributions license (but GPL-compatible).\n//      - \"w3c-software-doc\", (default) the W3C Software and Document License\n//            https://www.w3.org/copyright/software-license-2023/\nimport {\n  ISODate,\n  codedJoinAnd,\n  codedJoinOr,\n  concatDate,\n  docLink,\n  htmlJoinAnd,\n  norm,\n  showError,\n  showWarning,\n} from \"../core/utils.js\";\nimport cgbgHeadersTmpl from \"./templates/cgbg-headers.js\";\nimport cgbgSotdTmpl from \"./templates/cgbg-sotd.js\";\nimport headersTmpl from \"./templates/headers.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { pub } from \"../core/pubsubhub.js\";\nimport sotdTmpl from \"./templates/sotd.js\";\n\nexport const name = \"w3c/headers\";\n\n/**\n * Resolves against https://www.w3.org.\n * @param {string} href\n */\nfunction w3Url(href) {\n  return new URL(href, \"https://www.w3.org/\").href;\n}\n\nconst status2maturity = {\n  LS: \"WD\",\n  LD: \"WD\",\n  FPWD: \"WD\",\n  \"Member-SUBM\": \"SUBM\",\n};\n\nexport const status2text = {\n  DNOTE: \"Group Draft Note\",\n  NOTE: \"Group Note\",\n  STMT: \"Statement\",\n  \"Member-SUBM\": \"Member Submission\",\n  MO: \"Member-Only Document\",\n  ED: \"Editor's Draft\",\n  LS: \"Living Standard\",\n  LD: \"Living Document\",\n  FPWD: \"First Public Working Draft\",\n  WD: \"Working Draft\",\n  CR: \"Candidate Recommendation\",\n  CRD: \"Candidate Recommendation\",\n  PR: \"Proposed Recommendation\",\n  REC: \"Recommendation\",\n  DISC: \"Discontinued Draft\",\n  RSCND: \"Rescinded Recommendation\",\n  DRY: \"Draft Registry\",\n  CRYD: \"Candidate Registry\",\n  CRY: \"Candidate Registry\",\n  RY: \"Registry\",\n  unofficial: \"Unofficial Draft\",\n  UD: \"Unofficial Draft\",\n  base: \"\",\n  finding: \"TAG Finding\",\n  \"draft-finding\": \"Draft TAG Finding\",\n  \"editor-draft-finding\": \"Draft TAG Finding\",\n  \"CG-DRAFT\": \"Draft Community Group Report\",\n  \"CG-FINAL\": \"Final Community Group Report\",\n  \"BG-DRAFT\": \"Draft Business Group Report\",\n  \"BG-FINAL\": \"Final Business Group Report\",\n};\nconst status2long = {\n  ...status2text,\n  CR: \"Candidate Recommendation Snapshot\",\n  CRD: \"Candidate Recommendation Draft\",\n  CRY: \"Candidate Registry Snapshot\",\n  CRYD: \"Candidate Registry Draft\",\n};\nexport const status2track = {\n  DNOTE: \"Note\",\n  NOTE: \"Note\",\n  STMT: \"Note\",\n  \"WG-NOTE\": \"Note\",\n  \"IG-NOTE\": \"Note\",\n  FPWD: \"Recommendation\",\n  WD: \"Recommendation\",\n  CR: \"Recommendation\",\n  CRD: \"Recommendation\",\n  PR: \"Recommendation\",\n  REC: \"Recommendation\",\n  DISC: \"Recommendation\",\n  RSCND: \"Recommendation\",\n  DRY: \"Registry\",\n  CRYD: \"Registry\",\n  CRY: \"Registry\",\n  RY: \"Registry\",\n};\nexport const W3CNotes = [\"DNOTE\", \"NOTE\", \"STMT\"];\nexport const recTrackStatus = [\n  \"CR\",\n  \"CRD\",\n  \"DISC\",\n  \"FPWD\",\n  \"PR\",\n  \"REC\",\n  \"RSCND\",\n  \"WD\",\n];\nexport const registryTrackStatus = [\"DRY\", \"CRY\", \"CRYD\", \"RY\"];\nexport const tagStatus = [\"draft-finding\", \"finding\", \"editor-draft-finding\"];\nexport const cgStatus = [\"CG-DRAFT\", \"CG-FINAL\"];\nexport const bgStatus = [\"BG-DRAFT\", \"BG-FINAL\"];\nexport const cgbgStatus = [...cgStatus, ...bgStatus];\nexport const trStatus = [\n  ...W3CNotes,\n  ...recTrackStatus,\n  ...registryTrackStatus,\n];\nexport const noTrackStatus = [\n  \"base\",\n  ...cgStatus,\n  ...bgStatus,\n  \"editor-draft-finding\",\n  \"draft-finding\",\n  \"finding\",\n  \"MO\",\n  \"unofficial\",\n];\n/** @type {Map<string, LicenseInfo>} */\nexport const licenses = new Map([\n  [\n    \"cc0\",\n    {\n      name: \"Creative Commons 0 Public Domain Dedication\",\n      short: \"CC0\",\n      url: \"https://creativecommons.org/publicdomain/zero/1.0/\",\n    },\n  ],\n  [\n    \"w3c-software\",\n    {\n      name: \"W3C Software Notice and License\",\n      short: \"W3C Software\",\n      url: \"https://www.w3.org/copyright/software-license-2002/\",\n    },\n  ],\n  [\n    \"w3c-software-doc\",\n    {\n      name: \"W3C Software and Document Notice and License\",\n      short: \"permissive document license\",\n      url: \"https://www.w3.org/copyright/software-license-2023/\",\n    },\n  ],\n  [\n    \"cc-by\",\n    {\n      name: \"Creative Commons Attribution 4.0 International Public License\",\n      short: \"CC-BY\",\n      url: \"https://creativecommons.org/licenses/by/4.0/legalcode\",\n    },\n  ],\n  [\n    \"document\",\n    {\n      name: \"W3C Document License\",\n      short: \"document use\",\n      url: \"https://www.w3.org/copyright/document-license/\",\n    },\n  ],\n  [\n    \"dual\",\n    {\n      name: \"W3C Dual License\",\n      short: \"dual license\",\n      url: \"https://www.w3.org/Consortium/Legal/2013/copyright-documents-dual.html\",\n    },\n  ],\n  [\n    undefined,\n    {\n      name: \"unlicensed\",\n      url: null,\n      short: \"UNLICENSED\",\n    },\n  ],\n]);\n\nconst patentPolicies = [\"PP2017\", \"PP2020\"];\n\n/**\n * @param {*} conf\n * @param {string} prop\n * @param {string | number | Date} fallbackDate\n */\nfunction validateDateAndRecover(conf, prop, fallbackDate = new Date()) {\n  const date = conf[prop] ? new Date(conf[prop]) : new Date(fallbackDate);\n  // if date is valid\n  if (Number.isFinite(date.valueOf())) {\n    const formattedDate = ISODate.format(date);\n    return new Date(formattedDate);\n  }\n  const msg = docLink`${prop} is not a valid date: \"${conf[prop]}\". Expected format 'YYYY-MM-DD'.`;\n  showError(msg, name);\n  return new Date(ISODate.format(new Date()));\n}\n\nfunction deriveLicenseInfo(conf) {\n  let license = undefined;\n  if (typeof conf.license === \"string\") {\n    const lCaseLicense = conf.license.toLowerCase();\n    if (!licenses.has(lCaseLicense)) {\n      const msg = `The license \"\\`${conf.license}\\`\" is not supported.`;\n      const choices = codedJoinOr(\n        [...licenses.keys()].filter(k => k),\n        {\n          quotes: true,\n        }\n      );\n      const hint = docLink`Please set\n        ${\"[license]\"} to one of: ${choices}. If in doubt, remove \\`license\\` and let ReSpec pick one for you.`;\n      showError(msg, name, { hint });\n    } else {\n      license = lCaseLicense;\n    }\n  }\n\n  if (conf.isUnofficial && !license) {\n    license = \"cc-by\";\n  }\n\n  // W3C docs can't be CC-BY or CC0\n  if (!conf.isUnofficial && [\"cc-by\", \"cc0\"].includes(license)) {\n    const msg = docLink`License \"\\`${conf.license}\\`\" is not allowed for W3C Specifications.`;\n    const hint = docLink`Please set ${\"[license]\"} to \\`\"w3c-software-doc\"\\` instead.`;\n    showError(msg, name, { hint });\n  }\n  const licenseInfo = licenses.get(license);\n  return licenseInfo;\n}\n\nexport async function run(conf) {\n  conf.isBasic = conf.specStatus === \"base\";\n  conf.isCGBG = cgbgStatus.includes(conf.specStatus);\n  conf.isCGFinal = conf.isCGBG && conf.specStatus.endsWith(\"G-FINAL\");\n  conf.isCR = conf.specStatus === \"CR\" || conf.specStatus === \"CRD\";\n  conf.isCRDraft = conf.specStatus === \"CRD\";\n  conf.isCRY = conf.specStatus === \"CRY\" || conf.specStatus === \"CRYD\";\n  conf.isEd = conf.specStatus === \"ED\";\n  conf.isMemberSubmission = conf.specStatus === \"Member-SUBM\";\n  conf.isMO = conf.specStatus === \"MO\";\n  conf.isNote = W3CNotes.includes(conf.specStatus);\n  conf.isNoTrack = noTrackStatus.includes(conf.specStatus);\n  conf.isPR = conf.specStatus === \"PR\";\n  conf.isRecTrack = recTrackStatus.includes(conf.specStatus);\n  conf.isRec = conf.isRecTrack && conf.specStatus === \"REC\";\n  conf.isRegistry = registryTrackStatus.includes(conf.specStatus);\n  conf.isRegular = !conf.isCGBG && !conf.isBasic;\n  conf.isTagEditorFinding = conf.specStatus === \"editor-draft-finding\";\n  conf.isTagFinding = tagStatus.includes(conf.specStatus);\n  conf.isUnofficial = conf.specStatus === \"unofficial\";\n  conf.licenseInfo = deriveLicenseInfo(conf);\n  conf.prependW3C = !conf.isBasic && !conf.isUnofficial;\n  conf.longStatus = status2long[conf.specStatus];\n  conf.textStatus = status2text[conf.specStatus];\n  conf.showPreviousVersion = false;\n\n  if (conf.isRegular && !conf.shortName) {\n    const msg = docLink`The ${\"[shortName]\"} configuration option is required for this kind of document.`;\n    const hint = docLink`Please set ${\"[shortName]\"} to a short name for the specification.`;\n    showError(msg, name, { hint });\n  }\n\n  conf.publishDate = validateDateAndRecover(\n    conf,\n    \"publishDate\",\n    document.lastModified\n  );\n  conf.publishYear = conf.publishDate.getUTCFullYear();\n  if (conf.modificationDate) {\n    conf.modificationDate = validateDateAndRecover(\n      conf,\n      \"modificationDate\",\n      document.lastModified\n    );\n  }\n\n  if (conf.isRecTrack && !conf.github && !conf.wgPublicList) {\n    const msg =\n      \"W3C Process requires a either a link to a public repository or mailing list.\";\n    const hint = docLink`Use the ${\"[github]\"} configuration option to add a link to a repository. Alternatively use ${\"[wgPublicList]\"} to link to a mailing list.`;\n    showError(msg, name, {\n      hint,\n    });\n  }\n\n  if (conf.isEd && !conf.edDraftURI) {\n    const msg = docLink`Editor's Drafts should set ${\"[edDraftURI]\"} configuration option.`;\n    const hint = docLink`Please set ${\"[edDraftURI]\"} to the URL of the Editor's Draft. Alternatively, use the set ${\"[github]\"} option, which automatically sets it for you.`;\n    showWarning(msg, name, { hint });\n  }\n\n  const pubSpace = derivePubSpace(conf);\n  if (pubSpace && !conf.thisVersion) {\n    const maturity = status2maturity[conf.specStatus] || conf.specStatus;\n    const { shortName, publishDate } = conf;\n    const date = concatDate(publishDate);\n    const docVersion = `${maturity}-${shortName}-${date}`;\n    const year = [...trStatus, \"Member-SUBM\"].includes(conf.specStatus)\n      ? `${publishDate.getUTCFullYear()}/`\n      : \"\";\n    conf.thisVersion = w3Url(`${pubSpace}/${year}${docVersion}/`);\n  }\n\n  if (conf.isEd) conf.thisVersion = conf.edDraftURI;\n  if (conf.isCGBG) validateCGBG(conf);\n  if (conf.latestVersion !== null) {\n    conf.latestVersion = conf.latestVersion\n      ? w3Url(conf.latestVersion)\n      : w3Url(`${pubSpace}/${conf.shortName}/`);\n  }\n\n  if (conf.latestVersion) validateIfAllowedOnTR(conf);\n\n  const latestPath = `${pubSpace}/${conf.shortName}`;\n  if (conf.previousPublishDate) {\n    if (!conf.previousMaturity && !conf.isTagFinding) {\n      const msg = docLink`${\"[`previousPublishDate`]\"} is set, but missing ${\"[`previousMaturity`]\"}.`;\n      showError(msg, name);\n    }\n\n    conf.previousPublishDate = validateDateAndRecover(\n      conf,\n      \"previousPublishDate\"\n    );\n\n    const prevMaturity =\n      status2maturity[conf.previousMaturity] ?? conf.previousMaturity;\n    if (conf.isTagFinding && conf.latestVersion) {\n      const pubDate = ISODate.format(conf.publishDate);\n      conf.thisVersion = w3Url(`${latestPath}-${pubDate}`);\n      const prevPubDate = ISODate.format(conf.previousPublishDate);\n      conf.prevVersion = w3Url(`${latestPath}-${prevPubDate}}`);\n    } else if (conf.isCGBG || conf.isBasic) {\n      conf.prevVersion = conf.prevVersion || \"\";\n    } else {\n      const year = conf.previousPublishDate.getUTCFullYear();\n      const { shortName } = conf;\n      const date = concatDate(conf.previousPublishDate);\n      conf.prevVersion = w3Url(\n        `${pubSpace}/${year}/${prevMaturity}-${shortName}-${date}/`\n      );\n    }\n  }\n  if (conf.prevRecShortname && !conf.prevRecURI)\n    conf.prevRecURI = w3Url(`${pubSpace}/${conf.prevRecShortname}`);\n\n  // Move any editors with retiredDate to formerEditors.\n  for (let i = 0; i < conf.editors.length; i++) {\n    const editor = conf.editors[i];\n    if (\"retiredDate\" in editor) {\n      conf.formerEditors.push(editor);\n      conf.editors.splice(i--, 1);\n    }\n  }\n\n  if (conf.editors.length === 0) {\n    const msg = \"At least one editor is required.\";\n    const hint = docLink`Add one or more editors using the ${\"[editors]\"} configuration option.`;\n    showError(msg, name, { hint });\n  } else if (conf.editors.length && conf.isRecTrack) {\n    // check that every editor has w3cid\n    conf.editors.forEach((editor, i) => {\n      if (editor.w3cid) return;\n      const msg = docLink`Editor ${\n        editor.name ? `\"${editor.name}\"` : `number ${i + 1}`\n      } is missing their ${\"[w3cid]\"}.`;\n      const hint = docLink`See ${\"[w3cid]\"} for instructions for how to retrieve it and add it.`;\n      showError(msg, name, { hint });\n    });\n  }\n\n  if (conf.alternateFormats?.some(({ uri, label }) => !uri || !label)) {\n    const msg = docLink`Every ${\"[`alternateFormats`]\"} entry must have a \\`uri\\` and a \\`label\\`.`;\n    showError(msg, name);\n  }\n  if (conf.copyrightStart == conf.publishYear) conf.copyrightStart = \"\";\n  conf.dashDate = ISODate.format(conf.publishDate);\n  conf.publishISODate = conf.publishDate.toISOString();\n  conf.shortISODate = ISODate.format(conf.publishDate);\n  validatePatentPolicies(conf);\n  await deriveHistoryURI(conf);\n  if (conf.isTagEditorFinding) {\n    delete conf.thisVersion;\n    delete conf.latestVersion;\n  }\n  if (conf.isTagFinding) {\n    conf.showPreviousVersion = conf.previousPublishDate ? true : false;\n  }\n  // configuration done - yay!\n\n  const options = {\n    get multipleAlternates() {\n      return conf.alternateFormats && conf.alternateFormats.length > 1;\n    },\n    get alternatesHTML() {\n      return (\n        conf.alternateFormats &&\n        htmlJoinAnd(\n          // We need to pass a string here...\n          conf.alternateFormats.map(({ label }) => label),\n          (_, i) => {\n            const alt = conf.alternateFormats[i];\n            return html`<a\n              rel=\"alternate\"\n              href=\"${alt.uri}\"\n              hreflang=\"${alt?.lang ?? null}\"\n              type=\"${alt?.type ?? null}\"\n              >${alt.label}</a\n            >`;\n          }\n        )\n      );\n    },\n  };\n\n  // insert into document\n  const header = (conf.isCGBG ? cgbgHeadersTmpl : headersTmpl)(conf, options);\n  document.body.prepend(header);\n  document.body.classList.add(\"h-entry\");\n\n  // handle SotD\n  const sotd =\n    document.getElementById(\"sotd\") || document.createElement(\"section\");\n  if ((conf.isCGBG || !conf.isNoTrack || conf.isTagFinding) && !sotd.id) {\n    const msg =\n      \"A Status of This Document must include at least on custom paragraph.\";\n    const hint =\n      \"Add a `<p>` in the 'sotd' section that reflects the status of this specification.\";\n    showError(msg, name, { elements: [sotd], hint });\n  }\n  sotd.id = sotd.id || \"sotd\";\n  sotd.classList.add(\"introductory\");\n  // NOTE:\n  //  When arrays, wg and wgURI have to be the same length (and in the same order).\n  //  Technically wgURI could be longer but the rest is ignored.\n  //  However wgPatentURI can be shorter. This covers the case where multiple groups\n  //  publish together but some aren't used for patent policy purposes (typically this\n  //  happens when one is foolish enough to do joint work with the TAG). In such cases,\n  //  the groups whose patent policy applies need to be listed first, and wgPatentURI\n  //  can be shorter — but it still needs to be an array.\n  const wgPotentialArray = [conf.wg, conf.wgURI, conf.wgPatentURI];\n  if (\n    wgPotentialArray.some(item => Array.isArray(item)) &&\n    !wgPotentialArray.every(item => Array.isArray(item))\n  ) {\n    const msg = docLink`If one of ${\"[wg]\"}, ${\"[wgURI]\"}, or ${\"[wgPatentURI]\"} is an array, they all have to be.`;\n    const hint = docLink`Use the ${\"[group]\"} option with an array instead.`;\n    showError(msg, name, { hint });\n  }\n  if (Array.isArray(conf.wg)) {\n    conf.multipleWGs = conf.wg.length > 1;\n    conf.wgPatentHTML = htmlJoinAnd(conf.wg, (wg, i) => {\n      return html`a\n        <a href=\"${conf.wgPatentURI[i]}\" rel=\"disclosure\"\n          >public list of any patent disclosures (${wg})</a\n        >`;\n    });\n  } else {\n    conf.multipleWGs = false;\n  }\n  if (conf.isPR && !conf.crEnd) {\n    const msg = docLink`${\"[specStatus]\"} is \"PR\" but no ${\"[crEnd]\"} is specified in the ${\"[respecConfig]\"} (needed to indicate end of previous CR).`;\n    showError(msg, name);\n  }\n\n  if (conf.isCR && !conf.crEnd) {\n    const msg = docLink`${\"[specStatus]\"} is \"CR\", but no ${\"[crEnd]\"} is specified in the ${\"[respecConfig]\"}.`;\n    showError(msg, name);\n  }\n  conf.crEnd = validateDateAndRecover(conf, \"crEnd\");\n\n  if (conf.isPr && !conf.prEnd) {\n    const msg = docLink`${\"[specStatus]\"} is \"PR\" but no ${\"[prEnd]\"} is specified in the ${\"[respecConfig]\"}.`;\n    showError(msg, name);\n  }\n  conf.prEnd = validateDateAndRecover(conf, \"prEnd\");\n\n  const isUpdatableRec = sotd.classList.contains(\"updateable-rec\");\n  const hasCorrections = document.querySelector(\".correction\") !== null;\n  const hasProposedCorrections =\n    document.querySelector(\".proposed-correction\") !== null;\n  const hasAdditions = document.querySelector(\".addition\") !== null;\n  const hasProposedAdditions =\n    document.querySelector(\".proposed-addition\") !== null;\n  const hasRevisions =\n    hasCorrections ||\n    hasAdditions ||\n    hasProposedAdditions ||\n    hasProposedCorrections;\n\n  if (conf.isRec && !conf.errata && !hasRevisions) {\n    const msg = \"Recommendations must have an errata link.\";\n    const hint = docLink`Add an ${\"[errata]\"} URL to your ${\"[respecConfig]\"}.`;\n    showError(msg, name, { hint });\n  }\n\n  if (!isUpdatableRec && (hasAdditions || hasCorrections)) {\n    const msg = docLink`${\"[specStatus]\"} is \"REC\" with proposed additions but the Recommendation is not marked as allowing new features.`;\n    showError(msg, name);\n  }\n\n  if (\n    conf.isRec &&\n    isUpdatableRec &&\n    (hasProposedAdditions || hasProposedCorrections) &&\n    !conf.revisedRecEnd\n  ) {\n    const msg = docLink`${\"[specStatus]\"} is \"REC\" with proposed corrections or additions but no ${\"[revisedRecEnd]\"} is specified in the ${\"[respecConfig]\"}.`;\n    showError(msg, name);\n  }\n  conf.revisedRecEnd = validateDateAndRecover(conf, \"revisedRecEnd\");\n\n  if (conf.noRecTrack && recTrackStatus.includes(conf.specStatus)) {\n    const msg = docLink`Document configured as ${\"[noRecTrack]\"}, but its status (\"${conf.specStatus}\") puts it on the W3C Rec Track.`;\n    const notAllowed = codedJoinOr(recTrackStatus, { quotes: true });\n    const hint = `Status **can't** be any of: ${notAllowed}.`;\n    showError(msg, name, { hint });\n  }\n  if (!sotd.classList.contains(\"override\")) {\n    html.bind(sotd)`${populateSoTD(conf, sotd)}`;\n  }\n\n  if (!conf.implementationReportURI && conf.isCR) {\n    const msg = docLink`Missing ${\"[implementationReportURI]\"} configuration option in ${\"[respecConfig]\"}.`;\n    const hint = docLink`CR documents must have an ${\"[implementationReportURI]\"} that describes the [implementation experience](https://www.w3.org/policies/process/#implementation-experience).`;\n    showError(msg, name, { hint });\n  }\n  if (!conf.implementationReportURI && conf.isPR) {\n    const msg = docLink`PR documents should include an ${\"[implementationReportURI]\"}, which needs to link to a document that describes the [implementation experience](https://www.w3.org/policies/process-20190301/#implementation-experience).`;\n    showWarning(msg, name);\n  }\n\n  // Requested by https://github.com/speced/respec/issues/504\n  // Makes a record of a few auto-generated things.\n  pub(\"amend-user-config\", {\n    publishISODate: conf.publishISODate,\n    generatedSubtitle: norm(\n      document.getElementById(\"w3c-state\")?.textContent ?? \"\"\n    ),\n  });\n}\n\nfunction validateIfAllowedOnTR(conf) {\n  const latestVersionURL = new URL(conf.latestVersion);\n  const isW3C =\n    latestVersionURL.origin === \"https://www.w3.org\" ||\n    latestVersionURL.origin === \"https://w3.org/\";\n  if (\n    isW3C &&\n    latestVersionURL.pathname.startsWith(\"/TR/\") &&\n    [\"ED\", ...trStatus].includes(conf.specStatus) === false\n  ) {\n    const msg = docLink`Documents with a status of \\`\"${conf.specStatus}\"\\` can't be published on the W3C's /TR/ (Technical Report) space.`;\n    const hint = docLink`Ask a W3C Team Member for a W3C URL where the report can be published and change ${\"[latestVersion]\"} to something else.`;\n    showError(msg, name, { hint });\n    return;\n  }\n}\n\nfunction derivePubSpace(conf) {\n  const { specStatus, group } = conf;\n  if (trStatus.includes(specStatus) || conf.groupType === \"wg\") {\n    return `/TR`;\n  }\n\n  switch (specStatus) {\n    case \"CG-FINAL\":\n    case \"BG-FINAL\":\n      return `/community/reports/${group}`;\n    case \"finding\":\n    case \"draft-finding\":\n      return \"/2001/tag/doc\";\n    case \"Member-SUBM\":\n      return `/Submission`;\n  }\n\n  return \"\";\n}\n\nfunction validateCGBG(conf) {\n  const reportType = status2text[conf.specStatus];\n  const latestVersionURL = conf.latestVersion\n    ? new URL(w3Url(conf.latestVersion))\n    : null;\n\n  if (!conf.wg) {\n    const msg = docLink`The ${\"[group]\"} configuration option is required for this kind of document (${reportType}).`;\n    showError(msg, name);\n    return;\n  }\n\n  // Deal with final reports\n  if (conf.isCGFinal) {\n    // Final report require a w3.org URL.\n    const isW3C =\n      latestVersionURL?.origin === \"https://www.w3.org\" ||\n      latestVersionURL?.origin === \"https://w3.org/\";\n    if (isW3C === false) {\n      const msg = docLink`For ${reportType}, the ${\"[latestVersion]\"} URL must point to somewhere at https://www.w3.org/.`;\n      const hint = `Ask a W3C Team Member for a W3C URL where the report can be published.`;\n      showError(msg, name, { hint });\n      return;\n    }\n  }\n}\n\nasync function deriveHistoryURI(conf) {\n  if (!conf.shortName || conf.historyURI === null || !conf.latestVersion) {\n    return; // Nothing to do\n  }\n\n  const canShowHistory = conf.isEd || trStatus.includes(conf.specStatus);\n\n  if (conf.historyURI && !canShowHistory) {\n    const msg = docLink`The ${\"[historyURI]\"} can't be used with non /TR/ documents.`;\n    const hint = docLink`Please remove ${\"[historyURI]\"}.`;\n    showError(msg, name, { hint });\n    conf.historyURI = null;\n    return;\n  }\n\n  const historyURL = new URL(\n    conf.historyURI ?? `${conf.shortName}/`,\n    \"https://www.w3.org/standards/history/\"\n  );\n\n  // If it's on the Rec Track or it's TR worthy, then allow history override.\n  // Also make a an exception for FPWD, DNOTE, NOTE and DRY.\n  if (\n    (conf.historyURI && canShowHistory) ||\n    [\"FPWD\", \"DNOTE\", \"NOTE\", \"DRY\"].includes(conf.specStatus)\n  ) {\n    conf.historyURI = historyURL.href;\n    return;\n  }\n\n  // Let's get the history from the W3C.\n  // Do a fetch HEAD request to see if the history exists...\n  // We don't discriminate... if it's on the W3C website with a history,\n  // we show it.\n  try {\n    const response = await fetch(historyURL, { method: \"HEAD\" });\n    if (response.ok) {\n      conf.historyURI = response.url;\n    }\n  } catch {\n    // Ignore fetch errors\n  }\n}\n\nfunction validatePatentPolicies(conf) {\n  if (!conf.wgPatentPolicy) return;\n  const policies = new Set([].concat(conf.wgPatentPolicy));\n  if (\n    policies.size &&\n    ![...policies].every(policy => patentPolicies.includes(policy))\n  ) {\n    const invalidPolicies = [...policies].filter(\n      policy => !patentPolicies.includes(policy)\n    );\n    const msg = docLink`Invalid ${\"[wgPatentPolicy]\"} value(s): ${codedJoinAnd(\n      invalidPolicies\n    )}.`;\n    const hint = `Please use one of: ${codedJoinOr(patentPolicies)}.`;\n    showError(msg, name, { hint });\n  }\n  if (policies.size !== 1) {\n    const msg =\n      \"When collaborating across multiple groups, they must use the same patent policy.\";\n    const hint = docLink`For ${\"[wgPatentPolicy]\"}, please check the patent policies of each group. The patent policies were: ${[\n      ...policies,\n    ].join(\", \")}.`;\n    showError(msg, name, { hint });\n  }\n  // We take the first policy\n  conf.wgPatentPolicy = [...policies][0];\n}\n\n/**\n * @param {*} conf\n * @param {HTMLElement} sotd\n */\nfunction populateSoTD(conf, sotd) {\n  const options = {\n    ...collectSotdContent(sotd, conf),\n\n    get mailToWGPublicList() {\n      return `mailto:${conf.wgPublicList}@w3.org`;\n    },\n    get mailToWGPublicListWithSubject() {\n      const fragment = conf.subjectPrefix\n        ? `?subject=${encodeURIComponent(conf.subjectPrefix)}`\n        : \"\";\n      return this.mailToWGPublicList + fragment;\n    },\n    get mailToWGPublicListSubscription() {\n      return `mailto:${conf.wgPublicList}-request@w3.org?subject=subscribe`;\n    },\n  };\n  const template = conf.isCGBG ? cgbgSotdTmpl : sotdTmpl;\n  return template(conf, options);\n}\n\n/**\n * @param {HTMLElement} sotd\n */\nfunction collectSotdContent(sotd, { isTagFinding = false }) {\n  const sotdClone = sotd.cloneNode(true);\n  const additionalContent = document.createDocumentFragment();\n  // we collect everything until we hit a section,\n  // that becomes the custom content.\n  while (sotdClone.hasChildNodes()) {\n    if (\n      sotdClone.nodeType === Node.ELEMENT_NODE &&\n      // @ts-ignore\n      sotdClone.firstChild.localName === \"section\"\n    ) {\n      break;\n    }\n    additionalContent.appendChild(sotdClone.firstChild);\n  }\n  if (isTagFinding && !additionalContent.hasChildNodes()) {\n    const msg = docLink`ReSpec does not support automated SotD generation for TAG findings.`;\n    const hint = `Please add the prerequisite content in the 'sotd' section.`;\n    showWarning(msg, name, { hint });\n  }\n  return {\n    additionalContent,\n    // Whatever sections are left, we throw at the end.\n    additionalSections: sotdClone.childNodes,\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 W3C specs\n */\nexport const name = \"w3c/defaults\";\nimport {\n  W3CNotes,\n  bgStatus,\n  cgStatus,\n  recTrackStatus,\n  registryTrackStatus,\n  status2text,\n  tagStatus,\n  trStatus,\n} from \"./headers.js\";\nimport { codedJoinOr, docLink, showError } from \"../core/utils.js\";\nimport { coreDefaults } from \"../core/defaults.js\";\n\nconst w3cLogo = {\n  src: \"https://www.w3.org/StyleSheets/TR/2021/logos/W3C\",\n  alt: \"W3C\",\n  height: 48,\n  width: 72,\n  url: \"https://www.w3.org/\",\n};\n\nconst memSubmissionLogo = {\n  alt: \"W3C Member Submission\",\n  href: \"https://www.w3.org/Submission/\",\n  src: \"https://www.w3.org/Icons/member_subm-v.svg\",\n  width: \"211\",\n  height: \"48\",\n};\n\nconst w3cDefaults = {\n  lint: {\n    \"privsec-section\": false,\n    \"required-sections\": true,\n    \"wpt-tests-exist\": false,\n    \"informative-dfn\": \"warn\",\n    \"no-unused-dfns\": \"warn\",\n    a11y: false,\n  },\n  doJsonLd: false,\n  logos: [],\n  xref: true,\n  wgId: \"\",\n  otherLinks: [],\n  excludeGithubLinks: true,\n  subtitle: \"\",\n  prevVersion: \"\",\n  formerEditors: [],\n  editors: [],\n  authors: [],\n};\n\nexport function run(conf) {\n  // assign the defaults\n  const lint =\n    conf.lint === false\n      ? false\n      : {\n          ...coreDefaults.lint,\n          ...w3cDefaults.lint,\n          ...conf.lint,\n        };\n\n  Object.assign(conf, {\n    ...coreDefaults,\n    ...w3cDefaults,\n    ...conf,\n    lint,\n  });\n\n  if (conf.specStatus !== \"unofficial\" && !conf.hasOwnProperty(\"license\")) {\n    conf.license = \"w3c-software-doc\";\n  }\n\n  validateStatusForGroup(conf);\n  processLogos(conf);\n}\n\nfunction processLogos(conf) {\n  // Primarily include the W3C logo and license for W3C Recommendation track\n  // that have an actual working group.\n  const { specStatus, wg } = conf;\n  const isWgStatus = [\n    ...recTrackStatus,\n    ...registryTrackStatus,\n    ...W3CNotes,\n    ...tagStatus,\n    \"ED\",\n  ].includes(specStatus);\n  const inWorkingGroup = wg && wg.length && isWgStatus;\n  // Member submissions don't need to be in a Working Group.\n  const doesNotNeedWG = [\"Member-SUBM\"].includes(specStatus);\n  const canShowW3CLogo = inWorkingGroup || doesNotNeedWG;\n  if (canShowW3CLogo) {\n    conf.logos.unshift(w3cLogo);\n    if (specStatus === \"Member-SUBM\") {\n      conf.logos.push(memSubmissionLogo);\n    }\n  }\n}\n\nfunction validateStatusForGroup(conf) {\n  const { specStatus, groupType, group } = conf;\n\n  if (!specStatus) {\n    const msg = docLink`The ${\"[specStatus]\"} configuration option is required.`;\n    const hint = docLink`Select an appropriate status from ${\"[specStatus]\"} based on your W3C group. If in doubt, use \\`\"unofficial\"\\`.`;\n    showError(msg, name, { hint });\n    conf.specStatus = \"base\";\n    return;\n  }\n\n  if (status2text[specStatus] === undefined) {\n    const msg = docLink`The ${\"[specStatus]\"} \"\\`${specStatus}\\`\" is not supported at for this type of document.`;\n    const choices = codedJoinOr(Object.keys(status2text), { quotes: true });\n    const hint = docLink`set ${\"[specStatus]\"} to one of: ${choices}.`;\n    showError(msg, name, { hint });\n    conf.specStatus = \"base\";\n    return;\n  }\n\n  switch (groupType) {\n    case \"cg\": {\n      if (![...cgStatus, \"unofficial\", \"UD\"].includes(specStatus)) {\n        const msg = docLink`W3C Community Group documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const supportedStatus = codedJoinOr(cgStatus, { quotes: true });\n        const hint = `Please use one of: ${supportedStatus}. Automatically falling back to \\`\"CG-DRAFT\"\\`.`;\n        showError(msg, name, { hint });\n        conf.specStatus = \"CG-DRAFT\";\n      }\n      break;\n    }\n    case \"bg\": {\n      if (![...bgStatus, \"unofficial\", \"UD\"].includes(specStatus)) {\n        const msg = docLink`W3C Business Group documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const supportedStatus = codedJoinOr(bgStatus, { quotes: true });\n        const hint = `Please use one of: ${supportedStatus}. Automatically falling back to \\`\"BG-DRAFT\"\\`.`;\n        showError(msg, name, { hint });\n        conf.specStatus = \"BG-DRAFT\";\n      }\n      break;\n    }\n    case \"wg\": {\n      if (![...trStatus, \"unofficial\", \"UD\", \"ED\"].includes(specStatus)) {\n        const msg = docLink`W3C Working Group documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const hint = docLink`Pleas see ${\"[specStatus]\"} for appropriate status for W3C Working Group documents.`;\n        showError(msg, name, { hint });\n      }\n      break;\n    }\n    case \"other\":\n      if (\n        group === \"tag\" &&\n        ![\"ED\", ...trStatus, ...tagStatus].includes(specStatus)\n      ) {\n        const msg = docLink`The W3C Technical Architecture Group's documents can't use \\`\"${specStatus}\"\\` for the ${\"[specStatus]\"} configuration option.`;\n        const supportedStatus = codedJoinOr([\"ED\", ...trStatus, ...tagStatus], {\n          quotes: true,\n        });\n        const hint = `Please use one of: ${supportedStatus}. Automatically falling back to \\`\"unofficial\"\\`.`;\n        showError(msg, name, { hint });\n        conf.specStatus = \"unofficial\";\n      }\n      break;\n    default:\n      if (\n        !conf.wgId &&\n        ![\"unofficial\", \"base\", \"UD\", \"Member-SUBM\"].includes(conf.specStatus)\n      ) {\n        const msg =\n          \"Document is not associated with a [W3C group](https://respec.org/w3c/groups/). Defaulting to 'base' status.\";\n        const hint = docLink`Use the ${\"[group]\"} configuration option to associated this document with a W3C group.`;\n        conf.specStatus = \"base\";\n        showError(msg, name, { hint });\n      }\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","// @ts-check\n/**\n * Module w3c/style\n * Inserts a link to the appropriate W3C style for the specification's maturity level.\n * */\n\nimport { W3CNotes, recTrackStatus, registryTrackStatus } from \"./headers.js\";\nimport { createResourceHint } from \"../core/utils.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { sub } from \"../core/pubsubhub.js\";\n\nexport const name = \"w3c/style\";\n\nfunction attachFixupScript() {\n  const script = document.createElement(\"script\");\n  script.src = \"https://www.w3.org/scripts/TR/2021/fixup.js\";\n  if (location.hash) {\n    script.addEventListener(\n      \"load\",\n      () => {\n        window.location.href = location.hash;\n      },\n      { once: true }\n    );\n  }\n  document.body.appendChild(script);\n}\n\n// Creates a collection of resource hints to improve the loading performance\n// of the W3C resources.\nfunction createResourceHints() {\n  /** @type {ResourceHintOption[]}  */\n  const opts = [\n    {\n      hint: \"preconnect\", // for W3C styles and scripts.\n      href: \"https://www.w3.org\",\n    },\n    {\n      hint: \"preload\", // all specs need it, and we attach it on end-all.\n      href: \"https://www.w3.org/scripts/TR/2021/fixup.js\",\n      as: \"script\",\n    },\n    {\n      hint: \"preload\", // all specs include on base.css.\n      href: getStyleUrl(\"base.css\").href,\n      as: \"style\",\n    },\n    {\n      hint: \"preload\",\n      href: getStyleUrl(\"dark.css\").href,\n      as: \"style\",\n    },\n    {\n      hint: \"preload\", // all specs show the logo.\n      href: \"https://www.w3.org/StyleSheets/TR/2021/logos/W3C\",\n      as: \"image\",\n      corsMode: \"anonymous\",\n    },\n  ];\n  const resourceHints = document.createDocumentFragment();\n  for (const link of opts.map(createResourceHint)) {\n    resourceHints.appendChild(link);\n  }\n  return resourceHints;\n}\n\n// Collect elements for insertion (document fragment)\nconst elements = createResourceHints();\n\n// Opportunistically apply base style\nelements.appendChild(\n  html`<link\n    rel=\"stylesheet\"\n    href=\"https://www.w3.org/StyleSheets/TR/2021/base.css\"\n    class=\"removeOnSave\"\n  />`\n);\nif (!document.head.querySelector(\"meta[name=viewport]\")) {\n  // Make meta viewport the first element in the head.\n  elements.prepend(\n    html`<meta\n      name=\"viewport\"\n      content=\"width=device-width, initial-scale=1, shrink-to-fit=no\"\n    />`\n  );\n}\n\ndocument.head.prepend(elements);\n\n/**\n * @param {URL|string} linkURL\n * @returns {(exportDoc: Document) => void}\n */\nfunction styleMover(linkURL) {\n  return exportDoc => {\n    const w3cStyle = exportDoc.querySelector(`head link[href=\"${linkURL}\"]`);\n    exportDoc.querySelector(\"head\").append(w3cStyle);\n  };\n}\n\n/**\n * @param {Conf} conf\n */\nexport function run(conf) {\n  // Attach W3C fixup script after we are done.\n  if (!conf.noToc) {\n    sub(\"end-all\", attachFixupScript, { once: true });\n  }\n\n  const finalStyleURL = getStyleUrl(getStyleFile(conf));\n  document.head.appendChild(\n    html`<link rel=\"stylesheet\" href=\"${finalStyleURL.href}\" />`\n  );\n  // Make sure the W3C stylesheet is the last stylesheet, as required by W3C Pub Rules.\n  sub(\"beforesave\", styleMover(finalStyleURL));\n\n  // Add color scheme meta tag and style\n  /** @type HTMLMetaElement */\n  let colorScheme = document.querySelector(\"head meta[name=color-scheme]\");\n  if (!colorScheme) {\n    // Default to light mode during transitional period.\n    colorScheme = html`<meta name=\"color-scheme\" content=\"light\" />`;\n    document.head.appendChild(colorScheme);\n  }\n  if (colorScheme.content.includes(\"dark\")) {\n    const darkModeStyleUrl = getStyleUrl(\"dark.css\");\n    document.head.appendChild(\n      html`<link\n        rel=\"stylesheet\"\n        href=\"${darkModeStyleUrl.href}\"\n        media=\"(prefers-color-scheme: dark)\"\n      />`\n    );\n    // As required by W3C Pub Rules.\n    sub(\"beforesave\", styleMover(darkModeStyleUrl));\n  }\n}\n\n/** @param {Conf} conf */\nfunction getStyleFile(conf) {\n  const canonicalStatus = conf.specStatus?.toUpperCase() ?? \"\";\n  let styleFile = \"\";\n  const canUseW3CStyle =\n    [\n      ...recTrackStatus,\n      ...registryTrackStatus,\n      ...W3CNotes,\n      \"ED\",\n      \"MEMBER-SUBM\",\n    ].includes(canonicalStatus) && conf.wgId;\n\n  // Figure out which style file to use.\n  switch (canonicalStatus) {\n    case \"WD\":\n    case \"FPWD\":\n      styleFile = canUseW3CStyle ? \"W3C-WD\" : \"base.css\";\n      break;\n    case \"CG-DRAFT\":\n    case \"CG-FINAL\":\n    case \"BG-DRAFT\":\n    case \"BG-FINAL\":\n      styleFile = canonicalStatus.toLowerCase();\n      break;\n    case \"UD\":\n    case \"UNOFFICIAL\":\n      styleFile = \"W3C-UD\";\n      break;\n    case \"FINDING\":\n    case \"DRAFT-FINDING\":\n    case \"EDITOR-DRAFT-FINDING\":\n    case \"BASE\":\n      styleFile = \"base.css\";\n      break;\n    case \"MEMBER-SUBM\":\n      styleFile = \"W3C-Member-SUBM\";\n      break;\n    default:\n      styleFile = canUseW3CStyle ? `W3C-${conf.specStatus}` : \"base.css\";\n  }\n\n  return styleFile;\n}\n\nfunction getStyleUrl(styleFile = \"base.css\") {\n  return new URL(`/StyleSheets/TR/2021/${styleFile}`, \"https://www.w3.org/\");\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","/**\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","// @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","/**\n * This module handles the creation of the h1#title of a spec and\n * makes sure the <title> always matches the h1.\n *\n * If no h1#title is included, then the <title> becomes the h1#title.\n *\n * When a h1#title is included, it always takes precedence over the\n * <title> of a spec. An error will be displayed in case of\n * any mismatch.\n *\n */\n\nimport { getIntlData, norm, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/title\";\n\nconst localizationStrings = {\n  en: {\n    default_title: \"No Title\",\n  },\n  de: {\n    default_title: \"Kein Titel\",\n  },\n  zh: {\n    default_title: \"无标题\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  /** @type {HTMLElement} */\n  const h1Elem =\n    document.querySelector(\"h1#title\") || html`<h1 id=\"title\"></h1>`;\n\n  // check existing element is ok to use\n  if (h1Elem.isConnected && h1Elem.textContent.trim() === \"\") {\n    const msg =\n      \"The document is missing a title, so using a default title. \" +\n      \"To fix this, please give your document a `<title>`. \" +\n      \"If you need special markup in the document's title, \" +\n      'please use a `<h1 id=\"title\">`.';\n    const title = \"Document is missing a title\";\n    showError(msg, name, { title, elements: [h1Elem] });\n  }\n\n  // Decorate the spec title\n  if (!h1Elem.id) h1Elem.id = \"title\";\n  h1Elem.classList.add(\"title\");\n\n  setDocumentTitle(conf, h1Elem);\n\n  // This will get relocated by a template later.\n  document.body.prepend(h1Elem);\n}\n\nfunction setDocumentTitle(conf, h1Elem) {\n  // If the h1 is newly created, it won't be connected. In this case\n  // we use the <title> or a localized fallback.\n  if (!h1Elem.isConnected) {\n    h1Elem.textContent = document.title || `${l10n.default_title}`;\n  }\n  // We replace \":<br>\" with \":\", and \"<br>\" with \"-\", as appropriate.\n  const tempElem = document.createElement(\"h1\");\n  tempElem.innerHTML = h1Elem.innerHTML\n    .replace(/:<br>/g, \": \")\n    .replace(/<br>/g, \" - \");\n  let documentTitle = norm(tempElem.textContent);\n\n  if (conf.isPreview && conf.prNumber) {\n    const prUrl = conf.prUrl || `${conf.github.repoURL}pull/${conf.prNumber}`;\n    const { childNodes } = html`\n      Preview of PR <a href=\"${prUrl}\">#${conf.prNumber}</a>:\n    `;\n    h1Elem.prepend(...childNodes);\n    documentTitle = `Preview of PR #${conf.prNumber}: ${documentTitle}`;\n  }\n\n  document.title = documentTitle;\n\n  // conf.title is deperecated - we are keeping this here just to\n  // retain backwards compat as we think the ePub generator\n  // relies on it.\n  conf.title = documentTitle;\n}\n","/**\n * This module updates the title and shortName\n * of a spec when there is a valid level configuration.\n *\n * Levels should be integers >= 0.\n *\n * @module w3c/level\n */\n\nimport { getIntlData, showError } from \"../core/utils.js\";\nexport const name = \"w3c/level\";\n/** @type {LocalizationStrings} */\nconst localizationStrings = {\n  en: {\n    level: \"Level\",\n  },\n  ja: {\n    level: \"レベル\",\n  },\n  nl: {\n    level: \"Niveau\",\n  },\n  de: {\n    level: \"Stufe\",\n  },\n  zh: {\n    level: \"级别\",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Updates the title and shortName of a spec based on the level configuration.\n *\n * @param {Conf} conf - The configuration object.\n */\nexport function run(conf) {\n  if (!conf.hasOwnProperty(\"level\")) return;\n\n  const h1Elem = document.querySelector(\"h1#title\");\n\n  const level = parseInt(conf.level);\n  if (!Number.isInteger(level) || level < 0) {\n    const msg = `The \\`level\\` configuration option must be a number greater or equal to 0. It is currently set to \\`${level}\\``;\n    const title = \"Invalid level config.\";\n    showError(msg, name, { title, elements: [h1Elem] });\n    return;\n  }\n\n  h1Elem.append(` ${l10n.level} ${level}`);\n  document.title = `${document.title} ${l10n.level} ${level}`;\n  conf.shortName = `${conf.shortName}-${level}`;\n  conf.level = level;\n}\n","/**\n * Module w3c/abstract\n *\n * This module handles the abstract section properly by adding necessary elements and\n * performing validations.\n *\n * @module w3c/abstract\n */\n\nimport { getIntlData, norm, renameElement, showError } from \"../core/utils.js\";\nimport { lang as docLang } from \"../core/l10n.js\";\nimport { html } from \"../core/import-maps.js\";\n\nexport const name = \"w3c/abstract\";\n\n/** @type {LocalizationStrings} */\nconst localizationStrings = {\n  en: { abstract: \"Abstract\" },\n  ko: { abstract: \"요약\" },\n  zh: { abstract: \"摘要\" },\n  ja: { abstract: \"要約\" },\n  nl: { abstract: \"Samenvatting\" },\n  es: { abstract: \"Resumen\" },\n  de: { abstract: \"Zusammenfassung\" },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * Handles the abstract section of the document.\n */\nexport async function run() {\n  const abstract = findAbstract();\n  if (!abstract) {\n    showError('Document must have one `<section id=\"abstract\">`.', name);\n    return;\n  }\n\n  abstract.classList.add(\"introductory\");\n  abstract.id = \"abstract\";\n  if (!abstract.querySelector(\"h2\")) {\n    abstract.prepend(html`<h2>${l10n.abstract}</h2>`);\n  }\n}\n\n/**\n * Finds the abstract section in the document.\n *\n * @returns {HTMLElement | null} The abstract section element.\n */\nfunction findAbstract() {\n  const abstract = document.getElementById(\"abstract\");\n  if (abstract) {\n    switch (abstract.localName) {\n      case \"section\":\n        return abstract;\n      case \"div\":\n        return renameElement(abstract, \"section\");\n      default:\n        showError(\"The abstract should be a `<section>` element.\", name, {\n          elements: [abstract],\n        });\n        return abstract;\n    }\n  }\n\n  const searchString = l10n.abstract.toLocaleLowerCase(docLang);\n  for (const header of document.querySelectorAll(\"h2, h3, h4, h5, h6\")) {\n    if (norm(header.textContent).toLocaleLowerCase(docLang) === searchString) {\n      return header.closest(\"section\");\n    }\n  }\n\n  return abstract;\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// 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 or a `a`, 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,a\");\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 w3c/conformance\n// Handle the conformance section properly.\nimport { getIntlData, htmlJoinAnd, 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\";\nexport const name = \"w3c/conformance\";\n\nconst localizationStrings = {\n  en: {\n    conformance: \"Conformance\",\n    normativity:\n      \"As well as sections marked as non-normative, all authoring guidelines, \" +\n      \"diagrams, examples, and notes in this specification are non-normative. \" +\n      \"Everything else in this specification is normative.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        The key word${plural ? \"s\" : \"\"} ${keywords} in this document\n        ${plural ? \"are\" : \"is\"} to be interpreted as described in\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        when, and only when, they appear in all capitals, as shown here.\n      </p>`;\n    },\n  },\n  de: {\n    conformance: \"Anforderungen\",\n    normativity:\n      \"Neben den explizit als nicht-normativ gekennzeichneten Abschnitten \" +\n      \"sind auch alle Diagramme, Beispiele und Hinweise in diesem Dokument \" +\n      \"nicht normativ. Alle anderen Angaben sind normativ.\",\n    keywordInterpretation(keywords, plural) {\n      return html`<p>\n        ${plural ? \"Die Schlüsselwörter\" : \"Das Schlüsselwort\"} ${keywords} in\n        diesem Dokument ${plural ? \"sind\" : \"ist\"} gemäß\n        <a href=\"https://datatracker.ietf.org/doc/html/bcp14\">BCP 14</a>\n        ${renderInlineCitation(\"RFC2119\")} ${renderInlineCitation(\"RFC8174\")}\n        und unter Berücksichtigung von\n        <a href=\"https://github.com/adfinis-sygroup/2119/blob/master/2119de.rst\"\n          >2119de</a\n        >\n        zu interpretieren, wenn und nur wenn ${plural ? \"sie\" : \"es\"} wie hier\n        gezeigt durchgehend groß geschrieben wurde${plural ? \"n\" : \"\"}.\n      </p>`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\n/**\n * @param {Element} conformance\n * @param {*} conf\n */\nfunction processConformance(conformance, conf) {\n  const terms = [...Object.keys(rfc2119Usage)];\n  // Add RFC2119 to bibliography\n  if (terms.length) {\n    conf.normativeReferences.add(\"RFC2119\");\n    conf.normativeReferences.add(\"RFC8174\");\n  }\n  // Put in the 2119 clause and reference\n  const keywords = htmlJoinAnd(\n    terms.sort(),\n    item => html`<em class=\"rfc2119\">${item}</em>`\n  );\n  const plural = terms.length > 1;\n  const content = html`\n    <h1>${l10n.conformance}</h1>\n    <p>${l10n.normativity}</p>\n    ${terms.length ? l10n.keywordInterpretation(keywords, plural) : null}\n  `;\n  conformance.prepend(...content.childNodes);\n}\n\nexport function run(conf) {\n  const conformance = document.querySelector(\"section#conformance\");\n  if (conformance && !conformance.classList.contains(\"override\")) {\n    processConformance(conformance, conf);\n  }\n  // Warn when there are RFC2119/RFC8174 keywords, but not conformance section\n  if (!conformance && Object.keys(rfc2119Usage).length) {\n    const msg = `Document uses RFC2119 keywords but lacks a conformance section.`;\n    const hint = 'Please add a `<section id=\"conformance\">`.';\n    showWarning(msg, name, { hint });\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\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// Module core/tables\n// Handles tables in the document.\n// Generates a List of Tables wherever there is a #list-of-tables element.\n\nimport {\n  addId,\n  getIntlData,\n  getPreviousSections,\n  renameElement,\n  wrapInner,\n} from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/tables\";\n\nconst localizationStrings = {\n  en: {\n    list_of_tables: \"List of Tables\",\n    table: \"Table \",\n  },\n};\n\nconst l10n = getIntlData(localizationStrings);\n\nexport function run() {\n  const listOfTables = collectTables();\n  const listOfTablesElement = document.querySelector(\"section#list-of-tables\");\n  if (listOfTables.length && listOfTablesElement) {\n    decorateListOfTables(listOfTablesElement);\n    listOfTablesElement.append(\n      html`<h1>${l10n.list_of_tables}</h1>`,\n      html`<ul class=\"list-of-tables\">\n        ${listOfTables}\n      </ul>`\n    );\n  }\n}\n\n/**\n * process all tables\n */\nfunction collectTables() {\n  /** @type {HTMLLIElement[]} */\n  const listOfTables = [];\n  /** @type {NodeListOf<HTMLTableElement>} */\n  const tables = document.querySelectorAll(\"table.numbered\");\n  [...tables]\n    // there is a separate linter rule to catch numbered tables without captions\n    .filter(table => !!table.querySelector(\"caption\"))\n    .forEach((table, i) => {\n      const caption = table.querySelector(\"caption\");\n      decorateTable(table, caption, i);\n      listOfTables.push(getListOfTablesListItem(table.id, caption));\n    });\n  return listOfTables;\n}\n\n/**\n * @param {HTMLTableElement} table\n * @param {HTMLTableCaptionElement} caption\n * @param {number} i\n */\nfunction decorateTable(table, caption, i) {\n  const title = caption.textContent;\n  addId(table, \"table\", title);\n  // set proper caption title\n  wrapInner(caption, html`<span class=\"table-title\"></span>`);\n  caption.prepend(\n    html`<a class=\"self-link\" href=\"#${table.id}\"\n      >${l10n.table}<bdi class=\"tableno\">${i + 1}</bdi></a\n    >`,\n    \" \"\n  );\n}\n\n/**\n * @param {string} tableId\n * @param {HTMLTableCaptionElement} caption\n * @return {HTMLLIElement}\n */\nfunction getListOfTablesListItem(tableId, caption) {\n  const listOfTablesCaption = caption.cloneNode(true);\n  for (const anchor of listOfTablesCaption.querySelectorAll(\"a\")) {\n    renameElement(anchor, \"span\", { copyAttributes: false });\n  }\n  return html`<li>\n    <a class=\"tocxref\" href=\"${`#${tableId}`}\"\n      >${listOfTablesCaption.childNodes}</a\n    >\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} listOfTablesElement\n */\nfunction decorateListOfTables(listOfTablesElement) {\n  if (\n    listOfTablesElement.matches(\".appendix, .introductory\") ||\n    listOfTablesElement.closest(\"section\")\n  ) {\n    return;\n  }\n\n  const previousSections = getPreviousSections(listOfTablesElement);\n  if (previousSections.every(sec => sec.classList.contains(\"introductory\"))) {\n    listOfTablesElement.classList.add(\"introductory\");\n  } else if (previousSections.some(sec => sec.classList.contains(\"appendix\"))) {\n    listOfTablesElement.classList.add(\"appendix\");\n  }\n}\n","// @ts-check\nimport { definitionMap, registerDefinition } from \"./dfn-map.js\";\nimport { showError, wrapInner } from \"./utils.js\";\n\nconst topLevelEntities = new Set([\n  \"callback interface\",\n  \"callback\",\n  \"dictionary\",\n  \"enum\",\n  \"interface mixin\",\n  \"interface\",\n  \"typedef\",\n]);\n\n/**\n * This function looks for a <dfn> element whose title is 'name' and\n * that is \"for\" 'parent', which is the empty string when 'name'\n * refers to a top-level entity. For top-level entities, <dfn>\n * elements that inherit a non-empty [dfn-for] attribute are also\n * counted as matching.\n *\n * When a matching <dfn> is found, it's given <code> formatting,\n * marked as an IDL definition, and returned. If no <dfn> is found,\n * the function returns 'undefined'.\n * @param {*} defn\n * @param {string} name\n */\nexport function findDfn(defn, name, { parent = \"\" } = {}) {\n  switch (defn.type) {\n    case \"constructor\":\n    case \"operation\":\n      return findOperationDfn(defn, parent, name);\n    default:\n      return findNormalDfn(defn, parent, name);\n  }\n}\n\n/**\n * @param {{ type: string, arguments: any[] }} idlAst\n * @param {string} parent\n * @param {string} name\n */\nfunction getAlternativeNames(idlAst, parent, name) {\n  const { type } = idlAst;\n  const asQualifiedName = `${parent}.${name}`;\n  switch (type) {\n    case \"constructor\":\n    case \"operation\": {\n      // Allow linking to \"method()\", method(arg) and \"method\" name.\n      const asMethodName = `${name}()`;\n      const asFullyQualifiedName = `${asQualifiedName}()`;\n      const asMethodWithArgs = generateMethodNamesWithArgs(\n        name,\n        idlAst.arguments\n      );\n      return {\n        local: [asQualifiedName, asFullyQualifiedName, name],\n        exportable: [asMethodName, ...asMethodWithArgs],\n      };\n    }\n    case \"attribute\":\n      return {\n        local: [asQualifiedName],\n        exportable: [name],\n      };\n  }\n}\n\n/**\n * Generates all possible permutations of a method name based\n * on what arguments they method accepts.\n\n * Required arguments are always present, and optional ones\n * are stacked one by one.\n *\n * For examples: foo(req1, req2), foo(req1, req2, opt1) and so on.\n *\n * @param {String} operationName\n * @param {*} argsAst\n */\nfunction generateMethodNamesWithArgs(operationName, argsAst) {\n  const operationNames = [];\n  if (argsAst.length === 0) {\n    return operationNames;\n  }\n  const required = []; // required arguments\n  const optional = []; // optional arguments, including variadic ones\n  for (const { name, optional: isOptional, variadic } of argsAst) {\n    if (isOptional || variadic) {\n      optional.push(name);\n    } else {\n      required.push(name);\n    }\n  }\n  const requiredArgs = required.join(\", \");\n  const requiredOperation = `${operationName}(${requiredArgs})`;\n  operationNames.push(requiredOperation);\n  const optionalOps = optional.map((_, index) => {\n    const args = [...required, ...optional.slice(0, index + 1)].join(\", \");\n    const result = `${operationName}(${args})`;\n    return result;\n  });\n  operationNames.push(...optionalOps);\n  return operationNames;\n}\n\n/**\n * @param {*} defn\n * @param {string} parent\n * @param {string} name\n */\nfunction findOperationDfn(defn, parent, name) {\n  // Overloads all have unique names\n  if (name.includes(\"!overload\")) {\n    return findNormalDfn(defn, parent, name);\n  }\n  const asMethodName = `${name}()`;\n  return findNormalDfn(defn, parent, asMethodName, name);\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {Record<\"local\" | \"exportable\", string[]>} names\n */\nfunction addAlternativeNames(dfn, names) {\n  const { local, exportable } = names;\n  const lt = dfn.dataset.lt ? new Set(dfn.dataset.lt.split(\"|\")) : new Set();\n  for (const item of exportable) {\n    lt.add(item);\n  }\n  // Fix any ill-placed ones - local ones don't belong here\n  local.filter(item => lt.has(item)).forEach(item => lt.delete(item));\n  dfn.dataset.lt = [...lt].join(\"|\");\n  dfn.dataset.localLt = local.join(\"|\");\n  registerDefinition(dfn, [...local, ...exportable]);\n}\n\n/**\n * @param {*} defn\n * @param {string} parent\n * @param {...string} names\n */\nfunction findNormalDfn(defn, parent, ...names) {\n  const { type } = defn;\n  for (const name of names) {\n    let resolvedName =\n      type === \"enum-value\" && name === \"\" ? \"the-empty-string\" : name;\n    let dfns = getDfns(resolvedName, parent, name, type);\n    // If we haven't found any definitions with explicit [for]\n    // and [title], look for a dotted definition, \"parent.name\".\n    if (dfns.length === 0 && parent !== \"\") {\n      resolvedName = `${parent}.${resolvedName}`;\n      const alternativeDfns = definitionMap.get(resolvedName);\n      if (alternativeDfns && alternativeDfns.size === 1) {\n        dfns = [...alternativeDfns];\n        registerDefinition(dfns[0], [resolvedName]);\n      }\n    } else {\n      resolvedName = name;\n    }\n    if (dfns.length > 1) {\n      const msg = `WebIDL identifier \\`${name}\\` ${\n        parent ? `for \\`${parent}\\`` : \"\"\n      } is defined multiple times`;\n      const title = \"Duplicate definition.\";\n      showError(msg, name, { title, elements: dfns });\n    }\n    if (dfns.length) {\n      return dfns[0];\n    }\n  }\n}\n\n/**\n * @param {HTMLElement} dfnElem\n * @param {*} idlAst\n * @param {string} parent\n * @param {string} name\n */\nexport function decorateDfn(dfnElem, idlAst, parent, name) {\n  if (!dfnElem.id) {\n    const lCaseParent = parent.toLowerCase();\n    const middle = lCaseParent ? `${lCaseParent}-` : \"\";\n    let last = name.toLowerCase().replace(/[()]/g, \"\").replace(/\\s/g, \"-\");\n    if (last === \"\") {\n      last = \"the-empty-string\";\n      dfnElem.setAttribute(\"aria-label\", \"the empty string\");\n    }\n    dfnElem.id = `dom-${middle}${last}`;\n  }\n  dfnElem.dataset.idl = idlAst.type;\n  dfnElem.dataset.title = dfnElem.textContent;\n  dfnElem.dataset.dfnFor = parent;\n  // Derive the data-type for dictionary members, interface attributes,\n  // and methods\n  switch (idlAst.type) {\n    case \"operation\":\n    case \"attribute\":\n    case \"field\":\n      dfnElem.dataset.type = getDataType(idlAst);\n      break;\n  }\n\n  // Mark the definition as code.\n  if (\n    !dfnElem.querySelector(\"code\") &&\n    !dfnElem.closest(\"code\") &&\n    dfnElem.children\n  ) {\n    wrapInner(dfnElem, dfnElem.ownerDocument.createElement(\"code\"));\n  }\n\n  // Add data-lt and data-local-lt values and register them\n  switch (idlAst.type) {\n    case \"attribute\":\n    case \"constructor\":\n    case \"operation\":\n      addAlternativeNames(dfnElem, getAlternativeNames(idlAst, parent, name));\n      break;\n  }\n\n  return dfnElem;\n}\n\n/**\n * @param {string} name\n * @param {string} parent data-dfn-for\n * @param {string} originalName\n * @param {string} type\n */\nfunction getDfns(name, parent, originalName, type) {\n  const foundDfns = definitionMap.get(name);\n  if (!foundDfns || foundDfns.size === 0) {\n    return [];\n  }\n  const dfnForArray = [...foundDfns];\n  // Definitions that have a name and [data-dfn-for] that exactly match the\n  // IDL entity:\n  const dfns = dfnForArray.filter(dfn => {\n    // This is explicitly marked as a concept, so we can't use it\n    if (dfn.dataset.dfnType === \"dfn\") return false;\n\n    /** @type {HTMLElement} */\n    const closestDfnFor = dfn.closest(`[data-dfn-for]`);\n    return closestDfnFor && closestDfnFor.dataset.dfnFor === parent;\n  });\n\n  if (dfns.length === 0 && parent === \"\" && dfnForArray.length === 1) {\n    // Make sure the name exactly matches\n    return dfnForArray[0].textContent === originalName ? dfnForArray : [];\n  } else if (topLevelEntities.has(type) && dfnForArray.length) {\n    const dfn = dfnForArray.find(\n      dfn => dfn.textContent.trim() === originalName\n    );\n    if (dfn) return [dfn];\n  }\n  return dfns;\n}\n\n/**\n * @return {string}\n */\nfunction getDataType(idlStruct = {}) {\n  const { idlType, generic, union } = idlStruct;\n  if (idlType === undefined) return \"\";\n  if (typeof idlType === \"string\") return idlType;\n  if (generic) return generic;\n  // join on \"|\" handles for \"unsigned short\" etc.\n  if (union) return idlType.map(getDataType).join(\"|\");\n  return getDataType(idlType);\n}\n","// @ts-check\n/**\n * Module core/webidl-clipboard\n *\n * This module adds a button to each IDL pre making it possible to copy\n * well-formatted IDL to the clipboard.\n *\n */\nexport const name = \"core/webidl-clipboard\";\n\nfunction createButton() {\n  const copyButton = document.createElement(\"button\");\n  copyButton.innerHTML =\n    '<svg height=\"16\" viewBox=\"0 0 14 16\" width=\"14\"><path fill-rule=\"evenodd\" d=\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"/></svg>';\n  copyButton.title = \"Copy IDL to clipboard\";\n  copyButton.classList.add(\"respec-button-copy-paste\", \"removeOnSave\");\n  return copyButton;\n}\n\nconst copyButton = createButton();\n\n/**\n * Adds a HTML button that copies WebIDL to the clipboard.\n *\n * @param {HTMLSpanElement} idlHeader\n */\nexport function addCopyIDLButton(idlHeader) {\n  // There may be multiple <span>s of IDL, so we take everything\n  // apart from the idl header.\n  const pre = idlHeader.closest(\"pre.idl\");\n  const idl = pre.cloneNode(true);\n  idl.querySelector(\".idlHeader\").remove();\n  const { textContent: idlText } = idl;\n  const button = copyButton.cloneNode(true);\n  button.addEventListener(\"click\", () => {\n    navigator.clipboard.writeText(idlText);\n  });\n  idlHeader.append(button);\n}\n","/* --- WEB IDL --- */\nconst css = String.raw;\n\n// Prettier ignore only to keep code indented from level 0.\n// prettier-ignore\nexport default css`\npre.idl {\n  padding: 1em;\n  position: relative;\n}\n\npre.idl > code {\n  color: black;\n  color: var(--text, black);\n}\n\n@media print {\n  pre.idl {\n    white-space: pre-wrap;\n  }\n}\n\n.idlHeader {\n  display: block;\n  width: 150px;\n  background: #8ccbf2;\n  background: var(--def-border, #8ccbf2);\n  color: #fff;\n  /* TODO: need a better color here */\n  color: var(--defrow-border, #fff);\n  font-family: sans-serif;\n  font-weight: bold;\n  margin: -1em 0 1em -1em;\n  height: 28px;\n  line-height: 28px;\n}\n\n.idlHeader a.self-link {\n  margin-left: 0.3cm;\n  text-decoration: none;\n  border-bottom: none;\n  color: inherit;\n}\n\n.idlID {\n  font-weight: bold;\n  color: #005a9c;\n}\n\n.idlType {\n  color: #005a9c;\n}\n\n.idlName {\n  color: #ff4500;\n}\n\n.idlName a {\n  color: #ff4500;\n  border-bottom: 1px dotted #ff4500;\n  text-decoration: none;\n}\n\na.idlEnumItem {\n  color: #000;\n  border-bottom: 1px dotted #ccc;\n  text-decoration: none;\n}\n\n.idlSuperclass {\n  font-style: italic;\n  color: #005a9c;\n}\n\n/*.idlParam*/\n\n.idlParamName,\n.idlDefaultValue {\n  font-style: italic;\n}\n\n.extAttr {\n  color: #666;\n}\n\n/*.idlSectionComment*/\n\n.idlSectionComment {\n  color: gray;\n}\n\n.idlIncludes a {\n  font-weight: bold;\n}\n\n.respec-button-copy-paste:focus {\n  text-decoration: none;\n  border-color: #51a7e8;\n  outline: none;\n  box-shadow: 0 0 5px rgba(81, 167, 232, 0.5);\n}\n\n.respec-button-copy-paste:is(:focus:hover,.selected:focus) {\n  border-color: #51a7e8;\n}\n\n.respec-button-copy-paste:is(:hover,:active,.zeroclipboard-is-hover,.zeroclipboard-is-active) {\n  text-decoration: none;\n  background-color: #ddd;\n  background-image: linear-gradient(#eee, #ddd);\n  border-color: #ccc;\n}\n\n.respec-button-copy-paste:is(:active,.selected,.zeroclipboard-is-active) {\n  background-color: #dcdcdc;\n  background-image: none;\n  border-color: #b5b5b5;\n  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);\n}\n\n.respec-button-copy-paste.selected:hover {\n  background-color: #cfcfcf;\n}\n\n.respec-button-copy-paste:is(:disabled,:disabled:hover,.disabled,.disabled:hover) {\n  color: rgba(102, 102, 102, 0.5);\n  cursor: default;\n  background-color: rgba(229, 229, 229, 0.5);\n  background-image: none;\n  border-color: rgba(197, 197, 197, 0.5);\n  box-shadow: none;\n}\n\n@media print {\n  .respec-button-copy-paste {\n    visibility: hidden;\n  }\n}\n`;\n","// Module core/webidl\n//  Highlights and links WebIDL marked up inside <pre class=\"idl\">.\n\n// TODO:\n//  - It could be useful to report parsed IDL items as events\n//  - don't use generated content in the CSS!\nimport {\n  addHashId,\n  docLink,\n  showError,\n  showWarning,\n  wrapInner,\n  xmlEscape,\n} from \"./utils.js\";\nimport { decorateDfn, findDfn } from \"./dfn-finder.js\";\nimport { html, webidl2 } from \"./import-maps.js\";\nimport { addCopyIDLButton } from \"./webidl-clipboard.js\";\nimport css from \"../styles/webidl.css.js\";\nimport { registerDefinition } from \"./dfn-map.js\";\n\nexport const name = \"core/webidl\";\nconst pluginName = name;\n\nconst operationNames = {};\nconst idlPartials = {};\n\nconst templates = {\n  wrap(items) {\n    return items\n      .flat()\n      .filter(x => x !== \"\")\n      .map(x => (typeof x === \"string\" ? new Text(x) : x));\n  },\n  trivia(t) {\n    if (!t.trim()) {\n      return t;\n    }\n    return html`<span class=\"idlSectionComment\">${t}</span>`;\n  },\n  generic(keyword) {\n    // Shepherd classifies \"interfaces\" as starting with capital letters,\n    // like Promise, FrozenArray, etc.\n    return /^[A-Z]/.test(keyword)\n      ? html`<a data-xref-type=\"interface\" data-cite=\"WEBIDL\">${keyword}</a>`\n      : // Other keywords like sequence, maplike, etc...\n        html`<a data-xref-type=\"dfn\" data-cite=\"WEBIDL\">${keyword}</a>`;\n  },\n  reference(wrapped, unescaped, context) {\n    if (context.type === \"extended-attribute\") {\n      return wrapped;\n    }\n    let type = \"_IDL_\";\n    let cite = null;\n    let lt;\n    switch (unescaped) {\n      case \"object\":\n        type = \"interface\";\n        cite = \"WEBIDL\";\n        break;\n    }\n    return html`<a\n      data-link-type=\"${type === \"_IDL_\" ? \"idl\" : type}\"\n      data-xref-type=\"${type}\"\n      data-cite=\"${cite}\"\n      data-lt=\"${lt}\"\n      >${wrapped}</a\n    >`;\n  },\n  name(escaped, { data, parent }) {\n    if (data.idlType && data.idlType.type === \"argument-type\") {\n      return html`<span class=\"idlParamName\">${escaped}</span>`;\n    }\n    const idlLink = defineIdlName(escaped, data, parent);\n    if (data.type !== \"enum-value\") {\n      const className = parent ? \"idlName\" : \"idlID\";\n      idlLink.classList.add(className);\n    }\n    return idlLink;\n  },\n  nameless(escaped, { data, parent }) {\n    switch (data.type) {\n      case \"operation\":\n      case \"constructor\":\n        return defineIdlName(escaped, data, parent);\n      default:\n        return escaped;\n    }\n  },\n  type(contents) {\n    return html`<span class=\"idlType\">${contents}</span>`;\n  },\n  inheritance(contents) {\n    return html`<span class=\"idlSuperclass\">${contents}</span>`;\n  },\n  definition(contents, { data, parent }) {\n    const className = getIdlDefinitionClassName(data);\n    switch (data.type) {\n      case \"includes\":\n      case \"enum-value\":\n        return html`<span class=\"${className}\">${contents}</span>`;\n    }\n    const parentName = parent ? parent.name : \"\";\n    const { name, idlId } = getNameAndId(data, parentName);\n    return html`<span\n      class=\"${className}\"\n      id=\"${idlId}\"\n      data-idl\n      data-title=\"${name}\"\n      >${contents}</span\n    >`;\n  },\n  extendedAttribute(contents) {\n    const result = html`<span class=\"extAttr\">${contents}</span>`;\n    return result;\n  },\n  extendedAttributeReference(name) {\n    return html`<a data-xref-type=\"extended-attribute\">${name}</a>`;\n  },\n};\n\n/**\n * Returns a link to existing <dfn> or creates one if doesn’t exists.\n */\nfunction defineIdlName(escaped, data, parent) {\n  const parentName = parent ? parent.name : \"\";\n  const { name } = getNameAndId(data, parentName);\n  const dfn = findDfn(data, name, {\n    parent: parentName,\n  });\n  const linkType = getDfnType(data.type);\n  if (dfn) {\n    if (!data.partial) {\n      if (!dfn.matches(\"[data-noexport]\")) dfn.dataset.export = \"\";\n      dfn.dataset.dfnType = linkType;\n    }\n    decorateDfn(dfn, data, parentName, name);\n    const href = `#${dfn.id}`;\n    return html`<a\n      data-link-for=\"${parentName}\"\n      data-link-type=\"${linkType}\"\n      href=\"${href}\"\n      class=\"internalDFN\"\n      ><code>${escaped}</code></a\n    >`;\n  }\n\n  const isDefaultJSON =\n    data.type === \"operation\" &&\n    data.name === \"toJSON\" &&\n    data.extAttrs.some(({ name }) => name === \"Default\");\n  if (isDefaultJSON) {\n    return html`<a data-link-type=\"dfn\" data-lt=\"default toJSON steps\"\n      >${escaped}</a\n    >`;\n  }\n  if (!data.partial) {\n    const dfn = html`<dfn data-export data-dfn-type=\"${linkType}\"\n      >${escaped}</dfn\n    >`;\n    registerDefinition(dfn, [name]);\n    decorateDfn(dfn, data, parentName, name);\n    return dfn;\n  }\n\n  const unlinkedAnchor = html`<a\n    data-idl=\"${data.partial ? \"partial\" : null}\"\n    data-link-type=\"${linkType}\"\n    data-title=\"${data.name}\"\n    data-xref-type=\"${linkType}\"\n    >${escaped}</a\n  >`;\n\n  const showWarnings =\n    name && data.type !== \"typedef\" && !(data.partial && !dfn);\n  if (showWarnings) {\n    const styledName = data.type === \"operation\" ? `${name}()` : name;\n    const ofParent = parentName ? ` \\`${parentName}\\`'s` : \"\";\n    const msg = `Missing \\`<dfn>\\` for${ofParent} \\`${styledName}\\` ${data.type}.`;\n    const hint = docLink`See ${\"using `data-dfn-for`|#data-dfn-for\"} in ReSpec's documentation.`;\n    showWarning(msg, pluginName, { elements: [unlinkedAnchor], hint });\n  }\n  return unlinkedAnchor;\n}\n\n/**\n * Map to Shepherd types, for export.\n * @see https://tabatkins.github.io/bikeshed/#dfn-types\n */\nfunction getDfnType(idlType) {\n  switch (idlType) {\n    case \"operation\":\n      return \"method\";\n    case \"field\":\n      return \"dict-member\";\n    case \"callback interface\":\n    case \"interface mixin\":\n      return \"interface\";\n    default:\n      return idlType;\n  }\n}\n\nfunction getIdlDefinitionClassName(defn) {\n  switch (defn.type) {\n    case \"callback interface\":\n      return \"idlInterface\";\n    case \"operation\":\n      return \"idlMethod\";\n    case \"field\":\n      return \"idlMember\";\n    case \"enum-value\":\n      return \"idlEnumItem\";\n    case \"callback function\":\n      return \"idlCallback\";\n  }\n  return `idl${defn.type[0].toUpperCase()}${defn.type.slice(1)}`;\n}\n\nconst nameResolverMap = new WeakMap();\nfunction getNameAndId(defn, parent = \"\") {\n  if (nameResolverMap.has(defn)) {\n    return nameResolverMap.get(defn);\n  }\n  const result = resolveNameAndId(defn, parent);\n  nameResolverMap.set(defn, result);\n  return result;\n}\n\nfunction resolveNameAndId(defn, parent) {\n  let name = getDefnName(defn);\n  // For getters, setters, etc. \"anonymous-getter\",\n  const prefix = defn.special && defn.name === \"\" ? \"anonymous-\" : \"\";\n  let idlId = getIdlId(prefix + name, parent);\n  switch (defn.type) {\n    // Top-level entities with linkable members.\n    case \"callback interface\":\n    case \"dictionary\":\n    case \"interface\":\n    case \"interface mixin\": {\n      idlId += resolvePartial(defn);\n      break;\n    }\n    case \"constructor\":\n    case \"operation\": {\n      const overload = resolveOverload(name, parent);\n      if (overload) {\n        name += overload;\n        idlId += overload;\n      } else if (defn.arguments.length) {\n        idlId += defn.arguments\n          .map(arg => `-${arg.name.toLowerCase()}`)\n          .join(\"\");\n      }\n      break;\n    }\n  }\n  return { name, idlId };\n}\n\nfunction resolvePartial(defn) {\n  if (!defn.partial) {\n    return \"\";\n  }\n  if (!idlPartials[defn.name]) {\n    idlPartials[defn.name] = 0;\n  }\n  idlPartials[defn.name] += 1;\n  return `-partial-${idlPartials[defn.name]}`;\n}\n\nfunction resolveOverload(name, parentName) {\n  const qualifiedName = `${parentName}.${name}`;\n  const fullyQualifiedName = `${qualifiedName}()`;\n  let overload;\n  if (!operationNames[fullyQualifiedName]) {\n    operationNames[fullyQualifiedName] = 0;\n  }\n  if (!operationNames[qualifiedName]) {\n    operationNames[qualifiedName] = 0;\n  } else {\n    overload = `!overload-${operationNames[qualifiedName]}`;\n  }\n  operationNames[fullyQualifiedName] += 1;\n  operationNames[qualifiedName] += 1;\n  return overload || \"\";\n}\n\nfunction getIdlId(name, parentName) {\n  if (!parentName) {\n    return `idl-def-${name.toLowerCase()}`;\n  }\n  return `idl-def-${parentName.toLowerCase()}-${name.toLowerCase()}`;\n}\n\nfunction getDefnName(defn) {\n  switch (defn.type) {\n    case \"enum-value\":\n      return defn.value;\n    case \"operation\":\n      return defn.name || defn.special;\n    default:\n      return defn.name || defn.type;\n  }\n}\n\n// IDL types that never need a data-dfn-for\nconst topLevelIdlTypes = [\n  \"interface\",\n  \"interface mixin\",\n  \"dictionary\",\n  \"namespace\",\n  \"enum\",\n  \"typedef\",\n  \"callback\",\n];\n\n/**\n * @param {Element} idlElement\n * @param {number} index\n */\nfunction renderWebIDL(idlElement, index) {\n  let parse;\n  try {\n    parse = webidl2.parse(idlElement.textContent, {\n      sourceName: String(index),\n    });\n  } catch (e) {\n    const msg = `Failed to parse WebIDL: ${e.bareMessage}.`;\n    showError(msg, pluginName, {\n      title: e.bareMessage,\n      details: `<pre>${e.context}</pre>`,\n      elements: [idlElement],\n    });\n    // Skip this <pre> and move on to the next one.\n    return [];\n  }\n  // we add \"idl\" as the canonical match, so both \"webidl\" and \"idl\" work\n  idlElement.classList.add(\"def\", \"idl\");\n  const highlights = webidl2.write(parse, { templates });\n  html.bind(idlElement)`${highlights}`;\n  wrapInner(idlElement, document.createElement(\"code\"));\n  idlElement.querySelectorAll(\"[data-idl]\").forEach(elem => {\n    if (elem.dataset.dfnFor) {\n      return;\n    }\n    const title = elem.dataset.title;\n    // Select the nearest ancestor element that can contain members.\n    const idlType = elem.dataset.dfnType;\n\n    const parent = elem.parentElement.closest(\"[data-idl][data-title]\");\n    if (parent && !topLevelIdlTypes.includes(idlType)) {\n      elem.dataset.dfnFor = parent.dataset.title;\n    }\n    if (elem.localName === \"dfn\") {\n      registerDefinition(elem, [title]);\n    }\n  });\n  // cross reference\n  const closestCite = idlElement.closest(\"[data-cite], body\");\n  const { dataset } = closestCite;\n  if (!dataset.cite) dataset.cite = \"WEBIDL\";\n  // includes webidl in some form\n  if (!/\\bwebidl\\b/i.test(dataset.cite)) {\n    const cites = dataset.cite.trim().split(/\\s+/);\n    dataset.cite = [\"WEBIDL\", ...cites].join(\" \");\n  }\n  addIDLHeader(idlElement);\n  return parse;\n}\n/**\n * Adds a \"WebIDL\" decorative header/permalink to a block of WebIDL.\n * @param {HTMLPreElement} pre\n */\nexport function addIDLHeader(pre) {\n  addHashId(pre, \"webidl\");\n  const header = html`<span class=\"idlHeader\"\n    ><a class=\"self-link\" href=\"${`#${pre.id}`}\">WebIDL</a></span\n  >`;\n  pre.prepend(header);\n  addCopyIDLButton(header);\n}\n\nexport async function run() {\n  const idls = document.querySelectorAll(\"pre.idl, pre.webidl\");\n  if (!idls.length) {\n    return;\n  }\n  const style = document.createElement(\"style\");\n  style.textContent = css;\n  document.querySelector(\"head link, head > *:last-child\").before(style);\n\n  const astArray = [...idls].map(renderWebIDL);\n\n  const validations = webidl2.validate(astArray);\n  for (const validation of validations) {\n    let details = `<pre>${xmlEscape(validation.context)}</pre>`;\n    if (validation.autofix) {\n      validation.autofix();\n      const idlToFix = webidl2.write(astArray[validation.sourceName]);\n      const escaped = xmlEscape(idlToFix);\n      details += `Try fixing as:\n      <pre>${escaped}</pre>`;\n    }\n    const msg = `WebIDL validation error: ${validation.bareMessage}`;\n    showError(msg, pluginName, {\n      details,\n      elements: [idls[validation.sourceName]],\n      title: validation.bareMessage,\n    });\n  }\n  document.normalize();\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  let { pathname: citePath } = url;\n  // final resolution will be against the URL of the spec, which may end with\n  // a filename. That filename must be preserved if there's no specific path.\n  if (citePath === \"/\") citePath = \"\";\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// Module core/contrib\n// Fetches names of contributors from github and uses them to fill\n// in the content of elements with key identifiers:\n// #gh-contributors: people whose PR have been merged.\n// Spec editors get filtered out automatically.\nimport { docLink, fetchAndCache, joinAnd, showError } from \"./utils.js\";\nimport { html } from \"./import-maps.js\";\nexport const name = \"core/contrib\";\n\nexport async function run(conf) {\n  const ghContributors = document.getElementById(\"gh-contributors\");\n  if (!ghContributors) {\n    return;\n  }\n\n  if (!conf.github) {\n    const msg = docLink`Requested list of contributors from GitHub, but ${\"[github]\"} configuration option is not set.`;\n    showError(msg, name);\n    return;\n  }\n\n  const editors = conf.editors.map(editor => editor.name);\n  const apiURL = `${conf.github.apiBase}/${conf.github.fullName}/`;\n  await showContributors(editors, apiURL);\n}\n\n/**\n * Show list of contributors in #gh-contributors\n * @param {string[]} editors\n * @param {string} apiURL\n */\nasync function showContributors(editors, apiURL) {\n  const elem = document.getElementById(\"gh-contributors\");\n  if (!elem) return;\n\n  elem.textContent = \"Fetching list of contributors...\";\n  const contributors = await getContributors();\n  if (contributors !== null) {\n    toHTML(contributors, elem);\n  } else {\n    elem.textContent = \"Failed to fetch contributors.\";\n  }\n\n  async function getContributors() {\n    const { href: url } = new URL(\"contributors\", apiURL);\n    try {\n      const res = await fetchAndCache(url);\n      if (!res.ok) {\n        throw new Error(\n          `Request to ${url} failed with status code ${res.status}`\n        );\n      }\n      /** @type {Contributor[]} */\n      const contributors = await res.json();\n      return contributors.filter(\n        user =>\n          !editors.includes(user.name || user.login) &&\n          !user.login.includes(\"[bot]\")\n      );\n    } catch (error) {\n      const msg = \"Error loading contributors from GitHub.\";\n      showError(msg, name);\n      console.error(error);\n      return null;\n    }\n  }\n}\n\n/**\n * @typedef {{ name?: string, login: string }} Contributor\n * @param {Contributor[]} contributors\n * @param {HTMLElement} element\n */\nfunction toHTML(contributors, element) {\n  const sortedContributors = contributors.sort((a, b) => {\n    const nameA = a.name || a.login;\n    const nameB = b.name || b.login;\n    return nameA.toLowerCase().localeCompare(nameB.toLowerCase());\n  });\n\n  if (element.tagName === \"UL\") {\n    html(element)`${sortedContributors.map(\n      ({ name, login }) =>\n        `<li><a href=\"https://github.com/${login}\">${name || login}</a></li>`\n    )}`;\n    return;\n  }\n\n  const names = sortedContributors.map(user => user.name || user.login);\n  element.textContent = joinAnd(names);\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/**\n * Module: core/webidl-index\n * constructs a summary of WebIDL in the document by\n * cloning all the generated WebIDL nodes and\n * appending them to pre element.\n *\n * Usage\n * Add a <section id=\"idl-index\"> to the document.\n * It also supports title elements to generate a header.\n * Or if a header element is an immediate child, then\n * that is preferred.\n */\nexport const name = \"core/webidl-index\";\nimport { nonNormativeSelector, wrapInner } from \"./utils.js\";\nimport { addIDLHeader } from \"./webidl.js\";\n\nexport function run() {\n  /** @type {HTMLElement | null} */\n  const idlIndexSec = document.querySelector(\"section#idl-index\");\n  if (!idlIndexSec) {\n    return;\n  }\n  // Query for decedents headings, e.g., \"h2:first-child, etc..\"\n  const query = [2, 3, 4, 5, 6].map(level => `h${level}:first-child`).join(\",\");\n  if (!idlIndexSec.querySelector(query)) {\n    const header = document.createElement(\"h2\");\n    if (idlIndexSec.title) {\n      header.textContent = idlIndexSec.title;\n      idlIndexSec.removeAttribute(\"title\");\n    } else {\n      header.textContent = \"IDL Index\";\n    }\n    idlIndexSec.prepend(header);\n  }\n\n  // filter out the IDL marked with class=\"exclude\" and the IDL in non-normative sections\n  const idlIndex = Array.from(\n    document.querySelectorAll(\"pre.idl:not(.exclude) > code\")\n  ).filter(idl => !idl.closest(nonNormativeSelector));\n\n  if (idlIndex.length === 0) {\n    const text = \"This specification doesn't normatively declare any Web IDL.\";\n    idlIndexSec.append(text);\n    return;\n  }\n\n  const pre = document.createElement(\"pre\");\n  pre.classList.add(\"idl\", \"def\");\n  pre.id = \"actual-idl-index\";\n  idlIndex\n    .map(elem => {\n      const fragment = document.createDocumentFragment();\n      for (const child of elem.children) {\n        fragment.appendChild(child.cloneNode(true));\n      }\n      return fragment;\n    })\n    .forEach(elem => {\n      if (pre.lastChild) {\n        pre.append(\"\\n\\n\");\n      }\n      pre.appendChild(elem);\n    });\n  // Remove duplicate IDs\n  pre.querySelectorAll(\"*[id]\").forEach(elem => elem.removeAttribute(\"id\"));\n\n  // Add our own IDL header\n  idlIndexSec.appendChild(pre);\n  wrapInner(pre, document.createElement(\"code\"));\n  addIDLHeader(pre);\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\">↑</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> </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// 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 { 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\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\n// Module w3c/seo\n// Manages SEO information for documents\n// e.g. set the canonical URL for the document if configured\nimport { W3CNotes, recTrackStatus, registryTrackStatus } from \"./headers.js\";\nimport { html } from \"../core/import-maps.js\";\nimport { resolveRef } from \"../core/biblio.js\";\nimport { showWarning } from \"../core/utils.js\";\nexport const name = \"w3c/seo\";\n\nconst status2rdf = {\n  NOTE: \"w3p:NOTE\",\n  WD: \"w3p:WD\",\n  LC: \"w3p:LastCall\",\n  CR: \"w3p:CR\",\n  CRD: \"w3p:CRD\",\n  PR: \"w3p:PR\",\n  REC: \"w3p:REC\",\n  RSCND: \"w3p:RSCND\",\n};\n\nexport const requiresCanonicalLink = new Set([\n  ...W3CNotes,\n  ...recTrackStatus,\n  ...registryTrackStatus,\n  \"BG-FINAL\",\n  \"CG-FINAL\",\n  \"CRY\",\n  \"DRY\",\n  \"draft-finding\",\n  \"finding\",\n]);\n\nexport async function run(conf) {\n  // Don't include a canonical URL for documents that haven't been published.\n  if (\n    (!conf.canonicalURI && !requiresCanonicalLink.has(conf.specStatus)) ||\n    !conf.shortName\n  ) {\n    return;\n  }\n  switch (conf.canonicalURI) {\n    case \"edDraft\":\n      if (conf.edDraftURI) {\n        conf.canonicalURI = new URL(\n          conf.edDraftURI,\n          document.location.href\n        ).href;\n      } else {\n        const msg = `Canonical URI set to edDraft, but no edDraftURI is set in configuration`;\n        showWarning(msg, name);\n        conf.canonicalURI = null;\n      }\n      break;\n    case \"TR\":\n      if (conf.latestVersion) {\n        conf.canonicalURI = conf.latestVersion;\n      } else {\n        const msg = `Canonical URI set to TR, but no shortName is set in configuration`;\n        showWarning(msg, name);\n        conf.canonicalURI = null;\n      }\n      break;\n    default:\n      if (conf.latestVersion && !conf.canonicalURI) {\n        conf.canonicalURI = conf.latestVersion;\n      }\n  }\n  if (conf.canonicalURI) {\n    const linkElem = html`<link rel=\"canonical\" href=\"${conf.canonicalURI}\" />`;\n    document.head.appendChild(linkElem);\n  }\n\n  if (conf.doJsonLd) {\n    await addJSONLDInfo(conf, document);\n  }\n}\n\nasync function addJSONLDInfo(conf, doc) {\n  const rdfStatus = status2rdf[conf.specStatus];\n  // Content for JSON\n  const type = [\"TechArticle\"];\n  if (rdfStatus) type.push(rdfStatus);\n\n  const jsonld = {\n    \"@context\": [\n      \"http://schema.org\",\n      {\n        \"@vocab\": \"http://schema.org/\",\n        \"@language\": doc.documentElement.lang || \"en\",\n        w3p: \"http://www.w3.org/2001/02pd/rec54#\",\n        foaf: \"http://xmlns.com/foaf/0.1/\",\n        datePublished: { \"@type\": \"http://www.w3.org/2001/XMLSchema#date\" },\n        inLanguage: { \"@language\": null },\n        isBasedOn: { \"@type\": \"@id\" },\n        license: { \"@type\": \"@id\" },\n      },\n    ],\n    id: conf.canonicalURI || conf.thisVersion,\n    type,\n    name: document.title,\n    inLanguage: doc.documentElement.lang || \"en\",\n    license: conf.licenseInfo?.url,\n    datePublished: conf.dashDate,\n    /** @type {{ name: string, url?: string } | { name: string, url?: string }[]} */\n    copyrightHolder: {\n      name: \"World Wide Web Consortium\",\n      url: \"https://www.w3.org/\",\n    },\n    discussionUrl: conf.issueBase,\n    alternativeHeadline: conf.subtitle,\n    isBasedOn: conf.prevVersion,\n  };\n\n  // add any additional copyright holders\n  if (conf.additionalCopyrightHolders) {\n    const addl = Array.isArray(conf.additionalCopyrightHolders)\n      ? conf.additionalCopyrightHolders\n      : [conf.additionalCopyrightHolders];\n    jsonld.copyrightHolder = [\n      jsonld.copyrightHolder,\n      ...addl.map(h => ({ name: h })),\n    ];\n  }\n\n  // description from meta description\n  const description = doc.head.querySelector(\"meta[name=description]\");\n  if (description) {\n    jsonld.description = description.content;\n  }\n\n  // Editors\n  if (conf.editors) {\n    jsonld.editor = conf.editors.map(addPerson);\n  }\n  if (conf.authors) {\n    jsonld.contributor = conf.authors.map(addPerson);\n  }\n\n  // normative and informative references\n  const citationIds = [\n    ...conf.normativeReferences,\n    ...conf.informativeReferences,\n  ];\n  const citationContents = await Promise.all(\n    citationIds.map(ref => resolveRef(ref))\n  );\n  jsonld.citation = citationContents\n    .filter(ref => typeof ref === \"object\")\n    .map(addRef);\n\n  const script = doc.createElement(\"script\");\n  script.type = \"application/ld+json\";\n  script.textContent = JSON.stringify(jsonld, null, 2);\n  doc.head.appendChild(script);\n}\n\n/**\n * Turn editors and authors into a list of JSON-LD relationships\n */\nfunction addPerson({ name, url, mailto, company, companyURL }) {\n  const ed = {\n    type: \"Person\",\n    name,\n    url,\n    \"foaf:mbox\": mailto,\n  };\n  if (company || companyURL) {\n    ed.worksFor = {\n      name: company,\n      url: companyURL,\n    };\n  }\n  return ed;\n}\n\n/**\n * Create a reference URL from the ref\n */\nfunction addRef(ref) {\n  const { href: id, title: name, href: url } = ref;\n  const jsonld = {\n    id,\n    type: \"TechArticle\",\n    name,\n    url,\n  };\n  if (ref.authors) {\n    jsonld.creator = ref.authors.map(a => ({ name: a }));\n  }\n  if (ref.rawDate) {\n    jsonld.publishedDate = ref.rawDate;\n  }\n  if (ref.isbn) {\n    jsonld.identifier = ref.isbn;\n  }\n  if (ref.publisher) {\n    jsonld.publisher = { name: ref.publisher };\n  }\n  return jsonld;\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","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\nimport { makeSafeCopy, norm, renameElement, showError } from \"./utils.js\";\n\nexport const name = \"core/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.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","/* 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","// @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\n/**\n * This module adds a \"monetization\" meta-tag to enable web-monetization.\n *\n * The meta-tag is added only to \"live\" documents, and is removed from generated\n * static documents.\n */\nimport { html } from \"./import-maps.js\";\n\nexport const name = \"core/web-monetization\";\n\nexport function run(conf) {\n  if (conf.monetization === false) {\n    return;\n  }\n  const { monetization } = conf;\n\n  const { removeOnSave, paymentPointer } = canonicalizeConfig(monetization);\n\n  const cssClass = removeOnSave ? \"removeOnSave\" : null;\n  document.head.append(\n    html`<meta\n      name=\"monetization\"\n      content=\"${paymentPointer}\"\n      class=\"${cssClass}\"\n    />`\n  );\n}\n\n/**\n * @param {object|string} rawConfig\n * - {string} paymentPointer - The payment pointer to use.\n * - {boolean} removeOnSave - Whether to remove the meta tag when the document is saved.\n */\nfunction canonicalizeConfig(rawConfig) {\n  const config = {\n    paymentPointer: \"$respec.org\",\n    removeOnSave: true,\n  };\n  switch (typeof rawConfig) {\n    case \"string\":\n      config.paymentPointer = rawConfig;\n      break;\n    case \"object\":\n      if (rawConfig.paymentPointer) {\n        config.paymentPointer = String(rawConfig.paymentPointer);\n      }\n      if (rawConfig.removeOnSave === false) {\n        config.removeOnSave = false;\n      }\n      break;\n  }\n  return config;\n}\n","export const name = \"core/dfn-contract\";\n\nexport function run() {\n  addContractDefaults();\n  addDefinitionPointers();\n}\n\nfunction addContractDefaults() {\n  // Find all dfns that don't have a type and default them to \"dfn\".\n  /** @type NodeListOf<HTMLElement> */\n  const dfnsWithNoType = document.querySelectorAll(\n    \"dfn:is([data-dfn-type=''],:not([data-dfn-type]))\"\n  );\n  for (const dfn of dfnsWithNoType) {\n    dfn.dataset.dfnType = \"dfn\";\n  }\n\n  // Per \"the contract\", export all definitions, except where:\n  //  - Explicitly marked with data-noexport.\n  //  - The type is \"dfn\" and not explicitly marked for export (i.e., just a regular definition).\n  //  - definitions was included via (legacy) data-cite=\"foo#bar\".\n  /** @type NodeListOf<HTMLElement> */\n  const exportableDfns = document.querySelectorAll(\n    \"dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])\"\n  );\n  for (const dfn of exportableDfns) {\n    dfn.dataset.export = \"\";\n  }\n}\n\n// - Sets data-defines on well-known definition content patterns\nfunction addDefinitionPointers() {\n  // A dl with class hasdefinitions associated the dfn in each dt\n  // the definition in the following sibling element\n  /** @type NodeListOf<HTMLElement> */\n  const describedDTs = document.querySelectorAll(\n    \"dl.definitions dt:has(dfn[data-dfn-type])\"\n  );\n  for (const dt of describedDTs) {\n    const dfnId = dt.querySelector(\"dfn[data-dfn-type]\").id;\n    const dfnContent = /** @type {HTMLElement | null} */ (\n      dt.nextElementSibling\n    );\n    if (dfnContent && !dfnContent.dataset.defines && dfnId) {\n      dfnContent.dataset.defines = `#${dfnId}`;\n    }\n  }\n\n  // an element with class \"definition\" is marked as defining the term\n  // found in the element\n  /** @type NodeListOf<HTMLElement> */\n  const definitionContainers = document.querySelectorAll(\n    \".definition:has(dfn[data-dfn-type])\"\n  );\n  for (const el of definitionContainers) {\n    const dfn = el.querySelector(\"dfn[data-dfn-type]\");\n    if (dfn.id && !el.dataset.defines) {\n      el.dataset.defines = `#${dfn.id}`;\n    }\n  }\n}\n","import { docLink, showError } from \"./utils.js\";\nimport { sub } from \"./pubsubhub.js\";\n\nexport const name = \"core/before-save\";\n\nexport function run(conf) {\n  if (!conf.beforeSave) return;\n\n  if (\n    !Array.isArray(conf.beforeSave) ||\n    conf.beforeSave.some(\n      el => typeof el !== \"function\" || el.constructor.name === \"AsyncFunction\"\n    )\n  ) {\n    const msg = docLink`${\"[beforeSave]\"} configuration option must be an array of synchronous JS functions.`;\n    showError(msg, name);\n    return;\n  }\n\n  sub(\n    \"beforesave\",\n    documentElement => {\n      performTransformations(conf.beforeSave, documentElement.ownerDocument);\n    },\n    { once: true }\n  );\n}\n/**\n * @param {Array<Function>} transforms\n * @param {Document}\n */\nfunction performTransformations(transforms, doc) {\n  let pos = 0;\n  for (const fn of transforms) {\n    try {\n      fn(doc);\n    } catch (err) {\n      const nameOrPosition = `\\`${fn.name}\\`` || `at position ${pos}`;\n      const msg = docLink`Function ${nameOrPosition}\\` threw an error during processing of ${\"[beforeSave]\"}.`;\n      const hint = \"See developer console.\";\n      showError(msg, name, { hint });\n      console.error(err);\n    } finally {\n      pos++;\n    }\n  }\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-captionless-tables\".\n *\n * Checks that there are no tables in the document which don't start\n * with a caption element.\n *\n * As some tables may not contain tabular data, this only applies to\n * tables marked with class=\"numbered\".\n */\nimport { getIntlData, showWarning } from \"../utils.js\";\n\nconst ruleName = \"no-captionless-tables\";\nexport const name = \"core/linter-rules/no-captionless-tables\";\n\nconst localizationStrings = {\n  en: {\n    msg: \"All tables marked with class='numbered' must start with a caption element.\",\n    hint: \"Add a `caption` to the offending table.\",\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 tables = document.querySelectorAll(\"table.numbered\");\n  const offendingElements = [...tables].filter(\n    table => !(table.firstElementChild instanceof HTMLTableCaptionElement)\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-dfns\".\n *\n * Complains if an internal/un-exported definitions is not linked to.\n */\nimport {\n  docLink,\n  getIntlData,\n  norm,\n  showError,\n  showWarning,\n} from \"../utils.js\";\n\nconst ruleName = \"no-unused-dfns\";\nexport const name = \"core/linter-rules/no-unused-dfns\";\n\nconst localizationStrings = {\n  en: {\n    msg(text) {\n      return `Found definition for \"${text}\", but nothing links to it. This is usually a spec bug!`;\n    },\n    get hint() {\n      return docLink`\n        You can do one of the following...\n\n          * Add a \\`class=\"lint-ignore\"\\` attribute the definition.\n          * Either remove the definition or change \\`<dfn>\\` to another type of HTML element.\n          * If you meant to ${\"[export|#data-export]\"} the definition, add \\`class=\"export\"\\` to the definition.\n\n        To silence this warning entirely, set \\`lint: { \"no-unused-dfns\": false }\\` in your \\`respecConfig\\`.`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) return;\n  const logger = conf.lint[ruleName] === \"error\" ? showError : showWarning;\n  /** @type NodeListOf<HTMLElement> */\n  const definitions = document.querySelectorAll(\n    \"dfn:not(.lint-ignore, [data-export], [data-cite])\"\n  );\n\n  const elements = [...definitions].filter(isDfnUnused);\n\n  // These are usually bad spec bugs, so best shown individually.\n  elements.forEach(element => {\n    const elements = [element];\n    const text = norm(element.textContent);\n    logger(l10n.msg(text), name, { elements, hint: l10n.hint });\n  });\n}\n\nfunction isDfnUnused(dfn) {\n  // Not in the index\n  // and not the \"self-link\" box\n  return !document.querySelector(\n    `a[href=\"#${dfn.id}\"]:not(.index-term, .self-link)`\n  );\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 * The W3C Process requires separate Privacy Considerations and Security\n * Considerations sections. This linter checks for the presence of these\n * sections, and reports an error if they are not present.\n */\n\nimport {\n  InsensitiveStringSet,\n  docLink,\n  getIntlData,\n  getIntlDataForKey,\n  norm,\n  showError,\n  showWarning,\n} from \"../../core/utils.js\";\nimport { W3CNotes, recTrackStatus } from \"../headers.js\";\n\nconst ruleName = \"required-sections\";\nexport const name = \"w3c/linter-rules/required-sections\";\n\nconst localizationStrings = {\n  en: {\n    msg(sectionTitle) {\n      return `W3C Recommendation track documents require a separate \"${sectionTitle}\" section.`;\n    },\n    hint(sectionTitle) {\n      return docLink`Add a \\`<section>\\` with a \"${sectionTitle}\" header. See the [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).\n        If the document is not intended for the W3C Recommendation track, set ${\"[noRecTrack]\"} to \\`true\\`\n        or turn off the ${`[${ruleName}]`} linter rule.`;\n    },\n    privacy_considerations: \"Privacy Considerations\",\n    security_considerations: \"Security Considerations\",\n  },\n  es: {\n    msg(sectionTitle) {\n      return `Documentos que van a ser \"W3C Recommendation\" requieren una sección \"${sectionTitle}\" separada.`;\n    },\n    hint(sectionTitle) {\n      return docLink`Agrega una \\`<section>\\` con título \"${sectionTitle}\". Ver los [Horizontal review guidelines](https://www.w3.org/Guide/documentreview/#how_to_get_horizontal_review).\n        Si el documento no está destinado a ser un W3C Recommendation, puedes poner ${\"[noRecTrack]\"} a \\`true\\`\n        o apaga la regla de linter ${`[${ruleName}]`}.`;\n    },\n    privacy_considerations: \"Consideraciones de privacidad\",\n    security_considerations: \"Consideraciones de Seguridad\",\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport const requiresSomeSectionStatus = new Set([...recTrackStatus]);\nrequiresSomeSectionStatus.delete(\"DISC\"); // \"Discontinued Draft\"\n// W3C notes do not require privacy or security considerations sections.\nW3CNotes.forEach(note => requiresSomeSectionStatus.delete(note));\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) {\n    return;\n  }\n\n  // We can't check for headers unless we also have a translation\n  if (!getIntlDataForKey(localizationStrings, \"privacy_considerations\")) {\n    // We can't check for headers unless we also have a translation\n    const msg = `Cannot check for required sections as translations are not available.`;\n    const hint = `File an issue to add translations or use a supported language.`;\n    showWarning(msg, name, { hint });\n    return;\n  }\n\n  if (conf.noRecTrack || !requiresSomeSectionStatus.has(conf.specStatus)) {\n    return;\n  }\n\n  const logger = conf.lint[ruleName] === \"error\" ? showError : showWarning;\n\n  const missingRequiredSections = new InsensitiveStringSet([\n    l10n.privacy_considerations,\n    l10n.security_considerations,\n  ]);\n\n  /** @type {NodeListOf<HTMLElement>} */\n  const headers = document.querySelectorAll(\"h2, h3, h4, h5, h6\");\n  for (const header of headers) {\n    const clone = header.cloneNode(true);\n    // section number and self-link anchor\n    clone.querySelectorAll(\"bdi\")?.forEach(elem => elem.remove());\n    const text = norm(clone.textContent);\n    if (missingRequiredSections.has(text)) {\n      missingRequiredSections.delete(text);\n      // Check if we find them all...\n      if (missingRequiredSections.size === 0) {\n        return; // All present, early return!\n      }\n    }\n  }\n\n  // Show the ones we didn't find individually\n  for (const title of missingRequiredSections) {\n    logger(l10n.msg(title), name, {\n      hint: l10n.hint(title),\n    });\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","// @ts-check\n/**\n * Linter rule \"informative-dfn\".\n *\n * Complains if an informative definition is referenced from a normative section.\n */\nimport { docLink, getIntlData, showError, showWarning } from \"../utils.js\";\n\nimport { informativeRefsInNormative } from \"../xref.js\";\n\nconst ruleName = \"informative-dfn\";\nexport const name = \"core/linter-rules/informative-dfn\";\n\nconst localizationStrings = {\n  en: {\n    msg(term, cite) {\n      return `Normative reference to \"${term}\" found but term is defined \"informatively\" in \"${cite}\".`;\n    },\n    get hint() {\n      return docLink`\n        You can do one of the following...\n\n          * Get the source definition to be made normative\n          * Add a \\`class=\"lint-ignore\"\\` attribute to the link.\n          * Use a local normative proxy for the definition à la \\`<dfn data-cite=\"spec\">term</dfn>\\`\n\n        To silence this warning entirely, set \\`lint: { \"${ruleName}\": false }\\` in your \\`respecConfig\\`.`;\n    },\n  },\n};\nconst l10n = getIntlData(localizationStrings);\n\nexport function run(conf) {\n  if (!conf.lint?.[ruleName]) return;\n  const logger = conf.lint[ruleName] === \"error\" ? showError : showWarning;\n\n  informativeRefsInNormative.forEach(({ term, spec, element }) => {\n    if (element.classList.contains(\"lint-ignore\")) return;\n    logger(l10n.msg(term, spec), name, {\n      title: \"Normative reference to non-normative term.\",\n      elements: [element],\n      hint: l10n.hint,\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","source","position","current","message","kind","level","autofix","ruleName","sliceTokens","count","slice","Math","max","tokensToText","inputs","precedes","text","t","trivia","join","nextToken","type","length","line","precedingLastLine","splitted","split","lastLine","subsequentTokens","subsequentText","sourceContext","repeat","contextType","context","partial","node","hierarchy","unshift","n","base","appendIfExist","contextAsText","bareMessage","sourceName","input","tokens","syntaxError","validationError","token","Base","constructor","Object","defineProperties","writable","toJSON","json","inheritance","proto","descMap","getOwnPropertyDescriptors","key","entries","enumerable","getPrototypeOf","idlTypeIncludesDictionary","idlType","defs","useNullableInner","union","def","unique","typedefIncludesDictionary","cache","reference","dictionary","nullable","subtype","dictionaryIncludesRequiredField","dict","members","field","required","superdict","ArrayBase","Array","super","WrappedToken","parser","tokeniser","consumeKind","unescape","write","w","ts","separator","Eof","parse","tokenName","list","listName","extAttrValueSyntax","renamedLegacies","extAttrListItems","syntax","toks","ExtendedAttributeParameters","assign","consume","ret","autoParenter","asterisk","secondaryName","rhsIsList","argument_list","close","rhsType","reference_token","p","identifier","SimpleExtendedAttribute","params","defineProperty","rhs","arguments","validate","extAttr","arg","extendedAttribute","extendedAttributeReference","ExtendedAttributes","push","unconsume","probe","ea","type_suffix","obj","single_type","typeName","Type","return_type","type_with_extended_attributes","keyType","stringTypes","keyIdlType","valueType","generic_type","primitive_type","typeNameKeywords","generic","typ","or","union_type","extAttrs","Boolean","prefix","postfix","filter","replaceAllowShared","typedef","targetToken","firstToken","ref","unescaped","type_body","indexOf","splice","match","Default","const_value","expression","const_data","negative","Argument","start_position","optional","variadic","argumentNameKeywords","default","autofixOptionalDictionaryDefaultValue","requiredExists","a","isLastRequiredArgument","getFirstToken","name_token","data","Tokeniser","Operation","special","regular","termination","argument","body","definition","nameless","Attribute","noInherit","readonly","idlTypeIncludesEnforceRange","startsWith","allowDangler","first","items","item","num_type","integer_type","decimal_type","voidToken","stringifier","getLastIndentation","str","lines","autofixAddExposedWindow","exposed","existing","test","values","sort","x","y","isArray","tokenRe","decimal","integer","string","whitespace","comment","other","nonRegexTerminals","concat","punctuations","reserved","idl","lastCharIndex","nextChar","charAt","attemptTokenMatch","noFlushTrivia","currentTrivia","pop","lastIndex","WebIDLParseError","punctuation","re","exec","tokenise","probeKind","candidates","consumeIdentifier","EnumValue","Enum","v","Includes","mixin","Typedef","CallbackFunction","Container","instance","inheritable","allowedMembers","colon","mem","member","m","Constant","IterableLike","secondTypeRequired","secondTypeAllowed","argumentAllowed","argsOpen","argsClose","Constructor","static_member","Interface","extMembers","every","oldConstructors","autofixConstructor","factoryFunctions","named","i","opNames","ops","getOperations","statics","Set","op","nonstatics","groupOperationNames","partials","mixins","mixinMap","ext","additions","checkAdditions","forEach","add","existings","addition","checkInterfaceMemberDuplication","interfaceDef","constructorExtAttr","indentation","memberIndent","parentTrivia","indentCh","getMemberIndentation","constructorOp","existingIndex","array","predicate","reverse","findIndex","findLastIndex","removed","trim","Mixin","Field","Dictionary","Namespace","CallbackInterface","parseByTokens","interface_","opts","extensions","interface","productions","production","callbackInterface","namespace","res","eof","concrete","definitions","noop","templates","Writer","raw","wrapper","bind","id","getMixinMap","include","validateIterable","ast","duplicates","groupDefinitions","dup","checkDuplicatedNames","flat","it","HTTPTokenCodePoints","HTTPWhiteSpace","HTTPQuotedString","storeParam","paramName","paramValue","toLowerCase","_getDefaults","breaks","gfm","hooks","pedantic","renderer","silent","tokenizer","walkTokens","_defaults","changeDefaults","newDefaults","escapeTest","escapeReplace","RegExp","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","ch","escape$1","encode","unescapeTest","_","fromCharCode","parseInt","substring","caret","edit","regex","opt","val","valSource","getRegex","cleanUrl","href","encodeURI","noopTest","splitCells","tableRow","cells","offset","escaped","curr","rtrim","invert","l","suffLen","currChar","outputLink","cap","link","lexer","title","state","inLink","inlineTokens","_Tokenizer","rules","space","src","block","newline","code","codeBlockStyle","fences","matchIndentToCode","indentToCode","matchIndentInNode","indentInNode","indentCodeCompensation","inline","anyPunctuation","heading","trimmed","depth","hr","blockquote","top","blockTokens","bull","isordered","ordered","start","loose","itemRegex","itemContents","endsWithBlankLine","endEarly","nextLine","indent","trimStart","search","blankLine","nextBulletRegex","min","hrRegex","fencesBeginRegex","headingBeginRegex","rawLine","ischecked","istask","task","checked","trimEnd","spacers","hasMultipleLineBreaks","pre","tag","table","headers","aligns","rows","header","align","row","cell","lheading","paragraph","escape","inRawBlock","trimmedUrl","rtrimSlash","lastParenIndex","b","findClosingBracket","linkLen","reflink","links","nolink","emStrong","maskedSrc","prevChar","emStrongLDelim","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","emStrongRDelimAst","emStrongRDelimUnd","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","create","lex","lexInline","next","lastToken","cutSrc","lastParagraphClipped","leading","tabs","extTokenizer","call","startBlock","startIndex","Infinity","tempSrc","tempStart","getStartIndex","errMsg","charCodeAt","console","keepPrevChar","keys","lastIndexOf","startInline","_Renderer","infostring","quote","listitem","checkbox","tablerow","content","tablecell","flags","strong","em","cleanHref","out","image","_TextRenderer","_Parser","textRenderer","parseInline","renderers","genericToken","headingToken","codeToken","tableToken","j","k","blockquoteToken","listToken","itemBody","htmlToken","paragraphToken","textToken","escapeToken","tagToken","linkToken","imageToken","strongToken","emToken","codespanToken","delToken","_Hooks","static","preprocess","markdown","postprocess","processAllTokens","markedInstance","defaults","setOptions","parseMarkdown","Parser","Renderer","TextRenderer","Lexer","Tokenizer","Hooks","use","childTokens","pack","prevRenderer","extLevel","rendererProp","rendererFunc","tokenizerProp","tokenizerFunc","prevTokenizer","hooksProp","hooksFunc","prevHook","passThroughHooks","packWalktokens","origOpt","warn","throwError","onError","toString","msg","marked","getDefaults","globalThis","global","getDefaultExportFromCjs","__esModule","hasOwnProperty","module","pluralize$1","exports","root","pluralize","commonjsGlobal","pluralRules","singularRules","uncountables","irregularPlurals","irregularSingles","sanitizeRule","rule","restoreCase","word","toUpperCase","substr","sanitizeWord","len","replaceWord","replaceMap","keepMap","checkWord","bool","inclusive","singular","plural","isPlural","isSingular","addPluralRule","replacement","addSingularRule","addUncountableRule","addIrregularRule","single","hyperHTML","N","r","configurable","o","random","s","WeakSet","u","insertBefore","selected","selectedIndex","f","querySelectorAll","nextSibling","E","remove","parentNode","removeChild","compare","before","h","d","g","newi","oldi","prev","C","createEvent","initCustomEvent","bubbles","cancelable","_wire$","ELEMENT_NODE","nodeType","A","S","O","T","M","L","P","D","W","attributes","define","invoke","$","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","ie","ae","oe","ue","ce","le","se","fe","he","de","ve","pe","ge","me","ye","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","at","ut","ot","ct","lt","template","tagger","st","ft","ht","dt","vt","pt","gt","wire","Component","diff","hyper","for","handleEvent","currentTarget","svg","defaultState","dispatch","component","setState","idb","_idb","_marked","MIMEType","TypeError","parserMode","inputArray","from","char","fromEntries","parseMimeType","parameters","essence","mimeType","size","paramStr","serialize","_pluralize","webidl2","_webidl2","dashes","ISODate","Intl","DateTimeFormat","timeZone","year","month","day","dateLang","docLang","W3CDate","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","getIntlDataForKey","concatDate","date","sep","format","runTransforms","flist","funcArgs","methods","meth","showWarning","fetchAndCache","maxAge","Request","cachedResponse","caches","Date","err","response","fetch","ok","clonedResponse","clone","customHeaders","Headers","expiryDate","now","toISOString","cacheResponse","Response","blob","put","htmlJoinComma","joined","htmlJoinAnd","addHashId","hash","imul","hashString","addId","pfx","txt","noLC","normalize","getElementById","nextId","getDfnTitles","titleSet","normText","dataset","child","getElementsByTagName","localLt","renameElement","newName","copyAttributes","localName","newElement","append","replaceWith","refTypeFromContext","element","closestInformative","closest","isInformative","querySelector","illegal","wrapInner","outer","getPreviousSections","sections","previous","previousElementSibling","iteratePreviousElements","parents","selector","parentElement","getElementIndentation","previousSibling","Node","TEXT_NODE","InsensitiveStringSet","getCanonicalKey","existingKey","find","makeSafeCopy","dfn","removeCommentNodes","walker","createTreeWalker","NodeFilter","SHOW_COMMENT","walkTree","nextNode","CaseInsensitiveMap","RespecError","plugin","isWarning","elements","markAsOffending","details","showError","pluginName","makePluginUtils","toMDCode","codedJoinOr","quotes","addQuotes","codedJoinAnd","docLink","strings","reindent","endsWith","linkingText","indents","leastIndent","mimeTypes","rsDocToDataURL","validTypes","encodeURIComponent","cloneDoc","head","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","runnables","isRunnableModule","plug","run","Plugin","prepare","executePreparePass","timerId","measure","executeRunPass","postProcess","afterEnd","css$p","gtEntity","ampEntity","infoString","isEscaped","language","metaData","parseInfoString","example","illegalExample","className","firstSpace","metaDataStr","headingWithIdRegex","markdownToHtml","potentialMarkdown","convertElement","processMDSections","conf","hasMDSections","isMDFormat","rsUI","newBody","firstTwo","lastTwo","workaroundBlockLevelMarkdown","substituteWithTextNodes","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$D","group","style$1","github$1","dataInclude","abstract","dataTransform","dataAbbr","inlines","conformance","examples","issuesNotes","bestPractices","figures","tables","webidl","biblio$1","linkToDfn","xref","dataCite","renderBiblio","dfnIndex","contrib","fixHeaders","webidlIndex","structure","informative","idHeaders","caniuse","mdnAnnotation","saveHtml","searchSpecref","searchXref","aboutRespec","seo$1","seo","highlight","webidlClipboard","dataTests","listSorter","highlightVars$1","dataType","algorithms","anchorExpander","dfnPanel","webMonetization","dfnContract","beforeSave","checkCharset","checkPunctuation","checkInternalSlots","localRefsExist","noCaptionlessTables","noUnusedDfns","noHeadinglessSections","noUnusedVars","requiredSections","wptTestsExist","noHttpProps","a11y","informativeDfn","ReSpec.run","newHash","isLegacyFrag","W3C_GROUPS_API","getGroupDetails","shortname","wgId","wg","patentURI","wgPatentURI","patentPolicy","wgPatentPolicy","groupType","wgURI","status","groupDetails","groups","getMultipleGroupDetails","showLink","class","showLinkData","showLogo","logo","alt","height","width","until","es","ko","ja","zh","orcidIcon","showPeople","propName","people","validatePerson","person","docsUrl","seePersonHint","preamble","orcid","orcidUrl","orcidId","pathname","lastDigit","remainder","Number","reduce","acc","lastDigitInt","lastDigitShould","checkOrcidChecksum","retiredDate","rawDate","extras","extra","validateExtras","mailto","companyURL","company","personToHTML","personName","editorId","w3cid","contents","protocol","hCard","companyElem","note","classVal","renderExtra","time","archives","author","authors","commit_history","edited_in_place","editor","editors","feedback","former_editor","former_editors","history","implementation_report","latest_editors_draft","latest_published_version","latest_recommendation","message_topic","more_details_about_this_doc","multiple_alternates","prev_editor_draft","prev_recommendation","prev_version","publication_history","test_suite","this_version","with_subject_line","your_topic_here","nl","getSpecSubTitleElem","specSubTitleElem","subtitle","headersTmpl","logos","specType","isCR","isCRY","longStatus","textStatus","prependW3C","specStatus","dashDate","publishDate","modificationDate","renderSpecTitle","localStorage","getItem","thisVersion","latestVersion","edDraftURI","historyURI","github","commitHistoryURL","testSuiteURI","implementationReportURI","prevED","showPreviousVersion","prevVersion","prevRecURI","isRec","formerEditors","wgPublicList","renderFeedback","errata","otherLinks","shortName","alternateFormats","multipleAlternates","alternatesHTML","existingCopyright","isUnofficial","licenseInfo","copyrightStart","publishYear","additionalCopyrightHolders","short","linkLicense","renderOfficialCopyright","renderCopyright","repoURL","issuesURL","newIssuesURL","pullsURL","fullName","mailToURL","subject","subjectPrefix","mailingListLink","subjectLine","emailSubject","archiveURL","archiveLink","cgbgHeadersTmpl","specTitleElem","specTitleElemClone","isCGFinal","sotd","status_at_publication","processLink","sotdTmpl","isPreview","renderPreview","additionalContent","renderIsUnofficial","isTagFinding","isNoTrack","isMO","renderIsNoTrack","isMemberSubmission","teamComment","getUTCFullYear","submissionCommentNumber","patentPolicyURL","noteForMemberSubmission","noteForSubmission","sotdAfterWGinfo","overrideStatus","changes","proposedAdditions","proposedCorrections","corrections","hasRevisions","track","status2track","getWgHTML","linkToWorkingGroup","revisedRecEnd","updatableRec","reviewTarget","renderIsRec","statusExplanation","reviewPolicy","endorsement","updatePolicy","lsUpdatePolicy","pubMode","humanPREnd","humanCREnd","crEnd","prEnd","renderNotRec","isNote","isRegistry","multipleWGs","wgPatentHTML","producers","renderDeliverer","additionalSections","prUrl","prNumber","idx","cgbgSotdTmpl","mailToWGPublicListWithSubject","mailToWGPublicListSubscription","renderPublicList","issueBase","linkToCommunity","w3Url","status2maturity","LS","LD","FPWD","status2text","DNOTE","NOTE","STMT","MO","ED","WD","CR","CRD","PR","REC","DISC","RSCND","DRY","CRYD","CRY","RY","unofficial","UD","finding","status2long","W3CNotes","recTrackStatus","registryTrackStatus","tagStatus","cgStatus","bgStatus","cgbgStatus","trStatus","noTrackStatus","licenses","patentPolicies","validateDateAndRecover","fallbackDate","isFinite","formattedDate","collectSotdContent","sotdClone","hasChildNodes","isBasic","isCGBG","isCRDraft","isEd","isPR","isRecTrack","isRegular","isTagEditorFinding","license","lCaseLicense","deriveLicenseInfo","lastModified","pubSpace","derivePubSpace","maturity","docVersion","reportType","latestVersionURL","validateCGBG","validateIfAllowedOnTR","latestPath","previousPublishDate","previousMaturity","prevMaturity","pubDate","prevPubDate","prevRecShortname","uri","publishISODate","shortISODate","policies","policy","validatePatentPolicies","canShowHistory","historyURL","deriveHistoryURI","wgPotentialArray","isPr","isUpdatableRec","contains","hasCorrections","hasProposedCorrections","hasAdditions","hasProposedAdditions","noRecTrack","notAllowed","mailToWGPublicList","populateSoTD","generatedSubtitle","coreDefaults","lint","highlightVars","addSectionLinks","w3cLogo","memSubmissionLogo","w3cDefaults","doJsonLd","excludeGithubLinks","supportedStatus","validateStatusForGroup","isWgStatus","inWorkingGroup","doesNotNeedWG","processLogos","css$n","noReSpecCSS","attachFixupScript","getStyleUrl","resourceHints","createResourceHints","styleMover","linkURL","exportDoc","w3cStyle","styleFile","noToc","finalStyleURL","canonicalStatus","canUseW3CStyle","getStyleFile","colorScheme","darkModeStyleUrl","resolveGithubPromise","rejectGithubPromise","file_a_bug","participate","ghURL","tempURL","org","repo","branch","newProps","githubToken","githubUser","atRiskBase","pullBase","githubAPI","hostname","otherLink","normalizedGHObj","apiBase","normalizedConfig","DOMBuilder","findPosition","tagName","findParent","findHeader","addHeader","section","addSection","addElement","builder","restructure","structuredInternals","processResponse","rawData","oninclude","includeReplace","includeFormat","fill","fillWithText","attr","removeIncludeAttributes","runIncludes","currentDepth","includables","promisesToInclude","includeId","default_title","h1Elem","isConnected","tempElem","documentTitle","setDocumentTitle","isInteger","searchString","toLocaleLowerCase","findAbstract","processDfnElement","abbr","fullForm","insertAdjacentHTML","idlPrimitiveRegex","exceptionRegex","methodRegex","slotRegex","attributeRegex","baseRegex","enumRegex","methodSplitRegex","slotSplitRegex","isProbablySlotRegex","renderBase","renderParent","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","parseInlineIDL","output","ALLOWED_TYPES","readyPromise","openDB","deleteObjectStore","createObjectStore","keyPath","createIndex","range","IDBKeyRange","lowerBound","entry","expires","openIdb","biblioDB","isAlias","resolveAlias","only","aliasOf","addAll","aliasesAndRefs","alias","promisesToAdd","flatMap","isInDB","clear","storeNames","stores","clearStorePromises","biblio","bibrefsURL","doneResolver","updateFromNetwork","refs","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","localeCompare","sec","showRef","aliases","getAliases","refUrl","selectors","elems","linkType","decorateInlineReference","warnBadRefs","circular","renderInlineCitation","linkText","refId","stringifyReference","etAl","publisher","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","normativity","keywordInterpretation","terms","processConformance","validateDOMName","createAttribute","validateCommonName","definitionMap","registerDefinition","names","knownTypesMap","requiresFor","associateWith","validator","knownTypes","computeType","dfnFor","validateDefinition","noexport","derivedType","dfnType","allowedSlotTypes","processAsInternalSlot","closestType","computeExport","export","titles","pluralizeDfn","dfnTexts","dfns","getPluralizer","plurals","userDefinedPlurals","uniquePlurals","css$l","makeTitle","num","report","number","div","inAside","exampleTitle","css$j","editors_note","feature_at_risk","issue","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","makeIssueSectionSummary","allEls","issuesAndNotes","itm","HTMLElement","issueNumbers","issues","fetchAndStoreGithubIssues","headElem","ednote","best_practice","defaultLang","bps","bpSummary","summaryItems","bp","localizedBpName","container","list_of_figures","fig","tof","caption","figure","decorateFigure","figureId","tofCaption","anchor","getTableOfFiguresListItem","collectFigures","tofElement","previousSections","decorateTableOfFigures","list_of_tables","listOfTables","decorateTable","tableId","listOfTablesCaption","getListOfTablesListItem","collectTables","listOfTablesElement","decorateListOfTables","topLevelEntities","findDfn","defn","findNormalDfn","asMethodName","findOperationDfn","resolvedName","getDfns","alternativeDfns","decorateDfn","dfnElem","idlAst","lCaseParent","middle","last","getDataType","local","exportable","addAlternativeNames","asQualifiedName","asFullyQualifiedName","asMethodWithArgs","operationName","argsAst","operationNames","isOptional","requiredArgs","requiredOperation","optionalOps","generateMethodNamesWithArgs","getAlternativeNames","originalName","foundDfns","dfnForArray","closestDfnFor","idlStruct","copyButton","createButton","addCopyIDLButton","idlHeader","idlText","clipboard","writeText","css$h","idlPartials","Text","keyword","wrapped","idlLink","defineIdlName","getIdlDefinitionClassName","parentName","idlId","getNameAndId","getDfnType","isDefaultJSON","unlinkedAnchor","nameResolverMap","getDefnName","getIdlId","resolvePartial","overload","qualifiedName","fullyQualifiedName","resolveOverload","resolveNameAndId","topLevelIdlTypes","renderWebIDL","idlElement","highlights","closestCite","cites","addIDLHeader","idls","astArray","validations","validation","THIS_SPEC","getLinkProps","citeDetails","frag","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","dfnFors","oldDfn","oldIsDfn","newIsDfn","isSameDfnType","isSameDfnFor","findMatchingDfn","titleToDfns","linkTargets","linkForElem","getLinkTargets","dfnsByType","processAnchor","noLocalMatch","isCode","term","isIDL","needsCode","shouldWrapByCode","wrapAsCode","showLinkingError","mapTitleToDfns","badLinks","localAnchors","updateReferences","STORE_NAME","VERSION_CHECK_WAIT","getIdbCache","resolveXrefCache","queries","cachedData","lastChecked","setItem","API_URL","lastUpdated","shouldBustCache","clearXrefData","requiredKeySet","query","profiles","informativeRefsInNormative","getRequestEntry","getTermFromElement","specs","dataciteElem","closestSection","inlineRefs","uniqueSpecContext","higherPriority","uniqueSpecs","dedupeSpecContext","getSpecContext","types","getTypeContext","dataXrefForElem","getForContext","addDataCite","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","suffix","getLocalTermText","renderLocalTerm","createLocalTermIndex","externalTermIndex","dataSortedBySpec","specA","specB","createExternalTermIndex","apiURL","contributors","getContributors","sortedContributors","nameA","login","nameB","user","showContributors","getParents","idlIndexSec","idlIndex","lowerHeaderTags","toc","scanSections","maxTocLevel","appendixMode","lastNonAppendix","isAppendix","secno","isIntro","appendixNumber","createComment","createTocListItem","subsections","floor","getSectionTree","sectionElements","span","renameSectionHeaders","noTOC","maxToc","isNaN","sectionToSkipFromToC","skipFromToC","nav","h2","after","createTableOfContents","permalinkLabel","sectionType","sectionNumber","headings","selfLink","css$d","BROWSERS","statToText","defaultBrowsers","DEFAULTS","removeOnSave","browsers","feature","normalizeCaniuseConf","invalidBrowsers","browser","validateBrowsers","featureURL","headDlElem","contentPromise","statusText","fetchStats","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","summary","support","engines","mdnSubPath","engineSupport","getEngineSupportIcons","getEngineSupport","createRow","yesNoUnknown","displayStatus","createRowFromBrowserData","versionData","version_removed","versionAdded","version_added","buildBrowserSupportTable","mdnKey","mdn","getMdnKey","mdnSpecJson","mdnConf","baseJsonPath","getMdnData","findElements","mdnSpecArray","save_snapshot","downloadLinks","epubURL","saveDialog","filename","toDownloadLink","supportsDownload","HTMLAnchorElement","search_specref","specrefSearchUI","xrefSearchUI","about_respec","getEntriesByType","duration","round","perfEntryToTR","gitRevision","metaElem","firstParagraph","status2rdf","LC","requiresCanonicalLink","addPerson","ed","worksFor","addRef","jsonld","creator","publishedDate","isbn","canonicalURI","rdfStatus","w3p","foaf","datePublished","inLanguage","isBasedOn","copyrightHolder","discussionUrl","alternativeHeadline","addl","description","contributor","citationIds","citationContents","citation","addJSONLDInfo","css$9","fetchBase","_documentCurrentScript","workerPromise","workerScript","respecWorker$1","loadWorkerScript","workerURL","createObjectURL","Blob","Worker","createWorker","worker","nextMsgId","counter","gen","idGenerator","msgIdGenerator","highlightElement","languages","action","timeoutId","listener","sendHighlightRequest","innerText","noHighlightCSS","highlightables","promisesToHighlight","missing_test_suite_uri","tests","toListItem","emojiList","testFile","testParts","testFileName","requiresConnectionEmoji","manualPerformEmoji","toTestURLs","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","varMap","variables","currentSection","css$3","textNode","processBox","matchingElement","copy","processFigure","figcaption","figTitle","processTable","matchingTable","tableTitle","processSection","processHeading","localize","hadSelfLink","attrName","matchingClosest","newClosest","anchors","css$1","createPanel","panelId","panel","dfnExportedMarker","parentIdlBlock","idlMarker","titleToIDs","linkID","getReferenceTitle","toLinkProps","ids","listItemToHTML","referencesToHTML","panels","tabIndex","dfnPanel_runtime$1","loadScript","props","to","connectedCallback","fetchCommits","commits","commit","commitURL","pr","finally","gh","CUSTOM_ELEMENTS","customElements","readyPromises","monetization","paymentPointer","rawConfig","canonicalizeConfig","dfnsWithNoType","exportableDfns","addContractDefaults","describedDTs","dfnId","dfnContent","defines","definitionContainers","addDefinitionPointers","transforms","pos","performTransformations","metas","meta","punctuationMarks","punctuatingRegExp","offendingElements","isBrokenHyperlink","getElementsByName","HTMLTableCaptionElement","isDfnUnused","logger","HTMLHeadingElement","sectionContainsAlgorithm","varElems","varUsage","vars","sectionTitle","privacy_considerations","security_considerations","requiresSomeSectionStatus","missingRequiredSections","filesInWPT","githubAPIBase","wptDirectory","testSuiteURL","files","getFilesInWPT","missingTest","offendingMembers","getOwnPropertyNames","DISABLED_RULES","formatHintsAsMarkdown","violations","otherOptions","enabled","elementRef","resultTypes","reporter","axe","onload","onerror","importAxe","getViolations","violation","groupedBySummary","nodes","failureSummary","help","helpUrl","hints"],"mappings":"qHACA,MAAMA,IAAUC,OAAOC,QACvB,IAAKF,EAAO,CAMV,MAAME,EAAU,SAAUC,EAAMC,GAC9B,MAAMC,EAAUF,EAAKG,KAAIC,IACvB,KAAMA,KAAON,OAAOC,QAAQG,SAC1B,MAAM,IAAIG,MAAM,gCAAgCD,KAElD,OAAON,OAAOC,QAAQG,QAAQE,EAAI,IAEpCE,QAAQC,IAAIL,GAASM,MAAKC,GAAWR,KAAYQ,IACrD,EACEV,EAAQG,QAAU,GAClBJ,OAAOC,QAAUA,CACnB,CAMO,SAASW,EAAOC,EAAMC,GACtBf,IACHC,OAAOC,QAAQG,QAAQS,GAAQC,EAEnC,CCtBO,MAIDC,EAAgB,IAAIC,YAOnB,SAASC,EAAIC,EAAOC,GAEzB,GADAJ,EAAcK,cAAc,IAAIC,YAAYH,EAAO,CAAEC,YACjDnB,OAAOsB,SAAWtB,OAAOuB,KAC3B,OAGF,MAAMC,EAAOC,OAAOC,KAAKC,UAAUR,GAAQS,OAAST,IACpDnB,OAAOsB,OAAOO,YAAY,CAAEX,QAAOM,QAAQxB,OAAOsB,OAAOQ,SAASC,OACpE,CAWO,SAASC,EAAId,EAAOe,EAAIC,EAAU,CAAEC,MAAM,IAE/CpB,EAAcqB,iBAAiBlB,GADdmB,GAAKJ,EAAGI,EAAElB,SACqBe,EAClD,CAEAtB,EAnCoB,iBAmCP,CAAEoB,QCpCf,MAAMM,EAAa,CAAC,cAAe,cCG5B,MAEDC,EAAOC,SAASC,gBAGjBF,GAAMG,aAAa,UACtBH,EAAKI,KAAO,KACPJ,EAAKG,aAAa,SACrBH,EAAKK,IAAM,QAIR,MAAMC,EAAO,CAAA,EAEPF,EAAOJ,GAAMI,MAAQ,4DAdd,gBAgBb,SAAaG,GAClBA,EAAOD,KAAOA,EAAKF,IAASE,EAAK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AAKg2B,EACf,CAED,MAAM/oB,GAAEA,EAAEqsE,KAAEA,EAAI7L,YAAEA,EAAW8L,QAAEA,GAAYL,EACrC1nE,EAAQ,QAAQvE,MAAOqsE,KAC7B,IAAK,MAAOD,EAAgBhhD,KAAa8gD,EAAkB,CACzD,MAAMK,EAAQlB,GAAsBe,GAEpCxmD,GAAYrhB,EAAOniB,GAAM,CAAEkpC,QADX,OAAOk1C,SAAmB+L,oBAAwBD,MAC9BlhD,YACrC,CACF,CACH,ICtCA,MAAMhgC,GAAW,kBACJhJ,GAAO,oCAmBdgC,GAAO4gC,GAjBe,CAC1B1gC,GAAI,CACF6tB,IAAG,CAACy8C,EAAM1R,IACD,2BAA2B0R,oDAAuD1R,MAE3F,QAAIv5B,GACF,OAAOoI,EAAO;;;;;;;2DAOuC3gC,0CACtD,sDAKE,SAAakmC,GAClB,IAAKA,EAAKkc,OAAOpiD,IAAW,OAC5B,MAAM4+E,EAAiC,UAAxB14C,EAAKkc,KAAKpiD,IAAwBmgC,GAAY3F,GAE7DyqC,GAA2BlzD,SAAQ,EAAGyxD,OAAM3R,OAAMl0B,cAC5CA,EAAQ/E,UAAU6oB,SAAS,gBAC/Bm9B,EAAO5lF,GAAK+tB,IAAIy8C,EAAM3R,GAAO76D,GAAM,CACjCmiB,MAAO,6CACP6mB,SAAU,CAACrC,GACXpF,KAAMv/B,GAAKu/B,MACX,GAEN","x_google_ignoreList":[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,39]}
      \ No newline at end of file
      diff --git a/package.json b/package.json
      index 61e8b314e5..09ac227ddc 100644
      --- a/package.json
      +++ b/package.json
      @@ -1,6 +1,6 @@
       {
         "name": "respec",
      -  "version": "35.1.1",
      +  "version": "35.1.2",
         "license": "W3C",
         "description": "A technical specification pre-processor.",
         "engines": {