respec 35.9.0 → 37.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- window.respecVersion="35.9.0",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=document.documentElement;r?.hasAttribute("lang")||(r.lang="en",r.hasAttribute("dir")||(r.dir="ltr"));const o={},s=r?.lang??"en";var i=Object.freeze({__proto__:null,l10n:o,lang:s,name:"core/l10n",run:function(e){e.l10n=o[s]||o.en}});const a=(e,t)=>t.some((t=>e instanceof t));let l,c;const u=new WeakMap,d=new WeakMap,p=new WeakMap;let h={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return u.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return b(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function f(e){h=e(h)}function m(e){return(c||(c=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(y(this),t),b(this.request)}:function(...t){return b(e.apply(y(this),t))}}function g(e){return"function"==typeof e?m(e):(e instanceof IDBTransaction&&function(e){if(u.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)}));u.set(e,t)}(e),a(e,l||(l=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,h):e)}function b(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(b(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return p.set(t,e),t}(e);if(d.has(e))return d.get(e);const t=g(e);return t!==e&&(d.set(e,t),p.set(t,e)),t}const y=e=>p.get(e);const v=["get","getKey","getAll","getAllKeys","count"],w=["put","add","delete","clear"],k=new Map;function x(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(k.get(t))return k.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=w.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!v.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 k.set(t,s),s}f((e=>({...e,get:(t,n,r)=>x(t,n)||e.get(t,n,r),has:(t,n)=>!!x(t,n)||e.has(t,n)})));const $=["continue","continuePrimaryKey","advance"],_={},S=new WeakMap,E=new WeakMap,C={get(e,t){if(!$.includes(t))return e[t];let n=_[t];return n||(n=_[t]=function(...e){S.set(this,E.get(this)[t](...e))}),n}};async function*L(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,C);for(E.set(n,t),p.set(n,y(t));t;)yield n,t=await(S.get(n)||t.continue()),S.delete(n)}function A(e,t){return t===Symbol.asyncIterator&&a(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&a(e,[IDBIndex,IDBObjectStore])}f((e=>({...e,get:(t,n,r)=>A(t,n)?L:e.get(t,n,r),has:(t,n)=>A(t,n)||e.has(t,n)})));var R=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),b(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=b(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(b(i.result),e.oldVersion,e.newVersion,b(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:y,wrap:b});const T=/^[!#$%&'*+-.^`|~\w]+$/,P=/[\u000A\u000D\u0009\u0020]/u,N=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function j(e,t,n){(t&&""!==t&&!e.has(t)&&N.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function I(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function z(e){O=e}var q={exec:()=>null};function D(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(B.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var M=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),B={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},H=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,F=/(?:[*+-]|\d{1,9}[.)])/,U=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,W=D(U).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/\|table/g,"").getRegex(),G=D(U).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),V=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Z=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,K=D(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Z).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Q=D(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F).getRegex(),J="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",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Y=D("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",X).replace("tag",J).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ee=D(V).replace("hr",H).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",J).getRegex(),te={blockquote:D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ee).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:K,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:H,html:Y,lheading:W,list:Q,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ee,table:q,text:/^[^\n]+/},ne=D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",H).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",J).getRegex(),re={...te,lheading:G,table:ne,paragraph:D(V).replace("hr",H).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ne).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",J).getRegex()},oe={...te,html:D("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",X).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:q,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:D(V).replace("hr",H).replace("heading"," *#{1,6} *[^\n]").replace("lheading",W).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},se=/^( {2,}|\\)\n(?!\s*$)/,ie=/[\p{P}\p{S}]/u,ae=/[\s\p{P}\p{S}]/u,le=/[^\s\p{P}\p{S}]/u,ce=D(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ae).getRegex(),ue=/(?!~)[\p{P}\p{S}]/u,de=D(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",M?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,he=D(pe,"u").replace(/punct/g,ie).getRegex(),fe=D(pe,"u").replace(/punct/g,ue).getRegex(),me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ge=D(me,"gu").replace(/notPunctSpace/g,le).replace(/punctSpace/g,ae).replace(/punct/g,ie).getRegex(),be=D(me,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,ue).getRegex(),ye=D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,le).replace(/punctSpace/g,ae).replace(/punct/g,ie).getRegex(),ve=D(/\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),we=D(/^<(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(),ke=D(X).replace("(?:--\x3e|$)","--\x3e").getRegex(),xe=D("^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",ke).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$e=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,_e=D(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",$e).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Se=D(/^!?\[(label)\]\[(ref)\]/).replace("label",$e).replace("ref",Z).getRegex(),Ee=D(/^!?\[(ref)\](?:\[\])?/).replace("ref",Z).getRegex(),Ce=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Le={_backpedal:q,anyPunctuation:ve,autolink:we,blockSkip:de,br:se,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:q,emStrongLDelim:he,emStrongRDelimAst:ge,emStrongRDelimUnd:ye,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:_e,nolink:Ee,punctuation:ce,reflink:Se,reflinkSearch:D("reflink|nolink(?!\\()","g").replace("reflink",Se).replace("nolink",Ee).getRegex(),tag:xe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:q},Ae={...Le,link:D(/^!?\[(label)\]\((.*?)\)/).replace("label",$e).getRegex(),reflink:D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$e).getRegex()},Re={...Le,emStrongRDelimAst:be,emStrongLDelim:fe,url:D(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ce).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\S]|[^\s~\\]))\1(?=[^~]|$)/,text:D(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ce).getRegex()},Te={...Re,br:D(se).replace("{2,}","*").getRegex(),text:D(Re.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pe={normal:te,gfm:re,pedantic:oe},Ne={normal:Le,gfm:Re,breaks:Te,pedantic:Ae},je={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ie=e=>je[e];function Oe(e,t){if(t){if(B.escapeTest.test(e))return e.replace(B.escapeReplace,Ie)}else if(B.escapeTestNoEncode.test(e))return e.replace(B.escapeReplaceNoEncode,Ie);return e}function ze(e){try{e=encodeURI(e).replace(B.percentDecode,"%")}catch{return null}return e}function qe(e,t){let n=e.replace(B.findPipe,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(B.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-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(B.slashPipe,"|");return n}function De(e,t,n){let r=e.length;if(0===r)return"";let o=0;for(;o<r;){if(e.charAt(r-o-1)!==t)break;o++}return e.slice(0,r-o)}function Me(e,t,n,r,o){let s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}var Be=class{options;rules;lexer;constructor(e){this.options=e||O}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:De(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let o=r[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=De(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:De(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=De(t[0],"\n").split("\n"),n="",r="",o=[];for(;e.length>0;){let t,s=!1,i=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))i.push(e[t]),s=!0;else{if(s)break;i.push(e[t])}e=e.slice(t);let a=i.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;let u=o.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){let t=u,s=t.raw+"\n"+e.join("\n"),i=this.blockquote(s);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{let t=u,s=t.raw+"\n"+e.join("\n"),i=this.list(s);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=s.substring(o.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),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:"[*+-]");let s=this.rules.other.listItemRegex(n),i=!1;for(;e;){let n=!1,r="",a="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=!l.trim(),d=0;if(this.options.pedantic?(d=2,a=l.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=l.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),s=this.rules.other.headingBeginRegex(d),i=this.rules.other.htmlBeginRegex(d);for(;e;){let p,h=e.split("\n",1)[0];if(c=h,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),p=c):p=c.replace(this.rules.other.tabCharGlobal," "),o.test(c)||s.test(c)||i.test(c)||t.test(c)||n.test(c))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!c.trim())a+="\n"+p.slice(d);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||s.test(l)||n.test(l))break;a+="\n"+c}!u&&!c.trim()&&(u=!0),r+=h+"\n",e=e.substring(h.length+1),l=p.slice(d)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(i=!0));let p,h=null;this.options.gfm&&(h=this.rules.other.listIsTask.exec(a),h&&(p="[ ] "!==h[0],a=a.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:r,task:!!h,checked:p,loose:!1,text:a,tokens:[]}),o.raw+=r}let a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.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){let t=o.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.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){let 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){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$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){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=qe(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?s.align.push("right"):this.rules.other.tableAlignCenter.test(e)?s.align.push("center"):this.rules.other.tableAlignLeft.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e<n.length;e++)s.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:s.align[e]});for(let e of o)s.rows.push(qe(e,s.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]}))));return s}}lheading(e){let 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){let t=this.rules.block.paragraph.exec(e);if(t){let 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){let 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){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.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){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=De(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let 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 n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let 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){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Me(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Me(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,o,s=[...r[0]].length-1,i=s,a=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+s);null!=(r=l.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(o=[...n].length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&s%3&&!((s+o)%3)){a+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+a);let t=[...r[0]][0].length,l=e.slice(0,s+r.index+t+o);if(Math.min(s,o)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let 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){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=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=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=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){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},He=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||O,this.options.tokenizer=this.options.tokenizer||new Be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:B,block:Pe.normal,inline:Ne.normal};this.options.pedantic?(t.block=Pe.pedantic,t.inline=Ne.pedantic):this.options.gfm&&(t.block=Pe.gfm,this.options.breaks?t.inline=Ne.breaks:t.inline=Ne.gfm),this.tokenizer.rules=t}static get rules(){return{block:Pe,inline:Ne}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(B.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(B.tabCharGlobal," ").replace(B.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some((n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0))))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(o=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let s=t.at(-1);n&&"paragraph"===s?.type?(s.raw+=(s.raw.endsWith("\n")?"":"\n")+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):t.push(r),n=o.length!==e.length,e=e.substring(r.raw.length)}else if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r)}else if(e){let 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=e,o=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(r));)n=o[2]?o[2].length:0,r=r.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,i="";for(;e;){let n;if(s||(i=""),s=!1,this.options.extensions?.inline?.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,i)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let o=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(o=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(i=n.raw.slice(-1)),s=!0;let r=t.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n)}else if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},Fe=class{options;parser;constructor(e){this.options=e||O}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(B.notSpaceStart)?.[0],o=e.replace(B.endingNewline,"")+"\n";return r?'<pre><code class="language-'+Oe(r)+'">'+(n?o:Oe(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:Oe(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+Oe(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let o=e.rows[t];n="";for(let e=0;e<o.length;e++)n+=this.tablecell(o[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Oe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=ze(e);if(null===o)return r;let s='<a href="'+(e=o)+'"';return t&&(s+=' title="'+Oe(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=ze(e);if(null===o)return Oe(n);let s=`<img src="${e=o}" alt="${n}"`;return t&&(s+=` title="${Oe(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Oe(e.text)}},Ue=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},We=class e{options;renderer;textRenderer;constructor(e){this.options=e||O,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ue}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){n+=t||"";continue}}let s=o;switch(s.type){case"space":n+=this.renderer.space(s);continue;case"hr":n+=this.renderer.hr(s);continue;case"heading":n+=this.renderer.heading(s);continue;case"code":n+=this.renderer.code(s);continue;case"table":n+=this.renderer.table(s);continue;case"blockquote":n+=this.renderer.blockquote(s);continue;case"list":n+=this.renderer.list(s);continue;case"html":n+=this.renderer.html(s);continue;case"def":n+=this.renderer.def(s);continue;case"paragraph":n+=this.renderer.paragraph(s);continue;case"text":{let o=s,i=this.renderer.text(o);for(;r+1<e.length&&"text"===e[r+1].type;)o=e[++r],i+="\n"+this.renderer.text(o);n+=t?this.renderer.paragraph({type:"paragraph",raw:i,text:i,tokens:[{type:"text",raw:i,text:i,escaped:!0}]}):i;continue}default:{let 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=this.renderer){let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let 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}}let s=o;switch(s.type){case"escape":case"text":n+=t.text(s);break;case"html":n+=t.html(s);break;case"link":n+=t.link(s);break;case"image":n+=t.image(s);break;case"strong":n+=t.strong(s);break;case"em":n+=t.em(s);break;case"codespan":n+=t.codespan(s);break;case"br":n+=t.br(s);break;case"del":n+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},Ge=class{options;block;constructor(e){this.options=e||O}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?He.lex:He.lexInline}provideParser(){return this.block?We.parse:We.parseInline}},Ve=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.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=We;Renderer=Fe;TextRenderer=Ue;Lexer=He;Tokenizer=Be;Hooks=Ge;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{let 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){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let 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){let 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'");let 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){let t=this.defaults.renderer||new Fe(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let 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){let t=this.defaults.tokenizer||new Be(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let 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){let t=this.defaults.hooks||new Ge;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,o=e.hooks[r],s=t[r];Ge.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Ge.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await o.call(t,e);return s.call(t,n)})();let r=o.call(t,e);return s.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await o.apply(t,e);return!1===n&&(n=await s.apply(t,e)),n})();let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let 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 He.lex(e,t??this.defaults)}parser(e,t){return We.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},o={...this.defaults,...r},s=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(t):t,r=await(o.hooks?await o.hooks.provideLexer():e?He.lex:He.lexInline)(n,o),s=o.hooks?await o.hooks.processAllTokens(r):r;o.walkTokens&&await Promise.all(this.walkTokens(s,o.walkTokens));let i=await(o.hooks?await o.hooks.provideParser():e?We.parse:We.parseInline)(s,o);return o.hooks?await o.hooks.postprocess(i):i})().catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let n=(o.hooks?o.hooks.provideLexer():e?He.lex:He.lexInline)(t,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let r=(o.hooks?o.hooks.provideParser():e?We.parse:We.parseInline)(n,o);return o.hooks&&(r=o.hooks.postprocess(r)),r}catch(e){return s(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+Oe(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Ze(e,t){return Ve.parse(e,t)}function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Ze.options=Ze.setOptions=function(e){return Ve.setOptions(e),Ze.defaults=Ve.defaults,z(Ze.defaults),Ze},Ze.getDefaults=I,Ze.defaults=O,Ze.use=function(...e){return Ve.use(...e),Ze.defaults=Ve.defaults,z(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=Fe,Ze.TextRenderer=Ue,Ze.Lexer=He,Ze.lexer=He.lex,Ze.Tokenizer=Be,Ze.Hooks=Ge,Ze.parse=Ze,Ze.options,Ze.setOptions,Ze.use,Ze.walkTokens,Ze.parseInline,We.parse,He.lex;var Qe,Je={exports:{}};var Xe,Ye=(Qe||(Qe=1,Xe=Je,function(e,t){Xe.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 l(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 c(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):l(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&l(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=c(o,r,e),d.isPlural=u(o,r,e),d.singular=c(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}))),Je.exports),et=Ke(Ye),tt=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 l,c=e(n[r],1);t.insertBefore(c,s),i&&a&&c.selected&&(a=!a,l=t.selectedIndex,t.selectedIndex=l<0?r:d.call(t.querySelectorAll("option"),c)),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 l=t,c=o;l<n&&c<s&&i(e[l],r[c]);)l++,c++;if(c===s)return t;t=l+1}return-1}function l(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function c(e,t,n,r){for(;n<r;)h(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},h=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function f(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,h=null==r.before?null:d(r.before,0),f=t.length,m=f,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 v=g===m,w=y===b;if(v&&w)return n;if(v&&y<b)return o(d,e,n,y,b,l(d,t,g,f,h)),n;if(w&&g<m)return c(d,t,g,m),n;var k=m-g,x=b-y,$=-1;if(k<x){if(-1<($=a(n,y,b,t,g,m,u)))return o(d,e,n,y,$,d(t[g],0)),o(d,e,n,$+k,b,l(d,t,m,f,h)),n}else if(x<k&&-1<($=a(t,g,m,n,y,b,u)))return c(d,t,g,$),c(d,t,$+x,m),n;return k<2||x<2?(o(d,e,n,y,b,d(t[g],0)),c(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,y,b,l(d,t,m,f,h)):function(e,t,n,r,s,i,a,l,u,d,h,f,m){!function(e,t,n,r,s,i,a,l,u){for(var d=[],p=e.length,h=a,f=0;f<p;)switch(e[f++]){case 0:s++,h++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,h<l?t(i[h],0):u);break;case-1:h++}for(f=0;f<p;)switch(e[f++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:c(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,l,c,u,d,p,h=n+s,f=[];e:for(b=0;b<=h;b++){if(50<b)return null;for(p=b-1,u=b?f[b-1]:[0,0],d=f[b]=[],a=-b;a<=b;a+=2){for(l=(c=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;c<s&&l<n&&i(r[o+c],e[t+l]);)c++,l++;if(c===s&&l===n)break e;d[b+a]=c}}for(var m=Array(b/2+h/2),g=m.length-1,b=f.length-1;0<=b;b--){for(;0<c&&0<l&&i(r[o+c-1],e[t+l-1]);)m[g--]=0,c--,l--;if(!b)break;p=b-1,u=b?f[b-1]:[0,0],(a=c-l)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(l--,m[g--]=1):(c--,m[g--]=-1)}return m}(n,r,i,a,l,d,f)||function(e,t,n,r,o,s,i,a){var l=0,c=r<a?r:a,u=Array(c++),d=Array(c);d[0]=-1;for(var h=1;h<c;h++)d[h]=i;for(var f=o.slice(s,i),m=t;m<n;m++){var g,b=f.indexOf(e[m]);-1<b&&-1<(l=p(d,c,g=b+s))&&(d[l]=g,u[l]={newi:m,oldi:g,prev:u[l-1]})}for(l=--c,--i;d[l]>i;)--l;c=a+r-l;var y=Array(c),v=u[l];for(--n;v;){for(var w=v.newi,k=v.oldi;w<n;)y[--c]=1,--n;for(;k<i;)y[--c]=-1,--i;y[--c]=0,--n,--i,v=v.prev}for(;t<=n;)y[--c]=1,--n;for(;s<=i;)y[--c]=-1,--i;return y}(n,r,s,i,a,l,u,d),e,t,n,r,a,l,h,m)}(d,e,n,y,b,x,t,g,m,k,f,u,h),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 v=y.Map;function w(){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(w.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,_,S,E,C,L,A={},R={},T=[],P=R.hasOwnProperty,N=0,j={attributes:A,define:function(e,t){e.indexOf("-")<0?(e in R||(N=T.push(e)),R[e]=t):A[e]=t},invoke:function(e,t){for(var n=0;n<N;n++){var r=T[n];if(P.call(e,r))return R[r](e[r],t)}}},I=Array.isArray||(_=($={}.toString).call([]),function(e){return $.call(e)===_}),O=(S=e,E="fragment",L="content"in q(C="template")?function(e){var t=q(C);return t.innerHTML=e,t.content}:function(e){var t,n=q(E),r=q(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=q(E),n=q("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 q(e){return e===E?S.createDocumentFragment():S.createElementNS("http://www.w3.org/1999/xhtml",e)}var D,M,B,H,F,U,W,G,V,Z=(M="appendChild",B="cloneNode",H="createTextNode",U=(F="importNode")in(D=e),(W=D.createDocumentFragment())[M](D[H]("g")),W[M](D[H]("")),(U?D[F](W,!0):W[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}:U?D[F]: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:._-]*)((?:",le="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",ce=new RegExp(ae+ie+le+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+le+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,he)+r}function he(e,t,n){return t+(n||'"')+Q+(n||'"')}function fe(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 l=s[a];switch(l.nodeType){case ee:var c=o.concat(a);!function(t,n,r,o){for(var s,i=t.attributes,a=[],l=[],c=me(i,r),u=c.length,d=0;d<u;){var p=c[d++],h=p.value===Q;if(h||1<(s=p.value.split(X)).length){var f=p.name;if(a.indexOf(f)<0){a.push(f);var m=r.shift().replace(h?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+f+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(h)n.push(be(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(be(g,o,m,s))}}l.push(p)}}for(var y=((d=0)<(u=l.length)&&J&&!("ownerSVGElement"in t));d<u;){var v=l[d++];y&&(v.value=""),t.removeAttribute(v.name)}var w=t.nodeName;if(/^script$/i.test(w)){var k=e.createElement(w);for(u=i.length,d=0;d<u;)k.setAttributeNode(i[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(l,n,r,c),ge(l,n,r,c);break;case Y:var u=l.textContent;if(u===Q)r.shift(),n.push(ne.test(t.nodeName)?ye(t,o):{type:"any",node:l,path:o.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(l),a--,i--}break;case te:ne.test(t.nodeName)&&K.call(l.textContent)===X&&(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 ve,we=(ve=new n,{get:function(e){return ve.get(e)},set:function(e,t){return ve.set(e,t),t}});function ke(e,t){var n=(e.convert||function(e){return e.join(X).replace(ue,fe).replace(ce,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 l=s[i++],c=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,l.path);switch(l.type){case"any":r.push({fn:e.any(c,[]),sparse:!1});break;case"attr":var u=l.sparse,d=e.attribute(c,l.name,l.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(c),sparse:!1}),c.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 l=a.values,c=l[0],u=1,d=l.length;for(i+=d-2;u<d;)c+=arguments[s++]+l[u++];a.fn(c)}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,Se,Ee=(_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),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,l;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(l=o[i])||_e.test(i)?l:l+"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(Se,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,Re,Te=(Ae=[].slice,(Re=Pe.prototype).ELEMENT_NODE=1,Re.nodeType=111,Re.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},Re.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},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 Ne(e){return{html:e}}function je(e,t){switch(e.nodeType){case Ue:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Fe:return je(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(Ne).then(t):Promise.resolve(j.invoke(e,t)).then(t)}function Oe(e){return null!=e&&"then"in e}var ze,qe,De,Me,Be,He="ownerSVGElement",Fe=w.prototype.nodeType,Ue=Te.prototype.nodeType,We=(qe=(ze={Event:b,WeakSet:u}).Event,De=ze.WeakSet,Me=!0,Be=null,function(e){return Me&&(Me=!Me,Be=new De,function(e){var t=new De,n=new De;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 qe(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,l=0;l<a;e(i[l++],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=we.get(i)||we.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=He in e;if("style"===t)return Ee(e,n,o);if("."===t.slice(0,1))return c=e,u=t.slice(1),o?function(e){try{c[u]=e}catch(t){c.setAttribute(u,e)}}:function(e){c[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){l!==!!e&&((l=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?We(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 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,l,c,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=He 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=f(e.parentNode,t,[(l=a,e.ownerDocument.createTextNode(l))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=f(e.parentNode,t,[],r);break}default:if(s=!1,I(n=a))if(0===a.length)t.length&&(t=f(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=f(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=f(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=f(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 l}},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(""):j.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)),l=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||l?(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=l?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 Te(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(He 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,lt,ct=j.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=w,dt.bind=function(e){return ot.bind(e)},dt.define=ct,dt.diff=f,(dt.hyper=dt).observe=We,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,lt=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(w,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,l=t.get(e)||lt(e,t);switch(typeof o){case"object":case"function":var c=l.w||(l.w=new n);return c.get(o)||(s=c,i=o,a=new e(r),s.set(i,a),a);default:var u=l.p||(l.p=at(null));return u[o]||(u[o]=new e(r))}}(this,it.get(e)||(r=e,o=new v,it.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(w.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{Component:nt,bind:rt,define:ot,diff:st,hyper:it,wire:at}=tt,lt=tt,ct=R,ut=Ze,dt=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 l=a[e];switch(i){case"type":if("/"===l){i="subtype";continue}t+=l;break;case"subtype":if(";"===l){i="param-start";continue}n+=l;break;case"param-start":if(P.test(l)||";"===l)continue;r+=l,i="param-name";break;case"param-name":if("="===l||";"===l){if("="===l){i="param-value",o=null;continue}s.set(r.toLowerCase(),null),r="";continue}r+=l;break;case"param-value":if('"'==l){i="collect-quoted-string";continue}if(";"===l){o=o.trimEnd(),i="param-start",j(s,r,o),r="";continue}o="string"==typeof o?o+l:l;break;case"collect-quoted-string":if('"'===l){j(s,r,o),i="ignore-input-until-next-param",r="",o=null;continue}if("\\"===l)continue;o="string"==typeof o?o+l:l;break;case"ignore-input-until-next-param":if(";"!==l)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&j(s,r,o);if(""===t.trim()||!T.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!T.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?T.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},pt=et,ht=/-/g,ft=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"});"en"===s||s.startsWith("en-");const mt=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function gt(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 bt(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function yt(e,t="long"){const n=new Intl.ListFormat(s,{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 vt=yt("conjunction"),wt=yt("disjunction");function kt(e,t){return vt(e,t).join("")}function xt(e){return e.trim().replace(/\s+/g," ")}function $t(e,t=s){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const r=function(e,t,n=s){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 _t(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){Mt(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace.",cause:e})}}}return e}function St(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>lt`${e}, `));return lt`${r}${n[n.length-1]}`}function Et(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 Ct(e){const t=new Set,n="ltNodefault"in e.dataset?"":xt(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>xt(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(xt(e))))}return[...t]}function Lt(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 At(e,t){const n=t.closest(mt);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 Rt(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function Tt(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 Pt(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 Nt 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 jt(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{Lt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),It(t),t}function It(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Ot(t)])e.remove()}function*Ot(e){for(;e.nextNode();)yield e.currentNode}class zt 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 qt extends Error{constructor(e,t,n){super(e,{...n.cause&&{cause:n.cause}});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||Et(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,...this.cause instanceof Error&&{cause:{name:this.cause.name,message:this.cause.message,stack:this.cause.stack}}}}}function Dt(e,t,n={}){const r={...n,isWarning:!1};Zt("error",new qt(e,t,r))}function Mt(e,t,n={}){const r={...n,isWarning:!0};Zt("warn",new qt(e,t,r))}function Bt(e){return{showError:(t,n)=>Dt(t,e,n),showWarning:(t,n)=>Mt(t,e,n)}}function Ht(e){return e?`\`${e}\``:""}function Ft(e,{quotes:t}={quotes:!1}){return wt(e,t?e=>Ht(Ut(e)):Ht).join("")}function Ut(e){return String(e)?`"${e}"`:""}function Wt(e,...t){return Gt(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 Gt(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 Vt=new EventTarget;function Zt(e,t){if(Vt.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 Kt(e,t,n={once:!1}){Vt.addEventListener(e,(async n=>{try{await t(n.detail)}catch(t){Dt(`Error in handler for topic "${e}": ${t.message}`,`sub:${e}`,{cause:t})}}),n)}n("core/pubsubhub",{sub:Kt});const Qt=["githubToken","githubUser"];const Jt=new Map([["text/html","html"],["application/xml","xml"]]);function Xt(e,t=document){const n=Jt.get(e);if(!n){const t=[...Jt.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=Yt(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function Yt(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;It(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),bt(r);const o=e.createDocumentFragment(),s=e.querySelector("meta[name='viewport']");s&&t.firstChild!==s&&o.appendChild(s);let i=e.querySelector("meta[charset], meta[content*='charset=']");i||(i=lt`<meta charset="utf-8" />`);o.appendChild(i);const a=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=lt`
1
+ window.respecVersion="37.0.0",function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const t=document.documentElement;t?.hasAttribute("lang")||(t.lang="en",t.hasAttribute("dir")||(t.dir="ltr"));const n={},r=t?.lang??"en";var o=Object.freeze({__proto__:null,l10n:n,lang:r,name:"core/l10n",run:function(e){e.l10n=n[r]||n.en}});const s=(e,t)=>t.some((t=>e instanceof t));let i,a;const l=new WeakMap,c=new WeakMap,u=new WeakMap;let d={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return l.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return m(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function p(e){d=e(d)}function h(e){return(a||(a=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(g(this),t),m(this.request)}:function(...t){return m(e.apply(g(this),t))}}function f(e){return"function"==typeof e?h(e):(e instanceof IDBTransaction&&function(e){if(l.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)}));l.set(e,t)}(e),s(e,i||(i=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,d):e)}function m(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(m(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",s)}));return u.set(t,e),t}(e);if(c.has(e))return c.get(e);const t=f(e);return t!==e&&(c.set(e,t),u.set(t,e)),t}const g=e=>u.get(e);const b=["get","getKey","getAll","getAllKeys","count"],y=["put","add","delete","clear"],v=new Map;function w(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(v.get(t))return v.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=y.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!b.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 v.set(t,s),s}p((e=>({...e,get:(t,n,r)=>w(t,n)||e.get(t,n,r),has:(t,n)=>!!w(t,n)||e.has(t,n)})));const k=["continue","continuePrimaryKey","advance"],x={},$=new WeakMap,S=new WeakMap,_={get(e,t){if(!k.includes(t))return e[t];let n=x[t];return n||(n=x[t]=function(...e){$.set(this,S.get(this)[t](...e))}),n}};async function*E(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const n=new Proxy(t,_);for(S.set(n,t),u.set(n,g(t));t;)yield n,t=await($.get(n)||t.continue()),$.delete(n)}function L(e,t){return t===Symbol.asyncIterator&&s(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&s(e,[IDBIndex,IDBObjectStore])}p((e=>({...e,get:(t,n,r)=>L(t,n)?E:e.get(t,n,r),has:(t,n)=>L(t,n)||e.has(t,n)})));var C,R=Object.freeze({__proto__:null,deleteDB:function(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(e=>t(e.oldVersion,e))),m(n).then((()=>{}))},openDB:function(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),a=m(i);return r&&i.addEventListener("upgradeneeded",(e=>{r(m(i.result),e.oldVersion,e.newVersion,m(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:g,wrap:m});!function(e){e.ILLEGAL="ILLEGAL",e.EOF="EOF",e.NL="\n",e.SPACE=" ",e.UNDERSCORE="_",e.DOLLAR="$",e.ATSIGN="@",e.CARET="^",e.HASH="#",e.TILDE="~",e.AMPERSAND="&",e.IDENT="IDENT",e.COMMENT="COMMENT",e.STRING="STRING",e.NUMBER="NUMBER",e.FLOAT="FLOAT",e.CTLOP="CTLOP",e.BYTES="BYTES",e.HEX="HEX",e.BASE64="BASE64",e.ASSIGN="=",e.ARROWMAP="=>",e.TCHOICE="/",e.GCHOICE="//",e.TCHOICEALT="/=",e.GCHOICEALT="//=",e.PLUS="+",e.MINUS="-",e.QUEST="?",e.ASTERISK="*",e.INCLRANGE="..",e.EXCLRANGE="...",e.COMMA=",",e.DOT=".",e.COLON=":",e.SEMICOLON=";",e.LPAREN="(",e.RPAREN=")",e.LBRACE="{",e.RBRACE="}",e.LBRACK="[",e.RBRACK="]",e.LT="<",e.GT=">",e.QUOT='"'}(C||(C={}));const A=Object.entries(C).reduce(((e,[t,n])=>(e[n]=t,e)),{});new class{type;literal;comments;whitespace;constructor(e,t,n=[],r=""){this.type=e,this.literal=t,this.comments=n,this.whitespace=r}serialize(){let e="";for(const t of this.comments)e+=t.serialize();switch(e+=this.whitespace,this.type){case C.IDENT:case C.COMMENT:case C.NUMBER:case C.FLOAT:e+=this.literal;break;case C.STRING:e+='"'+this.literal+'"';break;case C.CTLOP:e+="."+this.literal;break;case C.BYTES:e+="'"+this.literal+"'";break;case C.HEX:e+="h'"+this.literal+"'";break;case C.BASE64:e+="b64'"+this.literal+"'";break;case C.EOF:break;default:e+=this.type.valueOf()}return e}startWithSpaces(){return""!==this.whitespace||this.comments.length>0}toString(e=0){const t=[`${" ".repeat(e)}${this.constructor.name}: ${A[this.type]} (${this.type})`];""!==this.whitespace&&t.push(" ".repeat(e+1)+`whitespaces: ${this.whitespace.length}`),""!==this.literal&&t.push(" ".repeat(e+1)+`literal: ${this.literal}`);for(const n of this.comments)t.push(n.toString(e+1));return t.join("\n")}toJSON(){return{type:this.type,literal:this.literal,comments:this.comments?.map((e=>e.toJSON())),whitespace:this.whitespace}}}(C.ILLEGAL,"");const T=/^[!#$%&'*+-.^`|~\w]+$/,N=/[\u000A\u000D\u0009\u0020]/u,P=/^[\u0009\u{0020}-\{u0073}\u{0080}-\u{00FF}]+$/u;function j(e,t,n){(t&&""!==t&&!e.has(t)&&P.test(n)||null===n)&&e.set(t.toLowerCase(),n)}function O(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function z(e){I=e}var D={exec:()=>null};function M(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(B.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var q=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),B={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},H=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,U=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,F=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,W=M(F).replace(/bull/g,U).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/\|table/g,"").getRegex(),G=M(F).replace(/bull/g,U).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),V=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Z=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,K=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Z).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Q=M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,U).getRegex(),J="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",X=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Y=M("^ {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[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",X).replace("tag",J).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ee=M(V).replace("hr",H).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[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",J).getRegex(),te={blockquote:M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ee).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:K,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:H,html:Y,lheading:W,list:Q,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ee,table:D,text:/^[^\n]+/},ne=M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",H).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",J).getRegex(),re={...te,lheading:G,table:ne,paragraph:M(V).replace("hr",H).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",J).getRegex()},oe={...te,html:M("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",X).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:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(V).replace("hr",H).replace("heading"," *#{1,6} *[^\n]").replace("lheading",W).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},se=/^( {2,}|\\)\n(?!\s*$)/,ie=/[\p{P}\p{S}]/u,ae=/[\s\p{P}\p{S}]/u,le=/[^\s\p{P}\p{S}]/u,ce=M(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ae).getRegex(),ue=/(?!~)[\p{P}\p{S}]/u,de=M(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",q?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pe=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,he=M(pe,"u").replace(/punct/g,ie).getRegex(),fe=M(pe,"u").replace(/punct/g,ue).getRegex(),me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ge=M(me,"gu").replace(/notPunctSpace/g,le).replace(/punctSpace/g,ae).replace(/punct/g,ie).getRegex(),be=M(me,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,ue).getRegex(),ye=M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,le).replace(/punctSpace/g,ae).replace(/punct/g,ie).getRegex(),ve=M(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ie).getRegex(),we=M("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,le).replace(/punctSpace/g,ae).replace(/punct/g,ie).getRegex(),ke=M(/\\(punct)/,"gu").replace(/punct/g,ie).getRegex(),xe=M(/^<(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(),$e=M(X).replace("(?:--\x3e|$)","--\x3e").getRegex(),Se=M("^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",$e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_e=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ee=M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",_e).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=M(/^!?\[(label)\]\[(ref)\]/).replace("label",_e).replace("ref",Z).getRegex(),Ce=M(/^!?\[(ref)\](?:\[\])?/).replace("ref",Z).getRegex(),Re=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ae={_backpedal:D,anyPunctuation:ke,autolink:xe,blockSkip:de,br:se,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:D,delLDelim:D,delRDelim:D,emStrongLDelim:he,emStrongRDelimAst:ge,emStrongRDelimUnd:ye,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Ee,nolink:Ce,punctuation:ce,reflink:Le,reflinkSearch:M("reflink|nolink(?!\\()","g").replace("reflink",Le).replace("nolink",Ce).getRegex(),tag:Se,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:D},Te={...Ae,link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",_e).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_e).getRegex()},Ne={...Ae,emStrongRDelimAst:be,emStrongLDelim:fe,delLDelim:ve,delRDelim:we,url:M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Re).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\S]|[^\s~\\]))\1(?=[^~]|$)/,text:M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Re).getRegex()},Pe={...Ne,br:M(se).replace("{2,}","*").getRegex(),text:M(Ne.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},je={normal:te,gfm:re,pedantic:oe},Oe={normal:Ae,gfm:Ne,breaks:Pe,pedantic:Te},Ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ze=e=>Ie[e];function De(e,t){if(t){if(B.escapeTest.test(e))return e.replace(B.escapeReplace,ze)}else if(B.escapeTestNoEncode.test(e))return e.replace(B.escapeReplaceNoEncode,ze);return e}function Me(e){try{e=encodeURI(e).replace(B.percentDecode,"%")}catch{return null}return e}function qe(e,t){let n=e.replace(B.findPipe,((e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(B.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-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(B.slashPipe,"|");return n}function Be(e,t,n){let r=e.length;if(0===r)return"";let o=0;for(;o<r;){if(e.charAt(r-o-1)!==t)break;o++}return e.slice(0,r-o)}function He(e){let t=e.split("\n"),n=t.length-1;for(;n>=0&&B.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join("\n")}function Ue(e,t=0){let n=t,r="";for(let t of e)if("\t"===t){let e=4-n%4;r+=" ".repeat(e),n+=e}else r+=t,n++;return r}function Fe(e,t,n,r,o){let s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}var We=class{options;rules;lexer;constructor(e){this.options=e||I}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:He(t[0]),n=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:n}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let o=r[1];return t.split("\n").map((e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Be(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:Be(t[0],"\n"),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Be(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Be(t[0],"\n").split("\n"),n="",r="",o=[];for(;e.length>0;){let t,s=!1,i=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))i.push(e[t]),s=!0;else{if(s)break;i.push(e[t])}e=e.slice(t);let a=i.join("\n"),l=a.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;let u=o.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){let t=u,s=t.raw+"\n"+e.join("\n"),i=this.blockquote(s);o[o.length-1]=i,n=n.substring(0,n.length-t.raw.length)+i.raw,r=r.substring(0,r.length-t.text.length)+i.text;break}if("list"!==u?.type);else{let t=u,s=t.raw+"\n"+e.join("\n"),i=this.list(s);o[o.length-1]=i,n=n.substring(0,n.length-u.raw.length)+i.raw,r=r.substring(0,r.length-t.raw.length)+i.raw,e=s.substring(o.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),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:"[*+-]");let s=this.rules.other.listItemRegex(n),i=!1;for(;e;){let n=!1,r="",a="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=Ue(t[2].split("\n",1)[0],t[1].length),c=e.split("\n",1)[0],u=!l.trim(),d=0;if(this.options.pedantic?(d=2,a=l.trimStart()):u?d=t[1].length+1:(d=l.search(this.rules.other.nonSpaceChar),d=d>4?1:d,a=l.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),s=this.rules.other.headingBeginRegex(d),i=this.rules.other.htmlBeginRegex(d),p=this.rules.other.blockquoteBeginRegex(d);for(;e;){let h,f=e.split("\n",1)[0];if(c=f,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),h=c):h=c.replace(this.rules.other.tabCharGlobal," "),o.test(c)||s.test(c)||i.test(c)||p.test(c)||t.test(c)||n.test(c))break;if(h.search(this.rules.other.nonSpaceChar)>=d||!c.trim())a+="\n"+h.slice(d);else{if(u||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||s.test(l)||n.test(l))break;a+="\n"+c}u=!c.trim(),r+=f+"\n",e=e.substring(f.length+1),l=h.slice(d)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(i=!0)),o.items.push({type:"list_item",raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]}),o.raw+=r}let a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e of o.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,""),"text"===e.tokens[0]?.type||"paragraph"===e.tokens[0]?.type){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,"");break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:"checkbox",raw:t[0]+" ",checked:"[ ]"!==t[0]};e.checked=n.checked,o.loose?e.tokens[0]&&["paragraph","text"].includes(e.tokens[0].type)&&"tokens"in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:"paragraph",raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!o.loose){let t=e.tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));o.loose=n}}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)"text"===t.type&&(t.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=He(t[0]);return{type:"html",block:!0,raw:e,pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$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:Be(t[0],"\n"),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=qe(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],s={type:"table",raw:Be(t[0],"\n"),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?s.align.push("right"):this.rules.other.tableAlignCenter.test(e)?s.align.push("center"):this.rules.other.tableAlignLeft.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e<n.length;e++)s.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:s.align[e]});for(let e of o)s.rows.push(qe(e,s.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]}))));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:"heading",raw:Be(t[0],"\n"),depth:"="===t[2].charAt(0)?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let 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){let 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){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.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){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Be(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let 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 n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let 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){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Fe(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return Fe(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(r[1]||r[2]||r[3]||r[4])&&(!r[4]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[3]||!n||this.rules.inline.punctuation.exec(n))){let n,o,s=[...r[0]].length-1,i=s,a=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+s);null!==(r=l.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(o=[...n].length,r[3]||r[4]){i+=o;continue}if((r[5]||r[6])&&s%3&&!((s+o)%3)){a+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i+a);let t=[...r[0]][0].length,l=e.slice(0,s+r.index+t+o);if(Math.min(s,o)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n,o,s=[...r[0]].length-1,i=s,a=this.rules.inline.delRDelim;for(a.lastIndex=0,t=t.slice(-1*e.length+s);null!==(r=a.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n||(o=[...n].length,o!==s))continue;if(r[3]||r[4]){i+=o;continue}if(i-=o,i>0)continue;o=Math.min(o,o+i);let t=[...r[0]][0].length,a=e.slice(0,s+r.index+t+o),l=a.slice(s,-s);return{type:"del",raw:a,text:l,tokens:this.lexer.inlineTokens(l)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=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=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=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){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Ge=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||I,this.options.tokenizer=this.options.tokenizer||new We,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:B,block:je.normal,inline:Oe.normal};this.options.pedantic?(t.block=je.pedantic,t.inline=Oe.pedantic):this.options.gfm&&(t.block=je.gfm,this.options.breaks?t.inline=Oe.breaks:t.inline=Oe.gfm),this.tokenizer.rules=t}static get rules(){return{block:je,inline:Oe}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(B.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(B.tabCharGlobal," ").replace(B.spaceLine,""));let r=1/0;for(;e;){if(!(e.length<r)){this.infiniteLoopError(e.charCodeAt(0));break}let o;if(r=e.length,this.options.extensions?.block?.some((n=>!!(o=n.call({lexer:this},e,t))&&(e=e.substring(o.raw.length),t.push(o),!0))))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let n=t.at(-1);1===o.raw.length&&void 0!==n?n.raw+="\n":t.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+o.raw,n.text+="\n"+o.text,this.inlineQueue.at(-1).src=n.text):t.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+o.raw,n.text+="\n"+o.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},t.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let r=t.at(-1);n&&"paragraph"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+o.raw,r.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(o),n=s.length!==e.length,e=e.substring(o.raw.length)}else if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+o.raw,n.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n,r=e,o=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!==(o=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!==(o=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!==(o=this.tokenizer.rules.inline.blockSkip.exec(r));)n=o[2]?o[2].length:0,r=r.slice(0,o.index+n)+"["+"a".repeat(o[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,i="",a=1/0;for(;e;){if(!(e.length<a)){this.infiniteLoopError(e.charCodeAt(0));break}let n;if(a=e.length,s||(i=""),s=!1,this.options.extensions?.inline?.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,i)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e,r,i)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let o=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);this.options.extensions.startInline.forEach((e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))})),n<1/0&&n>=0&&(o=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(o)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(i=n.raw.slice(-1)),s=!0;let r=t.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(!this.options.silent)throw new Error(t);console.error(t)}},Ve=class{options;parser;constructor(e){this.options=e||I}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(B.notSpaceStart)?.[0],o=e.replace(B.endingNewline,"")+"\n";return r?'<pre><code class="language-'+De(r)+'">'+(n?o:De(o,!0))+"</code></pre>\n":"<pre><code>"+(n?o:De(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let o=e.rows[t];n="";for(let e=0;e<o.length;e++)n+=this.tablecell(o[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${De(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=Me(e);if(null===o)return r;let s='<a href="'+(e=o)+'"';return t&&(s+=' title="'+De(t)+'"'),s+=">"+r+"</a>",s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=Me(e);if(null===o)return De(n);let s=`<img src="${e=o}" alt="${De(n)}"`;return t&&(s+=` title="${De(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:De(e.text)}},Ze=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Ke=class e{options;renderer;textRenderer;constructor(e){this.options=e||I,this.options.renderer=this.options.renderer||new Ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ze}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t="";for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==n||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){t+=n||"";continue}}let o=r;switch(o.type){case"space":t+=this.renderer.space(o);break;case"hr":t+=this.renderer.hr(o);break;case"heading":t+=this.renderer.heading(o);break;case"code":t+=this.renderer.code(o);break;case"table":t+=this.renderer.table(o);break;case"blockquote":t+=this.renderer.blockquote(o);break;case"list":t+=this.renderer.list(o);break;case"checkbox":t+=this.renderer.checkbox(o);break;case"html":t+=this.renderer.html(o);break;case"def":t+=this.renderer.def(o);break;case"paragraph":t+=this.renderer.paragraph(o);break;case"text":t+=this.renderer.text(o);break;default:{let e='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let o=e[r];if(this.options.extensions?.renderers?.[o.type]){let 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}}let s=o;switch(s.type){case"escape":case"text":n+=t.text(s);break;case"html":n+=t.html(s);break;case"link":n+=t.link(s);break;case"image":n+=t.image(s);break;case"checkbox":n+=t.checkbox(s);break;case"strong":n+=t.strong(s);break;case"em":n+=t.em(s);break;case"codespan":n+=t.codespan(s);break;case"br":n+=t.br(s);break;case"del":n+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},Qe=class{options;block;constructor(e){this.options=e||I}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Ge.lex:Ge.lexInline}provideParser(e=this.block){return e?Ke.parse:Ke.parseInline}},Je=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.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ke;Renderer=Ve;TextRenderer=Ze;Lexer=Ge;Tokenizer=We;Hooks=Qe;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{let 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){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{let 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){let 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'");let 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){let t=this.defaults.renderer||new Ve(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let 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){let t=this.defaults.tokenizer||new We(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let 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){let t=this.defaults.hooks||new Qe;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,o=e.hooks[r],s=t[r];Qe.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Qe.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await o.call(t,e);return s.call(t,n)})();let r=o.call(t,e);return s.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await o.apply(t,e);return!1===n&&(n=await s.apply(t,e)),n})();let n=o.apply(t,e);return!1===n&&(n=s.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let 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 Ge.lex(e,t??this.defaults)}parser(e,t){return Ke.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},o={...this.defaults,...r},s=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(t):t,r=await(o.hooks?await o.hooks.provideLexer(e):e?Ge.lex:Ge.lexInline)(n,o),s=o.hooks?await o.hooks.processAllTokens(r):r;o.walkTokens&&await Promise.all(this.walkTokens(s,o.walkTokens));let i=await(o.hooks?await o.hooks.provideParser(e):e?Ke.parse:Ke.parseInline)(s,o);return o.hooks?await o.hooks.postprocess(i):i})().catch(s);try{o.hooks&&(t=o.hooks.preprocess(t));let n=(o.hooks?o.hooks.provideLexer(e):e?Ge.lex:Ge.lexInline)(t,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let r=(o.hooks?o.hooks.provideParser(e):e?Ke.parse:Ke.parseInline)(n,o);return o.hooks&&(r=o.hooks.postprocess(r)),r}catch(e){return s(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+De(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Xe(e,t){return Je.parse(e,t)}function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Xe.options=Xe.setOptions=function(e){return Je.setOptions(e),Xe.defaults=Je.defaults,z(Xe.defaults),Xe},Xe.getDefaults=O,Xe.defaults=I,Xe.use=function(...e){return Je.use(...e),Xe.defaults=Je.defaults,z(Xe.defaults),Xe},Xe.walkTokens=function(e,t){return Je.walkTokens(e,t)},Xe.parseInline=Je.parseInline,Xe.Parser=Ke,Xe.parser=Ke.parse,Xe.Renderer=Ve,Xe.TextRenderer=Ze,Xe.Lexer=Ge,Xe.lexer=Ge.lex,Xe.Tokenizer=We,Xe.Hooks=Qe,Xe.parse=Xe,Xe.options,Xe.setOptions,Xe.use,Xe.walkTokens,Xe.parseInline,Ke.parse,Ge.lex;var et,tt={exports:{}};var nt,rt=(et||(et=1,nt=tt,function(e,t){nt.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 l(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 c(e,t,n){return function(r){var o=r.toLowerCase();return t.hasOwnProperty(o)?i(r,o):e.hasOwnProperty(o)?i(r,e[o]):l(o,r,n)}}function u(e,t,n,r){return function(r){var o=r.toLowerCase();return!!t.hasOwnProperty(o)||!e.hasOwnProperty(o)&&l(o,o,n)===o}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=c(o,r,e),d.isPlural=u(o,r,e),d.singular=c(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}))),tt.exports),ot=Ye(rt),st=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 l,c=e(n[r],1);t.insertBefore(c,s),i&&a&&c.selected&&(a=!a,l=t.selectedIndex,t.selectedIndex=l<0?r:d.call(t.querySelectorAll("option"),c)),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 l=t,c=o;l<n&&c<s&&i(e[l],r[c]);)l++,c++;if(c===s)return t;t=l+1}return-1}function l(e,t,n,r,o){return n<r?e(t[n],0):0<n?e(t[n-1],-0).nextSibling:o}function c(e,t,n,r){for(;n<r;)h(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},h=function(e){return(e.remove||function(){var e=this.parentNode;e&&e.removeChild(this)}).call(e)};function f(e,t,n,r){for(var u=(r=r||{}).compare||s,d=r.node||i,h=null==r.before?null:d(r.before,0),f=t.length,m=f,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 v=g===m,w=y===b;if(v&&w)return n;if(v&&y<b)return o(d,e,n,y,b,l(d,t,g,f,h)),n;if(w&&g<m)return c(d,t,g,m),n;var k=m-g,x=b-y,$=-1;if(k<x){if(-1<($=a(n,y,b,t,g,m,u)))return o(d,e,n,y,$,d(t[g],0)),o(d,e,n,$+k,b,l(d,t,m,f,h)),n}else if(x<k&&-1<($=a(t,g,m,n,y,b,u)))return c(d,t,g,$),c(d,t,$+x,m),n;return k<2||x<2?(o(d,e,n,y,b,d(t[g],0)),c(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,y,b,l(d,t,m,f,h)):function(e,t,n,r,s,i,a,l,u,d,h,f,m){!function(e,t,n,r,s,i,a,l,u){for(var d=[],p=e.length,h=a,f=0;f<p;)switch(e[f++]){case 0:s++,h++;break;case 1:d.push(r[s]),o(t,n,r,s++,s,h<l?t(i[h],0):u);break;case-1:h++}for(f=0;f<p;)switch(e[f++]){case 0:a++;break;case-1:-1<d.indexOf(i[a])?a++:c(t,i,a++,a)}}(function(e,t,n,r,o,s,i){var a,l,c,u,d,p,h=n+s,f=[];e:for(b=0;b<=h;b++){if(50<b)return null;for(p=b-1,u=b?f[b-1]:[0,0],d=f[b]=[],a=-b;a<=b;a+=2){for(l=(c=a===-b||a!==b&&u[p+a-1]<u[p+a+1]?u[p+a+1]:u[p+a-1]+1)-a;c<s&&l<n&&i(r[o+c],e[t+l]);)c++,l++;if(c===s&&l===n)break e;d[b+a]=c}}for(var m=Array(b/2+h/2),g=m.length-1,b=f.length-1;0<=b;b--){for(;0<c&&0<l&&i(r[o+c-1],e[t+l-1]);)m[g--]=0,c--,l--;if(!b)break;p=b-1,u=b?f[b-1]:[0,0],(a=c-l)==-b||a!==b&&u[p+a-1]<u[p+a+1]?(l--,m[g--]=1):(c--,m[g--]=-1)}return m}(n,r,i,a,l,d,f)||function(e,t,n,r,o,s,i,a){var l=0,c=r<a?r:a,u=Array(c++),d=Array(c);d[0]=-1;for(var h=1;h<c;h++)d[h]=i;for(var f=o.slice(s,i),m=t;m<n;m++){var g,b=f.indexOf(e[m]);-1<b&&-1<(l=p(d,c,g=b+s))&&(d[l]=g,u[l]={newi:m,oldi:g,prev:u[l-1]})}for(l=--c,--i;d[l]>i;)--l;c=a+r-l;var y=Array(c),v=u[l];for(--n;v;){for(var w=v.newi,k=v.oldi;w<n;)y[--c]=1,--n;for(;k<i;)y[--c]=-1,--i;y[--c]=0,--n,--i,v=v.prev}for(;t<=n;)y[--c]=1,--n;for(;s<=i;)y[--c]=-1,--i;return y}(n,r,s,i,a,l,u,d),e,t,n,r,a,l,h,m)}(d,e,n,y,b,x,t,g,m,k,f,u,h),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 v=y.Map;function w(){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(w.prototype,{ELEMENT_NODE:{value:1},nodeType:{value:-1}});var $,S,_,E,L,C,R={},A={},T=[],N=A.hasOwnProperty,P=0,j={attributes:R,define:function(e,t){e.indexOf("-")<0?(e in A||(P=T.push(e)),A[e]=t):R[e]=t},invoke:function(e,t){for(var n=0;n<P;n++){var r=T[n];if(N.call(e,r))return A[r](e[r],t)}}},O=Array.isArray||(S=($={}.toString).call([]),function(e){return $.call(e)===S}),I=(_=e,E="fragment",C="content"in D(L="template")?function(e){var t=D(L);return t.innerHTML=e,t.content}:function(e){var t,n=D(E),r=D(L);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(E),n=D("div");return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e+"</svg>",z(t,n.firstChild.childNodes),t}:C)(e)});function z(e,t){for(var n=t.length;n--;)e.appendChild(t[0])}function D(e){return e===E?_.createDocumentFragment():_.createElementNS("http://www.w3.org/1999/xhtml",e)}var M,q,B,H,U,F,W,G,V,Z=(q="appendChild",B="cloneNode",H="createTextNode",F=(U="importNode")in(M=e),(W=M.createDocumentFragment())[q](M[H]("g")),W[q](M[H]("")),(F?M[U](W,!0):W[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[q](e(o[i],n));return r}:F?M[U]: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:._-]*)((?:",le="(?:\\s*=\\s*(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|"+se.replace("\\/","")+"))?)",ce=new RegExp(ae+ie+le+"+)(["+oe+"]*/?>)","g"),ue=new RegExp(ae+ie+le+"*)(["+oe+"]*/>)","g"),de=new RegExp("("+ie+"\\s*=\\s*)(['\"]?)"+X+"\\2","gi");function pe(e,t,n,r){return"<"+t+n.replace(de,he)+r}function he(e,t,n){return t+(n||'"')+Q+(n||'"')}function fe(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 l=s[a];switch(l.nodeType){case ee:var c=o.concat(a);!function(t,n,r,o){for(var s,i=t.attributes,a=[],l=[],c=me(i,r),u=c.length,d=0;d<u;){var p=c[d++],h=p.value===Q;if(h||1<(s=p.value.split(X)).length){var f=p.name;if(a.indexOf(f)<0){a.push(f);var m=r.shift().replace(h?/^(?:|[\S\s]*?\s)(\S+?)\s*=\s*('|")?$/:new RegExp("^(?:|[\\S\\s]*?\\s)("+f+")\\s*=\\s*('|\")[\\S\\s]*","i"),"$1"),g=i[m]||i[m.toLowerCase()];if(h)n.push(be(g,o,m,null));else{for(var b=s.length-2;b--;)r.shift();n.push(be(g,o,m,s))}}l.push(p)}}for(var y=((d=0)<(u=l.length)&&J&&!("ownerSVGElement"in t));d<u;){var v=l[d++];y&&(v.value=""),t.removeAttribute(v.name)}var w=t.nodeName;if(/^script$/i.test(w)){var k=e.createElement(w);for(u=i.length,d=0;d<u;)k.setAttributeNode(i[d++].cloneNode(!0));k.textContent=t.textContent,t.parentNode.replaceChild(k,t)}}(l,n,r,c),ge(l,n,r,c);break;case Y:var u=l.textContent;if(u===Q)r.shift(),n.push(ne.test(t.nodeName)?ye(t,o):{type:"any",node:l,path:o.concat(a)});else switch(u.slice(0,2)){case"/*":if("*/"!==u.slice(-2))break;case"👻":t.removeChild(l),a--,i--}break;case te:ne.test(t.nodeName)&&K.call(l.textContent)===X&&(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 ve,we=(ve=new n,{get:function(e){return ve.get(e)},set:function(e,t){return ve.set(e,t),t}});function ke(e,t){var n=(e.convert||function(e){return e.join(X).replace(ue,fe).replace(ce,pe)})(t),r=e.transform;r&&(n=r(n));var o=I(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 l=s[i++],c=function(e,t){for(var n=t.length,r=0;r<n;)e=e.childNodes[t[r++]];return e}(n,l.path);switch(l.type){case"any":r.push({fn:e.any(c,[]),sparse:!1});break;case"attr":var u=l.sparse,d=e.attribute(c,l.name,l.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(c),sparse:!1}),c.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 l=a.values,c=l[0],u=1,d=l.length;for(i+=d-2;u<d;)c+=arguments[s++]+l[u++];a.fn(c)}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 Se,_e,Ee=(Se=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,_e=/([^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),Ce(n,!0)}(e,t):Ce(e.style,!1)});function Le(e,t,n){return t+"-"+n.toLowerCase()}function Ce(e,t){var n,r;return function(o){var s,i,a,l;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(l=o[i])||Se.test(i)?l:l+"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(_e,Le),":",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 Re,Ae,Te=(Re=[].slice,(Ae=Ne.prototype).ELEMENT_NODE=1,Ae.nodeType=111,Ae.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},Ae.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=Re.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 Fe:return 1/t<0?t?e.remove(!0):e.lastChild:t?e.valueOf(!0):e.firstChild;case Ue:return je(e.render(),t);default:return e}}function Oe(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 Ie(e){return null!=e&&"then"in e}var ze,De,Me,qe,Be,He="ownerSVGElement",Ue=w.prototype.nodeType,Fe=Te.prototype.nodeType,We=(De=(ze={Event:b,WeakSet:u}).Event,Me=ze.WeakSet,qe=!0,Be=null,function(e){return qe&&(qe=!qe,Be=new Me,function(e){var t=new Me,n=new Me;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,l=0;l<a;e(i[l++],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=we.get(i)||we.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=He in e;if("style"===t)return Ee(e,n,o);if("."===t.slice(0,1))return c=e,u=t.slice(1),o?function(e){try{c[u]=e}catch(t){c.setAttribute(u,e)}}:function(e){c[u]=e};if("?"===t.slice(0,1))return i=e,a=t.slice(1),function(e){l!==!!e&&((l=!!e)?i.setAttribute(a,""):i.removeAttribute(a))};if(/^on/.test(t)){var s=t.slice(2);return"connected"===s||"disconnected"===s?We(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 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,l,c,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=He 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=f(e.parentNode,t,[(l=a,e.ownerDocument.createTextNode(l))],r));break;case"function":i(a(e));break;case"object":case"undefined":if(null==a){s=!1,t=f(e.parentNode,t,[],r);break}default:if(s=!1,O(n=a))if(0===a.length)t.length&&(t=f(e.parentNode,t,[],r));else switch(typeof a[0]){case"string":case"number":case"boolean":i({html:a});break;case"object":if(O(a[0])&&(a=a.concat.apply([],a)),Ie(a[0])){Promise.all(a).then(i);break}default:t=f(e.parentNode,t,a,r)}else"ELEMENT_NODE"in a?t=f(e.parentNode,t,11===a.nodeType?Ve.call(a.childNodes):[a],r):Ie(a)?a.then(i):"placeholder"in a?Oe(a,i):"text"in a?i(String(a.text)):"any"in a?i(a.any):"html"in a?t=f(e.parentNode,t,Ve.call(I([].concat(a.html).join(""),o).childNodes),r):i("length"in a?Ve.call(a):j.invoke(a,i))}var l}},text:function(e){var t;return function n(r){var o;t!==r&&("object"==(o=typeof(t=r))&&r?Ie(r)?r.then(n):"placeholder"in r?Oe(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)}}}),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)),l=!("raw"in t)||t.propertyIsEnumerable("raw")||!Object.isFrozen(t.raw);return a||l?(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=l?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 Te(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(He 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,lt,ct=j.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=w,dt.bind=function(e){return ot.bind(e)},dt.define=ct,dt.diff=f,(dt.hyper=dt).observe=We,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,lt=function(e,t){var n={w:null,p:null};return t.set(e,n),n},Object.defineProperties(w,{for:{configurable:!0,value:function(e,t){return function(e,t,r,o){var s,i,a,l=t.get(e)||lt(e,t);switch(typeof o){case"object":case"function":var c=l.w||(l.w=new n);return c.get(o)||(s=c,i=o,a=new e(r),s.set(i,a),a);default:var u=l.p||(l.p=at(null));return u[o]||(u[o]=new e(r))}}(this,it.get(e)||(r=e,o=new v,it.set(r,o),o),e,null==t?"default":t);var r,o}}}),Object.defineProperties(w.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{Component:it,bind:at,define:lt,diff:ct,hyper:ut,wire:dt}=st,pt=st,ht=R,ft=Xe,mt=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 l=a[e];switch(i){case"type":if("/"===l){i="subtype";continue}t+=l;break;case"subtype":if(";"===l){i="param-start";continue}n+=l;break;case"param-start":if(N.test(l)||";"===l)continue;r+=l,i="param-name";break;case"param-name":if("="===l||";"===l){if("="===l){i="param-value",o=null;continue}s.set(r.toLowerCase(),null),r="";continue}r+=l;break;case"param-value":if('"'==l){i="collect-quoted-string";continue}if(";"===l){o=o.trimEnd(),i="param-start",j(s,r,o),r="";continue}o="string"==typeof o?o+l:l;break;case"collect-quoted-string":if('"'===l){j(s,r,o),i="ignore-input-until-next-param",r="",o=null;continue}if("\\"===l)continue;o="string"==typeof o?o+l:l;break;case"ignore-input-until-next-param":if(";"!==l)continue;i="param-start";break;default:throw new Error(`State machine error - unknown parser mode: ${i} `)}}r&&j(s,r,o);if(""===t.trim()||!T.test(t))throw new TypeError("Invalid type");if(""===n.trim()||!T.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?T.test(n)?r+=`=${n}`:r+=`="${n}"`:r+='=""',r+=";";return e.essence+r.slice(0,-1)}(this)}},gt=ot,bt=/-/g,yt=RegExp.escape??(e=>e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")),vt=new Intl.DateTimeFormat(["sv-SE"],{timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit"});"en"===r||r.startsWith("en-");const wt=".informative, .note, .issue, .example, .ednote, .practice, .introductory";function kt(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 xt(e){e.querySelectorAll(".remove, script[data-requiremodule]").forEach((e=>{e.remove()}))}function $t(e,t="long"){const n=new Intl.ListFormat(r,{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 St=$t("conjunction"),_t=$t("disjunction");function Et(e,t){return St(e,t).join("")}function Lt(e){return e.trim().replace(/\s+/g," ")}function Ct(e,t=r){return t=t.toLowerCase(),new Proxy(e,{get(e,n){const o=function(e,t,n=r){n=n.toLowerCase();const o=n.match(/^(\w{2,3})-.+$/)?.[1]??"";return e[n]?.[t]||e[o]?.[t]}(e,n,t)||e.en[n];if(!o)throw new Error(`No l10n data for key: "${n}"`);return o}})}function Rt(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){Wt(`call to \`${t}()\` failed with: ${e}.`,"utils/runTransforms",{hint:"See developer console for stack trace.",cause:e})}}}return e}function At(e,t=(e=>e)){const n=e.map(t),r=n.slice(0,-1).map((e=>pt`${e}, `));return pt`${r}${n[n.length-1]}`}function Tt(e,t=!1){return(t?e:e.toLowerCase()).trim().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\W+/gim,"-").replace(/^-+/,"").replace(/-+$/,"")}function Nt(e,t="",n="",r=!1){if(e.id)return e.id;n||(n=(e.title?e.title:e.textContent).trim());let o=Tt(n,r);if(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 Pt(e){const t=new Set,n="ltNodefault"in e.dataset?"":Lt(e.textContent),r=e.children[0];if(e.dataset.lt?e.dataset.lt.split("|").map((e=>Lt(e))).forEach((e=>t.add(e))):1===e.childNodes.length&&1===e.getElementsByTagName("abbr").length&&r&&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(Lt(e))))}return[...t]}function jt(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 Ot(e,t){const n=t.closest(wt);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 It(e,t){return t.append(...e.childNodes),e.appendChild(t),e}function zt(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 Dt 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)??e)}getCanonicalKey(e){return super.has(e)?e:this.keys().find((t=>t.toLowerCase()===e.toLowerCase()))}}function Mt(e){const t=e.cloneNode(!0);return t.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),t.querySelectorAll("dfn").forEach((e=>{jt(e,"span",{copyAttributes:!1})})),t.hasAttribute("id")&&t.removeAttribute("id"),qt(t),t}function qt(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT);for(const e of[...Bt(t)])e.remove()}function*Bt(e){for(;e.nextNode();)yield e.currentNode}class Ht 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 Ut extends Error{constructor(e,t,n){super(e,{...n.cause&&{cause:n.cause}});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||Nt(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,...this.cause instanceof Error&&{cause:{name:this.cause.name,message:this.cause.message,stack:this.cause.stack}}}}}function Ft(e,t,n={}){const r={...n,isWarning:!1};Yt("error",new Ut(e,t,r))}function Wt(e,t,n={}){const r={...n,isWarning:!0};Yt("warn",new Ut(e,t,r))}function Gt(e){return{amendConfiguration:e=>Yt("amend-user-config",e),showError:(t,n)=>Ft(t,e,n),showWarning:(t,n)=>Wt(t,e,n)}}function Vt(e){return e?`\`${e}\``:""}function Zt(e,{quotes:t}={quotes:!1}){return _t(e,t?e=>Vt(Kt(e)):Vt).join("")}function Kt(e){return String(e)?`"${e}"`:""}function Qt(e,...t){return Jt(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 Jt(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 Xt=new EventTarget;function Yt(e,t){if(Xt.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 en(e,t,n={once:!1}){Xt.addEventListener(e,(async n=>{try{await t(n.detail)}catch(t){const n=t;Ft(`Error in handler for topic "${e}": ${n.message}`,`sub:${e}`,{cause:n})}}),n)}const tn=["githubToken","githubUser"];const nn=new Map([["text/html","html"],["application/xml","xml"]]);function rn(e,t=document){const n=nn.get(e);if(!n){const t=[...nn.values()].join(", ");throw new TypeError(`Invalid format: ${e}. Expected one of: ${t}.`)}const r=on(n,t);return`data:${e};charset=utf-8,${encodeURIComponent(r)}`}function on(e,t){const n=t.cloneNode(!0);!function(e){const{head:t,body:n,documentElement:r}=e;qt(e),e.querySelectorAll(".removeOnSave, #toc-nav").forEach((e=>e.remove())),n.classList.remove("toc-sidebar"),xt(r);const o=e.createDocumentFragment(),s=e.querySelector("meta[name='viewport']");s&&t.firstChild!==s&&o.appendChild(s);const i=e.querySelector("meta[charset], meta[content*='charset=']")||pt`<meta charset="utf-8" />`;o.appendChild(i);const a=`ReSpec ${window.respecVersion||"Developer Channel"}`,l=pt`
2
2
  <meta name="generator" content="${a}" />
3
- `;o.appendChild(l),t.prepend(o),Zt("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:Xt});class en{constructor(){this._respecDonePromise=new Promise((e=>{Kt("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],Kt("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),Kt("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}async toHTML(){return Yt("html",document)}}const tn="core/post-process";const nn="core/pre-process";const rn="core/base-runner";async function on(e){!function(){const e=new en;Object.defineProperty(document,"respec",{value:e})}(),Zt("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),Kt("amend-user-config",n),Kt("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of Qt)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),Zt("amend-user-config",r)}(respecConfig),performance.mark(`${rn}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||Dt("Every item in `preProcess` must be a JS function.",nn),t}));for(const[n,r]of t.entries()){const t=`${nn}/${r.name||`[${n}]`}`,o=Bt(t);try{await r(e,document,o)}catch(e){Dt(`Function ${t} threw an error during \`preProcess\`.`,nn,{hint:"See developer console.",cause:e})}}}}(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),Zt("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||Dt("Every item in `postProcess` must be a JS function.",tn),t}));for(const[n,r]of t.entries()){const t=`${tn}/${r.name||`[${n}]`}`,o=Bt(t);try{await r(e,document,o)}catch(e){Dt(`Function ${t} threw an error during \`postProcess\`.`,tn,{hint:"See developer console.",cause:e})}}}"function"==typeof e.afterEnd&&await e.afterEnd(e,document)}(respecConfig),Zt("end-all"),bt(document),performance.mark(`${rn}-end`),performance.measure(rn,`${rn}-start`,`${rn}-end`)}var sn=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}
3
+ `;o.appendChild(l),t.prepend(o),Yt("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}async function sn(t){const n=await fetch(new URL(`../../${t}`,e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-geonovum.js",document.baseURI).href));return await n.text()}const an=new URL("respec-highlight.js",e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-geonovum.js",document.baseURI).href).href,ln=kt({hint:"preload",href:an,as:"script"});async function cn(){try{return(await Promise.resolve().then((function(){return Kn}))).default}catch{return sn("worker/respec-worker.js")}}async function un(){try{const e=await fetch(an);if(e.ok)return await e.text()}catch{}return null}document.head.appendChild(ln);const dn=async function(){const[e,t]=await Promise.all([cn(),un()]),n=new Blob([null!==t?`${t}\n`:'self.RESPEC_HIGHLIGHT_URL = "https://www.w3.org/Tools/respec/respec-highlight";\n',e],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}();class pn{constructor(){this._respecDonePromise=new Promise((e=>{en("end-all",(()=>e()),{once:!0})})),this.errors=[],this.warnings=[],en("error",(e=>{console.error(e,e.toJSON()),this.errors.push(e)})),en("warn",(e=>{console.warn(e,e.toJSON()),this.warnings.push(e)}))}get version(){return window.respecVersion}get ready(){return this._respecDonePromise}get worker(){return dn}async toHTML(){return on("html",document)}}const hn="core/post-process",fn=15e3;function mn(e,t){return new Promise(((n,r)=>{const o=setTimeout((()=>{r(new Error(`${t} timed out.`))}),fn);Promise.resolve(e).then(n,r).finally((()=>{clearTimeout(o)}))}))}const gn="core/pre-process",bn=15e3;const yn="core/base-runner";async function vn(e){!function(){const e=new pn;Object.defineProperty(document,"respec",{value:e})}(),Yt("start-all",respecConfig),function(e){const t={},n=e=>Object.assign(t,e);n(e),en("amend-user-config",n),en("end-all",(()=>{const e=document.createElement("script");e.id="initialUserConfig",e.type="application/json";for(const e of tn)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),Yt("amend-user-config",r)}(respecConfig),performance.mark(`${yn}-start`),await async function(e){if(Array.isArray(e.preProcess)){const t=e.preProcess.filter((e=>{const t="function"==typeof e;return t||Ft("Every item in `preProcess` must be a JS function.",gn),t}));for(const[n,r]of t.entries()){const t=`${gn}/${r.name||`[${n}]`}`,o=Gt(t);try{await new Promise(((n,s)=>{const i=setTimeout((()=>{s(new Error(`preProcess function "${t}" timed out.`))}),bn);Promise.resolve().then((()=>r(e,document,o))).then(n,s).finally((()=>{clearTimeout(i)}))}))}catch(e){Ft(`Function ${t} threw an error during \`preProcess\`.`,gn,{hint:"See developer console.",cause:e})}}}}(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(void 0)):n.run&&(await n.run(t),r(void 0))}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),Yt("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||Ft("Every item in `postProcess` must be a JS function.",hn),t}));for(const[n,r]of t.entries()){const t=`${hn}/${r.name||`[${n}]`}`,o=Gt(t);try{await mn(r(e,document,o),`postProcess function "${t}"`)}catch(e){Ft(`Function ${t} threw an error during \`postProcess\`.`,hn,{hint:"See developer console.",cause:e})}}}if("function"==typeof e.afterEnd)try{await mn(e.afterEnd(e,document),"config.afterEnd")}catch(e){Ft("Function afterEnd threw an error.",hn,{hint:"See developer console.",cause:e})}}(respecConfig),Yt("end-all",void 0),xt(document),performance.mark(`${yn}-end`),performance.measure(yn,`${yn}-start`,`${yn}-end`)}var wn=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}
4
4
  #respec-ui{position:fixed;display:flex;flex-direction:row-reverse;top:20px;right:20px;width:202px;text-align:right;z-index:9000}
5
5
  #respec-pill,.respec-info-button{height:2.4em;background:#fff;background:var(--bg,#fff);color:#787878;color:var(--tocnav-normal-text,#787878);border:1px solid #ccc;box-shadow:1px 1px 8px 0 rgba(100,100,100,.5);box-shadow:1px 1px 8px 0 var(--tocsidebar-shadow,rgba(100,100,100,.5));padding:.2em 0}
6
6
  .respec-info-button{border:none;opacity:.75;border-radius:2em;margin-right:1em;min-width:3.5em;will-change:opacity}
@@ -64,37 +64,37 @@ to{margin-top:0;border:1px solid #ccc;border-radius:0;box-shadow:1px 1px 8px 0 r
64
64
  .respec-iframe:not(.ready){background:url(https://respec.org/xref/loader.gif) no-repeat center}
65
65
  .respec-iframe+a[href]{font-size:.9rem;float:right;margin:0 .5em .5em;border-bottom-width:1px}
66
66
  p:is(.respec-hint,.respec-occurrences){display:block;margin-top:.5em}
67
- .respec-plugin{text-align:right;color:rgb(120,120,120,.5);font-size:.6em}`;const an=/&gt;/gm,ln=/&amp;/gm;class cn extends ut.Renderer{code(e){const{text:t,lang:n=""}=e,{language:r,...o}=cn.parseInfoString(n);if(/(^webidl$)/i.test(r))return`<pre class="idl">${t}</pre>`;const s=super.code({...e,lang:r}).replace('class="language-','class="'),{example:i,illegalExample:a}=o;if(!i&&!a)return s;const l=i||a,c=`${r} ${i?"example":"illegal-example"}`;return s.replace("<pre>",`<pre title="${l}" class="${c}">`)}image(e){const{href:t,title:n,text:r}=e;if(!n)return super.image(e);return String.raw`
67
+ .respec-plugin{text-align:right;color:rgb(120,120,120,.5);font-size:.6em}`;const kn=/&gt;/gm,xn=/&amp;/gm;class $n extends ft.Renderer{code(e){const{text:t,lang:n=""}=e,{language:r,...o}=$n.parseInfoString(n);if(/(^webidl$)/i.test(r))return`<pre class="idl">${t}</pre>`;const s=super.code({...e,lang:r}).replace('class="language-','class="'),{example:i,illegalExample:a}=o;if(!i&&!a)return s;const l=i||a,c=`${r} ${i?"example":"illegal-example"}`;return s.replace("<pre>",`<pre title="${l}" class="${c}">`)}image(e){const{href:t,title:n,text:r}=e;if(!n)return super.image(e);return String.raw`
68
68
  <figure>
69
69
  <img src="${t}" alt="${r}" />
70
70
  <figcaption>${n}</figcaption>
71
71
  </figure>
72
- `}static parseInfoString(e){const t=e.search(/\s/);if(-1===t)return{language:e};const n=e.slice(0,t),r=e.slice(t+1);let o;if(r)try{o=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...o}}heading(e){const t=this.parser.parseInline(e.tokens),n=e.depth,r=t.match(/(.+)\s+{#([\w-]+)}$/);if(r){const[,e,t]=r;return`<h${n} id="${t}">${e}</h${n}>`}return super.heading(e)}}const un={gfm:!0,renderer:new cn};function dn(e,t={inline:!1}){const n=function(e){if(!e)return e;const t=e.trimEnd().split("\n"),n=t.findIndex((e=>e.trim()));if(-1===n)return"";const r=t.slice(n),o=r[0].search(/[^\s]/);if(o<1)return r.join("\n");const s=" ".repeat(o);return r.map((e=>e.startsWith(s)?e.slice(o):e)).join("\n")}(e),r=n.replace(an,">").replace(ln,"&");return t.inline?ut.parseInline(r,un):ut.parse(r,un)}function pn(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=dn(e.innerHTML)}const hn=(fn="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(fn);return t.forEach(pn),Array.from(t)});var fn;var mn=Object.freeze({__proto__:null,markdownToHtml:dn,name:"core/markdown",run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n)return void hn(document.body);const r=document.getElementById("respec-ui");r.remove();const o=document.body.cloneNode(!0);!function(e,t){const n=e.querySelectorAll(t);for(const e of n){const{innerHTML:t}=e;if(/^<\w/.test(t.trimStart()))continue;const n=t.split("\n"),r=n.slice(0,2).join("\n"),o=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),o.trim()){const t=Pt(e);e.append(`\n\n${t}`)}}}(o,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),pn(o),function(e){Array.from(e).forEach((e=>{e.replaceWith(e.textContent)}))}(o.querySelectorAll(".nolinks a[href]")),o.append(r),document.body.replaceWith(o)}});function gn(e,t){e&&Array.from(t).forEach((([t,n])=>{e.setAttribute(`aria-${t}`,n)}))}!function(){const e=document.createElement("style");e.id="respec-ui-styles",e.textContent=sn,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const bn=lt`<div id="respec-ui" class="removeOnSave" hidden></div>`,yn=lt`<ul
72
+ `}static parseInfoString(e){const t=e.search(/\s/);if(-1===t)return{language:e};const n=e.slice(0,t),r=e.slice(t+1);let o;if(r)try{o=JSON.parse(`{ ${r} }`)}catch(e){console.error(e)}return{language:n,...o}}heading(e){const t=this.parser.parseInline(e.tokens),n=e.depth,r=t.match(/(.+)\s+{#([\w-]+)}$/);if(r){const[,e,t]=r;return`<h${n} id="${t}">${e}</h${n}>`}return super.heading(e)}}const Sn={gfm:!0,renderer:new $n};function _n(e,t={inline:!1}){const n=function(e){if(!e)return e;const t=e.trimEnd().split("\n"),n=t.findIndex((e=>e.trim()));if(-1===n)return"";const r=t.slice(n),o=r[0].search(/[^\s]/);if(o<1)return r.join("\n");const s=" ".repeat(o);return r.map((e=>e.startsWith(s)?e.slice(o):e)).join("\n")}(e),r=n.replace(kn,">").replace(xn,"&");return t.inline?ft.parseInline(r,Sn):ft.parse(r,Sn)}function En(e){for(const t of e.getElementsByTagName("pre"))t.prepend("\n");e.innerHTML=_n(e.innerHTML)}const Ln=(Cn="[data-format='markdown']:not(body)",e=>{const t=e.querySelectorAll(Cn);return t.forEach(En),Array.from(t)});var Cn;var Rn=Object.freeze({__proto__:null,markdownToHtml:_n,name:"core/markdown",run:function(e){const t=!!document.querySelector("[data-format=markdown]:not(body)"),n="markdown"===e.format;if(!n&&!t)return;if(!n)return void Ln(document.body);const r=document.getElementById("respec-ui");r?.remove();const o=document.body.cloneNode(!0);!function(e,t){const n=e.querySelectorAll(t);for(const e of n){const{innerHTML:t}=e;if(/^<\w/.test(t.trimStart()))continue;const n=t.split("\n"),r=n.slice(0,2).join("\n"),o=n.slice(-2).join("\n");if(r.trim()&&e.prepend("\n\n"),o.trim()){const t=zt(e);e.append(`\n\n${t}`)}}}(o,"[data-format=markdown], section, div, address, article, aside, figure, header, main"),En(o),function(e){Array.from(e).forEach((e=>{e.replaceWith(e.textContent)}))}(o.querySelectorAll(".nolinks a[href]")),r&&o.append(r),document.body.replaceWith(o)}});function An(e,t){e&&Array.from(t).forEach((([t,n])=>{e.setAttribute(`aria-${t}`,n)}))}!function(){const e=document.createElement("style");e.id="respec-ui-styles",e.textContent=wn,e.classList.add("removeOnSave"),document.head.appendChild(e)}();const Tn=pt`<div id="respec-ui" class="removeOnSave" hidden></div>`,Nn=pt`<ul
73
73
  id="respec-menu"
74
74
  role="menu"
75
75
  aria-labelledby="respec-pill"
76
76
  hidden
77
- ></ul>`,vn=lt`<button
77
+ ></ul>`,Pn=pt`<button
78
78
  class="close-button"
79
- onclick=${()=>Rn.closeModal()}
79
+ onclick=${()=>Fn.closeModal()}
80
80
  title="Close"
81
81
  >
82
82
 
83
- </button>`;let wn,kn;window.addEventListener("load",(()=>Cn(yn)));const xn=[],$n=[],_n={};Kt("start-all",(()=>document.body.prepend(bn)),{once:!0}),Kt("end-all",(()=>document.body.prepend(bn)),{once:!0});const Sn=lt`<button id="respec-pill" disabled>ReSpec</button>`;function En(){yn.classList.toggle("respec-hidden"),yn.classList.toggle("respec-visible"),yn.hidden=!yn.hidden}function Cn(e){const t=e.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])"),n=t[0],r=t[t.length-1];n&&n.focus(),e.addEventListener("keydown",(e=>{"Tab"===e.key&&(e.shiftKey?document.activeElement===n&&(r.focus(),e.preventDefault()):document.activeElement===r&&(n.focus(),e.preventDefault()))}))}bn.appendChild(Sn),Sn.addEventListener("click",(e=>{e.stopPropagation(),Sn.setAttribute("aria-expanded",String(yn.hidden)),En(),yn.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{yn.hidden||En()})),bn.appendChild(yn),yn.addEventListener("keydown",(e=>{"Escape"!==e.key||yn.hidden||(Sn.setAttribute("aria-expanded",String(yn.hidden)),En(),Sn.focus())}));const Ln=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function An(e,t,n,r){t.push(e),_n.hasOwnProperty(n)||(_n[n]=function(e,t,n){const r=`respec-pill-${e}`,o=lt`<button
83
+ </button>`;let jn,On;window.addEventListener("load",(()=>Bn(Nn)));const In=[],zn=[],Dn={};en("start-all",(()=>document.body.prepend(Tn)),{once:!0}),en("end-all",(()=>document.body.prepend(Tn)),{once:!0});const Mn=pt`<button id="respec-pill" disabled>ReSpec</button>`;function qn(){Nn.classList.toggle("respec-hidden"),Nn.classList.toggle("respec-visible"),Nn.hidden=!Nn.hidden}function Bn(e){const t=e.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled])"),n=t[0],r=t[t.length-1];n&&n.focus(),e.addEventListener("keydown",(e=>{const t=e;"Tab"===t.key&&(t.shiftKey?document.activeElement===n&&(r.focus(),t.preventDefault()):document.activeElement===r&&(n.focus(),t.preventDefault()))}))}Tn.appendChild(Mn),Mn.addEventListener("click",(e=>{e.stopPropagation(),Mn.setAttribute("aria-expanded",String(Nn.hidden)),qn(),Nn.querySelector("li:first-child button").focus()})),document.documentElement.addEventListener("click",(()=>{Nn.hidden||qn()})),Tn.appendChild(Nn),Nn.addEventListener("keydown",(e=>{"Escape"!==e.key||Nn.hidden||(Mn.setAttribute("aria-expanded",String(Nn.hidden)),qn(),Mn.focus())}));const Hn=new Map([["controls","respec-menu"],["expanded","false"],["haspopup","true"],["label","ReSpec Menu"]]);function Un(e,t,n,r){t.push(e),Dn.hasOwnProperty(n)||(Dn[n]=function(e,t,n){const r=`respec-pill-${e}`,o=pt`<button
84
84
  id="${r}"
85
85
  class="respec-info-button"
86
- ></button>`;o.addEventListener("click",(()=>{o.setAttribute("aria-expanded","true");const r=lt`<ol class="${`respec-${e}-list`}"></ol>`;for(const e of t){const t=document.createRange().createContextualFragment(Tn(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),r.appendChild(n)}Rn.freshModal(n,r,o)}));const s=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return gn(o,s),o}(n,t,r),bn.appendChild(_n[n]));const o=_n[n];o.textContent=t.length;const s=1===t.length?pt.singular(r):r;gn(o,new Map([["label",`${t.length} ${s}`]]))}gn(Sn,Ln);const Rn={show(){try{bn.hidden=!1}catch(e){console.error(e)}},hide(){bn.hidden=!0},enable(){Sn.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const o=`respec-button-${e.toLowerCase().replace(/\s+/,"-")}`,s=lt`<button id="${o}" class="respec-option">
86
+ ></button>`;o.addEventListener("click",(()=>{o.setAttribute("aria-expanded","true");const r=pt`<ol class="${`respec-${e}-list`}"></ol>`;for(const e of t){const t=document.createRange().createContextualFragment(Wn(e)),n=document.createElement("li");t.firstElementChild===t.lastElementChild?n.append(...t.firstElementChild.childNodes):n.appendChild(t),r.appendChild(n)}Fn.freshModal(n,r,o)}));const s=new Map([["expanded","false"],["haspopup","true"],["controls",`respec-pill-${e}-modal`]]);return An(o,s),o}(n,t,r),Tn.appendChild(Dn[n]));const o=Dn[n];o.textContent=String(t.length);const s=1===t.length?gt.singular(r):r;An(o,new Map([["label",`${t.length} ${s}`]]))}An(Mn,Hn);const Fn={show(){try{Tn.hidden=!1}catch(e){console.error(e)}},hide(){Tn.hidden=!0},enable(){Mn.removeAttribute("disabled")},addCommand(e,t,n,r){r=r||"";const o=`respec-button-${e.toLowerCase().replace(/\s+/,"-")}`,s=pt`<button id="${o}" class="respec-option">
87
87
  <span class="respec-cmd-icon" aria-hidden="true">${r}</span> ${e}…
88
- </button>`,i=lt`<li role="menuitem">${s}</li>`;return i.addEventListener("click",t),yn.appendChild(i),s},error(e){An(e,xn,"error","ReSpec Errors")},warning(e){An(e,$n,"warning","ReSpec Warnings")},closeModal(e){kn&&(kn.classList.remove("respec-show-overlay"),kn.classList.add("respec-hide-overlay"),kn.addEventListener("transitionend",(()=>{kn.remove(),kn=null}))),e&&e.setAttribute("aria-expanded","false"),wn&&(wn.remove(),wn=null,Sn.focus())},freshModal(e,t,n){wn&&wn.remove(),kn&&kn.remove(),kn=lt`<div id="respec-overlay" class="removeOnSave"></div>`;const r=`${n.id}-modal`,o=`${r}-heading`;wn=lt`<div
88
+ </button>`,i=pt`<li role="menuitem">${s}</li>`;return i.addEventListener("click",t),Nn.appendChild(i),s},error(e){Un(e,In,"error","ReSpec Errors")},warning(e){Un(e,zn,"warning","ReSpec Warnings")},closeModal(e){if(On){const e=On;e.classList.remove("respec-show-overlay"),e.classList.add("respec-hide-overlay"),e.addEventListener("transitionend",(()=>{e.remove(),On=null}))}e&&e.setAttribute("aria-expanded","false"),jn&&(jn.remove(),jn=null,Mn.focus())},freshModal(e,t,n){jn&&jn.remove(),On&&On.remove(),On=pt`<div id="respec-overlay" class="removeOnSave"></div>`;const r=`${n.id}-modal`,o=`${r}-heading`;jn=pt`<div
89
89
  id="${r}"
90
90
  class="respec-modal removeOnSave"
91
91
  role="dialog"
92
92
  aria-labelledby="${o}"
93
93
  >
94
- ${vn}
94
+ ${Pn}
95
95
  <h3 id="${o}">${e}</h3>
96
96
  <div class="inside">${t}</div>
97
- </div>`;const s=new Map([["labelledby",o]]);gn(wn,s),document.body.append(kn,wn),kn.addEventListener("click",(()=>this.closeModal(n))),kn.classList.toggle("respec-show-overlay"),wn.hidden=!1,Cn(wn)}};function Tn(e){if("string"==typeof e)return e;const t=e.plugin?`<p class="respec-plugin">(plugin: "${e.plugin}")</p>`:"",n=e.hint?`\n${dn(`<p class="respec-hint"><strong>How to fix:</strong> ${Gt(e.hint)}`,{inline:!e.hint.includes("\n")})}\n`:"",r=Array.isArray(e.elements)?`<p class="respec-occurrences">Occurred <strong>${e.elements.length}</strong> times at:</p>\n ${dn(e.elements.map(Pn).join("\n"))}`:"",o=e.details?`\n\n<details>\n${e.details}\n</details>\n`:"";var s;return`${dn(`**${s=e.message,s.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}**`,{inline:!0})}${n}${r}${o}${t}`}function Pn(e){return`* [\`<${e.localName}>\`](#${e.id}) element`}async function Nn(e){try{Rn.show(),await async function(){"loading"===document.readyState&&await new Promise((e=>document.addEventListener("DOMContentLoaded",e)))}(),await on(e)}finally{Rn.enable()}}document.addEventListener("keydown",(e=>{"Escape"===e.key&&Rn.closeModal()})),window.respecUI=Rn,Kt("error",(e=>Rn.error(e))),Kt("warn",(e=>Rn.warning(e))),window.addEventListener("error",(e=>{console.error(e.error,e.message,e)}));const jn=[Promise.resolve().then((function(){return In})),Promise.resolve().then((function(){return i})),Promise.resolve().then((function(){return Dn})),Promise.resolve().then((function(){return Hn})),Promise.resolve().then((function(){return Vn})),Promise.resolve().then((function(){return Kn})),Promise.resolve().then((function(){return tr})),Promise.resolve().then((function(){return cr})),Promise.resolve().then((function(){return mn})),Promise.resolve().then((function(){return ur})),Promise.resolve().then((function(){return dr})),Promise.resolve().then((function(){return ko})),Promise.resolve().then((function(){return To})),Promise.resolve().then((function(){return Po})),Promise.resolve().then((function(){return Oo})),Promise.resolve().then((function(){return Bo})),Promise.resolve().then((function(){return Go})),Promise.resolve().then((function(){return Ko})),Promise.resolve().then((function(){return Br})),Promise.resolve().then((function(){return fs})),Promise.resolve().then((function(){return ss})),Promise.resolve().then((function(){return Xr})),Promise.resolve().then((function(){return gs})),Promise.resolve().then((function(){return sr})),Promise.resolve().then((function(){return bs})),Promise.resolve().then((function(){return Ss})),Promise.resolve().then((function(){return Cs})),Promise.resolve().then((function(){return As})),Promise.resolve().then((function(){return Rs})),Promise.resolve().then((function(){return Is})),Promise.resolve().then((function(){return Ds})),Promise.resolve().then((function(){return Ws})),Promise.resolve().then((function(){return Gs})),Promise.resolve().then((function(){return ni})),Promise.resolve().then((function(){return ci})),Promise.resolve().then((function(){return fi})),Promise.resolve().then((function(){return gi})),Promise.resolve().then((function(){return yi})),Promise.resolve().then((function(){return Ei})),Promise.resolve().then((function(){return Ai})),Promise.resolve().then((function(){return Ri})),Promise.resolve().then((function(){return Ni})),Promise.resolve().then((function(){return qi})),Promise.resolve().then((function(){return Hi})),Promise.resolve().then((function(){return Wi})),Promise.resolve().then((function(){return Zi})),Promise.resolve().then((function(){return Ji})),Promise.resolve().then((function(){return ea}))];Promise.all(jn).then((e=>Nn(e))).catch((e=>console.error(e)));var In=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){window.location.hash&&document.respec.ready.then((()=>{let e=decodeURIComponent(window.location.hash).slice(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}window.location.hash=`#${e}`}))}});const On={lint:{"no-headingless-sections":!0,"no-http-props":!0,"no-unused-vars":!1,"check-punctuation":!1,"local-refs-exist":!0,"check-internal-slots":!1,"check-charset":!1,"privsec-section":!1},pluralize:!0,specStatus:"base",highlightVars:!0,addSectionLinks:!0},zn=new Map([["cc0",{name:"Creative Commons 0 Public Domain Dedication",short:"CC0",url:"https://creativecommons.org/publicdomain/zero/1.0/"}],["cc-by",{name:"Creative Commons Attribution 4.0 International Public License",short:"CC-BY",url:"https://creativecommons.org/licenses/by/4.0/legalcode"}],["cc-by-nd",{name:"Creative Commons Attribution-NoDerivatives 4.0 International Public License",short:"CC-BY-ND",url:"https://creativecommons.org/licenses/by-nd/4.0/legalcode.nl"}]]),qn={lint:{"privsec-section":!0},doJsonLd:!0,license:"cc-by",specStatus:"GN-BASIS",logos:[{src:"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg",alt:"Geonovum",id:"Geonovum",height:67,width:132,url:"https://www.geonovum.nl/"}]};var Dn=Object.freeze({__proto__:null,name:"geonovum/defaults",run:function(e){const t=!1!==e.lint&&{...On.lint,...qn.lint,...e.lint};Object.assign(e,{...On,...qn,...e,lint:t}),Object.assign(e,function(e){return{isCCBY:"cc-by"===e.license,licenseInfo:zn.get(e.license),isBasic:"GN-BASIS"===e.specStatus,isRegular:"GN-BASIS"===e.specStatus}}(e))}});var Mn=String.raw`@keyframes pop{
97
+ </div>`;const s=new Map([["labelledby",o]]);An(jn,s),document.body.append(On,jn),On.addEventListener("click",(()=>this.closeModal(n))),On.classList.toggle("respec-show-overlay"),jn.hidden=!1,Bn(jn)}};function Wn(e){if("string"==typeof e)return e;const t=e.plugin?`<p class="respec-plugin">(plugin: "${e.plugin}")</p>`:"",n=e.hint?`\n${_n(`<p class="respec-hint"><strong>How to fix:</strong> ${Jt(e.hint)}`,{inline:!e.hint.includes("\n")})}\n`:"",r=Array.isArray(e.elements)?`<p class="respec-occurrences">Occurred <strong>${e.elements.length}</strong> times at:</p>\n ${_n(e.elements.map(Gn).join("\n"))}`:"",o=e.details?`\n\n<details>\n${e.details}\n</details>\n`:"";var s;return`${_n(`**${s=e.message,s.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}**`,{inline:!0})}${n}${r}${o}${t}`}function Gn(e){return`* [\`<${e.localName}>\`](#${e.id}) element`}async function Vn(e){try{Fn.show(),await async function(){"loading"===document.readyState&&await new Promise((e=>document.addEventListener("DOMContentLoaded",e)))}(),await vn(e)}finally{Fn.enable()}}document.addEventListener("keydown",(e=>{"Escape"===e.key&&Fn.closeModal()})),window.respecUI=Fn,en("error",(e=>Fn.error(e))),en("warn",(e=>Fn.warning(e))),window.addEventListener("error",(e=>{console.error(e.error,e.message,e)}));const Zn=[Promise.resolve().then((function(){return Qn})),Promise.resolve().then((function(){return o})),Promise.resolve().then((function(){return er})),Promise.resolve().then((function(){return sr})),Promise.resolve().then((function(){return ur})),Promise.resolve().then((function(){return pr})),Promise.resolve().then((function(){return yr})),Promise.resolve().then((function(){return Er})),Promise.resolve().then((function(){return Rn})),Promise.resolve().then((function(){return Lr})),Promise.resolve().then((function(){return Cr})),Promise.resolve().then((function(){return Ar})),Promise.resolve().then((function(){return Uo})),Promise.resolve().then((function(){return Yo})),Promise.resolve().then((function(){return es})),Promise.resolve().then((function(){return os})),Promise.resolve().then((function(){return cs})),Promise.resolve().then((function(){return fs})),Promise.resolve().then((function(){return bs})),Promise.resolve().then((function(){return io})),Promise.resolve().then((function(){return Is})),Promise.resolve().then((function(){return Ls})),Promise.resolve().then((function(){return vo})),Promise.resolve().then((function(){return Ds})),Promise.resolve().then((function(){return xr})),Promise.resolve().then((function(){return Ms})),Promise.resolve().then((function(){return Vs})),Promise.resolve().then((function(){return Ks})),Promise.resolve().then((function(){return Js})),Promise.resolve().then((function(){return Xs})),Promise.resolve().then((function(){return ri})),Promise.resolve().then((function(){return ai})),Promise.resolve().then((function(){return hi})),Promise.resolve().then((function(){return fi})),Promise.resolve().then((function(){return vi})),Promise.resolve().then((function(){return Ei})),Promise.resolve().then((function(){return Ti})),Promise.resolve().then((function(){return Pi})),Promise.resolve().then((function(){return Bi})),Promise.resolve().then((function(){return Fi})),Promise.resolve().then((function(){return Wi})),Promise.resolve().then((function(){return Zi})),Promise.resolve().then((function(){return Yi})),Promise.resolve().then((function(){return oa})),Promise.resolve().then((function(){return la})),Promise.resolve().then((function(){return da})),Promise.resolve().then((function(){return fa})),Promise.resolve().then((function(){return ba})),Promise.resolve().then((function(){return wa}))];Promise.all(Zn).then((e=>Vn(e))).catch((e=>console.error(e)));var Kn=Object.freeze({__proto__:null,default:'// ReSpec Worker\n"use strict";\n// hljs is either inlined by core/worker.js (preferred) or loaded below via\n// importScripts as a fallback when the inline fetch was not possible.\nif (typeof self.hljs === "undefined" && self.RESPEC_HIGHLIGHT_URL) {\n try {\n importScripts(self.RESPEC_HIGHLIGHT_URL);\n } catch (err) {\n console.error("Network error loading highlighter", err);\n }\n}\n\nself.addEventListener("message", ({ data }) => {\n switch (data.action) {\n case "highlight-load-lang": {\n const { langURL, langScript, propName, lang } = data;\n console.warn(\n `[ReSpec] The "highlight-load-lang" worker action is deprecated ` +\n `and will be removed in a future version. ` +\n `To migrate, fetch your language script in the main thread and ` +\n `send the text as "langScript" instead of "langURL". ` +\n `The "langURL" path may fail in Firefox. ` +\n `See https://github.com/speced/respec/issues/5228`\n );\n try {\n if (langScript) {\n const blob = new Blob([langScript], {\n type: "application/javascript",\n });\n const objectURL = URL.createObjectURL(blob);\n try {\n importScripts(objectURL);\n } finally {\n URL.revokeObjectURL(objectURL);\n }\n } else if (langURL) {\n const { protocol, hostname } = new URL(langURL);\n const isSecure =\n protocol === "https:" ||\n (protocol === "http:" &&\n (hostname === "localhost" ||\n hostname === "127.0.0.1" ||\n hostname === "[::1]"));\n if (!isSecure) {\n throw new Error(\n `langURL must be https: or http: on localhost, got "${langURL}"`\n );\n }\n importScripts(langURL);\n } else {\n throw new Error(\n `No langScript or langURL provided for language "${lang}"`\n );\n }\n if (typeof self[propName] === "function") {\n self.hljs.registerLanguage(lang, self[propName]);\n } else {\n throw new Error(\n `Language definer "${propName}" is not a function on self`\n );\n }\n } catch (err) {\n console.error("Failed to load or register language", lang, err);\n }\n delete data.langScript;\n delete data.langURL;\n break;\n }\n case "highlight": {\n const { code } = data;\n const langs = data.languages?.length ? data.languages : undefined;\n try {\n const { value, language } = self.hljs.highlightAuto(code, langs);\n Object.assign(data, { value, language });\n } catch (err) {\n console.error("Could not transform some code?", err);\n Object.assign(data, { value: code, language: "" });\n }\n break;\n }\n }\n self.postMessage(data);\n});\n'});var Qn=Object.freeze({__proto__:null,name:"core/location-hash",run:function(){window.location.hash&&document.respec.ready.then((()=>{let e=decodeURIComponent(window.location.hash).slice(1);const t=document.getElementById(e),n=/\W/.test(e);if(!t&&n){const t=e.replace(/[\W]+/gim,"-").replace(/^-+/,"").replace(/-+$/,"");document.getElementById(t)&&(e=t)}window.location.hash=`#${e}`}))}});const Jn={lint:{"no-headingless-sections":!0,"no-http-props":!0,"no-unused-vars":!1,"check-punctuation":!1,"local-refs-exist":!0,"check-internal-slots":!1,"check-charset":!1,"privsec-section":!1,"no-dfn-in-abstract":!1},pluralize:!0,specStatus:"base",highlightVars:!0,addSectionLinks:!0},Xn=new Map([["cc0",{name:"Creative Commons 0 Public Domain Dedication",short:"CC0",url:"https://creativecommons.org/publicdomain/zero/1.0/"}],["cc-by",{name:"Creative Commons Attribution 4.0 International Public License",short:"CC-BY",url:"https://creativecommons.org/licenses/by/4.0/legalcode"}],["cc-by-nd",{name:"Creative Commons Attribution-NoDerivatives 4.0 International Public License",short:"CC-BY-ND",url:"https://creativecommons.org/licenses/by-nd/4.0/legalcode.nl"}]]),Yn={lint:{"privsec-section":!0},doJsonLd:!0,license:"cc-by",specStatus:"GN-BASIS",logos:[{src:"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg",alt:"Geonovum",id:"Geonovum",height:67,width:132,url:"https://www.geonovum.nl/"}]};var er=Object.freeze({__proto__:null,name:"geonovum/defaults",run:function(e){const t=!1!==e.lint&&{...Jn.lint,...Yn.lint,...e.lint};Object.assign(e,{...Jn,...Yn,...e,lint:t}),Object.assign(e,function(e){return{isCCBY:"cc-by"===e.license,licenseInfo:Xn.get(e.license),isBasic:"GN-BASIS"===e.specStatus,isRegular:"GN-BASIS"===e.specStatus}}(e))}});const tr=String.raw,nr=String.raw`color-mix(in srgb, #eaf3ff 15%, transparent)`;var rr=tr`@keyframes pop{
98
98
  0%{transform:scale(1,1)}
99
99
  25%{transform:scale(1.25,1.25);opacity:.75}
100
100
  100%{transform:scale(1,1)}
@@ -109,6 +109,10 @@ a.bibref{text-decoration:none}
109
109
  .respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x}
110
110
  }
111
111
  #references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1}
112
+ @media (prefers-color-scheme:dark){
113
+ #references :target{background:${nr}}
114
+ }
115
+ body:has(input[name=color-scheme][value=dark]:checked) #references :target{background:${nr}}
112
116
  cite .bibref{font-style:italic}
113
117
  a[href].orcid{padding-left:4px;padding-right:4px}
114
118
  a[href].orcid>svg{margin-bottom:-2px}
@@ -125,7 +129,7 @@ details.respec-tests-details>li{padding-left:1em}
125
129
  .self-link:hover{opacity:1;text-decoration:none;background-color:transparent}
126
130
  aside.example .marker>a.self-link{color:inherit}
127
131
  .header-wrapper{display:flex;align-items:baseline}
128
- :is(h2,h3,h4,h5,h6):not(#toc>h2,#abstract>h2,#sotd>h2,.head>h2){position:relative;left:-.5em}
132
+ :is(h2,h3,h4,h5,h6):not(#toc>h2,#abstract>h2,#sotd>h2,.head>h2):has(+a.self-link){position:relative;left:-.5em}
129
133
  :is(h2,h3,h4,h5,h6):not(#toch2)+a.self-link{color:inherit;order:-1;position:relative;left:-1.1em;font-size:1rem;opacity:.5}
130
134
  :is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";text-decoration:none;color:var(--heading-text)}
131
135
  :is(h2,h3)+a.self-link{top:-.2em}
@@ -135,74 +139,80 @@ dd{margin-left:0}
135
139
  }
136
140
  @media print{
137
141
  .removeOnSave{display:none}
138
- }`;const Bn=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=Mn,document.head.appendChild(e),e}();var Hn=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&Bn.remove()}});const Fn="geonovum/style";function Un(e){const t=document.createElement("link");return t.rel="stylesheet",t.href=`https://tools.geostandaarden.nl/respec/style/${e}.css`,t}const Wn=function(){const e=[{hint:"preconnect",href:"https://www.w3.org"},{hint:"preload",href:"https://www.w3.org/scripts/TR/2016/fixup.js",as:"script"},{hint:"preconnect",href:"https://tools.geostandaarden.nl/"},{hint:"preload",href:"https://tools.geostandaarden.nl/respec/style/base.css",as:"style"},{hint:"preload",href:"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg",as:"image"}],t=document.createDocumentFragment();for(const n of e.map(gt))t.appendChild(n);return t}(),Gn=document.createElement("link");Gn.rel="shortcut icon",Gn.type="image/x-icon",Gn.href="https://tools.geostandaarden.nl/respec/style/logos/Geonovum.ico",document.head.prepend(Gn),document.head.querySelector("meta[name=viewport]")||Wn.prepend(function(){const e=document.createElement("meta");return e.name="viewport",e.content=function(e,t=", ",n="="){return Array.from(Object.entries(e)).map((([e,t])=>`${e}${n}${JSON.stringify(t)}`)).join(t)}({width:"device-width","initial-scale":"1","shrink-to-fit":"no"}).replace(/"/g,""),e}()),document.head.prepend(Wn);var Vn=Object.freeze({__proto__:null,name:Fn,run:function(e){if(!e.specStatus){const t="`respecConfig.specStatus` missing. Defaulting to 'GN-BASIS'.";e.specStatus="GN-BASIS",Mt(t,Fn)}document.body.querySelector("figure.scalable")&&(document.head.appendChild(Un("leaflet")),document.head.appendChild(Un("font-awesome")));let t="";switch(e.specStatus.toUpperCase()){case"GN-WV":t+="GN-WV.css";break;case"GN-CV":t+="GN-CV.css";break;case"GN-VV":t+="GN-VV.css";break;case"GN-DEF":t+="GN-DEF.css";break;case"GN-BASIS":t+="GN-BASIS.css";break;default:t="base.css"}e.noToc||Kt("end-all",(()=>{!function(e,t){const n=e.createElement("script");n.addEventListener("load",(()=>{window.location.hash&&(window.location.href=window.location.hash)}),{once:!0}),n.src=`https://www.w3.org/scripts/TR/${t}/fixup.js`,e.body.appendChild(n)}(document,"2016")}),{once:!0}),function(e,t){const n=[].concat(t).map((t=>{const n=e.createElement("link");return n.rel="stylesheet",n.href=t,n})).reduce(((e,t)=>(e.appendChild(t),e)),e.createDocumentFragment());e.head.appendChild(n)}(document,`https://tools.geostandaarden.nl/respec/style/${t}`)}});const Zn={en:{status_at_publication:lt`This section describes the status of this
142
+ }
143
+ body:has(input[name=color-scheme][value=light]:checked),head:not(:has(meta[name=color-scheme][content~=dark]))+body{color-scheme:light}
144
+ body:has(input[name=color-scheme][value=dark]:checked){color-scheme:dark}`;const or=function(){const e=document.createElement("style");return e.id="respec-mainstyle",e.textContent=rr,document.head.appendChild(e),e}();var sr=Object.freeze({__proto__:null,name:"core/style",run:function(e){e.noReSpecCSS&&or.remove()}});const ir="geonovum/style";function ar(e){const t=document.createElement("link");return t.rel="stylesheet",t.href=`https://tools.geostandaarden.nl/respec/style/${e}.css`,t}const lr=function(){const e=[{hint:"preconnect",href:"https://www.w3.org"},{hint:"preload",href:"https://www.w3.org/scripts/TR/2016/fixup.js",as:"script"},{hint:"preconnect",href:"https://tools.geostandaarden.nl/"},{hint:"preload",href:"https://tools.geostandaarden.nl/respec/style/base.css",as:"style"},{hint:"preload",href:"https://tools.geostandaarden.nl/respec/style/logos/Geonovum.svg",as:"image"}],t=document.createDocumentFragment();for(const n of e.map(kt))t.appendChild(n);return t}(),cr=document.createElement("link");cr.rel="shortcut icon",cr.type="image/x-icon",cr.href="https://tools.geostandaarden.nl/respec/style/logos/Geonovum.ico",document.head.prepend(cr),document.head.querySelector("meta[name=viewport]")||lr.prepend(function(){const e=document.createElement("meta");return e.name="viewport",e.content=function(e,t=", ",n="="){return Array.from(Object.entries(e)).map((([e,t])=>`${e}${n}${JSON.stringify(t)}`)).join(t)}({width:"device-width","initial-scale":"1","shrink-to-fit":"no"}).replace(/"/g,""),e}()),document.head.prepend(lr);var ur=Object.freeze({__proto__:null,name:ir,run:function(e){if(!e.specStatus){const t="`respecConfig.specStatus` missing. Defaulting to 'GN-BASIS'.";e.specStatus="GN-BASIS",Wt(t,ir)}document.body.querySelector("figure.scalable")&&(document.head.appendChild(ar("leaflet")),document.head.appendChild(ar("font-awesome")));let t="";switch(e.specStatus.toUpperCase()){case"GN-WV":t+="GN-WV.css";break;case"GN-CV":t+="GN-CV.css";break;case"GN-VV":t+="GN-VV.css";break;case"GN-DEF":t+="GN-DEF.css";break;case"GN-BASIS":t+="GN-BASIS.css";break;default:t="base.css"}e.noToc||en("end-all",(()=>{!function(e,t){const n=e.createElement("script");n.addEventListener("load",(()=>{window.location.hash&&(window.location.href=window.location.hash)}),{once:!0}),n.src=`https://www.w3.org/scripts/TR/${t}/fixup.js`,e.body.appendChild(n)}(document,"2016")}),{once:!0}),function(e,t){const n=[].concat(t).map((t=>{const n=e.createElement("link");return n.rel="stylesheet",n.href=t,n})).reduce(((e,t)=>(e.appendChild(t),e)),e.createDocumentFragment());e.head.appendChild(n)}(document,`https://tools.geostandaarden.nl/respec/style/${t}`)}});const dr={en:{status_at_publication:pt`This section describes the status of this
139
145
  document at the time of its publication. Other documents may supersede
140
146
  this document. A list of current Geonovum publications and the latest
141
147
  revision of this document can be found via
142
148
  <a href="https://www.geonovum.nl/geo-standaarden/alle-standaarden"
143
149
  >https://www.geonovum.nl/geo-standaarden/alle-standaarden</a
144
- >(in Dutch).`},nl:{status_at_publication:lt`Deze paragraaf beschrijft de status van dit
150
+ >(in Dutch).`},nl:{status_at_publication:pt`Deze paragraaf beschrijft de status van dit
145
151
  document ten tijde van publicatie. Het is mogelijk dat er actuelere
146
152
  versies van dit document bestaan. Een lijst van Geonovum publicaties en de
147
153
  laatste gepubliceerde versie van dit document zijn te vinden op
148
154
  <a href="https://www.geonovum.nl/geo-standaarden/alle-standaarden"
149
155
  >https://www.geonovum.nl/geo-standaarden/alle-standaarden</a
150
- >.`}};Object.keys(Zn).forEach((e=>{o[e]||(o[e]={}),Object.assign(o[e],Zn[e])}));var Kn=Object.freeze({__proto__:null,name:"geonovum/l10n"});const Qn="core/github";let Jn,Xn;const Yn=new Promise(((e,t)=>{Jn=e,Xn=e=>{Dt(e,Qn),t(new Error(e))}})),er=$t({en:{file_a_bug:"File an issue",participate:"Participate:",commit_history:"Commit history"},ko:{participate:"참여"},zh:{file_a_bug:"反馈错误",participate:"参与:"},ja:{commit_history:"変更履歴",file_a_bug:"問題報告",participate:"参加方法:"},nl:{commit_history:"Revisiehistorie",file_a_bug:"Dien een melding in",participate:"Doe mee:"},es:{commit_history:"Historia de cambios",file_a_bug:"Nota un bug",participate:"Participe:"},de:{commit_history:"Revisionen",file_a_bug:"Fehler melden",participate:"Mitmachen:"}});var tr=Object.freeze({__proto__:null,github:Yn,name:Qn,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void Jn(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=Wt`Config option ${"[github]"} is missing property \`repoURL\`.`;return void Xn(e)}let t,n=e.github.repoURL||e.github;n.endsWith("/")||(n+="/");try{t=new URL(n,"https://github.com")}catch{const e=Wt`${"[github]"} configuration option is not a valid URL? (${n}).`;return void Xn(e)}if("https://github.com"!==t.origin){const e=Wt`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${t.href}).`;return void Xn(e)}const[r,o]=t.pathname.split("/").filter((e=>e));if(!r||!o){const e=Wt`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void Xn(e)}const s=e.github.branch||"gh-pages",i=new URL("./issues/",t).href;let a,l;if(a="object"==typeof e.github&&e.github.hasOwnProperty("pullsURL")?e.github.pullsURL:new URL("./pulls/",t).href,a)try{const e=new URL(a);if("https://github.com"!==e.origin){const e=Wt`${"[github.pullsURL]"} must be HTTPS and pointing to GitHub. (${a}).`;return void Xn(e)}if(!e.pathname.includes("/pulls")){const e=Wt`${"[github.pullsURL]"} must point to pull requests. (${a}).`;return void Xn(e)}}catch{const e=Wt`${"[github.pullsURL]"} is not a valid URL. (${a}).`;return void Xn(e)}if(l="object"==typeof e.github&&e.github.hasOwnProperty("commitHistoryURL")?e.github.commitHistoryURL:new URL(`./commits/${e.github.branch??""}`,t.href).href,l)try{const e=new URL(l);if("https://github.com"!==e.origin){const e=Wt`${"[github.commitHistoryURL]"} must be HTTPS and pointing to GitHub. (${l}).`;return void Xn(e)}if(!e.pathname.includes("/commits")){const e=Wt`${"[github.commitHistoryURL]"} must point to commits. (${l}).`;return void Xn(e)}}catch{const e=Wt`${"[github.commitHistoryURL]"} is not a valid URL. (${l}).`;return void Xn(e)}const c={edDraftURI:`https://${r.toLowerCase()}.github.io/${o}/`,githubToken:void 0,githubUser:void 0,issueBase:i,atRiskBase:i,otherLinks:[],pullBase:a,shortName:o};let u="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)u=e.githubAPI;else{Mt("The `githubAPI` configuration option is private and should not be added manually.",Qn)}if(!e.excludeGithubLinks){const n={key:er.participate,data:[{value:`GitHub ${r}/${o}`,href:t},{value:er.file_a_bug,href:c.issueBase},{value:er.commit_history,href:l},{value:"Pull requests",href:a}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(n)}const d={branch:s,repoURL:t.href,apiBase:u,fullName:`${r}/${o}`,issuesURL:i,pullsURL:a,newIssuesURL:new URL("./new/choose",i).href,commitHistoryURL:l};Jn(d);const p={...c,...e,github:d,githubAPI:u};Object.assign(e,p)}});class nr{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}static sectionClasses=new Set(["appendix","informative","notoc"]);findPosition(e){return parseInt(e.tagName.charAt(1),10)}findParent(e){let t;for(;e>0;)if(e--,t=this.stack[e],t)return t}findHeader({firstChild:e}){for(;e;){if(/H[1-6]/.test(e.tagName))return e;e=e.nextSibling}return null}addHeader(e){const t=this.doc.createElement("section"),n=this.findPosition(e);t.appendChild(e),this.findParent(n).appendChild(t),this.stack[n]=t,this.stack.length=n+1,this.current=t,this.processHeader(e,t)}processHeader(e,t){nr.sectionClasses.intersection(new Set(e.classList)).forEach((e=>{t.classList.add(e)}))}addSection(e){const t=this.findHeader(e),n=t?this.findPosition(t):1,r=this.findParent(n);t&&e.removeChild(t),e.appendChild(rr(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function rr(e){const t=new nr(e.ownerDocument);for(;e.firstChild;){const n=e.firstChild;switch(n.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":t.addHeader(n);break;case"section":t.addSection(n);break;default:t.addElement(n)}}return t.root}function or(e){const t=rr(e);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}var sr=Object.freeze({__proto__:null,name:"core/sections",restructure:or,run:function(){or(document.body)}});const ir="core/data-include";function ar(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`),o=_t(e,r.dataset.oninclude,n),s="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let o=t;"markdown"===r&&(o=dn(o)),"text"===r?e.textContent=o:e.innerHTML=o,"markdown"===r&&or(e),n&&e.replaceWith(...e.childNodes)}(r,o,{replace:s}),s||function(e){["data-include","data-include-format","data-include-replace","data-include-id","oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function lr(e,t){const n=e.querySelectorAll("[data-include]"),r=Array.from(n).map((async e=>{const n=e.dataset.include;if(!n)return;const r=`include-${String(Math.random()).slice(2)}`;e.dataset.includeId=r;try{const o=await fetch(n);ar(await o.text(),r,n),t<3&&await lr(e,t+1)}catch(t){Dt(`\`data-include\` failed: \`${n}\` (${t.message}).`,ir,{elements:[e],cause:t})}}));await Promise.all(r)}var cr=Object.freeze({__proto__:null,name:ir,run:async function(){await lr(document,1)}});var ur=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=Gt(e.innerHTML)}});var dr=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=_t(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});const pr=/^[a-z]+(\s+[a-z]+)+\??$/,hr=/\B"([^"]*)"\B/,fr=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,mr=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,gr=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,br=/^(?:\w+)\??$/,yr=/^(\w+)\["([\w- ]*)"\]$/,vr=/\.?(\w+\(.*\)$)/,wr=/\/(.+)/,kr=/\[\[.+\]\]/;function xr(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return lt`<a
156
+ >.`}};Object.keys(dr).forEach((e=>{n[e]||(n[e]={}),Object.assign(n[e],dr[e])}));var pr=Object.freeze({__proto__:null,name:"geonovum/l10n"});const hr="core/github";let fr,mr;const gr=new Promise(((e,t)=>{fr=e,mr=e=>{Ft(e,hr),t(new Error(e))}})),br=Ct({en:{file_a_bug:"File an issue",participate:"Participate:",commit_history:"Commit history"},ko:{participate:"참여"},zh:{file_a_bug:"反馈错误",participate:"参与:"},ja:{commit_history:"変更履歴",file_a_bug:"問題報告",participate:"参加方法:"},nl:{commit_history:"Revisiehistorie",file_a_bug:"Dien een melding in",participate:"Doe mee:"},es:{commit_history:"Historia de cambios",file_a_bug:"Nota un bug",participate:"Participe:"},de:{commit_history:"Revisionen",file_a_bug:"Fehler melden",participate:"Mitmachen:"}});var yr=Object.freeze({__proto__:null,github:gr,name:hr,run:async function(e){if(!e.hasOwnProperty("github")||!e.github)return void fr(null);if("object"==typeof e.github&&!e.github.hasOwnProperty("repoURL")){const e=Qt`Config option ${"[github]"} is missing property \`repoURL\`.`;return void mr(e)}const t="string"==typeof e.github?{}:e.github;let n,r=t.repoURL||String(e.github);r.endsWith("/")||(r+="/");try{n=new URL(r,"https://github.com")}catch{const e=Qt`${"[github]"} configuration option is not a valid URL? (${r}).`;return void mr(e)}if("https://github.com"!==n.origin){const e=Qt`${"[github]"} configuration option must be HTTPS and pointing to GitHub. (${n.href}).`;return void mr(e)}const[o,s]=n.pathname.split("/").filter((e=>e));if(!o||!s){const e=Qt`${"[github]"} URL needs a path. For example, "w3c/my-spec".`;return void mr(e)}const i=t.branch||"gh-pages",a=new URL("./issues/",n).href,l=new URL("./new/choose",a).href;let c,u;if(c="object"==typeof e.github&&e.github.hasOwnProperty("pullsURL")?e.github.pullsURL:new URL("./pulls/",n).href,c)try{const e=new URL(c);if("https://github.com"!==e.origin){const e=Qt`${"[github.pullsURL]"} must be HTTPS and pointing to GitHub. (${c}).`;return void mr(e)}if(!e.pathname.includes("/pulls")){const e=Qt`${"[github.pullsURL]"} must point to pull requests. (${c}).`;return void mr(e)}}catch{const e=Qt`${"[github.pullsURL]"} is not a valid URL. (${c}).`;return void mr(e)}if(u="object"==typeof e.github&&e.github.hasOwnProperty("commitHistoryURL")?e.github.commitHistoryURL:new URL(`./commits/${t.branch??""}`,n.href).href,u)try{const e=new URL(u);if("https://github.com"!==e.origin){const e=Qt`${"[github.commitHistoryURL]"} must be HTTPS and pointing to GitHub. (${u}).`;return void mr(e)}if(!e.pathname.includes("/commits")){const e=Qt`${"[github.commitHistoryURL]"} must point to commits. (${u}).`;return void mr(e)}}catch{const e=Qt`${"[github.commitHistoryURL]"} is not a valid URL. (${u}).`;return void mr(e)}const d={edDraftURI:`https://${o.toLowerCase()}.github.io/${s}/`,githubToken:void 0,githubUser:void 0,issueBase:a,atRiskBase:a,otherLinks:[],pullBase:c,shortName:s};let p="https://respec.org/github";if(e.githubAPI)if(new URL(e.githubAPI).hostname===window.parent.location.hostname)p=e.githubAPI;else{Wt("The `githubAPI` configuration option is private and should not be added manually.",hr)}if(!e.excludeGithubLinks){const t={key:br.participate,data:[{value:`GitHub ${o}/${s}`,href:n},{value:"All issues",href:a},{value:br.file_a_bug,href:l},{value:br.commit_history,href:u},{value:"Pull requests",href:c}]};e.otherLinks||(e.otherLinks=[]),e.otherLinks.unshift(t)}const h={branch:i,repoURL:n.href,apiBase:p,fullName:`${o}/${s}`,issuesURL:a,pullsURL:c,newIssuesURL:l,commitHistoryURL:u};fr(h);const f={...d,...e,github:h,githubAPI:p};Object.assign(e,f)}});class vr{constructor(e){this.doc=e,this.root=e.createDocumentFragment(),this.stack=[this.root],this.current=this.root}static sectionClasses=new Set(["appendix","informative","notoc"]);findPosition(e){return parseInt(e.tagName.charAt(1),10)}findParent(e){let t;for(;e>0;)if(e--,t=this.stack[e],t)return t}findHeader({firstChild:e}){for(;e;){if(/H[1-6]/.test(e.tagName))return e;e=e.nextSibling}return null}addHeader(e){const t=this.doc.createElement("section"),n=this.findPosition(e);t.appendChild(e),this.findParent(n).appendChild(t),this.stack[n]=t,this.stack.length=n+1,this.current=t,this.processHeader(e,t)}processHeader(e,t){vr.sectionClasses.intersection(new Set(e.classList)).forEach((e=>{t.classList.add(e)}))}addSection(e){const t=this.findHeader(e),n=t?this.findPosition(t):1,r=this.findParent(n);t&&e.removeChild(t),e.appendChild(wr(e)),t&&e.prepend(t),r.appendChild(e),this.current=r}addElement(e){this.current.appendChild(e)}}function wr(e){const t=new vr(e.ownerDocument);for(;e.firstChild;){const n=e.firstChild;switch(n.localName){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":t.addHeader(n);break;case"section":t.addSection(n);break;default:t.addElement(n)}}return t.root}function kr(e){const t=wr(e);if("section"===t.firstElementChild.localName&&"section"===e.localName){const n=t.firstElementChild;n.remove(),e.append(...n.childNodes)}else e.textContent="";e.appendChild(t)}var xr=Object.freeze({__proto__:null,name:"core/sections",restructure:kr,run:function(){kr(document.body)}});const $r="core/data-include";function Sr(e,t,n){const r=document.querySelector(`[data-include-id=${t}]`);if(!r)return;const o=Rt(e,r.dataset.oninclude,n),s="string"==typeof r.dataset.includeReplace;!function(e,t,{replace:n}){const{includeFormat:r}=e.dataset;let o=t;"markdown"===r&&(o=_n(o)),"text"===r?e.textContent=o:e.innerHTML=o,"markdown"===r&&kr(e),n&&e.replaceWith(...e.childNodes)}(r,o,{replace:s}),s||function(e){["data-include","data-include-format","data-include-replace","data-include-id","data-oninclude"].forEach((t=>e.removeAttribute(t)))}(r)}async function _r(e,t){const n=e.querySelectorAll("[data-include]"),r=Array.from(n).map((async e=>{const n=e.dataset.include;if(!n)return;const r=`include-${String(Math.random()).slice(2)}`;e.dataset.includeId=r;try{const o=await fetch(n);Sr(await o.text(),r,n),t<3&&await _r(e,t+1)}catch(t){const r=t;Ft(`\`data-include\` failed: \`${n}\` (${r.message}).`,$r,{elements:[e],cause:r})}}));await Promise.all(r)}var Er=Object.freeze({__proto__:null,name:$r,run:async function(){await _r(document,1)}});var Lr=Object.freeze({__proto__:null,name:"core/reindent",run:function(){for(const e of document.getElementsByTagName("pre"))e.innerHTML=Jt(e.innerHTML)}});var Cr=Object.freeze({__proto__:null,name:"core/data-transform",run:function(){document.querySelectorAll("[data-transform]").forEach((e=>{e.innerHTML=Rt(e.innerHTML,e.dataset.transform),e.removeAttribute("data-transform")}))}});var Rr=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
157
+ .assert{border-left:.5em solid #aaa;padding:.3em;border-color:#aaa;border-color:var(--assertion-border);background:#eee;background:var(--assertion-bg);color:#000;color:var(--assertion-text)}
158
+ @media (prefers-color-scheme:dark){
159
+ :root{--assertion-border:#444;--assertion-bg:var(--borderedblock-bg);--assertion-text:var(--text)}
160
+ }`;var Ar=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){const e=Array.from(document.querySelectorAll("ol.algorithm li")).filter((e=>e.textContent.trim().startsWith("Assert: ")));if(!e.length)return;for(const t of e){t.classList.add("assert");const e=t.firstChild;e instanceof Text&&e.textContent.startsWith("Assert: ")&&(e.textContent=e.textContent.replace("Assert: ",""),t.prepend(pt`<a data-cite="INFRA#assert">Assert</a>`,": "))}const t=document.createElement("style");t.textContent=Rr,document.head.appendChild(t)}});const Tr=/^[a-z]+(\s+[a-z]+)+\??$/,Nr=/\B"([^"]*)"\B/,Pr=/^(\w+)\(([^\\)]*)\)(?:\|(\w+)(?:\((?:([^\\)]*))\))?)?$/,jr=/\[\[(\w+(?: +\w+)*)\]\](\([^)]*\))?$/,Or=/^((?:\[\[)?(?:\w+(?: +\w+)*)(?:\]\])?)$/,Ir=/^(?:\w+)\??$/,zr=/^(\w+)\["([\w- ]*)"\]$/,Dr=/\.?(\w+\(.*\)$)/,Mr=/\/(.+)/,qr=/\[\[.+\]\]/;function Br(e){const{identifier:t,renderParent:n,nullable:r}=e;if(n)return pt`<a
151
161
  data-xref-type="_IDL_"
152
162
  data-link-type="idl"
153
163
  data-lt="${t}"
154
164
  ><code>${t+(r?"?":"")}</code></a
155
- >`}function $r(e){const{identifier:t,parent:n,slotType:r,renderParent:o,args:s}=e,{identifier:i}=n||{},a="method"===r,l=a?lt`(${St(s,_r)})`:null,c=a?`(${s.join(", ")})`:"";return lt`${n&&o?".":""}<a
165
+ >`}function Hr(e){const{identifier:t,parent:n,slotType:r,renderParent:o,args:s}=e,{identifier:i}=n||{},a="method"===r,l=s??[],c=a?pt`(${At(l,Ur)})`:null,u=a?`(${l.join(", ")})`:"";return pt`${n&&o?".":""}<a
156
166
  data-xref-type="${r}"
157
167
  data-link-type="${r}"
158
168
  data-link-for="${i}"
159
169
  data-xref-for="${i}"
160
- data-lt="${`[[${t}]]${c}`}"
161
- ><code>[[${t}]]${l}</code></a
162
- >`}function _r(e,t,n){if(t<n.length-1)return lt`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),o=r.length>1,s=o?r[2]:r[0];return lt`${o?"...":null}<var>${s}</var>`}function Sr(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:o}=t||{};return lt`${r?".":""}<a
170
+ data-lt="${`[[${t}]]${u}`}"
171
+ ><code>[[${t}]]${c}</code></a
172
+ >`}function Ur(e,t,n){if(t<n.length-1)return pt`<var>${e}</var>`;const r=e.split(/(^\.{3})(.+)/),o=r.length>1,s=o?r[2]:r[0];return pt`${o?"...":null}<var>${s}</var>`}function Fr(e){const{parent:t,identifier:n,renderParent:r}=e,{identifier:o}=t||{};return pt`${r?".":""}<a
163
173
  data-link-type="idl"
164
174
  data-xref-type="attribute|dict-member|const"
165
175
  data-link-for="${o}"
166
176
  data-xref-for="${o}"
167
177
  ><code>${n}</code></a
168
- >`}function Er(e){const{args:t,identifier:n,type:r,parent:o,renderParent:s}=e,{renderText:i,renderArgs:a}=e,{identifier:l}=o||{},c=St(a||t,_r),u=`${n}(${t.join(", ")})`;return lt`${o&&s?".":""}<a
178
+ >`}function Wr(e){const{args:t,identifier:n,type:r,parent:o,renderParent:s}=e,{renderText:i,renderArgs:a}=e,{identifier:l}=o||{},c=At(a||t,Ur),u=`${n}(${t.join(", ")})`;return pt`${o&&s?".":""}<a
169
179
  data-link-type="idl"
170
180
  data-xref-type="${r}"
171
181
  data-link-for="${l}"
172
182
  data-xref-for="${l}"
173
183
  data-lt="${u}"
174
184
  ><code>${i||n}</code></a
175
- >${!i||a?lt`<code>(${c})</code>`:""}`}function Cr(e){const{identifier:t,enumValue:n,parent:r}=e,o=r?r.identifier:t;return lt`"<a
185
+ >${!i||a?pt`<code>(${c})</code>`:""}`}function Gr(e){const{identifier:t,enumValue:n,parent:r}=e,o=r?r.identifier:t;return pt`"<a
176
186
  data-link-type="idl"
177
187
  data-xref-type="enum-value"
178
188
  data-link-for="${o}"
179
189
  data-xref-for="${o}"
180
190
  data-lt="${n?null:"the-empty-string"}"
181
191
  ><code>${n}</code></a
182
- >"`}function Lr(e){const{identifier:t}=e;return lt`"<a
192
+ >"`}function Vr(e){const{identifier:t}=e;return pt`"<a
183
193
  data-link-type="idl"
184
194
  data-cite="webidl"
185
195
  data-xref-type="exception"
186
196
  ><code>${t}</code></a
187
- >"`}function Ar(e){const{identifier:t,nullable:n}=e;return lt`<a
197
+ >"`}function Zr(e){const{identifier:t,nullable:n}=e;return pt`<a
188
198
  data-link-type="idl"
189
199
  data-cite="webidl"
190
200
  data-xref-type="interface"
191
201
  data-lt="${t}"
192
202
  ><code>${t+(n?"?":"")}</code></a
193
- >`}function Rr(e){let t;try{t=function(e){const t=kr.test(e),n=t?wr:vr,[r,o]=e.split(n);if(t&&r&&!o)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const s=r.split(/[./]/).concat(o).filter((e=>e&&e.trim())).map((e=>e.trim())),i=!e.includes("/"),a=[];for(;s.length;){const t=s.pop();if(fr.test(t)){const[,e,n,r,o]=t.match(fr),s=n.split(/,\s*/).filter((e=>e)),l=r?.trim(),c=o?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e,args:s,renderParent:i,renderText:l,renderArgs:c})}else if(yr.test(t)){const[,e,n]=t.match(yr);a.push({type:"enum",identifier:e,enumValue:n,renderParent:i})}else if(hr.test(t)){const[,e]=t.match(hr);i?a.push({type:"exception",identifier:e}):a.push({type:"enum",enumValue:e,renderParent:i})}else if(mr.test(t)){const[,e,n]=t.match(mr),r=n?"method":"attribute",o=n?.slice(1,-1).split(/,\s*/).filter((e=>e));a.push({type:"internal-slot",slotType:r,identifier:e,args:o,renderParent:i})}else if(gr.test(t)&&s.length){const[,e]=t.match(gr);a.push({type:"attribute",identifier:e,renderParent:i})}else if(pr.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:i,nullable:e})}else{if(!br.test(t)||0!==s.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:i,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=lt`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return Dt(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=lt(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=xr(e);t&&r.push(t);break}case"attribute":r.push(Sr(e));break;case"internal-slot":r.push($r(e));break;case"method":r.push(Er(e));break;case"enum":r.push(Cr(e));break;case"exception":r.push(Lr(e));break;case"idl-primitive":r.push(Ar(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const Tr=new Set(["alias","reference"]),Pr=async function(){const e=await ct.openDB("respec-biblio2",12,{upgrade(e){Array.from(e.objectStoreNames).map((t=>e.deleteObjectStore(t)));e.createObjectStore("alias",{keyPath:"id"}).createIndex("aliasOf","aliasOf",{unique:!1}),e.createObjectStore("reference",{keyPath:"id"})}}),t=Date.now();for(const n of[...Tr]){const r=e.transaction(n,"readwrite").store,o=IDBKeyRange.lowerBound(t);let s=await r.openCursor(o);for(;s?.value;){const e=s.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),s=await s.continue()}}return e}();const Nr={get ready(){return Pr},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)),await this.get("reference",e)},async has(e,t){if(!Tr.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t);return!!await n.openCursor(r)},async isAlias(e){return await this.has("alias",e)},async resolveAlias(e){if(!e)throw new TypeError("id is required");const t=(await this.ready).transaction("alias","readonly").store,n=IDBKeyRange.only(e),r=await t.openCursor(n);return r?r.value.aliasOf:null},async get(e,t){if(!Tr.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t),o=await n.openCursor(r);return o?o.value:null},async addAll(e,t){if(!e)return;const n={alias:[],reference:[]};for(const r of Object.keys(e)){const o={id:r,...e[r],expires:t};o.aliasOf?n.alias.push(o):n.reference.push(o)}const r=[...Tr].flatMap((e=>n[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!Tr.has(e))throw new TypeError(`Invalid type: ${e}`);if("object"!=typeof t)throw new TypeError("details should be an object");if("alias"===e&&!t.hasOwnProperty("aliasOf"))throw new TypeError("Invalid alias object.");const n=await this.ready;let r=await this.has(e,t.id);if(r){const o=await this.get(e,t.id);if(o?.expires<Date.now()){const{store:o}=n.transaction(e,"readwrite");await o.delete(t.id),r=!1}}const{store:o}=n.transaction(e,"readwrite");return r?await o.put(t):await o.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...Tr],n=e.transaction(t,"readwrite"),r=t.map((e=>n.objectStore(e).clear()));await Promise.all(r)}},jr={},Ir=new URL("https://api.specref.org/bibrefs?refs="),Or=gt({hint:"dns-prefetch",href:Ir.origin});let zr;document.head.appendChild(Or);const qr=new Promise((e=>{zr=e}));async function Dr(e,t={forceUpdate:!1}){const n=[...new Set(e)].filter((e=>e.trim()));if(!n.length||!1===navigator.onLine)return null;let r;try{r=await fetch(Ir.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const o=await r.json(),s=Date.now()+36e5;try{const e=r.headers.has("Expires")?Math.min(Date.parse(r.headers.get("Expires")),s):s;await Nr.addAll(o,e)}catch(e){console.error(e)}return o}async function Mr(e){const t=await qr;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await Mr(n.aliasOf):n}var Br=Object.freeze({__proto__:null,Plugin:class{constructor(e){this.conf=e}normalizeReferences(){const e=new Set([...this.conf.normativeReferences].map((e=>e.toLowerCase())));Array.from(this.conf.informativeReferences).filter((t=>e.has(t.toLowerCase()))).forEach((e=>this.conf.informativeReferences.delete(e)))}getRefKeys(){return{informativeReferences:Array.from(this.conf.informativeReferences),normativeReferences:Array.from(this.conf.normativeReferences)}}async run(){this.conf.localBiblio||(this.conf.localBiblio={}),this.conf.biblio=jr;const e=Object.keys(this.conf.localBiblio).filter((e=>this.conf.localBiblio[e].hasOwnProperty("aliasOf"))).map((e=>this.conf.localBiblio[e].aliasOf)).filter((e=>!this.conf.localBiblio.hasOwnProperty(e)));this.normalizeReferences();const t=this.getRefKeys(),n=Array.from(new Set(t.normativeReferences.concat(t.informativeReferences).filter((e=>!this.conf.localBiblio.hasOwnProperty(e))).concat(e).sort())),r=n.length?await async function(e){const t=[];try{await Nr.ready;const n=e.map((async e=>({id:e,data:await Nr.find(e)})));t.push(...await Promise.all(n))}catch(n){t.push(...e.map((e=>({id:e,data:null})))),console.warn(n)}return t}(n):[],o={hasData:[],noData:[]};r.forEach((e=>{(e.data?o.hasData:o.noData).push(e)})),o.hasData.forEach((e=>{jr[e.id]=e.data}));const s=o.noData.map((e=>e.id));if(s.length){const e=await Dr(s,{forceUpdate:!0});Object.assign(jr,e)}Object.assign(jr,this.conf.localBiblio),(()=>{zr(this.conf.biblio)})()}},biblio:jr,name:"core/biblio",resolveRef:Mr,updateFromNetwork:Dr});const Hr="core/render-biblio",Fr=$t({en:{info_references:"Informative references",norm_references:"Normative references",references:"References",reference_not_found:"Reference not found."},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias",reference_not_found:"Referencia no encontrada."},ja:{info_references:"参照用参考文献",norm_references:"規範的参考文献",references:"参考文献"},de:{info_references:"Weiterführende Informationen",norm_references:"Normen und Spezifikationen",references:"Referenzen"},zh:{info_references:"非规范性引用",norm_references:"规范性引用",references:"参考文献"},cs:{info_references:"Informativní odkazy",norm_references:"Normativní odkazy",references:"Odkazy",reference_not_found:"Odkaz nebyl nalezen."}}),Ur=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Working Group Note"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"]]),Wr=(Gr=".",e=>{const t=e.trim();return!t||t.endsWith(Gr)?t:t+Gr});var Gr;function Vr(e,t){const{goodRefs:n,badRefs:r}=function(e){const t=[],n=[];for(const r of e)r.refcontent?t.push(r):n.push(r);return{goodRefs:t,badRefs:n}}(e.map(Zr)),o=function(e){const t=new Map;for(const n of e)t.has(n.refcontent.id)||t.set(n.refcontent.id,n);return[...t.values()]}(n),s=o.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),i=lt`<section>
203
+ >`}function Kr(e){let t;try{t=function(e){const t=qr.test(e),n=t?Mr:Dr,[r,o]=e.split(n);if(t&&r&&!o)throw new SyntaxError(`Internal slot missing "for" part. Expected \`{{ InterfaceName/${r}}}\` }.`);const s=r.split(/[./]/).concat(o).filter((e=>e&&e.trim())).map((e=>e.trim())),i=!e.includes("/"),a=[];for(;s.length;){const t=s.pop()??"";if(Pr.test(t)){const[,e,n,r,o]=t.match(Pr),s=(n??"").split(/,\s*/).filter((e=>e)),l=r?.trim(),c=o?.split(/,\s*/).filter((e=>e));a.push({type:"method",identifier:e??"",args:s,renderParent:i,renderText:l,renderArgs:c})}else if(zr.test(t)){const[,e,n]=t.match(zr);a.push({type:"enum",identifier:e??"",enumValue:n??"",renderParent:i})}else if(Nr.test(t)){const[,e]=t.match(Nr);i?a.push({type:"exception",identifier:e??""}):a.push({type:"enum",enumValue:e??"",renderParent:i})}else if(jr.test(t)){const[,e,n]=t.match(jr),r=n?"method":"attribute",o=n?.slice(1,-1).split(/,\s*/).filter((e=>e))??[];a.push({type:"internal-slot",slotType:r,identifier:e??"",args:o,renderParent:i})}else if(Or.test(t)&&s.length){const[,e]=t.match(Or);a.push({type:"attribute",identifier:e??"",renderParent:i})}else if(Tr.test(t)){const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"idl-primitive",identifier:n,renderParent:i,nullable:e})}else{if(!Ir.test(t)||0!==s.length)throw new SyntaxError(`IDL micro-syntax parsing error in \`{{ ${e} }}\``);{const e=t.endsWith("?"),n=e?t.slice(0,-1):t;a.push({type:"base",identifier:n,renderParent:i,nullable:e})}}}return a.forEach(((e,t,n)=>{e.parent=n[t+1]||null})),a.reverse()}(e)}catch(t){const n=pt`<span>{{ ${e} }}</span>`,r="Error: Invalid inline IDL string.";return Ft(t.message,"core/inlines",{title:r,elements:[n]}),n}const n=pt(document.createDocumentFragment()),r=[];for(const e of t)switch(e.type){case"base":{const t=Br(e);t&&r.push(t);break}case"attribute":r.push(Fr(e));break;case"internal-slot":r.push(Hr(e));break;case"method":r.push(Wr(e));break;case"enum":r.push(Gr(e));break;case"exception":r.push(Vr(e));break;case"idl-primitive":r.push(Zr(e));break;default:throw new Error("Unknown type.")}return n`${r}`}const Qr=new Set(["alias","reference"]),Jr=async function(){const e=await ht.openDB("respec-biblio2",12,{upgrade(e){Array.from(e.objectStoreNames).map((t=>e.deleteObjectStore(t)));e.createObjectStore("alias",{keyPath:"id"}).createIndex("aliasOf","aliasOf",{unique:!1}),e.createObjectStore("reference",{keyPath:"id"})}}),t=Date.now();for(const n of[...Qr]){const r=e.transaction(n,"readwrite").store,o=IDBKeyRange.lowerBound(t);let s=await r.openCursor(o);for(;s?.value;){const e=s.value;(void 0===e.expires||e.expires<t)&&await r.delete(e.id),s=await s.continue()}}return e}();const Xr={get ready(){return Jr},async find(e){return await this.isAlias(e)&&(e=await this.resolveAlias(e)??e),await this.get("reference",e)},async has(e,t){if(!Qr.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t);return!!await n.openCursor(r)},async isAlias(e){return await this.has("alias",e)},async resolveAlias(e){if(!e)throw new TypeError("id is required");const t=(await this.ready).transaction("alias","readonly").store,n=IDBKeyRange.only(e),r=await t.openCursor(n);return r?r.value.aliasOf:null},async get(e,t){if(!Qr.has(e))throw new TypeError(`Invalid type: ${e}`);if(!t)throw new TypeError("id is required");const n=(await this.ready).transaction(e,"readonly").store,r=IDBKeyRange.only(t),o=await n.openCursor(r);return o?o.value:null},async addAll(e,t){if(!e)return;const n={alias:[],reference:[]};for(const r of Object.keys(e)){const o={id:r,...e[r],expires:t};o.aliasOf?n.alias.push(o):n.reference.push(o)}const r=[...Qr].flatMap((e=>n[e].map((t=>this.add(e,t)))));await Promise.all(r)},async add(e,t){if(!Qr.has(e))throw new TypeError(`Invalid type: ${e}`);if("object"!=typeof t)throw new TypeError("details should be an object");if("alias"===e&&!t.hasOwnProperty("aliasOf"))throw new TypeError("Invalid alias object.");const n=await this.ready;let r=await this.has(e,t.id);if(r){const o=await this.get(e,t.id);if(o&&void 0!==o.expires&&o.expires<Date.now()){const{store:o}=n.transaction(e,"readwrite");await o.delete(t.id),r=!1}}const{store:o}=n.transaction(e,"readwrite");return r?await o.put(t):await o.add(t)},async close(){(await this.ready).close()},async clear(){const e=await this.ready,t=[...Qr],n=e.transaction(t,"readwrite"),r=t.map((e=>n.objectStore(e).clear()));await Promise.all(r)}},Yr={},eo=new URL("https://api.specref.org/bibrefs?refs="),to=kt({hint:"dns-prefetch",href:eo.origin});let no;document.head.appendChild(to);const ro=new Promise((e=>{no=e}));async function oo(e,t={forceUpdate:!1}){const n=[...new Set(e)].filter((e=>e.trim()));if(!n.length||!1===navigator.onLine)return null;let r;try{r=await fetch(eo.href+n.join(","))}catch(e){return console.error(e),null}if(!t.forceUpdate&&!r.ok||200!==r.status)return null;const o=await r.json(),s=Date.now()+36e5;try{const e=Date.parse(r.headers.get("Expires")||""),t=Number.isNaN(e)?s:Math.min(e,s);await Xr.addAll(o,t)}catch(e){console.error(e)}return o}async function so(e){const t=await ro;if(!t.hasOwnProperty(e))return null;const n=t[e];return n.aliasOf?await so(n.aliasOf):n}var io=Object.freeze({__proto__:null,Plugin:class{constructor(e){this.conf=e}normalizeReferences(){const e=new Set([...this.conf.normativeReferences].map((e=>e.toLowerCase())));Array.from(this.conf.informativeReferences).filter((t=>e.has(t.toLowerCase()))).forEach((e=>this.conf.informativeReferences.delete(e)))}getRefKeys(){return{informativeReferences:Array.from(this.conf.informativeReferences),normativeReferences:Array.from(this.conf.normativeReferences)}}async run(){this.conf.localBiblio||(this.conf.localBiblio={}),this.conf.biblio=Yr;const e=Object.keys(this.conf.localBiblio).filter((e=>this.conf.localBiblio?.[e]?.hasOwnProperty("aliasOf"))).map((e=>this.conf.localBiblio?.[e]?.aliasOf)).filter((e=>e&&!this.conf.localBiblio?.hasOwnProperty(e)));this.normalizeReferences();const t=this.getRefKeys(),n=Array.from(new Set(t.normativeReferences.concat(t.informativeReferences).filter((e=>!this.conf.localBiblio?.hasOwnProperty(e))).concat(e.filter(Boolean)).sort())),r=n.length?await async function(e){const t=[];try{await Xr.ready;const n=e.map((async e=>({id:e,data:await Xr.find(e)})));t.push(...await Promise.all(n))}catch(n){t.push(...e.map((e=>({id:e,data:null})))),console.warn(n)}return t}(n):[],o={hasData:[],noData:[]};r.forEach((e=>{(e.data?o.hasData:o.noData).push(e)})),o.hasData.forEach((e=>{e.data&&(Yr[e.id]=e.data)}));const s=o.noData.map((e=>e.id));if(s.length){const e=await oo(s,{forceUpdate:!0});Object.assign(Yr,e)}Object.assign(Yr,this.conf.localBiblio),(()=>{no(this.conf.biblio)})()}},biblio:Yr,name:"core/biblio",resolveRef:so,updateFromNetwork:oo});const ao="core/render-biblio";function lo(e){return`bib-${Tt(e)}`}const co=Ct({en:{info_references:"Informative references",norm_references:"Normative references",references:"References",reference_not_found:"Reference not found."},ko:{references:"참조"},nl:{info_references:"Informatieve referenties",norm_references:"Normatieve referenties",references:"Referenties"},es:{info_references:"Referencias informativas",norm_references:"Referencias normativas",references:"Referencias",reference_not_found:"Referencia no encontrada."},ja:{info_references:"参照用参考文献",norm_references:"規範的参考文献",references:"参考文献"},de:{info_references:"Weiterführende Informationen",norm_references:"Normen und Spezifikationen",references:"Referenzen"},zh:{info_references:"非规范性引用",norm_references:"规范性引用",references:"参考文献"},cs:{info_references:"Informativní odkazy",norm_references:"Normativní odkazy",references:"Odkazy",reference_not_found:"Odkaz nebyl nalezen."}}),uo=new Map([["CR","W3C Candidate Recommendation"],["ED","W3C Editor's Draft"],["LCWD","W3C Last Call Working Draft"],["NOTE","W3C Working Group Note"],["PR","W3C Proposed Recommendation"],["REC","W3C Recommendation"],["WD","W3C Working Draft"]]),po=(ho=".",e=>{const t=e.trim();return!t||t.endsWith(ho)?t:t+ho});var ho;function fo(e,t){const{goodRefs:n,badRefs:r}=function(e){const t=[],n=[];for(const r of e)r.refcontent?t.push(r):n.push(r);return{goodRefs:t,badRefs:n}}(e.map(mo)),o=function(e){const t=new Map;for(const n of e)t.has(n.refcontent?.id??"")||t.set(n.refcontent?.id??"",n);return[...t.values()]}(n),s=o.concat(r).sort(((e,t)=>e.ref.toLocaleLowerCase().localeCompare(t.ref.toLocaleLowerCase()))),i=pt`<section>
194
204
  <h3>${t}</h3>
195
- <dl class="bibliography">${s.map(Qr)}</dl>
196
- </section>`;Et(i,"",t);const a=function(e){return e.reduce(((e,t)=>{const n=t.refcontent.id;return(e.has(n)?e.get(n):e.set(n,[]).get(n)).push(t.ref),e}),new Map)}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#bib-${e.toLowerCase()}`,o=t.get(n.id).map((e=>`a.bibref[href="#bib-${e.toLowerCase()}"]`)).join(",");return{refUrl:r,elems:document.querySelectorAll(o),refcontent:n}})).forEach((({refUrl:e,elems:t,refcontent:n})=>{t.forEach((t=>{t.setAttribute("href",e),t.setAttribute("title",n.title),t.dataset.linkType="biblio"}))}))}(o,a),function(e){for(const{ref:t}of e){const e=[...document.querySelectorAll(`a.bibref[href="#bib-${t.toLowerCase()}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));Dt(`Reference "[${t}]" not found.`,Hr,{hint:`Search for ["${t}"](https://www.specref.org?q=${t}) on Specref to see if it exists or if it's misspelled.`,elements:e})}}(r),i}function Zr(e){let t=jr[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;Dt(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,Hr)}else n=t.aliasOf,t=jr[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function Kr(e,t){const n=e.replace(/^(!|\?)/,""),r=`#bib-${n.toLowerCase()}`,o=lt`<cite
205
+ <dl class="bibliography">${s.map(bo)}</dl>
206
+ </section>`;Nt(i,"",t);const a=function(e){const t=new Map;for(const n of e){const e=n.refcontent?.id??"",r=t.has(e)?t.get(e):t.set(e,[]).get(e);r?.push(n.ref)}return t}(n);return function(e,t){e.map((({ref:e,refcontent:n})=>{const r=`#${lo(e)}`,o=(t.get(n.id??"")??[]).map((e=>`a.bibref[href="#${lo(e)}"]`)).join(",");return{refUrl:r,elems:document.querySelectorAll(o),refcontent:n}})).forEach((({refUrl:e,elems:t,refcontent:n})=>{t.forEach((t=>{t.setAttribute("href",e),t.setAttribute("title",n.title),t.dataset.linkType="biblio"}))}))}(o,a),function(e){for(const{ref:t}of e){const e=[...document.querySelectorAll(`a.bibref[href="#${lo(t)}"]`)].filter((({textContent:e})=>e.toLowerCase()===t.toLowerCase()));Ft(`Reference "[${t}]" not found.`,ao,{hint:`Search for ["${t}"](https://www.specref.org?q=${t}) on Specref to see if it exists or if it's misspelled.`,elements:e})}}(r),i}function mo(e){let t=Yr[e],n=e;const r=new Set([n]);for(;t&&t.aliasOf;)if(r.has(t.aliasOf)){t=null;Ft(`Circular reference in biblio DB between [\`${e}\`] and [\`${n}\`].`,ao)}else n=t.aliasOf,t=Yr[n],r.add(n);return t&&!t.id&&(t.id=e.toLowerCase()),{ref:e,refcontent:t}}function go(e,t){const n=e.replace(/^(!|\?)/,""),r=`#${lo(n)}`,o=pt`<cite
197
207
  ><a class="bibref" href="${r}" data-link-type="biblio">${t||n}</a></cite
198
- >`;return t?o:lt`[${o}]`}function Qr(e){const{ref:t,refcontent:n}=e,r=`bib-${t.toLowerCase()}`;return lt`
208
+ >`;return t?o:pt`[${o}]`}function bo(e){const{ref:t,refcontent:n}=e,r=lo(t);return pt`
199
209
  <dt id="${r}">[${t}]</dt>
200
210
  <dd>
201
- ${n?{html:Jr(n)}:lt`<em class="respec-offending-element"
202
- >${Fr.reference_not_found}</em
211
+ ${n?{html:yo(n)}:pt`<em class="respec-offending-element"
212
+ >${co.reference_not_found}</em
203
213
  >`}
204
214
  </dd>
205
- `}function Jr(e){if("string"==typeof e)return e;let t=`<cite>${e.title}</cite>`;return t=e.href?`<a href="${e.href}">${t}</a>. `:`${t}. `,e.authors&&e.authors.length&&(t+=e.authors.join("; "),e.etAl&&(t+=" et al"),t.endsWith(".")||(t+=". ")),e.publisher&&(t=`${t} ${Wr(e.publisher)} `),e.date&&(t+=`${e.date}. `),e.status&&(t+=`${Ur.get(e.status)||e.status}. `),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var Xr=Object.freeze({__proto__:null,name:Hr,renderInlineCitation:Kr,run:function(e){const t=Array.from(e.informativeReferences),n=Array.from(e.normativeReferences);if(!t.length&&!n.length)return;const r=document.querySelector("section#references")||lt`<section id="references"></section>`;if(document.querySelector("section#references > :is(h2, h1)")||r.prepend(lt`<h1>${Fr.references}</h1>`),r.classList.add("appendix"),n.length){const e=Vr(n,Fr.norm_references);r.appendChild(e)}if(t.length){const e=Vr(t,Fr.info_references);r.appendChild(e)}document.body.appendChild(r)}});const Yr="core/inlines",eo={},to=e=>new RegExp(e.map((e=>e.source)).join("|")),no=$t({en:{rfc2119Keywords:()=>to([/\bMUST(?:\s+NOT)?\b/,/\bSHOULD(?:\s+NOT)?\b/,/\bSHALL(?:\s+NOT)?\b/,/\bMAY\b/,/\b(?:NOT\s+)?REQUIRED\b/,/\b(?:NOT\s+)?RECOMMENDED\b/,/\bOPTIONAL\b/])},de:{rfc2119Keywords:()=>to([/\bMUSS\b/,/\bMÜSSEN\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bDÜRFEN(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\bSOLLEN(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bKÖNNEN\b/,/\bOPTIONAL\b/])}}),ro=/(?:`[^`]+`)(?!`)/,oo=/(?:{{[^}]+\?*}})/,so=/\B\|\w[\w\s]*(?:\s*:[\w\s&;"?<>]+\??)?\|\B/,io=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,ao=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,lo=/(?:\[=[^=]+=\])/,co=/(?:\[\^[^^]+\^\])/;function uo(e){const t=e.slice(2,-2).trim(),[n,r,o]=t.split("/",3).map((e=>e&&e.trim())).filter((e=>!!e)),[s,i,a]=t.startsWith("/")?["element-attr",null,n]:o?["attr-value",`${n}/${r}`,o]:r?["element-attr",n,r]:["element",null,n];return lt`<code
215
+ `}function yo(e){if("string"==typeof e)return e;let t=`<cite>${e.title}</cite>`;if(t=e.href?`<a href="${e.href}">${t}</a>. `:`${t}. `,e.authors){if(!Array.isArray(e.authors)){const t=`The "authors" field in reference "${e.id||e.title}" must be an array.`,n=`Use \`authors: [${JSON.stringify(e.authors)}]\` instead of \`authors: ${JSON.stringify(e.authors)}\`.`;Ft(t,ao,{hint:n}),e.authors=[e.authors]}e.authors.length&&(t+=e.authors.join("; "),e.etAl&&(t+=" et al"),t.endsWith(".")||(t+=". "))}return e.publisher&&(t=`${t} ${po(e.publisher)} `),e.date&&(t+=`${e.date}. `),e.status&&(t+=`${uo.get(e.status)||e.status}. `),e.href&&(t+=`URL: <a href="${e.href}">${e.href}</a>`),t}var vo=Object.freeze({__proto__:null,name:ao,renderInlineCitation:go,run:function(e){const t=Array.from(e.informativeReferences),n=Array.from(e.normativeReferences);if(!t.length&&!n.length)return;const r=document.querySelector("section#references")||pt`<section id="references"></section>`;if(document.querySelector("section#references > :is(h2, h1)")||r.prepend(pt`<h1>${co.references}</h1>`),r.classList.add("appendix"),n.length){const e=fo(n,co.norm_references);r.appendChild(e)}if(t.length){const e=fo(t,co.info_references);r.appendChild(e)}document.body.appendChild(r)}});const wo="core/inlines",ko={},xo=e=>new RegExp(e.map((e=>e.source)).join("|")),$o=Ct({en:{rfc2119Keywords:()=>xo([/\bMUST(?:\s+NOT)?\b/,/\bSHOULD(?:\s+NOT)?\b/,/\bSHALL(?:\s+NOT)?\b/,/\bMAY\b/,/\b(?:NOT\s+)?REQUIRED\b/,/\b(?:NOT\s+)?RECOMMENDED\b/,/\bOPTIONAL\b/])},de:{rfc2119Keywords:()=>xo([/\bMUSS\b/,/\bMÜSSEN\b/,/\bERFORDERLICH\b/,/\b(?:NICHT\s+)?NÖTIG\b/,/\bDARF(?:\s+NICHT)?\b/,/\bDÜRFEN(?:\s+NICHT)?\b/,/\bVERBOTEN\b/,/\bSOLL(?:\s+NICHT)?\b/,/\bSOLLEN(?:\s+NICHT)?\b/,/\b(?:NICHT\s+)?EMPFOHLEN\b/,/\bKANN\b/,/\bKÖNNEN\b/,/\bOPTIONAL\b/])}}),So=/(?:`[^`]+`)(?!`)/,_o=/(?:{{[^}]+\?*}})/,Eo=/\B\|\w[\w\s]*(?:\s*:[\w\s&;"?<>]+\??)?\|\B/,Lo=/(?:\[\[(?:!|\\|\?)?[\w.-]+(?:|[^\]]+)?\]\])/,Co=/(?:\[\[\[(?:!|\\|\?)?#?[\w-.]+\]\]\])/,Ro=/(?:\[=[^=]+=\])/,Ao=/(?:\[\^[^^]+\^\])/,To=/(?:\{\^[^}^]+\^\})/;function No(e){const t=e.slice(2,-2).trim(),[n,r,o]=t.split("/",3).map((e=>e&&e.trim())).filter((e=>!!e)),[s,i,a]=t.startsWith("/")?["element-attr",null,n]:o?["attr-value",`${n}/${r}`,o]:r?["element-attr",n,r]:["element",null,n];return pt`<code
206
216
  ><a
207
217
  data-xref-type="${s}"
208
218
  data-xref-for="${i}"
@@ -210,24 +220,36 @@ dd{margin-left:0}
210
220
  data-link-for="${i}"
211
221
  >${a}</a
212
222
  ></code
213
- >`}function po(e){const t=xt(e),n=lt`<em class="rfc2119">${t}</em>`;return eo[t]=!0,n}function ho(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?lt`<a href="${t}" data-matched-text="${e}"></a>`:lt`<a data-cite="${t}" data-matched-text="${e}"></a>`}function fo(e,t){const n=xt(e.slice(2,-2));if(n.startsWith("\\"))return e.replace("\\","");const r=Rr(n);return!!t.parentElement.closest("dfn,a")?vo(`\`${r.textContent}\``):r}function mo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(xt),{type:i,illegal:a}=At(o,t.parentElement),l=Kr(o,s),c=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(c)){const e=l.childNodes[1]||l;Mt("Normative references in informative sections are not allowed. ",Yr,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(c):n.informativeReferences.add(c),l.childNodes[1]?l.childNodes:[l]}function go(e,t,n){return"ABBR"===t.parentElement.tagName?e:lt`<abbr title="${n.get(e)}">${e}</abbr>`}function bo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return lt`<var data-type="${r}">${n}</var>`}function yo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(xt).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=wo(s),a=n?xt(n):null;return lt`<a
223
+ >`}function Po(e){const t=(e.slice(2,-2).trim().match(/"([^"]*)"|([^/]+)/g)||[]).map((e=>e.trim()));if(1===t.length){const e=t[0];return pt`<code
224
+ ><a data-link-type="cddl-type" data-xref-type="cddl-type"
225
+ >${e}</a
226
+ ></code
227
+ >`}const n=t[0],r=t[1],o=r.startsWith('"')&&r.endsWith('"')?"cddl-value":"cddl-key";return pt`<code
228
+ ><a
229
+ data-link-type="${o}"
230
+ data-xref-type="${o}"
231
+ data-xref-for="${n}"
232
+ data-link-for="${n}"
233
+ >${r}</a
234
+ ></code
235
+ >`}function jo(e){const t=Lt(e),n=pt`<em class="rfc2119">${t}</em>`;return ko[t]=!0,n}function Oo(e){const t=e.slice(3,-3).trim();return t.startsWith("#")?pt`<a href="${t}" data-matched-text="${e}"></a>`:pt`<a data-cite="${t}" data-matched-text="${e}"></a>`}function Io(e,t){const n=Lt(e.slice(2,-2));if(n.startsWith("\\"))return e.replace(/^(\{\{\s*)\\/,"$1");const r=Kr(n);return!!t.parentElement?.closest("dfn,a")?Bo(`\`${r.textContent}\``):r}function zo(e,t,n){const r=e.slice(2,-2);if(r.startsWith("\\"))return[`[[${r.slice(1)}]]`];const[o,s]=r.split("|").map(Lt),{type:i,illegal:a}=Ot(o,t.parentElement),l=go(o,s),c=o.replace(/^(!|\?)/,"");if(a&&!n.normativeReferences.has(c)){const e=l.childNodes[1]||l;Wt("Normative references in informative sections are not allowed. ",wo,{elements:[e],hint:`Remove '!' from the start of the reference \`[[${r}]]\``})}return"informative"!==i||a?n.normativeReferences.add(c):n.informativeReferences.add(c),l.childNodes[1]?l.childNodes:[l]}function Do(e,t,n){return"ABBR"===t.parentElement?.tagName?e:pt`<abbr title="${n.get(e)}">${e}</abbr>`}function Mo(e){const t=e.slice(1,-1).split(":",2),[n,r]=t.map((e=>e.trim()));return pt`<var data-type="${r}">${n}</var>`}function qo(e){const t=function(e){const t=e=>e.replace("%%","/").split("/").map(Lt).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=Ho(s),a=n?Lt(n):null;return pt`<a
214
236
  data-link-type="dfn|abstract-op"
215
237
  data-link-for="${a}"
216
238
  data-xref-for="${a}"
217
239
  data-lt="${o}"
218
240
  >${i}</a
219
- >`}function vo(e){const t=e.slice(1,-1);return lt`<code>${t}</code>`}function wo(e){return ro.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?vo(e):wo(e))):document.createTextNode(e)}var ko=Object.freeze({__proto__:null,name:Yr,rfc2119Usage:eo,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new Nt,e.informativeReferences=new Nt,e.respecRFC2119||(e.respecRFC2119=eo);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=xt(e),o=xt(r);t.set(n,o)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].join("\\b)|(?:\\b")}\\b)`):null,o=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),o=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,(e=>n.wsNodes||e.data.trim()?r&&e.parentElement.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT)),s=[];let i;for(;i=o.nextNode();)s.push(i);return s}(document.body,["#respec-ui",".head","pre","svg","script","style"],{wsNodes:!1}),s=no.rfc2119Keywords(),i=new RegExp(`(${to([s,oo,so,io,ao,lo,ro,co,...r?[r]:[]]).source})`);for(const n of o){const r=n.data.split(i);if(1===r.length)continue;const o=document.createDocumentFragment();let a=!0;for(const i of r)if(a=!a,a)switch(!0){case i.startsWith("{{"):o.append(fo(i,n));break;case i.startsWith("[[["):o.append(ho(i));break;case i.startsWith("[["):o.append(...mo(i,n,e));break;case i.startsWith("|"):o.append(bo(i));break;case i.startsWith("[="):o.append(yo(i));break;case i.startsWith("`"):o.append(vo(i));break;case i.startsWith("[^"):o.append(uo(i));break;case t.has(i):o.append(go(i,n,t));break;case s.test(i):o.append(po(i))}else o.append(i);n.replaceWith(o)}}});function xo(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(o){Dt(`Invalid ${t} name "${e}": ${o.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function $o(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return Dt(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const _o=new zt;function So(e,t){for(const n of t)_o.has(n)||_o.set(n,new Set),_o.get(n).add(e)}const Eo="core/dfn",Co=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:$o}],["element",{requiresFor:!1,validator:xo}],["element-attr",{requiresFor:!1,validator:xo}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:$o}],["event",{requiresFor:!1,validator:$o}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new dt(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(o){return Dt(`Invalid ${t} "${e}": ${o.message}.`,r,{hint:"Check that the MIME type has both a type and a sub-type, and that it's in a canonical form (e.g., `text/plain`).",elements:[n]}),!1}return!0}}],["scheme",{requiresFor:!1,validator:$o}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?$o(e.slice(1,-1),t,n,r):(Dt(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),Lo=[...Co.keys()];function Ao(e,t){let n="";switch(!0){case Lo.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>Co.has(e))),function(e,t,n){const r=Co.get(t);if(r.requiresFor&&!n.dataset.dfnFor){const e=Wt`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:o}=r,s=Wt`Use a ${"[data-dfn-for]"} attribute to associate this with ${o}.`;Dt(e,Eo,{hint:s,elements:[n]})}r.validator&&r.validator(e,t,n,Eo)}(t,n,e);break;case mr.test(t):n=function(e,t){t.dataset.hasOwnProperty("idl")||(t.dataset.idl="");const n=t.closest("[data-dfn-for]");t!==n&&n?.dataset.dfnFor&&(t.dataset.dfnFor=n.dataset.dfnFor);if(!t.dataset.dfnFor){const n=Wt`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;Dt(`Internal slot "${e}" must be associated with a WebIDL interface.`,Eo,{hint:n,elements:[t]})}t.matches(".export, [data-export]")||(t.dataset.noexport="");const r=e.endsWith(")")?"method":"attribute";if(!t.dataset.dfnType)return r;const o=["attribute","method"],{dfnType:s}=t.dataset;if(!o.includes(s)||r!==s){const n=Wt`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,s=`The only allowed types are: ${Ft(o,{quotes:!0})}. The slot "${e}" seems to be a "${Ht(r)}"?`;return Dt(n,Eo,{hint:s,elements:[t]}),"dfn"}return s}(t,e)}if(!n&&!e.matches("[data-dfn-type]")){const t=e.closest("[data-dfn-type]");n=t?.dataset.dfnType}n&&!e.dataset.dfnType&&(e.dataset.dfnType=n)}function Ro(e){switch(!0){case e.matches(".export.no-export"):Dt(Wt`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,Eo,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){Dt(Wt`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,Eo,{elements:[e],hint:"Please chose only one."}),delete e.dataset.export}e.dataset.noexport="";break;case e.matches(":is(.export):not([data-noexport], .no-export)"):e.dataset.export=""}}var To=Object.freeze({__proto__:null,name:Eo,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Ct(e);if(So(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;Ao(e,n),Ro(e);const r=(e.dataset.localLt||"").split("|").map(xt),o=t.filter((e=>!r.includes(e)));(o.length>1||n!==xt(e.textContent))&&(e.dataset.lt=o.join("|"))}}});var Po=Object.freeze({__proto__:null,name:"core/pluralize",run:function(e){if(!e.pluralize)return;const t=function(){const e=new Set;document.querySelectorAll("a:not([href])").forEach((t=>{const n=xt(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)}));const t=new Set,n=document.querySelectorAll("dfn:not([data-lt-noDefault])");return n.forEach((e=>{const n=xt(e.textContent).toLowerCase();t.add(n),e.dataset.lt&&e.dataset.lt.split("|").forEach((e=>t.add(e))),e.dataset.localLt&&e.dataset.localLt.split("|").forEach((e=>t.add(e)))})),function(n){const r=xt(n).toLowerCase(),o=pt.isSingular(r)?pt.plural(r):pt.singular(r);return e.has(o)&&!t.has(o)?o:""}}();document.querySelectorAll("dfn:not([data-lt-no-plural]):not([data-lt-noDefault])").forEach((e=>{const n=[e.textContent];e.dataset.lt&&n.push(...e.dataset.lt.split("|")),e.dataset.localLt&&n.push(...e.dataset.localLt.split("|"));const r=new Set(n.map(t).filter((e=>e)));if(r.size){const t=e.dataset.plurals?e.dataset.plurals.split("|"):[],n=[...new Set([...t,...r])];e.dataset.plurals=n.join("|"),So(e,n)}}))}});var No=String.raw`span.example-title{text-transform:none}
241
+ >`}function Bo(e){const t=e.slice(1,-1);return pt`<code>${t}</code>`}function Ho(e){return So.test(e)?e.split(/(`[^`]+`)(?!`)/).map((e=>e.startsWith("`")?Bo(e):Ho(e))):document.createTextNode(e)}var Uo=Object.freeze({__proto__:null,name:wo,rfc2119Usage:ko,run:function(e){const t=new Map;document.normalize(),document.querySelector("section#conformance")||document.body.classList.add("informative"),e.normativeReferences=new Dt,e.informativeReferences=new Dt,e.respecRFC2119||(e.respecRFC2119=ko);const n=document.querySelectorAll("abbr[title]:not(.exclude)");for(const{textContent:e,title:r}of n){const n=Lt(e),o=Lt(r);t.set(n,o)}const r=t.size?new RegExp(`(?:\\b${[...t.keys()].map((e=>yt(e))).join("\\b)|(?:\\b")}\\b)`):null,o=function(e,t=[],n={wsNodes:!0}){const r=t.join(", "),o=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>n.wsNodes||e.data.trim()?r&&e.parentElement?.closest(r)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),s=[];let i;for(;i=o.nextNode();)s.push(i);return s}(document.body,["#respec-ui",".head","pre","svg","script","style"],{wsNodes:!1}),s=$o.rfc2119Keywords(),i=new RegExp(`(${xo([s,_o,To,Eo,Lo,Co,Ro,So,Ao,...r?[r]:[]]).source})`);for(const n of o){const r=n.data.split(i);if(1===r.length)continue;const o=document.createDocumentFragment();let a=!0;for(const i of r)if(a=!a,a)switch(!0){case i.startsWith("{{"):o.append(Io(i,n));break;case i.startsWith("{^"):o.append(Po(i));break;case i.startsWith("[[["):o.append(Oo(i));break;case i.startsWith("[["):o.append(...zo(i,n,e));break;case i.startsWith("|"):o.append(Mo(i));break;case i.startsWith("[="):o.append(qo(i));break;case i.startsWith("`"):o.append(Bo(i));break;case i.startsWith("[^"):o.append(No(i));break;case t.has(i):o.append(Do(i,n,t));break;case s.test(i):o.append(jo(i))}else o.append(i);n.replaceWith(o)}}});function Fo(e,t,n,r){try{switch(t){case"element-attr":return document.createAttribute(e),!0;case"element":return document.createElement(e),!0}}catch(o){Ft(`Invalid ${t} name "${e}": ${o.message}`,r,{hint:`Check that the ${t} name is allowed per the XML's Name production for ${t}.`,elements:[n]})}return!1}function Wo(e,t,n,r){if(/^[a-z]+(-[a-z]+)*$/i.test(e))return!0;return Ft(`Invalid ${t} name "${e}".`,r,{hint:`Check that the ${t} name is allowed per the naming rules for this type.`,elements:[n]}),!1}const Go=new Ht;function Vo(e,t){for(const n of t)Go.has(n)||Go.set(n,new Set),Go.get(n)?.add(e)}const Zo="core/dfn",Ko=new Map([["abstract-op",{requiresFor:!1}],["attr-value",{requiresFor:!0,associateWith:"a markup attribute",validator:Wo}],["element",{requiresFor:!1,validator:Fo}],["element-attr",{requiresFor:!1,validator:Fo}],["element-state",{requiresFor:!0,associateWith:"a markup attribute",validator:Wo}],["event",{requiresFor:!1,validator:Wo}],["http-header",{requiresFor:!1}],["media-type",{requiresFor:!1,validator:function(e,t,n,r){try{const t=new mt(e);if(t.toString()!==e)throw new Error(`Input doesn't match its canonical form: "${t}".`)}catch(o){return Ft(`Invalid ${t} "${e}": ${o.message}.`,r,{hint:"Check that the MIME type has both a type and a sub-type, and that it's in a canonical form (e.g., `text/plain`).",elements:[n]}),!1}return!0}}],["scheme",{requiresFor:!1,validator:Wo}],["permission",{requiresFor:!1,validator:function(e,t,n,r){return e.startsWith('"')&&e.endsWith('"')?Wo(e.slice(1,-1),t,n,r):(Ft(`Invalid ${t} "${e}".`,r,{hint:`Check that the ${t} is quoted with double quotes.`,elements:[n]}),!1)}}]]),Qo=[...Ko.keys()];function Jo(e,t){let n="";switch(!0){case Qo.some((t=>e.classList.contains(t))):n=[...e.classList].find((e=>Ko.has(e)))??"",function(e,t,n){const r=Ko.get(t);if(r?.requiresFor&&!n.dataset.dfnFor){const e=Qt`Definition of type "\`${t}\`" requires a ${"[data-dfn-for]"} attribute.`,{associateWith:o}=r,s=Qt`Use a ${"[data-dfn-for]"} attribute to associate this with ${o??""}.`;Ft(e,Zo,{hint:s,elements:[n]})}r?.validator&&r.validator(e,t,n,Zo)}(t,n,e);break;case jr.test(t):n=function(e,t){t.dataset.hasOwnProperty("idl")||(t.dataset.idl="");const n=t.closest("[data-dfn-for]");t!==n&&n?.dataset.dfnFor&&(t.dataset.dfnFor=n.dataset.dfnFor);if(!t.dataset.dfnFor){const n=Qt`Use a ${"[data-dfn-for]"} attribute to associate this dfn with a WebIDL interface.`;Ft(`Internal slot "${e}" must be associated with a WebIDL interface.`,Zo,{hint:n,elements:[t]})}t.matches(".export, [data-export]")||(t.dataset.noexport="");const r=e.endsWith(")")?"method":"attribute";if(!t.dataset.dfnType)return r;const o=["attribute","method"],{dfnType:s}=t.dataset;if(!o.includes(s)||r!==s){const n=Qt`Invalid ${"[data-dfn-type]"} attribute on internal slot.`,s=`The only allowed types are: ${Zt(o,{quotes:!0})}. The slot "${e}" seems to be a "${Vt(r)}"?`;return Ft(n,Zo,{hint:s,elements:[t]}),"dfn"}return s}(t,e)}if(!n&&!e.matches("[data-dfn-type]")){const t=e.closest("[data-dfn-type]");n=t?.dataset.dfnType??""}n&&!e.dataset.dfnType&&(e.dataset.dfnType=n)}function Xo(e){switch(!0){case e.matches(".export.no-export"):Ft(Qt`Declares both "${"[no-export]"}" and "${"[export]"}" CSS class.`,Zo,{elements:[e],hint:"Please use only one."});break;case e.matches(".no-export, [data-noexport]"):if(e.matches("[data-export]")){Ft(Qt`Declares ${"[no-export]"} CSS class, but also has a "${"[data-export]"}" attribute.`,Zo,{elements:[e],hint:"Please chose only one."}),delete e.dataset.export}e.dataset.noexport="";break;case e.matches(":is(.export):not([data-noexport], .no-export)"):e.dataset.export=""}}var Yo=Object.freeze({__proto__:null,name:Zo,run:function(){for(const e of document.querySelectorAll("dfn")){const t=Pt(e);if(Vo(e,t),e.dataset.cite&&/\b#\b/.test(e.dataset.cite))continue;const[n]=t;Jo(e,n),Xo(e);const r=(e.dataset.localLt||"").split("|").map(Lt),o=t.filter((e=>!r.includes(e)));(o.length>1||n!==Lt(e.textContent))&&(e.dataset.lt=o.join("|"))}}});var es=Object.freeze({__proto__:null,name:"core/pluralize",run:function(e){if(!e.pluralize)return;const t=function(){const e=new Set;document.querySelectorAll("a:not([href])").forEach((t=>{const n=Lt(t.textContent).toLowerCase();e.add(n),t.dataset.lt&&e.add(t.dataset.lt)}));const t=new Set,n=document.querySelectorAll("dfn:not([data-lt-noDefault])");return n.forEach((e=>{const n=Lt(e.textContent).toLowerCase();t.add(n),e.dataset.lt&&e.dataset.lt.split("|").forEach((e=>t.add(e))),e.dataset.localLt&&e.dataset.localLt.split("|").forEach((e=>t.add(e)))})),function(n){const r=Lt(n).toLowerCase(),o=gt.isSingular(r)?gt.plural(r):gt.singular(r);return e.has(o)&&!t.has(o)?o:""}}();document.querySelectorAll("dfn:not([data-lt-no-plural]):not([data-lt-noDefault])").forEach((e=>{const n=[e.textContent];e.dataset.lt&&n.push(...e.dataset.lt.split("|")),e.dataset.localLt&&n.push(...e.dataset.localLt.split("|"));const r=new Set(n.map(t).filter((e=>e)));if(r.size){const t=e.dataset.plurals?e.dataset.plurals.split("|"):[],n=[...new Set([...t,...r])];e.dataset.plurals=n.join("|"),Vo(e,n)}}))}});var ts=String.raw`span.example-title{text-transform:none}
220
242
  :is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both}
221
243
  div.illegal-example{color:red}
222
244
  div.illegal-example p{color:#000}
223
- aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;const jo=$t({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"},cs:{example:"Příklad"}});function Io(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?` ${t}`:"",o=n.title?lt`<span class="example-title">: ${n.title}</span>`:"";return lt`<div class="marker">
224
- <a class="self-link">${jo.example}<bdi>${r}</bdi></a
245
+ aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}`;const ns=Ct({en:{example:"Example"},nl:{example:"Voorbeeld"},es:{example:"Ejemplo"},ko:{example:"예시"},ja:{example:"例"},de:{example:"Beispiel"},zh:{example:"例"},cs:{example:"Příklad"}});function rs(e,t,n){n.title=e.title,n.title&&e.removeAttribute("title");const r=t>0?` ${t}`:"",o=n.title?pt`<span class="example-title">: ${n.title}</span>`:"";return pt`<div class="marker">
246
+ <a class="self-link">${ns.example}<bdi>${r}</bdi></a
225
247
  >${o}
226
- </div>`}var Oo=Object.freeze({__proto__:null,name:"core/examples",run:function(){const e=document.querySelectorAll("pre.example, pre.illegal-example, aside.example");if(!e.length)return;document.head.insertBefore(lt`<style>
227
- ${No}
228
- </style>`,document.querySelector("link"));let t=0;e.forEach((e=>{e.classList.contains("illegal-example");const n={},{title:r}=e;if("aside"===e.localName){++t;const o=Io(e,t,n);e.prepend(o);const s=Et(e,"example",r||String(t));o.querySelector("a.self-link").href=`#${s}`}else{const o=!!e.closest("aside");o||++t,n.content=e.innerHTML,e.classList.remove("example","illegal-example");const s=e.id?e.id:null;s&&e.removeAttribute("id");const i=Io(e,o?0:t,n),a=lt`<div class="example" id="${s}">
248
+ </div>`}var os=Object.freeze({__proto__:null,name:"core/examples",run:function(){const e=document.querySelectorAll("pre.example, pre.illegal-example, aside.example");if(!e.length)return;document.head.insertBefore(pt`<style>
249
+ ${ts}
250
+ </style>`,document.querySelector("link"));let t=0;e.forEach((e=>{e.classList.contains("illegal-example");const n={},{title:r}=e;if("aside"===e.localName){++t;const o=rs(e,t,n);e.prepend(o);const s=Nt(e,"example",r||String(t));o.querySelector("a.self-link").href=`#${s}`}else{const o=!!e.closest("aside");o||++t,n.content=e.innerHTML,e.classList.remove("example","illegal-example");const s=e.id?e.id:null;s&&e.removeAttribute("id");const i=rs(e,o?0:t,n),a=pt`<div class="example" id="${s}">
229
251
  ${i} ${e.cloneNode(!0)}
230
- </div>`;Et(a,"example",r||String(t));a.querySelector("a.self-link").href=`#${a.id}`,e.replaceWith(a)}}))}});var zo=String.raw`.issue-label{text-transform:initial}
252
+ </div>`;Nt(a,"example",r||String(t));a.querySelector("a.self-link").href=`#${a.id}`,e.replaceWith(a)}}))}});var ss=String.raw`.issue-label{text-transform:initial}
231
253
  .warning>p:first-child{margin-top:0}
232
254
  .warning{padding:.5em;border-left-width:.5em;border-left-style:solid}
233
255
  span.warning{padding:.1em .5em .15em}
@@ -237,29 +259,29 @@ span.warning{padding:.1em .5em .15em}
237
259
  .warning-title:before{content:"⚠";font-size:1.3em;float:left;padding-right:.3em;margin-top:-.3em}
238
260
  li.task-list-item{list-style:none}
239
261
  input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
240
- .issue a.respec-gh-label{padding:5px;margin:0 2px 0 2px;font-size:10px;text-transform:none;text-decoration:none;font-weight:700;border-radius:4px;position:relative;bottom:2px;border:none;display:inline-block}`;const qo="core/issues-notes",Do=$t({en:{editors_note:"Editor's note",feature_at_risk:"(Feature at Risk) Issue",issue:"Issue",issue_summary:"Issue summary",no_issues_in_spec:"There are no issues listed in this specification.",note:"Note",warning:"Warning"},ja:{note:"注",editors_note:"編者注",feature_at_risk:"(変更の可能性のある機能) Issue",issue:"Issue",issue_summary:"Issue の要約",no_issues_in_spec:"この仕様には未解決の issues は含まれていません.",warning:"警告"},nl:{editors_note:"Redactionele noot",issue_summary:"Lijst met issues",no_issues_in_spec:"Er zijn geen problemen vermeld in deze specificatie.",note:"Noot",warning:"Waarschuwing"},es:{editors_note:"Nota de editor",issue:"Cuestión",issue_summary:"Resumen de la cuestión",note:"Nota",no_issues_in_spec:"No hay problemas enumerados en esta especificación.",warning:"Aviso"},de:{editors_note:"Redaktioneller Hinweis",issue:"Frage",issue_summary:"Offene Fragen",no_issues_in_spec:"Diese Spezifikation enthält keine offenen Fragen.",note:"Hinweis",warning:"Warnung"},zh:{editors_note:"编者注",feature_at_risk:"(有可能变动的特性)Issue",issue:"Issue",issue_summary:"Issue 总结",no_issues_in_spec:"本规范中未列出任何 issue。",note:"注",warning:"警告"},cs:{editors_note:"Poznámka editora",feature_at_risk:"(Funkce v ohrožení) Problém",issue:"Problém",issue_summary:"Souhrn problémů",no_issues_in_spec:"V této specifikaci nejsou uvedeny žádné problémy.",note:"Poznámka",warning:"Varování"}});function Mo(e,t,n){const r=function(){if(document.querySelector(".issue[data-number]"))return e=>{if(e.dataset.number)return Number(e.dataset.number)};let e=0;return t=>{if(t.classList.contains("issue")&&"span"!==t.localName)return++e}}(),o=document.createElement("ul");e.forEach((e=>{const{type:s,displayType:i,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),o=e.classList.contains("atrisk"),s=t?"issue":n?"warning":r?"ednote":"note",i=t?o?Do.feature_at_risk:Do.issue:n?Do.warning:r?Do.editors_note:Do.note;return{type:s,displayType:i,isFeatureAtRisk:o}}(e),l="issue"===s,c="span"===e.localName,{number:u}=e.dataset,d={title:e.title,number:r(e)};if(!c){const r=lt`<div class="${a?`${s} atrisk`:s}" role="${"note"===s?"note":null}"></div>`,c=document.createElement("span"),p=lt`<div role="heading" class="${`${s}-title marker`}">${c}</div>`;Et(p,"h",s);let h,f=i;if(e.id?(r.id=e.id,e.removeAttribute("id")):Et(r,"issue-container",d.number?`number-${d.number}`:""),l){if(void 0!==d.number&&(f+=` ${d.number}`),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return lt`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return lt`<a href="${t.atRiskBase+e}" />`}(u,n,{isFeatureAtRisk:a});if(e&&(c.before(e),e.append(c)),c.classList.add("issue-number"),h=t.get(u),!h){Mt(`Failed to fetch issue number ${u}.`,qo)}h&&!d.title&&(d.title=h.title)}o.append(function(e,t,n){const r=`${e}${t.number?` ${t.number}`:""}`,o=t.title?lt`<span style="text-transform: none">: ${t.title}</span>`:"";return lt`<li><a href="${`#${n}`}">${r}</a>${o}</li>`}(Do.issue,d,r.id))}if(c.textContent=f,d.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},o=h?h.labels:[];h&&"CLOSED"===h.state&&r.classList.add("closed"),p.append(function(e,t,n){const r=e.map((e=>function(e,t){const{color:n,name:r}=e,o=new URL("./issues/",t);o.searchParams.set("q",`is:issue is:open label:"${e.name}"`);const s=function(e){const[t,n,r]=[e.slice(0,2),e.slice(2,4),e.slice(4,6)],[o,s,i]=[t,n,r].map((e=>parseInt(e,16)/255)).map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),a=.2126*o+.7152*s+.0722*i;return a>.179?"#000":"#fff"}(n),i=`background-color: #${n}; color: ${s}`,a=`GitHub label: ${r}`;return lt` <a
262
+ .issue a.respec-gh-label{padding:5px;margin:0 2px 0 2px;font-size:10px;text-transform:none;text-decoration:none;font-weight:700;border-radius:4px;position:relative;bottom:2px;border:none;display:inline-block}`;const is="core/issues-notes",as=Ct({en:{editors_note:"Editor's note",feature_at_risk:"(Feature at Risk) Issue",issue:"Issue",issue_summary:"Issue summary",no_issues_in_spec:"There are no issues listed in this specification.",note:"Note",warning:"Warning"},ja:{note:"注",editors_note:"編者注",feature_at_risk:"(変更の可能性のある機能) Issue",issue:"Issue",issue_summary:"Issue の要約",no_issues_in_spec:"この仕様には未解決の issues は含まれていません.",warning:"警告"},nl:{editors_note:"Redactionele noot",issue_summary:"Lijst met issues",no_issues_in_spec:"Er zijn geen problemen vermeld in deze specificatie.",note:"Noot",warning:"Waarschuwing"},es:{editors_note:"Nota de editor",issue:"Cuestión",issue_summary:"Resumen de la cuestión",note:"Nota",no_issues_in_spec:"No hay problemas enumerados en esta especificación.",warning:"Aviso"},de:{editors_note:"Redaktioneller Hinweis",issue:"Frage",issue_summary:"Offene Fragen",no_issues_in_spec:"Diese Spezifikation enthält keine offenen Fragen.",note:"Hinweis",warning:"Warnung"},zh:{editors_note:"编者注",feature_at_risk:"(有可能变动的特性)Issue",issue:"Issue",issue_summary:"Issue 总结",no_issues_in_spec:"本规范中未列出任何 issue。",note:"注",warning:"警告"},cs:{editors_note:"Poznámka editora",feature_at_risk:"(Funkce v ohrožení) Problém",issue:"Problém",issue_summary:"Souhrn problémů",no_issues_in_spec:"V této specifikaci nejsou uvedeny žádné problémy.",note:"Poznámka",warning:"Varování"}});function ls(e,t,n){const r=function(){if(document.querySelector(".issue[data-number]"))return e=>{if(e.dataset.number)return Number(e.dataset.number)};let e=0;return t=>{if(t.classList.contains("issue")&&"span"!==t.localName)return++e}}(),o=document.createElement("ul");e.forEach((e=>{const{type:s,displayType:i,isFeatureAtRisk:a}=function(e){const t=e.classList.contains("issue"),n=e.classList.contains("warning"),r=e.classList.contains("ednote"),o=e.classList.contains("atrisk"),s=t?"issue":n?"warning":r?"ednote":"note",i=t?o?as.feature_at_risk:as.issue:n?as.warning:r?as.editors_note:as.note;return{type:s,displayType:i,isFeatureAtRisk:o}}(e),l="issue"===s,c="span"===e.localName,{number:u}=e.dataset,d={title:e.title,number:r(e)};if(!c){const r=pt`<div class="${a?`${s} atrisk`:s}" role="${"note"===s?"note":null}"></div>`,c=document.createElement("span"),p=pt`<div class="${`${s}-title marker`}">${c}</div>`;Nt(p,"h",s);let h,f=i;if(e.id?(r.id=e.id,e.removeAttribute("id")):Nt(r,"issue-container",d.number?`number-${d.number}`:""),l){if(void 0!==d.number&&(f+=` ${d.number}`),e.dataset.hasOwnProperty("number")){const e=function(e,t,{isFeatureAtRisk:n=!1}={}){if(!n&&t.issueBase)return pt`<a href="${t.issueBase+e}" />`;if(n&&t.atRiskBase)return pt`<a href="${t.atRiskBase+e}" />`}(u??"",n,{isFeatureAtRisk:a});if(e&&(c.before(e),e.append(c)),c.classList.add("issue-number"),h=t.get(u??""),!h){Wt(`Failed to fetch issue number ${u}.`,is)}h&&!d.title&&(d.title=h.title)}o.append(function(e,t,n){const r=`${e}${t.number?` ${t.number}`:""}`,o=t.title?pt`<span style="text-transform: none">: ${t.title}</span>`:"";return pt`<li><a href="${`#${n}`}">${r}</a>${o}</li>`}(as.issue,d,r.id))}if(c.textContent=f,d.title){e.removeAttribute("title");const{repoURL:t=""}=n.github||{},o=h?h.labels:[];h&&"CLOSED"===h.state&&r.classList.add("closed"),p.append(function(e,t,n){const r=e.map((e=>function(e,t){const{color:n,name:r}=e,o=/^[0-9a-f]{6}$/i.test(n)?n:"f6f8fa",s=new URL("./issues/",t);s.searchParams.set("q",`is:issue is:open label:"${r}"`);const i=function(e){const[t,n,r]=[e.slice(0,2),e.slice(2,4),e.slice(4,6)],[o,s,i]=[t,n,r].map((e=>parseInt(e,16)/255)).map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),a=.2126*o+.7152*s+.0722*i;return a>.179?"#000":"#fff"}(o),a=`background-color: #${o}; color: ${i}`,l=`GitHub label: ${r}`;return pt` <a
241
263
  class="respec-gh-label"
242
- style="${i}"
243
- href="${o.href}"
244
- aria-label="${a}"
264
+ style="${a}"
265
+ href="${s.href}"
266
+ aria-label="${l}"
245
267
  >${r}</a
246
- >`}(e,n)));r.length&&r.unshift(document.createTextNode(" "));return lt`<span class="issue-label">: ${t}${r}</span>`}(o,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(s),m.removeAttribute("data-number"),h&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(h.bodyHTML)),r.append(p,m);const g=Tt(p,"section").length+2;p.setAttribute("aria-level",g)}})),function(e){const t=document.getElementById("issue-summary");if(!t)return;const n=t.querySelector("h2, h3, h4, h5, h6");e.hasChildNodes()?t.append(e):t.append(lt`<p>${Do.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.insertAdjacentHTML("afterbegin",`<h1>${Do.issue_summary}</h1>`)}(o)}var Bo=Object.freeze({__proto__:null,name:qo,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote"),n=Array.from(t).filter((e=>e instanceof HTMLElement));if(!n.length)return;const r=await async function(e){if(!e||!e.apiBase)return new Map;const t=[...document.querySelectorAll(".issue[data-number]")].map((e=>Number.parseInt(e.dataset.number,10))).filter((e=>e));if(!t.length)return new Map;const n=new URL("issues",`${e.apiBase}/${e.fullName}/`);n.searchParams.set("issues",t.join(","));const r=await fetch(n.href);if(!r.ok)return Dt(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,qo),new Map;const o=await r.json();return new Map(Object.entries(o))}(e.github),{head:o}=document;o.insertBefore(lt`<style>
247
- ${zo}
248
- </style>`,o.querySelector("link")),Mo(n,r,e),document.querySelectorAll(".ednote").forEach((e=>{e.classList.remove("ednote"),e.classList.add("note")}))}});const Ho="core/best-practices",Fo={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},Uo=$t(Fo),Wo=s in Fo?s:"en";var Go=Object.freeze({__proto__:null,name:Ho,run:function(){const e=document.querySelectorAll(".practicelab"),t=document.getElementById("bp-summary"),n=t?document.createElement("ul"):null;if([...e].forEach(((e,t)=>{const r=Et(e,"bp"),o=lt`<a class="marker self-link" href="${`#${r}`}"
249
- ><bdi lang="${Wo}">${Uo.best_practice}${t+1}</bdi></a
250
- >`;if(n){const t=lt`<li>${o}: ${jt(e)}</li>`;n.appendChild(t)}const s=e.closest("div");if(!s)return void e.classList.add("advisement");s.classList.add("advisement");const i=lt`${o.cloneNode(!0)}: ${e}`;s.prepend(...i.childNodes)})),e.length)t&&(t.appendChild(lt`<h1>Best Practices Summary</h1>`),t.appendChild(n));else if(t){Mt("Using best practices summary (#bp-summary) but no best practices found.",Ho),t.remove()}}});const Vo="core/figures",Zo=$t({en:{list_of_figures:"List of Figures",fig:"Figure "},ja:{fig:"図 ",list_of_figures:"図のリスト"},ko:{fig:"그림 ",list_of_figures:"그림 목록"},nl:{fig:"Figuur ",list_of_figures:"Lijst met figuren"},es:{fig:"Figura ",list_of_figures:"Lista de Figuras"},zh:{fig:"图 ",list_of_figures:"规范中包含的图"},de:{fig:"Abbildung",list_of_figures:"Abbildungsverzeichnis"}});var Ko=Object.freeze({__proto__:null,name:Vo,run:function(){const e=function(){const e=[];return document.querySelectorAll("figure").forEach(((t,n)=>{const r=t.querySelector("figcaption");if(r)!function(e,t,n){const r=t.textContent;Et(e,"fig",r),Rt(t,lt`<span class="fig-title"></span>`),t.prepend(lt`<a class="self-link" href="#${e.id}"
251
- >${Zo.fig}<bdi class="figno">${n+1}</bdi></a
252
- >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{Lt(e,"span").removeAttribute("href")})),lt`<li class="tofline">
268
+ >`}(e,n)));r.length&&r.unshift(document.createTextNode(" "));return pt`<span class="issue-label">: ${t}${r}</span>`}(o,d.title,t))}let m=e;e.replaceWith(r),m.classList.remove(s),m.removeAttribute("data-number"),h&&!m.innerHTML.trim()&&(m=document.createRange().createContextualFragment(h.bodyHTML)),r.append(p,m)}})),function(e){const t=document.getElementById("issue-summary");if(!t)return;const n=t.querySelector("h2, h3, h4, h5, h6");e.hasChildNodes()?t.append(e):t.append(pt`<p>${as.no_issues_in_spec}</p>`),(!n||n&&n!==t.firstElementChild)&&t.prepend(pt`<h1>${as.issue_summary}</h1>`)}(o)}var cs=Object.freeze({__proto__:null,name:is,run:async function(e){const t=document.querySelectorAll(".issue, .note, .warning, .ednote"),n=Array.from(t).filter((e=>e instanceof HTMLElement));if(!n.length)return;const r=await async function(e){if(!e||!e.apiBase)return new Map;const t=[...document.querySelectorAll(".issue[data-number]")].map((e=>Number.parseInt(e.dataset.number??"",10))).filter((e=>e));if(!t.length)return new Map;const n=new URL("issues",`${e.apiBase}/${e.fullName}/`);n.searchParams.set("issues",t.join(","));const r=await fetch(n.href);if(!r.ok)return Ft(`Error fetching issues from GitHub. (HTTP Status ${r.status}).`,is),new Map;const o=await r.json();return new Map(Object.entries(o))}(e.github??null),{head:o}=document;o.insertBefore(pt`<style>
269
+ ${ss}
270
+ </style>`,o.querySelector("link")),ls(n,r,e),document.querySelectorAll(".ednote").forEach((e=>{e.classList.remove("ednote"),e.classList.add("note")}))}});const us="core/best-practices",ds={en:{best_practice:"Best Practice "},ja:{best_practice:"最良実施例 "},de:{best_practice:"Musterbeispiel "},zh:{best_practice:"最佳实践 "}},ps=Ct(ds),hs=r in ds?r:"en";var fs=Object.freeze({__proto__:null,name:us,run:function(){const e=document.querySelectorAll(".practicelab"),t=document.getElementById("bp-summary"),n=t?document.createElement("ul"):null;if([...e].forEach(((e,t)=>{const r=Nt(e,"bp"),o=pt`<a class="marker self-link" href="${`#${r}`}"
271
+ ><bdi lang="${hs}">${ps.best_practice}${t+1}</bdi></a
272
+ >`;if(n){const t=pt`<li>${o}: ${Mt(e)}</li>`;n.appendChild(t)}const s=e.closest("div");if(!s)return void e.classList.add("advisement");s.classList.add("advisement");const i=pt`${o.cloneNode(!0)}: ${e}`;s.prepend(...i.childNodes)})),e.length)t&&(t.appendChild(pt`<h1>Best Practices Summary</h1>`),n&&t.appendChild(n));else if(t){Wt("Using best practices summary (#bp-summary) but no best practices found.",us),t.remove()}}});const ms="core/figures",gs=Ct({en:{list_of_figures:"List of Figures",fig:"Figure "},ja:{fig:"図 ",list_of_figures:"図のリスト"},ko:{fig:"그림 ",list_of_figures:"그림 목록"},nl:{fig:"Figuur ",list_of_figures:"Lijst met figuren"},es:{fig:"Figura ",list_of_figures:"Lista de Figuras"},zh:{fig:"图 ",list_of_figures:"规范中包含的图"},de:{fig:"Abbildung",list_of_figures:"Abbildungsverzeichnis"}});var bs=Object.freeze({__proto__:null,name:ms,run:function(){const e=function(){const e=[];return document.querySelectorAll("figure").forEach(((t,n)=>{const r=t.querySelector("figcaption");if(r)!function(e,t,n){const r=t.textContent;Nt(e,"fig",r),It(t,pt`<span class="fig-title"></span>`),t.prepend(pt`<a class="self-link" href="#${e.id}"
273
+ >${gs.fig}<bdi class="figno">${n+1}</bdi></a
274
+ >`," ")}(t,r,n),e.push(function(e,t){const n=t.cloneNode(!0);return n.querySelectorAll("a").forEach((e=>{jt(e,"span").removeAttribute("href")})),pt`<li class="tofline">
253
275
  <a class="tocxref" href="${`#${e}`}">${n.childNodes}</a>
254
- </li>`}(t.id,r));else{Mt("Found a `<figure>` without a `<figcaption>`.",Vo,{elements:[t]})}})),e}(),t=document.getElementById("tof");e.length&&t&&(!function(e){if(e.classList.contains("appendix")||e.classList.contains("introductory")||e.closest("section"))return;const t=function(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}(e);t.every((e=>e.classList.contains("introductory")))?e.classList.add("introductory"):t.some((e=>e.classList.contains("appendix")))&&e.classList.add("appendix")}(t),t.append(lt`<h1>${Zo.list_of_figures}</h1>`,lt`<ul class="tof">
276
+ </li>`}(t.id,r));else{Wt("Found a `<figure>` without a `<figcaption>`.",ms,{elements:[t]})}})),e}(),t=document.getElementById("tof");e.length&&t&&(!function(e){if(e.classList.contains("appendix")||e.classList.contains("introductory")||e.closest("section"))return;const t=function(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}(e);t.every((e=>e.classList.contains("introductory")))?e.classList.add("introductory"):t.some((e=>e.classList.contains("appendix")))&&e.classList.add("appendix")}(t),t.append(pt`<h1>${gs.list_of_figures}</h1>`,pt`<ul class="tof">
255
277
  ${e}
256
- </ul>`))}});const Qo="core/data-cite",Jo="__SPEC__";async function Xo(e){const{key:t,frag:n,path:r,href:o}=e;let s="",i="";if(t===Jo)s=document.location.href;else{const e=await Mr(t);if(!e)return null;s=e.href,i=e.title}if(o)s=o;else{if(r){const e=r.startsWith("/")?`.${r}`:r;s=new URL(e,s).href}n&&(s=new URL(n,s).href)}return{href:s,title:i}}function Yo(e,t,n){const{href:r,title:o}=t,s=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=o),t.href=r,s){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?Rt(e,t):(t.textContent=o,e.append(t)),s){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){Dt("Exporting a linked external definition is not allowed.",Qo,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function es(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const ts=es("#"),ns=es("/");function rs(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:o,citeHref:s}=t;if(n.startsWith("#")&&!r){const r=e.parentElement.closest('[data-cite]:not([data-cite^="#"])'),{key:o,isNormative:s}=r?rs(r):{key:Jo,isNormative:!1};return t.cite=s?o:`?${o}`,t.citeFrag=n.replace("#",""),rs(e)}const i=r?`#${r}`:ts(n),a=o||ns(n).split("#")[0],{type:l}=At(n,e),c="normative"===l,u=/^[?|!]/.test(n);return{key:n.split(/[/|#]/)[0].substring(Number(u)),isNormative:c,frag:i,path:a,href:s}}function os(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 ss=Object.freeze({__proto__:null,THIS_SPEC:Jo,name:Qo,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(rs).map((async e=>({entry:e,result:await Mr(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await Dr(n);r&&Object.assign(jr,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=rs(t),r=await Xo(n);if(r)Yo(t,r,n);else{const n=`Couldn't find a match for "${e}"`;t.dataset.matchedText&&(t.textContent=t.dataset.matchedText),Mt(n,Qo,{elements:[t]})}}Kt("beforesave",os)},toCiteDetails:rs});const is="core/link-to-dfn",as=[],ls=$t({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:"在文档中有重复的定义。"},cs:{duplicateMsg:e=>`Duplicitní definice '${e}'`,duplicateTitle:"Toto je v dokumentu definováno vícekrát."}});function cs(e){const t=new Map,n=[];for(const r of _o.get(e)){const{dfnType:o="dfn"}=r.dataset,s=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const i of s){if(t.has(i)&&t.get(i).has(o)){const e=t.get(i).get(o),s="dfn"===e.localName,a="dfn"===r.localName,l=o===(e.dataset.dfnType||"dfn"),c=!i&&!e.dataset.dfnFor||e.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(i);if(s&&a&&l&&c){n.push(r);continue}}t.has(i)||t.set(i,new Map),t.get(i).set(o,r),("idl"in r.dataset||"dfn"!==o)&&t.get(i).set("idl",r),Et(r,"dfn",e)}}return{result:t,duplicates:n}}function us(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor:"";return Ct(e).reduce(((e,r)=>{const o=r.split(".");return 2===o.length&&e.push({for:o[0],title:o[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e}),[])}(e).find((e=>t.has(e.title)&&t.get(e.title).has(e.for)));if(!n)return;const r=t.get(n.title).get(n.for),{linkType:o}=e.dataset;if(o){for(const e of o.split("|"))if(r.get(e))return r.get(e);return r.get("dfn")}{const e=n.for?"idl":"dfn";return r.get(e)||r.get("idl")}}function ds(e,t,n){let r=!1;const{linkFor:o}=e.dataset,{dfnFor:s}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(o&&!n.get(o)&&s&&!s.split(",").map((e=>e.trim())).includes(o))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"),o=ps(e)&&ps(t,n);r&&!o||Rt(e,document.createElement("code"))}(e,t),!r}function ps(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 hs(e){e.forEach((e=>{Mt(`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,is,{title:"Linking error: not matching `<dfn>`",elements:[e]})}))}var fs=Object.freeze({__proto__:null,name:is,possibleExternalLinks:as,run:async function(e){const t=function(){const e=new zt;for(const t of _o.keys()){const{result:n,duplicates:r}=cs(t);e.set(t,n),r.length>0&&Dt(ls.duplicateMsg(t),is,{title:ls.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){as.push(e);continue}const r=us(e,t);if(r){ds(e,r,t)||as.push(e)}else""===e.dataset.cite?n.push(e):as.push(e)}hs(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${Jo}$2`);const{key:r,isNormative:o}=rs(t);r!==Jo&&(o||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||hs(as)}});const ms="core/contrib";var gs=Object.freeze({__proto__:null,name:ms,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void Dt(Wt`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,ms)}const t=e.editors.map((e=>e.name)),n=`${e.github.apiBase}/${e.github.fullName}/`;await async function(e,t){const n=document.getElementById("gh-contributors");if(!n)return;n.textContent="Fetching list of contributors...";const r=await o();null!==r?function(e,t){const n=e.sort(((e,t)=>{const n=e.name||e.login,r=t.name||t.login;return n.toLowerCase().localeCompare(r.toLowerCase())}));if("UL"===t.tagName)return void lt(t)`${n.map((({name:e,login:t})=>`<li><a href="https://github.com/${t}">${e||t}</a></li>`))}`;const r=n.map((e=>e.name||e.login));t.textContent=kt(r)}(r,n):n.textContent="Failed to fetch contributors.";async function o(){const{href:n}=new URL("contributors",t);try{const t=await async function(e,t=864e5){const n=new Request(e),r=new URL(n.url);let o,s;if("caches"in window)try{if(o=await caches.open(r.origin),s=await o.match(n),s&&new Date(s.headers.get("Expires"))>new Date)return s}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&s)return console.warn(`Returning a stale cached response for ${r}`),s;if(o&&i.ok){const e=i.clone(),r=new Headers(i.headers),s=new Date(Date.now()+t);r.set("Expires",s.toISOString());const a=new Response(await e.blob(),{headers:r});await o.put(n,a).catch(console.error)}return i}(n);if(!t.ok)throw new Error(`Request to ${n} failed with status code ${t.status}`);return(await t.json()).filter((t=>!e.includes(t.name||t.login)&&!t.login.includes("[bot]")))}catch(e){return Dt("Error loading contributors from GitHub.",ms,{cause:e}),null}}}(t,n)}});var bs=Object.freeze({__proto__:null,name:"core/fix-headers",run:function(){[...document.querySelectorAll("section:not(.introductory)")].map((e=>e.querySelector("h1, h2, h3, h4, h5, h6"))).filter((e=>e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);Lt(e,`h${t}`)}))}});const ys=["h2","h3","h4","h5","h6"],vs="core/structure",ws=$t({en:{toc:"Table of Contents",back_to_top:"Back to Top"},zh:{toc:"内容大纲",back_to_top:"返回顶部"},ko:{toc:"목차",back_to_top:"맨 위로"},ja:{toc:"目次",back_to_top:"先頭に戻る"},nl:{toc:"Inhoudsopgave",back_to_top:"Terug naar boven"},es:{toc:"Tabla de Contenidos",back_to_top:"Volver arriba"},de:{toc:"Inhaltsverzeichnis",back_to_top:"Zurück nach oben"},cs:{toc:"Obsah",back_to_top:"Zpět na začátek"}});function ks(e,t,{prefix:n=""}={}){let r=!1,o=0,s=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const i=lt`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(o=s,r=!0);let e=a.isIntro?"":r?xs(s-o+1):n+s;const l=e.split(".").length;if(1===l&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(s+=1,a.header.prepend(lt`<bdi class="secno">${e} </bdi>`)),l<=t){const n=a.header.id||a.element.id,r=_s(a.header,n),o=ks(a.subsections,t,{prefix:e});o&&r.append(o),i.append(r)}}return i}function xs(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function $s(e){const t=e.querySelectorAll(":scope > section"),n=[];for(const e of t){const t=e.classList.contains("notoc");if(!e.children.length||t)continue;const r=e.children[0];if(!ys.includes(r.localName))continue;const o=r.textContent;Et(e,null,o),n.push({element:e,header:r,title:o,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:$s(e)})}return n}function _s(e,t){const n=lt`<a href="${`#${t}`}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=Lt(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{Lt(e,"span").removeAttribute("id")})),lt`<li class="tocline">${n}</li>`}var Ss=Object.freeze({__proto__:null,name:vs,run:function(e){if("maxTocLevel"in e==!1&&(e.maxTocLevel=1/0),function(){const e=[...document.querySelectorAll("section:not(.introductory) :is(h1,h2,h3,h4,h5,h6):first-child")].filter((e=>!e.closest("section.introductory")));if(!e.length)return;e.forEach((e=>{const t=`h${Math.min(Tt(e,"section").length+1,6)}`;e.localName!==t&&Lt(e,t)}))}(),!e.noTOC){!function(){const e=document.querySelectorAll("section[data-max-toc]");for(const t of e){const e=parseInt(t.dataset.maxToc,10);if(e<0||e>6||Number.isNaN(e)){Dt("`data-max-toc` must have a value between 0-6 (inclusive).",vs,{elements:[t]});continue}if(0===e){t.classList.add("notoc");continue}const n=t.querySelectorAll(`:scope > ${Array.from({length:e},(()=>"section")).join(" > ")}`);for(const e of n)e.classList.add("notoc")}}();const t=ks($s(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=lt`<nav id="toc"></nav>`,n=lt`<h2 class="introductory">${ws.toc}</h2>`;Et(n),t.append(n,e);const r=document.getElementById("toc")||document.getElementById("sotd")||document.getElementById("abstract");r&&("toc"===r.id?r.replaceWith(t):r.after(t));const o=lt`<p role="navigation" id="back-to-top">
257
- <a href="#title"><abbr title="${ws.back_to_top}">&uarr;</abbr></a>
258
- </p>`;document.body.append(o)}(t)}Zt("toc")}});const Es=$t({en:{informative:"This section is non-normative."},nl:{informative:"Dit onderdeel is niet normatief."},ko:{informative:"이 부분은 비규범적입니다."},ja:{informative:"この節は仕様には含まれません."},de:{informative:"Dieser Abschnitt ist nicht normativ."},zh:{informative:"本章节不包含规范性内容。"},cs:{informative:"Tato sekce není normativní."}});var Cs=Object.freeze({__proto__:null,name:"core/informative",run:function(){Array.from(document.querySelectorAll("section.informative")).map((e=>e.querySelector("h2, h3, h4, h5, h6"))).filter((e=>e)).forEach((e=>{e.after(lt`<p><em>${Es.informative}</em></p>`)}))}});const Ls=$t({en:{permalinkLabel(e,t){let n=`Permalink for${t?"":" this"} ${e}`;return t&&(n+=` ${xt(t.textContent)}`),n}}});var As=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;if(t||(Et(n),t=n.parentElement.id||n.id),!e.addSectionLinks)continue;const r=Ls.permalinkLabel(n.closest(".appendix")?"Appendix":"Section",n.querySelector(":scope > bdi.secno")),o=lt`<div class="header-wrapper"></div>`;n.replaceWith(o);const s=lt`<a
278
+ </ul>`))}});const ys="core/data-cite",vs="__SPEC__";async function ws(e){const{key:t,frag:n,path:r,href:o}=e;let s="",i="";if(t===vs)s=document.location.href;else{const e=await so(t);if(!e)return null;s=e.href??"",i=e.title}if(o)s=o;else{if(r){const e=r.startsWith("/")?`.${r}`:r;s=new URL(e,s).href}n&&(s=new URL(n,s).href)}return{href:s,title:i}}function ks(e,t,n){const{href:r,title:o}=t,s=!n.path&&!n.frag;switch(e.localName){case"a":{const t=e;if(""===t.textContent&&"the-empty-string"!==t.dataset.lt&&(t.textContent=o),t.href=r,s){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?It(e,t):(t.textContent=o,e.append(t)),s){const n=document.createElement("cite");n.append(t),e.append(n)}if("export"in e.dataset){Ft("Exporting a linked external definition is not allowed.",ys,{hint:"Please remove the `data-export` attribute.",elements:[e]}),delete e.dataset.export}e.classList.add("externalDFN"),e.dataset.noExport="";break}}}function xs(e){return t=>{const n=t.search(e);return-1!==n?t.substring(n):""}}const $s=xs("#"),Ss=xs("/");function _s(e){const{dataset:t}=e,{cite:n,citeFrag:r,citePath:o,citeHref:s}=t;if((n??"").startsWith("#")&&!r){const r=e.parentElement?.closest('[data-cite]:not([data-cite^="#"])')??null,{key:o,isNormative:s}=r?_s(r):{key:vs,isNormative:!1};return t.cite=s?o:`?${o}`,t.citeFrag=(n??"").replace("#",""),_s(e)}const i=r?`#${r}`:$s(n??""),a=o||Ss(n??"").split("#")[0],{type:l}=Ot(n??"",e),c="normative"===l,u=/^[?|!]/.test(n??"");return{key:(n??"").split(/[/|#]/)[0].substring(Number(u)),isNormative:c,frag:i,path:a,href:s}}function Es(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 Ls=Object.freeze({__proto__:null,THIS_SPEC:vs,name:ys,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(_s).map((async e=>({entry:e,result:await so(e.key)}))),n=(await Promise.all(t)).filter((({result:e})=>null===e)).map((({entry:{key:e}})=>e)),r=await oo(n);r&&Object.assign(Yr,r)}([...e]);for(const t of e){const e=t.dataset.cite,n=_s(t),r=await ws(n);if(r)ks(t,r,n);else{const n=`Couldn't find a match for "${e}"`;t.dataset.matchedText&&(t.textContent=t.dataset.matchedText),Wt(n,ys,{elements:[t]})}}en("beforesave",Es)},toCiteDetails:_s});const Cs="core/link-to-dfn",Rs=[],As=Ct({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:"在文档中有重复的定义。"},cs:{duplicateMsg:e=>`Duplicitní definice '${e}'`,duplicateTitle:"Toto je v dokumentu definováno vícekrát."}});function Ts(e){const t=new Map,n=[];for(const r of Go.get(e)??[]){const{dfnType:o="dfn"}=r.dataset,s=r.dataset.dfnFor?.split(",").map((e=>e.trim()))??[""];for(const i of s){if(t.has(i)&&t.get(i)?.has(o)){const e=t.get(i)?.get(o),s="dfn"===e?.localName,a="dfn"===r.localName,l=o===(e?.dataset.dfnType||"dfn"),c=!i&&!e?.dataset.dfnFor||e?.dataset.dfnFor?.split(",").map((e=>e.trim())).includes(i);if(s&&a&&l&&c){n.push(r);continue}}t.has(i)||t.set(i,new Map),t.get(i)?.set(o,r),("idl"in r.dataset||"dfn"!==o)&&t.get(i)?.set("idl",r),Nt(r,"dfn",e)}}return{result:t,duplicates:n}}function Ns(e,t){const n=function(e){const t=e.closest("[data-link-for]"),n=t?t.dataset.linkFor??"":"";return Pt(e).reduce(((e,r)=>{const o=r.split(".");return 2===o.length&&e.push({for:o[0],title:o[1]}),e.push({for:n,title:r}),t||e.push({for:r,title:r}),""!==n&&e.push({for:"",title:r}),e}),[])}(e).find((e=>t.has(e.title)&&t.get(e.title)?.has(e.for)));if(!n)return;const r=t.get(n.title)?.get(n.for),{linkType:o}=e.dataset;if(o){for(const e of o.split("|"))if(r?.get(e))return r.get(e);return r?.get("dfn")}{const e=n.for?"idl":"dfn";return r?.get(e)||r?.get("idl")}}function Ps(e,t,n){let r=!1;const{linkFor:o}=e.dataset,{dfnFor:s}=t.dataset;if(t.dataset.cite)e.dataset.cite=t.dataset.cite;else if(o&&!n.get(o)&&s&&!s.split(",").map((e=>e.trim())).includes(o))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"),o=js(e)&&js(t,n);r&&!o||It(e,document.createElement("code"))}(e,t),!r}function js(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 Os(e){e.forEach((e=>{const t=`Found linkless \`<a>\` element with text "${e.textContent}" but no matching \`<dfn>\``,n=e.closest("[data-link-for]"),r=`Add a matching \`<dfn>\` element, ${Qt`use ${"[data-cite]"} to link to an external definition, or enable ${"[xref]"} for automatic cross-spec linking.`}${n?` This link is inside a \`data-link-for="${n.dataset.linkFor}"\` section — \`[=term=]\` links are scoped to that context. To link to a global concept instead, either add \`data-link-for=""\` on this \`<a>\` or move it outside the scoped section.`:""}`;Wt(t,Cs,{title:"Linking error: no matching `<dfn>`",hint:r,elements:[e]})}))}var Is=Object.freeze({__proto__:null,name:Cs,possibleExternalLinks:Rs,run:async function(e){const t=function(){const e=new Ht;for(const t of Go.keys()){const{result:n,duplicates:r}=Ts(t);e.set(t,n),r.length>0&&Ft(As.duplicateMsg(t),Cs,{title:As.duplicateTitle,elements:r})}return e}(),n=[],r=document.querySelectorAll("a[data-cite='']:not([data-no-link-to-dfn]), a:not([href]):not([data-cite]):not([data-no-link-to-dfn]):not(.logo):not(.externalDFN)");for(const e of r){if(!e.dataset?.linkType&&e.dataset?.xrefType){Rs.push(e);continue}const r=Ns(e,t);if(r){Ps(e,r,t)||Rs.push(e)}else""===e.dataset.cite?n.push(e):Rs.push(e)}Os(n),function(e){const{shortName:t=""}=e,n=t?new RegExp(String.raw`^([?!])?${yt(t)}\b([^-])`,"i"):null,r=document.querySelectorAll("dfn[data-cite]:not([data-cite='']), a[data-cite]:not([data-cite=''])");for(const t of r){n&&(t.dataset.cite=(t.dataset.cite??"").replace(n,`$1${vs}$2`));const{key:r,isNormative:o}=_s(t);r!==vs&&(o||e.normativeReferences.has(r)?(e.normativeReferences.add(r),e.informativeReferences.delete(r)):e.informativeReferences.add(r))}}(e),e.xref||Os(Rs)}});const zs="core/contrib";var Ds=Object.freeze({__proto__:null,name:zs,run:async function(e){if(!document.getElementById("gh-contributors"))return;if(!e.github){return void Ft(Qt`Requested list of contributors from GitHub, but ${"[github]"} configuration option is not set.`,zs)}const t=(e.editors??[]).map((e=>e.name)),n=`${e.github.apiBase}/${e.github.fullName}/`;await async function(e,t){const n=document.getElementById("gh-contributors");if(!n)return;n.textContent="Fetching list of contributors...";const r=await o();null!==r?function(e,t){const n=e.sort(((e,t)=>{const n=e.name||e.login,r=t.name||t.login;return n.toLowerCase().localeCompare(r.toLowerCase())}));if("UL"===t.tagName)return void pt(t)`${n.map((({name:e,login:t})=>`<li><a href="https://github.com/${t}">${e||t}</a></li>`))}`;const r=n.map((e=>e.name||e.login));t.textContent=Et(r)}(r,n):n.textContent="Failed to fetch contributors.";async function o(){const{href:n}=new URL("contributors",t);try{const t=await async function(e,t=864e5){const n=new Request(e),r=new URL(n.url);let o,s;if("caches"in window)try{if(o=await caches.open(r.origin),s=await o.match(n),s&&new Date(s.headers.get("Expires")??"")>new Date)return s}catch(e){console.error("Failed to use Cache API.",e)}const i=await fetch(n);if(!i.ok&&s)return console.warn(`Returning a stale cached response for ${r}`),s;if(o&&i.ok){const e=i.clone(),r=new Headers(i.headers),s=new Date(Date.now()+t);r.set("Expires",s.toISOString());const a=new Response(await e.blob(),{headers:r});await o.put(n,a).catch(console.error)}return i}(n);if(!t.ok)throw new Error(`Request to ${n} failed with status code ${t.status}`);return(await t.json()).filter((t=>!e.includes(t.name||t.login)&&!t.login.includes("[bot]")))}catch(e){return Ft("Error loading contributors from GitHub.",zs,{cause:e}),null}}}(t,n)}});var Ms=Object.freeze({__proto__:null,name:"core/fix-headers",run:function(){[...document.querySelectorAll("section:not(.introductory)")].map((e=>e.querySelector("h1, h2, h3, h4, h5, h6"))).filter((e=>null!==e)).forEach((e=>{const t=Math.min(function(e,t){const n=[];for(;e&&e!=e.ownerDocument.body;)e.matches(t)&&n.push(e),e=e.parentElement;return n}(e,"section").length+1,6);jt(e,`h${t}`)}))}});const qs=["h2","h3","h4","h5","h6"],Bs="core/structure",Hs=Ct({en:{toc:"Table of Contents",back_to_top:"Back to Top"},zh:{toc:"内容大纲",back_to_top:"返回顶部"},ko:{toc:"목차",back_to_top:"맨 위로"},ja:{toc:"目次",back_to_top:"先頭に戻る"},nl:{toc:"Inhoudsopgave",back_to_top:"Terug naar boven"},es:{toc:"Tabla de Contenidos",back_to_top:"Volver arriba"},de:{toc:"Inhaltsverzeichnis",back_to_top:"Zurück nach oben"},cs:{toc:"Obsah",back_to_top:"Zpět na začátek"}});function Us(e,t,{prefix:n=""}={}){let r=!1,o=0,s=1;if(n.length&&!n.endsWith(".")&&(n+="."),0===e.length)return null;const i=pt`<ol class="toc"></ol>`;for(const a of e){!a.isAppendix||n||r||(o=s,r=!0);let e=a.isIntro?"":r?Fs(s-o+1):n+s;const l=e.split(".").length;if(1===l&&(e+=".",a.header.before(document.createComment("OddPage"))),a.isIntro||(s+=1,a.header.prepend(pt`<bdi class="secno">${e} </bdi>`)),l<=t){const n=a.header.id||a.element.id,r=Gs(a.header,n),o=Us(a.subsections,t,{prefix:e});o&&r.append(o),i.append(r)}}return i}function Fs(e){let t="";for(;e>0;)e-=1,t=String.fromCharCode(65+e%26)+t,e=Math.floor(e/26);return t}function Ws(e){const t=e.querySelectorAll(":scope > section"),n=[];for(const e of t){const t=e.classList.contains("notoc");if(!e.children.length||t)continue;const r=e.children[0];if(!qs.includes(r.localName))continue;const o=r.textContent;Nt(e,void 0,o),n.push({element:e,header:r,title:o,isIntro:Boolean(e.closest(".introductory")),isAppendix:e.classList.contains("appendix"),subsections:Ws(e)})}return n}function Gs(e,t){const n=pt`<a href="${`#${t}`}" class="tocxref" />`;var r;return n.append(...e.cloneNode(!0).childNodes),(r=n).querySelectorAll("a").forEach((e=>{const t=jt(e,"span");t.className="formerLink",t.removeAttribute("href")})),r.querySelectorAll("dfn").forEach((e=>{jt(e,"span").removeAttribute("id")})),pt`<li class="tocline">${n}</li>`}var Vs=Object.freeze({__proto__:null,name:Bs,run:function(e){if("maxTocLevel"in e==!1&&(e.maxTocLevel=1/0),function(){const e=[...document.querySelectorAll("section:not(.introductory) :is(h1,h2,h3,h4,h5,h6):first-child")].filter((e=>!e.closest("section.introductory")));if(!e.length)return;e.forEach((e=>{const t=Math.min(function(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}(e,"section").length+1,6),n=`h${t}`;e.localName!==n&&jt(e,n)}))}(),!e.noTOC){!function(){const e=document.querySelectorAll("section[data-max-toc]");for(const t of e){const e=parseInt(t.dataset.maxToc??"",10);if(e<0||e>6||Number.isNaN(e)){Ft("`data-max-toc` must have a value between 0-6 (inclusive).",Bs,{elements:[t]});continue}if(0===e){t.classList.add("notoc");continue}const n=t.querySelectorAll(`:scope > ${Array.from({length:e},(()=>"section")).join(" > ")}`);for(const e of n)e.classList.add("notoc")}}();const t=Us(Ws(document.body),e.maxTocLevel);t&&function(e){if(!e)return;const t=pt`<nav id="toc"></nav>`,n=pt`<h2 class="introductory">${Hs.toc}</h2>`;Nt(n),t.append(n,e);const r=document.getElementById("toc")||document.getElementById("sotd")||document.getElementById("abstract");r&&("toc"===r.id?r.replaceWith(t):r.after(t));const o=pt`<p role="navigation" id="back-to-top">
279
+ <a href="#title"><abbr title="${Hs.back_to_top}">&uarr;</abbr></a>
280
+ </p>`;document.body.append(o)}(t)}Yt("toc",void 0)}});const Zs=Ct({en:{informative:"This section is non-normative."},nl:{informative:"Dit onderdeel is niet-normatief."},ko:{informative:"이 부분은 비규범적입니다."},ja:{informative:"この節は仕様には含まれません."},de:{informative:"Dieser Abschnitt ist nicht normativ."},zh:{informative:"本章节不包含规范性内容。"},cs:{informative:"Tato sekce není normativní."}});var Ks=Object.freeze({__proto__:null,name:"core/informative",run:function(){Array.from(document.querySelectorAll("section.informative")).map((e=>e.querySelector("h2, h3, h4, h5, h6"))).filter((e=>null!==e)).forEach((e=>{e.after(pt`<p><em>${Zs.informative}</em></p>`)}))}});const Qs=Ct({en:{permalinkLabel(e,t){let n=`Permalink for${t?"":" this"} ${e}`;return t&&(n+=` ${Lt(t.textContent)}`),n}}});var Js=Object.freeze({__proto__:null,name:"core/id-headers",run:function(e){const t=document.querySelectorAll("section:not(.head,#abstract,#sotd) h2, h3, h4, h5, h6");for(const n of t){let t=n.id;if(t||(Nt(n),t=n.parentElement?.id||n.id),!e.addSectionLinks)continue;const r=Qs.permalinkLabel(n.closest(".appendix")?"Appendix":"Section",n.querySelector(":scope > bdi.secno")),o=pt`<div class="header-wrapper"></div>`;n.replaceWith(o);const s=pt`<a
259
281
  href="#${t}"
260
282
  class="self-link"
261
283
  aria-label="${r}"
262
- ></a>`;o.append(n,s)}}});var Rs=Object.freeze({__proto__:null,name:"geonovum/conformance",run:function(){const e=document.querySelector("section#conformance");e&&function(e){const t=lt`
284
+ ></a>`;o.append(n,s)}}});var Xs=Object.freeze({__proto__:null,name:"geonovum/conformance",run:function(){const e=document.querySelector("section#conformance");e&&function(e){const t=pt`
263
285
  <h2>Conformiteit</h2>
264
286
  <p>
265
287
  Naast onderdelen die als niet normatief gemarkeerd zijn, zijn ook alle
@@ -267,20 +289,20 @@ input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
267
289
  is alles in dit document normatief.
268
290
  </p>
269
291
  <p>Informatief en normatief.</p>
270
- `;e.prepend(...t.childNodes)}(e)}});const Ts="ui/save-html",Ps=$t({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),Ns=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return Xt(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return Xt(this.type)}},{id:"respec-save-as-epub",ext:"epub",title:"EPUB 3",type:"application/epub+zip",get href(){const e=new URL("https://labs.w3.org/r2epub/");return e.searchParams.append("respec","true"),e.searchParams.append("url",document.location.href),e.href}}];function js(e,t){const{id:n,href:r,ext:o,title:s,type:i}=e,a=function(e,t=""){return ft.format(e).replace(ht,t)}(t.publishDate||new Date),l=[t.specStatus,t.shortName||"spec",a].join("-");return lt`<a
292
+ `;e.prepend(...t.childNodes)}(e)}});const Ys="ui/save-html",ei=Ct({en:{save_snapshot:"Export"},nl:{save_snapshot:"Bewaar Snapshot"},ja:{save_snapshot:"保存する"},de:{save_snapshot:"Exportieren"},zh:{save_snapshot:"导出"}}),ti=[{id:"respec-save-as-html",ext:"html",title:"HTML",type:"text/html",get href(){return rn(this.type)}},{id:"respec-save-as-xml",ext:"xhtml",title:"XML",type:"application/xml",get href(){return rn(this.type)}},{id:"respec-save-as-epub",ext:"epub",title:"EPUB 3",type:"application/epub+zip",get href(){const e=new URL("https://labs.w3.org/r2epub/");return e.searchParams.append("respec","true"),e.searchParams.append("url",document.location.href),e.href}}];function ni(e,t){const{id:n,href:r,ext:o,title:s,type:i}=e,a=function(e,t=""){return vt.format(e).replace(bt,t)}(t.publishDate||new Date),l=[t.specStatus,t.shortName||"spec",a].join("-");return pt`<a
271
293
  href="${r}"
272
294
  id="${n}"
273
295
  download="${l}.${o}"
274
296
  type="${i}"
275
297
  class="respec-save-button"
276
- onclick=${()=>Rn.closeModal()}
298
+ onclick=${()=>Fn.closeModal()}
277
299
  >${s}</a
278
- >`}var Is=Object.freeze({__proto__:null,exportDocument:function(e,t){return Mt("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",Ts,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),Xt(t)},name:Ts,run:function(e){const t={async show(t){await document.respec.ready;const n=lt`<div class="respec-save-buttons">
279
- ${Ns.map((t=>js(t,e)))}
280
- </div>`;Rn.freshModal(Ps.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=Rn.addCommand(Ps.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))}});const Os="https://respec.org/specref/",zs=$t({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"},cs:{search_specref:"Hledat ve Specref"}}),qs=Rn.addCommand(zs.search_specref,(function(){const e=lt`
281
- <iframe class="respec-iframe" src="${Os}" onload=${e=>e.target.classList.add("ready")}></iframe>
282
- <a href="${Os}" target="_blank">Open Search UI in a new tab</a>
283
- `;Rn.freshModal(zs.search_specref,e,qs)}),"Ctrl+Shift+Alt+space","🔎");var Ds=Object.freeze({__proto__:null});const Ms=$t({en:{about_respec:"About"},zh:{about_respec:"关于"},nl:{about_respec:"Over"},ja:{about_respec:"これについて"},de:{about_respec:"Über"},cs:{about_respec:"O aplikaci"}});window.respecVersion=window.respecVersion||"Developer Edition";const Bs=document.createElement("div"),Hs=lt.bind(Bs),Fs=Rn.addCommand(`${Ms.about_respec} ${window.respecVersion}`,(function(){const e=[];"getEntriesByType"in performance&&performance.getEntriesByType("measure").sort(((e,t)=>t.duration-e.duration)).map((({name:e,duration:t})=>({name:e,duration:t>1e3?`${Math.round(t/1e3)} second(s)`:`${t.toFixed(2)} milliseconds`}))).map(Us).forEach((t=>{e.push(t)}));Hs`
300
+ >`}var ri=Object.freeze({__proto__:null,exportDocument:function(e,t){return Wt("Exporting via ui/save-html module's `exportDocument()` is deprecated and will be removed.",Ys,{hint:"Use core/exporter `rsDocToDataURL()` instead."}),rn(t)},name:Ys,run:function(e){const t={async show(t){await document.respec.ready;const n=pt`<div class="respec-save-buttons">
301
+ ${ti.map((t=>ni(t,e)))}
302
+ </div>`;Fn.freshModal(ei.save_snapshot,n,t)}},n="download"in HTMLAnchorElement.prototype;let r;n&&(r=Fn.addCommand(ei.save_snapshot,(function(){if(!n)return;t.show(r)}),"Ctrl+Shift+Alt+S","💾"))}});const oi="https://respec.org/specref/",si=Ct({en:{search_specref:"Search Specref"},nl:{search_specref:"Doorzoek Specref"},ja:{search_specref:"仕様検索"},de:{search_specref:"Spezifikationen durchsuchen"},zh:{search_specref:"搜索 Specref"},cs:{search_specref:"Hledat ve Specref"}}),ii=Fn.addCommand(si.search_specref,(function(){const e=pt`
303
+ <iframe class="respec-iframe" src="${oi}" onload=${e=>e.target.classList.add("ready")}></iframe>
304
+ <a href="${oi}" target="_blank">Open Search UI in a new tab</a>
305
+ `;Fn.freshModal(si.search_specref,e,ii)}),"Ctrl+Shift+Alt+space","🔎");var ai=Object.freeze({__proto__:null});const li=Ct({en:{about_respec:"About"},zh:{about_respec:"关于"},nl:{about_respec:"Over"},ja:{about_respec:"これについて"},de:{about_respec:"Über"},cs:{about_respec:"O aplikaci"}});window.respecVersion=window.respecVersion||"Developer Edition";const ci=document.createElement("div"),ui=pt.bind(ci),di=Fn.addCommand(`${li.about_respec} ${window.respecVersion}`,(function(){const e=[];"getEntriesByType"in performance&&performance.getEntriesByType("measure").sort(((e,t)=>t.duration-e.duration)).map((({name:e,duration:t})=>({name:e,duration:t>1e3?`${Math.round(t/1e3)} second(s)`:`${t.toFixed(2)} milliseconds`}))).map(pi).forEach((t=>{e.push(t)}));ui`
284
306
  <p>
285
307
  ReSpec is a document production toolchain, with a notable focus on W3C specifications.
286
308
  </p>
@@ -304,18 +326,19 @@ input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
304
326
  </thead>
305
327
  <tbody>${e}</tbody>
306
328
  </table>
307
- `,Rn.freshModal(`${Ms.about_respec} - ${window.respecVersion}`,Bs,Fs)}),"Ctrl+Shift+Alt+A","ℹ️");function Us({name:e,duration:t}){return lt`
329
+ `,Fn.freshModal(`${li.about_respec} - ${window.respecVersion}`,ci,di)}),"Ctrl+Shift+Alt+A","ℹ️");function pi({name:e,duration:t}){return pt`
308
330
  <tr>
309
331
  <td><a href="${`https://github.com/speced/respec/blob/develop/src/${e}.js`}">${e}</a></td>
310
332
  <td>${t}</td>
311
333
  </tr>
312
- `}var Ws=Object.freeze({__proto__:null});var Gs=Object.freeze({__proto__:null,name:"core/seo",run:function(e){if(e.gitRevision){const t=lt`<meta
334
+ `}var hi=Object.freeze({__proto__:null});var fi=Object.freeze({__proto__:null,name:"core/seo",run:function(e){if(e.gitRevision){const t=pt`<meta
313
335
  name="revision"
314
336
  content="${e.gitRevision}"
315
- />`;document.head.appendChild(t)}const t=document.querySelector("#abstract p:first-of-type");if(!t)return;const n=t.textContent.replace(/\s+/," ").trim(),r=document.createElement("meta");r.name="description",r.content=n,document.head.appendChild(r)}});var Vs=String.raw`.hljs{--base:#fafafa;--mono-1:#383a42;--mono-2:#686b77;--mono-3:#717277;--hue-1:#0b76c5;--hue-2:#336ae3;--hue-3:#a626a4;--hue-4:#42803c;--hue-5:#ca4706;--hue-5-2:#c91243;--hue-6:#986801;--hue-6-2:#9a6a01}
337
+ />`;document.head.appendChild(t)}const t=document.querySelector("#abstract p:first-of-type");if(!t)return;const n=t.textContent.replace(/\s+/," ").trim(),r=document.createElement("meta");r.name="description",r.content=n,document.head.appendChild(r)}});const mi="\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";var gi=String.raw`.hljs,body:has(input[name=color-scheme][value=light]:checked) .hljs,head:not(:has(meta[name=color-scheme][content~=dark]))+body .hljs{--base:#fafafa;--mono-1:#383a42;--mono-2:#686b77;--mono-3:#717277;--hue-1:#0b76c5;--hue-2:#336ae3;--hue-3:#a626a4;--hue-4:#42803c;--hue-5:#ca4706;--hue-5-2:#c91243;--hue-6:#986801;--hue-6-2:#9a6a01}
316
338
  @media (prefers-color-scheme:dark){
317
- .hljs{--base:#282c34;--mono-1:#abb2bf;--mono-2:#818896;--mono-3:#5c6370;--hue-1:#56b6c2;--hue-2:#61aeee;--hue-3:#c678dd;--hue-4:#98c379;--hue-5:#e06c75;--hue-5-2:#be5046;--hue-6:#d19a66;--hue-6-2:#e6c07b}
339
+ .hljs{${mi}}
318
340
  }
341
+ body:has(input[name=color-scheme][value=dark]:checked) .hljs{${mi}}
319
342
  .hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;color:var(--mono-1,#383a42);background:#fafafa;background:var(--base,#fafafa)}
320
343
  .hljs-comment,.hljs-quote{color:#717277;color:var(--mono-3,#717277);font-style:italic}
321
344
  .hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4;color:var(--hue-3,#a626a4)}
@@ -327,21 +350,21 @@ input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
327
350
  .hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3;color:var(--hue-2,#336ae3)}
328
351
  .hljs-emphasis{font-style:italic}
329
352
  .hljs-strong{font-weight:700}
330
- .hljs-link{text-decoration:underline}`;async function Zs(t){const n=await fetch(new URL(`../../${t}`,e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-geonovum.js",document.baseURI).href));return await n.text()}const Ks=new URL("respec-highlight.js",e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("respec-geonovum.js",document.baseURI).href).href,Qs=gt({hint:"preload",href:Ks,as:"script"});async function Js(){try{return(await Promise.resolve().then((function(){return ta}))).default}catch{return Zs("worker/respec-worker.js")}}async function Xs(){try{const e=await fetch(Ks);if(e.ok)return await e.text()}catch{}return null}document.head.appendChild(Qs);const Ys=async function(){const[e,t]=await Promise.all([Js(),Xs()]),n=new Blob([null!==t?`${t}\n`:'self.RESPEC_HIGHLIGHT_URL = "https://www.w3.org/Tools/respec/respec-highlight";\n',e],{type:"application/javascript"});return new Worker(URL.createObjectURL(n))}();n("core/worker",Ys.then((e=>({worker:e}))));const ei=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function ti(e){e.setAttribute("aria-busy","true");const t=(n=e.classList,Array.from(n).filter((e=>"highlight"!==e&&"nolinks"!==e)).map((e=>e.toLowerCase())));var n;let r;try{r=await async function(e,t){const n={action:"highlight",code:e,id:ei(),languages:t},r=await Ys;return r.postMessage(n),new Promise(((e,t)=>{const o=setTimeout((()=>{t(new Error("Timed out waiting for highlight."))}),4e3);r.addEventListener("message",(function t(s){const{data:{id:i,language:a,value:l}}=s;i===n.id&&(r.removeEventListener("message",t),clearTimeout(o),e({language:a,value:l}))}))}))}(e.innerText,t)}catch(e){return void console.error(e)}const{language:o,value:s}=r;switch(e.localName){case"pre":e.classList.remove(o),e.innerHTML=`<code class="hljs${o?` ${o}`:""}">${s}</code>`,e.classList.length||e.removeAttribute("class");break;case"code":e.innerHTML=s,e.classList.add("hljs"),o&&e.classList.add(o)}e.setAttribute("aria-busy","false")}var ni=Object.freeze({__proto__:null,name:"core/highlight",run:async function(e){if(e.noHighlightCSS)return;const t=[...document.querySelectorAll("\n pre:not(.idl):not(.nohighlight) > code:not(.nohighlight),\n pre:not(.idl):not(.nohighlight),\n code.highlight\n ")].filter((e=>"pre"!==e.localName||!e.querySelector("code")));if(!t.length)return;const n=t.filter((e=>e.textContent.trim())).map(ti);document.head.appendChild(lt`<style>
331
- ${Vs}
332
- </style>`),await Promise.all(n)}});const ri=$t({en:{missing_test_suite_uri:Wt`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:Wt`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:Wt`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:Wt`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),oi="core/data-tests";function si(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[o]=r;if(r.find((e=>"https"===e))){const e=document.createElement("span");e.textContent="🔒",e.setAttribute("aria-label","requires a secure connection"),e.setAttribute("title","Test requires HTTPS"),o=o.replace(".https",""),t.push(e)}if(o.split(".").join("-").split("-").find((e=>"manual"===e))){const e=document.createElement("span");e.textContent="💪",e.setAttribute("aria-label","the test must be run manually"),e.setAttribute("title","Manual test"),o=o.replace("-manual",""),t.push(e)}return lt`
353
+ .hljs-link{text-decoration:underline}`;const bi=function(e,t=0){const n=function*(e,t){for(;;)yield`${e}:${t}`,t++}(e,t);return()=>n.next().value}("highlight");async function yi(e){const t=e;t.setAttribute("aria-busy","true");const n=(r=t.classList,Array.from(r).filter((e=>"highlight"!==e&&"nolinks"!==e)).map((e=>e.toLowerCase())));var r;let o;try{o=await async function(e,t){const n={action:"highlight",code:e,id:bi(),languages:t},r=await dn;return r.postMessage(n),new Promise(((e,t)=>{const o=setTimeout((()=>{t(new Error("Timed out waiting for highlight."))}),4e3);r.addEventListener("message",(function t(s){const{data:{id:i,language:a,value:l}}=s;i===n.id&&(r.removeEventListener("message",t),clearTimeout(o),e({language:a,value:l}))}))}))}(t.innerText,n)}catch(e){return void console.error(e)}const{language:s,value:i}=o;switch(t.localName){case"pre":t.classList.remove(s),t.innerHTML=`<code class="hljs${s?` ${s}`:""}">${i}</code>`,t.classList.length||t.removeAttribute("class");break;case"code":t.innerHTML=i,t.classList.add("hljs"),s&&t.classList.add(s)}t.setAttribute("aria-busy","false")}var vi=Object.freeze({__proto__:null,name:"core/highlight",run:async function(e){if(e.noHighlightCSS)return;const t=[...document.querySelectorAll("\n pre:not(.idl):not(.cddl):not(.nohighlight) > code:not(.nohighlight),\n pre:not(.idl):not(.cddl):not(.nohighlight),\n code.highlight\n ")].filter((e=>"pre"!==e.localName||!e.querySelector("code")));if(!t.length)return;const n=t.filter((e=>e.textContent.trim())).map(yi);document.head.appendChild(pt`<style>
354
+ ${gi}
355
+ </style>`),await Promise.all(n)}});const wi=Ct({en:{missing_test_suite_uri:Qt`Found tests in your spec, but missing ${"[testSuiteURI]"} in your ReSpec config.`,tests:"tests",test:"test"},ja:{missing_test_suite_uri:Qt`この仕様内にテストの項目を検出しましたが,ReSpec の設定に ${"[testSuiteURI]"} が見つかりません.`,tests:"テスト",test:"テスト"},de:{missing_test_suite_uri:Qt`Die Spezifikation enthält Tests, aber in der ReSpec-Konfiguration ist keine ${"[testSuiteURI]"} angegeben.`,tests:"Tests",test:"Test"},zh:{missing_test_suite_uri:Qt`本规范中包含测试,但在 ReSpec 配置中缺少 ${"[testSuiteURI]"}。`,tests:"测试",test:"测试"}}),ki="core/data-tests";function xi(e){const t=[],[n]=new URL(e).pathname.split("/").reverse(),r=n.split(".");let[o]=r;if(r.find((e=>"https"===e))){const e=document.createElement("span");e.textContent="🔒",e.setAttribute("aria-label","requires a secure connection"),e.setAttribute("title","Test requires HTTPS"),o=o.replace(".https",""),t.push(e)}if(o.split(".").join("-").split("-").find((e=>"manual"===e))){const e=document.createElement("span");e.textContent="💪",e.setAttribute("aria-label","the test must be run manually"),e.setAttribute("title","Manual test"),o=o.replace("-manual",""),t.push(e)}return pt`
333
356
  <li>
334
357
  <a href="${e}">${o}</a>
335
358
  ${t}
336
359
  </li>
337
- `}function ii(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{Mt(Wt`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,oi,{elements:[n]})}})).filter((e=>e))}function ai(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=Wt`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=Wt`To fix, remove duplicates from ${"[data-tests]"}: ${function(e,{quotes:t}={quotes:!1}){return kt(e,t?e=>Ht(Ut(e)):Ht)}(n,{quotes:!0})}.`;Mt(e,oi,{hint:r,elements:[t]})}}function li(e){const t=[...new Set(e)];return lt`
360
+ `}function $i(e,t,n){return e.map((e=>{try{return new URL(e,t).href}catch{Wt(Qt`Invalid URL in ${"[data-tests]"} attribute: ${e}.`,ki,{elements:[n]})}})).filter((e=>e))}function Si(e,t){const n=e.filter(((e,t,n)=>n.indexOf(e)!==t));if(n.length){const e=Qt`Duplicate tests found in the ${"[data-tests]"} attribute.`,r=Qt`To fix, remove duplicates from ${"[data-tests]"}: ${function(e,{quotes:t}={quotes:!1}){return Et(e,t?e=>Vt(Kt(e)):Vt)}(n,{quotes:!0})}.`;Wt(e,ki,{hint:r,elements:[t]})}}function _i(e){const t=[...new Set(e)];return pt`
338
361
  <details class="respec-tests-details removeOnSave">
339
362
  <summary>tests: ${t.length}</summary>
340
363
  <ul>
341
- ${t.map(si)}
364
+ ${t.map(xi)}
342
365
  </ul>
343
366
  </details>
344
- `}var ci=Object.freeze({__proto__:null,name:oi,run:function(e){const t=[...document.querySelectorAll("[data-tests]")].filter((e=>e.dataset.tests));if(t.length)if(e.testSuiteURI)for(const n of t){const t=ii(n.dataset.tests.split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n);ai(t,n);const r=li(t);n.append(r)}else Dt(ri.missing_test_suite_uri,oi)}});const ui="core/list-sorter";function di(e){const t="ascending"===e?1:-1;return({textContent:e},{textContent:n})=>t*e.trim().localeCompare(n.trim())}function pi(e,t){return[...e.querySelectorAll(":scope > li")].sort(di(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function hi(e,t){return[...e.querySelectorAll(":scope > dt")].sort(di(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,o=document.createDocumentFragment();let{nextSibling:s}=t;for(;s&&s.nextSibling;){o.appendChild(s.cloneNode(!0));const{nodeType:e,nodeName:t}=s.nextSibling;if(e===n&&t===r)break;s=s.nextSibling}return o.prepend(t.cloneNode(!0)),e.appendChild(o),e}),document.createDocumentFragment())}var fi=Object.freeze({__proto__:null,name:ui,run:function(){const e=document.querySelectorAll("[data-sort]");for(const t of e){let e;const n=t.dataset.sort||"ascending";switch(t.localName){case"dl":e=hi(t,n);break;case"ol":case"ul":e=pi(t,n);break;default:Mt(`ReSpec can't sort ${t.localName} elements.`,ui,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:hi,sortListItems:pi});var mi=String.raw`var:hover{text-decoration:underline;cursor:pointer}
367
+ `}var Ei=Object.freeze({__proto__:null,name:ki,run:function(e){const t=[...document.querySelectorAll("[data-tests]")].filter((e=>e.dataset.tests));if(t.length)if(e.testSuiteURI)for(const n of t){const t=$i((n.dataset.tests??"").split(/,/gm).map((e=>e.trim())),e.testSuiteURI,n).filter((e=>void 0!==e));Si(t,n);const r=_i(t);n.append(r)}else Ft(wi.missing_test_suite_uri,ki)}});const Li="core/list-sorter";function Ci(e){const t="ascending"===e?1:-1;return(e,n)=>{const r=e.textContent??"",o=n.textContent??"";return t*r.trim().localeCompare(o.trim())}}function Ri(e,t){return[...e.querySelectorAll(":scope > li")].sort(Ci(t)).reduce(((e,t)=>(e.appendChild(t),e)),document.createDocumentFragment())}function Ai(e,t){return[...e.querySelectorAll(":scope > dt")].sort(Ci(t)).reduce(((e,t)=>{const{nodeType:n,nodeName:r}=t,o=document.createDocumentFragment();let{nextSibling:s}=t;for(;s&&s.nextSibling;){o.appendChild(s.cloneNode(!0));const{nodeType:e,nodeName:t}=s.nextSibling;if(e===n&&t===r)break;s=s.nextSibling}return o.prepend(t.cloneNode(!0)),e.appendChild(o),e}),document.createDocumentFragment())}var Ti=Object.freeze({__proto__:null,name:Li,run:function(){const e=document.querySelectorAll("[data-sort]");for(const t of e){let e;const n=t.dataset.sort||"ascending";switch(t.localName){case"dl":e=Ai(t,n);break;case"ol":case"ul":e=Ri(t,n);break;default:Wt(`ReSpec can't sort ${t.localName} elements.`,Li,{elements:[t]})}if(e){const n=document.createRange();n.selectNodeContents(t),n.deleteContents(),t.appendChild(e)}}},sortDefinitionTerms:Ai,sortListItems:Ri});var Ni=String.raw`var:hover{text-decoration:underline;cursor:pointer}
345
368
  var.respec-hl{color:var(--color,#000);background-color:var(--bg-color);box-shadow:0 0 0 2px var(--bg-color)}
346
369
  @media (prefers-color-scheme:dark){
347
370
  var.respec-hl{filter:saturate(.9) brightness(.9)}
@@ -355,11 +378,7 @@ var.respec-hl-c6{--bg-color:#82ddff}
355
378
  var.respec-hl-c7{--bg-color:#ffbcf2}
356
379
  @media print{
357
380
  var.respec-hl{background:0 0;color:#000;box-shadow:unset}
358
- }`;var gi=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=mi,document.head.appendChild(t);const n=document.createElement("script");n.id="respec-highlight-vars",n.textContent=await async function(){try{return(await Promise.resolve().then((function(){return na}))).default}catch{return Zs("./src/core/highlight-vars.runtime.js")}}(),document.body.append(n),Kt("beforesave",(e=>{e.querySelectorAll("var.respec-hl").forEach((e=>{const t=[...e.classList.values()].filter((e=>e.startsWith("respec-hl")));e.classList.remove(...t),e.classList.length||e.removeAttribute("class")}))}))}});var bi=String.raw`:root{--assertion-border:#aaa;--assertion-bg:#eee;--assertion-text:black}
359
- .assert{border-left:.5em solid #aaa;padding:.3em;border-color:#aaa;border-color:var(--assertion-border);background:#eee;background:var(--assertion-bg);color:#000;color:var(--assertion-text)}
360
- @media (prefers-color-scheme:dark){
361
- :root{--assertion-border:#444;--assertion-bg:var(--borderedblock-bg);--assertion-text:var(--text)}
362
- }`;var yi=Object.freeze({__proto__:null,name:"core/algorithms",run:function(){const e=Array.from(document.querySelectorAll("ol.algorithm li")).filter((e=>e.textContent.trim().startsWith("Assert: ")));if(!e.length)return;for(const t of e){t.classList.add("assert");const e=t.firstChild;e instanceof Text&&e.textContent.startsWith("Assert: ")&&(e.textContent=e.textContent.replace("Assert: ",""),t.prepend(lt`<a href="https://infra.spec.whatwg.org/#assert">Assert</a>`,": "))}const t=document.createElement("style");t.textContent=bi,document.head.appendChild(t)}});const vi="core/anchor-expander";function wi(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void Dt(`Found matching element "${t}", but it has no title or marker.`,vi,{title:"Missing title.",elements:[n]})}const o=jt(r);n.append(...o.childNodes),n.classList.add("box-ref")}function ki(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void Dt(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,vi,{title:"Missing figcaption in referenced figure.",elements:[n]})}const o=[...jt(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...o),n.classList.add("fig-ref");const s=r.querySelector(".fig-title");!n.hasAttribute("title")&&s&&(n.title=xt(s.textContent))}function xi(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void Dt(`Found matching table "${t}", but table is lacking a \`<caption>\`.`,vi,{title:"Missing caption in referenced table.",elements:[n]})}const o=[...jt(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...o),n.classList.add("table-ref");const s=r.querySelector(".table-title");!n.hasAttribute("title")&&s&&(n.title=xt(s.textContent))}function $i(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)_i(r,n),Si(r,n);else{n.textContent=n.getAttribute("href");Dt("Found matching section, but the section was lacking a heading element.",vi,{title:`No matching id in document: "${t}".`,elements:[n]})}}function _i(e,t){const n=e.querySelector(".self-link"),r=[...jt(e).childNodes].filter((e=>!e.classList||!e.classList.contains("self-link")));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref"),t.lastChild.nodeType===Node.TEXT_NODE&&(t.lastChild.textContent=t.lastChild.textContent.trimEnd()),t.querySelectorAll("a").forEach((e=>{const t=Lt(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function Si(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const o=t.closest(`[${n}]`);o&&o.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n))}}var Ei=Object.freeze({__proto__:null,name:vi,run:function(){const e=[...document.querySelectorAll("a[href^='#']:not(.self-link):not([href$='the-empty-string'])")].filter((e=>""===e.textContent.trim()));for(const t of e){const e=t.getAttribute("href").slice(1),n=document.getElementById(e);if(n){switch(n.localName){case"h6":case"h5":case"h4":case"h3":case"h2":_i(n,t);break;case"section":$i(n,e,t);break;case"figure":ki(n,e,t);break;case"table":xi(n,e,t);break;case"aside":case"div":wi(n,e,t);break;default:t.textContent=t.getAttribute("href");Dt("ReSpec doesn't support expanding this kind of reference.",vi,{title:`Can't expand "#${e}".`,elements:[t]})}Si(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");Dt(`Couldn't expand inline reference. The id "${e}" is not in the document.`,vi,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var Ci=String.raw`dfn{cursor:pointer}
381
+ }`;var Pi=Object.freeze({__proto__:null,name:"core/highlight-vars",run:async function(e){if(!e.highlightVars)return;const t=document.createElement("style");t.textContent=Ni,document.head.appendChild(t);const n=document.createElement("script");n.id="respec-highlight-vars",n.textContent=await async function(){try{return(await Promise.resolve().then((function(){return ka}))).default}catch{return sn("./src/core/highlight-vars.runtime.js")}}(),document.body.append(n),en("beforesave",(e=>{e.querySelectorAll("var.respec-hl").forEach((e=>{const t=[...e.classList.values()].filter((e=>e.startsWith("respec-hl")));e.classList.remove(...t),e.classList.length||e.removeAttribute("class")}))}))}});const ji="core/anchor-expander";function Oi(e,t,n){const r=e.querySelector(".marker .self-link");if(!r){n.textContent=n.getAttribute("href");return void Ft(`Found matching element "${t}", but it has no title or marker.`,ji,{title:"Missing title.",elements:[n]})}const o=Mt(r);n.append(...o.childNodes),n.classList.add("box-ref")}function Ii(e,t,n){const r=e.querySelector("figcaption");if(!r){n.textContent=n.getAttribute("href");return void Ft(`Found matching figure "${t}", but figure is lacking a \`<figcaption>\`.`,ji,{title:"Missing figcaption in referenced figure.",elements:[n]})}const o=[...Mt(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("figno"),e)));n.append(...o),n.classList.add("fig-ref");const s=r.querySelector(".fig-title");!n.hasAttribute("title")&&s&&(n.title=Lt(s.textContent))}function zi(e,t,n){if(!e.classList.contains("numbered"))return;const r=e.querySelector("caption");if(!r){n.textContent=n.getAttribute("href");return void Ft(`Found matching table "${t}", but table is lacking a \`<caption>\`.`,ji,{title:"Missing caption in referenced table.",elements:[n]})}const o=[...Mt(r.querySelector(".self-link")).childNodes].map((e=>(e.classList?.remove("tableno"),e)));n.append(...o),n.classList.add("table-ref");const s=r.querySelector(".table-title");!n.hasAttribute("title")&&s&&(n.title=Lt(s.textContent))}function Di(e,t,n){const r=e.querySelector("h6, h5, h4, h3, h2");if(r)Mi(r,n),qi(r,n);else{n.textContent=n.getAttribute("href");Ft("Found matching section, but the section was lacking a heading element.",ji,{title:`No matching id in document: "${t}".`,elements:[n]})}}function Mi(e,t){const n=e.querySelector(".self-link"),r=[...Mt(e).childNodes].filter((e=>!e.classList||!e.classList.contains("self-link")));t.append(...r),n&&t.prepend("§ "),t.classList.add("sec-ref"),t.lastChild&&t.lastChild.nodeType===Node.TEXT_NODE&&(t.lastChild.textContent=(t.lastChild.textContent??"").trimEnd()),t.querySelectorAll("a").forEach((e=>{const t=jt(e,"span");for(const e of[...t.attributes])t.removeAttributeNode(e)}))}function qi(e,t){for(const n of["dir","lang"]){if(t.hasAttribute(n))continue;const r=e.closest(`[${n}]`);if(!r)continue;const o=t.closest(`[${n}]`);o&&o.getAttribute(n)===r.getAttribute(n)||t.setAttribute(n,r.getAttribute(n)??"")}}var Bi=Object.freeze({__proto__:null,name:ji,run:function(){const e=[...document.querySelectorAll("a[href^='#']:not(.self-link):not([href$='the-empty-string'])")].filter((e=>""===e.textContent.trim()));for(const t of e){const e=(t.getAttribute("href")??"").slice(1),n=document.getElementById(e);if(n){switch(n.localName){case"h6":case"h5":case"h4":case"h3":case"h2":Mi(n,t);break;case"section":Di(n,e,t);break;case"figure":Ii(n,e,t);break;case"table":zi(n,e,t);break;case"aside":case"div":Oi(n,e,t);break;case"dfn":{const e=Mt(n);t.append(...e.childNodes),t.classList.add("dfn-ref");break}default:t.textContent=t.getAttribute("href");Ft("ReSpec doesn't support expanding this kind of reference.",ji,{title:`Can't expand "#${e}".`,elements:[t]})}qi(n,t),t.normalize()}else{t.textContent=t.getAttribute("href");Ft(`Couldn't expand inline reference. The id "${e}" is not in the document.`,ji,{title:`No matching id in document: ${e}.`,elements:[t]})}}}});var Hi=String.raw`dfn{cursor:pointer}
363
382
  .dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font-family:"Helvetica Neue",sans-serif;font-size:small;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px}
364
383
  .dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
365
384
  .dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;border-bottom-color:var(--indextable-hover-bg,#fff);top:0}
@@ -372,11 +391,12 @@ var.respec-hl{background:0 0;color:#000;box-shadow:unset}
372
391
  .dfn-panel .marker{padding:.1em;margin-left:.5em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;color:#040b1c}
373
392
  .dfn-panel .marker.dfn-exported{background:#d1edfd;box-shadow:0 0 0 .125em #1ca5f940}
374
393
  .dfn-panel .marker.idl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161}
394
+ .dfn-panel .marker.cddl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161}
375
395
  .dfn-panel a:not(:hover){text-decoration:none!important;border-bottom:none!important}
376
396
  .dfn-panel a[href]:hover{border-bottom-width:1px}
377
397
  .dfn-panel ul{padding:0}
378
398
  .dfn-panel li{margin-left:1em}
379
- .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}`;function Li(e){const{id:t}=e,n=e.dataset.href||`#${t}`,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),o=`dfn-panel-for-${e.id}`,s=e.getAttribute("aria-label")||xt(e.textContent),i=lt`
399
+ .dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}`;function Ui(e){const{id:t}=e,n=e.dataset.href||`#${t}`,r=document.querySelectorAll(`a[href="${n}"]:not(.index-term)`),o=`dfn-panel-for-${e.id}`,s=e.getAttribute("aria-label")||Lt(e.textContent),i=pt`
380
400
  <div
381
401
  class="dfn-panel"
382
402
  id="${o}"
@@ -393,28 +413,34 @@ var.respec-hl{background:0 0;color:#000;box-shadow:unset}
393
413
  aria-label="Permalink for definition: ${s}. Activate to close this dialog."
394
414
  >Permalink</a
395
415
  >
396
- ${function(e){return e.matches("dfn[data-export]")?lt`<span
416
+ ${function(e){return e.matches("dfn[data-export]")?pt`<span
397
417
  class="marker dfn-exported"
398
418
  title="Definition can be referenced by other specifications"
399
419
  >exported</span
400
- >`:null}(e)} ${function(e,t){if(!e.hasAttribute("data-idl"))return null;for(const n of t){if(n.dataset.linkType!==e.dataset.dfnType)continue;const t=n.closest("pre.idl");if(t&&t.id){const e=`#${t.id}`;return lt`<a
420
+ >`:null}(e)} ${function(e,t){if(!e.hasAttribute("data-idl"))return null;for(const n of t){if(n.dataset.linkType!==e.dataset.dfnType)continue;const t=n.closest("pre.idl");if(t&&t.id){const e=`#${t.id}`;return pt`<a
401
421
  href="${e}"
402
422
  class="marker idl-block"
403
423
  title="Jump to IDL declaration"
404
424
  >IDL</a
405
425
  >`}}return null}(e,r)}
426
+ ${function(e,t){const{dfnType:n}=e.dataset;if(!n?.startsWith("cddl-"))return null;const r=[...t].map((e=>e.closest("pre.cddl"))).find((e=>e?.id));return r?pt`<a
427
+ href="#${r.id}"
428
+ class="marker cddl-block"
429
+ title="Jump to CDDL declaration"
430
+ >CDDL</a
431
+ >`:null}(e,r)}
406
432
  </div>
407
433
  <p><b>Referenced in:</b></p>
408
- ${function(e,t){if(!t.length)return lt`<ul>
434
+ ${function(e,t){if(!t.length)return pt`<ul>
409
435
  <li>Not referenced in this document.</li>
410
- </ul>`;const n=new Map;t.forEach(((t,r)=>{const o=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=o);const s=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?`§ ${xt(n.textContent)}`:null}(t);(n.get(s)||n.set(s,[]).get(s)).push(o)}));const r=([e,t])=>[{title:e,id:t[0],text:e}].concat(t.slice(1).map(((e,t)=>({title:`Reference ${t+2}`,text:`(${t+2})`,id:e})))),o=e=>lt`<li>
411
- ${r(e).map((e=>lt`<a href="#${e.id}" title="${e.title}">${e.text}</a
436
+ </ul>`;const n=new Map;t.forEach(((t,r)=>{const o=t.id||`ref-for-${e}-${r+1}`;t.id||(t.id=o);const s=function(e){const t=e.closest("section");if(!t)return null;const n=t.querySelector("h1, h2, h3, h4, h5, h6");return n?`§ ${Lt(n.textContent)}`:null}(t)??"";(n.get(s)??n.set(s,[]).get(s)??[]).push(o)}));const r=([e,t])=>[{title:e,id:t[0],text:e}].concat(t.slice(1).map(((e,t)=>({title:`Reference ${t+2}`,text:`(${t+2})`,id:e})))),o=e=>pt`<li>
437
+ ${r(e).map((e=>pt`<a href="#${e.id}" title="${e.title}">${e.text}</a
412
438
  >${" "}`))}
413
- </li>`;return lt`<ul>
439
+ </li>`;return pt`<ul>
414
440
  ${[...n].map(o)}
415
441
  </ul>`}(t,r)}
416
442
  </div>
417
- `;return i}var Ai=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(lt`<style>
418
- ${Ci}
419
- </style>`,document.querySelector("link"));const e=document.querySelectorAll("dfn[id]:not([data-cite]), #index-defined-elsewhere .index-term"),t=document.createDocumentFragment();for(const n of e)t.append(Li(n)),n.tabIndex=0,n.setAttribute("aria-haspopup","dialog");document.body.querySelector("script")?document.body.querySelector("script").before(t):document.body.append(t);const n=document.createElement("script");n.id="respec-dfn-panel",n.textContent=await async function(){try{return(await Promise.resolve().then((function(){return ra}))).default}catch{return Zs("./src/core/dfn-panel.runtime.js")}}(),document.body.append(n)}});var Ri=Object.freeze({__proto__:null,name:"core/dfn-contract",run:function(){!function(){const e=document.querySelectorAll("dfn:is([data-dfn-type=''],:not([data-dfn-type]))");for(const t of e)t.dataset.dfnType="dfn";const t=document.querySelectorAll("dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])");for(const e of t)e.dataset.export=""}(),function(){const e=document.querySelectorAll("dl.definitions dt:has(dfn[data-dfn-type])");for(const t of e){const e=t.querySelector("dfn[data-dfn-type]").id,n=t.nextElementSibling;n&&!n.dataset.defines&&e&&(n.dataset.defines=`#${e}`)}const t=document.querySelectorAll(".definition:has(dfn[data-dfn-type])");for(const e of t){const t=e.querySelector("dfn[data-dfn-type]");t.id&&!e.dataset.defines&&(e.dataset.defines=`#${t.id}`)}}()}});const Ti="core/linter-rules/check-charset",Pi=$t({en:{msg:"Document must only contain one `<meta>` tag with charset set to 'utf-8'",hint:'Add this line in your document `<head>` section - `<meta charset="utf-8">` or set charset to "utf-8" if not set already.'},zh:{msg:"文档只能包含一个 charset 属性为 utf-8 的 `<meta>` 标签",hint:'将此行添加到文档的 `<head>` 部分—— `<meta charset="utf-8">` 或将 charset 设置为 utf-8(如果尚未设置)。'},cs:{msg:"Dokument smí obsahovat pouze jeden tag `<meta>` s charset nastaveným na 'utf-8'",hint:'Přidejte tento řádek do sekce `<head>` vašeho dokumentu - `<meta charset="utf-8">` nebo nastavte charset na "utf-8", pokud ještě není nastaven.'}});var Ni=Object.freeze({__proto__:null,name:Ti,run:function(e){if(!e.lint?.["check-charset"])return;const t=document.querySelectorAll("meta[charset]"),n=[];for(const e of t)n.push(e.getAttribute("charset").trim().toLowerCase());n.includes("utf-8")&&1===t.length||Mt(Pi.msg,Ti,{hint:Pi.hint,elements:[...t]})}});const ji="core/linter-rules/check-punctuation",Ii=[".",":","!","?"],Oi=Ii.map((e=>`"${e}"`)).join(", "),zi=$t({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${Oi}.`},cs:{msg:"Elementy `p` by měly končit interpunkčním znaménkem.",hint:`Ujistěte se, že elementy \`p\` končí jedním z těchto znaků: ${Oi}.`}});var qi=Object.freeze({__proto__:null,name:ji,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${Ii.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&Mt(zi.msg,ji,{hint:zi.hint,elements:n})}});const Di="core/linter-rules/local-refs-exist",Mi=$t({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."},cs:{msg:"V dokumentu byla nalezena nefunkční lokální reference.",hint:"Opravte prosím uvedené odkazy."}});function Bi(e){const t=e.getAttribute("href").substring(1),n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var Hi=Object.freeze({__proto__:null,name:Di,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(Bi);t.length&&Mt(Mi.msg,Di,{hint:Mi.hint,elements:t})}});const Fi="core/linter-rules/no-headingless-sections",Ui=$t({en:{msg:"All sections must start with a `h2-6` element.",hint:"Add a `h2-6` to the offending section or use a `<div>`."},nl:{msg:"Alle secties moeten beginnen met een `h2-6` element.",hint:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `<div>`."},zh:{msg:"所有章节(section)都必须以 `h2-6` 元素开头。",hint:"将 `h2-6` 添加到有问题的章节或使用 `<div>`。"},cs:{msg:"Všechny sekce musí začínat elementem `h2-6`.",hint:"Přidejte do problematické sekce `h2-6` nebo použijte `<div>`."}});var Wi=Object.freeze({__proto__:null,name:Fi,run:function(e){if(!e.lint?.["no-headingless-sections"])return;const t=[...document.querySelectorAll("section:not(.head,#abstract,#sotd)")].filter((({firstElementChild:e})=>!e||!(e.matches(".header-wrapper")||e instanceof HTMLHeadingElement)));t.length&&Mt(Ui.msg,Fi,{hint:Ui.hint,elements:t})}});const Gi="core/linter-rules/no-unused-vars",Vi=$t({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."},cs:{msg:"Proměnná byla definována, ale nikdy nebyla použita.",hint:"Přidejte atribut `data-ignore-unused` k elementu `<var>`."}});var Zi=Object.freeze({__proto__:null,name:Gi,run:function(e){if(!e.lint?.["no-unused-vars"])return;const t=[],n=e=>!!e.querySelector(":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm");for(const e of document.querySelectorAll("section")){if(!n(e))continue;const r=e.querySelectorAll(":scope > :not(section) var");if(!r.length)continue;const o=new Map;for(const e of r){const t=xt(e.textContent);(o.get(t)||o.set(t,[]).get(t)).push(e)}for(const e of o.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&Mt(Vi.msg,Gi,{hint:Vi.hint,elements:t})}});const Ki="core/linter-rules/privsec-section",Qi=$t({en:{msg:"Document must have a 'Privacy and/or Security' Considerations section.",hint:"Add a privacy and/or security considerations section. See the [Self-Review Questionnaire](https://w3ctag.github.io/security-questionnaire/)."},cs:{msg:"Dokument musí obsahovat sekci 'Zásady ochrany soukromí a/nebo bezpečnosti'.",hint:"Přidejte sekci o zásadách ochrany soukromí a/nebo bezpečnosti. Viz [Dotazník pro sebehodnocení](https://w3ctag.github.io/security-questionnaire/)."}});var Ji=Object.freeze({__proto__:null,name:Ki,run:function(e){var t;e.lint?.["privsec-section"]&&e.isRecTrack&&(t=document,!Array.from(t.querySelectorAll("h2, h3, h4, h5, h6")).some((({textContent:e})=>{const t=/(privacy|security)/im.test(e),n=/(considerations)/im.test(e);return t&&n||t})))&&Mt(Qi.msg,Ki,{hint:Qi.hint})}});const Xi="core/linter-rules/no-http-props",Yi=$t({en:{msg:Wt`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:Wt`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"},cs:{msg:Wt`V ${"[respecConfig]"} nejsou povoleny nezabezpečené URL adresy.`,hint:"Změňte prosím následující vlastnosti na 'https://': "}});var ea=Object.freeze({__proto__:null,name:Xi,run:function(e){if(!e.lint?.["no-http-props"])return;if(!parent.location.href.startsWith("http"))return;const t=Object.getOwnPropertyNames(e).filter((t=>t.endsWith("URI")&&e[t]||"prevED"===t)).filter((t=>new URL(e[t],parent.location.href).href.startsWith("http://")));if(t.length){const e=kt(t,(e=>Wt`${`[${e}]`}`));Mt(Yi.msg,Xi,{hint:Yi.hint+e})}}}),ta=Object.freeze({__proto__:null,default:'// ReSpec Worker v1.0.0\n"use strict";\n// hljs is either inlined by core/worker.js (preferred) or loaded below via\n// importScripts as a fallback when the inline fetch was not possible.\nif (typeof self.hljs === "undefined" && self.RESPEC_HIGHLIGHT_URL) {\n try {\n importScripts(self.RESPEC_HIGHLIGHT_URL);\n } catch (err) {\n console.error("Network error loading highlighter", err);\n }\n}\n\nself.addEventListener("message", ({ data: originalData }) => {\n const data = Object.assign({}, originalData);\n switch (data.action) {\n case "highlight-load-lang": {\n const { langURL, propName, lang } = data;\n importScripts(langURL);\n self.hljs.registerLanguage(lang, self[propName]);\n break;\n }\n case "highlight": {\n const { code } = data;\n const langs = data.languages.length ? data.languages : undefined;\n try {\n const { value, language } = self.hljs.highlightAuto(code, langs);\n Object.assign(data, { value, language });\n } catch (err) {\n console.error("Could not transform some code?", err);\n // Post back the original code\n Object.assign(data, { value: code, language: "" });\n }\n break;\n }\n }\n self.postMessage(data);\n});\n'}),na=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\n\nif (document.respec) {\n document.respec.ready.then(setupVarHighlighter);\n} else {\n setupVarHighlighter();\n}\n\nfunction setupVarHighlighter() {\n document\n .querySelectorAll("var")\n .forEach(varElem => varElem.addEventListener("click", highlightListener));\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\n/**\n * Same as `norm` from src/core/utils, but our build process doesn\'t allow\n * imports in runtime scripts, so duplicated here.\n * @param {string} str\n */\nfunction norm(str) {\n return str.trim().replace(/\\s+/g, " ");\n}\n})()'}),ra=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\nif (document.respec) {\n document.respec.ready.then(setupPanel);\n} else {\n setupPanel();\n}\n\nfunction setupPanel() {\n const listener = panelListener();\n document.body.addEventListener("keydown", listener);\n document.body.addEventListener("click", listener);\n}\n\nfunction panelListener() {\n /** @type {HTMLElement} */\n let panel = null;\n return event => {\n const { target, type } = event;\n\n if (!(target instanceof HTMLElement)) return;\n\n // For keys, we only care about Enter key to activate the panel\n // otherwise it\'s activated via a click.\n if (type === "keydown" && event.key !== "Enter") return;\n\n const action = deriveAction(event);\n\n switch (action) {\n case "show": {\n hidePanel(panel);\n /** @type {HTMLElement} */\n const dfn = target.closest("dfn, .index-term");\n panel = document.getElementById(`dfn-panel-for-${dfn.id}`);\n const coords = deriveCoordinates(event);\n displayPanel(dfn, panel, coords);\n break;\n }\n case "dock": {\n panel.style.left = null;\n panel.style.top = null;\n panel.classList.add("docked");\n break;\n }\n case "hide": {\n hidePanel(panel);\n panel = null;\n break;\n }\n }\n };\n}\n\n/**\n * @param {MouseEvent|KeyboardEvent} event\n */\nfunction deriveCoordinates(event) {\n const target = /** @type HTMLElement */ (event.target);\n\n // We prevent synthetic AT clicks from putting\n // the dialog in a weird place. The AT events sometimes\n // lack coordinates, so they have clientX/Y = 0\n const rect = target.getBoundingClientRect();\n if (\n event instanceof MouseEvent &&\n event.clientX >= rect.left &&\n event.clientY >= rect.top\n ) {\n // The event probably happened inside the bounding rect...\n return { x: event.clientX, y: event.clientY };\n }\n\n // Offset to the middle of the element\n const x = rect.x + rect.width / 2;\n // Placed at the bottom of the element\n const y = rect.y + rect.height;\n return { x, y };\n}\n\n/**\n * @param {Event} event\n */\nfunction deriveAction(event) {\n const target = /** @type {HTMLElement} */ (event.target);\n const hitALink = !!target.closest("a");\n if (target.closest("dfn:not([data-cite]), .index-term")) {\n return hitALink ? "none" : "show";\n }\n if (target.closest(".dfn-panel")) {\n if (hitALink) {\n return target.classList.contains("self-link") ? "hide" : "dock";\n }\n const panel = target.closest(".dfn-panel");\n return panel.classList.contains("docked") ? "hide" : "none";\n }\n if (document.querySelector(".dfn-panel:not([hidden])")) {\n return "hide";\n }\n return "none";\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {HTMLElement} panel\n * @param {{ x: number, y: number }} clickPosition\n */\nfunction displayPanel(dfn, panel, { x, y }) {\n panel.hidden = false;\n // distance (px) between edge of panel and the pointing triangle (caret)\n const MARGIN = 20;\n\n const dfnRects = dfn.getClientRects();\n // Find the `top` offset when the `dfn` can be spread across multiple lines\n let closestTop = 0;\n let minDiff = Infinity;\n for (const rect of dfnRects) {\n const { top, bottom } = rect;\n const diffFromClickY = Math.abs((top + bottom) / 2 - y);\n if (diffFromClickY < minDiff) {\n minDiff = diffFromClickY;\n closestTop = top;\n }\n }\n\n const top = window.scrollY + closestTop + dfnRects[0].height;\n const left = x - MARGIN;\n panel.style.left = `${left}px`;\n panel.style.top = `${top}px`;\n\n // Find if the panel is flowing out of the window\n const panelRect = panel.getBoundingClientRect();\n const SCREEN_WIDTH = Math.min(window.innerWidth, window.screen.width);\n if (panelRect.right > SCREEN_WIDTH) {\n const newLeft = Math.max(MARGIN, x + MARGIN - panelRect.width);\n const newCaretOffset = left - newLeft;\n panel.style.left = `${newLeft}px`;\n /** @type {HTMLElement} */\n const caret = panel.querySelector(".caret");\n caret.style.left = `${newCaretOffset}px`;\n }\n\n // As it\'s a dialog, we trap focus.\n // TODO: when <dialog> becomes a implemented, we should really\n // use that.\n trapFocus(panel, dfn);\n}\n\n/**\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction trapFocus(panel, dfn) {\n /** @type NodeListOf<HTMLAnchorElement> elements */\n const anchors = panel.querySelectorAll("a[href]");\n // No need to trap focus\n if (!anchors.length) return;\n\n // Move focus to first anchor element\n const first = anchors.item(0);\n first.focus();\n\n const trapListener = createTrapListener(anchors, panel, dfn);\n panel.addEventListener("keydown", trapListener);\n\n // Hiding the panel releases the trap\n const mo = new MutationObserver(records => {\n const [record] = records;\n const target = /** @type HTMLElement */ (record.target);\n if (target.hidden) {\n panel.removeEventListener("keydown", trapListener);\n mo.disconnect();\n }\n });\n mo.observe(panel, { attributes: true, attributeFilter: ["hidden"] });\n}\n\n/**\n *\n * @param {NodeListOf<HTMLAnchorElement>} anchors\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction createTrapListener(anchors, panel, dfn) {\n const lastIndex = anchors.length - 1;\n let currentIndex = 0;\n return event => {\n switch (event.key) {\n // Hitting "Tab" traps us in a nice loop around elements.\n case "Tab": {\n event.preventDefault();\n currentIndex += event.shiftKey ? -1 : +1;\n if (currentIndex < 0) {\n currentIndex = lastIndex;\n } else if (currentIndex > lastIndex) {\n currentIndex = 0;\n }\n anchors.item(currentIndex).focus();\n break;\n }\n\n // Hitting "Enter" on an anchor releases the trap.\n case "Enter":\n hidePanel(panel);\n break;\n\n // Hitting "Escape" returns focus to dfn.\n case "Escape":\n hidePanel(panel);\n dfn.focus();\n return;\n }\n };\n}\n\n/** @param {HTMLElement} panel */\nfunction hidePanel(panel) {\n if (!panel) return;\n panel.hidden = true;\n panel.classList.remove("docked");\n}\n})()'})}();
443
+ `;return i}var Fi=Object.freeze({__proto__:null,name:"core/dfn-panel",run:async function(){document.head.insertBefore(pt`<style>
444
+ ${Hi}
445
+ </style>`,document.querySelector("link"));const e=document.querySelectorAll("dfn[id]:not([data-cite]), #index-defined-elsewhere .index-term"),t=document.createDocumentFragment();for(const n of e)t.append(Ui(n)),n.tabIndex=0,n.setAttribute("aria-haspopup","dialog");const n=document.body.querySelector("script");n?n.before(t):document.body.append(t);const r=document.createElement("script");r.id="respec-dfn-panel",r.textContent=await async function(){try{return(await Promise.resolve().then((function(){return xa}))).default}catch{return sn("./src/core/dfn-panel.runtime.js")}}(),document.body.append(r)}});var Wi=Object.freeze({__proto__:null,name:"core/dfn-contract",run:function(){!function(){const e=document.querySelectorAll("dfn:is([data-dfn-type=''],:not([data-dfn-type]))");for(const t of e)t.dataset.dfnType="dfn";const t=document.querySelectorAll("dfn:not([data-noexport], [data-export], [data-dfn-type='dfn'], [data-cite])");for(const e of t)e.dataset.export=""}(),function(){const e=document.querySelectorAll("dl.definitions dt:has(dfn[data-dfn-type])");for(const t of e){const e=t.querySelector("dfn[data-dfn-type]").id,n=t.nextElementSibling;n&&!n.dataset.defines&&e&&(n.dataset.defines=`#${e}`)}const t=document.querySelectorAll(".definition:has(dfn[data-dfn-type])");for(const e of t){const t=e.querySelector("dfn[data-dfn-type]");t.id&&!e.dataset.defines&&(e.dataset.defines=`#${t.id}`)}}()}});const Gi="core/linter-rules/check-charset",Vi=Ct({en:{msg:"Document must only contain one `<meta>` tag with charset set to 'utf-8'",hint:'Add this line in your document `<head>` section - `<meta charset="utf-8">` or set charset to "utf-8" if not set already.'},zh:{msg:"文档只能包含一个 charset 属性为 utf-8 的 `<meta>` 标签",hint:'将此行添加到文档的 `<head>` 部分—— `<meta charset="utf-8">` 或将 charset 设置为 utf-8(如果尚未设置)。'},cs:{msg:"Dokument smí obsahovat pouze jeden tag `<meta>` s charset nastaveným na 'utf-8'",hint:'Přidejte tento řádek do sekce `<head>` vašeho dokumentu - `<meta charset="utf-8">` nebo nastavte charset na "utf-8", pokud ještě není nastaven.'}});var Zi=Object.freeze({__proto__:null,name:Gi,run:function(e){if(!e.lint?.["check-charset"])return;const t=document.querySelectorAll("meta[charset]"),n=[];for(const e of t)n.push((e.getAttribute("charset")??"").trim().toLowerCase());n.includes("utf-8")&&1===t.length||Wt(Vi.msg,Gi,{hint:Vi.hint,elements:[...t]})}});const Ki="no-dfn-in-abstract",Qi=`core/linter-rules/${Ki}`,Ji=Ct({en:{msg:e=>`Definition \`${e}\` is in an unnumbered section (e.g. abstract or SotD).`,get hint(){return Qt`Definitions in unnumbered sections (abstract, SotD) are semantically out of place and appear in the terms index without a section number. Move this definition to a numbered section such as "Terminology". See ${"[export|#data-export]"}.`}}}),Xi=["section#abstract","section#sotd","section.introductory"].join(", ");var Yi=Object.freeze({__proto__:null,name:Qi,run:function(e){if(!e.lint?.[Ki])return;const t=[...document.querySelectorAll("dfn")].filter((e=>e.closest(Xi)));t.forEach((e=>{const t=Lt(e.textContent);Wt(Ji.msg(t),Qi,{hint:Ji.hint,elements:[e]})}))}});const ea="core/linter-rules/check-punctuation",ta=[".",":","!","?"],na=ta.map((e=>`"${e}"`)).join(", "),ra=Ct({en:{msg:"`p` elements should end with a punctuation mark.",hint:`Please make sure \`p\` elements end with one of: ${na}.`},cs:{msg:"Elementy `p` by měly končit interpunkčním znaménkem.",hint:`Ujistěte se, že elementy \`p\` končí jedním z těchto znaků: ${na}.`}});var oa=Object.freeze({__proto__:null,name:ea,run:function(e){if(!e.lint?.["check-punctuation"])return;const t=new RegExp(`[${ta.join("")}\\]]$|^ *$`,"m"),n=[...document.querySelectorAll("p:not(#back-to-top,#w3c-state)")].filter((e=>!t.test(e.textContent.trim())));n.length&&Wt(ra.msg,ea,{hint:ra.hint,elements:n})}});const sa="core/linter-rules/local-refs-exist",ia=Ct({en:{msg:"Broken local reference found in document.",hint:"Please fix the links mentioned."},cs:{msg:"V dokumentu byla nalezena nefunkční lokální reference.",hint:"Opravte prosím uvedené odkazy."}});function aa(e){const t=e.getAttribute("href")?.substring(1);if(!t)return;const n=e.ownerDocument;return!n.getElementById(t)&&!n.getElementsByName(t).length}var la=Object.freeze({__proto__:null,name:sa,run:function(e){if(!e.lint?.["local-refs-exist"])return;const t=[...document.querySelectorAll("a[href^='#']")].filter(aa);t.length&&Wt(ia.msg,sa,{hint:ia.hint,elements:t})}});const ca="core/linter-rules/no-headingless-sections",ua=Ct({en:{msg:"All sections must start with a `h2-6` element.",hint:"Add a `h2-6` to the offending section or use a `<div>`."},nl:{msg:"Alle secties moeten beginnen met een `h2-6` element.",hint:"Voeg een `h2-6` toe aan de conflicterende sectie of gebruik een `<div>`."},zh:{msg:"所有章节(section)都必须以 `h2-6` 元素开头。",hint:"将 `h2-6` 添加到有问题的章节或使用 `<div>`。"},cs:{msg:"Všechny sekce musí začínat elementem `h2-6`.",hint:"Přidejte do problematické sekce `h2-6` nebo použijte `<div>`."}});var da=Object.freeze({__proto__:null,name:ca,run:function(e){if(!e.lint?.["no-headingless-sections"])return;const t=[...document.querySelectorAll("section:not(.head,#abstract,#sotd)")].filter((({firstElementChild:e})=>!e||!(e.matches(".header-wrapper")||e instanceof HTMLHeadingElement)));t.length&&Wt(ua.msg,ca,{hint:ua.hint,elements:t})}});const pa="core/linter-rules/no-unused-vars",ha=Ct({en:{msg:"Variable was defined, but never used.",hint:"Add a `data-ignore-unused` attribute to the `<var>`."},cs:{msg:"Proměnná byla definována, ale nikdy nebyla použita.",hint:"Přidejte atribut `data-ignore-unused` k elementu `<var>`."}});var fa=Object.freeze({__proto__:null,name:pa,run:function(e){if(!e.lint?.["no-unused-vars"])return;const t=[],n=e=>!!e.querySelector(":scope > :not(section) ~ .algorithm, :scope > :not(section) .algorithm");for(const e of document.querySelectorAll("section")){if(!n(e))continue;const r=e.querySelectorAll(":scope > :not(section) var");if(!r.length)continue;const o=new Map;for(const e of r){const t=Lt(e.textContent),n=o.get(t)||o.set(t,[]).get(t);n?.push(e)}for(const e of o.values())1!==e.length||e[0].hasAttribute("data-ignore-unused")||t.push(e[0])}t.length&&Wt(ha.msg,pa,{hint:ha.hint,elements:t})}});const ma="core/linter-rules/privsec-section",ga=Ct({en:{msg:"Document must have a 'Privacy and/or Security' Considerations section.",hint:"Add a privacy and/or security considerations section. See the [Self-Review Questionnaire](https://w3ctag.github.io/security-questionnaire/)."},cs:{msg:"Dokument musí obsahovat sekci 'Zásady ochrany soukromí a/nebo bezpečnosti'.",hint:"Přidejte sekci o zásadách ochrany soukromí a/nebo bezpečnosti. Viz [Dotazník pro sebehodnocení](https://w3ctag.github.io/security-questionnaire/)."}});var ba=Object.freeze({__proto__:null,name:ma,run:function(e){var t;e.lint?.["privsec-section"]&&e.isRecTrack&&(t=document,!Array.from(t.querySelectorAll("h2, h3, h4, h5, h6")).some((({textContent:e})=>{const t=/(privacy|security)/im.test(e),n=/(considerations)/im.test(e);return t&&n||t})))&&Wt(ga.msg,ma,{hint:ga.hint})}});const ya="core/linter-rules/no-http-props",va=Ct({en:{msg:Qt`Insecure URLs are not allowed in ${"[respecConfig]"}.`,hint:"Please change the following properties to 'https://': "},zh:{msg:Qt`${"[respecConfig]"} 中不允许使用不安全的URL.`,hint:"请将以下属性更改为 https://:"},cs:{msg:Qt`V ${"[respecConfig]"} nejsou povoleny nezabezpečené URL adresy.`,hint:"Změňte prosím následující vlastnosti na 'https://': "}});var wa=Object.freeze({__proto__:null,name:ya,run:function(e){if(!e.lint?.["no-http-props"])return;if(!parent.location.href.startsWith("http"))return;const t=Object.getOwnPropertyNames(e).filter((t=>t.endsWith("URI")&&e[t]||"prevED"===t)).filter((t=>new URL(e[t],parent.location.href).href.startsWith("http://")));if(t.length){const e=Et(t,(e=>Qt`${`[${e}]`}`));Wt(va.msg,ya,{hint:va.hint+e})}}}),ka=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\n\nif (document.respec) {\n document.respec.ready.then(setupVarHighlighter);\n} else {\n setupVarHighlighter();\n}\n\nfunction setupVarHighlighter() {\n document\n .querySelectorAll("var")\n .forEach(varElem => varElem.addEventListener("click", highlightListener));\n}\n\n/**\n * @param {MouseEvent} ev\n */\nfunction highlightListener(ev) {\n ev.stopPropagation();\n const varElem = /** @type {HTMLElement} */ (ev.target);\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\n/**\n * @param {HTMLElement} target\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\n/**\n * @param {HTMLElement} varElem\n */\nfunction highlightVars(varElem) {\n const textContent = norm(varElem.textContent);\n const parent = /** @type {HTMLElement} */ (\n varElem.closest(".algorithm, section")\n );\n if (!parent) return [];\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\n/**\n * @param {HTMLElement} el\n * @param {string} highlightColor\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\n/**\n * @param {HTMLElement} elem\n * @param {string} highlightColor\n */\nfunction addHighlight(elem, highlightColor) {\n elem.classList.add("respec-hl", highlightColor);\n}\n\n/**\n * Same as `norm` from src/core/utils, but our build process doesn\'t allow\n * imports in runtime scripts, so duplicated here.\n * @param {string} str\n */\nfunction norm(str) {\n return str.trim().replace(/\\s+/g, " ");\n}\n})()'}),xa=Object.freeze({__proto__:null,default:'(() => {\n// @ts-check\nif (document.respec) {\n document.respec.ready.then(setupPanel);\n} else {\n setupPanel();\n}\n\nfunction setupPanel() {\n const listener = panelListener();\n document.body.addEventListener("keydown", listener);\n document.body.addEventListener("click", listener);\n}\n\nfunction panelListener() {\n /** @type {HTMLElement | null} */\n let panel = null;\n /**\n * @param {KeyboardEvent|MouseEvent} event\n */\n return event => {\n const { target, type } = event;\n\n if (!(target instanceof HTMLElement)) return;\n\n // For keys, we only care about Enter key to activate the panel\n // otherwise it\'s activated via a click.\n if (\n type === "keydown" &&\n /** @type {KeyboardEvent} */ (event).key !== "Enter"\n )\n return;\n\n const action = deriveAction(event);\n\n switch (action) {\n case "show": {\n hidePanel(panel);\n /** @type {HTMLElement | null} */\n const dfn = target.closest("dfn, .index-term");\n if (!dfn?.id) break;\n panel = document.getElementById(`dfn-panel-for-${dfn.id}`);\n if (!panel) break;\n const coords = deriveCoordinates(\n /** @type {MouseEvent|KeyboardEvent} */ (event)\n );\n displayPanel(dfn, panel, coords);\n break;\n }\n case "dock": {\n if (panel) {\n panel.style.left = "";\n panel.style.top = "";\n panel.classList.add("docked");\n }\n break;\n }\n case "hide": {\n hidePanel(panel);\n panel = null;\n break;\n }\n }\n };\n}\n\n/**\n * @param {MouseEvent|KeyboardEvent} event\n */\nfunction deriveCoordinates(event) {\n const target = /** @type HTMLElement */ (event.target);\n\n // We prevent synthetic AT clicks from putting\n // the dialog in a weird place. The AT events sometimes\n // lack coordinates, so they have clientX/Y = 0\n const rect = target.getBoundingClientRect();\n if (\n event instanceof MouseEvent &&\n event.clientX >= rect.left &&\n event.clientY >= rect.top\n ) {\n // The event probably happened inside the bounding rect...\n return { x: event.clientX, y: event.clientY };\n }\n\n // Offset to the middle of the element\n const x = rect.x + rect.width / 2;\n // Placed at the bottom of the element\n const y = rect.y + rect.height;\n return { x, y };\n}\n\n/**\n * @param {Event} event\n */\nfunction deriveAction(event) {\n const target = /** @type {HTMLElement} */ (event.target);\n const hitALink = !!target.closest("a");\n if (target.closest("dfn:not([data-cite]), .index-term")) {\n return hitALink ? "none" : "show";\n }\n if (target.closest(".dfn-panel")) {\n if (hitALink) {\n return target.classList.contains("self-link") ? "hide" : "dock";\n }\n\n const panel = /** @type {HTMLElement} */ (target.closest(".dfn-panel"));\n return panel.classList.contains("docked") ? "hide" : "none";\n }\n if (document.querySelector(".dfn-panel:not([hidden])")) {\n return "hide";\n }\n return "none";\n}\n\n/**\n * @param {HTMLElement} dfn\n * @param {HTMLElement} panel\n * @param {{ x: number, y: number }} clickPosition\n */\nfunction displayPanel(dfn, panel, { x, y }) {\n panel.hidden = false;\n // distance (px) between edge of panel and the pointing triangle (caret)\n const MARGIN = 20;\n\n const dfnRects = dfn.getClientRects();\n // Find the `top` offset when the `dfn` can be spread across multiple lines\n let closestTop = 0;\n let minDiff = Infinity;\n for (const rect of dfnRects) {\n const { top, bottom } = rect;\n const diffFromClickY = Math.abs((top + bottom) / 2 - y);\n if (diffFromClickY < minDiff) {\n minDiff = diffFromClickY;\n closestTop = top;\n }\n }\n\n const top = window.scrollY + closestTop + dfnRects[0].height;\n const left = x - MARGIN;\n panel.style.left = `${left}px`;\n panel.style.top = `${top}px`;\n\n // Find if the panel is flowing out of the window\n const panelRect = panel.getBoundingClientRect();\n const SCREEN_WIDTH = Math.min(window.innerWidth, window.screen.width);\n if (panelRect.right > SCREEN_WIDTH) {\n const newLeft = Math.max(MARGIN, x + MARGIN - panelRect.width);\n const newCaretOffset = left - newLeft;\n panel.style.left = `${newLeft}px`;\n /** @type {HTMLElement | null} */\n const caret = panel.querySelector(".caret");\n if (caret) caret.style.left = `${newCaretOffset}px`;\n }\n\n // As it\'s a dialog, we trap focus.\n // TODO: when <dialog> becomes a implemented, we should really\n // use that.\n trapFocus(panel, dfn);\n}\n\n/**\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction trapFocus(panel, dfn) {\n /** @type NodeListOf<HTMLAnchorElement> elements */\n const anchors = panel.querySelectorAll("a[href]");\n // No need to trap focus\n if (!anchors.length) return;\n\n // Move focus to first anchor element\n const first = anchors.item(0);\n first.focus();\n\n const trapListener = createTrapListener(anchors, panel, dfn);\n panel.addEventListener("keydown", trapListener);\n\n // Hiding the panel releases the trap\n const mo = new MutationObserver(records => {\n const [record] = records;\n const target = /** @type HTMLElement */ (record.target);\n if (target.hidden) {\n panel.removeEventListener("keydown", trapListener);\n mo.disconnect();\n }\n });\n mo.observe(panel, { attributes: true, attributeFilter: ["hidden"] });\n}\n\n/**\n *\n * @param {NodeListOf<HTMLAnchorElement>} anchors\n * @param {HTMLElement} panel\n * @param {HTMLElement} dfn\n * @returns\n */\nfunction createTrapListener(anchors, panel, dfn) {\n const lastIndex = anchors.length - 1;\n let currentIndex = 0;\n /**\n * @param {KeyboardEvent} event\n */\n return event => {\n switch (event.key) {\n // Hitting "Tab" traps us in a nice loop around elements.\n case "Tab": {\n event.preventDefault();\n currentIndex += event.shiftKey ? -1 : +1;\n if (currentIndex < 0) {\n currentIndex = lastIndex;\n } else if (currentIndex > lastIndex) {\n currentIndex = 0;\n }\n anchors.item(currentIndex).focus();\n break;\n }\n\n // Hitting "Enter" on an anchor releases the trap.\n case "Enter":\n hidePanel(panel);\n break;\n\n // Hitting "Escape" returns focus to dfn.\n case "Escape":\n hidePanel(panel);\n dfn.focus();\n return;\n }\n };\n}\n\n/** @param {HTMLElement | null} panel */\nfunction hidePanel(panel) {\n if (!panel) return;\n panel.hidden = true;\n panel.classList.remove("docked");\n}\n})()'})}();
420
446
  //# sourceMappingURL=respec-geonovum.js.map